/* ОКТАН — стили сайта. Все значения — из oktan-tokens.css (релиз oktan-brand v0.1.0).
   Литералов цвета и размера здесь нет, кроме структурных (сетка, отступы, радиусы из токенов).
   Тема — светлая (html[data-theme="light"]), тёмный блок токенов не применяется: сайт читают
   днём с телефона и с монитора, тёмная тема — для приложения в кабине. */

@font-face { font-family: "Unbounded"; font-weight: 900; font-display: swap; src: url("/assets/fonts/unbounded-900.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-var.woff2") format("woff2-variations"), url("/assets/fonts/ibm-plex-sans-var.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/jetbrains-mono-var.woff2") format("woff2-variations"), url("/assets/fonts/jetbrains-mono-var.woff2") format("woff2"); }

:root {
  --page: var(--oktan-color-surface-page);
  --card: var(--oktan-color-surface-card);
  --brand: var(--oktan-color-surface-brand);
  --deep: var(--oktan-brand-blue-deep);
  --ink: var(--oktan-color-text-primary);
  --steel: var(--oktan-color-text-secondary);
  --muted: var(--oktan-color-text-muted);
  --inverse: var(--oktan-color-text-inverse);
  --border: var(--oktan-color-border-default);
  --line: var(--oktan-brand-steel-light);
  --on-deep: #EEF1F5;          /* text.primary тёмной темы — единственное значение не из светлого набора */
  --on-deep-muted: #BAC4D1;    /* text.secondary тёмной темы */
  --on-deep-faint: #8B97A6;    /* text.muted тёмной темы */
  --ok: var(--oktan-color-state-ok);
  --warn: var(--oktan-color-state-warn);
  --danger: var(--oktan-color-state-danger);
  --display: var(--oktan-font-family-display);
  --text: var(--oktan-font-family-text);
  --mono: var(--oktan-font-family-mono);
  --g: var(--oktan-grid-base);
  --touch: 56px;               /* --oktan-touch-primary: 56dp */
  --radius: 3px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--text); font-size: var(--oktan-font-size-body); line-height: var(--oktan-font-leading-body); -webkit-font-smoothing: antialiased; }
a { color: var(--oktan-color-text-brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, label:focus-visible, input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: var(--oktan-font-weight-display); line-height: var(--oktan-font-leading-display); letter-spacing: -0.005em; text-wrap: balance; color: var(--deep); }
h4 { margin: 0; font-family: var(--text); font-weight: var(--oktan-font-weight-text-bold); font-size: var(--oktan-font-size-body); line-height: var(--oktan-font-leading-title); }
p { margin: 0; }
p + p { margin-top: calc(var(--g) * 3); }
ul, ol { margin: 0; padding: 0; }
img, svg { max-width: 100%; }
figure { margin: 0; min-width: 0; }
.cards > *, .split > *, .hero .in > * { min-width: 0; }
table { border-collapse: collapse; width: 100%; }
.in { max-width: var(--max); margin: 0 auto; padding: 0 calc(var(--g) * 8); }
.label { font-family: var(--mono); font-size: var(--oktan-font-size-label); line-height: var(--oktan-font-leading-label); letter-spacing: var(--oktan-font-tracking-label); text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: var(--oktan-font-feature-digits); }
.num { font-variant-numeric: var(--oktan-font-feature-digits); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- шапка ---- */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.top .in { display: flex; align-items: center; gap: calc(var(--g) * 7); min-height: 64px; }
.logo { display: flex; align-items: center; gap: calc(var(--g) * 3.5); text-decoration: none; }
.logo svg { height: 20px; width: auto; display: block; fill: var(--oktan-brand-blue); }
.logo .domain { font-family: var(--mono); font-size: var(--oktan-font-size-label); letter-spacing: var(--oktan-font-tracking-label); color: var(--muted); }
.nav { display: flex; gap: calc(var(--g) * 5); margin-left: auto; font-size: 15px; font-weight: var(--oktan-font-weight-text-bold); }
.nav a { color: var(--steel); text-decoration: none; white-space: nowrap; padding: calc(var(--g) * 2) 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--oktan-brand-blue); }
.nav a[aria-current="page"] { border-bottom-color: var(--oktan-brand-blue); color: var(--oktan-brand-blue); }
.nav a.cta { background: var(--brand); color: var(--inverse); padding: calc(var(--g) * 2.25) calc(var(--g) * 4); border-radius: var(--radius); border-bottom: 0; }
.nav a.cta:hover { background: var(--deep); }
.menu-toggle { position: absolute; opacity: 0; width: 0; height: 0; }
.menu-btn { display: none; margin-left: auto; font-weight: var(--oktan-font-weight-text-bold); font-size: 15px; color: var(--steel); cursor: pointer; padding: calc(var(--g) * 3) 0; min-height: 48px; align-items: center; }
.menu-btn .close { display: none; }

/* ---- первый экран ---- */
.hero { background: var(--deep); color: var(--inverse); }
.hero .in { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: calc(var(--g) * 10); padding-top: calc(var(--g) * 14); padding-bottom: calc(var(--g) * 14); align-items: center; }
.hero .label { color: var(--on-deep-muted); }
.hero h1 { font-size: clamp(28px, 4.2vw, 52px); margin: calc(var(--g) * 4) 0 calc(var(--g) * 5); color: var(--inverse); }
.hero p { font-size: var(--oktan-font-size-subtitle); line-height: var(--oktan-font-leading-subtitle); color: var(--on-deep); max-width: 52ch; }
.hero .specs { display: flex; flex-wrap: wrap; gap: calc(var(--g) * 2) 0; margin-top: calc(var(--g) * 6); font-family: var(--mono); font-size: 14px; line-height: 1.3; color: var(--on-deep); font-variant-numeric: tabular-nums; }
.hero .specs span { padding: calc(var(--g) * 1.5) calc(var(--g) * 3.5); border-left: 1px solid rgba(255,255,255,.35); }
.hero .specs span:first-child { padding-left: 0; border-left: 0; }
.hero .specs b { font-weight: var(--oktan-font-weight-mono-bold); color: var(--inverse); }
.hero .btns { display: flex; flex-wrap: wrap; gap: calc(var(--g) * 3); margin-top: calc(var(--g) * 7); }
.hero .art svg { width: 100%; height: auto; display: block; }
.hero .cap { font-family: var(--mono); font-size: 12px; line-height: 1.4; color: var(--on-deep-faint); margin-top: calc(var(--g) * 2.5); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--touch); font-family: var(--text); font-weight: var(--oktan-font-weight-text-bold); font-size: 16px; line-height: 1; padding: 0 calc(var(--g) * 5); border-radius: var(--radius); text-decoration: none; border: 2px solid transparent; }
.btn.white { background: var(--card); color: var(--deep); border-color: var(--card); }
.btn.white:hover { background: var(--on-deep); }
.btn.ghost { background: transparent; color: var(--inverse); border-color: var(--inverse); }
.btn.ghost:hover { background: rgba(255,255,255,.1); }
.btn.blue { background: var(--brand); color: var(--inverse); border-color: var(--brand); }
.btn.blue:hover { background: var(--deep); border-color: var(--deep); }
.btn.line { background: var(--card); color: var(--oktan-brand-blue); border-color: var(--oktan-brand-blue); }

/* ---- заголовок внутренней страницы ---- */
.page-head { background: var(--card); border-bottom: 1px solid var(--line); }
.page-head .in { padding-top: calc(var(--g) * 11); padding-bottom: calc(var(--g) * 10); }
.page-head h1 { font-size: clamp(26px, 3.4vw, 42px); margin: calc(var(--g) * 3) 0 calc(var(--g) * 4); max-width: 24ch; }
.page-head .lead { font-size: var(--oktan-font-size-subtitle); line-height: var(--oktan-font-leading-subtitle); color: var(--steel); max-width: 60ch; }

/* ---- секции ---- */
.sec { padding: calc(var(--g) * 14) 0 calc(var(--g) * 2); }
.sec.tight { padding-top: calc(var(--g) * 9); }
.sec h2 { font-size: clamp(22px, 2.6vw, 32px); margin-bottom: calc(var(--g) * 2.5); }
.sec h3 { font-size: var(--oktan-font-size-body); line-height: var(--oktan-font-leading-title); }
.sec .lead { color: var(--steel); max-width: 62ch; margin-bottom: calc(var(--g) * 6.5); }
.sec .lead.wide { max-width: 72ch; }
.more { margin-top: calc(var(--g) * 4.5); font-weight: var(--oktan-font-weight-text-bold); }
.note { font-size: var(--oktan-font-size-caption); line-height: var(--oktan-font-leading-caption); color: var(--muted); margin-top: calc(var(--g) * 3.5); max-width: 72ch; }
.prose { max-width: 66ch; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: calc(var(--g) * 3.5); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: calc(var(--g) * 1.5); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--g) * 4); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); padding: calc(var(--g) * 5.5) calc(var(--g) * 6); }
.card h3 { margin-bottom: calc(var(--g) * 3); display: flex; align-items: center; gap: calc(var(--g) * 2); }
.card ul { list-style: none; }
.card li { padding: calc(var(--g) * 2) 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.4; }
.card p { font-size: 15.5px; line-height: 1.45; color: var(--steel); }
.card .k { font-family: var(--mono); font-weight: var(--oktan-font-weight-mono-bold); font-size: 30px; line-height: 1; color: var(--oktan-brand-blue); margin-bottom: calc(var(--g) * 2.5); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.card.dashed { border-style: dashed; }

.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(var(--g) * 3); }
.step { background: var(--card); border: 1px solid var(--line); padding: calc(var(--g) * 4.5) calc(var(--g) * 4.5) calc(var(--g) * 5); }
.step b { display: block; font-family: var(--mono); font-weight: var(--oktan-font-weight-mono-bold); font-size: 26px; line-height: 1; color: var(--oktan-brand-blue); margin-bottom: calc(var(--g) * 3); }
.step h3 { font-family: var(--text); font-weight: var(--oktan-font-weight-text-bold); font-size: 16px; line-height: 1.3; margin-bottom: calc(var(--g) * 1.5); text-wrap: pretty; color: var(--ink); }
.step p { font-size: 14.5px; color: var(--steel); line-height: 1.4; }

.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(var(--g) * 2); }
.stages div { background: var(--card); border: 1px solid var(--line); padding: calc(var(--g) * 3.5) calc(var(--g) * 3); font-size: 14.5px; font-weight: var(--oktan-font-weight-text-bold); line-height: 1.3; }
.stages div span { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; line-height: 1; letter-spacing: 0.1em; color: var(--muted); margin-bottom: calc(var(--g) * 2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--g) * 4); align-items: stretch; }
.split .art { background: var(--card); border: 1px solid var(--line); padding: calc(var(--g) * 5); }
.split .art svg { width: 100%; height: auto; display: block; }

.shape { width: 14px; height: 14px; flex: none; display: inline-block; vertical-align: -1px; }
.shape.ok { fill: var(--ok); } .shape.warn { fill: var(--warn); } .shape.no { fill: var(--danger); }

/* ---- блоки внутренних страниц ---- */
.blk { background: var(--card); border: 1px solid var(--line); padding: calc(var(--g) * 5) calc(var(--g) * 6); margin-bottom: calc(var(--g) * 3); }
.blk h3 { margin-bottom: calc(var(--g) * 2.5); display: flex; align-items: center; gap: calc(var(--g) * 2); }
.blk.callout { border-left: 4px solid var(--brand); }
.blk.callout.warn { border-left-color: var(--warn); }
.blk.callout.danger { border-left-color: var(--danger); }
.blk.callout p { color: var(--steel); }
.rows { list-style: none; }
.rows li { display: flex; justify-content: space-between; gap: calc(var(--g) * 4); padding: calc(var(--g) * 2.5) 0; border-top: 1px solid var(--line); line-height: 1.4; }
.rows li:first-child { border-top: 0; }
.rows li > b { font-family: var(--mono); font-weight: 400; font-size: 14.5px; color: var(--muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.rows li > b.v { color: var(--ink); font-weight: var(--oktan-font-weight-mono-bold); white-space: normal; }
.rows li .n { font-family: var(--mono); font-weight: var(--oktan-font-weight-mono-bold); color: var(--oktan-brand-blue); margin-right: calc(var(--g) * 2); }
.crit { list-style: none; }
.crit li { padding: calc(var(--g) * 2) 0 calc(var(--g) * 2) 24px; position: relative; border-top: 1px solid var(--line); line-height: 1.4; }
.crit li:first-child { border-top: 0; }
.crit li::before { content: ""; position: absolute; left: 3px; top: 15px; width: 10px; height: 10px; background: var(--ok); border-radius: 50%; }
.crit.no li::before { background: var(--danger); border-radius: 0; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); width: 12px; height: 12px; left: 2px; top: 14px; }
.crit.warn li::before { background: var(--warn); border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 12px; height: 12px; left: 2px; top: 14px; }

table.spec, table.vs { font-size: 15.5px; line-height: 1.4; }
table.spec th, table.vs th { text-align: left; font-family: var(--text); font-weight: var(--oktan-font-weight-text-bold); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: calc(var(--g) * 2) calc(var(--g) * 3); border-bottom: 2px solid var(--border); vertical-align: bottom; }
table.spec td, table.vs td { padding: calc(var(--g) * 2.5) calc(var(--g) * 3); border-bottom: 1px solid var(--line); vertical-align: top; }
table.spec td:first-child { color: var(--steel); width: 38%; }
table.spec td:last-child { font-family: var(--mono); font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.vs td:first-child { width: 48%; color: var(--steel); }
table.vs td:last-child { font-weight: var(--oktan-font-weight-text-bold); }
.tbl { overflow-x: auto; }

.chain { display: flex; gap: calc(var(--g) * 1.5); align-items: center; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.chain div { border: 1.5px solid var(--oktan-brand-blue); padding: calc(var(--g) * 2) calc(var(--g) * 2.5); background: var(--card); color: var(--deep); }
.chain div small { display: block; color: var(--muted); font-size: 11px; }
.chain span { color: var(--oktan-brand-blue); }

.field { border: 1px solid var(--border); background: var(--card); padding: calc(var(--g) * 2.5) calc(var(--g) * 2.5); font-size: 15px; color: var(--muted); margin-bottom: calc(var(--g) * 2); border-radius: 2px; }
.q { display: flex; gap: calc(var(--g) * 3); align-items: flex-start; padding: calc(var(--g) * 2) 0; border-top: 1px solid var(--line); line-height: 1.4; }
.q:first-child { border-top: 0; }
.q .v { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; margin-left: auto; padding-top: 3px; }
.q .n { font-family: var(--mono); color: var(--muted); font-size: 14px; min-width: 2.2em; padding-top: 2px; }

/* ---- схемы: цвета только через классы, литералов в SVG нет ---- */
.dia { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.dia .ln { stroke: var(--oktan-brand-blue); fill: none; stroke-width: 1.5; }
.dia .box { stroke: var(--oktan-brand-blue); fill: none; stroke-width: 2; }
.dia .dash { stroke: var(--oktan-brand-blue); fill: none; stroke-width: 1.2; stroke-dasharray: 4 3; }
.dia .t { fill: var(--ink); }
.dia .m { fill: var(--muted); font-size: 10.5px; }
.dia .dot { fill: var(--oktan-brand-blue); }
.hero .dia .ln, .hero .dia .box, .hero .dia .dash { stroke: var(--inverse); }
.hero .dia .t, .hero .dia .dot { fill: var(--inverse); }
.hero .dia .m { fill: var(--on-deep-muted); }
.chart .lbl { fill: var(--muted); font-size: 11.5px; letter-spacing: 0.1em; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .raw { stroke: var(--border); stroke-width: 1.5; fill: none; }
.chart .mass { stroke: var(--oktan-brand-blue); stroke-width: 2.5; fill: none; }
.chart .alert { fill: var(--danger); font-size: 11px; }
.chart .alert-ln { stroke: var(--danger); stroke-width: 1; }
.chart .t { font-size: 11px; }

/* ---- призыв и подвал ---- */
.cta-band { background: var(--brand); color: var(--inverse); margin-top: calc(var(--g) * 14); }
.cta-band .in { display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--g) * 5) calc(var(--g) * 9); padding-top: calc(var(--g) * 9); padding-bottom: calc(var(--g) * 9); }
.cta-band h2 { font-size: clamp(20px, 2.4vw, 28px); color: var(--inverse); flex: 1; min-width: 260px; margin: 0; }
.cta-band p { color: var(--on-deep); flex: 1 1 320px; font-size: 16px; }
.foot { background: var(--card); border-top: 1px solid var(--line); font-size: 14.5px; color: var(--steel); }
.foot .in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: calc(var(--g) * 7); padding-top: calc(var(--g) * 9); padding-bottom: calc(var(--g) * 9); }
.foot .fwm { height: 18px; width: auto; display: block; margin-bottom: calc(var(--g) * 3); fill: var(--oktan-brand-blue); }
.foot .col > a { display: block; color: var(--steel); text-decoration: none; margin-bottom: calc(var(--g) * 1.5); }
.foot .col > a:hover { color: var(--oktan-brand-blue); }
.foot .col > div { margin-bottom: calc(var(--g) * 1.5); }
.foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: calc(var(--g) * 4); font-size: 13px; color: var(--muted); max-width: 80ch; }

/* ---- телефон ---- */
@media (max-width: 860px) {
  .in { padding: 0 calc(var(--g) * 5); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--card); border-bottom: 1px solid var(--line); padding: calc(var(--g) * 2) calc(var(--g) * 5) calc(var(--g) * 5); box-shadow: 0 12px 30px rgba(15,20,26,.12); }
  .nav a { padding: calc(var(--g) * 3.5) 0; border-bottom: 1px solid var(--line); min-height: 48px; display: flex; align-items: center; }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .nav a.cta { margin-top: calc(var(--g) * 3); justify-content: center; min-height: var(--touch); }
  .menu-btn { display: flex; }
  .menu-toggle:checked ~ .nav { display: flex; }
  .menu-toggle:checked ~ .menu-btn .open { display: none; }
  .menu-toggle:checked ~ .menu-btn .close { display: inline; }
  .hero .in { grid-template-columns: 1fr; gap: calc(var(--g) * 7); padding-top: calc(var(--g) * 9); padding-bottom: calc(var(--g) * 9); }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: var(--oktan-font-size-body); }
  .hero .art { order: 2; }
  .hero .specs span { border-left: 0; padding: calc(var(--g)) 0; width: 100%; }
  .hero .btns .btn { flex: 1 1 100%; }
  .page-head .in { padding-top: calc(var(--g) * 8); padding-bottom: calc(var(--g) * 7); }
  .sec { padding-top: calc(var(--g) * 10); }
  .cards, .cards.three, .cards.four, .split, .steps { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr 1fr; }
  .foot .in { grid-template-columns: 1fr; gap: calc(var(--g) * 5); }
  .rows li { flex-direction: column; gap: calc(var(--g)); }
  .rows li > b { text-align: left; white-space: normal; }
  table.spec td:first-child { width: 42%; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav { gap: calc(var(--g) * 3.5); font-size: 14px; }
}
@media print {
  .top, .foot, .cta-band, .hero .btns { display: none; }
  .hero { background: none; color: var(--ink); }
  .hero h1, .hero p, .hero .specs { color: var(--ink); }
  body { font-size: 11pt; }
}
