/* ============================================================================
   Dracon Draw — дизайн-система v2 (S5, 07.09.2026)
   Тёмная инженерная тема по умолчанию, светлая — по переключателю (html[data-theme]).
   ВСЕ параметры темы и акцентов — в блоке токенов ниже. Шрифты локальные, без CDN:
   Inter (текст), Unbounded (заголовки H1–H2 и крупные числа; S6, решение заказчика 07.09.2026),
   JetBrains Mono (подписи, числа, факты), osifont (графы основной надписи, ГОСТ 2.304).
   Лицензии — в /static/fonts/. Unbounded — переменная гарнитура 200–900 (SIL OFL 1.1),
   файлы woff2 по подмножествам скачаны с Google Fonts (fonts.gstatic.com/s/unbounded/v12/…),
   текст лицензии — из репозитория гарнитуры github.com/googlefonts/unbounded (OFL.txt).
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-Italic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/Inter-SemiBold.otf") format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("/static/fonts/Unbounded-var-cyrillic-ext.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Unbounded"; src: url("/static/fonts/Unbounded-var-cyrillic.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url("/static/fonts/Unbounded-var-latin.woff2") format("woff2"); font-weight: 200 900; font-display: swap; 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"; src: url("/static/fonts/JetBrainsMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/JetBrainsMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "osifont"; src: url("/static/fonts/osifont-lgpl3fe.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "osifont"; src: url("/static/fonts/osifont-italic.ttf") format("truetype"); font-style: italic; font-display: swap; }

/* ---------- ТОКЕНЫ: тёмная тема (по умолчанию) ---------- */
:root {
  color-scheme: dark;
  --bg: #0b0e14;            /* графит / чернильно-синий */
  --bg-1: #10151e;          /* поверхности: карточки, шапка */
  --bg-2: #161d29;
  --bg-3: #1e2736;
  --ink: #eef1f6;
  --ink-2: #a7b0bf;
  --ink-3: #6e7a8e;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .17);
  --accent: #4f8dff;        /* кобальт — цвет линий чертежа */
  --accent-2: #2f6ef2;
  --accent-soft: rgba(79, 141, 255, .14);
  --accent-ink: #cfe0ff;
  --cta: #ff8a3d;           /* единственный тёплый акцент — кнопка действия */
  --cta-hover: #ffa15e;
  --cta-ink: #1a0f06;
  --ok: #3ccf8e;
  --warn: #f5b942;
  --bad: #ff6b6b;
  --paper: #ffffff;         /* лист чертежа всегда белый */
  --paper-shadow: 0 30px 80px -24px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .07);
  --glow: rgba(79, 141, 255, .18);
  --radius: 6px;
  --radius-lg: 14px;
  --maxw: 1240px;
  --font: "Inter", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Unbounded", "Inter", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --font-gost: "osifont", var(--font);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
}
/* ---------- ТОКЕНЫ: светлая тема ---------- */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f9;
  --bg-1: #ffffff;
  --bg-2: #eaeef5;
  --bg-3: #dfe5ee;
  --ink: #0f141c;
  --ink-2: #465066;
  --ink-3: #7b8597;
  --line: rgba(15, 25, 45, .10);
  --line-2: rgba(15, 25, 45, .20);
  --accent: #1f5fe0;
  --accent-2: #174bb8;
  --accent-soft: rgba(31, 95, 224, .10);
  --accent-ink: #123a8a;
  --cta: #ea6a1a;
  --cta-hover: #f37c31;
  --cta-ink: #ffffff;
  --ok: #1f8f5f;
  --warn: #a86b00;
  --bad: #c43d3d;
  --paper-shadow: 0 24px 60px -24px rgba(15, 30, 60, .35), 0 0 0 1px rgba(15, 25, 45, .08);
  --glow: rgba(31, 95, 224, .12);
  --shadow-1: 0 1px 2px rgba(15, 25, 45, .06), 0 12px 32px -16px rgba(15, 25, 45, .18);
}

/* ---------- базовые правила ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--cta); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 0 0 .5em; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, .9rem + 3.4vw, 3.9rem); line-height: 1.02; }
h2 { font-size: clamp(1.5rem, 1rem + 1.7vw, 2.35rem); line-height: 1.12; }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; }
small, .muted { color: var(--ink-2); }
.tiny { font-size: .85rem; }
.mono, code { font-family: var(--font-mono); font-size: .9em; }
.label { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-weight: 500; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.narrow { max-width: 760px; }
.lead { font-size: clamp(1.05rem, .95rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 36em; }
.intro { max-width: 40em; font-size: 1.1rem; color: var(--ink-2); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--cta); color: var(--cta-ink); padding: 8px 14px; border-radius: var(--radius); z-index: 100; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: .95rem; padding: 11px 20px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-3); color: var(--ink); text-decoration: none; cursor: pointer; line-height: 1.2; transition: background .2s, border-color .2s, color .2s, transform .15s; white-space: nowrap; }
.btn:hover { background: var(--bg-2); border-color: var(--ink-3); color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--cta); border-color: var(--cta); color: var(--cta-ink); }
.btn-cta:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-ink); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-outline { background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-2); color: var(--ink); }
.btn-lg { font-size: 1.05rem; padding: 15px 26px; border-radius: 8px; }
.btn-sm { font-size: .85rem; padding: 7px 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-danger { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn-danger:hover { background: var(--bad); color: #fff; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 18px; min-height: 64px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; text-decoration: none; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand b { color: var(--accent); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a, .nav .link-btn { color: var(--ink-2); text-decoration: none; font-size: .92rem; padding: 8px 12px; border-radius: var(--radius); }
.nav a:hover, .nav .link-btn:hover { color: var(--ink); background: var(--bg-2); text-decoration: none; }
.nav a.active { color: var(--ink); }
.nav form { margin: 0; }
.nav .btn { color: var(--cta-ink); background: var(--cta); border-color: var(--cta); margin-left: 8px; padding: 8px 14px; font-size: .88rem; }
.nav .btn:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-ink); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; margin-left: 6px; }
.theme-toggle:hover { color: var(--ink); background: var(--bg-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: block; }
html[data-theme="light"] .theme-toggle .i-moon { display: none; }
.nav-toggle { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- секции ---------- */
.section { padding: clamp(64px, 8vw, 120px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: auto 1fr; gap: 14px 22px; align-items: baseline; margin-bottom: clamp(24px, 3vw, 40px); }
.section-head .idx { font-family: var(--font-mono); color: var(--accent); font-size: .85rem; letter-spacing: .14em; }
.section-head h2 { margin: 0; }
.section-head .intro { grid-column: 2; margin: 4px 0 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.list-dash { list-style: none; padding: 0; margin: 0; }
.list-dash li { padding: 10px 0 10px 26px; position: relative; border-bottom: 1px solid var(--line); color: var(--ink); }
.list-dash li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-family: var(--font-mono); }
.col-title { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.col-title.is-service { color: var(--accent); }
.col-title.is-engineer { color: var(--cta); }
.statement { font-size: clamp(1.15rem, 1rem + .8vw, 1.6rem); font-weight: 600; letter-spacing: -.015em; max-width: 30em; margin-top: 36px; line-height: 1.35; }
.statement em { color: var(--accent); font-style: normal; }

/* ---------- появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; } .reveal[data-delay="2"] { transition-delay: .2s; } .reveal[data-delay="3"] { transition-delay: .3s; }

/* ============================================================================
   ГЕРОЙ (S6): тексты + зона загрузки; концепт A «живой конвейер» (по умолчанию),
   концепт B «до/после в цифрах» (?hero=b). Листа чертежа на первом экране нет.
   ========================================================================== */
.hero { position: relative; padding: clamp(36px, 5vw, 76px) 0 clamp(40px, 5vw, 72px); overflow: hidden; }
.hero::before { content: ""; position: absolute; right: -10%; top: -10%; width: 70%; height: 120%; background: radial-gradient(closest-side, var(--glow), transparent 72%); pointer-events: none; }
.hero .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.eyebrow { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 22px; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }
.hero h1 { margin-bottom: .3em; }
.hero-sub { font-size: clamp(1.25rem, .95rem + 1.2vw, 1.9rem); font-weight: 600; letter-spacing: -.02em; color: var(--accent); margin: 0 0 18px; line-height: 1.15; }
.hero .lead { margin-bottom: 0; }
.hero .note { font-style: italic; color: var(--ink-3); font-size: .9rem; max-width: 36em; margin: 16px 0 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 22px; }

/* ---------- зона загрузки в герое: файл уходит сразу после выбора или перетаскивания ---------- */
.hero-form { margin: 24px 0 0; }
.dz { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; padding: 16px 18px; border: 1.5px dashed var(--line-2); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--bg-1) 85%, transparent); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.dz:hover, .dz.drag, body.is-dragging .dz { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
body.is-dragging .dz { border-style: solid; }
.dz.busy { cursor: progress; }
.dz input[type=file] { display: none; }
.dz .dz-ico { width: 42px; height: 42px; color: var(--accent); flex: none; }
.dz-body { display: grid; gap: 3px; min-width: 0; }
.dz-body strong { font-size: 1rem; line-height: 1.3; color: var(--ink); }
.dz-body span { font-size: .84rem; color: var(--ink-3); line-height: 1.4; }
.dz .file-name { font-family: var(--font-mono); font-size: .8rem; color: var(--accent-ink); }
.dz .file-name:empty { display: none; }
.dz .progress { grid-column: 1 / -1; margin-top: 4px; }
.dz-status { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-2); }
.dz-status:empty { display: none; }
.hero-form .hero-cta { margin: 14px 0 0; align-items: center; }
.hero-legal { margin: 10px 0 0; font-size: .78rem; color: var(--ink-3); line-height: 1.4; }
.hero-legal a { color: var(--ink-2); }
.samples { position: relative; }
.samples > summary { list-style: none; }
.samples > summary::-webkit-details-marker { display: none; }
.samples[open] > summary { border-color: var(--accent); color: var(--ink); }
.samples-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; min-width: 300px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius-lg); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); padding: 8px; display: grid; gap: 2px; }
/* M2: пункты меню примеров — кнопки отправки формы (POST + CSRF), а не ссылки; вид прежний */
.samples-menu a, .samples-menu button { padding: 10px 12px; border-radius: var(--radius); color: var(--ink); font-weight: 500; }
.samples-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; }
.samples-menu a:hover, .samples-menu button:hover { background: var(--bg-2); text-decoration: none; color: var(--ink); }
.samples-menu small { padding: 8px 12px 4px; color: var(--ink-3); font-size: .78rem; line-height: 1.4; border-top: 1px solid var(--line); margin-top: 4px; }
.samples.open-up .samples-menu { top: auto; bottom: calc(100% + 8px); box-shadow: 0 -16px 50px rgba(0, 0, 0, .35); }

/* ---------- подтверждение файла, перетащенного в любое место страницы (S9, H5) ---------- */
dialog.drop-confirm { border: 1px solid var(--line-2); border-radius: var(--radius-lg); background: var(--bg-1); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 32px)); max-width: none; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
dialog.drop-confirm::backdrop { background: rgba(6, 8, 12, .72); }
dialog.drop-confirm[open] { animation: dc-in .25s var(--ease); }
@keyframes dc-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.drop-confirm-body { padding: 24px 28px 26px; display: grid; gap: 8px; margin: 0; }
.drop-confirm-body .label { margin: 0; }
.drop-confirm-title { font-family: var(--font); font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.drop-confirm-title b { font-family: var(--font-mono); font-weight: 500; color: var(--accent-ink); }
.drop-confirm-meta { margin: 0; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.drop-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- концепт A: панель «живого конвейера» ---------- */
.conveyor { position: relative; aspect-ratio: 6 / 5; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-1) radial-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 24px 24px; box-shadow: var(--shadow-1); overflow: hidden; }
.cv-part { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s .6s; }
.cv-part.is-current { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
.cv-model { position: absolute; left: 60%; top: 50%; width: 36%; height: 34%; object-fit: contain; transform-origin: center; opacity: 0; filter: drop-shadow(0 26px 26px rgba(0, 0, 0, .55)); transition: transform 1.4s var(--ease), opacity .7s var(--ease); will-change: transform; z-index: 2; pointer-events: none; }
.cv-part.is-model .cv-model { opacity: 1; }
.cv-svg { position: absolute; overflow: visible; --u: 1; z-index: 1; }
.cv-view { opacity: 0; transform-box: fill-box; transform-origin: center; transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(.25); transition: transform 1.3s var(--ease), opacity .7s var(--ease); transition-delay: calc(var(--i) * .35s); }
.cv-part.is-views .cv-view { opacity: 1; transform: none; }
.cv-svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.l-contour { stroke: var(--ink); stroke-width: calc(1.5px * var(--u)); }
.l-marks { stroke: var(--ink); stroke-width: calc(1.3px * var(--u)); }
.l-axis { stroke: var(--accent); stroke-width: calc(.8px * var(--u)); }
.l-hatch { stroke: var(--ink-3); stroke-width: calc(.6px * var(--u)); opacity: 0; transition: opacity .9s var(--ease); transition-delay: calc(var(--i) * .35s + 1.2s); }
.cv-part.is-views .l-hatch { opacity: .9; }
.cv-draw { stroke-dasharray: var(--len, 0); stroke-dashoffset: var(--len, 0); transition: stroke-dashoffset 1.9s var(--ease); transition-delay: calc(var(--i) * .35s + .15s); }
.cv-part.is-views .cv-draw { stroke-dashoffset: 0; }
.cv-dims { opacity: 0; transition: opacity .9s var(--ease); }
.cv-part.is-dims .cv-dims { opacity: 1; }
.l-dim { stroke: var(--accent); stroke-width: calc(.75px * var(--u)); }
.l-arrow { fill: var(--accent) !important; stroke: none; }
.t-dim { fill: var(--accent-ink); font-family: var(--font-mono); }
.t-label { fill: var(--ink); font-family: var(--font-mono); }
.cv-tag { position: absolute; left: 14px; top: 12px; z-index: 3; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .08em; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent); padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity .5s; white-space: nowrap; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis; }
.cv-part.is-model .cv-tag { opacity: 1; }
.cv-facts { position: absolute; left: 14px; right: 14px; bottom: 42px; margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; z-index: 3; }
.cv-facts li { font-family: var(--font-mono); font-size: .74rem; line-height: 1.3; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: color-mix(in srgb, var(--bg-1) 90%, transparent); color: var(--ink-2); opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--k) * .18s); }
.cv-part.is-facts .cv-facts li { opacity: 1; transform: none; }
.cv-facts b { color: var(--ink); font-weight: 500; }
.cv-facts li.is-note { border-color: rgba(255, 138, 61, .5); }
.cv-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3); letter-spacing: .04em; background: color-mix(in srgb, var(--bg-1) 78%, transparent); border-top: 1px solid var(--line); }
.cv-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-nav { display: flex; gap: 6px; flex: none; }
.cv-nav button { width: 22px; height: 10px; border-radius: 5px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; padding: 0; transition: background .3s, border-color .3s; }
.cv-nav button:hover { border-color: var(--ink-2); }
.cv-nav button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }

/* ---------- концепт B: типографика в цифрах, лента деталей ---------- */
.hero-b .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.hero-side { padding-top: clamp(20px, 5vw, 96px); }
.hero-side .hero-form { margin: 0; }
.big { position: relative; min-height: 190px; margin: 28px 0 8px; }
.big-item { position: absolute; inset: 0; opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.big-item.is-on { opacity: 1; transform: none; }
.big-n { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 2rem + 7.5vw, 8rem); line-height: .95; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.big-n small { font-size: clamp(1rem, .85rem + .8vw, 1.35rem); font-family: var(--font); font-weight: 500; color: var(--accent); letter-spacing: -.01em; max-width: 14em; line-height: 1.25; }
.big-line { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-2); margin-top: 14px; letter-spacing: .02em; }
.big-line b { color: var(--ink); font-weight: 500; }
.strip { margin-top: clamp(28px, 4vw, 56px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 18px 0 14px; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip-track { display: flex; gap: clamp(28px, 4vw, 64px); width: max-content; animation: strip 56s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip figure { margin: 0; width: 150px; text-align: center; flex: none; }
.strip img { height: 92px; width: 150px; object-fit: contain; filter: drop-shadow(0 16px 16px rgba(0, 0, 0, .45)); }
.strip figcaption { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-3); margin-top: 8px; letter-spacing: .04em; white-space: nowrap; }
@keyframes strip { to { transform: translateX(-50%); } }

/* ============================================================================
   КОНВЕЙЕР «Как это работает»
   ========================================================================== */
.pipe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); position: relative; list-style: none; margin: 0; padding: 0; }
.pipe::before { content: ""; position: absolute; left: 4%; right: 4%; top: 15px; height: 1px; background: var(--line-2); }
.pipe-step { position: relative; padding-top: 34px; cursor: pointer; }
.pipe-step::before { content: ""; position: absolute; left: 50%; top: 9px; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); transform: translateX(-50%); transition: border-color .3s, background .3s, box-shadow .3s; }
.pipe-step.on::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.pipe-bar { position: absolute; left: 50%; top: 15px; height: 1px; width: 0; background: var(--accent); z-index: 1; transition: width .2s linear; pointer-events: none; }
.pipe-step.on .pipe-bar { width: calc(100% + clamp(14px, 2vw, 24px)); transition: width var(--pipe-ms, 3.6s) linear; }
.pipe-step:last-child .pipe-bar { display: none; }
.pipe-frame { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-1); box-shadow: var(--shadow-1); transition: border-color .3s, transform .4s var(--ease); }
.pipe-step.on .pipe-frame { border-color: var(--accent); transform: translateY(-4px); }
.pipe-frame.is-viewport { background: var(--bg-2) radial-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 22px 22px; }
.pipe-frame.is-paper { background: var(--paper); }
.pipe-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.pipe-frame.is-paper img { padding: 6%; }
.pipe-frame .corner { position: absolute; left: 10px; top: 10px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: var(--ink-3); background: color-mix(in srgb, var(--bg-1) 80%, transparent); padding: 3px 7px; border-radius: 4px; z-index: 2; }
.pipe-frame.is-paper .corner { color: #52607a; background: rgba(255, 255, 255, .85); }
.pipe-callouts { position: absolute; right: 10px; bottom: 10px; left: 10px; margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; z-index: 2; }
.pipe-callouts li { font-family: var(--font-mono); font-size: .68rem; color: var(--accent-ink); background: color-mix(in srgb, var(--bg-1) 88%, transparent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 8px; opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.pipe-step.on .pipe-callouts li, .pipe-step.seen .pipe-callouts li { opacity: 1; transform: none; }
.pipe-step.on .pipe-callouts li:nth-child(2) { transition-delay: .25s; } .pipe-step.on .pipe-callouts li:nth-child(3) { transition-delay: .5s; } .pipe-step.on .pipe-callouts li:nth-child(4) { transition-delay: .75s; } .pipe-step.on .pipe-callouts li:nth-child(5) { transition-delay: 1s; }
.pipe-frame .wipe { position: absolute; inset: 0; background: color-mix(in srgb, var(--paper) 90%, transparent); transform-origin: right; transition: transform 1.4s var(--ease); z-index: 1; }
.pipe-step.on .pipe-frame .wipe, .pipe-step.seen .pipe-frame .wipe { transform: scaleX(0); }
.pipe-text { margin-top: 18px; }
.pipe-text .n { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; color: var(--accent); margin-bottom: 8px; }
.pipe-text h3 { font-size: 1.15rem; margin: 0 0 8px; }
.pipe-text p { color: var(--ink-2); margin: 0; font-size: .95rem; }

/* ============================================================================
   ГАЛЕРЕЯ «Что получается»
   ========================================================================== */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.5vw, 32px); }
.gcard { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-1); transition: border-color .3s, transform .4s var(--ease); }
.gcard:hover { border-color: var(--line-2); transform: translateY(-3px); }
.gcard-visual { position: relative; }
.gcard-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2) radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px; display: grid; place-items: center; padding: clamp(14px, 2.5vw, 28px); cursor: zoom-in; }
.gcard-media .sheet { max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: var(--paper-shadow); border-radius: 3px; transition: transform .6s var(--ease), opacity .5s var(--ease), filter .5s; }
.gcard-media .part { position: absolute; inset: 0; margin: auto; max-width: 68%; max-height: 68%; object-fit: contain; opacity: 0; transform: translateY(12px) scale(.94); transition: opacity .5s var(--ease), transform .6s var(--ease); pointer-events: none; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .5)); }
.gcard-visual:hover .sheet, .gcard.show-3d .sheet { transform: scale(.94); opacity: .22; filter: blur(1px); }
.gcard-visual:hover .part, .gcard.show-3d .part { opacity: 1; transform: none; }
.gcard-fmt { position: absolute; left: 12px; top: 12px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; color: var(--ink-2); background: color-mix(in srgb, var(--bg-1) 85%, transparent); border: 1px solid var(--line-2); padding: 4px 8px; border-radius: 4px; }
.gcard-3d { position: absolute; right: 12px; top: 12px; font: inherit; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; padding: 4px 9px; border-radius: 4px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg-1) 85%, transparent); color: var(--ink-2); cursor: pointer; }
.gcard-3d:hover, .gcard.show-3d .gcard-3d { color: var(--ink); border-color: var(--accent); }
.gcard-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.gcard-body h3 { margin: 0; font-size: 1.3rem; }
.gcard-meta { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-3); letter-spacing: .02em; }
.gcard-views { color: var(--ink-2); font-size: .95rem; margin: 0; }
.gcard-todo { margin: 6px 0 0; padding: 12px 14px; border-left: 2px solid var(--cta); background: var(--bg-2); border-radius: 0 var(--radius) var(--radius) 0; font-size: .92rem; color: var(--ink-2); }
.gcard-todo b { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; font-size: .8rem; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.gcard-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-3); flex-wrap: wrap; }

/* ---------- лайтбокс с зумом ---------- */
dialog.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: rgba(6, 8, 12, .94); color: #eef1f6; overflow: hidden; }
dialog.lightbox::backdrop { background: rgba(6, 8, 12, .8); }
.lb-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: linear-gradient(rgba(6, 8, 12, .9), rgba(6, 8, 12, 0)); font-size: .9rem; flex-wrap: wrap; }
.lb-title { font-weight: 600; margin-right: auto; display: flex; flex-direction: column; line-height: 1.25; }
.lb-title small { font-family: var(--font-mono); font-size: .74rem; color: #a7b0bf; font-weight: 400; letter-spacing: .04em; }
.lb-bar button { font: inherit; font-family: var(--font-mono); font-size: .8rem; color: #eef1f6; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); border-radius: 6px; padding: 7px 11px; cursor: pointer; }
.lb-bar button:hover { background: rgba(255, 255, 255, .16); }
.lb-zoom { min-width: 60px; text-align: center; font-family: var(--font-mono); font-size: .8rem; color: #a7b0bf; }
.lb-view { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; }
.lb-view.dragging { cursor: grabbing; }
.lb-view img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; user-select: none; -webkit-user-drag: none; background: #fff; box-shadow: 0 40px 100px rgba(0, 0, 0, .6); border-radius: 2px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(6, 8, 12, .6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255, 255, 255, .15); }
.lb-nav[hidden] { display: none; }
.lb-nav svg { width: 20px; height: 20px; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-family: var(--font-mono); font-size: .72rem; color: #a7b0bf; letter-spacing: .06em; pointer-events: none; }

/* ============================================================================
   ПАСПОРТ КАЧЕСТВА
   ========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 22px); margin-bottom: clamp(28px, 4vw, 48px); }
.stat { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 22px 20px; box-shadow: var(--shadow-1); }
.stat .v { font-family: var(--font-display); font-size: clamp(1.8rem, 1.2rem + 1.7vw, 3rem); font-weight: 600; letter-spacing: -.02em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .v small { font-size: .45em; color: var(--accent); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.stat .t { margin-top: 10px; color: var(--ink-2); font-size: .92rem; line-height: 1.45; }
.stat .s { margin-top: 10px; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; color: var(--ink-3); }
.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 20px); }
.rule { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.rule .std { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em; color: var(--accent); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rule .std span { color: var(--ink-3); }
.rule h4 { margin: 0; font-size: 1rem; line-height: 1.35; }
.rule blockquote { margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line-2); color: var(--ink-2); font-style: italic; font-size: .9rem; line-height: 1.5; }
.passport-note { margin-top: 22px; color: var(--ink-3); font-size: .85rem; max-width: 60em; }

/* ============================================================================
   МАТРИЦА ПРИМЕНИМОСТИ, ЦЕНЫ, БЕЗОПАСНОСТЬ, ПРЕДПРИЯТИЯ
   ========================================================================== */
.matrix { max-width: 960px; }
.matrix td { padding: 14px 12px; font-size: 1rem; }
.matrix td:last-child { white-space: nowrap; font-family: var(--font-mono); font-size: .82rem; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; background: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.status-ok { color: var(--ok); } .status-ok .dot { background: var(--ok); }
.status-part { color: var(--warn); } .status-part .dot { background: var(--warn); }
.status-out { color: var(--bad); } .status-out .dot { background: var(--bad); }
.status-unknown { color: var(--ink-3); }

.free { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); font-weight: 600; letter-spacing: -.02em; margin: 0 0 22px; }
.free em { color: var(--ok); font-style: normal; }
.price-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.price { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 14px 16px; text-align: center; }
.price .f { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em; color: var(--ink-3); }
.price .p { font-size: clamp(1.4rem, 1rem + 1.2vw, 2rem); font-weight: 600; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-table { max-width: 460px; }
.price-table td { font-size: 1.1rem; padding: 12px 10px; }
.price-table td:first-child { font-family: var(--font-mono); font-size: .95rem; letter-spacing: .08em; }
.price-table td.num { font-weight: 600; font-size: 1.25rem; }

.sec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sec { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.sec .k { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); letter-spacing: .1em; padding-top: 3px; }
.sec p { margin: 0; color: var(--ink); }

.enterprise { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: start; }
.enterprise .from { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); font-weight: 600; letter-spacing: -.03em; margin: 0 0 6px; }
.enterprise .from small { display: block; font-size: .8rem; font-family: var(--font-mono); color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; font-weight: 400; margin-bottom: 8px; }

/* ============================================================================
   ПОДВАЛ — как основная надпись
   ========================================================================== */
.title-block { margin-top: clamp(48px, 6vw, 96px); border-top: 1px solid var(--line-2); background: var(--bg-1); }
.tb-grid { display: grid; grid-template-columns: 2fr 1.4fr 1.4fr 1.2fr; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-top: 28px; }
.tb-cell { padding: 12px 14px 14px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); font-size: .85rem; min-height: 84px; color: var(--ink-2); }
.tb-cell:nth-child(4n) { border-right: 0; }
.tb-cell .lbl { font-family: var(--font-gost); font-size: .74rem; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; display: block; margin-bottom: 5px; }
.tb-cell a { color: var(--ink); }
.tb-wide { grid-column: span 2; }
.tb-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding: 14px 0 22px; font-family: var(--font-mono); font-size: .74rem; color: var(--ink-3); letter-spacing: .04em; }

/* ============================================================================
   ФОРМЫ, СООБЩЕНИЯ, СТРАНИЦЫ
   ========================================================================== */
.form { display: grid; gap: 16px; max-width: 560px; }
.panel { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-1); }
.form-row { display: grid; gap: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
label { font-size: .88rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], textarea, select { font: inherit; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); color: var(--ink); width: 100%; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { min-height: 130px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 4px; accent-color: var(--accent); }
.errors { border: 1px solid var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); padding: 12px 16px; margin-bottom: 14px; border-radius: var(--radius); }
.errors ul { margin: 0; padding-left: 18px; }
.help { font-size: .82rem; color: var(--ink-3); }
details summary { cursor: pointer; color: var(--accent); font-size: .92rem; }
details[open] summary { margin-bottom: 8px; }

.dropzone { border: 1.5px dashed var(--line-2); background: var(--bg-1); padding: 40px 20px; text-align: center; border-radius: var(--radius-lg); cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type=file] { display: none; }
.dropzone .file-name { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-2); margin-top: 8px; min-height: 1.2em; }
.dropzone svg { width: 36px; height: 36px; color: var(--accent); margin: 0 auto 12px; display: block; }
.progress { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress.indeterminate > span { width: 30%; animation: slide 1.4s infinite ease-in-out; }
@keyframes slide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

.flash { max-width: var(--maxw); margin: 14px auto 0; padding: 12px 18px; border: 1px solid var(--line-2); background: var(--bg-1); border-radius: var(--radius); font-size: .95rem; }
.flash-ok { border-color: var(--ok); }
.flash-error { border-color: var(--bad); color: var(--bad); }
.notice { border: 1px solid var(--line-2); background: var(--bg-1); padding: 14px 18px; margin: 0 0 16px; border-radius: var(--radius); }
.notice-warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--bg-1)); }
.notice-bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, var(--bg-1)); }
.notice-ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--bg-1)); }
.notice-info { border-color: var(--accent); background: var(--accent-soft); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: clamp(32px, 5vw, 64px) 0 clamp(20px, 3vw, 32px); }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); margin-bottom: .15em; }
.page-head .lead { margin: 0; }
.badge { display: inline-block; font-family: var(--font-mono); font-size: .78rem; padding: 4px 10px; border: 1px solid; border-radius: 999px; letter-spacing: .06em; }
.badge-queued, .badge-running { border-color: var(--accent); color: var(--accent); }
.badge-done { border-color: var(--ok); color: var(--ok); }
.badge-failed, .badge-timeout { border-color: var(--bad); color: var(--bad); }
.badge-expired { border-color: var(--ink-3); color: var(--ink-3); }
.tag { display: inline-block; font-family: var(--font-mono); font-size: .74rem; padding: 3px 9px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); letter-spacing: .04em; }
.tag-ok { border-color: var(--ok); color: var(--ok); }
.tag-warn { border-color: var(--warn); color: var(--warn); }
.tag-bad { border-color: var(--bad); color: var(--bad); }
.tag-info { border-color: var(--accent); color: var(--accent); }

.sheet { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(20px, 3vw, 40px); margin-bottom: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.preview { margin: 0; background: var(--bg-2) radial-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(14px, 2vw, 28px); display: grid; place-items: center; }
.preview img { max-width: 100%; box-shadow: var(--paper-shadow); border-radius: 3px; cursor: zoom-in; }
.preview figcaption { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-3); padding: 12px 2px 0; letter-spacing: .06em; justify-self: start; }
.report h3 { font-size: .8rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--line-2); padding-bottom: 8px; margin: 26px 0 12px; }
.report h3:first-child { margin-top: 0; }
.report h4 { font-size: .95rem; margin: 14px 0 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: .95rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.rlist { margin: 0; padding-left: 18px; font-size: .92rem; color: var(--ink-2); }
.rlist li { margin-bottom: 5px; }
.rlist-bad li::marker { color: var(--bad); }
.rlist-warn li::marker { color: var(--warn); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.dl-links { display: flex; flex-wrap: wrap; gap: 8px; }
.waiting { border: 1px solid var(--line); background: var(--bg-1); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 48px); text-align: center; margin: 20px 0; }
.waiting h2 { font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); }
.waiting .progress { max-width: 420px; margin: 20px auto 0; }
.dim-texts { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-2); word-spacing: .4em; line-height: 1.9; }

.jobs-table td { font-size: .93rem; }
.jobs-table .file { font-family: var(--font-mono); font-size: .85rem; }
.empty { border: 1px dashed var(--line-2); padding: 48px 24px; text-align: center; color: var(--ink-2); background: var(--bg-1); border-radius: var(--radius-lg); }

.doc { max-width: 780px; }
.doc h2 { font-size: 1.5rem; margin-top: 2em; }
.doc h3 { font-size: 1.1rem; margin-top: 1.6em; }
.doc .draft { border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, var(--bg-1)); padding: 12px 16px; font-size: .9rem; margin-bottom: 24px; border-radius: var(--radius); }
.doc table { max-width: 640px; }
/* юридические документы (S8-legal): шапка с редакцией, оглавление, реквизиты, индекс */
.doc-head { align-items: flex-start; }
.doc-meta { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .03em; color: var(--ink-3); margin: 8px 0 0; }
.doc h2 { scroll-margin-top: 84px; }
.doc .toc { columns: 2; column-gap: 28px; padding-left: 20px; margin: 0 0 8px; font-size: .92rem; line-height: 1.5; }
.doc .toc li { break-inside: avoid; padding: 2px 0; }
.doc .toc a { color: var(--ink-2); }
.doc .req { max-width: 640px; }
.doc .req dt { white-space: nowrap; }
.doc .quote { border-left: 2px solid var(--accent); padding: 2px 0 2px 14px; color: var(--ink); margin: 14px 0; }
.doc-list { display: grid; gap: 14px; max-width: 860px; }
.doc-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 22px; align-items: start; background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; }
.doc-card h2 { font-family: var(--font); font-size: 1.15rem; margin: 0; }
.doc-card p { margin: 0; color: var(--ink-2); font-size: .92rem; grid-column: 1; }
.doc-card .doc-meta { grid-column: 2; grid-row: 1; margin: 0; text-align: right; }
.doc-card .tag { grid-column: 1; justify-self: start; }

.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 680px; margin: 0 auto; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--radius-lg); padding: 16px 20px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; z-index: 50; font-size: .9rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.cookie[hidden] { display: none; }  /* иначе display:flex перебивает атрибут hidden — баннер висел бы всегда */
.cookie p { margin: 0; flex: 1 1 320px; color: var(--ink-2); }

/* ============================================================================
   КАЛЬКУЛЯТОР ГОДОВОЙ ПОДПИСКИ (S10, страница «Для предприятий»)
   ========================================================================== */
.calc .intro, .calc-draft, .calc-note { max-width: 68em; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 3vw, 40px); align-items: start; margin-top: 30px; }
.calc-fs { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.calc-fs legend { padding: 0; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.calc-inputs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.calc-in label { display: block; font-family: var(--font-mono); font-size: .82rem; color: var(--ink); margin-bottom: 6px; }
.calc-in label small { display: block; color: var(--ink-3); font-size: .72rem; white-space: nowrap; }
.calc input[type=number] { font: inherit; width: 100%; padding: 10px 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg-1); color: var(--ink); font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s; }
.calc input[type=number]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.calc-row { margin-bottom: 18px; max-width: 24em; }
.calc-row .help { margin: 2px 0 0; }
.calc-check { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; margin-bottom: 20px; }
.calc-check input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); }
.calc-check label { cursor: pointer; }
.calc-check .help { grid-column: 2; margin: 0; }
.calc-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.calc-actions .help { margin: 0; }
.calc-out { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow-1); }
.calc-bar + .calc-bar { margin-top: 20px; }
.calc-bar-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.calc-bar-h span { color: var(--ink-2); font-size: .9rem; }
.calc-bar-h b { font-size: clamp(1.2rem, .9rem + 1vw, 1.7rem); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc .bar { height: 14px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.calc .fill { display: block; height: 100%; border-radius: 999px; transition: width .35s ease; }
.calc .fill-plain { background: var(--ink-3); }
.calc .fill-sub { background: var(--accent); }
.calc-parts { margin: 8px 0 0; font-size: .84rem; color: var(--ink-3); }
.calc-verdict { margin: 26px 0 8px; font-size: 1.05rem; border-left: 3px solid var(--line-2); padding-left: 14px; }
.calc-verdict.is-good { border-left-color: var(--ok); }
.calc-verdict.is-plain { border-left-color: var(--warn); }
.calc-point { margin: 0 0 6px; color: var(--ink-2); }
.calc-out .help:empty { display: none; }
.calc-terms { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); margin-top: 36px; }
.calc-terms .list-dash { margin-top: 4px; }

/* ============================================================================
   АДАПТИВНОСТЬ
   ========================================================================== */
@media (max-width: 1100px) {
  .hero-grid, .hero-b .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero::before { right: -30%; top: 20%; width: 100%; }
  .conveyor { aspect-ratio: 4 / 3; }
  .hero-side { padding-top: 0; }
  .big { min-height: 160px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .split, .sheet, .enterprise, .sec-grid { grid-template-columns: 1fr; }
  .calc-grid, .calc-terms { grid-template-columns: 1fr; }
  .pipe { grid-template-columns: 1fr 1fr; gap: 22px; }
  .pipe::before { display: none; }
  .pipe-step { padding-top: 0; }
  .pipe-step::before { display: none; }
  .pipe-bar { display: none; }
  .gallery { grid-template-columns: 1fr; }
  .tb-grid { grid-template-columns: 1fr 1fr; }
  .tb-cell:nth-child(4n) { border-right: 1px solid var(--line-2); }
  .tb-cell:nth-child(2n) { border-right: 0; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--bg-1); border-bottom: 1px solid var(--line-2); padding: 10px clamp(16px, 3vw, 32px) 18px; gap: 2px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); }
  .nav.open { display: flex; }
  .nav a, .nav .link-btn { padding: 12px 10px; font-size: 1rem; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
  .theme-toggle { margin: 10px 0 0 10px; }
  .section-head { grid-template-columns: 1fr; gap: 8px; }
  .section-head .intro { grid-column: 1; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .pipe, .form-grid, .tb-grid, .stats, .rules { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-inputs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tb-cell { border-right: 0 !important; }
  .hero { padding-top: 28px; }
  .eyebrow { font-size: .66rem; letter-spacing: .1em; margin-bottom: 16px; }
  .hero-cta .btn, .hero-cta .samples { flex: 1 1 auto; }
  .samples > summary { width: 100%; }
  .samples-menu { left: 0; right: 0; min-width: 0; }
  .dz { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 18px 14px; }
  .conveyor { aspect-ratio: 1 / 1; border-radius: 10px; }
  .cv-facts { bottom: 38px; gap: 4px; }
  .cv-facts li { font-size: .66rem; padding: 4px 8px; }
  .cv-caption { display: none; }
  .cv-bar { justify-content: center; padding: 7px 10px; }
  .cv-tag { font-size: .66rem; }
  .big { min-height: 150px; }
  .strip figure { width: 120px; } .strip img { width: 120px; height: 74px; }
  .lb-bar { padding: 8px 10px; }
  .lb-nav { width: 40px; height: 40px; }
  .matrix td:last-child { white-space: normal; }
  .gcard-body { padding: 16px; }
}

/* ============================================================================
   Уважение к prefers-reduced-motion: конечное состояние сразу, без движения
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
  .cv-model { transform: none !important; }
  .cv-view, .cv-dims, .l-hatch, .cv-tag, .cv-facts li { opacity: 1 !important; transform: none !important; transition: none !important; }
  .cv-draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  dialog.drop-confirm[open] { animation: none; }
  .big-item { transform: none; }
  .strip-track { animation: none; }
  .strip { -webkit-mask: none; mask: none; overflow-x: auto; }
  .pipe-callouts li { opacity: 1; transform: none; }
  .pipe-frame .wipe { display: none; }
}

/* ============================================================================
   ПЕЧАТЬ (S8-legal): юридические документы — чёрным по белому в любой теме, без шапки,
   баннера и лайтбокса; подвал с реквизитами остаётся; адреса ссылок — в скобках
   ========================================================================== */
@media print {
  html, html[data-theme="dark"], html[data-theme="light"] {
    color-scheme: light;
    --bg: #fff; --bg-1: #fff; --bg-2: #fff; --bg-3: #fff;
    --ink: #000; --ink-2: #222; --ink-3: #555;
    --line: #bbb; --line-2: #888;
    --accent: #000; --accent-2: #000; --accent-ink: #000; --accent-soft: transparent;
    --warn: #000; --ok: #000; --bad: #000; --shadow-1: none;
  }
  body { font-size: 11pt; line-height: 1.45; }
  .site-header, .cookie, .lightbox, .flash, .skip-link, .no-print, [data-print] { display: none !important; }
  .doc { max-width: none; }
  .doc a { color: #000; text-decoration: none; }
  .doc a[href^="/"]::after, .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
  .doc a[href^="mailto:"]::after { content: none; }
  .doc .toc { columns: 2; }
  .doc .draft { border: 1px solid #000; background: none; }
  .doc-head { margin-top: 0; }
  h1 { font-size: 20pt; } h2 { font-size: 14pt; page-break-after: avoid; } h3 { font-size: 12pt; page-break-after: avoid; }
  table, tr, dl { page-break-inside: avoid; }
  .title-block { margin-top: 24px; page-break-inside: avoid; background: none; }
  .tb-cell, .tb-grid { border-color: #888; }
}
/* S8-auth: honeypot field (bots fill it, people never see it) */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
