/* ADSflow - публичный сайт. Токены = web/src/styles/tokens.css (SPEC раздел 10). */

:root {
  --bg: #F4F6F5;
  --surface: #FFFFFF;
  --inset: #EAEEEC;
  --line: #D7DEDA;
  --fg: #0F1714;
  --muted: #5A6862;
  --accent: #0E8F63;
  --accent-fg: #FFFFFF;
  --accent-soft: #DDF3EA;
  --warn: #A86400;
  --warn-soft: #FBEFD8;
  --bad: #C0352B;
  --bad-soft: #FBE3E0;
  --ok: var(--accent);

  /* тёмная полоса «официальный API» - тёмная в обеих темах */
  --band-bg: #0F1714;
  --band-fg: #E6EDEA;
  --band-muted: #93A39C;
  --band-line: #26312D;
  --band-accent: #3DD39B;
  --band-inset: #151C1A;

  --grid-line: rgba(15, 23, 20, .045);
  --header-bg: rgba(244, 246, 245, .82);

  --r-control: 8px;
  --r-card: 12px;
  --r-modal: 16px;
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: 24px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1211;
    --surface: #151C1A;
    --inset: #1C2522;
    --line: #26312D;
    --fg: #E6EDEA;
    --muted: #93A39C;
    --accent: #3DD39B;
    --accent-fg: #062419;
    --accent-soft: #12352A;
    --warn: #F2B44C;
    --warn-soft: #33270F;
    --bad: #FF8A7F;
    --bad-soft: #3A1A17;
    --band-bg: #111816;
    --band-inset: #0D1211;
    --grid-line: rgba(230, 237, 234, .035);
    --header-bg: rgba(13, 18, 17, .8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0D1211;
  --surface: #151C1A;
  --inset: #1C2522;
  --line: #26312D;
  --fg: #E6EDEA;
  --muted: #93A39C;
  --accent: #3DD39B;
  --accent-fg: #062419;
  --accent-soft: #12352A;
  --warn: #F2B44C;
  --warn-soft: #33270F;
  --bad: #FF8A7F;
  --bad-soft: #3A1A17;
  --band-bg: #111816;
  --band-inset: #0D1211;
  --grid-line: rgba(230, 237, 234, .035);
  --header-bg: rgba(13, 18, 17, .8);
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.025em; font-weight: 750; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-feature-settings: 'zero' 0; }
code { font-size: .88em; background: var(--inset); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
strong { font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.ico { flex: none; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-fg); padding: 8px 14px; border-radius: var(--r-control); }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .02em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 18px;
}
.lead { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 62ch; }

/* ---------- Кнопки, пилюли ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-control);
  font: 650 15px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn-sm { height: 34px; padding: 0 12px; font-size: 14px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { color: var(--accent-fg); background: color-mix(in srgb, var(--accent) 88%, var(--fg)); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { color: var(--fg); border-color: color-mix(in srgb, var(--fg) 30%, var(--line)); }
.btn .ico { transition: transform .15s; }
.btn:hover .ico { transform: translateX(2px); }

.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill-ok { background: var(--accent-soft); color: var(--accent); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--muted); background: var(--surface); white-space: nowrap; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--accent); text-decoration: none; margin-top: 18px; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 18px; letter-spacing: -.03em; text-decoration: none; color: var(--fg); }
.brand:hover { color: var(--fg); }
.nav-main { display: flex; gap: 4px; margin-right: auto; }
.nav-main a { padding: 7px 11px; border-radius: var(--r-control); font-size: 14.5px; font-weight: 550; color: var(--muted); text-decoration: none; }
.nav-main a:hover, .nav-main a[aria-current="page"] { color: var(--fg); background: var(--inset); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--r-control); border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.theme-toggle:hover { color: var(--fg); }
.theme-toggle .ico-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; } :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; } }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

.nav-mobile { display: none; position: relative; }
.nav-mobile summary { list-style: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-control); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile .ico-close { display: none; }
.nav-mobile[open] .ico-close { display: block; }
.nav-mobile[open] .ico-open { display: none; }
.nav-mobile-panel {
  position: fixed; left: 0; right: 0; top: 64px; bottom: 0; z-index: 60;
  display: flex; flex-direction: column; gap: 2px; padding: 16px var(--gutter) 32px;
  background: var(--bg); border-top: 1px solid var(--line); overflow-y: auto;
}
.nav-mobile-panel a:not(.btn) { padding: 14px 4px; font-size: 18px; font-weight: 650; text-decoration: none; border-bottom: 1px solid var(--line); }
.nav-mobile-panel .btn { margin-top: 12px; height: 48px; }

/* Переключатель языка EN / RU */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); padding: 2px; gap: 2px; }
.lang-switch a { display: inline-grid; place-items: center; min-width: 32px; height: 28px; padding: 0 6px; border-radius: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--fg); }
.lang-switch a[aria-current] { background: var(--inset); color: var(--fg); }
.nav-mobile-panel .lang-switch { align-self: flex-start; margin-top: 16px; }
.nav-mobile-panel .lang-switch a { min-width: 52px; height: 38px; font-size: 15px; border-bottom: 0; padding: 0 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 85%);
}
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 56px; align-items: end; margin-bottom: 56px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; letter-spacing: -.04em; line-height: 1.02; max-width: 15ch; }
.hero .lead { margin-top: 24px; font-size: 18.5px; max-width: 60ch; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-facts { margin: 0; border-top: 1px solid var(--line); }
.hero-facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hero-facts dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hero-facts dd { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.hero-facts dd .mono { color: var(--accent); font-weight: 600; }

/* ---------- Макет кабинета ---------- */
.app-mock {
  position: relative; margin: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(15, 23, 20, .35);
  font-size: 13px;
}
.mock-chrome { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--inset); border-radius: 14px 14px 0 0; }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-url { font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px; }
.mock-body { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 420px; }
.mock-side { display: flex; flex-direction: column; gap: 1px; padding: 14px 10px; border-right: 1px solid var(--line); }
.mock-ws { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 2px 10px 12px; }
.side-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--muted); font-weight: 550; }
.side-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.mock-main { padding: 18px 20px 76px; min-width: 0; }
.mock-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mock-h { font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.mock-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mock-tools { display: flex; gap: 8px; align-items: center; }
.mini-btn { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; font-weight: 650; white-space: nowrap; color: var(--fg); }
.mini-btn.is-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }

.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.kpi { position: relative; padding: 10px 12px 12px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.k-label { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.k-val { display: block; font-family: var(--mono); font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; }
.spark { position: absolute; right: 10px; top: 12px; width: 52px; height: 16px; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.mock-table-wrap { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; overflow-y: hidden; }
.mock-table { width: 100%; border-collapse: collapse; }
.mock-table th { text-align: left; font-size: 11px; font-weight: 650; color: var(--muted); background: var(--inset); padding: 8px 10px; white-space: nowrap; }
.mock-table td { padding: 9px 10px; border-top: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.mock-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.mock-table .act { text-align: right; width: 1%; }
.mock-table tr.is-flagged td { background: color-mix(in srgb, var(--warn-soft) 55%, transparent); }
.is-bad { color: var(--bad); font-weight: 600; }
.cell-name { font-weight: 600; }
.mock-table td.name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.row-note { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; font-size: 11px; color: var(--muted); font-weight: 600; }
.row-note.is-warn { color: var(--warn); }
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; }
.st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-on { color: var(--accent); }
.st-warn { color: var(--warn); }
.st-off { color: var(--muted); }

.mock-toast {
  position: absolute; right: -18px; bottom: -26px; width: 300px;
  display: flex; gap: 10px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: 10px;
  box-shadow: 0 18px 40px -24px rgba(15, 23, 20, .45);
}
.toast-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--warn-soft); color: var(--warn); flex: none; }
.toast-t { font-weight: 700; font-size: 13px; }
.toast-d { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

/* ---------- Секции ---------- */
.section { padding: 104px 0; border-top: 1px solid var(--line); }
.section-tight { padding: 72px 0; }
.section-flush { padding: 8px 0 104px; border-top: 0; }
.section-head { margin-bottom: 48px; max-width: 760px; }
.section-head h2, .section h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.035em; }
.section-head .lead { margin-top: 16px; }

/* Бенто модулей */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 24px; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); scroll-margin-top: 96px; }
.tile.w5 { grid-column: span 5; }
.tile.w7 { grid-column: span 7; }
.tile-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 12px; }
.tile h3 { font-size: 23px; letter-spacing: -.03em; margin-bottom: 10px; }
.tile-copy > p:not(.tile-label) { color: var(--muted); font-size: 15.5px; }
.ticks { list-style: none; display: grid; gap: 8px; margin-top: 16px; }
.ticks li { display: flex; gap: 9px; align-items: flex-start; font-size: 14.5px; }
.ticks li .ico { color: var(--accent); margin-top: 4px; }
.tile-ui { margin-top: auto; }

/* Мини-интерфейсы */
.ui { background: var(--inset); border: 1px solid var(--line); border-radius: 10px; padding: 16px; font-size: 13px; }
.ui-h { font-weight: 750; font-size: 14px; margin-bottom: 12px; }
.ui-foot { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.fb-btn { display: flex; align-items: center; justify-content: center; height: 36px; border-radius: 8px; background: var(--fg); color: var(--bg); font-weight: 700; font-size: 13.5px; }
.scope-list { list-style: none; display: grid; gap: 6px; margin-top: 12px; }
.scope-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.scope-list .ico { color: var(--accent); }

.launch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tree-node { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.tree-node.is-root { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.lvl { font-weight: 700; }
.tag-paused { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .03em; color: var(--muted); background: var(--inset); border-radius: 4px; padding: 1px 5px; }
.formula { font-size: 12px; color: var(--accent); font-weight: 600; }
.tree { display: grid; gap: 8px; margin: 12px 0 0 14px; padding-left: 16px; border-left: 1.5px solid var(--line); }
.tree-adset { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tree-adset::before { content: ''; position: absolute; left: -16px; top: 50%; width: 12px; border-top: 1.5px solid var(--line); }
.tree-ads { display: flex; gap: 4px; flex-wrap: wrap; }
.tree-ad { font-family: var(--mono); font-size: 10.5px; padding: 3px 6px; border-radius: 5px; border: 1px dashed var(--line); color: var(--muted); background: var(--surface); }
.tree-adset.is-open .tree-ad { border-style: solid; color: var(--fg); }
.launch-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.valid { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--accent); font-size: 12.5px; }

.chart-legend { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.chart-legend .chip { margin-left: auto; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 10px; height: 10px; border-radius: 3px; }
.lg-bar::before { background: color-mix(in srgb, var(--accent) 35%, var(--inset)); }
.lg-line::before { height: 2px; background: var(--warn); }
.chart { width: 100%; height: 110px; display: block; }
.chart .bars rect { fill: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.chart .cpa-line { fill: none; stroke: var(--warn); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ui-table { width: 100%; border-collapse: collapse; margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 12px; }
.ui-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 650; padding: 7px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.ui-table td { padding: 7px 10px; border-top: 1px solid var(--line); }
.ui-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }

.rule { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.rule-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rule-name { font-weight: 750; }
.switch { width: 28px; height: 16px; border-radius: 999px; background: var(--line); position: relative; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); }
.switch.is-on { background: var(--accent); }
.switch.is-on::after { left: 14px; background: var(--accent-fg); }
.rule-line { font-size: 12.5px; line-height: 1.75; }
.kw { display: inline-block; min-width: 38px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--muted); }
.kw.then { color: var(--accent); }
.op { color: var(--muted); }
.run-log { list-style: none; display: grid; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.run-log li { display: flex; gap: 10px; }
.run-log .mono { color: var(--fg); }

.cmt { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.cmt + .cmt { margin-top: 8px; }
.cmt.is-hidden { background: transparent; border-style: dashed; }
.cmt.is-hidden .cmt-text { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.cmt.is-replied { margin-left: 22px; border-left: 3px solid var(--accent); }
.cmt-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.cmt-who { font-weight: 700; color: var(--fg); font-size: 12.5px; }
.cmt-ad { margin-left: auto; }
.cmt-text { margin-top: 4px; font-size: 13px; }
.cmt-actions { display: flex; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 650; }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.tag-ok { background: var(--accent-soft); color: var(--accent); }

.bm-name { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 12.5px; margin-bottom: 10px; }
.acc-list { list-style: none; display: grid; gap: 6px; }
.acc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 92px; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.acc-name { font-weight: 650; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-name .mono { color: var(--muted); font-weight: 400; font-size: 11px; }
.limit { display: flex; align-items: center; gap: 6px; }
.limit .mono { font-size: 10.5px; color: var(--muted); width: 28px; text-align: right; }
.limit-bar { flex: 1; height: 5px; border-radius: 3px; background: var(--inset); overflow: hidden; }
.limit-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.acc-list li:nth-child(3) .limit-bar i { background: var(--warn); }

/* Полоса «официальный API» */
.section-band { background: var(--band-bg); color: var(--band-fg); border-top: 0; }
.section-band .eyebrow { color: var(--band-accent); }
.section-band .lead { color: var(--band-muted); }
.section-band code, .section-band .mono { color: var(--band-fg); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.band-grid h2 { margin-bottom: 18px; }
.guarantees { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 28px; margin-top: 36px; }
.guarantees li { display: flex; gap: 12px; }
.guarantees .ico { color: var(--band-accent); margin-top: 2px; }
.guarantees strong { display: block; font-size: 15px; }
.guarantees span { display: block; color: var(--band-muted); font-size: 14px; line-height: 1.5; margin-top: 3px; }
.band-links { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 36px; }
.band-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--band-accent); font-weight: 650; text-decoration: none; }
.band-links a:hover { color: var(--band-fg); }
.api-log { background: var(--band-inset); border: 1px solid var(--band-line); border-radius: var(--r-card); overflow: hidden; }
.api-log-h { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--band-line); font-size: 12.5px; font-weight: 650; }
.api-log-h .mono { color: var(--band-muted); font-size: 11.5px; font-weight: 400; }
.api-log ol { list-style: none; font-family: var(--mono); font-size: 12px; }
.api-log li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 30px 56px; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--band-line); align-items: center; }
.api-log li:last-child { border-bottom: 0; }
.api-log .m { font-weight: 600; font-size: 11px; }
.m-get { color: #7FB7FF; }
.m-post { color: var(--band-accent); }
.api-log .p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--band-fg); }
.api-log .s { color: var(--band-accent); }
.api-log .t { color: var(--band-muted); text-align: right; }

/* Шаги */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--fg); }
.steps li { padding: 28px 32px 8px 0; position: relative; }
.steps li + li { padding-left: 32px; border-left: 1px solid var(--line); }
.step-n { display: block; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 40px; }
.steps h3 { font-size: 22px; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 15.5px; }
.steps strong { color: var(--fg); font-weight: 650; }

/* Тизер тарифов */
.pricing-teaser { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.plan-strip { list-style: none; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.plan-strip li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'n p' 'd p'; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.plan-strip li:last-child { border-bottom: 0; }
.plan-n { grid-area: n; font-weight: 750; font-size: 17px; }
.plan-d { grid-area: d; color: var(--muted); font-size: 14px; }
.plan-p { grid-area: p; font-weight: 650; font-size: 16px; }
.plan-p.mono, .plan-p .mono { font-size: 22px; color: var(--accent); }
.plan-per { color: var(--muted); font-size: 13px; font-weight: 550; margin-left: 2px; }
.plan-strip-5 li { padding: 14px 22px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.faq-grid .section-head { position: sticky; top: 100px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-weight: 700; font-size: 17px; cursor: pointer; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; font: 500 18px/1 var(--mono); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq-a { padding: 0 44px 22px 0; color: var(--muted); font-size: 15.5px; }
.faq-a a { color: var(--fg); }

/* Финальный CTA */
.final-cta { padding: 88px 0; border-top: 1px solid var(--line); background: var(--surface); }
.final-grid { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.final-grid h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.035em; max-width: 18ch; }
.final-grid .cta-row { margin-top: 0; }

/* ---------- Подвал ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 34ch; }
.footer-grid nav { display: flex; flex-direction: column; gap: 8px; }
.footer-grid h2 { font-family: var(--mono); font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 6px; }
.footer-grid nav a { text-decoration: none; }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); }
.footer-entity { color: var(--fg); }
.footer-links a { color: var(--fg); }
.footer-note { font-size: 12.5px; }

/* ---------- Внутренние страницы ---------- */
.page-head { padding: 72px 0 48px; }
.page-head h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.04em; max-width: 20ch; }
.page-head .lead { margin-top: 18px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 24px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-bottom: 104px; }
.doc-toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 13.5px; }
.toc-title { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.doc-toc ol { list-style: none; border-left: 1px solid var(--line); }
.doc-toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.doc-toc a:hover { color: var(--fg); border-left-color: var(--accent); }
.doc-body { max-width: 780px; min-width: 0; }
.doc-section { padding: 0 0 40px; scroll-margin-top: 88px; }
.doc-section + .doc-section { padding-top: 40px; border-top: 1px solid var(--line); }
.doc-section h2, .prose h2 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 14px; }
.doc-section p, .doc-section li, .prose p { font-size: 16px; line-height: 1.7; }
.doc-section p + p, .doc-section ul + p, .doc-section ol + p, .doc-section p + ul, .doc-section p + ol, .doc-section .table-wrap + p, .doc-section p + .table-wrap { margin-top: 14px; }
.doc-section ul, .doc-section ol { padding-left: 22px; display: grid; gap: 8px; }
.doc-section ul.ticks { padding-left: 0; }
.prose h2 + p, .prose p + p { margin-top: 12px; }
.prose h2:not(:first-child) { margin-top: 40px; }
.prose .ticks { margin-top: 14px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.doc-table th { text-align: left; background: var(--inset); font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 10px 14px; white-space: nowrap; }
.doc-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.doc-table td:first-child { white-space: nowrap; }
.doc-section .doc-table td { font-size: 14px; }
.cell-sub { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.aside-h { font-size: 15px; font-weight: 750; letter-spacing: -.01em; margin-bottom: 12px; }
.aside-h:not(:first-child) { margin-top: 32px; }
.aside-links { margin-top: 14px; font-size: 14px; color: var(--muted); }
.legal-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.legal-card div { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.legal-card div:last-child { border-bottom: 0; }
.legal-card dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.legal-card dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }

.contact-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-item { display: flex; gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.contact-item > .ico { color: var(--accent); margin-top: 3px; }
.contact-item h2 { font-size: 18px; margin-bottom: 6px; }
.contact-item p { color: var(--muted); }
.contact-link { margin-top: 8px; font-weight: 650; color: var(--fg) !important; font-family: var(--mono); font-size: 14.5px; overflow-wrap: anywhere; }

/* Тарифы */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.plan.is-featured { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.plan-name { font-size: 18px; }
.plan-price { margin-top: 18px; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.plan-price .mono { color: var(--accent); }
.plan-note { color: var(--muted); font-size: 13.5px; margin-top: 4px; font-family: var(--mono); }
.plan-for { margin-top: 18px; font-weight: 600; }
.plan .ticks { margin: 16px 0 28px; }
.plan .btn { margin-top: auto; }
.plan-price .plan-per { font-size: 15px; letter-spacing: 0; margin-left: 4px; }
.plans-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.plans-5 .plan { padding: 22px 20px; }
.plans-5 .plan-price { font-size: 30px; }

/* Плашка перевода на RU-юрстраницах */
.notice-info { background: var(--accent-soft); color: var(--fg); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.translation-note { margin: 0 0 8px; font-size: 14.5px; }
.plan-notes { display: grid; gap: 10px; margin-top: 32px; color: var(--muted); font-size: 14.5px; }
.plan-notes p { display: flex; gap: 9px; align-items: flex-start; }
.plan-notes .ico { color: var(--accent); margin-top: 4px; }

/* Удаление данных */
.paths { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.path { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); display: flex; flex-direction: column; }
.path-n { color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.path h2 { font-size: 21px; margin-bottom: 14px; }
.path-steps { padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.path .muted { margin-top: auto; padding-top: 18px; font-size: 14px; }
.deletion-info { margin-top: 72px; }
.status-form label { display: block; font-weight: 650; font-size: 14px; margin-bottom: 8px; }
.field-row { display: flex; gap: 8px; }
.field-row input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); color: var(--fg); font: 500 15px var(--mono); letter-spacing: .04em; }
.field-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field-row .btn { height: 44px; }
.field-error { margin-top: 8px; color: var(--bad); font-size: 14px; }
.status-form + .small { margin-top: 16px; }
.notice { padding: 16px 18px; border-radius: var(--r-card); margin-bottom: 24px; }
.notice-warn { background: var(--warn-soft); color: var(--fg); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

.status-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.status-dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.status-dl div { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.status-dl div:nth-child(odd) { border-right: 1px solid var(--line); }
.status-dl dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.status-dl dd { margin: 4px 0 0; font-weight: 650; }
.timeline { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 24px 20px; border-bottom: 1px solid var(--line); }
.timeline li { position: relative; display: flex; flex-direction: column; gap: 4px; padding-top: 34px; }
.timeline li::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline li.is-done::before { background: var(--accent); }
.tl-dot { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); color: var(--accent-fg); }
.timeline li.is-done .tl-dot { background: var(--accent); border-color: var(--accent); }
.timeline li.is-current .tl-dot { border-color: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
.tl-label { font-weight: 700; font-size: 14.5px; }
.tl-when { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.status-summary { padding: 20px; }
.status-summary h2 { font-size: 16px; margin-bottom: 8px; }
.status-summary p + p { margin-top: 10px; }
.narrow-prose { max-width: 760px; margin-top: 32px; }
.narrow-prose p + p { margin-top: 12px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .mock-body { grid-template-columns: 160px minmax(0, 1fr); }
  .mock-table .col-roas { display: none; }
  .mock-toast { right: 12px; }
  .band-grid, .pricing-teaser, .faq-grid { grid-template-columns: 1fr; gap: 48px; }
  .faq-grid .section-head { position: static; margin-bottom: 0; }
  .plans-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .nav-main, .hide-sm { display: none; }
  .nav-mobile { display: block; }
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; margin-bottom: 40px; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 0; border-bottom: 1px solid var(--line); }
  .hero-facts div { border-top: 1px solid var(--line); border-bottom: 0; padding-right: 12px; }
  .mock-body { grid-template-columns: 1fr; min-height: 0; }
  .mock-side { display: none; }
  .tile.w5, .tile.w7 { grid-column: span 12; }
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li, .steps li + li { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); }
  .step-n { margin-bottom: 12px; }
  .doc { grid-template-columns: 1fr; gap: 0; }
  .doc-toc { position: static; max-height: none; margin-bottom: 40px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
  .two-col { grid-template-columns: 1fr; gap: 48px; }
  .plans, .paths { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .section { padding: 72px 0; }
  .section-flush { padding-bottom: 72px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 15.5px; }
  .header-row { gap: 12px; }
  .hero h1 { font-size: 36px; }
  .hero .lead, .lead { font-size: 16.5px; }
  .cta-row .btn { flex: 1 1 auto; }
  .hero-facts { grid-template-columns: 1fr; }
  .hero-facts div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 0; }
  .hero-facts dd { margin: 0; text-align: right; font-size: 14px; }
  .mock-chrome .mock-url { display: none; }
  .mock-main { padding: 14px 12px; }
  .mock-table td.act { padding-left: 4px; }
  .mock-top { flex-direction: column; gap: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .kpi:nth-child(3) { border-right: 1px solid var(--line); }
  .kpi:nth-child(4) { border-right: 0; }
  .kpi-ctr { display: none; }
  .spark { display: none; }
  .mock-table .col-budget, .mock-table .col-results, .mock-table .col-ctr { display: none; }
  .mock-table th, .mock-table td { padding: 8px 7px; }
  .mock-table td.name { max-width: 120px; }
  .row-note { display: none; }
  .mock-toast { position: static; width: auto; margin: 0 12px 12px; box-shadow: none; }
  .tile { padding: 20px; }
  .tile h3 { font-size: 20px; }
  .ui { padding: 12px; }
  .acc-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .acc-list .limit { grid-column: 1 / -1; }
  .cmt-ad { display: none; }
  .guarantees { grid-template-columns: 1fr; }
  .api-log li { grid-template-columns: 38px minmax(0, 1fr) 28px; }
  .api-log .t { display: none; }
  .faq summary { font-size: 16px; }
  .faq-a { padding-right: 0; }
  .final-cta { padding: 64px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .page-head { padding: 48px 0 36px; }
  .doc-table td:first-child { white-space: normal; }
  .field-row { flex-direction: column; }
  .status-dl { grid-template-columns: 1fr; }
  .status-dl div:nth-child(odd) { border-right: 0; }
  .timeline { grid-template-columns: 1fr; gap: 16px; }
  .timeline li { padding: 0 0 0 36px; min-height: 24px; justify-content: center; }
  .timeline li::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .doc-toc, .final-cta, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .doc { display: block; }
}
