/* Сайт NovaOCR. Оформление по мотивам iaea.org: цветная полоса меню, шапка с роликом,
   «таблетки»-кнопки, заголовки разделов с короткой цветной чертой, тёмный подвал. Шрифт Roboto лежит рядом (Apache-2.0). */

@font-face { font-family: "Roboto"; font-weight: 300; font-display: swap; src: url("../fonts/roboto-300.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url("../fonts/roboto-400.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url("../fonts/roboto-500.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url("../fonts/roboto-700.woff2") format("woff2"); }

/* Палитра. Светлая тема — тёплая, в жёлтых тонах, но матовая: бежевая бумага вместо белой, полоса меню — охра,
   кнопки — приглушённый янтарь с тёмным текстом, заголовки на шапке не чисто белые (яркий жёлтый и белый резали глаза). Тёмная — серо-синяя, без ярких пятен: полоса меню и объявление
   тёмные, кадр ролика притушен. Тёмную включает кнопка темы (data-theme на html) или, пока выбора нет, система. */
:root {
  --accent: #c9a54a;       /* кнопки, кружки шагов */
  --accent-dark: #b8953d;
  --on-accent: #2e2710;    /* текст на кнопке */
  --soft: #e9dfc2;         /* фон кода и заметок */
  --ink: #3a3424;
  --muted: #6f664f;
  --text-2: #585040;
  --line: #d9cfb4;
  --soft-line: #dfd6bd;
  --topbar-line: #ddd4bb;
  --step-line: #d3c494;
  --bg: #efe9d8;           /* фон страницы — бежевая бумага, не белая */
  --surface: #f6f1e3;      /* карточки, плитки, кнопки-контуры */
  --wash: #e7dfca;         /* полосы разделов через один */
  --link: #6f4e00;         /* ссылки и значки на фоне страницы */
  --bar: #c9a54a;          /* короткая черта под заголовком */
  --code-ink: #4a3b0c;
  --nav: #cab272;          /* полоса меню — матовая охра */
  --on-nav: #2e2710;
  --on-nav-line: rgba(46, 39, 16, .45);
  --on-nav-hover: rgba(46, 39, 16, .1);
  --nav-open: #c0a765;     /* раскрытое меню на узком экране */
  --nav-shadow: rgba(70, 55, 10, .18);
  --pill: #f4eedd; --pill-ink: #4f3a00;      /* светлая кнопка на цветной полосе */
  --band-a: #ddcf9f; --band-b: #e3d7ae; --on-band: #2e2710; --on-band-2: #4f4520;   /* полоса объявления */
  --hero-bg: #2a2008;      /* шапка с роликом: фон, вуаль над кадром, плашка под текстом */
  --veil-a: rgba(38, 28, 6, .82); --veil-b: rgba(38, 28, 6, .58); --veil-c: rgba(38, 28, 6, .25); --veil-m: rgba(38, 28, 6, .68);
  --panel: rgba(46, 34, 8, .66);
  --hero-1: #f4eedd; --hero-2: #eee4c9; --hero-3: #d9caa0; --bar-hero: #cab272;
  --hero-photo: sepia(.7) saturate(.85) brightness(.8);     /* ролик и кадр шапки — в тон палитре и притушены */
  --photo: none;           /* картинки в тексте */
  --foot: #2b2618; --foot-2: #221e12; --foot-ink: #b9b094; --pre-ink: #e9e2cf;
  --red: #e3342f;
  --radius: 10px;
  --wrap: 1180px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --accent: #2f628f; --accent-dark: #295680; --on-accent: #f1f4f7; --soft: #1e2a37; --ink: #cfd5dc; --muted: #8b96a2;
  --text-2: #a9b2bd; --line: #2c343f; --soft-line: #272f39; --topbar-line: #232a33; --step-line: #2e4257;
  --bg: #15191f; --surface: #1c222a; --wash: #191e25; --link: #8ab4d8; --bar: #4f86b5; --code-ink: #c7d8e8;
  --nav: #1a2a3b; --on-nav: #e3e8ee; --on-nav-line: rgba(227, 232, 238, .55); --on-nav-hover: rgba(255, 255, 255, .1);
  --nav-open: #16242f; --nav-shadow: rgba(0, 0, 0, .4); --pill: #d9e0e7; --pill-ink: #1d3a58;
  --band-a: #1c3148; --band-b: #213a55; --on-band: #e3e8ee; --on-band-2: #b5c1cd;
  --hero-bg: #0c1016; --veil-a: rgba(9, 13, 19, .86); --veil-b: rgba(9, 13, 19, .66); --veil-c: rgba(9, 13, 19, .42);
  --veil-m: rgba(9, 13, 19, .74); --panel: rgba(14, 20, 28, .7); --hero-1: #e6ebf0; --hero-2: #d5dde6; --hero-3: #a9b7c5; --bar-hero: #5f9cc0;
  --hero-photo: brightness(.82) saturate(.85); --photo: brightness(.88);
  --foot: #101317; --foot-2: #0c0f12; --foot-ink: #98a2ad; --pre-ink: #dfe5ea; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #2f628f; --accent-dark: #295680; --on-accent: #f1f4f7; --soft: #1e2a37; --ink: #cfd5dc; --muted: #8b96a2;
    --text-2: #a9b2bd; --line: #2c343f; --soft-line: #272f39; --topbar-line: #232a33; --step-line: #2e4257;
    --bg: #15191f; --surface: #1c222a; --wash: #191e25; --link: #8ab4d8; --bar: #4f86b5; --code-ink: #c7d8e8;
    --nav: #1a2a3b; --on-nav: #e3e8ee; --on-nav-line: rgba(227, 232, 238, .55); --on-nav-hover: rgba(255, 255, 255, .1);
    --nav-open: #16242f; --nav-shadow: rgba(0, 0, 0, .4); --pill: #d9e0e7; --pill-ink: #1d3a58;
    --band-a: #1c3148; --band-b: #213a55; --on-band: #e3e8ee; --on-band-2: #b5c1cd;
    --hero-bg: #0c1016; --veil-a: rgba(9, 13, 19, .86); --veil-b: rgba(9, 13, 19, .66); --veil-c: rgba(9, 13, 19, .42);
    --veil-m: rgba(9, 13, 19, .74); --panel: rgba(14, 20, 28, .7); --hero-1: #e6ebf0; --hero-2: #d5dde6; --hero-3: #a9b7c5; --bar-hero: #5f9cc0;
    --hero-photo: brightness(.82) saturate(.85); --photo: brightness(.88);
    --foot: #101317; --foot-2: #0c0f12; --foot-ink: #98a2ad; --pre-ink: #dfe5ea; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 500; }
h3 { font-size: 20px; font-weight: 500; }
p { margin: 0 0 1em; }
code, kbd, .kbd {
  font: 500 .92em/1.4 "DejaVu Sans Mono", Consolas, monospace; background: var(--soft); color: var(--code-ink);
  padding: .08em .4em; border-radius: 4px; white-space: nowrap;
}
pre {
  background: var(--foot); color: var(--pre-ink); padding: 18px 20px; border-radius: var(--radius); overflow-x: auto;
  font: 14px/1.6 "DejaVu Sans Mono", Consolas, monospace; margin: 0 0 1.4em;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 8px; z-index: 100; background: var(--bg); padding: 8px 12px; }

/* ── верхняя строка ─────────────────────────────────────────── */
.topbar { background: var(--bg); font-size: 13px; border-bottom: 1px solid var(--topbar-line); }

.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 32px; gap: 16px; }
.topbar a { color: var(--muted); }
.topbar nav a + a::before { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--line); margin: 0 10px; vertical-align: -1px; }
.topbar .lang b { color: var(--ink); font-weight: 700; }

/* ── полоса меню ─────────────────────────────────────────────── */
.navbar { background: var(--nav); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px var(--nav-shadow); }
.navbar .wrap { display: flex; align-items: center; min-height: 64px; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-nav); text-decoration: none !important; flex: none; }
.brand-tile { width: 44px; height: 44px; border-radius: 9px; background: var(--pill); display: grid; place-items: center; }
.brand-tile img { width: 38px; height: 38px; }
.brand-name { font-size: 25px; letter-spacing: -.2px; font-weight: 400; }
.brand-name b { font-weight: 700; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-left: 8px; min-width: 0; flex: 1; }
.nav a {
  color: var(--on-nav); text-transform: uppercase; font-size: 15px; font-weight: 500; letter-spacing: .02em;
  padding: 14px 10px; border-bottom: 3px solid transparent; text-decoration: none;
  white-space: normal; line-height: 1.2; text-align: center;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--on-nav); text-decoration: none; }
/* «Онлайн-демо» на широком экране есть в .topbar. В меню её не повторяем.
   Ниже 860px верхняя строка скрыта — ссылка появляется в открытом меню. */
.nav-demo { display: none; }
.nav-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
/* кнопка темы: полукруг — как в системе, солнце — светлая, луна — тёмная */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--on-nav-line); background: transparent;
  color: var(--on-nav); display: grid; place-items: center; cursor: pointer; padding: 0; transition: background .15s;
}
.theme-toggle:hover { background: var(--on-nav-hover); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; display: none; }
:root:not([data-theme]) .theme-toggle .ico-auto, :root[data-theme="light"] .theme-toggle .ico-light,
:root[data-theme="dark"] .theme-toggle .ico-dark { display: block; }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 24px; height: 2px; background: var(--on-nav); position: relative; margin: 0 auto; content: "";
}
.menu-toggle span::before { position: absolute; top: -7px; }
.menu-toggle span::after { position: absolute; top: 7px; }

/* ── кнопки-таблетки ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 10px 26px; font-weight: 500;
  font-size: 16px; line-height: 1.3; border: 1.5px solid var(--link); color: var(--link); background: var(--surface);
  text-decoration: none !important; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-fill { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-fill:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-white { background: var(--pill); color: var(--pill-ink); border-color: var(--pill); }
.btn-white:hover { background: var(--pill); color: var(--pill-ink); border-color: var(--pill); filter: brightness(.94); }
.btn-ghost { background: transparent; color: var(--hero-1); border-color: var(--hero-3); }
.btn-ghost:hover { background: var(--pill); color: var(--pill-ink); border-color: var(--pill); }
.btn small { font-weight: 400; opacity: .8; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.chev::after { content: "›"; font-size: 1.3em; line-height: 0; margin-left: 2px; }

/* ── шапка с роликом ─────────────────────────────────────────── */
.hero { position: relative; color: var(--hero-1); background: var(--hero-bg); overflow: hidden; min-height: 560px; display: flex; flex-direction: column; }
.hero video, .hero .poster { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: 1600 / 900; object-fit: cover; object-position: 72% 50%; filter: var(--hero-photo); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--veil-a) 0%, var(--veil-b) 45%, var(--veil-c) 75%);
}
.hero > .wrap { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; }
.hero-panel {
  max-width: 600px; background: var(--panel); backdrop-filter: blur(3px); border-radius: 16px;
  padding: 34px 38px 36px; margin: 48px 0 24px;
}
.hero-panel .kicker { font-weight: 300; font-size: 19px; margin: 0 0 2px; color: var(--hero-2); }
.hero-panel h1 { color: var(--hero-1); font-weight: 500; font-size: clamp(30px, 3.6vw, 42px); margin: 0 0 18px; }
.hero-panel .bar { width: 46px; height: 5px; background: var(--bar-hero); margin: 0 0 18px; }
.hero-panel p { font-size: 17px; color: var(--hero-2); margin-bottom: 26px; }
.hero-links { position: relative; z-index: 1; border-top: 1px solid rgba(255, 255, 255, .2); }
.hero-links .wrap { display: flex; flex-wrap: wrap; gap: 4px 34px; padding-top: 14px; padding-bottom: 16px; }
.hero-links a { color: var(--hero-1); font-size: 15px; }
.hero-toggle {
  position: absolute; right: 24px; bottom: 70px; z-index: 2; border: 1px solid rgba(255, 255, 255, .6); color: #fff;
  background: var(--panel); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; font-size: 14px;
}

/* ── синяя полоса объявления ─────────────────────────────────── */
.band { background: linear-gradient(90deg, var(--band-a), var(--band-b)); color: var(--on-band); }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 22px; flex-wrap: wrap; }
.band h2 { color: var(--on-band); font-size: 21px; font-weight: 500; margin: 0 0 2px; }
.band p { margin: 0; color: var(--on-band-2); font-size: 15px; }

/* ── разделы ─────────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-wash { background: var(--wash); }
.title-bar { margin-bottom: 34px; }
.title-bar h2 { margin-bottom: 0; }
.title-bar h2::after { content: ""; display: block; width: 42px; height: 5px; background: var(--bar); margin-top: 16px; }
.title-bar p { max-width: 760px; color: var(--muted); font-size: 17px; margin: 16px 0 0; }
.label { text-transform: uppercase; color: var(--link); font-size: 13px; font-weight: 500; letter-spacing: .04em; }
.label + .label::before { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--line); margin: 0 10px; vertical-align: -1px; }

.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature { padding: 4px 0; }
.feature .ico { width: 46px; height: 46px; color: var(--link); margin-bottom: 14px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-2); margin: 0; }

.story { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.story img { width: 100%; border-radius: 4px; display: block; filter: var(--hero-photo); }
.story h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; margin: 10px 0 16px; }
.story p { font-size: 17px; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 8px 0 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; padding: 0 18px 0 0; position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 14px; position: relative; z-index: 1;
}
.steps li::after { content: ""; position: absolute; left: 40px; right: 0; top: 19px; height: 2px; background: var(--step-line); }
.steps li:last-child::after { display: none; }
.steps b { display: block; color: var(--ink); font-weight: 500; font-size: 17px; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }
.steps-col { grid-template-columns: 1fr; gap: 14px; margin-bottom: 26px; }
.steps-col li { padding: 2px 0 0 56px; min-height: 40px; }
.steps-col li::before { position: absolute; left: 0; top: 0; margin: 0; }
.steps-col li::after { display: none; }

.numbers .tile {
  background: var(--surface); border: 4px solid var(--soft-line); border-radius: 16px; padding: 26px 26px 22px;
}
.numbers .big { font-size: 46px; font-weight: 700; color: var(--link); line-height: 1.05; display: block; margin-bottom: 8px; }
.numbers .tile span { color: var(--muted); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card .meta { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.card ul { padding-left: 1.1em; margin: 0 0 20px; }
.os-ico { width: 30px; height: 30px; color: var(--link); flex: none; }

/* ── заголовок внутренних страниц ────────────────────────────── */
/* верх разделов — как на главной: кадр ролика под той же тёмной вуалью, текст на той же полупрозрачной плашке */
.page-head { position: relative; overflow: hidden; color: var(--hero-1); padding: 40px 0 44px; background: var(--hero-bg); }
.page-head::before {
  content: ""; position: absolute; inset: 0; background: url(../media/hero-poster.jpg) 72% 50% / cover no-repeat;
  filter: var(--hero-photo);
}
.page-head::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--veil-a) 0%, var(--veil-b) 45%, var(--veil-c) 75%);
}
.page-head > .wrap { position: relative; z-index: 1; }
.head-panel { max-width: 760px; background: var(--panel); backdrop-filter: blur(3px); border-radius: 16px; padding: 28px 36px 30px; }
.crumbs { font-size: 14px; color: var(--hero-3); margin-bottom: 12px; }
.crumbs a { color: var(--hero-2); }
.page-head h1 { color: var(--hero-1); font-size: clamp(30px, 4vw, 44px); font-weight: 500; margin-bottom: 14px; }
.page-head .bar { width: 46px; height: 5px; background: var(--bar-hero); margin-bottom: 16px; }
.page-head p { max-width: 780px; color: var(--hero-2); font-size: 18px; margin: 0; }
.page-head p a { color: var(--hero-1); text-decoration: underline; text-underline-offset: 3px; }

/* ── текст руководства ───────────────────────────────────────── */
.doc { display: grid; grid-template-columns: 250px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: 88px; font-size: 15px; border-left: 3px solid var(--soft-line); padding-left: 16px; }
.toc b { display: block; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0 0 7px; }
.toc a { color: var(--ink); }
.toc a.active { color: var(--link); font-weight: 500; }
.prose { max-width: 820px; min-width: 0; }
.prose h2 { margin-top: 48px; padding-top: 6px; }
.prose h2:first-child { margin-top: 0; }
.prose h2::after { content: ""; display: block; width: 42px; height: 4px; background: var(--bar); margin-top: 12px; }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose figure { margin: 26px 0 30px; }
.prose figure img { width: 100%; border-radius: 6px; border: 1px solid var(--line); display: block; filter: var(--photo); }
.prose figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.note { background: var(--soft); border-left: 4px solid var(--bar); padding: 14px 18px; border-radius: 0 8px 8px 0; margin: 0 0 1.4em; }
.note p:last-child { margin: 0; }
table.keys { border-collapse: collapse; width: 100%; margin: 0 0 1.4em; font-size: 15px; }
table.keys th, table.keys td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.keys th { background: var(--wash); font-weight: 500; }
.table-scroll { overflow-x: auto; }
.pipeline { counter-reset: st; list-style: none; padding: 0 !important; }
.pipeline > li { counter-increment: st; position: relative; padding-left: 58px; margin-bottom: 26px !important; }
.pipeline > li::before {
  content: counter(st); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; display: grid; place-items: center;
}
.pipeline > li > b { display: block; font-size: 18px; font-weight: 500; margin-bottom: 4px; color: var(--ink); }
.sha { font: 12.5px/1.4 "DejaVu Sans Mono", Consolas, monospace; color: var(--muted); word-break: break-all; }

/* ── подвал ──────────────────────────────────────────────────── */
.footer { background: var(--foot); color: var(--foot-ink); font-size: 15px; }
.footer .cols { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; padding: 56px 24px 46px; }
.footer h4 { color: #f4f1e8; font-size: 18px; font-weight: 500; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--foot-ink); }
.footer a:hover { color: #fff; }
.footer .brand { margin-bottom: 14px; }
.subfoot { background: var(--foot-2); }
.subfoot .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 20px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: 14px; }
.foot-visits { color: var(--foot-ink); white-space: nowrap; }
.foot-visits strong { color: var(--pre-ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.foot-visits.is-live strong { animation: foot-pop .45s ease; }
@keyframes foot-pop { from { opacity: .25; } to { opacity: 1; } }

/* ── узкие экраны ────────────────────────────────────────────── */
@media (max-width: 1020px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 18px; }
  .steps li { padding: 0 0 0 56px; }
  .steps li::before { position: absolute; left: 0; top: 0; }
  .steps li::after { display: none; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .menu-toggle { display: block; }
  .nav, .nav-cta { display: none; }
  .navbar.open .nav {
    display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--nav-open);
    padding: 8px 0 14px; margin: 0; flex-wrap: nowrap;
  }
  .navbar.open .nav a { padding: 12px 24px; border: 0; white-space: normal; text-align: left; }
}
@media (max-width: 860px) {

  .grid-3, .grid-2, .story { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .hero { min-height: 520px; }
  .hero-panel { padding: 26px 22px 28px; }
  .hero::after, .page-head::after { background: var(--veil-m); }
  .head-panel { padding: 22px 20px 24px; }
  .topbar nav { display: none; }
  .navbar.open .nav a.nav-demo { display: block; }
  .subfoot .wrap { gap: 8px 16px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr; padding: 40px 16px 30px; }
  .subfoot .wrap { flex-direction: column; align-items: flex-start; gap: 6px; }
  .foot-visits { white-space: normal; }
  .brand-name { font-size: 22px; }
  .section { padding: 52px 0; }
  .hero-toggle {
    display: grid; place-items: center; width: 32px; height: 32px; right: 10px; top: 10px; bottom: auto;
    font-size: 12px; padding: 0;
  }
}
/* ролик в шапке не запускается сам, если в системе включено «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
