/* AuraMagic 3.1 — визуальный слой: навигация, каркас страницы, мини-порталы, движение.
   Загружается последним. Цвета только через переменные темы; новых шрифтов и картинок нет.
   Анимируются только transform / opacity / clip-path. Владелец: дизайн (design-v31). */

:root {
  --v-plate: var(--card);
  --v-plate-2: color-mix(in srgb, var(--card) 82%, var(--text) 6%);
  --v-hl: var(--bronze);
  --v-rule: color-mix(in srgb, var(--text) 13%, transparent);
  --v-gold-line: color-mix(in srgb, var(--bronze) 34%, transparent);
  --v-soft: color-mix(in srgb, var(--text) 82%, var(--paper));
  --v-ease: cubic-bezier(.2, .7, .2, 1);
  --v-secnav-h: 52px;
  --v-gap: 48px;
}
@media (min-width: 900px) { :root { --v-gap: 80px; } }

/* ───────── 1. Шапка сайта ───────── */

.site-header { view-transition-name: v31-header; }
.site-header summary { list-style: none; }
.site-header summary::-webkit-details-marker { display: none; }
.site-header summary::marker { content: ""; }

.site-header .top-nav > a,
.site-header .top-nav > details > summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 8px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  text-decoration: none;
  transition: color .25s var(--v-ease), background-color .25s var(--v-ease);
}
.site-header .top-nav > a:hover,
.site-header .top-nav > details > summary:hover,
.site-header .top-nav > details[open] > summary { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }

/* «Где я»: золотая черта под текущим разделом */
.site-header .top-nav > a::after,
.site-header .top-nav > details > summary::after {
  position: absolute;
  inset: auto 10px 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--v-hl);
  content: "";
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .25s var(--v-ease);
}
.site-header .top-nav > a[aria-current]::after,
.site-header .top-nav > .is-here::after,
.site-header .top-nav > details.is-here > summary::after { transform: scaleX(1); }
.site-header .top-nav > a[aria-current],
.site-header .top-nav > .is-here,
.site-header .top-nav > details.is-here > summary { color: var(--text); }

@media (min-width: 900px) {
  .site-header .site-shell { gap: 16px; }
  .site-header .top-nav { flex: 1 1 auto; min-width: 0; gap: 2px; justify-content: center; }
  .site-header .header-actions { flex: none; gap: 4px; }
}
/* шеврон вместо браузерного треугольника */
.site-header .more-menu > summary { gap: 6px; }
.site-header .more-menu > summary::before {
  order: 2;
  width: 7px;
  height: 7px;
  margin-block-start: -3px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  content: "";
  transform: rotate(45deg);
  transition: transform .25s var(--v-ease);
}
.site-header .more-menu[open] > summary::before { transform: translateY(3px) rotate(225deg); }

/* выпадающие панели */
.site-header .more-menu > nav {
  top: calc(100% + 8px);
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--v-gold-line);
  border-radius: 16px;
  background: var(--v-plate);
  box-shadow: 0 24px 60px -18px #02040cb0;
}
.site-header .more-menu > nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--v-soft);
  text-decoration: none;
  transition: color .15s, background-color .15s;
}
.site-header .more-menu > nav a:hover,
.site-header .more-menu > nav a[aria-current] { color: var(--v-hl); background: color-mix(in srgb, var(--text) 6%, transparent); }

/* «Все разделы»: широкая панель-каталог */
.site-header .v31-menu { position: static; }
.site-header .site-shell { position: relative; }
.site-header .v31-menu > nav {
  inset: calc(100% - 6px) 0 auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: min(70vh, 560px);
  padding: 16px;
}
.site-header .v31-menu > nav a { min-height: 52px; font-size: 15px; line-height: 1.3; }

@media (prefers-reduced-motion: no-preference) {
  .site-header details[open] > nav,
  .site-header details[open] > .profile-popover { animation: v31-pop .2s var(--v-ease); }
}
@keyframes v31-pop { from { opacity: 0; transform: translateY(-6px); } }

/* поиск: на широком экране выглядит как поле */
@media (min-width: 1360px) {
  .site-header .header-actions > a[href="/poisk/"] {
    width: auto;
    min-width: 120px;
    justify-content: flex-start;
    gap: 8px;
    padding-inline: 12px;
    border: 1px solid var(--v-rule);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    transition: border-color .25s, color .25s;
  }
  .site-header .header-actions > a[href="/poisk/"]::after { content: "Поиск"; }
  .site-header .header-actions > a[href="/poisk/"]:hover { border-color: var(--v-hl); color: var(--text); }
}

/* телефон: бренд, поиск, «Меню»; меню — лист на всю ширину с крупными целями */
@media (max-width: 899px) {
  .site-header .site-shell { min-height: 60px; gap: 4px; }
  .site-header .header-actions { gap: 2px; margin-inline-start: auto; }
  .site-header .desk-link { display: none; }
  .site-header .mobile-menu summary {
    gap: 8px;
    min-height: 44px;
    padding-inline: 12px;
    border-color: var(--v-gold-line);
    border-radius: 8px;
    font-weight: 600;
  }
  .site-header .mobile-menu summary::before {
    width: 16px;
    height: 10px;
    border-block: 1.5px solid currentColor;
    content: "";
    transition: transform .25s var(--v-ease), height .25s var(--v-ease);
  }
  .site-header .mobile-menu[open] summary::before { transform: rotate(90deg); }
  .site-header .mobile-menu[open] > nav {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-height: calc(100dvh - 76px);
    padding: 12px var(--gutter, 16px) 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-bottom: 1px solid var(--v-gold-line);
    background: var(--paper);
    box-shadow: 0 30px 60px -20px #02040cc0;
  }
  .site-header .mobile-menu[open] > nav a {
    min-height: 52px;
    padding: 8px 12px;
    border: 1px solid var(--v-rule);
    border-radius: 12px;
    background: var(--v-plate);
    color: var(--text);
    font-size: 14px;
    font-weight: 550;
    line-height: 1.25;
    text-decoration: none;
  }
  .site-header .mobile-menu[open] > nav a[aria-current],
  .site-header .mobile-menu[open] > nav a.is-here { border-color: var(--v-hl); color: var(--v-hl); }
  .site-header .mobile-menu[open] > nav a:active { transform: scale(.98); }
  .site-header .mobile-menu[open] > nav > details { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .site-header .profile-menu summary { max-width: 44px; overflow: hidden; font-size: 11px; }
  .site-header .theme-toggle { display: none; }
}

/* ───────── 2. Полоса раздела: постоянная навигация мини-портала ───────── */

.v31-section-nav {
  position: sticky;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  max-width: none;
  min-height: var(--v-secnav-h);
  margin: 0;
  padding-block: 0;
  border-top: 0;
  padding-inline: max(var(--gutter, 16px), (100% - var(--shell, 1120px)) / 2);
  border-bottom: 1px solid var(--v-rule);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  view-transition-name: v31-secnav;
}
html:has(.v31-section-nav) { scroll-padding-top: calc(var(--v-secnav-h) + 16px); }

.v31-section-nav :is(.section-home, .v31-section-home) {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-inline-end: 20px;
  border-inline-end: 1px solid var(--v-rule);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v31-section-nav :is(.section-home, .v31-section-home)::before {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--v-hl);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--v-hl) 18%, transparent);
  content: "";
}
.v31-section-nav ul {
  display: flex;
  flex: 1;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  list-style: none;
}
.v31-section-nav ul::-webkit-scrollbar { display: none; }
.v31-section-nav li { flex: none; display: flex; margin: 0; }
.v31-section-nav li a,
.v31-section-nav > a:not(.section-home, .v31-section-home) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: var(--v-secnav-h);
  padding-inline: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 550;
  display: block;
  max-width: 26ch;
  overflow: hidden;
  line-height: var(--v-secnav-h);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  transition: color .25s var(--v-ease);
}
.v31-section-nav li a::after {
  position: absolute;
  inset: auto 12px 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--v-hl);
  content: "";
  transform: scaleX(0);
  transition: transform .25s var(--v-ease);
}
.v31-section-nav li a:hover { color: var(--text); }
.v31-section-nav li a[aria-current] { color: var(--v-hl); }
.v31-section-nav li a[aria-current]::after { transform: scaleX(1); }

@media (max-width: 899px) {
  :root { --v-secnav-h: 48px; }
  .v31-section-nav { display: flex; gap: 0; padding-inline: 0; }
  .v31-section-nav ul a { max-width: 22ch; white-space: nowrap; }
  .v31-section-nav :is(.section-home, .v31-section-home) { padding-inline: var(--gutter, 16px) 12px; font-size: 17px; }
  .v31-section-nav ul {
    padding-inline: 4px 28px;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  }
  .v31-section-nav li { scroll-snap-align: start; }
  .v31-section-nav li a { padding-inline: 10px; font-size: 14px; }
}

/* ───────── 3. Крошки: «где я» ───────── */

.breadcrumbs ol { flex-wrap: nowrap; align-items: center; gap: 0; min-width: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; min-width: 0; white-space: nowrap; }
.breadcrumbs li:last-child { flex: 0 1 auto; overflow: hidden; }
.breadcrumbs li:last-child { display: block; max-width: 44ch; text-overflow: ellipsis; color: var(--muted); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumbs a:hover { color: var(--v-hl); }
.breadcrumbs li + li::before {
  display: inline-block;
  flex: none;
  width: 6px;
  height: 6px;
  margin-inline: 10px 12px;
  border: solid var(--v-gold-line);
  border-width: 1.5px 1.5px 0 0;
  content: "";
  transform: rotate(45deg);
}
@media (max-width: 899px) {
  .breadcrumbs li:last-child:not(:only-child) { display: none; }
  /* на телефоне один шаг назад — крупной целью */
  .breadcrumbs li:nth-last-child(2) a {
    gap: 8px;
    min-height: 40px;
    padding-inline: 4px 14px;
    color: var(--v-soft);
    font-size: 14px;
    font-weight: 550;
  }
  .breadcrumbs li:nth-last-child(2)::before { display: none; }
  .breadcrumbs li:nth-last-child(2) a::before {
    width: 7px;
    height: 7px;
    border: solid var(--v-hl);
    border-width: 0 0 1.5px 1.5px;
    content: "";
    transform: rotate(45deg);
  }
}

/* ───────── 4. Каркас страницы: ритм и типографика журнала ───────── */

[data-article-page] .article-hero h1,
.v31-portal h1 {
  font-size: clamp(30px, 1.6rem + 1.6vw, 48px);
  line-height: 1.18;
  letter-spacing: -.012em;
  text-wrap: balance;
}
[data-article-page] .article-prose { font-size: clamp(17px, 1rem + .1vw, 18px); line-height: 1.65; }
[data-article-page] .article-prose > p,
[data-article-page] .article-prose > ul,
[data-article-page] .article-prose > ol { max-width: 680px; }
[data-article-page] .article-prose h2 {
  margin-block: 56px 16px;
  font-size: clamp(24px, 1.3rem + .8vw, 32px);
  line-height: 1.25;
  text-wrap: balance;
}
[data-article-page] .article-prose h3 { margin-block: 32px 8px; font-family: var(--font-sans); font-size: clamp(18px, 1.05rem + .2vw, 20px); font-weight: 600; line-height: 1.4; }
[data-article-page] .article-prose > h2:first-child { margin-block-start: 0; }

/* единая метка блока: 12/16, прописные */
.v31-label,
.v31-portal-panel > h2,
.v31-neighbours > h2,
.v31-next::before,
.v31-nearby > summary {
  margin: 0 0 12px;
  color: var(--v-hl);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* свои раскрытия вместо браузерных треугольников */
main summary { list-style: none; cursor: pointer; }
main summary::-webkit-details-marker { display: none; }
main summary::marker { content: ""; }

/* ───────── 5. Мини-портал раздела (хаб) ───────── */

.v31-portal { display: grid; gap: 24px; margin-block: 8px var(--v-gap); }
.v31-portal > * { min-width: 0; margin: 0; }
.v31-portal > [data-copy-slot]:empty,
.v31-portal-tool:empty,
.v31-portal-panel:not(:has(li)) { display: none; }
.v31-portal > [data-copy-slot] { max-width: 60ch; color: var(--v-soft); font-size: clamp(18px, 1.05rem + .2vw, 20px); line-height: 1.6; }

/* главный инструмент: единственный артефакт уровня 2 на экране */
.v31-portal-tool {
  position: relative;
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--v-gold-line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--v-plate-2), var(--v-plate));
  box-shadow: 0 24px 60px -30px #02040cc0;
}
.v31-portal-tool > :is(h2, h3, p, strong) { margin: 0; }
.v31-portal-tool :is(h2, h3, strong) { color: var(--text); font-family: var(--font-serif); font-size: clamp(20px, 1.1rem + .6vw, 26px); font-weight: 400; line-height: 1.25; }
.v31-portal-tool p { color: var(--v-soft); font-size: 15px; line-height: 1.5; }
.v31-portal-tool .btn.primary,
.v31-next .btn.primary {
  position: relative;
  gap: 10px;
  min-height: 52px;
  padding-inline: 22px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
  text-align: start;
  text-decoration: none;
  transition: transform .15s var(--v-ease), background-color .25s, box-shadow .25s;
}
.v31-portal-tool .btn.primary::after,
.v31-next .btn.primary::after { flex: none; content: "→"; transition: transform .25s var(--v-ease); }
.v31-portal-tool .btn.primary:hover::after,
.v31-next .btn.primary:hover::after { transform: translateX(4px); }
.v31-portal-tool .btn.primary:active,
.v31-next .btn.primary:active { transform: scale(.98); }
@media (min-width: 900px) {
  .v31-portal-tool { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; padding: 28px 32px; }
  .v31-portal-tool > :not(.btn):not(a) { grid-column: 1; }
  .v31-portal-tool > .btn, .v31-portal-tool > a { grid-column: 2; grid-row: 1 / span 3; }
}
@media (max-width: 899px) { .v31-portal-tool .btn.primary { width: 100%; justify-content: space-between; } }

/* поиск по разделу */
.v31-section-search { display: flex; gap: 8px; align-items: center; }
.v31-section-search label { flex: 1; min-width: 0; }
.v31-section-search input[type="search"],
.v31-section-search input[type="text"],
input[data-v31-search] {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px 10px 44px;
  border: 1px solid var(--v-rule);
  border-radius: 8px;
  background: var(--paper-deep) no-repeat 14px 50% / 18px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a5967a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/svg%3E");
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color .25s;
}
.v31-section-search input:focus-visible,
input[data-v31-search]:focus-visible { border-color: var(--v-hl); outline: 2px solid var(--v-hl); outline-offset: 2px; }
.v31-section-search input { flex: 1; min-width: 0; }
.v31-section-search > a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 46%;
  min-height: 48px;
  padding-inline: 16px;
  border: 1px solid var(--v-gold-line);
  border-radius: 8px;
  color: var(--v-hl);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color .25s, color .25s, transform .15s var(--v-ease);
}
.v31-section-search > a::after { content: "→"; }
.v31-section-search > a:hover { border-color: var(--v-hl); color: var(--text); }
.v31-section-search > a:active { transform: scale(.98); }
@media (max-width: 599px) { .v31-section-search { flex-wrap: wrap; } .v31-section-search > a { max-width: none; width: 100%; justify-content: space-between; } }
.v31-section-search button { min-height: 48px; padding-inline: 18px; border: 1px solid var(--v-gold-line); border-radius: 8px; background: transparent; color: var(--v-hl); font: inherit; font-weight: 600; cursor: pointer; }

/* три панели: «Сегодня в разделе», «С чего начать», «Популярное» */
.v31-portal-panels { display: grid; gap: 32px; }
.v31-portal-panel { display: block; min-width: 0; margin: 0; padding-block-start: 16px; border-top: 1px solid var(--v-gold-line); }
.v31-portal-panel > h2,
.v31-portal-panel > h2:empty { display: block; }
.v31-portal-panel :is(ul, ol) { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: v31step; }
.v31-portal-panel li { margin: 0; counter-increment: v31step; }
.v31-portal-panel li + li { border-top: 1px solid var(--v-rule); }
.v31-portal-panel a {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 64px;
  padding-block: 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 550;
  line-height: 1.35;
  text-decoration: none;
  text-wrap: balance;
  transition: color .25s var(--v-ease);
}
.v31-portal-panel a::after { grid-column: 3; color: var(--v-hl); content: "→"; transition: transform .25s var(--v-ease); }
.v31-portal-panel a:hover { color: var(--v-hl); }
.v31-portal-panel a:hover::after { transform: translateX(4px); }
.v31-portal-panel a:active { transform: scale(.985); }
.v31-portal-panel a > img {
  grid-column: 1;
  width: 96px;
  height: auto;
  max-height: 72px;
  border-radius: 8px;
  background: var(--paper-deep);
  object-fit: contain;
}
/* «С чего начать»: крупные номера шагов */
.v31-portal-panel[data-v31-panel="start"] a::before {
  grid-column: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--v-gold-line);
  border-radius: 50%;
  color: var(--v-hl);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 650;
  content: counter(v31step);
}
.v31-portal-panel[data-v31-panel="popular"] a::before,
.v31-portal-panel[data-v31-panel="today"] a:not(:has(img))::before {
  grid-column: 1;
  width: 6px;
  height: 6px;
  margin-inline: 4px;
  border-radius: 50%;
  background: var(--v-gold-line);
  content: "";
}
/* «Сегодня»: одна большая карточка */
.v31-portal-panel[data-v31-panel="today"] a {
  min-height: 88px;
  padding: 14px 16px;
  border: 1px solid var(--v-rule);
  border-radius: 12px;
  background: var(--v-plate);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 400;
  transition: border-color .25s, background-color .25s, transform .15s var(--v-ease);
}
.v31-portal-panel[data-v31-panel="today"] a:hover { border-color: var(--v-hl); background: var(--v-plate-2); }
.v31-portal-panel[data-v31-panel="today"] a::before { background: var(--v-hl) !important; box-shadow: 0 0 0 5px color-mix(in srgb, var(--v-hl) 18%, transparent); }

.v31-portal-tool:not(:has(> :nth-child(2))) { display: block; padding: 0; border: 0; background: none; box-shadow: none; overflow: visible; }
.v31-portal-tool:not(:has(> :nth-child(2))) .btn.primary { width: 100%; min-height: 56px; justify-content: space-between; box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--v-hl) 70%, transparent); }
.v31-portal-tool .btn.primary { overflow: hidden; }
.v31-portal-tool .btn.primary > span, .v31-portal-tool .btn.primary { text-wrap: balance; }
@media (min-width: 900px) {
  .v31-portal { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .v31-portal > * { grid-column: 1 / -1; }
  .v31-portal > .v31-portal-tool:not(:has(> :nth-child(2))) { grid-column: span 5; }
  .v31-portal > .v31-portal-tool:not(:has(> :nth-child(2))) + .v31-section-search { grid-column: span 7; }
  .v31-portal > .v31-portal-tool:not(:has(> :nth-child(2))) .btn.primary,
  .v31-portal > .v31-portal-tool + .v31-section-search :is(input, a) { height: 56px; min-height: 56px; }
  .v31-portal > .v31-portal-panel { grid-column: span 4; margin-block-start: 16px; }
  .v31-portal > .v31-portal-panel:nth-last-of-type(1):nth-of-type(1) { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .v31-portal { gap: 32px; }
  .v31-portal-panels { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 48px; }
  .v31-portal-panels > .v31-portal-panel { grid-column: span 4; }
  /* пока «Популярное» ждёт данных, две панели делят ширину поровну */
  .v31-portal:has(> .v31-portal-panel[data-v31-panel="popular"]:not(:has(li))) > .v31-portal-panel { grid-column: span 6; }
}

/* ───────── 6. Каталог подраздела: группы вместо простыни ───────── */

.v31-catalog { display: block; margin-block: 24px var(--v-gap); }
.v31-catalog > .v31-section-search { margin-block-end: 20px; }
.v31-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.v31-index a {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  padding-inline: 12px;
  place-items: center;
  border: 1px solid var(--v-rule);
  border-radius: 8px;
  background: var(--v-plate);
  color: var(--v-soft);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s, color .2s, transform .15s var(--v-ease);
}
.v31-index a:hover { border-color: var(--v-hl); color: var(--v-hl); }
.v31-index a:active { transform: scale(.96); }

.v31-catalog > details { padding: 0; border-bottom: 1px solid var(--v-rule); }
.v31-catalog > details:first-of-type { border-top: 1px solid var(--v-rule); }
.v31-catalog > details > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  transition: color .2s;
}
.v31-catalog > details > summary:hover,
.v31-catalog > details[open] > summary { color: var(--v-hl); }
.v31-catalog > details > summary::after {
  width: 9px;
  height: 9px;
  margin-inline-start: auto;
  border: solid var(--v-hl);
  border-width: 0 1.5px 1.5px 0;
  content: "";
  transform: rotate(45deg);
  transition: transform .25s var(--v-ease);
}
.v31-catalog > details[open] > summary::after { transform: translateY(4px) rotate(225deg); }
.v31-catalog > details > summary[data-count]::before, .v31-catalog > details > summary > .v31-count {
  order: 2;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  content: attr(data-count);
}
.v31-catalog > details > ul,
.v31-catalog > details > .v31-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 8px;
  columns: auto;
  margin: 0;
  padding: 4px 0 20px;
  list-style: none;
}
.v31-catalog > details li { margin: 0; }
.v31-catalog > details a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--v-rule);
  border-radius: 12px;
  background: var(--v-plate);
  color: var(--v-soft);
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color .2s, color .2s, background-color .2s, transform .15s var(--v-ease);
}
.v31-catalog > details a:hover { border-color: var(--v-hl); background: var(--v-plate-2); color: var(--v-hl); }
.v31-catalog > details a:active { transform: scale(.98); }
.v31-catalog [hidden] { display: none !important; }
.v31-previous > summary { min-height: 44px; display: flex; align-items: center; color: var(--muted); font-size: 14px; }

/* ───────── 7. Следующий шаг: один главный, один запасной ───────── */

.v31-next {
  display: grid;
  gap: 12px 24px;
  align-items: center;
  margin-block: var(--v-gap) 24px;
  padding: 24px 20px;
  border: 1px solid var(--v-gold-line);
  border-radius: 16px;
  background: linear-gradient(160deg, var(--v-plate-2), var(--v-plate));
  box-shadow: 0 24px 60px -30px #02040cc0;
}
.v31-next::before { margin: 0; content: "Дальше"; }
.v31-next .btn.primary { max-width: 100%; overflow-wrap: anywhere; }
.v31-next [data-v31-backup] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--v-hl);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.v31-next [data-v31-backup]::after { content: "→"; transition: transform .25s var(--v-ease); }
.v31-next [data-v31-backup]:hover { color: var(--text); }
.v31-next [data-v31-backup]:hover::after { transform: translateX(4px); }
.v31-next-core { display: contents; }
@media (min-width: 900px) {
  .v31-next { grid-template-columns: auto minmax(0, 1fr); padding: 28px 32px; }
  .v31-next::before { grid-column: 1 / -1; }
  .v31-next .btn.primary { justify-self: start; }
  .v31-next > .v31-ritual, .v31-next > .v31-authority { grid-column: 1 / -1; }
}
@media (max-width: 899px) { .v31-next .btn.primary { width: 100%; justify-content: space-between; } }

.v31-ritual { margin: 4px 0 0; padding-block-start: 16px; border-top: 1px solid var(--v-rule); }
.v31-ritual a { color: var(--v-hl); font-weight: 600; text-decoration: none; }
.v31-authority { color: var(--muted); border-top-color: var(--v-rule); }

/* «Рядом»: вторично, чипами */
.v31-nearby {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: min(100% - var(--gutter, 16px) * 2, var(--shell, 1120px));
  margin: 0 auto 24px;
}
.v31-nearby > summary { flex: none; margin: 0 8px 0 0; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.v31-nearby > summary::after { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; content: ""; transform: rotate(-45deg); transition: transform .25s var(--v-ease); }
.v31-nearby[open] > summary::after { transform: rotate(45deg); }
.v31-nearby > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--v-rule);
  border-radius: 999px;
  color: var(--v-soft);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.v31-nearby > a:hover { border-color: var(--v-hl); color: var(--v-hl); }

.v31-neighbours { margin-block: 24px var(--v-gap); padding-block-start: 24px; border-top: 1px solid var(--v-rule); }
.v31-neighbours > h2 { color: var(--muted); }
.v31-neighbours .methodology-note h2 { margin: 0 0 4px; font-family: var(--font-sans); font-size: 13px; font-weight: 650; }
.v31-neighbours .methodology-note { color: var(--muted); font-size: 13px; line-height: 18px; }
.v31-neighbours details > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 14px; }
.v31-neighbours details > summary::after { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; content: ""; transform: rotate(45deg); }

/* ───────── 8. Карточки и ссылки: одинаковые состояния ───────── */

:where(.v31-portal, .v31-catalog, .v31-next, .v31-nearby, .v31-section-nav, .site-header) a:focus-visible,
:where(.v31-portal, .v31-catalog, .v31-next, .v31-nearby) summary:focus-visible {
  outline: 2px solid var(--v-hl);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ───────── 9. Движение ───────── */

@view-transition { navigation: auto; }

@media (prefers-reduced-motion: no-preference) {
  /* переход между страницами: шапка и полоса раздела стоят, содержимое сменяется */
  ::view-transition-group(root) { animation-duration: .3s; }
  ::view-transition-old(root) { animation: v31-leave .16s cubic-bezier(.4, 0, 1, 1) both; }
  ::view-transition-new(root) { animation: v31-arrive .34s var(--v-ease) both; }
  ::view-transition-group(v31-header),
  ::view-transition-group(v31-secnav) { animation-duration: .25s; animation-timing-function: var(--v-ease); z-index: 3; }
  ::view-transition-group(v31-hero) { animation-duration: .42s; animation-timing-function: var(--v-ease); }
  ::view-transition-old(v31-hero), ::view-transition-new(v31-hero) { height: 100%; object-fit: contain; }

  /* откат без View Transitions: только сдвиг, без прозрачности (LCP не прячем) */
  @supports not (view-transition-name: none) {
    .page-main { animation: v31-shift .36s var(--v-ease) both; }
  }

  /* появление блоков при прокрутке: чистый CSS, без скрипта всё видно */
  @supports (animation-timeline: view()) {
    .v31-portal-panel,
    .v31-next,
    .v31-neighbours,
    [data-article-page] .article-prose > :is(figure, table, blockquote, .am-short, .am-faq) {
      animation: v31-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 28%;
    }
  }
}
@keyframes v31-leave { to { opacity: 0; transform: translateY(-6px); } }
@keyframes v31-arrive { from { opacity: 0; transform: translateY(12px); } }
@keyframes v31-shift { from { transform: translateY(12px); } }
@keyframes v31-rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .site-header *, .v31-section-nav *, .v31-portal *, .v31-catalog *, .v31-next * { transition-duration: .01ms !important; animation: none !important; }
}

/* ───────── 10. Светлая тема: артефакты остаются ночными ───────── */

:root[data-theme="light"] :is(.v31-portal-tool, .v31-next) {
  --card: #151e31;
  --text: #f4eddf;
  --muted: #b5bbcb;
  --bronze: #d8b783;
  --v-plate: #12192b;
  --v-plate-2: #1a2238;
  --v-hl: #e4cea0;
  --v-soft: #cfd2dc;
  --v-rule: #ffffff22;
  --v-gold-line: #c5a56a52;
  color: var(--text);
}
:root[data-theme="light"] .v31-section-nav { background: color-mix(in srgb, var(--paper) 92%, transparent); }
:root[data-theme="light"] .site-header .more-menu > nav { box-shadow: 0 24px 60px -24px #2a20105c; }

/* ───────── 11. Фон раздела (motion-bg v2) ───────── */
/* На хабе, каталоге и инструменте сцена гравюры заменяет общую обложку: место справа
   отдано фону с первого кадра, поэтому сдвига вёрстки нет. */
@media (min-width: 900px) {
  :root:is([data-v31-page-type="hub"], [data-v31-page-type="catalog"], [data-v31-page-type="tool"]) .article-hero[data-motion-bg] .article-hero-art { visibility: hidden; }
}
@media (max-width: 899px) {
  :root:is([data-v31-page-type="hub"], [data-v31-page-type="catalog"], [data-v31-page-type="tool"]) .article-hero[data-motion-bg] .article-hero-art { display: none; }
}
.article-hero[data-motion-bg] { position: relative; isolation: isolate; }

/* ───────── 12. Один левый край: всё содержимое в колонке 1080 px ───────── */
.v31-portal.site-shell,
.v31-next.site-shell,
.v31-neighbours.site-shell,
.v31-catalog.site-shell,
.v31-nearby,
.page-main > .ritual-social,
.page-main .ritual-social { width: min(100% - var(--gutter, 16px) * 2, 1080px); max-width: 1080px; margin-inline: auto; }
.article-reading .v31-catalog.site-shell { width: auto; max-width: none; }
/* каталог подраздела занимает всю ширину, без колонки чтения */
:root[data-v31-page-type="catalog"] [data-article-page] .article-layout { display: block; }
:root[data-v31-page-type="catalog"] :is(.article-reading, .article-prose) { width: auto; max-width: none; }
:root[data-v31-page-type="catalog"] .article-hero-inner { padding-block-end: 8px; }

/* ───────── 13. Мелкая подгонка под разметку structure-v31 ───────── */
.v31-index li { display: flex; margin: 0; }
.v31-next > .v31-nearby { grid-column: 1 / -1; width: auto; margin: 0; }
.v31-next > :is(.v31-ritual, .v31-authority) { grid-column: 1 / -1; }
.v31-section-search > a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.v31-section-search > a { display: block; max-width: 17rem; line-height: 46px; padding-inline: 16px 34px; position: relative; }
.v31-section-search > a::after { position: absolute; inset-inline-end: 14px; }
@media (max-width: 599px) { .v31-section-search > a { max-width: none; } }

/* Continuation: align section tabs with Fable's 1080px reading shell. */
@media (min-width: 900px) {
  .v31-section-nav { padding-inline: max(var(--gutter, 16px), (100% - 1080px) / 2); }
}
.v31-portal-panel > h2:empty { display: none; }
.breadcrumbs a { min-height: 44px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
/* Compact wordmark preserves room for four mobile controls without collisions. */
@media (max-width: 599px) {
  .site-header .brand { font-size: 21px; flex-shrink: 0; }
  .site-header .brand-mark { display: none; }
  .site-header .header-actions { gap: 2px; }
  .site-header .profile-menu > summary { min-width: 44px; min-height: 44px; padding-inline: 4px; }
  .site-header .mobile-menu > summary { padding-inline: 8px; gap: 6px; }
}

/* Override structural wrapping without replacing authored labels. */
.v31-section-nav.site-shell { display: flex; flex-wrap: nowrap; align-items: stretch; }
.v31-section-nav.site-shell ul { flex-wrap: nowrap; scrollbar-width: thin; }
.v31-section-nav.site-shell ul::-webkit-scrollbar { display: block; height: 3px; }
.v31-section-nav.site-shell ul a { display: inline-flex; align-items: center; white-space: nowrap; max-width: none; min-width: 44px; min-height: 44px; height: var(--v-secnav-h); line-height: 1.25; padding-block: 0; }
.v31-section-nav.site-shell .section-home { white-space: nowrap; max-width: 30vw; min-width: 0; padding-block: 0; }
.v31-nav-scroll {
  flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0;
  display: grid; place-items: center; border: 0; border-radius: 6px;
  background: transparent; color: var(--v-hl); cursor: pointer;
}
.v31-nav-scroll::before { content: ''; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
.v31-nav-scroll[data-direction="-1"]::before { transform: rotate(135deg); }
.v31-nav-scroll:disabled { opacity: .3; cursor: default; }
.v31-nav-scroll:focus-visible { outline: 2px solid var(--v-hl); outline-offset: -3px; }
.v31-section-nav.v31-scroll-controls ul { mask-image: none; -webkit-mask-image: none; padding-inline: 4px; }
.article-header > [data-v31-primary-control] { margin-block: 20px; width: 100%; min-width: 0; }
.article-header > .v31-portal-tool[data-v31-primary-control] { display: block; }
@media (max-width: 899px) {
  :root:is([data-v31-section="dreams"], [data-v31-section="stones"])[data-v31-page-type="hub"] .article-hero-inner { display: flex; flex-direction: column; padding-block: 16px 24px; }
  :root:is([data-v31-section="dreams"], [data-v31-section="stones"])[data-v31-page-type="hub"] .article-header { order: 0; width: 100%; min-width: 0; }
  :root:is([data-v31-section="dreams"], [data-v31-section="stones"])[data-v31-page-type="hub"] .article-hero-art { order: 1; }
  .v31-section-nav.site-shell .section-home { font-size: 15px; gap: 6px; padding-inline: 12px; }
}

/* Keep the existing header controls inside 320px without shrinking targets. */
@media(max-width:359px){
 .site-header .site-shell{gap:4px}
 .site-header .brand{font-size:18px;letter-spacing:-.5px}
 .site-header .mobile-menu>summary{padding-inline:4px;gap:2px}
 .site-header .header-actions{gap:0}
}

/* 3.2 desktop composition: preserve ritual internals and mobile flow. */
@media (min-width: 1100px) {
  body:has(#home3) main { max-width: none; }
  #home3 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0 40px;
    max-width: 1440px;
    padding-inline: 48px;
    align-items: start;
  }
  #home3 > * { grid-column: 1 / -1; min-width: 0; }
  #home3 > #hm-tg, #home3 > #hm-friend { grid-column: 1 / 7; }
  #home3 > #hm-today, #home3 > #hm-trust { grid-column: 7 / -1; }
  #home3 > .hm-panel { padding-block: 40px; }
  #home3 #hm-sections .hm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  #home3 #hm-tg .hm-tg-list { grid-template-columns: 1fr; }
  #home3 #hm-tg .hm-tg-list li { padding: 12px 16px; }
  #home3 #hm-today .hm-sub, #home3 #hm-trust .hm-sub { max-width: 34em; }
}
@media (min-width:1100px) {
  body:has(#home3) .article-hero-inner { max-width:1440px; padding-inline:48px; text-align:left; }
  body:has(#home3) .article-hero h1 { max-width:900px; }
  body:has(#home3) .article-hero .lead { margin-inline:0; max-width:680px; }
  #home3 > #hm-stage { grid-column:1 / 8; grid-row:1; }
  #home3 > #hm-today { grid-column:8 / -1; grid-row:1; align-self:center; }
  #home3 > #hm-birth, #home3 > #hm-yours { grid-column:1 / -1; }
  #home3 > #hm-tg { grid-column:1 / -1; }
  #home3 #hm-tg .hm-tg-list { grid-template-columns:repeat(3,minmax(0,1fr)); max-width:none; }
  #home3 #hm-sections .hm-grid a { height:100%; }
  #home3 #hm-today h2 { font-size:clamp(30px,3vw,44px); line-height:1.2; }
}
/* 3.2 reading geometry: intrinsic height, bounded prose, shrinkable children. */
:root { --article-reading-width:680px; }
.numerology > header.article-header { display:block; height:auto; max-height:none; min-height:0; overflow:visible; padding-bottom:24px; }
.numerology > header.article-header::after { display:none; }
.numerology > header.article-header .num-hero-art { float:none; max-width:480px; margin:24px 0 0; }
.numerology > header.article-header :is(h1,.lead) { max-width:680px; width:auto; height:auto; position:static; }
.numerology > .v31-portal { clear:both; }
.article-prose :is(p,blockquote), .num-reference, .num-seo-section { max-width:680px; }
.article-prose, .article-reading, .v31-portal > *, .v31-section-nav li { min-width:0; }
.article-prose :is(h2,h3,h4), .article-header h1 { overflow-wrap:break-word; word-break:normal; hyphens:none; }
.p0-method-preview { display:flow-root; height:auto; max-height:none; overflow:visible; }
.p0-method > summary { clear:both; min-height:44px; line-height:1.5; }
.article-prose :is(p,li,blockquote) { line-height:1.65; }

/* 3.2 visible section directions. */
.v32-icon { flex:none; color:var(--bronze); }
.v31-section-nav { position:relative; height:auto; max-height:none; padding-block:16px; }
.v31-section-nav ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; overflow:visible; gap:12px; }
.v31-section-nav ul li { width:auto; }
.v31-section-nav ul a { display:flex; align-items:center; gap:12px; height:100%; white-space:normal; line-height:1.4; padding:12px; }
.v31-nav-scroll { display:none!important; }
@media(min-width:1100px) { .v31-section-nav { max-width:1440px; flex-wrap:wrap; } .v31-section-nav ul { flex:1 1 100%; grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:699px) { .v31-section-nav { display:block; } .v31-section-nav ul { grid-template-columns:repeat(2,minmax(0,1fr)); } .v31-section-nav ul a { font-size:13px; gap:8px; } .v32-icon { width:28px;height:28px; } }

.v32-method { padding:12px 0; border-block:1px solid var(--v-rule); font-size:14px; }
.v32-method summary { cursor:pointer; min-height:44px; align-content:center; }
.v32-method summary :is(h2,h3,strong) { display:inline; font:inherit; }
.p0-meta { max-width:680px; margin-inline:auto; align-items:center; gap:8px 20px; }
[data-social-vote].ritual-social { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; padding:12px 0; margin:16px 0; border:0; background:none; box-shadow:none; }
[data-social-vote].ritual-social h2 { margin:0; font:inherit; font-size:14px; }
[data-social-vote].ritual-social small { display:none; }
[data-social-vote].ritual-social p:empty { display:none; }
[data-social-vote].ritual-social button { padding:6px 12px; min-height:44px; }

.site-footer { margin-top:64px; padding:40px 0; border-top:1px solid var(--v-rule); }
.site-footer > .site-shell { display:grid; grid-template-columns:1.3fr repeat(3,minmax(0,1fr)); gap:32px; max-width:1440px; align-items:start; }
.v32-footer-group { display:flex; flex-direction:column; gap:8px; min-width:0; }
.v32-footer-group a { display:block; padding:8px 0; line-height:1.5; font-size:14px; text-decoration:none; color:var(--muted); overflow-wrap:break-word; }
.v32-footer-group a:hover { color:var(--bronze); }
@media(max-width:699px) { .site-footer > .site-shell { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; } .site-footer .brand { grid-column:1/-1; } }

.site-header .header-actions a.v32-search-link { width:auto; gap:8px; padding-inline:12px; font-size:14px; }
.site-header .v32-search-link span { display:inline; width:auto; height:auto; position:static; clip-path:none; overflow:visible; }
.site-header .v32-search-link::after { content:none!important; }
[data-search-form] { max-width:680px; margin:24px auto; }
[data-search-form] label { display:block; margin-bottom:12px; }
[data-search-form] input { width:100%; min-height:48px; font-size:18px; }
.search-items { max-width:680px; margin-inline:auto; padding:0; list-style:none; }
.search-items li { padding:20px 0; border-bottom:1px solid var(--v-rule); }
.search-items li a { font-size:20px; line-height:1.4; }
.search-items li p { margin-top:8px; line-height:1.6; }

.v31-portal-panel li > a { display:flex; gap:14px; align-items:center; min-height:64px; line-height:1.5; }
.v31-portal-panel li > a .v32-icon { width:36px; height:36px; }
.v31-portal-tool > a { display:inline-flex; gap:14px; align-items:center; }
.v31-portal [data-v31-panel="start"] { grid-column:1/-1; }
.v31-portal [data-v31-panel="start"] ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
@media(max-width:699px) { .v31-portal [data-v31-panel="start"] ul { grid-template-columns:1fr; } }

[data-answer-lunar-context] { display:grid; grid-template-columns:minmax(180px,1fr) minmax(0,2fr); align-items:center; gap:12px 24px; max-width:680px; margin:24px 0; }
[data-answer-lunar-context] label { display:flex; align-items:center; flex-wrap:wrap; gap:8px; min-width:0; }
[data-answer-lunar-context] select { max-width:100%; min-width:0; min-height:44px; }
[data-answer-lunar-context] nav { display:flex; flex-wrap:wrap; gap:8px 16px; }
[data-answer-lunar-context] nav a { display:inline-flex; align-items:center; min-height:44px; margin:0!important; }
[data-answer-lunar-context] p { margin:0; line-height:1.5; }
[data-answer-moon] { grid-column:1/-1; }
main > .lunar-cluster { width:min(100% - 32px,1080px); margin:32px auto; }
.lunar-cluster [hidden] { display:none!important; }
.lunar-today { display:flex; align-items:flex-start; gap:20px; }
.lunar-today > div { min-width:0; }
.lunar-today svg { flex:none; width:100px; height:100px; }
.lunar-scroll { max-width:100%; overflow-x:auto; }
@media(max-width:699px) { [data-answer-lunar-context] { grid-template-columns:1fr; } .lunar-today svg { width:64px;height:64px; } }

.numerology > header.article-header:has([data-v31-primary-control]) > figure { display:none; }
.numerology > header.article-header [data-v31-primary-control] { max-width:680px; margin:20px 0; }
.numerology > header.article-header .am-short { max-width:680px; }

.v31-section-nav.site-shell { display:block; padding:12px max(16px,calc((100% - 1320px)/2)); max-width:none; }
.v31-section-nav.site-shell .section-home { border:0; padding:0 0 8px; min-height:32px; max-width:none; }
.v31-section-nav.site-shell ul { display:grid; padding:0; gap:8px; overflow:visible; mask-image:none; -webkit-mask-image:none; }
.v31-section-nav.site-shell ul a { white-space:normal; overflow:visible; text-overflow:clip; height:auto; min-width:0; max-width:100%; width:100%; padding:8px; line-height:1.4; }
.v31-section-nav.site-shell li { min-width:0; }
:root:is([data-v31-page-type="hub"],[data-v31-page-type="tool"]) .article-hero-inner { padding-block:20px 24px; }
:root:is([data-v31-page-type="hub"],[data-v31-page-type="tool"]) .article-hero h1 { font-size:clamp(28px,3.2vw,44px); line-height:1.2; }

/* Keep long approved labels inside narrow tabs; preserve compact mobile header. */
.v31-section-nav.site-shell ul a { overflow-wrap:anywhere; word-break:normal; }
@media(max-width:699px) { .site-header .header-actions a.v32-search-link { width:44px; padding-inline:10px; } .site-header .v32-search-link span { display:none; } }

.v31-section-nav.site-shell .section-home { white-space:normal; overflow-wrap:anywhere; }
.article-header > [data-v31-primary-control] { margin:20px 0; max-width:680px; min-height:210px; }

/* Entry tasks: title and original form before section navigation or long prose. */
[data-v32-primary-page] .article-hero-inner { padding-block:20px; }
[data-v32-primary-page] .article-hero h1,
[data-v32-primary-page] .numerology > .article-header h1 { font-size:clamp(28px,3.2vw,44px); line-height:1.2; margin-bottom:16px; }
[data-v32-primary-page] .article-header > [data-v31-primary-control] { margin:16px 0; }
[data-v32-primary-page] .numerology > .article-header { padding-top:20px; }
[data-v32-primary-page] .article-header .num-hero-art { display:none; }

.p0-meta { width:min(680px,calc(100% - 36px)); box-sizing:border-box; }

/* Match the legacy selector specificity so empty mounts reserve their form. */
[data-v32-primary-page] .article-header > .calc[data-v31-primary-control] { min-block-size:210px; box-sizing:border-box; }
[data-v32-primary-page] .article-header > .calc[data-calc="biorhythm"] { min-block-size:310px; }
[data-answer-lunar-context] { grid-template-rows:minmax(44px,auto) minmax(44px,auto) minmax(52px,auto); }
[data-lunar-status] { min-block-size:24px; }
[data-lunar-zone] { min-block-size:24px; }
@media(max-width:699px) {
 [data-answer-lunar-context] { grid-template-rows:minmax(44px,auto) minmax(48px,auto) minmax(44px,auto) minmax(52px,auto); }
 [data-lunar-zone] { min-block-size:60px; }
}

[data-answer-lunar-context] label { display:grid; grid-template-columns:auto minmax(0,1fr); }
[data-answer-lunar-context] select { width:100%; }

/* Profile status must not move adjacent header links after hydration. */
@media(min-width:1100px) {
 .site-header .top-nav .ritual-nav { inline-size:196px; flex:0 0 196px; box-sizing:border-box; justify-content:flex-start; }
}
