/* Astryvelon Web — дизайн-система 0.4 «Обсерватория».
   Единственная тёмная тема, как в приложении beta9 (academy.css, редакция 08.11 + компактный каталог 12.11):
   графит #0b1220, белое стекло карточек, синий акцент #2563EB/#6EA8FF, Inter для текста,
   узкий гротеск Barlow Semi Condensed (системные запасные, как в приложении) для капителей и кнопок.
   Шрифты не тянутся из сети: Inter лежит локально, остальные — системные запасные приложения. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/inter-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/inter-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/inter-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
/* ---------- токены ---------- */
:root {
  color-scheme: dark;
  /* «Обсерватория» приложения: графит, белое стекло, один синий акцент */
  --bg: #0b1220;
  --bg-2: #0d1526;
  --surface: #101722;
  --surface-2: #172030;
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .03));
  --ink: #ffffff;
  --muted: #a3abba;
  --line: rgba(255, 255, 255, .11);
  --line-strong: rgba(255, 255, 255, .24);
  --accent: #6ea8ff;
  --accent-soft: rgba(37, 99, 235, .12);
  --link: #8cb9ff;
  --primary-bg: #2563eb;
  --primary-fg: #ffffff;
  --primary-hover: #3b76f0;
  --focus: #6ea8ff;
  --ok: #7bd0a6;
  --ok-soft: rgba(123, 208, 166, .1);
  --warn: #e6c77f;
  --warn-soft: rgba(230, 199, 127, .1);
  --danger: #f2a38a;
  --danger-soft: rgba(242, 163, 138, .1);
  --plan: #a8b9d4;
  --nova: #6ea8ff;
  --nova-soft: rgba(110, 168, 255, .12);
  --aster: #a3abba;
  --aster-soft: rgba(163, 171, 186, .12);
  --header-bg: rgba(8, 13, 24, .96);
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 30px rgba(0, 0, 0, .35);
  --sky-top: #05070c;
  --sky-bottom: #0b1220;

  --font-head: 'Barlow Semi Condensed', 'Roboto Condensed', 'Arial Narrow', system-ui, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --font-serif: 'Cambria Math', 'STIX Two Math', 'Times New Roman', serif;
  --r-s: 9px;
  --r-m: 14px;
  --r-l: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: .25s;
  --wrap: 1160px;

  /* старые имена 0.2 — чтобы скрипты и страницы не ломались */
  --av-text: var(--ink);
  --av-text-muted: var(--muted);
  --av-accent: var(--link);
  --av-gold: var(--accent);
  --av-border: var(--line);
  --av-card: var(--surface);
  --av-space-700: var(--surface-2);
  --av-space-800: var(--surface-2);
  --av-success: var(--ok);
  --av-warn: var(--warn);
  --av-danger: var(--danger);
  --av-accent-2: var(--plan);
  --av-radius-s: var(--r-s);
  --av-radius-m: var(--r-m);
  --av-font-mono: var(--font-mono);
  --av-text-s: 13px;
  --av-text-m: 14px;
}

@media (prefers-reduced-motion: reduce) { :root { --dur: .01ms; } }
@media (prefers-reduced-transparency: reduce) { :root { --glass: #0e121b; } }

/* ---------- основа ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease); }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--primary-fg); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--primary-bg); color: var(--primary-fg); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
.preview-bar, .draft-lang { margin: 0; padding: 6px 16px; font-size: 12.5px; text-align: center; border-bottom: 1px solid var(--line); }
.preview-bar { background: var(--warn-soft); color: var(--warn); }
.draft-lang { background: var(--surface-2); color: var(--plan); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; letter-spacing: -.01em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.1; margin: 8px 0 14px; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); line-height: 1.2; margin: 40px 0 10px; }
h3 { font-size: 1.2rem; line-height: 1.3; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 44em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono, .readout { font-family: var(--font-mono); }
.eyebrow { font: 600 12px/1.4 var(--font-head); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.note { border-inline-start: 2px solid var(--accent); padding: 10px 14px; background: rgba(110, 168, 255, .07); border-radius: 0 8px 8px 0; }
.note:empty { display: none; }
.draft { border: 1px dashed var(--warn); color: var(--warn); padding: 10px 14px; border-radius: var(--r-s); }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap;
  padding: 10px max(16px, calc((100% - var(--wrap)) / 2)); background: var(--header-bg); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none;
  font-family: var(--font-sans); font-weight: 600; font-size: 1.05rem; letter-spacing: 0; }
/* знак-звезда приложения (символ i-sky из index.html beta9) */
.brand-mark { width: 26px; height: 26px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.brand:hover { color: var(--ink); }
.nav-toggle { flex: 1; }
.nav-toggle summary { cursor: pointer; display: none; list-style: none; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-s); width: max-content; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.burger { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.nav-toggle summary { gap: 8px; }
.nav-toggle nav ul { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.nav-toggle nav a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--muted); text-decoration: none; font-size: 14.5px;
  border-bottom: 1.5px solid transparent; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.nav-toggle nav a:hover { color: var(--ink); }
.nav-toggle nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-s);
  background: transparent; color: var(--ink); cursor: pointer; transition: background-color var(--dur) var(--ease); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
/* на кнопке — значок темы, в которую переключит */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.lang-switch { position: relative; }
.lang-switch summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-s); font-size: 14px; white-space: nowrap; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none; min-width: 230px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--r-m); box-shadow: var(--shadow); }
.lang-switch li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lang-switch li a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 8px; color: var(--ink); text-decoration: none; }
.lang-switch li a[aria-current] { color: var(--accent); }
.lang-code { display: none; }
.lang-switch:not([open]) ul { display: none; }
.lang-switch summary { min-width: 40px; justify-content: center; }

/* ---------- раскладка ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 28px 16px 64px; }
main:focus { outline: none; }
main > p, main > section > p, main > ul:not(.cards):not(.sheets):not(.release-files), .prose { max-width: 46em; }

/* ---------- кнопки и формы ---------- */
/* кнопки-пилюли приложения: капитель узким гротеском, основное действие — синяя заливка со свечением */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  font: 600 12px var(--font-head); letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary-fg); background: var(--primary-bg); border: 1px solid var(--primary-bg); border-radius: 999px; padding: 0 20px;
  box-shadow: 0 4px 18px rgba(37, 99, 235, .35);
  cursor: pointer; text-decoration: none; transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.btn:hover { color: var(--primary-fg); background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 11px; }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-strong); color: var(--ink); box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); color: #fff; filter: brightness(1.1); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent);
  text-underline-offset: 5px; font-weight: 500; }
.link-arrow::after { content: '→'; transition: transform var(--dur) var(--ease); }
[dir="rtl"] .link-arrow::after { content: '←'; }
.link-arrow:hover::after { transform: translateX(3px); }
.linklike { font: inherit; background: none; border: 0; color: var(--link); cursor: pointer; padding: 0; text-decoration: underline; min-height: 32px; }

.form { display: grid; gap: 14px; max-width: 440px; }
.form-inline { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; max-width: none; }
.field { display: grid; gap: 5px; }
.field span { font-size: 14px; color: var(--muted); }
input, select, textarea { font: inherit; color: #fff; background: rgba(0, 0, 0, .4); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 10px 12px; min-width: 0; min-height: 44px; }
select, select option { color-scheme: dark; background-color: #303744; color: #f1f4fc; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
textarea { resize: vertical; width: 100%; }
.check { display: flex; gap: 10px; align-items: center; min-height: 40px; }
.check input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.message { padding: 10px 14px; border-radius: var(--r-s); background: var(--danger-soft); color: var(--danger); }
.message[data-kind="ok"] { background: var(--ok-soft); color: var(--ok); }
.message[data-kind="info"] { background: var(--surface); color: var(--ink); }
.hp { position: absolute; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- карточки, статусы, таблицы ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; font: 600 11px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-beta { color: var(--ok); }
.status-dev, .status-rework { color: var(--warn); }
.status-design, .status-spec { color: var(--plan); }
h1 .status { font-size: 12px; position: relative; top: -.5em; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 0; list-style: none; }
/* карточки — тонкое белое стекло приложения, без собственного размытия */
.card { position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font: 700 17px/1.2 var(--font-head); letter-spacing: .05em; text-transform: uppercase; }
.card p { margin: 8px 0 0; }
.card h3 a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.news { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: start; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }
.sha { font-family: var(--font-mono); font-size: 12px; word-break: break-all; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.sessions { padding-inline-start: 18px; }
.sessions li { margin: 6px 0; }
.danger h2 { color: var(--danger); }

/* ---------- продукты ---------- */
/* вкладки приложения: верхние скругления и синяя черта-«чернила» под активной */
.product-tabs { margin: 0 0 14px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.product-tabs ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; width: max-content; }
.product-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px 10px 0 0;
  color: var(--muted); text-decoration: none; font-size: 13px; transition: color .2s, background-color .2s; }
.product-tabs a:hover { color: #fff; background: rgba(134, 147, 169, .10); }
.product-tabs a[aria-current] { color: #fff; background: rgba(134, 147, 169, .10); box-shadow: inset 0 -3px 0 var(--accent); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 20px; }
.feature { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-l); padding: 6px 22px 16px; box-shadow: var(--shadow); }
.feature.done { border-top: 3px solid var(--ok); }
.feature.planned { border-top: 3px solid var(--plan); }
.feature h2 { font-size: 1.25rem; margin-top: 16px; }
.checks, .todo { list-style: none; padding: 0; margin: 0; }
.checks li, .todo li { position: relative; padding-inline-start: 26px; margin: 9px 0; }
.checks li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--ok); font-weight: 700; }
.todo li::before { content: '○'; position: absolute; inset-inline-start: 0; color: var(--plan); }
.limits ul { padding-inline-start: 20px; }
.counts { color: var(--muted); }
.count-done { color: var(--ok); }
.count-planned { color: var(--plan); }
.release-files { list-style: none; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.release-file h3 { margin: 0 0 8px; }

/* ---------- Nova: справочник ---------- */
.nova form[role="search"] { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.nova form[role="search"] .field { flex: 1 1 260px; }
#nova-out { margin: 16px 0; }
.nova-layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; margin-top: 18px; }
.nova-side { border-inline-end: 1px solid var(--line); padding-inline-end: 16px; }
.nova-side h3 { font: 500 12px/1.4 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 16px 0 6px; }
.subject-list, .topics { list-style: none; padding: 0; margin: 0; }
.subject-list button, .topics button { display: block; width: 100%; min-height: 40px; text-align: start; font: inherit; color: var(--ink);
  background: none; border: 0; border-radius: var(--r-s); padding: 6px 10px; cursor: pointer; }
.subject-list button[aria-pressed="true"], .topics a[aria-current] { background: var(--nova-soft); color: var(--nova); }
.subject-list button:hover, .topics button:hover, .topics a:hover { background: var(--surface-2); }
.topics a { display: flex; align-items: center; min-height: 40px; padding: 4px 10px; border-radius: var(--r-s); text-decoration: none; color: var(--ink); }
.nova-out { min-height: 120px; }
.nova-side .topics { padding-inline-start: 0; }
.concept .lead-s { font-size: 1.05rem; }
/* формулы — как в приложении: тёмная плашка и математический serif */
.formula { background: rgba(0, 0, 0, .45); border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 16px; }
.formula h4 { margin: 4px 0 0; font: 600 11px var(--font-head); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.formula-text { font-family: var(--font-serif); font-size: 1.25rem; color: var(--ink); margin: 6px 0 8px; }
.vars, .sources { padding-inline-start: 18px; }
.badge { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; vertical-align: middle; }
.badge-draft { background: var(--warn-soft); color: var(--warn); }
.badge-reviewed { background: var(--aster-soft); color: var(--aster); }
.badge-approved { background: var(--ok-soft); color: var(--ok); }
.exercise { margin-top: 14px; }
.exercise-form { display: flex; flex-wrap: wrap; gap: 8px; }
.exercise-form input { flex: 1 1 160px; }
.check-result[data-status="correct"] { color: var(--ok); }
.check-result[data-status="wrong"], .check-result[data-status="bad_unit"], .check-result[data-status="need_unit"], .check-result[data-status="unparsed"] { color: var(--warn); }
.hint { color: var(--muted); font-style: italic; }
.refusal { border-inline-start-color: var(--warn); }
.topics, .choices { padding-inline-start: 18px; }
.choices li { margin: 6px 0; }
.choices a { display: inline-flex; min-height: 36px; align-items: center; }
.crumbs { margin: 0; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-mono); }
.status-filter { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0; }

/* ---------- Academy ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.dash h2 { font-size: 1.2rem; margin-top: 4px; }
.diag .card { margin-top: 12px; }
.diag-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.diag-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary-bg), var(--accent)); }
.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 500; }
.faq p { margin: 4px 0 14px; color: var(--muted); }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px max(16px, calc((100% - var(--wrap)) / 2)) 36px; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; padding: 0; margin: 0 0 10px; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; color: var(--ink); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.site-footer p { margin: 4px 0; max-width: 60em; }

/* ======================================================================
   Главная
   ====================================================================== */
body[data-page="index"] main { max-width: none; padding: 0 0 64px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom)); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: center; gap: 32px;
  max-width: var(--wrap); margin: 0 auto; padding: clamp(32px, 6vw, 72px) 16px clamp(24px, 4vw, 48px); min-height: min(78vh, 720px); }
.hero h1 { font-size: clamp(2.3rem, 4.7vw, 4rem); line-height: 1.04; margin: 0 0 20px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); margin: 0 0 28px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.hero-chart { position: relative; aspect-ratio: 1; width: 100%; max-width: 640px; justify-self: end; }
.hero-chart canvas { display: block; width: 100%; height: 100%; }
.hero-sky { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; display: none; }
.hero-hills { position: absolute; inset-inline: 0; bottom: -1px; z-index: 0; width: 100%; height: clamp(70px, 12vw, 150px); display: none; }
.hero-hills .hl-far { fill: #0d1528; }
.hero-hills .hl-near { fill: #05070d; }
.hero-hills .hl-dome { fill: #05070d; }
.hero-hills .hl-light { fill: var(--accent); }
.hero-readout { position: relative; z-index: 1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; max-width: var(--wrap); margin: 0 auto;
  padding: 0 16px 18px; font: 11.5px/1.5 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
:root[data-theme="dark"] .hero-sky, :root[data-theme="dark"] .hero-hills { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-sky, :root:not([data-theme="light"]) .hero-hills { display: block; } }

.facts-strip { border-bottom: 1px solid var(--line); background: var(--bg-2); }
.facts-strip ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 auto; padding: 0 16px; max-width: var(--wrap); list-style: none; }
.facts-strip li { padding: 16px 18px; border-inline-start: 1px solid var(--line); }
.facts-strip li:first-child { border-inline-start: 0; padding-inline-start: 0; }
.facts-strip b { display: block; font: 600 1.15rem/1.3 var(--font-sans); color: var(--ink); }
.facts-strip span { font-size: 13px; color: var(--muted); }

.section { padding-top: clamp(48px, 7vw, 88px); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px 48px; align-items: end; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
.section-head p { margin: 0; color: var(--muted); max-width: 36em; }

/* листы атласа: продукты */
.sheets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 0; margin: 0; list-style: none;
  border-top: 1px solid var(--line-strong); border-inline-start: 1px solid var(--line); }
.sheet { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 20px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background-color var(--dur) var(--ease); }
.sheet:hover { background: var(--surface); }
.sheet-no { font: 600 11px var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.sheet h3 { margin: 0; font: 700 18px/1.25 var(--font-head); letter-spacing: .05em; text-transform: uppercase; }
.sheet h3 a { color: var(--ink); text-decoration: none; }
.sheet h3 a::after { content: ''; position: absolute; inset: 0; }
.sheet p { margin: 0; color: var(--muted); font-size: 14.5px; }
.sheet .status { align-self: flex-start; }
.sheet .counts { margin-top: auto; padding-top: 6px; font-size: 12.5px; font-family: var(--font-mono); }

/* наставники */
.mentors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.mentor { position: relative; display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 8px 24px; align-items: end; overflow: hidden;
  padding: 24px 24px 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--glass); box-shadow: var(--shadow); }
.mentor-nova { --m: var(--nova); --m-soft: var(--nova-soft); }
.mentor-aster { --m: var(--aster); --m-soft: var(--aster-soft); }
.mentor::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--m); }
.mentor-art { align-self: end; width: 100%; max-width: 200px; }
.mentor-body { align-self: center; padding-bottom: 24px; }
.mentor-name { margin: 0; font-size: 2rem; color: var(--ink); }
.mentor-role { margin: 2px 0 12px; font: 600 11px/1.4 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--m); }
.mentor-body p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.mentor-quote { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--r-m); background: var(--m-soft); color: var(--ink); font: italic 400 15px/1.5 var(--font-serif); }
.mentor-tag { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.mentors-note { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); max-width: 60em; }

/* персонажи (SVG) */
.char { position: relative; display: block; width: 100%; aspect-ratio: 1; }
.char img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .35s ease; }
.char .char-smile { opacity: 0; }
.mentor:hover .char-smile, .mentor:focus-within .char-smile { opacity: 1; }
.mentor:hover .char-idle, .mentor:focus-within .char-idle { opacity: 0; }

/* исследования: спектр дозированно */
.spectrum { height: 10px; border-radius: 2px; margin: 0 0 28px;
  background:
    linear-gradient(90deg, transparent 3.3%, rgba(0,0,0,.85) 3.3% 3.8%, transparent 3.8% 4.4%, rgba(0,0,0,.85) 4.4% 4.9%, transparent 4.9% 13.6%, rgba(0,0,0,.7) 13.6% 14%,
      transparent 14% 28.4%, rgba(0,0,0,.85) 28.4% 28.9%, transparent 28.9% 36.8%, rgba(0,0,0,.6) 36.8% 37.2%, transparent 37.2% 56.3%, rgba(0,0,0,.9) 56.3% 56.9%,
      transparent 56.9% 74.4%, rgba(0,0,0,.9) 74.4% 75%, transparent 75% 82.8%, rgba(0,0,0,.6) 82.8% 83.2%, transparent 83.2%),
    linear-gradient(90deg, #5a1a8a 0%, #6a2be0 8%, #2d5cff 22%, #00b4ff 30%, #00d39a 38%, #57d82e 46%, #e7e324 54%, #ffb21c 61%, #ff5a1c 70%, #e5141a 82%, #7a0a0e 100%); }
.spectrum-scale { position: relative; height: 16px; margin: -22px 0 26px; font: 11px/16px var(--font-mono); color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
/* подписи стоят на своих длинах волн: шкала 380–750 нм, позиция = (λ − 380) / 370 */
.spectrum-scale span { position: absolute; top: 0; transform: translateX(-50%); }
.spectrum-scale .sp-0 { left: 0; transform: none; }
.spectrum-scale .sp-1 { left: 28.68%; }
.spectrum-scale .sp-2 { left: 56.57%; }
.spectrum-scale .sp-3 { left: 74.68%; }
.spectrum-scale .sp-4 { right: 0; left: auto; transform: none; }
.research-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.research-grid .card { display: flex; flex-direction: column; gap: 8px; }
.research-grid .card h3 { margin: 0; }
.research-grid .status, .card .status { align-self: flex-start; }
.research-grid .card .readout { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }

/* Academy: орбиты и прогресс */
.academy-band { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line); border-radius: var(--r-l); background: var(--glass); box-shadow: var(--shadow); }
.academy-band h2 { margin-top: 0; }
.academy-steps { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 10px; }
.academy-steps li { display: flex; gap: 12px; align-items: baseline; }
.academy-steps li::before { content: ''; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--accent); transform: translateY(1px); }
.orbits { width: 100%; max-width: 360px; justify-self: center; }
.orbits .o-ring { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.orbits .o-ring-done { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 5; }
.orbits .o-core { fill: var(--nova); }
.orbits .o-sat { fill: var(--aster); }
.orbits .o-node { fill: var(--bg); stroke: var(--ink); stroke-width: 1.4; }
.orbits .o-node-done { fill: var(--accent); stroke: var(--accent); }
.orbits .o-label { font: 11px var(--font-mono); fill: var(--muted); letter-spacing: .06em; }
.orbits .o-spin { transform-origin: 180px 180px; animation: spin 80s linear infinite; }
.orbits .o-spin-2 { transform-origin: 180px 180px; animation: spin 140s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* заметки на полях */
.margin-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.margin-notes section { border-top: 1px solid var(--line-strong); padding-top: 6px; }
.margin-notes h2 { font-size: 1.35rem; margin: 14px 0 8px; }
.margin-notes p { color: var(--muted); }

/* ======================================================================
   Nova и Aster
   ====================================================================== */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 24px 0 8px; }
.duo .mentor { grid-template-columns: minmax(110px, 170px) minmax(0, 1fr); }
.duo .mentor-name { font-size: 1.7rem; }
.nova-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.mentor-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 14px; color: var(--ink); background: transparent; text-decoration: none; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--m, var(--accent)); }

/* ======================================================================
   Внутренние страницы
   ====================================================================== */
.page-head { position: relative; margin: 4px 0 28px; padding: 8px 0 24px; border-bottom: 1px solid var(--line); }
.page-head::after { content: ''; position: absolute; inset-inline-end: 0; top: -36px; width: 260px; height: 260px; pointer-events: none;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'><g fill='none' stroke='%236ea8ff' stroke-width='1'><circle cx='200' cy='200' r='190'/><circle cx='200' cy='200' r='186' stroke-width='.5'/><circle cx='200' cy='200' r='130'/><circle cx='200' cy='200' r='70'/><path d='M200 10v380M10 200h380M66 66l268 268M334 66L66 334'/></g><g fill='%236ea8ff'><circle cx='262' cy='118' r='3'/><circle cx='292' cy='152' r='2'/><circle cx='318' cy='136' r='2.5'/><circle cx='120' cy='260' r='2'/><circle cx='200' cy='200' r='3'/></g><path d='M262 118L292 152L318 136' fill='none' stroke='%236ea8ff' stroke-width='1'/></svg>") no-repeat center / contain; opacity: .18; }
.page-head h1 { margin-top: 0; max-width: 18em; }
.page-head .lead { margin-bottom: 0; }
.page-head > * { position: relative; z-index: 1; }
@media (max-width: 760px) { .page-head::after { width: 150px; height: 150px; top: -10px; opacity: .1; } }
main > section > h2:first-child, .prose h2 { padding-top: 4px; }
/* формы — карточка листа */
.form:not(.form-inline) { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); }
body[data-page="login"] main, body[data-page="register"] main, body[data-page="reset"] main, body[data-page="verify"] main { max-width: 760px; }
.exercise-form, .nova form[role="search"] { padding: 0; background: none; border: 0; box-shadow: none; }

/* ---------- анимации появления ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s var(--ease) both; }
  .rise-2 { animation-delay: .08s; }
  .rise-3 { animation-delay: .16s; }
  .rise-4 { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------- адаптивность ---------- */
@media (max-width: 1020px) {
  .sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mentors, .duo { grid-template-columns: minmax(0, 1fr); }
  .research-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-bottom: 0; }
  .hero-chart { justify-self: center; max-width: 520px; margin-top: 8px; }
  .section-head, .academy-band, .margin-notes { grid-template-columns: minmax(0, 1fr); }
  .facts-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-strip li:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .facts-strip li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 960px) {
  .site-header { gap: 6px 10px; padding-top: 6px; padding-bottom: 6px; }
  .header-tools { order: 2; margin-inline-start: auto; gap: 8px; }
  .nav-toggle { order: 3; flex: none; }
  .nav-toggle summary { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; }
  .nav-toggle:not([open]) nav { display: none; }
  .nav-toggle nav { position: absolute; inset-inline: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line-strong); box-shadow: var(--shadow); padding: 0 max(16px, calc((100% - var(--wrap)) / 2)); }
  .nav-toggle nav ul { flex-direction: column; gap: 0; padding: 4px 0 10px; }
  .nav-toggle nav a { min-height: 44px; font-size: 16px; }
}
@media (max-width: 760px) {
  .nova-layout { grid-template-columns: minmax(0, 1fr); }
  .nova-side { order: 2; border: 0; padding: 0; }
  main { padding-top: 18px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .mentor, .duo .mentor { grid-template-columns: 112px minmax(0, 1fr); padding: 18px 16px 0; gap: 4px 16px; }
  .mentor-body { padding-bottom: 18px; }
  .mentor-name, .duo .mentor-name { font-size: 1.5rem; }
  .mentor-quote { font-size: 14px; }
}
@media (max-width: 560px) {
  .sheets { grid-template-columns: minmax(0, 1fr); }
  .sheet p:not(.counts) { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .mentor, .duo .mentor { grid-template-columns: minmax(0, 1fr); }
  .mentor-art { max-width: 150px; order: 2; justify-self: center; }
  .mentor-body { padding-bottom: 0; }
  .hero-readout span:last-child { display: none; }
}
@media (max-width: 420px) {
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-toggle summary { width: 40px; padding: 0; justify-content: center; }
  .lang-switch summary > span:first-child { display: none; }
  .header-tools { gap: 6px; }
  .site-header { gap: 6px; }
  #nav-account { padding: 0 12px; }
  .lang-name { display: none; }
  .lang-code { display: inline; }
  .site-header { position: sticky; }
  .lang-switch { position: static; }
  .lang-switch ul { inset-inline: 8px; min-width: 0; }
  .brand { font-size: 1.15rem; }
  .facts-strip ul { grid-template-columns: minmax(0, 1fr); }
  .facts-strip li { border-inline-start: 0 !important; padding-inline-start: 0 !important; border-top: 1px solid var(--line); }
  .facts-strip li:first-child { border-top: 0; }
}
@media (max-width: 360px) {
  .lang-switch summary { padding: 0 6px; }
  .icon-btn { width: 38px; }
}
