/* NewFlyer — сайт продукта. Язык авиационной карты: бумага, координатная сетка, пурпурный маршрут,
   моноширинные пометки. Светлая тема — основная, тёмная — по настройке системы. */

@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212; }

:root {
  --paper: #f3f5f8;
  --sheet: #ffffff;
  --sheet-2: #eef1f5;
  --ink: #0c1624;
  --ink-2: #3d4a5c;
  --ink-3: #6f7b8d;
  --rule: #d6dce5;
  --grid: #e3e8ef;
  --route: #c2185b;
  --route-ink: #ffffff;
  --route-deep: #7c0f3b;
  --route-wash: rgba(194, 24, 91, 0.08);
  --sky: #1f5fd1;
  --go: #12805a;
  --warn: #b35c00;
  --focus: #1f5fd1;
  --band: #0c1624;
  --band-ink: #e8edf4;
  --band-ink-2: #9aa7b8;
  --band-rule: #233247;
  --sans: "Plex", "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "Plex Mono", "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0a111b;
    --sheet: #0f1824;
    --sheet-2: #142030;
    --ink: #e8edf4;
    --ink-2: #a9b4c3;
    --ink-3: #74829a;
    --rule: #1f2c3d;
    --grid: #142030;
    --route: #ff4d8d;
    --route-ink: #1a0610;
    --route-deep: #b3245e;
    --route-wash: rgba(255, 77, 141, 0.1);
    --sky: #6ea0ff;
    --go: #3fcb8b;
    --warn: #f0a33a;
    --focus: #6ea0ff;
    --band: #060b12;
    --band-ink: #e8edf4;
    --band-ink-2: #8f9cae;
    --band-rule: #1a2636;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0a111b; --sheet: #0f1824; --sheet-2: #142030; --ink: #e8edf4; --ink-2: #a9b4c3; --ink-3: #74829a;
  --rule: #1f2c3d; --grid: #142030; --route: #ff4d8d; --route-ink: #1a0610; --route-deep: #b3245e; --route-wash: rgba(255, 77, 141, 0.1);
  --sky: #6ea0ff; --go: #3fcb8b; --warn: #f0a33a; --focus: #6ea0ff; --band: #060b12; --band-ink: #e8edf4; --band-ink-2: #8f9cae; --band-rule: #1a2636;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 70px); line-height: 1.03; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.3vw, 42px); line-height: 1.1; letter-spacing: -0.022em; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }
code, kbd, .mono { font-family: var(--mono); }
code { font-size: 0.88em; background: var(--sheet-2); border: 1px solid var(--rule); border-radius: 4px; padding: 0.08em 0.35em; overflow-wrap: anywhere; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 28px; }
@media (max-width: 560px) { .wrap { padding-inline: 16px; } body { font-size: 16px; } }

/* Пометка в духе подписи на карте: моно, капс, короткий штрих маршрута */
.label { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-3); }
.label::before { content: ""; width: 18px; height: 2px; background: var(--route); flex: none; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 40em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px;
  border-radius: 8px; border: 1px solid transparent; font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-route { background: var(--route); color: var(--route-ink); }
.btn-route:hover { background: var(--route-deep); color: #fff; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-quiet { color: var(--ink-2); padding-inline: 6px; }
.btn-quiet:hover { color: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn .arr { font-family: var(--mono); transition: transform 0.15s; }
.btn:hover .arr { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .btn .arr { transition: none; } }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 19px/1 var(--sans); letter-spacing: -0.02em; flex: none; }
.brand svg { width: 30px; height: 30px; }
.m-ink { fill: var(--ink); }
.m-route { fill: var(--route); }
.m-keel { fill: var(--route-deep); }
.m-trail { stroke: var(--route); fill: none; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav > a, .nav summary { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; font-size: 15px; color: var(--ink-2); text-decoration: none; cursor: pointer; list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav > a:hover, .nav summary:hover, .nav details[open] summary { color: var(--ink); background: var(--sheet-2); }
.nav a[aria-current="page"], .nav summary.on { color: var(--ink); font-weight: 500; }
.nav summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.15s; }
.nav details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.nav details { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 10px); left: -12px; width: min(640px, 92vw); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 24px 60px -24px rgba(12, 22, 36, 0.35);
}
.menu-panel a { display: grid; grid-template-columns: 28px 1fr; gap: 2px 12px; padding: 12px; border-radius: 8px; text-decoration: none; }
.menu-panel a:hover { background: var(--sheet-2); }
.menu-panel svg { grid-row: span 2; width: 24px; height: 24px; margin-top: 2px; }
.menu-panel b { font-weight: 600; font-size: 15px; }
.menu-panel span { color: var(--ink-3); font-size: 13.5px; line-height: 1.4; }
.top-cta { display: flex; align-items: center; gap: 8px; }
.top-cta .btn { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.burger { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--rule); border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.burger span { display: block; width: 18px; height: 1.5px; margin: 4px auto; background: currentColor; }
@media (max-width: 1020px) {
  .burger { display: block; }
  .nav, .top-cta { display: none; }
  .top.open .top-in { flex-wrap: wrap; padding-bottom: 16px; }
  .top.open .nav { display: flex; flex-direction: column; align-items: stretch; order: 3; width: 100%; flex-basis: 100%; }
  .top.open .top-cta { display: flex; order: 4; width: 100%; }
  .top.open .top-cta .btn { flex: 1; }
  .menu-panel { position: static; width: auto; box-shadow: none; grid-template-columns: 1fr; margin: 4px 0; }
}

/* ---------- иконки (линейные, 24×24) ---------- */
.ic { fill: none; stroke: var(--route); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic .ink { stroke: var(--ink); }

/* ---------- первый экран ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) 40px; }
.hero h1 { max-width: 21ch; margin-top: 22px; }
.hero .lead { margin-top: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin-top: 18px; font: 13px/1.5 var(--mono); color: var(--ink-3); }
.page-hero { padding-block: clamp(44px, 6vw, 84px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
.page-hero h1 { font-size: clamp(36px, 4.6vw, 60px); max-width: 18ch; margin-top: 20px; }
.page-hero .lead { margin-top: 22px; }

/* Карта маршрута: сетка, вехи, пурпурная линия */
.chart { position: relative; margin: 8px 0 0; border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); overflow: hidden; }
.chart-head { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--rule); font: 12.5px/1.3 var(--mono); color: var(--ink-3); }
.chart-head b { color: var(--ink); font-weight: 500; }
.chart-head .live { display: inline-flex; align-items: center; gap: 8px; color: var(--go); }
.chart-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.chart-scroll { overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 860px; height: auto; }
.g-line { stroke: var(--grid); stroke-width: 1; }
.g-axis { stroke: var(--rule); stroke-width: 1; }
.g-tick { font: 11px var(--mono); fill: var(--ink-3); }
.r-path { fill: none; stroke: var(--route); stroke-width: 2.2; }
.r-ghost { fill: none; stroke: var(--route); stroke-width: 2.2; opacity: 0.25; stroke-dasharray: 2 6; }
.r-node { fill: var(--sheet); stroke: var(--route); stroke-width: 2; }
.r-node-x { fill: var(--route); }
.r-ink-node { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.6; }
.r-lbl { font: 600 13px var(--sans); fill: var(--ink); }
.r-sub { font: 11.5px var(--mono); fill: var(--ink-3); }
.r-val { font: 500 12px var(--mono); fill: var(--route); }
.r-plane { fill: var(--route); }
.plane-fly { offset-path: path("M60 250 C 160 250, 190 150, 290 150 S 430 214, 530 196 S 690 92, 790 104 S 960 70, 1080 58"); offset-rotate: auto; animation: fly 9s cubic-bezier(.45, .05, .35, 1) infinite; }
@keyframes fly { 0% { offset-distance: 0%; opacity: 0; } 6% { opacity: 1; } 88% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .plane-fly { animation: none; offset-distance: 100%; opacity: 1; } }

/* ---------- секции ---------- */
.section { padding-block: clamp(64px, 8vw, 112px); border-top: 1px solid var(--rule); }
.section.tight { padding-block: clamp(48px, 6vw, 80px); }
.sec-head { display: grid; gap: 18px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head .lead { font-size: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split .sec-head { margin-bottom: 0; }
.sticky { position: sticky; top: 100px; }
@media (max-width: 900px) { .split, .split.even, .split.rev { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }

/* Плитки продукта: тонкая сетка, без карточек-«подушек» */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.tile { display: grid; align-content: start; gap: 12px; padding: 28px 26px 30px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); text-decoration: none; background: transparent; transition: background-color 0.15s; }
a.tile:hover { background: var(--sheet); }
.tile svg { width: 28px; height: 28px; }
.tile h3 { margin-top: 6px; }
.tile p { color: var(--ink-2); font-size: 15.5px; }
.tile .more { margin-top: 6px; font: 500 13px var(--mono); color: var(--route); }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); } .tile { padding: 22px 18px; } }

/* Спецификация: строка — термин и описание, разделены линией */
.spec { border-top: 1px solid var(--ink); }
.spec > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 8px 32px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.spec dt { font-weight: 600; }
.spec dd { margin: 0; color: var(--ink-2); }
.spec dl { margin: 0; }
@media (max-width: 700px) { .spec > div { grid-template-columns: minmax(0, 1fr); } }

/* Лестница сопоставления: порядок — это смысл, первое совпадение решает */
.ladder { list-style: none; margin: 0; padding: 0; counter-reset: rung; border-top: 1px solid var(--ink); }
.ladder li { counter-increment: rung; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.ladder li::before { content: counter(rung, decimal-leading-zero); font: 500 13px var(--mono); color: var(--ink-3); }
.ladder li:first-child::before { color: var(--route); }
.ladder b { font-weight: 600; }
.ladder span { grid-column: 2; color: var(--ink-2); font-size: 15.5px; }
.ladder em { grid-row: 1; grid-column: 3; font: normal 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
@media (max-width: 560px) { .ladder li { grid-template-columns: 40px minmax(0, 1fr); } .ladder em { grid-column: 2; grid-row: auto; } }

/* Числа-характеристики продукта (не выдуманные метрики — параметры работы) */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--rule); }
.facts > div { padding: 22px 22px 0 0; display: grid; gap: 6px; }
.facts b { font: 600 clamp(28px, 3vw, 38px)/1 var(--sans); letter-spacing: -0.02em; }
.facts span { color: var(--ink-3); font-size: 14px; line-height: 1.45; }
@media (max-width: 800px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; } }

/* Схемы и иллюстрации */
.figure { border: 1px solid var(--rule); border-radius: 14px; background: var(--sheet); overflow: hidden; }
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption, .fig-cap { padding: 12px 18px; border-top: 1px solid var(--rule); font: 12.5px/1.45 var(--mono); color: var(--ink-3); }
.figure { margin: 0; }
.d-grid { stroke: var(--grid); stroke-width: 1; }
.d-rule { stroke: var(--rule); stroke-width: 1; fill: none; }
.d-ink { stroke: var(--ink); stroke-width: 1.6; fill: none; }
.d-ink-fill { fill: var(--ink); }
.d-route { stroke: var(--route); stroke-width: 2; fill: none; }
.d-route-dash { stroke: var(--route); stroke-width: 2; fill: none; stroke-dasharray: 4 5; }
.d-route-fill { fill: var(--route); }
.d-wash { fill: var(--route-wash); }
.d-box { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.4; }
.d-box-soft { fill: var(--sheet-2); stroke: var(--rule); stroke-width: 1; }
.d-box-route { fill: var(--sheet); stroke: var(--route); stroke-width: 1.6; }
.d-bar { fill: var(--ink); opacity: 0.85; }
.d-bar-route { fill: var(--route); }
.d-bar-soft { fill: var(--rule); }
.d-go { fill: var(--go); }
.d-t { font: 500 13px var(--sans); fill: var(--ink); }
.d-t-b { font: 600 14px var(--sans); fill: var(--ink); }
.d-m { font: 11.5px var(--mono); fill: var(--ink-3); }
.d-m-route { font: 500 11.5px var(--mono); fill: var(--route); }
.d-m-ink { font: 500 11.5px var(--mono); fill: var(--ink); }

/* Журнал событий — как полётный лист */
.log { font: 13px/1.5 var(--mono); border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); overflow: hidden; }
.log-row { display: grid; grid-template-columns: 76px 120px minmax(0, 1fr); gap: 4px 14px; padding: 11px 18px; border-top: 1px dashed var(--rule); }
.log-row:first-child { border-top: 0; }
.log-row time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.log-row .ev { color: var(--ink); }
.log-row .det { color: var(--ink-2); overflow-wrap: anywhere; }
.log-row b { font-weight: 500; color: var(--ink); }
.log-row.money .ev, .log-row.money b { color: var(--route); }
.log-row.bad .ev, .log-row.bad b { color: var(--warn); }
@media (max-width: 560px) { .log-row { grid-template-columns: 64px minmax(0, 1fr); } .log-row .det { grid-column: 2; } }

/* Код */
.code { position: relative; margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--band); color: var(--band-ink); font: 13px/1.65 var(--mono); overflow-x: auto; }
.code .c { color: var(--band-ink-2); }
.code .k { color: #ff7aa8; }
.code .s { color: #8fd3b0; }
.code-tabs { display: flex; gap: 2px; margin-bottom: 10px; flex-wrap: wrap; }
.code-tabs button { font: 500 12.5px var(--mono); padding: 7px 12px; border-radius: 6px; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); cursor: pointer; }
.code-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.code-pane[hidden] { display: none; }

/* Таблица интеграций */
.matrix { width: 100%; border-collapse: collapse; font-size: 15px; }
.matrix th, .matrix td { text-align: left; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.matrix th { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); border-bottom: 1px solid var(--ink); }
.matrix td:first-child { font-weight: 600; white-space: nowrap; }
.matrix .yes { color: var(--go); font-family: var(--mono); font-size: 13px; }
.matrix .no { color: var(--ink-3); font-family: var(--mono); font-size: 13px; }
.table-scroll { overflow-x: auto; }

/* Плашка честного ограничения */
.note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 18px 20px; border: 1px solid var(--rule); border-left: 3px solid var(--warn); border-radius: 8px; background: var(--sheet); color: var(--ink-2); font-size: 15px; }
.note b { color: var(--ink); }

/* Вопросы */
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 22px/1 var(--mono); color: var(--route); }
.faq details[open] summary::after { content: "−"; }
.faq p { padding: 0 0 22px; color: var(--ink-2); max-width: 60em; }

/* Тёмная полоса призыва — ночная карта */
.band { position: relative; background: var(--band); color: var(--band-ink); overflow: hidden; }
.band .wrap { position: relative; padding-block: clamp(64px, 8vw, 104px); }
.band h2 { max-width: 18ch; }
.band .lead { color: var(--band-ink-2); margin-top: 18px; }
.band .label { color: var(--band-ink-2); }
.band .btn-line { border-color: var(--band-ink); color: var(--band-ink); }
.band .btn-line:hover { background: var(--band-ink); color: var(--band); }
.band .btn-route:hover { background: #fff; color: var(--band); }
.band-grid { position: absolute; inset: 0; width: 100%; height: 100%; }
.band-grid line { stroke: var(--band-rule); stroke-width: 1; }
.band-grid path { stroke: var(--route); stroke-width: 1.8; fill: none; opacity: 0.85; }
.band-grid circle { fill: var(--band); stroke: var(--route); stroke-width: 1.8; }
.band-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ---------- подвал ---------- */
.foot { border-top: 1px solid var(--rule); padding-block: 56px 36px; font-size: 14.5px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot h4 { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--ink-3); font: 12.5px var(--mono); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- вход и регистрация ---------- */
.auth { min-height: calc(100vh - 69px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-main { display: grid; align-content: center; justify-items: center; padding: clamp(32px, 6vw, 72px) 28px; }
.auth-form { width: 100%; max-width: 420px; display: grid; gap: 18px; }
.auth-form h1 { font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -0.025em; }
.auth-form .sub { color: var(--ink-2); margin-top: -6px; }
.field { display: grid; gap: 7px; }
.field label, .field .lbl { font: 500 13px var(--sans); color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; font: 400 16px/1.4 var(--sans); color: var(--ink); background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:hover { border-color: color-mix(in srgb, var(--ink) 30%, var(--rule)); }
.field input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--route); }
.field .hint { font-size: 13px; color: var(--ink-3); }
.pw { position: relative; }
.pw input { padding-right: 84px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--ink-3); font: 500 12.5px var(--mono); padding: 8px; cursor: pointer; }
.pw button:hover { color: var(--ink); }
.check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-size: 14px; color: var(--ink-2); align-items: start; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--route); }
.form-msg { min-height: 1.4em; font-size: 14.5px; color: var(--ink-2); }
.form-msg.err { color: var(--route); }
.form-msg.ok { color: var(--go); }
.auth-form .btn { width: 100%; }
.auth-alt { font-size: 14.5px; color: var(--ink-2); text-align: center; }
.auth-alt a { color: var(--route); font-weight: 500; text-decoration: none; }
.auth-side { position: relative; background: var(--band); color: var(--band-ink); display: grid; align-content: center; padding: clamp(32px, 5vw, 64px); overflow: hidden; }
.auth-side > div { position: sticky; top: 120px; }
.auth-side .band-grid { opacity: 0.9; }
.auth-side > div { position: relative; display: grid; gap: 16px; max-width: 460px; }
.auth-side h2 { font-size: clamp(26px, 2.6vw, 34px); }
.auth-side p { color: var(--band-ink-2); }
.auth-side ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 16px; }
.auth-side li { counter-increment: s; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; }
.auth-side li::before { content: counter(s); grid-row: span 2; width: 28px; height: 28px; border: 1px solid var(--band-rule); border-radius: 50%; display: grid; place-items: center; font: 500 12.5px var(--mono); color: var(--band-ink); }
.auth-side li b { font-weight: 600; }
.auth-side li span { color: var(--band-ink-2); font-size: 15px; }
.done { display: grid; gap: 14px; padding: 24px; border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); }
.done[hidden] { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-side { display: none; } }

/* Ссылка «подробнее» */
.go { display: inline-flex; gap: 8px; align-items: center; font: 500 14px var(--mono); color: var(--route); text-decoration: none; }
.go:hover { text-decoration: underline; text-underline-offset: 4px; }
.stack { display: grid; gap: 24px; }
.mt { margin-top: 28px; }
