/*
  Общие стили для всех страниц практической работы.
  Design Read: сборник учебных карточек для преподавателя и одногруппников, спокойный технический
  язык, нативный CSS без готовой дизайн-системы.
  Диалы: DESIGN_VARIANCE 6, MOTION_INTENSITY 4, VISUAL_DENSITY 3.
  Тема: тёмная, единая для всего сайта (по просьбе заказчика). Палитра: почти чёрная основа
  с зелёным подтоном и один изумрудный акцент.
  Оформление сдержанное и без шаблонных приёмов: кнопки плоские, метки простым текстом, без
  градиентов, свечения, стекла и моноширинных подписей в «таблетках». Единственный эффектный
  слой это фон-шейдер bg.js, он лежит под страницей.
  Форма: поверхности 16px, кнопки 10px. Одно имя анимации на весь сайт: --spring и --t.
*/
/*
  Пиксельный шрифт для заголовков: Press Start 2P (Google Fonts, SIL OFL), отдельно кириллица и
  латиница. Кириллица покрыта полностью: проверено по таблице символов в самом файле, 96 из 96
  знаков блока, включая О и П. Pixelify Sans не подошёл: в нём нет заглавных О и П.
  Шрифт моноширинный на сетке 8px, поэтому размеры заголовков кратны 8px, иначе края пикселей
  расплываются. Начертание одно (400), жирность не задаём, чтобы браузер не рисовал «псевдожирный».
*/
@font-face {
  font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/press-start-2p-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/press-start-2p-latin.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;
}
/*
  Шрифты подключены локально, без запросов к внешним серверам. Файлы взяты из Google Fonts
  (лицензия SIL OFL), это переменные шрифты по оси веса, отдельно кириллица и латиница.
  Подбор по базе ui-ux-pro-max, пара Developer Mono: IBM Plex Sans и JetBrains Mono.
*/
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("assets/fonts/ibm-plex-sans-latin.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: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("assets/fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin.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;
}

:root {
  color-scheme: dark;
  --bg: #0c0f0e;
  --surface: #141918;
  --surface-2: #1b2220;
  --text: #e9efec;
  --muted: #c0ccc6;
  --line: #27312e;
  --accent: #34d399;
  --accent-ink: #04150e;
  --accent-soft: #0f2a21;
  --dot: rgb(52 211 153 / .18);
  --shadow: 0 1px 0 rgb(0 0 0 / .35), 0 18px 36px -22px rgb(0 0 0 / .85);
  --r: 16px;
  --r-btn: 10px;
  /* Единое имя анимации: без перерегулирования, отклик 0.35с. Для касаний и нажатий */
  --spring: cubic-bezier(.16, 1, .3, 1);
  --t: .35s;
  --rail-w: 200px;
  --rail-muted: #8d9b95;
  /* Пара Developer Mono из базы ui-ux-pro-max: IBM Plex Sans для текста и заголовков, JetBrains Mono для дат и чисел. Оба шрифта с кириллицей. Запасные системные, пока файлы не загружены */
  --font: "IBM Plex Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-pixel: "Press Start 2P", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2b3532 var(--bg); background: var(--bg); }
/*
  Горизонтального скролла на сайте нет. При смене страницы #page уезжает вбок (site.js), на это
  время документ становился шире окна, появлялась горизонтальная полоса прокрутки и отнимала
  у окна 15px высоты: страница «проседала». Лишнее по ширине обрезаем на уровне окна.
*/
html { overflow-x: hidden; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/*
  Запасной фон без WebGL: неподвижный зелёно-бирюзовый свет. Основной фон рисует bg.js (холст #bg),
  тогда этот слой скрыт. Оттенки одной гаммы, второго акцента нет.
*/
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 500px at 10% -8%, rgb(52 211 153 / .20), transparent 70%),
    radial-gradient(680px 560px at 98% 24%, rgb(18 128 116 / .24), transparent 70%),
    radial-gradient(820px 600px at 28% 110%, rgb(52 211 153 / .12), transparent 70%);
}
#bg {
  position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%;
  pointer-events: none; opacity: 0; transition: opacity 1.4s ease;
}
/* Приглушение: точки дают текстуру, но не спорят с текстом (расчёт в комментарии bg.js) */
.has-bg #bg { opacity: .4; }
/* Фон уже показывали в этой вкладке (обычная перезагрузка): без повторного затухания */
.bg-seen #bg { opacity: .4; transition: none; }
.has-bg body::before { display: none; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
section[tabindex="-1"]:focus { outline: none; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
/* Запасной вариант без JS: якорь останавливается у верха окна. С JS блок центрируется (site.js) */
section[id] { scroll-margin-top: 16px; }

/*
  Навигация по страницам, два режима на выбор. Переключатель лежит в левом верхнем углу, выбор
  запоминается. Режим записан в атрибуте data-nav у html: его ставит скрипт в head до первой
  отрисовки, поэтому страница не мигает. Без скрипта работает нижняя полоса.
  Сбоку: панель слайдов в своей колонке, ничего не закрывает, сдвиг страницы задаёт #page. Названия
  видны сразу, текущая страница подсвечена и раскрывает свои разделы. Маркер слева это одна
  полоска, которая переезжает между страницами, а не гаснет и появляется заново.
  Снизу: полоса. Где есть мышь, она прячется и выезжает, когда курсор подходит к нижнему краю окна
  (site.js ставит классы nav-auto и nav-show). На касаниях полоса всегда на месте.
  Уже 1000px панель слева не помещается: там переключателя нет и всегда нижняя полоса.
*/
.rail { position: fixed; z-index: 20; color: var(--text); }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail a { text-decoration: none; }

/* Режим «сбоку» */
[data-nav="side"] .rail {
  left: 0; top: 0; bottom: 0; width: var(--rail-w);
  display: flex; flex-direction: column;
  padding: clamp(72px, 13vh, 132px) 12px 24px 28px;
  background: rgb(12 15 14 / .92);
  border-right: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: none;
}
[data-nav="side"] .rail::-webkit-scrollbar { display: none; }
[data-nav="side"] .rail-pages { position: relative; }
[data-nav="side"] .rail-pages::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; border-radius: 2px; background: var(--line); }
[data-nav="side"] .rail-pages > li > a {
  display: flex; align-items: center; height: 40px; padding-left: 20px;
  color: var(--rail-muted); font-size: .9375rem; font-weight: 500;
  transition: color var(--t) var(--spring);
}
[data-nav="side"] .rail-pages > li > a:hover,
[data-nav="side"] .rail-pages > li > a:focus-visible,
[data-nav="side"] .rail-pages > li > a[aria-current="page"] { color: var(--text); }
[data-nav="side"] .rail-dot { display: none; }
[data-nav="side"] .rail-thumb {
  position: absolute; left: 0; top: 0; z-index: 1; width: 2px; height: 20px; pointer-events: none;
  border-radius: 2px; background: var(--accent);
  transform: translateY(var(--ty, 10px));
  transition: transform var(--t) var(--spring);
}
[data-nav="side"] .rail-subwrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t) var(--spring); }
[data-nav="side"] .rail-pages > li.is-current .rail-subwrap { grid-template-rows: 1fr; }
[data-nav="side"] .rail-subs { min-height: 0; overflow: hidden; }
[data-nav="side"] .rail-subs a { display: block; padding: 6px 0 6px 36px; color: var(--rail-muted); font-size: .875rem; line-height: 1.35; transition: color var(--t) var(--spring); }
[data-nav="side"] .rail-subs li:last-child a { padding-bottom: 12px; }
[data-nav="side"] .rail-subs a:hover,
[data-nav="side"] .rail-subs a:focus-visible { color: var(--text); }
[data-nav="side"] .rail-subs a[aria-current="true"] { color: var(--accent); }
[data-nav="side"] .rail-hint { margin: auto 0 0; padding: 24px 0 0 20px; font-size: .8125rem; color: var(--rail-muted); }
[data-nav="side"] #page { margin-left: var(--rail-w); }

/* Режим «снизу», он же запасной без скрипта */
:root:not([data-nav="side"]) .rail {
  left: 50%; bottom: 12px; transform: translateX(-50%);
  max-width: calc(100% - 16px); height: 54px; padding: 0 5px;
  background: rgb(20 25 24 / .96); border: 1px solid var(--line); border-radius: 14px;
}
:root:not([data-nav="side"]) .rail nav,
:root:not([data-nav="side"]) .rail-pages { height: 100%; }
/* Мишени не меньше 44px (правило касаний из ui-ux-pro-max). Если пунктов много, полоса прокручивается, текущий пункт по центру */
:root:not([data-nav="side"]) .rail-pages { display: flex; align-items: center; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
:root:not([data-nav="side"]) .rail-pages::-webkit-scrollbar { display: none; }
:root:not([data-nav="side"]) .rail-thumb,
:root:not([data-nav="side"]) .rail-subwrap,
:root:not([data-nav="side"]) .rail-hint { display: none; }
:root:not([data-nav="side"]) .rail-pages > li > a {
  position: relative; display: flex; align-items: center; justify-content: center;
  flex: none; height: 44px; width: auto; min-width: 44px; max-width: 44px; padding: 0; overflow: hidden;
  color: var(--muted);
  transition: max-width var(--t) var(--spring), padding var(--t) var(--spring), color var(--t) var(--spring);
}
:root:not([data-nav="side"]) .rail-pages > li.is-current > a { max-width: 150px; padding: 0 14px 0 36px; color: var(--text); }
:root:not([data-nav="side"]) .rail-dot {
  position: absolute; left: 18px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: rgb(255 255 255 / .34);
}
:root:not([data-nav="side"]) .rail-pages > li.is-current .rail-dot { background: var(--accent); }
:root:not([data-nav="side"]) .rail-label { font-size: 0; opacity: 0; transition: opacity var(--t) var(--spring); }
:root:not([data-nav="side"]) .rail-pages > li.is-current .rail-label { opacity: 1; }
:root:not([data-nav="side"]) .rail-label::after { content: attr(data-short); font-size: .8125rem; font-weight: 600; }
:root:not([data-nav="side"]) #page { padding-bottom: 84px; }

/* Автопрятание нижней полосы (только где есть мышь). Пока полоса спрятана, у края остаётся тонкая метка */
:root.nav-auto .rail { transform: translate(-50%, calc(100% + 24px)); pointer-events: none; transition: transform var(--t) var(--spring); }
:root.nav-auto.nav-show .rail { transform: translate(-50%, 0); pointer-events: auto; }
:root.nav-auto #page { padding-bottom: 0; }
.dock-peek {
  position: fixed; z-index: 19; left: 50%; bottom: 6px; width: 56px; height: 4px; margin-left: -28px;
  border-radius: 2px; background: rgb(255 255 255 / .34);
  opacity: 0; pointer-events: none; transition: opacity var(--t) var(--spring);
}
:root.nav-auto:not(.nav-show) .dock-peek { opacity: 1; }

/*
  Индикатор смены страницы (site.js). Показывается при листании, когда нижняя полоса спрятана:
  ряд квадратов по числу страниц, текущий вытянут и цвета акцента, рядом название. Через
  полторы секунды гаснет. Если полоса выехала, индикатор не нужен и скрыт.
*/
.page-ind {
  position: fixed; z-index: 19; left: 50%; bottom: 18px;
  display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 16px;
  background: rgb(20 25 24 / .96); border: 1px solid var(--line); border-radius: 10px;
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity .25s ease, transform var(--t) var(--spring);
}
.page-ind.is-on { opacity: 1; transform: translate(-50%, 0); }
:root.nav-show .page-ind { opacity: 0; }
.pi-dots { display: flex; gap: 6px; }
.pi-dots i {
  display: block; width: 8px; height: 8px; background: rgb(255 255 255 / .3);
  transition: width var(--t) var(--spring), background-color var(--t) var(--spring);
}
.pi-dots i.is-current { width: 22px; background: var(--accent); }
.pi-name { font-size: .8125rem; font-weight: 600; white-space: nowrap; }

/* Переключатель режима меню, левый верхний угол. Иконки показывают, где окажется меню */
.nav-switch {
  position: fixed; z-index: 30; top: 16px; left: 24px;
  display: flex; gap: 2px; padding: 3px;
  background: rgb(20 25 24 / .96); border: 1px solid var(--line); border-radius: 10px;
}
.nav-switch button {
  display: grid; place-items: center; width: 36px; height: 32px; padding: 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--rail-muted);
  cursor: pointer; transition: color .2s ease, background-color .2s ease;
}
.nav-switch button:hover { color: var(--text); }
.nav-switch button[aria-pressed="true"] { background: rgb(255 255 255 / .1); color: var(--accent); }
.nav-switch svg { display: block; width: 20px; height: 20px; }
@media (pointer: coarse) { .nav-switch button { width: 44px; height: 44px; } }
@media (max-width: 999px) { .nav-switch { display: none; } }

/* Страница: мягкий вход при обычной загрузке (при переходах анимирует site.js). Сдвиг под панель в блоке панели */
#page { min-height: 100dvh; transition: margin-left var(--t) var(--spring); }
@media (prefers-reduced-motion: no-preference) {
  #page { animation: page-in .7s var(--spring) backwards; }
}
@keyframes page-in { from { opacity: 0; transform: translateY(16px); } }
main:focus { outline: none; }

/* Появление блоков по мере прокрутки: класс rv и in ставит site.js, без JS всё видно сразу */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--spring), transform .7s var(--spring); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; transform: none; }

/*
  Кнопки. Прямоугольник с небольшим скруглением и жёсткой тенью без размытия, как у кнопок
  в играх. Подпись обычным шрифтом. При наведении кнопка сдвигается на тень, при нажатии
  ложится в неё целиком. Движение ступенчатое (steps), поэтому «щёлкает», а не плывёт.
  Без градиентов, свечения и стрелок.
*/
.btn {
  --sh: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  border: 2px solid var(--btn-line); border-radius: 4px;
  font-family: var(--font); font-size: .9375rem; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  box-shadow: var(--sh) var(--sh) 0 var(--btn-shadow);
  transition: transform .12s steps(2), box-shadow .12s steps(2), background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--btn-shadow); }
.btn:active { transform: translate(var(--sh), var(--sh)); box-shadow: 0 0 0 var(--btn-shadow); }
.btn-primary { --btn-line: var(--accent); --btn-shadow: #1a7a59; background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #56e2ae; }
.btn-ghost { --btn-line: rgb(255 255 255 / .55); --btn-shadow: rgb(255 255 255 / .16); background: transparent; color: var(--text); }
.btn-ghost:hover { --btn-line: var(--text); background: rgb(255 255 255 / .06); }

/* Hero */
.hero {
  display: grid; grid-template-columns: 6fr 7fr; gap: 48px; align-items: center;
  min-height: 100dvh;
  padding-block: 48px;
}
.eyebrow { font-size: .9375rem; font-weight: 500; color: var(--accent); }
h1 { margin-top: 16px; }
.hero .lead { margin-top: 24px; max-width: 34ch; color: var(--muted); font-size: 1.125rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* На телефоне кнопки растягиваются: если не влезли в одну строку, каждая занимает свою на всю ширину */
@media (max-width: 479px) { .cta .btn { flex: 1 1 auto; } }

/* Слот для скриншота: подхватывает файл из assets, иначе показывает подсказку */
.shot {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow);
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot-empty {
  display: none; position: absolute; inset: 0;
  flex-direction: column; justify-content: center; gap: 8px;
  padding: 32px;
  background: var(--surface-2);
  border: 1px dashed var(--muted); border-radius: var(--r);
}
.shot-empty strong { font-size: 1.125rem; }
.shot-empty span { color: var(--muted); max-width: 40ch; }
.shot.is-empty img { visibility: hidden; }
.shot.is-empty .shot-empty { display: flex; }
.r-43 { aspect-ratio: 4 / 3; }
.r-1610 { aspect-ratio: 16 / 10; }
/* Снимки IDE: точные пропорции файлов, чтобы интерфейс не обрезался */
.r-app { aspect-ratio: 1919 / 1020; }
.r-ide1 { aspect-ratio: 2500 / 1155; }
.r-ide2 { aspect-ratio: 3292 / 1876; }
.shot a { display: block; width: 100%; height: 100%; }
.legend a { color: var(--accent); }
.r-11 { aspect-ratio: 1 / 1; }

/*
  Сцена со скриншотами телефона. Это настоящие снимки экранов в рамке телефона.
  Рамка: SVG из компонента Hero Section with Device Mockups (21st.dev, solaceui),
  файл assets/phone-frame.svg (серебристый вариант для тёмной темы). Вырез-остров
  убран: на скриншотах нет строки
  состояния. Высота ограничена, чтобы hero помещался в первый экран.
  Область экрана в рамке: x 21.25, y 19.25, 389.5 x 843.5 из 433 x 882.
*/
/*
  Плашки под телефонами нет: телефоны лежат прямо на фоне-шейдере. Сцену обозначают четыре
  уголка, как рамка видоискателя. Тень телефона жёсткая, без размытия и смещена вправо и вниз,
  как у кнопок. Когда курсор над сценой, site.js задаёт --mx и --my (от -1 до 1): телефоны
  сдвигаются на разную глубину, а тень уходит в противоположную сторону, как от света за курсором.
*/
.stage {
  --stage-sh: 8px;
  --corner: rgb(52 211 153 / .75);
  position: relative;
  display: flex; align-items: flex-start; justify-content: center; gap: 20px;
  padding: 36px 36px 44px;
  background:
    linear-gradient(var(--corner), var(--corner)) 0 0 / 28px 2px no-repeat,
    linear-gradient(var(--corner), var(--corner)) 0 0 / 2px 28px no-repeat,
    linear-gradient(var(--corner), var(--corner)) 100% 0 / 28px 2px no-repeat,
    linear-gradient(var(--corner), var(--corner)) 100% 0 / 2px 28px no-repeat,
    linear-gradient(var(--corner), var(--corner)) 0 100% / 28px 2px no-repeat,
    linear-gradient(var(--corner), var(--corner)) 0 100% / 2px 28px no-repeat,
    linear-gradient(var(--corner), var(--corner)) 100% 100% / 28px 2px no-repeat,
    linear-gradient(var(--corner), var(--corner)) 100% 100% / 2px 28px no-repeat;
}
.stage figure {
  --depth: 10;
  flex: 1 1 0; min-width: 0;
  max-width: calc(min(62dvh, 560px) * .491);
  transform: translate3d(calc(var(--mx, 0) * var(--depth) * 1px), calc(var(--my, 0) * var(--depth) * 1px), 0);
  transition: transform .3s ease-out;
}
.stage figure:nth-child(even) { --depth: 20; margin-top: 40px; }
.phone {
  position: relative; aspect-ratio: 433 / 882;
  background: url("assets/phone-frame.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(calc(var(--stage-sh) - var(--mx, 0) * 5px) calc(var(--stage-sh) - var(--my, 0) * 5px) 0 #155f47);
  transition: filter .3s ease-out;
}
.phone .shot {
  position: absolute; left: 4.91%; top: 2.18%; width: 89.95%; height: 95.64%;
  border: 0; border-radius: 14.31% / 6.61%; box-shadow: none;
}
.phone .shot-empty { padding: 16px; border-radius: 14.31% / 6.61%; }
.phone .shot-empty strong { font-size: .9375rem; }
.phone .shot-empty span { font-size: .8125rem; }
.stage figcaption { margin-top: 20px; color: var(--text); font-size: .875rem; text-align: center; }
/* Квадратный пиксель перед подписью, тот же язык, что у кнопок и заголовков */
.stage figcaption::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--accent); }

/* Секции */
.section { padding-block: 96px; }

/* О приложении: вертикальный стек, крупный текст */
.about p.big { margin-top: 24px; max-width: 30ch; font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.25; letter-spacing: -0.015em; }
.about p.small { margin-top: 24px; max-width: 65ch; color: var(--muted); }

/* Введение: определение слева, состав работы справа, ниже три признака оценки ИИ */
.intro-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; }
.intro p.big { max-width: 34ch; }
.how { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: how; display: grid; gap: 28px; }
.how li { counter-increment: how; position: relative; padding-left: 44px; }
/* Квадратная цифра, тот же язык, что у кнопок и подписей */
.how li::before {
  content: counter(how); position: absolute; left: 0; top: 1px; width: 28px; height: 28px;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font-size: .875rem; font-weight: 600;
}
.how b { display: block; font-weight: 600; }
.how span { display: block; margin-top: 2px; max-width: 40ch; color: var(--muted); }
.axes { margin: 64px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.axes > div { padding-top: 20px; border-top: 1px solid var(--line); }
.axes dt { font-weight: 600; }
.axes dd { margin: 8px 0 0; max-width: 44ch; color: var(--muted); font-size: .9375rem; }

/* Функции: 4 ячейки, асимметричная шахматка 7/5 и 5/7 */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 48px; }
.tile {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 220px; padding: 32px;
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .04);
}
.tile h3 { font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
.tile p { max-width: 42ch; color: var(--muted); }
.tile p.big {
  max-width: none; color: var(--text);
  font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 600;
}
.tile p.big + p { margin-top: 12px; }
.t-a { grid-column: span 7; background: var(--accent-soft); border-color: transparent; }
.t-b { grid-column: span 5; }
.t-c { grid-column: span 5; background: var(--surface-2); border-color: transparent; }
.t-d {
  grid-column: span 7; border-color: transparent;
  background: radial-gradient(var(--dot) 1px, transparent 1.5px) 0 0 / 18px 18px, var(--accent-soft);
}
.t-a p, .t-d p { color: var(--text); }

/* Вид ИИ */
.type-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; margin-top: 48px; align-items: start; }
/*
  Паспорт ИИ на странице приложения: три блока по классификации из методички. Уровень (слабый,
  сильный, супер) и вид по памяти (четыре вида) это шкалы с одним отмеченным делением, технологии
  (семь) это перечень с отметками. Всё из пиксельных квадратов, как остальной сайт. Штриховое
  деление значит «есть признаки». Число колонок шкалы зависит от ширины самого блока
  (container query), поэтому подписи не ломаются посреди слова ни в боковом, ни в узком макете.
*/
.passport { container-type: inline-size; }
.scale + .scale { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.scale + .cluster { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.scale .k { color: var(--muted); font-size: .9375rem; }
.steps { display: grid; gap: 12px 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.steps.s3 { grid-template-columns: repeat(3, 1fr); }
.steps.s4 { grid-template-columns: repeat(2, 1fr); }
@container (min-width: 380px) { .steps.s4 { grid-template-columns: repeat(4, 1fr); } }
.steps li { position: relative; padding-top: 16px; color: var(--rail-muted); font-size: .8125rem; line-height: 1.3; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: rgb(255 255 255 / .14); }
.steps li.on { color: var(--text); font-weight: 600; }
.steps li.on::before { background: var(--accent); }
.steps li.part { color: var(--muted); }
.steps li.part::before { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, rgb(255 255 255 / .14) 6px 12px); }
.scale .v { margin-top: 20px; font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; color: var(--accent); }
.scale .why { margin-top: 10px; max-width: 44ch; color: var(--muted); }
.scale .note { margin-top: 12px; max-width: 44ch; color: var(--rail-muted); font-size: .875rem; }
.tech-list { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.tech-list li { display: flex; align-items: flex-start; gap: 12px; color: var(--rail-muted); line-height: 1.4; }
.tech-list i { flex: none; width: 10px; height: 10px; margin-top: .4em; border: 2px solid rgb(255 255 255 / .3); }
.tech-list li.on { color: var(--text); }
.tech-list li.on i { background: var(--accent); border-color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.cluster h3 { font-size: 1.0625rem; font-weight: 600; }
.cluster dl { display: grid; gap: 20px; margin-top: 20px; }
.cluster dt { font-weight: 600; }
.cluster dd { color: var(--muted); max-width: 52ch; }
.cluster + .cluster { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.type-intro { max-width: 40ch; margin-top: 16px; color: var(--muted); }

/* Скриншоты (широкая галерея, страница Claude) */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-top: 48px; align-items: start; }
.gallery figure:first-child { grid-column: span 7; }
.gallery figure:last-child { grid-column: span 5; }
figcaption { margin-top: 12px; color: var(--muted); font-size: .9375rem; }

/* Главная: перечень приложений. Строка целиком кликабельна через ссылку в названии */
.index { margin: 48px 0 0; padding: 0; list-style: none; }
.row {
  position: relative;
  display: grid; grid-template-columns: 3fr 5fr 4fr 24px; gap: 8px 40px; align-items: baseline;
  padding: 28px 20px; margin-inline: -20px;
  border-radius: var(--r);
  transition: background-color var(--t) var(--spring);
}
.row::before { content: ""; position: absolute; top: 0; left: 20px; right: 20px; height: 1px; background: var(--line); transition: opacity .2s; }
.row:hover { background: var(--surface); }
.row:hover::before, .row:hover + .row::before { opacity: 0; }
.row::after {
  content: "\2192"; grid-column: 4; grid-row: 1 / span 2; align-self: center; justify-self: end;
  color: var(--muted); font-size: 1.25rem;
  transition: color var(--t) var(--spring), transform var(--t) var(--spring);
}
.row:hover::after { color: var(--accent); transform: translateX(4px); }
.row .sphere { color: var(--muted); }
.row .name { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; }
.row .name a { text-decoration: none; }
.row .name a::after { content: ""; position: absolute; inset: 0; }
.row:hover .name a { color: var(--accent); }
.row .desc { grid-column: 2; margin-top: 4px; color: var(--muted); max-width: 44ch; }
.row .kind { grid-column: 3; grid-row: 1 / span 2; }
.row .kind b { display: block; font-weight: 600; }
.row .kind span { display: block; margin-top: 2px; color: var(--muted); font-size: .9375rem; }
/* Ряд из семи квадратов: технологии из методички по порядку, закрашены описанные на странице */
.row .kind .techs { display: flex; gap: 4px; margin-top: 12px; }
.row .kind .techs i { display: block; width: 10px; height: 10px; background: rgb(255 255 255 / .16); }
.row .kind .techs i.on { background: var(--accent); }
.legend { margin-top: 16px; max-width: 70ch; color: var(--muted); font-size: .9375rem; }

/* Государственный блок на главной и цифры */
.gov { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.gov p.small { margin-top: 24px; max-width: 44ch; color: var(--muted); }
.gov .cta { margin-top: 32px; }
.figs { display: grid; gap: 40px; }
.fig .num { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; color: var(--accent); }
.fig p { margin-top: 8px; max-width: 46ch; color: var(--muted); }

/*
  Стратегия: хронология по мотивам компонента Milestone Timeline Feature
  (21st.dev, uiable): центральная линия, события по очереди слева и справа,
  появление карточек при прокрутке. На узком экране линия уходит влево.
  Появление карточек общее для сайта (класс rv, ставит site.js).
*/
.timeline { position: relative; display: grid; gap: 32px; margin: 48px auto 0; max-width: 860px; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 7px; width: 2px; background: var(--line); }
.tl { position: relative; padding-left: 36px; }
.tl::before {
  box-sizing: border-box;
  content: ""; position: absolute; left: 0; top: 26px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--accent); border: 4px solid var(--bg);
}
.tl .body { padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tl time { display: block; margin-bottom: 8px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.tl h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
.tl p { margin-top: 8px; color: var(--muted); }
@media (min-width: 640px) {
  .timeline::before { left: 50%; transform: translateX(-1px); }
  .tl { width: 50%; padding: 0 40px 0 0; text-align: right; }
  .tl:nth-child(even) { margin-left: 50%; padding: 0 0 0 40px; text-align: left; }
  .tl::before { left: auto; right: -8px; }
  .tl:nth-child(even)::before { left: -8px; right: auto; }
}

/* Стратегия: показатели */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.facts dt { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
.facts dd { margin-top: 4px; font-size: .9375rem; }

/* Источники */
.sources { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; max-width: 70ch; }
.sources a { text-underline-offset: 3px; }
.sources span { display: block; color: var(--muted); font-size: .9375rem; }

footer { border-top: 1px solid var(--line); padding-block: 48px; color: var(--muted); font-size: .9375rem; }
footer .wrap { display: grid; gap: 8px; }
footer p a { color: var(--text); text-underline-offset: 3px; text-decoration-color: rgb(233 239 236 / .3); transition: color .2s ease, text-decoration-color .2s ease; }
footer p a:hover { color: var(--accent); text-decoration-color: var(--accent); }
footer ul { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 20px 0 0; padding: 0; list-style: none; }
footer ul a { padding-block: 6px; border-bottom: 1px solid transparent; color: var(--muted); text-decoration: none; transition: color .2s ease, border-color .2s ease; }
footer ul a:hover { color: var(--text); border-bottom-color: currentColor; }

/*
  Типографика. Заголовки страницы и разделов: Press Start 2P. Текст, подзаголовки плиток и кнопки:
  IBM Plex Sans (600 для акцентов, 400 для текста). JetBrains Mono только для дат и чисел-данных. Крупные числа остаются в Plex Sans с табличными
  цифрами, моноширинный шрифт был бы слишком широким в узких плитках.
*/
h1, h2, h3 { font-optical-sizing: auto; }
/*
  Заголовки страницы и разделов пиксельным шрифтом. Размеры кратны 8px (сетка шрифта): h1 24px,
  на широком экране 32px; h2 16px, от планшета 24px. Межстрочный интервал больше обычного:
  у пиксельного шрифта высокие строчные и нужен воздух.
*/
h1, h2 { font-family: var(--font-pixel); font-weight: 400; letter-spacing: 0; line-height: 1.45; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
@media (min-width: 768px) { h2 { font-size: 24px; } }
@media (min-width: 1200px) { h1 { font-size: 32px; } }
/*
  Печать заголовков (site.js). Каждая буква лежит в своём span и занимает место сразу, поэтому
  вёрстка не прыгает: буквы только проявляются. Курсор это блок цвета акцента на месте следующей
  буквы, размером с заглавную (5x7 пикселей сетки шрифта, метрики сняты с самого файла). После
  последней буквы он мигает и исчезает, заголовок возвращается обычным текстом.
*/
.ty-c { position: relative; visibility: hidden; }
.ty-c.on { visibility: visible; }
.ty-c.cur::after {
  content: ""; position: absolute; left: 100%; top: 0; width: .625em; height: .875em; margin-left: .125em;
  background: var(--accent);
}
.ty-idle .ty-c.cur::after { animation: ty-blink 1s steps(1) infinite; }
@keyframes ty-blink { 50% { opacity: 0; } }
.tl time, .facts dt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tl time { font-size: .875rem; font-weight: 500; }
.facts dt { font-weight: 500; letter-spacing: -0.02em; }
.tile p.big, .fig .num { font-variant-numeric: tabular-nums; }

/* Мобильная версия: всё в одну колонку */
@media (max-width: 767px) {
  .wrap { padding-inline: 16px; }
  .hero { grid-template-columns: 1fr; gap: 32px; min-height: 0; padding-block: 32px 48px; }
  .section { padding-block: 64px; }
  .bento, .gallery { grid-template-columns: 1fr; }
  .t-a, .t-b, .t-c, .t-d,
  .gallery figure:first-child, .gallery figure:last-child { grid-column: auto; }
  .tile { min-height: 0; padding: 24px; }
  .type-grid, .gov, .intro-grid, .axes { grid-template-columns: 1fr; gap: 48px; }
  .axes { margin-top: 48px; gap: 32px; }
  .stage { --stage-sh: 5px; gap: 12px; padding: 24px 16px 32px; }
  .stage figure { max-width: none; }
  .stage figure:nth-child(even) { margin-top: 32px; }
  .row { grid-template-columns: 1fr; padding: 24px 12px; margin-inline: -12px; }
  .row::before { left: 12px; right: 12px; }
  .row::after { display: none; }
  .row .desc, .row .kind { grid-column: auto; grid-row: auto; margin-top: 8px; }
  .tl .body { padding: 16px 20px; }
  .facts { grid-template-columns: 1fr; }
}
/* Ветки доступности */
/* Уменьшенное движение: переходы и сдвиги отключены, блоки видны сразу */
@media (prefers-reduced-motion: reduce) {
  .btn, .row::after, footer p a, footer ul a, .rail-pages > li > a, .rail-subs a, .rail-thumb, .rail-subwrap, #bg, #page, .dock-peek, .page-ind, .pi-dots i, .nav-switch button, .stage figure, .phone { transition: none; }
  :root.nav-auto .rail { transition: none; }
  .btn:hover, .btn:active { transform: none; }
  .row:hover::after { transform: none; }
  .rv { opacity: 1; transform: none; transition: none; }
}
/* Повышенная контрастность: линии и серый текст ярче */
@media (prefers-contrast: more) {
  :root { --line: #6b7a74; --muted: #c4d0ca; --rail-muted: #dbe5e0; }
  .btn-ghost { --btn-line: var(--text); }
}
