@font-face {
  font-family: "Literata Fallback";
  src: local("Georgia");
  font-style: normal;
  size-adjust: 108.03%;
  ascent-override: 108.96%;
  descent-override: 28.51%;
  line-gap-override: 0.00%;
}

@font-face {
  font-family: "Literata Fallback";
  src: local("Georgia Italic"), local("Georgia-Italic");
  font-style: italic;
  size-adjust: 97.77%;
  ascent-override: 120.39%;
  descent-override: 31.50%;
  line-gap-override: 0.00%;
}

@font-face {
  font-family: "Literata Fallback Noto";
  src: local("Noto Serif"), local("NotoSerif-Regular");
  font-style: normal;
  size-adjust: 98.80%;
  ascent-override: 119.13%;
  descent-override: 31.17%;
  line-gap-override: 0.00%;
}

@font-face {
  font-family: "Literata Fallback Noto";
  src: local("Noto Serif Italic"), local("NotoSerif-Italic");
  font-style: italic;
  size-adjust: 94.14%;
  ascent-override: 125.02%;
  descent-override: 32.72%;
  line-gap-override: 0.00%;
}

/* Сгенерировано движком из design/tokens.json. Не править руками. */

@font-face {
  font-family: "Literata";
  src: url("/fonts/Literata-Variable.3a2b39a2.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "Literata";
  src: url("/fonts/Literata-Italic-Variable.c7d02878.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: optional;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.65a56057.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "IBM Plex Serif";
  src: url("/fonts/IBMPlexSerif-Italic.1add2288.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: optional;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Light.ad5b49e0.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.57fb756d.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Medium.7f833c6a.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: optional;
}

:root {
  --surface: #fcfbf8;
  --surface-deep: #f3f0e9;
  --tile: #f4f1ea;
  --sky: #08112b;
  --sky-ink: #f4f1ea;
  --sky-ink-2: #a9b5cb;
  --ink: #1c2440;
  --ink-2: #4a5068;
  --muted: #6e685b;
  --line: #d3c8b5;
  --navy: #1e397f;
  --better: #0e7c70;
  --signal: #a32749;
  --focus: #1c2440;
  --focus-sky: #f4f1ea;
  --context: #9aa5bb;
  --navy-fill: #bcd1fd;
  --better-fill: #a4d8c5;
  --signal-fill: #fabecb;
  --model-ink: #5a5f6b;
  --chat-them: #e9e5dc;
  --chat-me: #d6e0f5;
  --seq-1: #dbdee6;
  --seq-2: #b5bdd1;
  --seq-3: #8d9abc;
  --seq-4: #6173a3;
  --seq-5: #1e397f;
  --seq-6: #0f2152;
  --div-1: #a32749;
  --div-2: #cb8698;
  --div-3: #e6c6cc;
  --div-4: #e4e1da;
  --div-5: #c0dbd6;
  --div-6: #79b5ad;
  --div-7: #0e7c70;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;
  --radius-0: 0;
  --radius-2: 2px;
  --radius-6: 6px;
  --layout-columns: 12;
  --layout-page: 1600px;
  --layout-gap: 24px;
  --layout-gutter-min: 16px;
  --layout-gutter-max: 64px;
  --layout-text: 660px;
  --layout-margin: 3;
  --layout-wide: 9;
  --layout-story-steps: 4;
  --layout-story-canvas: 7;
  --layout-header: 56px;
  --layout-toc: 200px;
  --layout-toc-gap: 48px;
  --layout-bp-toc: 1400px;
  --layout-bp-margin: 1100px;
  --layout-bp-phone: 860px;
  --layout-header-phone: 48px;
  --layout-header-edge: 14px;
  --layout-chapter-pad: 56px;
  --tile-pad: 20px;
  --tile-gap: 16px;
  --dur-quick: 160ms;
  --dur-base: 320ms;
  --dur-scene: 600ms;
  --dur-draw: 900ms;
  --dur-camera: 1200ms;
  --dur-reveal: 1100ms;
  --dur-split: 1100ms;
  --dur-hold: 2000ms;
  --stagger: 80ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --ease-move: cubic-bezier(.65, .05, .2, 1);
  --stroke-series: 1.75;
  --stroke-focus: 2.25;
  --stroke-context: 1.5;
  --stroke-highlight: 2.75;
  --point: 3.5;
  --point-focus: 4.5;
  --grid-alpha: 0.55;
  --type-sky-display-size: 214.7px;
  --type-sky-display-line: 0.96;
  --type-sky-display-weight: 200;
  --type-data-number-size: 107.4px;
  --type-data-number-line: 1;
  --type-data-number-weight: 200;
  --type-h1-size: 104px;
  --type-h1-line: 1.04;
  --type-h1-weight: 520;
  --type-h1-variation: "opsz" 24;
  --type-h1-mobile-size: 44px;
  --type-h1-mobile-line: 1.04;
  --type-h1-mobile-weight: 520;
  --type-h1-mobile-variation: "opsz" 24;
  --type-h2-size: 46px;
  --type-h2-line: 1.1;
  --type-h2-weight: 560;
  --type-h2-variation: "opsz" 24;
  --type-act-display-size: 64px;
  --type-act-display-line: 1.05;
  --type-act-display-weight: 300;
  --type-act-display-variation: "opsz" 24;
  --type-lead-size: 26.9px;
  --type-lead-line: 1.45;
  --type-lead-weight: 300;
  --type-h3-size: 26.9px;
  --type-h3-line: 1.25;
  --type-h3-weight: 560;
  --type-h3-variation: "opsz" 24;
  --type-h4-size: 19px;
  --type-h4-line: 1.5;
  --type-h4-weight: 640;
  --type-thought-size: 46px;
  --type-thought-line: 1.15;
  --type-thought-weight: 400;
  --type-thought-variation: "opsz" 24;
  --type-chat-size: 17px;
  --type-chat-line: 1.45;
  --type-chat-weight: 400;
  --type-body-size: 19px;
  --type-body-line: 1.65;
  --type-body-weight: 400;
  --type-model-note-size: 15px;
  --type-model-note-line: 1.5;
  --type-model-note-weight: 360;
  --type-figure-title-size: 21px;
  --type-figure-title-line: 1.3;
  --type-figure-title-weight: 600;
  --type-caption-size: 13.4px;
  --type-caption-line: 1.5;
  --type-caption-weight: 400;
  --type-label-size: 13.4px;
  --type-label-line: 1.3;
  --type-label-weight: 640;
  --type-code-size: 14px;
  --type-code-line: 1.6;
  --type-code-weight: 400;
  --type-mark-visualize-size: 48px;
  --type-mark-visualize-line: 1;
  --type-mark-visualize-weight: 400;
  --type-card-number-size: 44px;
  --type-card-number-line: 1;
  --type-card-number-weight: 300;
  --type-data-unit-size: 15px;
  --type-data-unit-line: 1.3;
  --type-data-unit-weight: 400;
  --type-data-delta-size: 14px;
  --type-data-delta-line: 1.3;
  --type-data-delta-weight: 500;
  --type-data-label-size: 13.5px;
  --type-data-label-line: 1.2;
  --type-data-label-weight: 500;
  --type-data-axis-size: 12px;
  --type-data-axis-line: 1.2;
  --type-data-axis-weight: 400;
  --type-data-table-size: 14px;
  --type-data-table-line: 1.4;
  --type-data-table-weight: 400;
  --font-data: "IBM Plex Sans", system-ui, sans-serif;
  --font-mark: "IBM Plex Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --font-serif: "Literata", "Literata Fallback", "Literata Fallback Noto", Georgia, serif;
}

:root[data-theme="night"] {
  color-scheme: dark;
  --surface: #0f1834;
  --surface-deep: #18223f;
  --tile: #152040;
  --sky: #08112b;
  --sky-ink: #f4f1ea;
  --sky-ink-2: #a9b5cb;
  --ink: #ece8df;
  --ink-2: #aeb8cc;
  --muted: #8f96a9;
  --line: #2a3658;
  --navy: #8fa7e6;
  --better: #4fc2ae;
  --signal: #f0738f;
  --focus: #ece8df;
  --focus-sky: #f4f1ea;
  --context: #5d6884;
  --navy-fill: #38466d;
  --better-fill: #234e5b;
  --signal-fill: #573551;
  --model-ink: #a3a8b3;
  --chat-them: #1c2747;
  --chat-me: #26386a;
  --seq-1: #222d4f;
  --seq-2: #38466d;
  --seq-3: #4f608d;
  --seq-4: #697cb1;
  --seq-5: #8fa7e6;
  --seq-6: #c9d6f6;
  --div-1: #f0738f;
  --div-2: #8b4a66;
  --div-3: #472f4b;
  --div-4: #2a3350;
  --div-5: #1f4252;
  --div-6: #327677;
  --div-7: #4fc2ae;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-quick: 0ms;
    --dur-base: 0ms;
    --dur-scene: 0ms;
    --dur-draw: 0ms;
    --dur-camera: 0ms;
    --dur-reveal: 0ms;
    --dur-split: 0ms;
    --dur-hold: 0ms;
    --stagger: 0ms;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --surface: #0f1834;
    --surface-deep: #18223f;
    --tile: #152040;
    --sky: #08112b;
    --sky-ink: #f4f1ea;
    --sky-ink-2: #a9b5cb;
    --ink: #ece8df;
    --ink-2: #aeb8cc;
    --muted: #8f96a9;
    --line: #2a3658;
    --navy: #8fa7e6;
    --better: #4fc2ae;
    --signal: #f0738f;
    --focus: #ece8df;
    --focus-sky: #f4f1ea;
    --context: #5d6884;
    --navy-fill: #38466d;
    --better-fill: #234e5b;
    --signal-fill: #573551;
    --model-ink: #a3a8b3;
    --chat-them: #1c2747;
    --chat-me: #26386a;
    --seq-1: #222d4f;
    --seq-2: #38466d;
    --seq-3: #4f608d;
    --seq-4: #697cb1;
    --seq-5: #8fa7e6;
    --seq-6: #c9d6f6;
    --div-1: #f0738f;
    --div-2: #8b4a66;
    --div-3: #472f4b;
    --div-4: #2a3350;
    --div-5: #1f4252;
    --div-6: #327677;
    --div-7: #4fc2ae;
  }
}

.type-sky-display {
  font-family: var(--font-serif);
  font-size: 214.7px;
  line-height: 0.96;
  font-weight: 200;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-data-number {
  font-family: var(--font-serif);
  font-size: 107.4px;
  line-height: 1;
  font-weight: 200;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-h1 {
  font-family: var(--font-serif);
  font-size: 104px;
  line-height: 1.04;
  font-weight: 520;
  font-style: normal;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 24;
}

.type-h1-mobile {
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: 1.04;
  font-weight: 520;
  font-style: normal;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 24;
}

.type-h2 {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1.1;
  font-weight: 560;
  font-style: normal;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 24;
}

.type-act-display {
  font-family: var(--font-serif);
  font-size: 64px;
  line-height: 1.05;
  font-weight: 300;
  font-style: normal;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 24;
}

.type-lead {
  font-family: var(--font-serif);
  font-size: 26.9px;
  line-height: 1.45;
  font-weight: 300;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-h3 {
  font-family: var(--font-serif);
  font-size: 26.9px;
  line-height: 1.25;
  font-weight: 560;
  font-style: normal;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 24;
}

.type-h4 {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.5;
  font-weight: 640;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-thought {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1.15;
  font-weight: 400;
  font-style: italic;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 24;
}

.type-chat {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.45;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-body {
  font-family: var(--font-serif);
  font-size: 19px;
  line-height: 1.65;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-model-note {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 360;
  font-style: italic;
  font-optical-sizing: auto;
}

.type-figure-title {
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 600;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-caption {
  font-family: var(--font-serif);
  font-size: 13.4px;
  line-height: 1.5;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-label {
  font-family: var(--font-serif);
  font-size: 13.4px;
  line-height: 1.3;
  font-weight: 640;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-code {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-mark-visualize {
  font-family: var(--font-mark);
  font-size: 48px;
  line-height: 1;
  font-weight: 400;
  font-style: italic;
  font-optical-sizing: auto;
}

.type-card-number {
  font-family: var(--font-data);
  font-size: 44px;
  line-height: 1;
  font-weight: 300;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-data-unit {
  font-family: var(--font-data);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-data-delta {
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-data-label {
  font-family: var(--font-data);
  font-size: 13.5px;
  line-height: 1.2;
  font-weight: 500;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-data-axis {
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}

.type-data-table {
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  font-style: normal;
  font-optical-sizing: auto;
}

/* Стили страниц движка по сетке «Дизайна» (согласована автором 15.11, образец — lab/grid/src/tpl.html).
   Цвета, шрифты, отступы и размеры сетки — только переменные из design/tokens.json.
   Переломы (@media) переменными не задать — значения повторяют layout-bp-* из токенов,
   и сборка проверяет, что они совпадают. */

:root {
  --gutter: clamp(var(--layout-gutter-min), 4vw, var(--layout-gutter-max));
  /* Колонки: текст 1–6, правое поле (мысль модели) 8–10, картинки 1–9, история 1–4 и 6–12. */
  /* Ширина текста монотонна: число колонок подобрано под ~660 по диапазонам ширины окна
     (ревью 03), правое поле — сразу за текстом. */
  --col-text: 1 / 7;
  --col-margin: 7 / 10;
  --col-wide: 1 / 10;
  --col-steps: 1 / 5;
  --col-canvas: 6 / -1;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--layout-header) + var(--space-3)); }
body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-serif);
       font-optical-sizing: auto; letter-spacing: 0; }
/* Крупные заголовки — текстовым рисунком Литераты (opsz 24 в токенах): на дисплейном оптическом
   размере волосяные штрихи слишком тонкие против основных (решение «Дизайна»). */
.hero h1 { font-variation-settings: var(--type-h1-variation, normal); }
.prose > h2, .index h1 { font-variation-settings: var(--type-h2-variation, normal); }
h1, h2, h3, h4 { font-feature-settings: "case" 1; text-wrap: balance; }
/* Крупный кегль на телефоне: длинное слово («информационно-аналитических») шире экрана.
   Переносим по слогам, где у браузера есть словарь, иначе — где придётся, но не вбок. */
/* Переносы (решение «Дизайна», ревью 01): заголовки — никогда по слогам; длинное слово всё же
   переносится где придётся, но не выталкивает страницу вбок. Текст — по слогам только на
   телефоне, где строка ~35 знаков. */
h1, h2, h3, h4 { hyphens: manual; overflow-wrap: break-word; }
:where(p, li, blockquote, figcaption, dd) { text-wrap: pretty; }
@media (max-width: 600px) { :where(p, li, dd):lang(ru) { hyphens: auto; hyphenate-limit-chars: 7 3 3; } }

/* Ссылка в тексте (решение автора 15.11): цвета туши, тонкое подчёркивание navy;
   наведение и фокус — подчёркивание цвета текста. Посещённая не отличается. */
a { color: inherit; }
:where(p, li, blockquote, figcaption, td, dd) > a:not([class]) {
  text-decoration: underline; text-decoration-color: var(--navy); text-decoration-thickness: 1px;
  text-underline-offset: .2em; text-decoration-skip-ink: auto; }
:where(p, li, blockquote, figcaption, td, dd) > a:not([class]):is(:hover, :focus-visible) { text-decoration-color: currentColor; }
:where(.sky, .bleed, #skyfull) :where(p, li) > a:not([class]) { text-decoration-color: var(--sky-ink-2); }

/* Фокус: цвет текста на бумаге, светлый на небе. Кармин — только «хуже» в данных. */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:where(.sky, .bleed, #skyfull) :focus-visible { outline-color: var(--focus-sky); }

/* Жирный в тексте — 600: не тяжелее заголовков. Выделение — в палитре. */
:where(p, li, blockquote, td, dd, figcaption) :where(b, strong) { font-weight: 600; }
::selection { background: var(--navy-fill); color: var(--ink); }
:where(.sky, .bleed, #skyfull) ::selection { background: var(--sky-ink-2); color: var(--sky); }

/* Состояния: отклик dur-quick, наведение = фокус, нажатие — приглушение без сдвига. */
:where(a, button, [role="button"], summary, input, select) {
  transition-property: color, background-color, border-color, opacity, text-decoration-color, box-shadow;
  transition-duration: var(--dur-quick); transition-timing-function: var(--ease-out); }
:where(button, [role="button"], summary):active { opacity: .72; transition-duration: 0ms; }
:where(button, input, select, textarea):disabled { opacity: .45; cursor: not-allowed; }
img { max-width: 100%; height: auto; display: block; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--space-2); top: var(--space-2); z-index: 30; background: var(--surface); padding: var(--space-1); }

/* ---------- сетка: 12 колонок во всю ширину окна, всё от левого края сетки ---------- */
.g { display: grid; grid-template-columns: repeat(var(--layout-columns), minmax(0, 1fr)); column-gap: var(--layout-gap);
     max-width: calc(var(--layout-page) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.g > * { grid-column: 1 / -1; min-width: 0; }

/* ---------- шапка-небо: прилипает на всём сайте; справа от знака — «где вы» ---------- */
.sky { position: sticky; top: 0; z-index: 20; background: var(--sky); color: var(--sky-ink); }
.sky-bar { display: flex; align-items: center; gap: var(--space-3); height: var(--layout-header); }
.home { color: inherit; text-decoration: none; flex: none; font-size: 20px; }
.where { display: inline-flex; align-items: baseline; min-width: 0; padding: 0; border: 0; background: none; font: inherit;
         font-size: 14px; color: var(--sky-ink); white-space: nowrap; cursor: pointer; text-align: left; opacity: .8; }
.where .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.where::after { flex: none; }
.where:hover { opacity: 1; }
/* chevron-down из набора «Дизайна» после слова: 12 px, цвет текста, отступ 4; раскрыто — поворот. */
.where::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 4px; vertical-align: -1px;
  background: currentColor; -webkit-mask: var(--ic-chevron) center / contain no-repeat; mask: var(--ic-chevron) center / contain no-repeat;
  transition: rotate var(--dur-quick) var(--ease-out); }
.where[aria-expanded="true"]::after { rotate: 180deg; }
:root { --ic-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter' d='M5 7.5L10 12.5L15 7.5'/%3E%3C/svg%3E"); }
.where b { font-weight: 600; }
/* Кнопка темы: в шапке — на компьютере (на телефоне она в раскрытом небе). */
.theme { font: inherit; font-size: 14px; color: var(--sky-ink); background: none; border: 0; padding: 0;
         cursor: pointer; opacity: .75; }
.theme:hover { opacity: 1; }
.sky-nav { margin-left: auto; display: flex; align-items: baseline; gap: 20px; flex: none; }
/* На телефоне кнопки темы нет — тема как в системе (решение автора: «ночь день я просил
   убрать на мобиле»). До 860 — мельче, чтобы поместилась рядом с «где вы». */
@media (max-width: 860px) { .sky-nav { gap: 12px; } .sky-nav .theme { font-size: 13px; } }
@media (max-width: 600px) { .sky-nav .theme { display: none; } }
/* «Атлас» раскрывает небо; открытая — подчёркнута. */
.atlas { font: inherit; font-size: 14px; color: var(--sky-ink); background: none; border: 0; padding: 0; cursor: pointer; opacity: .75; }
.atlas:is(:hover, :focus-visible), .atlas[aria-expanded="true"] { opacity: 1; }
.atlas[aria-expanded="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }

/* ---------- материал: одно небо за бумагой (основа «Материал», sky.js) ----------
   Небо — закреплённое полотно за всей страницей. Бумага (main, подвал) непрозрачна,
   ночью — на 86 %: сквозь неё тихо светит то же небо. Шапка — копия верхней полосы
   того же неба (canvas.strip), её край уходит в страницу короткой кривой, под краем —
   прогрессивное размытие 1/2/4/8 px. Без скрипта шапка — ровное небо цветом. */
/* Небо: тёмный фон есть и без холста — раскрытие тогда работает без звёзд. Холсты выше окна
   (запас до высоты экрана, чтобы на телефоне не растягивались) — размер в px ставит sky.js. */
#sky { position: fixed; inset: 0; z-index: 0; display: none; background: var(--sky); overflow: hidden; }
:is(.sky-on, .sky-open, .sky-closing) #sky { display: block; }
#sky canvas { position: absolute; top: 0; left: 0; display: block; }
html { scrollbar-gutter: stable; }
/* Бумага — блоками (заголовок статьи, куски текста, главная, подвал); главы между ними — окна в небо.
   Блок сетки ограничен шириной — бумагу дотягиваем до краёв окна тенью, а clip-path не пускает
   её вверх и вниз, на соседние окна. */
.sky-on :is(.hero, .prose, .article-end, .index) { --paper: var(--surface); position: relative; z-index: 1;
  background-color: var(--paper); background-image: var(--grain-paper, none); background-size: 256px 256px;
  box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]).sky-on :is(.hero, .prose, .article-end, .index) { --paper: color-mix(in srgb, var(--surface) 86%, transparent); }
}
:root[data-theme="night"].sky-on :is(.hero, .prose, .article-end, .index) { --paper: color-mix(in srgb, var(--surface) 86%, transparent); }

/* Глава «Шаг N из M» — окно в небо: пометка, заголовок крупно и светло, вводный абзац.
   Без скрипта — ровное небо цветом. */
.bleed { position: relative; z-index: 1; background: var(--sky); color: var(--sky-ink);
         padding: var(--layout-chapter-pad) 0; }
.sky-on .bleed { background: transparent; }
.bleed .g > * { grid-column: 1 / -1; }
.bleed .kicker { margin: 0 0 var(--space-2); font-size: var(--type-caption-size); font-weight: 600; color: var(--sky-ink-2); }
.bleed h2 { margin: 0 0 var(--space-3); max-width: 22ch; color: var(--sky-ink);
            font-size: clamp(36px, 3.6vw, var(--type-act-display-size, 64px)); line-height: var(--type-act-display-line, 1.05); font-weight: var(--type-act-display-weight, 300);
            font-variation-settings: var(--type-act-display-variation, "opsz" 24); }
.bleed h2 { margin-bottom: 0; }
/* Первый абзац главы — под окном, на бумаге, обычным текстом. Вводный вид (крупнее и тоньше)
   автор отверг 15.11: в архиве это продолжение мысли, и смена шрифта читалась как поломка. */
.prose > .after-ch > p { margin: 0; }
.bleed a { color: var(--sky-ink); }
.bleed .anchor { color: var(--sky-ink-2); }
/* После окна бумага начинается с воздуха, а не вплотную к краю. */
.bleed + .prose { padding-top: var(--space-6); }
@media (max-width: 600px) { .bleed + .prose { padding-top: var(--space-4); } }
.toc-rail { transition: opacity var(--dur-base) var(--ease-out), visibility 0s; }
.toc-rail.off { opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-in), visibility 0s var(--dur-base); }

.sky { --edge: var(--layout-header-edge); }
/* До неба скрипта (и в браузерах без blocking="render") шапка — те же три облака света, что
   sky.js кладёт на ночь (paintBase), в координатах экрана: когда скрипт дорисует зерно
   и звёзды, свет не прыгает. Порядок слоёв обратный холсту: верхний — первым. */
header.sky {
  background-image:
    radial-gradient(circle max(34vw, 34vh) at 60% 55%, rgb(143 167 230 / .14), rgb(143 167 230 / 0)),
    radial-gradient(circle max(55vw, 55vh) at 15% 92%, rgb(58 52 130 / .55), rgb(58 52 130 / 0)),
    radial-gradient(circle max(62vw, 62vh) at 78% 20%, rgb(30 57 127 / .85), rgb(30 57 127 / 0));
  background-attachment: fixed;
}
.sky-on header.sky { background: transparent; }
/* Полоса видна всегда (без скрипта она пустая поверх тёмной шапки): иначе скрипт мерит её
   до включения неба и получает нулевой размер. */
.sky .strip { display: block; position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none;
  width: 100%; height: calc(var(--layout-header) + var(--edge));
  /* Край — плавная кривая из 12 точек: без ступенек и излома, излом глаз видит как границу. */
  --m: linear-gradient(#000 calc(100% - var(--edge)), rgba(0,0,0,.94) calc(100% - var(--edge) * .88),
       rgba(0,0,0,.84) calc(100% - var(--edge) * .76), rgba(0,0,0,.71) calc(100% - var(--edge) * .64),
       rgba(0,0,0,.56) calc(100% - var(--edge) * .52), rgba(0,0,0,.41) calc(100% - var(--edge) * .4),
       rgba(0,0,0,.28) calc(100% - var(--edge) * .3), rgba(0,0,0,.17) calc(100% - var(--edge) * .2),
       rgba(0,0,0,.08) calc(100% - var(--edge) * .1), transparent);
  -webkit-mask-image: var(--m); mask-image: var(--m); }
.pblur { display: none; }
.sky-on .pblur { display: block; position: absolute; left: 0; right: 0; top: calc(var(--layout-header) - 4px);
                   height: 36px; pointer-events: none; z-index: -2; }
.pblur i { position: absolute; inset: 0; -webkit-mask-image: var(--k); mask-image: var(--k); }
.pblur i:nth-child(1) { -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); --k: linear-gradient(#000 0%, #000 30%, transparent 55%); }
.pblur i:nth-child(2) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); --k: linear-gradient(#000 0%, #000 20%, transparent 45%); }
.pblur i:nth-child(3) { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); --k: linear-gradient(#000 0%, #000 12%, transparent 32%); }
.pblur i:nth-child(4) { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); --k: linear-gradient(#000 0%, transparent 20%); }
.sky-open .pblur { opacity: 0; }

/* Раскрытие по знаку: то же полотно поднимается над бумагой и открывается кругом из точки клика. */
.sky-open #sky, .sky-closing #sky { z-index: 15; clip-path: circle(var(--r, 0px) at var(--mx, 80px) var(--my, 28px)); }
.sky-open #sky { --r: 150vmax; }
#sky { transition: clip-path var(--dur-reveal) var(--ease-move); }
#skyfull { position: fixed; inset: 0; z-index: 16; pointer-events: none; visibility: hidden; transition: visibility 0s var(--dur-reveal); }
.sky-open #skyfull { visibility: visible; pointer-events: auto; transition: none; }
#skyfull .fade { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-scene) var(--ease-out), transform var(--dur-scene) var(--ease-out); }
.sky-open #skyfull .fade { opacity: 1; transform: none; transition-delay: var(--dur-scene); }
#skyfull a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
#skyfull .route-cap { position: absolute; margin: 0; font-size: var(--type-caption-size); color: var(--sky-ink-2); }
#skyfull .star { position: absolute; transform: translate(14px, -50%); font-size: 14px; line-height: 1.3;
                 color: var(--sky-ink-2); text-decoration: none; white-space: nowrap; }
#skyfull .star.left { transform: translate(calc(-100% - 14px), -50%); }
#skyfull .star.sub { font-size: 12.5px; }
#skyfull .star.sub .t { opacity: 0; transition: opacity var(--dur-quick) var(--ease-out); }
#skyfull .star.sub:is(:hover, :focus-visible, .show) .t { opacity: .85; }
#skyfull .star.cur { color: var(--sky-ink); font-weight: 600; }
#skyfull .star .n { font-variant-numeric: tabular-nums; margin-right: 6px; opacity: .7; }
@media (max-width: 860px) { #skyfull .star .t { display: none; } }

/* Другие статьи на раскрытом небе — созвездия (звёзд = глав), тише маршрута. */
#skyfull .others { list-style: none; margin: 0; padding: 0; }
#skyfull .others li { position: absolute; }
#skyfull .others .slot-1 { left: 5%; top: 17%; }
#skyfull .others .slot-2 { left: 25%; top: 12%; }
#skyfull .others .slot-3 { left: 6%; top: 43%; }
#skyfull .others .slot-4 { left: 29%; top: 37%; }
#skyfull .others .slot-5 { left: 5%; top: 70%; }
#skyfull .others .slot-6 { left: 27%; top: 66%; }
#skyfull .others .slot-7 { left: 56%; top: 80%; }
#skyfull .others a { display: grid; gap: 6px; color: var(--sky-ink-2); text-decoration: none; font-size: 14px;
                     line-height: 1.3; max-width: 220px; }
#skyfull .others svg { width: 150px; height: auto; overflow: visible; }
#skyfull .others path { fill: none; stroke: var(--sky-ink-2); stroke-width: 1; opacity: .7; }
#skyfull .others circle { fill: var(--sky-ink-2); }
#skyfull .others a:is(:hover, :focus-visible) { color: var(--sky-ink); }
#skyfull .others a:is(:hover, :focus-visible) path { stroke: var(--sky-ink); opacity: 1; }
#skyfull .others a:is(:hover, :focus-visible) circle { fill: var(--sky-ink); }
#skyfull .sky-theme { position: absolute; right: var(--gutter); top: calc(var(--layout-header) + var(--space-2)); }
@media (min-width: 861px) { #skyfull .sky-theme { display: none; } }
@media (max-width: 860px) {
  #skyfull .others { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 24px; display: grid; gap: 4px;
                     max-height: 38vh; overflow: auto; overscroll-behavior: contain; }
  #skyfull .others li { position: static; }
  #skyfull .others a { grid-template-columns: 56px 1fr; align-items: center; max-width: none; font-size: 15px; padding: 6px 0; }
  #skyfull .others svg { width: 56px; }
}

/* ---------- первый экран статьи ---------- */
.hero { padding-top: var(--space-12); }
.meta { margin: 0 0 var(--space-3); color: var(--muted); }
.hero h1 { grid-column: 1 / -1; max-width: 22ch; margin: 0 0 var(--space-6);
           font-size: clamp(var(--type-h1-mobile-size), 5.6vw, var(--type-h1-size));
           line-height: var(--type-h1-line); font-weight: var(--type-h1-weight); letter-spacing: -.005em; }

.hero h1.long { font-size: clamp(32px, 4.2vw, 76px); max-width: 28ch; }

/* ---------- текст статьи ---------- */
.prose { padding-bottom: var(--space-12); overflow-wrap: break-word; }
/* Длинный адрес или слово без пробелов переносится, только когда иначе не влезает в строку:
   на телефоне такой адрес выталкивал страницу вбок. */
.prose > * { grid-column: var(--col-text); max-width: var(--layout-text); margin: 0 0 var(--space-3); }
.prose > h2 { grid-column: var(--col-wide); max-width: none; margin: var(--space-10) 0 var(--space-3);
              font-size: clamp(30px, 3.2vw, var(--type-h2-size)); line-height: 1.1; font-weight: var(--type-h2-weight); }
.prose > h3 { margin: 40px 0 var(--space-2); font-size: var(--type-h3-size); line-height: var(--type-h3-line);
              font-weight: var(--type-h3-weight); }
/* H4 — кегль текста, полужирный. Капитель 13,4 px автор отверг 15.11: мельче текста,
   читается служебной пометкой, а не заголовком. */
.prose > h4 { margin: 40px 0 var(--space-1); font-size: var(--type-body-size); font-weight: 640; }
.prose ul, .prose ol { padding-left: var(--space-3); }
.prose li + li { margin-top: var(--space-1); }
/* Цитата (Quote, «Дизайн»): прямым, кеглем вводного, цветом текста; открывающая кавычка висит. */
.prose > blockquote { margin-left: 0; padding: 0; color: var(--ink); font-size: clamp(23px, 1.9vw, 26.9px); line-height: 1.45; font-weight: 400; }
.prose > blockquote > p { margin: 0 0 var(--space-2); }
.prose > blockquote cite { display: block; margin-top: var(--space-1); font-size: var(--type-caption-size); font-style: normal; color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: 0.85em; }
.prose > pre { grid-column: var(--col-wide); max-width: none; font-family: var(--font-mono); font-size: var(--type-code-size);
               background: var(--surface-deep); padding: var(--space-2); overflow-x: auto; border-radius: var(--radius-2); }
/* Таблица прокручивается в своей обёртке, а не тянет страницу вбок. */
.prose > .table-wrap { grid-column: var(--col-wide); max-width: none; overflow-x: auto; }
.prose table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: var(--space-1); text-align: left; vertical-align: top; }
.prose > hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-6) 0; }
.prose .anchor { display: none; }
.prose > .footnotes { grid-column: var(--col-text); color: var(--ink-2); font-size: 0.85em; border-top: 1px solid var(--line);
                      padding-top: var(--space-3); margin-top: var(--space-6); }

/* Картинки и ролики — шире текста (1–9), растр не шире 1040; вокруг рисунка 48. */
.prose > :is(figure.image, p:has(> a.zoom), p:has(> .anim-box), p:has(> video)) {
  grid-column: var(--col-wide); max-width: none; margin: var(--space-3) 0 var(--space-6); }
/* Поля в сетке не схлопываются: 24 от абзаца выше + 24 = 48 над рисунком. */
.prose :is(figure.image, p) :is(img, video) { max-width: min(100%, 1040px); }
.prose figure.image > * { margin: 0; }
.prose figcaption { max-width: 520px; margin-top: var(--space-1); font-size: var(--type-caption-size);
                    line-height: var(--type-caption-line); color: var(--ink-2); }

/* Мысль модели: карандаш — курсив графитом на правом поле (решение «Дизайна»). */
.prose > .model { grid-column: var(--col-margin); max-width: 320px; font-style: italic; font-weight: 360;
                  font-size: var(--type-model-note-size); line-height: var(--type-model-note-line); color: var(--model-ink); }

/* История: шаги слева (1–4), один график справа (6–12) прилипает и меняется по шагам. */
.prose > .scrolly { grid-column: 1 / -1; max-width: none; display: grid; grid-template-columns: subgrid; margin: var(--space-6) 0; }
.scrolly > .step { grid-column: var(--col-steps); min-height: 76svh; }
.scrolly > .step:last-of-type { min-height: 0; padding-bottom: 36svh; }
.stage { grid-column: var(--col-canvas); grid-row: 1 / span 100; position: sticky; top: calc(var(--layout-header) + 6svh);
         max-height: calc(100svh - var(--layout-header) - 120px);
         align-self: start; min-height: 60svh; }
/* Под графиком истории подложки нет (эталон «Дизайна»). */
.control { font: inherit; color: var(--navy); background: none; border: 1px solid var(--line);
           border-radius: var(--radius-2); padding: 0 var(--space-1); cursor: pointer; }

/* ---------- оглавление: карта чтения ----------
   От layout-bp-toc — колонка слева от сетки, прилипает (шапка + 96), знак в шапке на той же вертикали.
   Уже — строка «где вы» в шапке, по нажатию список в окне (site.js).
   У раздела номер и линия под названием, заполняется тушью по мере чтения (--p от 0 до 1, ставит скрипт). */
.toc-rail { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc-sections { display: grid; gap: 14px; counter-reset: section; font-size: var(--type-caption-size); line-height: 1.4; }
.toc-section { --p: 0; counter-increment: section; position: relative; padding-left: 28px; }
.toc-section::before { content: counter(section); position: absolute; left: 0; top: 0;
                       color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }
.toc-sections a { display: block; color: var(--muted); text-decoration: none; }
.toc-section > a { padding-bottom: 6px; background: linear-gradient(to right, var(--ink) calc(var(--p) * 100%), var(--line) 0)
                   left bottom / 100% 1px no-repeat; }
.toc-subsections { display: grid; gap: 6px; padding-top: 8px; }
.toc-sections a:hover { color: var(--ink); }
.toc-section.is-current > a, .toc-section.is-current::before { color: var(--ink); font-weight: 600; }
.toc-section:not(.is-current) .toc-subsections { display: none; }
.toc-subsections a { color: var(--ink-2); }

/* Уже 1400 px: оглавление — панель под шапкой по кнопке «где вы». */
@media (max-width: 1399px) {
  .toc-rail.open { display: block; position: fixed; z-index: 19; top: var(--layout-header); left: 0; right: 0; max-height: 72vh;
                   overflow: auto; background: var(--surface); padding: var(--space-3) var(--gutter) var(--space-4);
                   box-shadow: 0 1px 0 var(--line), 0 24px 48px rgba(8, 17, 43, .12); }
  .toc-rail.open .toc { max-width: 520px; }
  .toc-rail.open .toc-sections { font-size: 16px; }
}

@media (min-width: 1400px) {
  /* Место под оглавлением съедает колонку — текст берёт 7 колонок, чтобы остаться около 660. */
  .with-toc { --col-text: 1 / 8; --col-margin: 8 / 11; --col-steps: 1 / 6; --col-canvas: 7 / -1; }
  .with-toc .g { padding-left: calc(var(--gutter) + var(--layout-toc) + var(--layout-toc-gap));
                 max-width: calc(var(--layout-page) + 2 * var(--gutter) + var(--layout-toc) + var(--layout-toc-gap)); }
  .with-toc .sky .g { padding-left: var(--gutter); }
  /* Оглавление закреплено на одной вертикали со знаком (--toc-left ставит скрипт). */
  .toc-rail { display: block; position: fixed; z-index: 5; top: calc(var(--layout-header) + var(--space-12));
              left: var(--toc-left, var(--gutter)); width: var(--layout-toc);
              max-height: calc(100vh - var(--layout-header) - var(--space-12)); overflow-y: auto; }
  .where { display: none; }
}

@media (min-width: 1101px) and (max-width: 1147px) { :root { --col-text: 1 / 10; --col-margin: 10 / 13; } }
@media (min-width: 1148px) and (max-width: 1292px) { :root { --col-text: 1 / 9; --col-margin: 9 / 12; } }
@media (min-width: 1293px) and (max-width: 1460px) { :root { --col-text: 1 / 8; --col-margin: 8 / 11; } }
@media (min-width: 1400px) and (max-width: 1564px) { .with-toc { --col-text: 1 / 9; --col-margin: 9 / 12; } }

/* Средняя ширина: правое поле уходит под абзац, всё в одну колонку. */
@media (max-width: 1100px) {
  :root { --col-text: 1 / -1; --col-margin: 1 / -1; --col-wide: 1 / -1; --col-steps: 1 / 6; --col-canvas: 7 / -1; }
  .prose > .model { padding-left: var(--space-3); margin-top: calc(-1 * var(--space-1)); }
}
/* Телефон: график истории прилипает под шапкой, шаги проходят под ним. */
@media (max-width: 860px) {
  :root { --layout-gap: 16px; --layout-header: var(--layout-header-phone); }
  .sky { --edge: 10px; }
  .hero { padding-top: var(--space-6); }
  .hero h1 { margin-bottom: var(--space-4); }
  .prose > h2 { margin-top: var(--space-8); }
  .bleed { padding: 48px 0; }
  .prose > .scrolly { display: block; }
  .stage { position: sticky; top: var(--layout-header); z-index: 1; min-height: 0; max-height: calc(46svh - 48px); }
  .scrolly > .step { min-height: 52svh; }
  .home { font-size: 17px; }
}

/* Конец статьи: «Дальше» и «Все статьи» (ревью 06). */
.article-end { padding-bottom: var(--space-12); }
.article-end > * { grid-column: var(--col-text); margin: 0 0 var(--space-2); }
/* Конец статьи (ArticleEnd, «Дизайн»): линия цвета текста, метка «Дальше» капителью, следующая
   статья крупно со стрелкой; ниже — «Все статьи · На главную». */
.article-end .next { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
                     padding-top: var(--space-3); border-top: 1px solid var(--ink); color: inherit; text-decoration: none; }
.article-end .label { display: block; margin-bottom: var(--space-1); font-size: 13.4px; font-weight: 640;
                      text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.article-end .t { display: block; font-size: clamp(23px, 2vw, 27px); font-weight: var(--type-h3-weight); line-height: 1.25; }
.article-end .next .ic { width: 28px; height: 28px; }
.article-end .next:is(:hover, :focus-visible) .t { text-decoration: underline; text-decoration-color: var(--navy);
                                                  text-decoration-thickness: 1px; text-underline-offset: .15em; }
.article-end .more a { color: var(--ink-2); }

/* ---------- главная и 404 ---------- */
.index { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.index > * { grid-column: var(--col-text); max-width: var(--layout-text); }
.index h1 { margin: 0 0 var(--space-6); font-size: clamp(30px, 3.2vw, var(--type-h2-size)); font-weight: var(--type-h2-weight); }
.index-list { list-style: none; padding: 0; margin: 0; }
.index-list li { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.index-list a { color: var(--ink); text-decoration: none; }
.index-list a:hover { color: var(--navy); }
.index-list p { color: var(--muted); margin: var(--space-1) 0 0; }

/* Подвал — окно в небо (Footer, «Дизайн», лист lab/frame). */
.site-foot { padding: 96px 0 48px; }
.site-foot .foot-mark { justify-self: start; color: var(--sky-ink); text-decoration: none; font-size: 28px; }
.site-foot nav, .not-found nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: var(--space-4); font-size: 17px; }
.site-foot nav a, .not-found nav a { color: var(--sky-ink); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.site-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 48px; margin-top: 40px;
              font-size: 15px; line-height: 1.6; color: var(--sky-ink-2); }
.site-foot .cols p { margin: 0; }
.site-foot .col-h { margin: 0 0 8px; font-size: 13.4px; font-weight: 640; text-transform: uppercase; letter-spacing: .06em; color: var(--sky-ink); }
.site-foot .fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); margin: 64px 0 0;
              font-size: 12.5px; color: var(--sky-ink-2); }
.site-foot :focus-visible, .not-found :focus-visible { outline-color: var(--focus-sky); }

/* 404 — окно в то же небо: крупная цифра, фраза автора, ссылки дальше. */
.not-found { min-height: 72svh; display: grid; align-content: center; padding: 96px 0; }
.not-found .g { box-sizing: border-box; width: 100%; }
.not-found .big { margin: 0; max-width: none; font-size: clamp(96px, 14vw, 220px); line-height: .9; font-weight: 200;
             font-variant-numeric: lining-nums; color: var(--sky-ink); }
.not-found p { max-width: 600px; margin: var(--space-3) 0 0; font-size: clamp(21px, 1.9vw, 26.9px); line-height: 1.45; font-weight: 300; }

/* Архив: по годам, компактно. */
.archive > .g > * { grid-column: 1 / -1; }
.archive h1 { margin: 0 0 var(--space-3); }
.year { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-4); border-top: 1px solid var(--line); padding: 16px 0 24px; }
.year h2 { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.year ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.year a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; color: var(--ink); text-decoration: none; font-size: 17px; line-height: 1.45; }
.year a:is(:hover, :focus-visible) span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.year .d { padding-top: .15em; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .year { grid-template-columns: 1fr; gap: var(--space-1); } }
.more { margin: var(--space-3) 0 0; font-size: 15px; }

/* Разделы в шапке — словами, как «Ночь». На телефоне — с главной и из конца статьи. */
.nav-link { font-size: 14px; color: var(--sky-ink); text-decoration: none; opacity: .75; }
.nav-link:is(:hover, :focus-visible) { opacity: 1; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (max-width: 860px) { .nav-link { font-size: 13px; } }
@media (max-width: 600px) { .nav-link { display: none; } }

/* ---------- картинка на весь экран (site.js; без скрипта ссылка открывает оригинал) ---------- */
.prose a.zoom { display: block; cursor: zoom-in; }
.zoom-dialog { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: var(--space-3);
               border: 0; background: var(--surface); cursor: zoom-out; }
.zoom-dialog::backdrop { background: var(--surface); }
.zoom-dialog img, .zoom-dialog video { width: 100%; height: 100%; object-fit: contain; }
.zoom-dialog video { cursor: auto; }
.zoom-close { position: fixed; top: var(--space-2); right: var(--space-2); font: inherit; color: var(--ink);
              background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-2);
              padding: var(--space-1) var(--space-2); cursor: pointer; }

/* Бывшие GIF: ролик по кругу, кнопка паузы в центре (значки pause/play из набора «Дизайна»). */
.prose video.anim { height: auto; display: block; }
/* Обложка под роликом: пока кадры не пришли, видна она; ролик ложится сверху. */
.anim-stack { display: grid; }
.anim-stack > * { grid-area: 1 / 1; }
.prose a.zoom video.anim { cursor: zoom-in; }
.anim-box { position: relative; display: block; width: fit-content; max-width: 100%; }
.anim-toggle { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 56px; height: 56px;
               display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-2);
               background: var(--surface); color: var(--ink); cursor: pointer; opacity: 0; transition: opacity var(--dur-quick) var(--ease-out); }
.anim-toggle svg { width: 24px; height: 24px; }
.anim-box:hover .anim-toggle, .anim-toggle:focus-visible, .anim-box.paused .anim-toggle { opacity: .9; }
@media (hover: none) { .anim-toggle { opacity: .75; } }

/* Ночью растровые картинки и ролики чуть приглушены (решение «Дизайна» 14.11).
   SVG не трогаем — они на токенах. Рамок нет: рамка делает из картинки карточку. */
:root[data-theme="night"] :is(.prose, .zoom-dialog) :is(img:not([src$=".svg"]), video) { filter: brightness(.88); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) :is(.prose, .zoom-dialog) :is(img:not([src$=".svg"]), video) { filter: brightness(.88); }
}

/* Пиксель Метрики для читателей без скрипта: на странице не виден. */
.metrika-pixel { position: absolute; left: -9999px; }

/* Пониженное движение: переходы почти мгновенные — 1 мс, чтобы события конца перехода и
   подсказки (вспышка абзаца, «Скопировано») срабатывали. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important;
                           animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
/* Оглавление и «где вы» поверх раскрытого неба не нужны. */
.sky-open :is(.toc-rail, .where) { visibility: hidden; }

/* ---------- ссылка на любой кусок текста (site.js) ----------
   Значок у абзаца — в промежутке слева от текста, только при наведении мышью.
   Кнопка «Ссылка» — над выделенной фразой. Вид временный, до решения «Дизайна». */
.link-mark, .select-link { position: absolute; top: 0; left: 0; z-index: 15; opacity: 0; visibility: hidden;
                           transition: opacity var(--dur-quick) var(--ease-out), visibility var(--dur-quick); cursor: pointer; }
.link-mark.on, .select-link.on { opacity: 1; visibility: visible; }
.link-mark { translate: var(--x) var(--y); width: 24px; height: 24px; padding: 2px; border: 0; border-radius: var(--radius-2);
             background: none; color: var(--muted); }
.link-mark:hover { color: var(--navy); }
.link-mark svg { width: 20px; height: 20px; }
@media (hover: none) {
  .link-mark { display: none; }
  /* Заголовок на телефоне: значок-цепочка после текста, всегда виден, бледный. */
  .prose .anchor { display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.3em; vertical-align: -0.05em;
                   background: var(--muted); opacity: .6;
                   mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E") center / contain no-repeat; }
}
.select-link { translate: calc(var(--x) - 50%) var(--y); padding: 6px 12px; border: 0; border-radius: var(--radius-2);
               background: var(--sky); color: var(--sky-ink); font: inherit; font-size: 14px; }
.link-toast { position: fixed; left: 50%; bottom: var(--space-3); z-index: 40; translate: -50% 8px; margin: 0;
              padding: 8px 16px; border-radius: var(--radius-2); background: var(--sky); color: var(--sky-ink);
              font-size: 14px; opacity: 0; transition: opacity var(--dur-base) var(--ease-out), translate var(--dur-base) var(--ease-out); pointer-events: none; }
.link-toast.on { opacity: 1; translate: -50% 0; }

/* Фон под графиком Лекала (им обводятся точки, design/css/marks.css): в статье — бумага, на небе — небо. */
.prose { --mk-bg: var(--surface); }
.bleed { --mk-bg: var(--sky); }

/* ---------- главная (журнал «Дизайна» 15.11, лист lab/frame) ---------- */
/* Текст только для читалок. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Первый экран — окно в небо: слева фраза, темы и поиск, справа небо статей. Внизу небо
   растворяется в бумагу. */
.home-sky { min-height: calc(100svh - var(--layout-header)); display: grid; align-content: center;
            padding: var(--space-4) 0 140px; }
.home-sky .g { box-sizing: border-box; width: 100%; align-items: center; row-gap: var(--space-3); }
.home-sky .g > .home-l { grid-column: 1 / 5; }
.home-sky .g > .home-r { grid-column: 5 / -1; }
.home-sky .tag { margin: 0; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; font-weight: 300; color: var(--sky-ink); }
.lenses { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-4); }
.lenses .lt { flex-basis: 100%; margin: 0 0 4px; font-size: var(--type-caption-size); font-weight: 600; color: var(--sky-ink-2); }
.lenses button { font: inherit; font-size: 15px; color: var(--sky-ink); background: rgb(244 241 234 / .06);
                 border: 1px solid var(--sky-ink-2); border-radius: 2px; padding: 6px 12px; cursor: pointer; }
.lenses button[aria-pressed="true"] { background: var(--sky-ink); color: var(--sky); border-color: var(--sky-ink); }
.lenses button:focus-visible, .ask input:focus-visible { outline: 2px solid var(--focus-sky); outline-offset: 2px; }
.ask { display: grid; gap: var(--space-1); margin-top: var(--space-4); }
.ask-field { position: relative; }
.ask .ic { position: absolute; z-index: 1; left: 14px; top: 50%; width: 20px; height: 20px; translate: 0 -50%; pointer-events: none;
           fill: none; stroke: var(--sky-ink-2); stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.ask input { box-sizing: border-box; width: 100%; font: inherit; font-size: 19px; font-weight: 300; color: var(--sky-ink);
             background: rgb(8 17 43 / .45); border: 1px solid rgb(169 181 203 / .4); border-radius: 2px;
             padding: 14px 16px 14px 44px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.ask input::placeholder { color: var(--sky-ink-2); }
.found { margin: 0; min-height: 1.3em; font-size: 13px; color: var(--sky-ink-2); }

/* Небо статей: созвездие — ссылка с большой зоной клика; подпись — короткое название. */
.homesky { display: block; width: 100%; height: auto; overflow: visible; }
.homesky .hitbox { fill: transparent; }
.homesky .cn { outline: none; transition: opacity var(--dur-base) var(--ease-out); }
.homesky .cn path { fill: none; stroke: rgb(169 181 203 / .55); stroke-width: 1; transition: stroke var(--dur-base) var(--ease-out); }
.homesky .cn circle { fill: var(--sky-ink); }
.homesky .cn text { font: 15px var(--font-serif); fill: var(--sky-ink-2); transition: fill var(--dur-base) var(--ease-out); }
.homesky .cn:is(:hover, :focus-visible, .hit) path { stroke: var(--sky-ink); stroke-width: 1.5; }
.homesky .cn:is(:hover, :focus-visible, .hit) text { fill: var(--sky-ink); text-decoration: underline; text-decoration-thickness: 1px; }
.homesky .cn:focus-visible .hitbox { stroke: var(--focus-sky); stroke-width: 1.5; stroke-dasharray: 3 4; }
:is(.homesky, .homelist).filtering .cn:not(.hit) { opacity: .45; }
/* Телефон: статьи списком вместо неба (подписи на небе там ~7 px). */
.homelist { display: none; list-style: none; margin: 0; padding: 0; }
.homelist a { display: grid; grid-template-columns: 72px 1fr; gap: var(--space-2); align-items: center; padding: 12px 0;
              color: var(--sky-ink); text-decoration: none; font-size: 17px; line-height: 1.35; }
.homelist svg { width: 72px; height: auto; }
.homelist svg path { fill: none; stroke: var(--sky-ink-2); stroke-width: 1.5; }
.homelist svg circle { fill: var(--sky-ink); }
.homelist a:is(:hover, :focus-visible) span { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.homelist .cn { transition: opacity var(--dur-base) var(--ease-out); }
/* Низ окна растворяется в бумагу. */
.home-sky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 14%, transparent) 30%,
              color-mix(in srgb, var(--surface) 45%, transparent) 55%, color-mix(in srgb, var(--surface) 78%, transparent) 78%, var(--surface)); }
:root[data-theme="night"] .home-sky::after { background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 86%, transparent)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .home-sky::after { background: linear-gradient(transparent, color-mix(in srgb, var(--surface) 86%, transparent)); }
}
@media (max-width: 860px) {
  .home-sky .g > :is(.home-l, .home-r) { grid-column: 1 / -1; }
  .homesky text { font-size: 22px; }
}
@media (max-width: 600px) {
  .homesky { display: none; }
  .homelist { display: block; }
  .home-sky { min-height: 0; padding-bottom: 96px; }
}

/* Статьи блога — карточками: кликается вся карточка, ссылка — только название. */
.home-cards { padding-top: var(--space-6); }
.home-cards > * { max-width: none; }
.home-cards .g > * { grid-column: 1 / -1; }
.kicker { margin: 0 0 12px; font-size: var(--type-caption-size); font-weight: 600; color: var(--muted); }
.home-cards h2 { margin: 0 0 28px; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.1; font-weight: 560; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--space-2); }
.card { position: relative; display: grid; align-content: start; gap: 10px; padding: 20px 22px 22px; background: var(--surface);
        border: 1px solid var(--line); border-radius: 2px; transition: border-color var(--dur-quick) var(--ease-out); }
.card:is(:hover, :focus-within) { border-color: var(--ink-2); }
.card .when { margin: 0; font-size: 13.4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .ttl { margin: 0; font-size: clamp(21px, 1.7vw, 24px); line-height: 1.25; font-weight: 560; font-variation-settings: "opsz" 24; }
.card .ttl a { color: inherit; text-decoration: none; }
.card .ttl a::after { content: ""; position: absolute; inset: 0; }
.card .ttl a:focus-visible { outline: none; }
.card:has(.ttl a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.card .ld { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.card .foot { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.card .foot svg { width: 150px; height: auto; overflow: visible; }
.card .foot path { fill: none; stroke: var(--context); stroke-width: 1; transition: stroke var(--dur-quick) var(--ease-out); }
.card .foot circle { fill: var(--context); transition: fill var(--dur-quick) var(--ease-out); }
.card:is(:hover, :focus-within) .foot path { stroke: var(--navy); }
.card:is(:hover, :focus-within) .foot circle { fill: var(--navy); }
.card .cnt { font-size: 12.5px; color: var(--muted); }

/* Значки набора «Дизайна» (design/icons): сетка 20, линия 1,5, прямые концы и острые углы,
   цвет текста. Залит только треугольник play. */
.ic { display: inline-block; flex: none; width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.5;
      stroke-linecap: square; stroke-linejoin: miter; overflow: visible; }
.anim-toggle .ic path[d^="M6 4.5L15"] { fill: currentColor; }
.copy .ic { width: 16px; height: 16px; }

/* Ссылка на другой сайт: значок ↗ (design/icons/external.svg) не отрывается от последнего слова. */
.ext { white-space: nowrap; }
.ext::after { content: ""; display: inline-block; width: .72em; height: .72em; margin-left: .12em; vertical-align: .02em;
  background: currentColor; -webkit-mask: var(--ic-external) center / contain no-repeat; mask: var(--ic-external) center / contain no-repeat; }
:root { --ic-external: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='square' stroke-linejoin='miter' d='M5.5 14.5L13.25 6.75M7.5 6H14V12.5'/%3E%3C/svg%3E"); }

/* Пришли по ссылке на абзац — он на мгновение подсвечен, чтобы глаз нашёл место. */
.prose > :target { animation: target-flash var(--dur-hold) var(--ease-out); }
/* Фон бумаги поглубже с полями 8 px (тенью — вёрстка не сдвигается); цвет данных в текст не пускаем. */
@keyframes target-flash {
  from { background: var(--surface-deep); box-shadow: -8px 0 0 var(--surface-deep), 8px 0 0 var(--surface-deep); }
  to { background: transparent; box-shadow: -8px 0 0 transparent, 8px 0 0 transparent; }
}

/* Печать (ревью 02, 03, 04, 06): белая бумага и тушь в любой теме; небо, холсты и управление
   не печатаются; окна-главы — как бумага; после внешних ссылок — адрес. */
@media print {
  :root, :root[data-theme] { --surface: #fff !important; --surface-deep: #f3f0e9 !important; --ink: #1c2440 !important;
    --ink-2: #4a5068 !important; --muted: #6e685b !important; --line: #d3c8b5 !important; --navy: #1e397f !important;
    --model-ink: #5a5f6b !important; --navy-fill: #bcd1fd !important; --chat-them: #e9e5dc !important; --chat-me: #d6e0f5 !important;
    --sky-ink: #1c2440 !important; --sky-ink-2: #4a5068 !important; color-scheme: light; }
  html, body { background: #fff !important; color: var(--ink) !important; }
  :is(.hero, .prose, .article-end, .index) { background: #fff !important; box-shadow: none !important; clip-path: none !important; }
  #sky, canvas, .pblur, .toc-rail, .where, .theme, .skip, #skyfull, .link-mark, .select-link, .link-toast,
  .anim-toggle, .copy, .zoom-dialog { display: none !important; }
  .sky, .bleed { background: none !important; color: var(--ink) !important; position: static !important; }
  .sky { border-bottom: 1px solid var(--line); }
  :where(p, li) > a[href^="http"]:not([href*="//think-visualize.ru"])::after { content: " (" attr(href) ")"; font-size: .8em; color: var(--muted); word-break: break-all; }
  :where(h1, h2, h3, h4) { break-after: avoid; }
  :where(figure, table, pre, blockquote, .chart-frame) { break-inside: avoid; }
}
/* Виды текста (лист сетки «Дизайна», раздел «Виды текста»): диалог, мысль, врезка, списки, формулы, код, таблица,
   паспорт этапа, вопрос — ответ, ремарка, строчный код, разделитель, пропавшая форма.
   Разметку ставит движок (crates/engine-markdown/src/kinds.rs): абзацы не заменяются, а обёртываются
   в <div class="…">, чтобы сохранить адреса, — поэтому стили листа здесь висят на `обёртка > p`. */

/* ---------- диалог: как в мессенджере — собеседник слева на бумаге, аналитик (вы) справа ---------- */
.prose > .chat { display: grid; gap: 6px; margin: var(--space-4) 0; }
.chat > .who > p { margin: 20px 0 4px; font-size: var(--type-caption-size); font-weight: 640; text-transform: uppercase;
                   letter-spacing: .06em; }
.chat > .who:first-child > p { margin-top: 0; }
.chat > .who strong { font-weight: inherit; }
.chat > .who em { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 15px; }
.chat > .msg { width: fit-content; max-width: 78%; padding: 10px var(--space-2); }
.chat > .msg > p { margin: 0; font-size: var(--type-chat-size); line-height: var(--type-chat-line); }
.chat > .them { background: var(--chat-them); border-radius: 18px 18px 18px 4px; }
.chat > .me { background: var(--chat-me); border-radius: 18px 18px 4px 18px; justify-self: end; }
/* Тире реплики остаётся в тексте статьи (архив слово в слово), но в пузыре оно лишнее. */
.msg-dash { display: none; }
@media (max-width: 860px) {
  .chat > .msg { max-width: 86%; padding: 9px 14px; }
  .chat > .msg > p { font-size: 16px; }
  .chat > .who em { display: block; margin-top: 2px; }
}

/* ---------- мысль, которую уносят с собой: крупно, курсивом, с воздухом — акцент масштабом, а не рамкой ---------- */
.prose > .thought { margin: var(--space-3) 0; }
.thought > p { margin: 0; max-width: 20ch; font-size: clamp(30px, 3.4vw, var(--type-thought-size));
               line-height: var(--type-thought-line); font-weight: var(--type-thought-weight); font-style: italic;
               font-variation-settings: var(--type-thought-variation, normal); text-wrap: balance; }

/* ---------- врезка «кстати»: одна плоскость, текст мельче; значок из архива не показываем ---------- */
.prose > .aside { padding: var(--space-2) var(--space-3); background: var(--surface-deep); color: var(--ink-2); }
.aside > p { margin: 0; font-size: var(--type-chat-size); line-height: 1.55; }
.aside > p + p { margin-top: var(--space-1); }
.aside-mark { display: none; }

/* ---------- списки: висячие тире и номера ---------- */
.list > :is(ul, ol) { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prose .list > * > li { position: relative; margin: 0; padding-left: 1.6em; }
.list > * > li::before { position: absolute; left: 0; color: var(--muted); }
.list > ul > li::before { content: "—"; }
/* Встроенный счётчик пунктов учитывает `start` у списка, продолженного после картинки. */
.list > ol > li::before { content: counter(list-item); font-variant-numeric: tabular-nums; }
.list > * > li > p { margin: 0; }
.list > * > li > p + p { margin-top: var(--space-1); }

/* ---------- формулы: выровнены по «=», величины — курсивом Литераты, знаки — прямо и тише ---------- */
.prose > .formula { display: grid; grid-template-columns: max-content max-content 1fr; gap: 6px 14px; align-items: baseline;
                    margin: var(--space-1) 0 var(--space-3); font-size: clamp(21px, 1.9vw, 25px); font-style: italic;
                    font-variation-settings: var(--type-thought-variation, normal); }
/* Абзац формулы (с адресом) не ломает сетку: его части — прямо в ней. */
.formula > p { display: contents; }
.formula .l { text-align: right; }
.formula .op { font-style: normal; color: var(--muted); font-weight: 300; padding: 0 .12em; }

/* ---------- код: полоса с языком и кнопкой «Копировать», подсветка тихая — смысл держит структура.
   У Plex Mono в наборе только 400: выделяем цветом, не весом (иначе браузер рисует ложный жирный). ---------- */
.prose > .codeblock { grid-column: var(--col-wide); max-width: none; margin: 0 0 var(--space-3); background: var(--surface-deep); }
.codebar { display: flex; justify-content: space-between; align-items: center; min-height: 32px;
           padding: var(--space-1) var(--space-2) 0 var(--space-3); font-size: 12.5px; color: var(--muted); }
.copy { display: inline-flex; align-items: center; gap: 6px; font: inherit; color: var(--ink-2); background: none;
        border: 1px solid var(--line); border-radius: var(--radius-2); padding: 4px 10px; cursor: pointer; }
.copy.done { color: var(--better); }
.copy:hover { color: var(--ink); border-color: var(--ink-2); }
.codeblock .code { margin: 0; padding: 12px var(--space-3) 20px; overflow-x: auto; font-family: var(--font-mono);
                   font-size: var(--type-code-size); line-height: var(--type-code-line); font-variant-ligatures: none; tab-size: 2; }
.codeblock code { font: inherit; }
.code .t-tag { color: var(--muted); }
.code .t-kw { color: var(--navy); }
.code .t-fn { color: var(--ink); }
.code .t-str { color: var(--better); }
.code .t-num { color: var(--signal); }

/* ---------- пропавшая форма: из архива не восстановилась — тихая служебная строка ---------- */
.lost > p { margin: 0; font-size: var(--type-caption-size); line-height: var(--type-caption-line); color: var(--muted);
            font-style: italic; }

/* ---------- строчный код: мельче текста, на плашке бумаги поглубже ---------- */
.prose :not(pre) > code { font: .86em/1 var(--font-mono); background: var(--surface-deep); padding: .12em .32em;
                          border-radius: var(--radius-2); font-variant-ligatures: none; }

/* ---------- таблица — тихая: без сетки, заголовки мелко и тише, числа вправо ---------- */
.prose > .table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline-offset: 2px; }
.prose .table-wrap > table { border-collapse: collapse; width: auto; font-size: var(--type-chat-size); line-height: 1.4;
                             font-variant-numeric: tabular-nums lining-nums; }
.prose .table-wrap :is(th, td) { padding: var(--space-1) var(--space-3) var(--space-1) 0; border: 0; text-align: left;
                                 vertical-align: top; }
.prose .table-wrap thead th { padding-top: 0; font-weight: 400; font-size: var(--type-caption-size); color: var(--muted);
                              border-bottom: 1px solid var(--line); vertical-align: bottom; }
.prose .table-wrap :is(th, td)[align="right"] { text-align: right; padding-left: var(--space-5); }
.prose .table-wrap :is(th, td):last-child { padding-right: 0; }
.prose .table-wrap tbody tr { transition: background-color var(--dur-quick) var(--ease-out); }
.prose .table-wrap tbody tr:hover { background: color-mix(in srgb, var(--navy-fill) 30%, transparent); }
.prose .table-wrap thead th { hyphens: auto; }
@media (max-width: 600px) {
  .prose .table-wrap > table { font-size: 16px; }
  .prose .table-wrap thead th { font-size: 12.5px; }
  .prose .table-wrap :is(th, td)[align="right"] { padding-left: var(--space-2); }
}

/* ---------- паспорт этапа: справка «метка — значение», не цитата ---------- */
.prose > .passport { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-1) var(--space-3);
                     padding-top: var(--space-2); border-top: 1px solid var(--line); }
.passport > p { display: contents; }
/* Метки — 17/600 ink-2 обычным регистром (Passport, «Дизайн» 15.11; капитель отклонена вместе с H4). */
.passport strong { font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink-2); }
.passport .colon { display: none; }
.passport .v { font-size: var(--type-chat-size); line-height: 1.5; }
@media (max-width: 860px) { .prose > .passport { grid-template-columns: 1fr; row-gap: 0; }
                            .passport .v { margin-bottom: var(--space-1); } }

/* ---------- вопрос — ответ: номер у вопроса, ответ тире ниже и тише ---------- */
.prose .qa :is(ol, ul) { list-style: none; margin: 0; padding: 0; }
.prose .qa li { position: relative; margin: 0; }
.qa ol > li { padding-left: 1.6em; }
.qa ol > li::before { content: counter(list-item); position: absolute; left: 0; color: var(--muted);
                      font-variant-numeric: tabular-nums; }
.qa .q { font-weight: 600; }
.prose .qa ul { margin-top: 4px; }
.prose .qa > ul { margin-left: 1.6em; }
.prose .qa > ul + ol { margin-top: var(--space-2); }
.prose .qa > ol > li + li { margin-top: var(--space-2); }
.qa ul > li { padding-left: 1.2em; color: var(--ink-2); }
.qa ul > li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

/* ---------- ремарка автора: прямо и мельче — курсив занят голосом модели и мыслью ---------- */
.remark > p { margin: 0; font-size: var(--type-chat-size); line-height: 1.55; color: var(--ink-2); }
.remark .rl { font-weight: 600; color: var(--ink); }

/* ---------- разделитель: короткая черта на оси текста ---------- */
.prose > .divider { height: 1px; width: 64px; margin: 40px 0; border: 0; background: var(--ink-2); }
/* Метки графиков Think Visualize — единственный источник вида SVG Лекала.
   Владелец: Дизайн (контракт §2а). Только классы mk-*, цвета, толщины и время — токены design/tokens.json.
   Эталон и примеры: lab/charts/index.html, правила: design/03-dannye.md.
   Фон под графиком (обводка точек) задаёт контейнер: --mk-bg; по умолчанию плитка.
   Версия 2 (15.11.2026): масштаб 1, роль на элементе, интерактив, карточка, «Шаги». */

/* Текст в SVG — в масштабе 1: Лекало пишет width/height раскладки, график только сжимается под узкий контейнер. */
.chart { display: block; width: auto; max-width: 100%; height: auto; overflow: visible;
         font-family: var(--font-data); font-variant-numeric: tabular-nums lining-nums; }

/* оси и сетка */
.mk-grid { stroke: var(--line); stroke-width: 1; opacity: var(--grid-alpha); }
.mk-axis { font-size: 12px; fill: var(--muted); }
.mk-baseline { stroke: var(--ink-2); stroke-width: 1; }

/* подписи на данных */
.mk-label { font-size: 13.5px; font-weight: 500; fill: var(--ink); }
.mk-label.sm { font-size: 12px; }
.mk-name { font-size: 13.5px; fill: var(--ink-2); }
.mk-verdict { font-size: 13.5px; fill: var(--ink); }
.mk-subtitle, .mk-ref { font-size: 12px; fill: var(--muted); }
.mk-range { font-size: 11px; fill: var(--muted); }

/* ряды */
.mk-series { fill: none; stroke-width: var(--stroke-series); stroke-linejoin: round; stroke-linecap: round;
             transition: stroke var(--dur-base) var(--ease-out), stroke-width var(--dur-quick) var(--ease-out); }
.mk-series.step { stroke-width: var(--stroke-focus); stroke-linecap: butt; stroke-linejoin: miter; }
.mk-series.bar, .mk-bar { stroke: none; transition: fill var(--dur-base) var(--ease-out); }
.mk-point { stroke: var(--mk-bg, var(--tile)); stroke-width: 2; paint-order: stroke; }

/* Роли: цвет — суждение. Роль может стоять на группе ряда (.mk-row.mk-focus) или на самом элементе. */
:is(.mk-focus .mk-series, .mk-series.mk-focus)     { stroke: var(--navy); stroke-width: var(--stroke-focus); }
:is(.mk-better .mk-series, .mk-series.mk-better)   { stroke: var(--better); }
:is(.mk-worse .mk-series, .mk-series.mk-worse)     { stroke: var(--signal); }
:is(.mk-context .mk-series, .mk-series.mk-context) { stroke: var(--context); stroke-width: var(--stroke-context); }
.mk-focus :is(.bar, .mk-bar), :is(.bar, .mk-bar).mk-focus     { fill: var(--navy); }
.mk-better :is(.bar, .mk-bar), :is(.bar, .mk-bar).mk-better   { fill: var(--better); }
.mk-worse :is(.bar, .mk-bar), :is(.bar, .mk-bar).mk-worse     { fill: var(--signal); }
.mk-context :is(.bar, .mk-bar), :is(.bar, .mk-bar).mk-context { fill: var(--context); }
:is(.mk-focus .mk-point, .mk-point.mk-focus)     { fill: var(--navy); }
:is(.mk-better .mk-point, .mk-point.mk-better)   { fill: var(--better); }
:is(.mk-worse .mk-point, .mk-point.mk-worse, .mk-point.mk-worse-pt) { fill: var(--signal); }
:is(.mk-context .mk-point, .mk-point.mk-context) { fill: var(--context); }
.mk-label.mk-worse, .mk-ref.mk-worse { fill: var(--signal); }

/* норма, порог, прогноз */
.mk-norm { fill: var(--navy-fill); opacity: .5; }
.mk-norm-label { font-size: 12px; fill: var(--ink-2); }
.mk-threshold { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.mk-ci { fill: var(--navy-fill); opacity: .6; }
.mk-forecast { fill: none; stroke: var(--navy); stroke-width: var(--stroke-series); stroke-dasharray: 4 4; }
.mk-series.mk-what-if { stroke: var(--signal); stroke-width: 1.25; stroke-dasharray: 3 3; opacity: .8; }

/* пометки: без цвета */
.mk-note line { stroke: var(--ink-2); stroke-width: 1; }
.mk-note line.ev { stroke: var(--muted); stroke-dasharray: 2 3; }
.mk-note text { font-size: 13.5px; fill: var(--ink-2); }
.mk-period rect { fill: var(--ink); opacity: .06; }
.mk-period text { font-size: 13.5px; fill: var(--ink-2); }

/* Состояния рассказа — всегда сильнее ролей. Приглушённое — цветом context, а не прозрачностью (ночью прозрачность грязнит). */
.is-hl .mk-series[class] { stroke-width: var(--stroke-highlight); }
.is-dim .mk-series[class] { stroke: var(--context); stroke-width: var(--stroke-context); }
.is-dim .mk-point[class] { fill: var(--context); }
.is-dim :is(.bar, .mk-bar)[class] { fill: var(--context); }
.is-dim :is(.mk-label, .mk-name)[class] { fill: var(--muted); }
.is-off { opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base); }

/* Интерактив: легенда, попадание, наведение, подсказка, выделение периода, этап. */
.mk-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.chart [data-series] { cursor: pointer; }
.mk-row:hover .mk-series { stroke-width: var(--stroke-highlight); }
.mk-legend.is-off { opacity: 1; visibility: visible; }
.mk-legend.is-off .mk-name { fill: var(--muted); }
.mk-legend.is-off .mk-point[class] { fill: none; stroke-width: 1.5; }
.mk-legend.is-off .mk-point.mk-focus { stroke: var(--navy); }   .mk-legend.is-off .mk-point.mk-context { stroke: var(--context); }
.mk-legend.is-off .mk-point.mk-worse { stroke: var(--signal); } .mk-legend.is-off .mk-point.mk-better { stroke: var(--better); }
.chart [tabindex]:focus { outline: none; }
.chart [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.mk-hover { pointer-events: none; animation: mk-tip-in var(--dur-quick) var(--ease-out); }
@keyframes mk-tip-in { from { opacity: 0; } }
.mk-hover-rule { stroke: var(--line); stroke-width: 1; }
.mk-hover.mk-rest .mk-hover-rule { stroke-dasharray: 2 3; opacity: .6; }
.mk-tip { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.mk-tip-title { font-size: 12px; fill: var(--muted); }
.mk-brush { fill: var(--navy-fill); fill-opacity: .5; stroke: var(--navy); stroke-width: 1; pointer-events: none; }
.chart.has-stage .mk-row:not(.is-stage) { opacity: .35; }
.chart .mk-row { transition: opacity var(--dur-quick) var(--ease-out); }
.chart.has-stage .mk-row.is-stage .mk-series { stroke-width: var(--stroke-focus); }

/* Карточка метрики (SVG). Число Plex Sans 300/44, единица 15 ink-2, изменение 14/500 со стрелкой. */
.mk-number { font-size: 44px; font-weight: 300; fill: var(--ink); }
.mk-unit { font-size: 15px; fill: var(--ink-2); }
.mk-delta { font-size: 14px; font-weight: 500; fill: var(--ink-2); }
.mk-delta.mk-better { fill: var(--better); } .mk-delta.mk-worse { fill: var(--signal); }
.mk-spark { stroke-width: var(--stroke-context); }

/* «Шаги» (воронка, ворота). */
.mk-conv { font-size: 13.5px; fill: var(--ink); }
.mk-part .mk-title { font-size: 14px; font-weight: 400; fill: var(--muted); }
.mk-funnel-link { fill: var(--context); fill-opacity: .22; }
.mk-funnel-link.mk-worse { fill: var(--signal); fill-opacity: .14; }
.is-dim .mk-funnel-link { fill-opacity: .1; }
.mk-leader { fill: none; stroke-width: 1.25; stroke-opacity: .55; }
.mk-leader.mk-focus { stroke: var(--navy); } .mk-leader.mk-context { stroke: var(--context); } .mk-leader.mk-worse { stroke: var(--signal); }
.mk-gate { fill: var(--context); fill-opacity: .18; }        .mk-gate.mk-worse { fill: var(--signal); fill-opacity: .16; }
.mk-gate-bg, .mk-gate-band { fill: var(--line); fill-opacity: .16; }
.mk-gate-band.mk-worse { fill: var(--signal); fill-opacity: .07; }
.mk-gate-name { font-size: 12px; fill: var(--muted); }      .mk-gate-name.mk-worse { fill: var(--signal); }
.mk-gate-value { font-size: 13.5px; font-weight: 500; fill: var(--ink-2); } .mk-gate-value.mk-worse { fill: var(--signal); }
.mk-row-base { stroke-opacity: .35; }

/* рамка: заголовок-вывод, определение, источник */
.mk-title { font: 600 17px/1.3 var(--font-serif); font-feature-settings: "case" 1; margin: 0; }
.mk-sub { font: 400 14px/1.4 var(--font-data); color: var(--ink-2); margin: 4px 0 0; }
text.mk-title { fill: var(--ink); }  text.mk-sub { fill: var(--ink-2); }  /* в SVG цвет — fill, иначе ночью тёмное на тёмном */
.mk-src { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px;
          font: 400 12px/1.4 var(--font-data); color: var(--muted); }
.mk-src .wm { height: 12.4px; width: auto; flex: none; color: var(--ink); opacity: .6; }
.mk-train-word { font-weight: 500; color: var(--ink); }
tspan.mk-train-word { fill: var(--ink); }

/* ---------- Антипример («как просили» в первом посте) ----------
   Только у графиков с antipattern: true (design/rules.md, «Исключение — антипример»). Палитра чужая намеренно:
   так выглядит экран «всё в кашу». В обычных графиках эти классы не используются. Эталон — lab/dash/. */
.chart { --anti-1: #2f7ed8; --anti-2: #f28f43; --anti-3: #8bbc21; --anti-4: #c42525;
         --anti-5: #8a4fd1; --anti-6: #1aadce; --anti-7: #e8b20c; --anti-8: #e5559d; }
.mk-anti-1 { --anti: var(--anti-1); } .mk-anti-2 { --anti: var(--anti-2); } .mk-anti-3 { --anti: var(--anti-3); } .mk-anti-4 { --anti: var(--anti-4); }
.mk-anti-5 { --anti: var(--anti-5); } .mk-anti-6 { --anti: var(--anti-6); } .mk-anti-7 { --anti: var(--anti-7); } .mk-anti-8 { --anti: var(--anti-8); }
.mk-series[class*="mk-anti-"] { stroke: var(--anti); stroke-width: 2.5; }
.mk-area[class*="mk-anti-"] { fill: var(--anti); opacity: .35; stroke: none; }
.mk-bar[class*="mk-anti-"] { fill: var(--anti); rx: 3px; }
.mk-key[class*="mk-anti-"], .mk-slice[class*="mk-anti-"] { fill: var(--anti); }
.mk-number[class*="mk-anti-"] { fill: var(--anti); font-weight: 600; }
.mk-gauge-arc[class*="mk-anti-"] { fill: none; stroke: var(--anti); stroke-width: 18; stroke-linecap: butt; }
.mk-needle { stroke: var(--ink); stroke-width: 3; } .mk-hub { fill: var(--ink); }
.mk-delta.mk-anti-up { fill: var(--anti-3); color: var(--anti-3); font-weight: 600; }
.mk-delta.mk-anti-down { fill: var(--anti-4); color: var(--anti-4); font-weight: 600; }
table.mk-table.mk-anti thead th { background: var(--anti-1, #2f7ed8); color: #fff; }
table.mk-table.mk-anti tbody tr:nth-child(even) td { background: color-mix(in srgb, #1aadce 14%, transparent); }

/* прежнее значение поперёк столбца («сейчас / год назад») и его ключ */
line.mk-prev { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: butt; }
.mk-prev-key line { stroke: var(--ink); stroke-width: 1.5; }
/* Знак: сгенерирован движком из design/logo/. */
.lk { display: inline-block; white-space: nowrap; line-height: 1; font-weight: 800; font-variation-settings: "opsz" 20; }
.lk svg { display: inline-block; fill: currentColor; }
.lk-dot { width: 0.2249em; height: 0.2249em; margin: 0 0.2202em 0 0.0668em; vertical-align: -0.04em; }
.lk-vis { height: 0.8860em; vertical-align: -0.0477em; }
