/* ============================================================================
   styles.css — Donbet (DE / de). Палитра и форма отличаются от Hercules намеренно.
   ----------------------------------------------------------------------------
   Типографика и ритм взяты из эталона SEON Clinic / LAIN (skill bf-web-design):
     • ровно ДВЕ гарнитуры: гротеск на всё + моно на служебный слой;
     • крупные заголовки весом 400, минусовой трекинг, line-height < 1;
     • средних кеглей почти нет: гигант → заголовок секции → лид → тело → моно;
     • двухтонный заголовок: ключевые слова чернилами, связки — «призрачным»;
     • моно-лейблы секций с номерами, описательные подписи к карточкам;
     • воздух между секциями ≥ 24vh на десктопе;
     • тонкие линии колонок видны на фоне первого экрана.
   НЕ взято из эталона (казино ≠ клиника): пастельная тишина и отсутствие
   акцента. Здесь контраст: чернильные плашки + горячий акцент на действии.
   Порядок: @layer tokens → base → layout → components → utilities
   ========================================================================== */
@layer tokens, base, layout, components, utilities;

/* ---------------------------------------------------------------------------
   Шрифт один — Inter, self-hosted. Служебный слой набран им же, капсом и
   разрядкой: моноширинного в этом макете нет принципиально.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; 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: "Inter"; src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@layer tokens {
  :root {
    color-scheme: light dark;

    /* --- ЦВЕТ: светлая тема — БАЗА. Тёмная приходит по системной настройке --- */
    --bg:          #f5f1f6;
    --surface:     #ffffff;
    --surface-2:   #ece3ef;
    --ink:         #121212;
    --ink-text:    #f3f1ec;
    --ink-muted:   #a8a8b0;

    --text:        #111113;
    --text-muted:  #55555a;
    --ghost:       #b9a8c0;
    --line:        #e4dae8;
    --line-strong: #cbb9d2;

    --accent:      #ff2d6f;
    --accent-ink:  #ffffff;
    --accent-text: #b30d44;   /* акцент как цвет текста: 5:1 на бумаге */
    --accent-weak: #ffe9f0;
    --hot:         #a85d00;

    --ph-bg:       #fff3c4;
    --ph-text:     #6b4e00;
    --focus:       #9a4a06;
    --shadow-1: 0 1px 2px rgb(18 18 22 / 0.08);
    --shadow-2: 0 18px 50px rgb(18 18 22 / 0.12);

    /* --- ТИПОГРАФИКА: две гарнитуры --- */
    --font-display: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-sans:    var(--font-display);
    --font-mono:    var(--font-display);   /* служебный слой — тот же Inter, капсом */

    /* лестница кеглей: гигант → секция → лид → H3 → тело → моно */
    --fs-h1:    clamp(2rem, 4.6vw, 3.5rem);
    --fs-h2:    clamp(1.5rem, 2.6vw, 2.25rem);
    --fs-lead:  clamp(1.0625rem, 1.5vw, 1.25rem);
    --fs-h3:    clamp(1.0625rem, 1.5vw, 1.375rem);
    --fs-num:   clamp(1.75rem, 3.2vw, 3rem);
    --fs-body:  0.9375rem;
    --fs-sm:    0.875rem;
    --fs-xs:    clamp(10.5px, 0.68vw, 12px);

    /* --- ПРОСТРАНСТВО --- */
    --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 1rem;
    --space-4: 1.5rem;   --space-5: 2rem;    --space-6: 3rem;
    --space-7: 4.5rem;
    --section: clamp(4.5rem, 22vh, 15rem);   /* ≥24vh воздуха на десктопе */

    /* --- ФОРМА --- */
    --radius:    14px;       /* Donbet мягче Hercules: карточки скруглены */
    --radius-sm: 10px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.5);
    --shadow-2: 0 18px 50px rgb(0 0 0 / 0.55);
    --wrap: 76rem;
    --gutter: clamp(1rem, 2.5vw, 2.25rem);
    --bottom-space: 0px;
  }

  /* --- ЦВЕТ: светлая тема. Фон не #fff, текст не #000 (правило эталона) --- */
  @media (prefers-color-scheme: dark) {
    :root {
      --bg:          #100b14;
      --surface:     #19121e;
      --surface-2:   #241a2b;
      --ink:         #0b070e;   /* чернильные плашки: шапка, карточка-вердикт */
      --ink-text:    #f4f4f6;
      --ink-muted:   #9b9ba6;

      --text:        #f4f4f6;
      --text-muted:  #a2a2ad;
      --ghost:       #6b5a76;   /* «тихие» слова в двухтонном заголовке */
      --line:        #2b2033;
      --line-strong: #41314c;

      --accent:      #ff2d6f;   /* ДЕЙСТВИЕ: CTA, акцент, фокус */
      --accent-ink:  #1a0009;
      --accent-text: #ff5c8d;
      --accent-weak: #2a0a18;
      --hot:         #ffb021;   /* минусы, предупреждения */

      --ph-bg:       #3a2d05;
      --ph-text:     #ffd979;
      --focus:       #ff8a1e;
    }
  }
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  }

  body {
    margin: 0;
    padding-bottom: var(--bottom-space);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }

  /* крупные заголовки — вес 400: силу даёт кегль и минусовой трекинг */
  h1, h2 {
    font-family: var(--font-display); font-weight: 700;
    text-wrap: balance; margin: 0 0 var(--space-4);
  }
  h1 { font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -0.02em; }
  h2 { font-size: var(--fs-h2); line-height: 1.2; letter-spacing: -0.015em; }
  h3 {
    font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 600;
    line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 var(--space-2);
  }
  p  { margin: 0 0 var(--space-3); text-wrap: pretty; }
  a  { color: var(--accent-text); text-underline-offset: 3px; }
  img, svg { max-width: 100%; height: auto; display: block; }

  :where(a, button, input, select, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
  }

  table { border-collapse: collapse; width: 100%; }
  th { text-align: left; font-weight: 600; }
}

@layer layout {
  .shell { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
  .block { padding-block-start: var(--section); }

  /* первый экран: H1 + факт-строка, на фоне — тонкие линии колонок */
  .intro { position: relative; padding-block: var(--space-6) var(--space-5); }

  .layout { display: grid; gap: var(--space-5); align-items: start; }
  @media (min-width: 60rem) {
    .layout { grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--space-7); }
    /* карточка-вердикт идёт в разметке ПЕРВОЙ (чтобы на мобайле быть на первом
       экране), а на десктопе уезжает в правую колонку */
    .layout__card {
      grid-column: 2; grid-row: 1;
      position: sticky; top: var(--space-4);
      max-height: calc(100dvh - var(--space-5));
      overflow-y: auto; overscroll-behavior: contain;
      scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
    }
    .layout__body { grid-column: 1; grid-row: 1; }
  }
}

@layer components {

  /* ---------- СЛУЖЕБНЫЙ СЛОЙ: моно, капс ---------- */
  .kicker, .audit__source, .foot__head, .metric__name, .codebox__label {
    font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted);
  }

  /* моно-лейбл секции с номером: [ 03 — BONUSBEDINGUNGEN ] */
  .marker {
    font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400;
    text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted);
    margin: 0 0 var(--space-4);
  }
  .marker {
    display: flex; align-items: center; gap: var(--space-3);
    color: var(--accent-text);
  }
  .marker::after { content: ""; flex: 1; height: 1px; background: var(--line); }
  .marker b { display: none; }                  /* номера секций здесь не нужны */

  /* ---------- ШАПКА ---------- */
  .top { overflow-x: clip; background: var(--ink); color: var(--ink-text); border-block-start: 2px solid var(--accent); }
  .top__stand { font-size: var(--fs-xs); color: var(--ink-muted); margin: 0; margin-inline-start: auto; }
  .top__bar {
    display: flex; align-items: center; gap: var(--space-4);
    min-height: 64px; flex-wrap: wrap; padding-block: var(--space-2);
  }
  .logo { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; color: inherit; }
  .logo__name { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
  .logo__note {
    display: block; font-family: var(--font-mono); font-size: var(--fs-xs);
    text-transform: uppercase; letter-spacing: .08em; font-weight: 400; color: var(--ink-muted);
  }
  .top__gap { margin-inline-start: auto; }
  .nav { display: none; gap: var(--space-4); }
  .nav__link {
    font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase;
    letter-spacing: .08em; color: var(--ink-muted); text-decoration: none;
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .nav__link:hover { color: var(--ink-text); }
  @media (min-width: 48rem) { .nav { display: flex; } }

  /* ---------- ХЛЕБНЫЕ КРОШКИ ---------- */
  .path {
    font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase;
    letter-spacing: .08em; color: var(--text-muted); padding-block: var(--space-5) 0;
  }
  .path ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }
  .path li + li::before { content: "/"; margin-inline-end: var(--space-2); color: var(--line-strong); }

  /* ---------- ФАКТ-СТРОКА ПОД H1 ---------- */
  .facts {
    display: grid; gap: var(--space-3); margin: 0;
    padding-block-start: var(--space-4);
    border-block-start: 1px solid var(--line);
  }
  @media (min-width: 48rem) {
    .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
  }
  .facts__row { display: grid; gap: var(--space-1); }
  /* на мобайле факт-строка складывается в компактные строки «ключ → значение»,
     иначе карточка-вердикт уезжает с первого экрана */
  @media (max-width: 47.99rem) {
    .facts__row {
      grid-template-columns: auto minmax(0, 1fr); align-items: baseline;
      gap: var(--space-3); padding-block-end: var(--space-2);
      border-block-end: 1px solid var(--line);
    }
    .facts__row:last-child { border-block-end: 0; padding-block-end: 0; }
    .facts dd { text-align: right; }
  }
  .facts dt {
    font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400;
    text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted);
  }
  .facts dd { margin: 0; font-size: var(--fs-sm); font-weight: 600; letter-spacing: -0.01em; }

  /* ---------- КНОПКИ ---------- */
  .button {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: 48px; padding: var(--space-2) var(--space-5);
    font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    border-radius: var(--radius-pill); border: 1px solid transparent;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .1s;
  }
  .button:active { transform: translateY(1px); }
  /* Фирменное поведение кнопки этого сайта: спокойное дыхание и стрелка,
     которая сама разворачивается. Одинаково на всех кнопках. */
  .button--main {
    background: var(--accent); color: var(--accent-ink);
    animation: cta-breathe 3.6s ease-in-out infinite;
  }
  .button--main::after { display: inline-block; animation: cta-turn 6s cubic-bezier(.65,0,.35,1) infinite; }
  .button--line::after { content: "→"; display: inline-block; animation: cta-turn 6s cubic-bezier(.65,0,.35,1) infinite; }
  .button--main:hover { background: color-mix(in oklab, var(--accent) 86%, white); }
  .button--main::after { content: "→"; }
  /* кнопка-скобка из эталона: уголки нарисованы градиентами, фон прозрачный */
  .button--line {
    background: transparent; color: var(--text); border-color: transparent;
    background-image:
      linear-gradient(var(--line-strong), var(--line-strong)), linear-gradient(var(--line-strong), var(--line-strong)),
      linear-gradient(var(--line-strong), var(--line-strong)), linear-gradient(var(--line-strong), var(--line-strong)),
      linear-gradient(var(--line-strong), var(--line-strong)), linear-gradient(var(--line-strong), var(--line-strong)),
      linear-gradient(var(--line-strong), var(--line-strong)), linear-gradient(var(--line-strong), var(--line-strong));
    background-repeat: no-repeat;
    background-size: 10px 1px, 1px 10px, 10px 1px, 1px 10px, 10px 1px, 1px 10px, 10px 1px, 1px 10px;
    background-position:
      left top, left top, right top, right top,
      left bottom, left bottom, right bottom, right bottom;
  }
  .button--line:hover { color: var(--accent-text); }
  .button--wide { width: 100%; }
  .button.is-disabled { cursor: not-allowed; opacity: .75; }
  .button[disabled] { cursor: not-allowed; opacity: .55; }

  /* ---------- ЧИПСЫ (пресеты калькулятора) ---------- */
  .pill {
    font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700;
    letter-spacing: .06em; min-height: 44px; padding: 0 var(--space-4);
    display: inline-flex; align-items: center;
    background: transparent; color: var(--text);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    cursor: pointer; transition: background .15s, color .15s, border-color .15s;
  }
  .pill:hover { border-color: var(--accent); }
  .pill[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

  /* ---------- КАРТОЧКИ ---------- */
  .card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: var(--space-4);
  }

  /* ---------- КАРТОЧКА-ВЕРДИКТ (первый экран, без скролла) ---------- */
  .verdict { padding: 0; overflow: hidden; box-shadow: var(--shadow-2); }
  .verdict__head {
    background: var(--ink); color: var(--ink-text);
    padding: var(--space-4); border-block-end: 1px solid var(--line);
  }
  .verdict__kicker { color: var(--accent); margin: 0 0 var(--space-2); }
  .verdict__headline {
    font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1; letter-spacing: -0.04em;
    margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2);
  }
  .verdict__plus { color: var(--accent); }
  .verdict__sub {
    font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.6;
    color: var(--ink-muted); margin: var(--space-3) 0 0;
  }
  .verdict__item--alert dd { color: var(--hot); }
  .verdict__alert {
    margin: var(--space-4) var(--space-4) 0; padding: var(--space-3);
    background: var(--surface-2); border-inline-start: 2px solid var(--hot);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm); line-height: 1.5;
  }
  .codebox__hint {
    font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.6;
    color: var(--text-muted); margin: var(--space-2) 0 0;
  }
  .verdict__list { margin: 0; padding: 0 var(--space-4); }
  .verdict__item {
    display: flex; justify-content: space-between; gap: var(--space-3);
    padding-block: var(--space-2); border-block-start: 1px solid var(--line); font-size: var(--fs-sm);
  }
  .verdict__item:first-child { border-block-start: 0; }
  .verdict__item dt { color: var(--text-muted); margin: 0; flex: none; }
  .verdict__item dd { margin: 0; font-weight: 600; text-align: right; }
  .verdict > .gap-top, .verdict > .legal, .verdict > .verdict__fine { margin-inline: var(--space-4); }
  .verdict > .verdict__fine { padding-block-end: var(--space-4); }
  .verdict__fine { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.6; color: var(--text-muted); }

  /* ---------- БОНУС-КОД + КОПИРОВАНИЕ ---------- */
  .promo-code { margin: var(--space-3) var(--space-4); padding: var(--space-3); background: var(--surface-2); border-radius: var(--radius); }
  .codebox__label { margin: 0 0 var(--space-2); }
  .codebox__row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
  .codebox__code {
    font-family: var(--font-mono); font-size: 1.0625rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; color: var(--text);
    padding: var(--space-2) var(--space-3); background: var(--bg);
    border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
    flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere;
  }
  .codebox__copy { flex: none; min-height: 44px; }
  .codebox__status {
    font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted);
    margin: var(--space-2) 0 0; min-height: 1.2em;
  }

  /* ---------- 18+ РЯДОМ С КАЖДЫМ БОНУСНЫМ БЛОКОМ ---------- */
  .legal {
    display: flex; align-items: flex-start; gap: var(--space-2);
    font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.6;
    color: var(--text-muted); margin-block: var(--space-3);
  }
  .legal__badge {
    flex: none; font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-xs);
    color: var(--text); border: 1px solid currentColor; border-radius: var(--radius-pill);
    padding: 1px var(--space-2);
  }

  /* ---------- ПРЕДУПРЕЖДЕНИЕ О ГЕО ----------
     Главный факт страницы: чернильная плашка с горячей полосой слева.
     Контраст, а не серый «инфо-блок»: мимо него нельзя проскользнуть. */
  .alert {
    margin-block-start: var(--space-6);
    padding: clamp(var(--space-4), 3vw, var(--space-6));
    background: var(--ink); color: var(--ink-text);
    border-inline-start: 3px solid var(--hot);
    border-radius: var(--radius);
  }
  .alert__kicker { color: var(--hot); margin: 0 0 var(--space-3); }
  .alert__title { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-block-end: var(--space-4); }
  .alert p { color: var(--ink-muted); max-width: 62ch; }
  .alert__quote {
    margin: 0 0 var(--space-4); padding-inline-start: var(--space-4);
    border-inline-start: 1px solid rgb(255 255 255 / 0.18);
  }
  .alert__quote p { color: var(--ink-text); font-size: var(--fs-h3); line-height: 1.35; }
  .alert__quote cite {
    font-family: var(--font-mono); font-size: var(--fs-xs); font-style: normal;
    text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted);
  }


  /* ---------- ИГРЫ: широкие карточки, мягкая форма ---------- */
  .games { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
  .game {
    display: grid; grid-template-rows: auto 1fr;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-1);
    transition: transform .15s, border-color .15s;
  }
  .game:hover { transform: translateY(-2px); border-color: var(--accent); }
  .game__art { width: 100%; aspect-ratio: 337 / 181; object-fit: cover; background: var(--ink); }
  .game__link { display: block; }
  .game__text { padding: var(--space-4); display: grid; gap: var(--space-2); align-content: start; }
  .game__title { margin: 0; font-size: var(--fs-h3); letter-spacing: -0.02em; }
  .game__title a { color: var(--text); text-decoration: none; }
  .game__title a:hover { color: var(--accent-text); }
  .game__facts {
    font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .04em;
    color: var(--accent-text); margin: 0;
  }
  .game__note { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.6; }


  /* ---------- ПРОВЕРКА ДОМЕНА ПО ВАЙТЛИСТУ ---------- */
  .lookup__caption {
    display: block; font-family: var(--font-mono); font-size: var(--fs-xs);
    text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted);
    margin-block-end: var(--space-2);
  }
  .lookup__line { display: flex; gap: var(--space-2); flex-wrap: wrap; }
  .lookup__field {
    flex: 1 1 14rem; min-width: 0; min-height: 52px;
    padding: 0 var(--space-3); font: inherit; font-size: 16px;   /* ≥16px: iOS не зумит */
    font-family: var(--font-mono);
    background: var(--bg); color: var(--text);
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  }
  .lookup__field:focus-visible { border-color: var(--accent); }
  .lookup__verdict {
    margin-block: var(--space-4) 0; padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm); border-inline-start: 3px solid var(--line-strong);
    background: var(--surface-2); font-size: var(--fs-sm); line-height: 1.5;
    min-height: 3.25rem; display: flex; align-items: center;
  }
  .lookup__verdict.is-yes  { border-inline-start-color: var(--accent); }
  .lookup__verdict.is-no   { border-inline-start-color: var(--hot); }
  .lookup__verdict.is-part { border-inline-start-color: var(--text-muted); }
  .lookup__samples { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-block-start: var(--space-3); }
  .lookup__note {
    font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.7;
    color: var(--text-muted); margin-block-start: var(--space-4);
  }



  /* ---------- КАРТА ИГР ----------
     Приём с сайтов недвижимости: карта, нарезанная на неровные куски, каждый
     кликабелен. Здесь каждая территория — автомат, и внутри живёт его обложка,
     а не минималистичная плашка: игрок узнаёт «свои» игры мгновенно.
     Две раскладки (5×2 и 2×5) — SVG не умеет переносить, поэтому широкая
     выключается на узком экране, и наоборот. */
  .atlas__head { display: grid; gap: var(--space-2); }
  .atlas__title { font-size: clamp(1.5rem, 3.2vw, 2.5rem); margin: 0; }
  .atlas__sub { color: var(--text-muted); font-size: var(--fs-sm); margin: 0; max-width: 60ch; }

  .atlas__plan { width: 100%; height: auto; display: block; overflow: visible; }
  .atlas__plan--tall { display: block; }
  .atlas__plan--wide { display: none; }
  @media (min-width: 48rem) {
    .atlas__plan--tall { display: none; }
    .atlas__plan--wide { display: block; }
  }

  .atlas__area { cursor: pointer; }
  .atlas__area image { transition: transform .25s ease; transform-origin: center; transform-box: fill-box; }
  .atlas__shade { fill: var(--ink); opacity: .45; transition: opacity .25s ease; }
  .atlas__border { fill: none; stroke: var(--bg); stroke-width: 6; }
  .atlas__name {
    font-family: var(--font-display); font-weight: 700;
    letter-spacing: -0.02em; fill: #fff; paint-order: stroke;
    stroke: rgb(9 9 11 / .9); stroke-width: 5px; stroke-linejoin: round;
    pointer-events: none;                       /* кегль считается под ширину куска */
  }
  .atlas__area:hover .atlas__shade,
  .atlas__area:focus-visible .atlas__shade { opacity: .12; }
  .atlas__area:hover image,
  .atlas__area:focus-visible image { transform: scale(1.06); }
  .atlas__area:focus-visible .atlas__border { stroke: var(--accent); }
  @media (prefers-reduced-motion: reduce) {
    .atlas__area image { transition: none; }
  }

  .atlas__border { stroke-width: 5; stroke-linejoin: round; }
  .atlas__area:hover .atlas__border { stroke: var(--accent); stroke-width: 6; }


  /* ---------- КОЛЕСО ИГР ----------
     Круг нарезан на 10 секторов — по одному на автомат, внутри живая обложка.
     Сектор рисуется один раз вверху и поворачивается атрибутом transform,
     поэтому ховер двигает его «наружу» обычным translateY: внутри повёрнутой
     системы координат это и есть направление радиуса.
     Вращение — CSS, остановка по наведению и по prefers-reduced-motion.
     Розыгрыш меняет только класс: inline-стили режет CSP. */
  .wheel { width: 100%; max-width: 34rem; height: auto; margin-inline: auto; display: block; }
  .wheel__rotor {
    transform-origin: 300px 300px;
    animation: wheel-turn 90s linear infinite;
    transition: transform 2.4s cubic-bezier(.17,.67,.21,1);
  }
  @keyframes wheel-turn { to { transform: rotate(360deg); } }
  .wheel:hover .wheel__rotor,
  .wheel:focus-within .wheel__rotor { animation-play-state: paused; }
  .wheel__rotor.is-spinning { animation: wheel-turn 1.1s linear infinite; }
  .wheel__rotor.is-landing { animation: none; }
  .wheel__rotor.is-land-0 { transform: rotate(0.0deg); }
  .wheel__rotor.is-land-1 { transform: rotate(-36.0deg); }
  .wheel__rotor.is-land-2 { transform: rotate(-72.0deg); }
  .wheel__rotor.is-land-3 { transform: rotate(-108.0deg); }
  .wheel__rotor.is-land-4 { transform: rotate(-144.0deg); }
  .wheel__rotor.is-land-5 { transform: rotate(-180.0deg); }
  .wheel__rotor.is-land-6 { transform: rotate(-216.0deg); }
  .wheel__rotor.is-land-7 { transform: rotate(-252.0deg); }
  .wheel__rotor.is-land-8 { transform: rotate(-288.0deg); }
  .wheel__rotor.is-land-9 { transform: rotate(-324.0deg); }

  .wheel__slice { cursor: pointer; }
  .wheel__move { transition: transform .25s ease; }
  .wheel__shade { fill: var(--ink); opacity: .42; transition: opacity .25s ease; }
  .wheel__edge { fill: none; stroke: var(--bg); stroke-width: 5; }
  .wheel__name {
    font-family: var(--font-display); font-weight: 700; fill: #fff;
    paint-order: stroke; stroke: rgb(9 9 11 / .9); stroke-width: 4px; stroke-linejoin: round;
    pointer-events: none;
  }
  .wheel__slice:hover .wheel__move,
  .wheel__slice:focus-visible .wheel__move { transform: translateY(-14px); }
  .wheel__slice:hover .wheel__shade,
  .wheel__slice:focus-visible .wheel__shade { opacity: .1; }
  .wheel__slice:focus-visible .wheel__edge { stroke: var(--accent); }
  .wheel__slice.is-won .wheel__shade { opacity: .06; }
  .wheel__slice.is-won .wheel__edge { stroke: var(--accent); stroke-width: 7; }

  .wheel__hub { fill: var(--ink); }
  .wheel__hubnum {
    font-family: var(--font-display); font-weight: 700; font-size: 40px;
    fill: var(--accent); text-anchor: middle;
  }
  .wheel__hubword {
    font-family: var(--font-display); font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em; fill: var(--ink-text);
  }
  .wheel__bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
    justify-content: center; margin-block-start: var(--space-4);
  }
  .wheel__out { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
  @media (prefers-reduced-motion: reduce) {
    .wheel__rotor { animation: none; transition: none; }
    .wheel__move { transition: none; }
  }

  /* ---------- СЕТКА: карточка слева, текст справа ----------
     У соседнего проекта карточка липнет справа — здесь зеркально. */
  @media (min-width: 60rem) {
    .layout {
      display: grid; grid-template-columns: 21rem minmax(0, 1fr);
      gap: var(--space-6); align-items: start;
    }
    .layout__card {
      grid-column: 1; position: sticky; top: var(--space-4);
      max-height: calc(100dvh - var(--space-5));
      overflow-y: auto; overscroll-behavior: contain; margin-block-end: 0;
    }
    .layout__body { grid-column: 2; }
  }


  /* ---------- БОКОВАЯ НАВИГАЦИЯ ----------
     В покое видны только иконки, по кнопке-бургеру панель расширяется и
     показывает названия с подсказками. У соседнего проекта навигация внизу —
     здесь сбоку, это разные решения, а не одна схема в двух цветах. */
  .rail {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 120;
    width: 64px; display: flex; flex-direction: column; gap: 6px;
    padding: var(--space-3) 0; overflow: hidden;
    background: var(--ink); color: #fff;
    transition: width .22s ease;
  }
  .rail.is-open { width: 17rem; box-shadow: var(--shadow-2); }
  .rail__toggle, .rail__item {
    display: flex; align-items: center; gap: var(--space-3);
    min-height: 52px; padding-inline: 15px; text-decoration: none;
    color: #fff; background: rgb(255 255 255 / .06); border: 0; cursor: pointer;
    font: inherit; text-align: start; white-space: nowrap;
    margin-inline: 6px; border-radius: 12px;          /* подложка, а не плоский ряд */
    transition: background .18s ease, color .18s ease, transform .12s ease;
  }
  .rail__item { color: rgb(255 255 255 / .82); }
  .rail__item:hover, .rail__item:focus-visible {
    background: color-mix(in oklab, var(--accent) 26%, transparent);
    color: #fff;
  }
  .rail__item:active { transform: scale(.985); }
  .rail__item[aria-current], .rail__item.is-on {
    background: var(--accent); color: var(--accent-ink);
  }
  .rail__toggle {
    background: none; margin-inline: 6px; padding-inline: 15px;
    color: rgb(255 255 255 / .92);
  }
  .rail__toggle { opacity: 1; margin-block-end: var(--space-3); }
  .rail__glyph { flex: none; display: block; line-height: 0; }
  .rail__glyph svg { width: 24px; height: 24px; display: block; }
  .rail__text { display: grid; gap: 1px; opacity: 0; transition: opacity .18s ease; }
  .rail.is-open .rail__text { opacity: 1; }
  .rail__name { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .01em; }
  .rail__hint { font-size: var(--fs-xs); color: rgb(255 255 255 / .62); }
  .rail__scrim {
    position: fixed; inset: 0; z-index: 110; background: rgb(9 9 11 / .5);
    border: 0; padding: 0;
  }
  .rail__scrim[hidden] { display: none; }

  /* место под панель: контент не уезжает под неё */
  body.has-rail { padding-inline-start: 64px; }
  body.has-rail .dock { inset-inline-start: 64px; }

  /* на узком экране панель уже, контент не должен к ней прижиматься */
  @media (max-width: 47.99rem) {
    .rail { width: 54px; padding-block: var(--space-2); }
    .rail__toggle, .rail__item { padding-inline: 15px; min-height: 50px; }
    .rail.is-open { width: min(16rem, 82vw); }
    body.has-rail { padding-inline-start: 54px; }
    body.has-rail .dock { inset-inline-start: 54px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .rail, .rail__text { transition: none; }
  }


  /* ---------- КОМПОЗИЦИЯ СЕКЦИИ С КОЛЕСОМ ----------
     Текст и круг — один блок: подпись держится левого края и читается
     рядом с колесом, а не убегает под него. */
  .atlas {
    display: grid; gap: var(--space-5); align-items: center;
    margin-block-start: var(--space-7);
  }
  .atlas__copy { display: grid; gap: var(--space-4); align-content: center; }
  .atlas__stage { display: flex; justify-content: center; min-width: 0; }
  @media (min-width: 60rem) {
    .atlas { grid-template-columns: minmax(0, 23rem) minmax(0, 1fr); gap: var(--space-6); }
    .atlas__copy { grid-column: 1; }
    .atlas__stage { grid-column: 2; }
    .wheel__bar { justify-content: flex-start; }
    .wheel__out { max-width: 24ch; }
  }
  .wheel__bar { flex-direction: column; align-items: flex-start; }
  @media (max-width: 59.99rem) { .wheel__bar { align-items: center; text-align: center; } }


  .game__art--blank {
    display: block; width: 100%; aspect-ratio: 337 / 181;
    background:
      repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface) 12px 24px);
  }


  /* ---------- КНОПКА В ШАПКЕ ----------
     Другой характер, чем у соседнего проекта: не блик, а спокойное дыхание,
     которое со временем становится заметнее, и стрелка, которая сама
     разворачивается и возвращается. Ступени — задержки анимации, без JS. */
  .top__cta {
    flex: none; margin-inline-start: var(--space-4);
    transform-origin: right center;        /* дыхание растёт внутрь, а не за край */
    animation: cta-breathe 3.6s ease-in-out infinite,
               cta-step-1 0.01s linear 25s forwards,
               cta-step-2 0.01s linear 70s forwards;
  }
  @keyframes cta-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.025); }
  }
  @keyframes cta-turn {
    0%, 55% { transform: rotate(0deg); }
    65% { transform: rotate(180deg) translateX(2px); }
    80%, 100% { transform: rotate(360deg); }
  }
  @keyframes cta-step-1 { to { box-shadow: 0 6px 20px rgb(255 45 111 / .38); } }
  @keyframes cta-step-2 { to { box-shadow: 0 10px 30px rgb(255 45 111 / .55); } }
  @media (max-width: 47.99rem) {
    .top__cta { margin-inline-start: auto; }
    .top__cta-label { font-size: var(--fs-xs); }
  }
  @media (prefers-reduced-motion: reduce) {
    .top__cta, .button--main, .button--main::after, .button--line::after { animation: none; }
  }


  /* ---------- ТЕКСТОВАЯ ПОДСТРАНИЦА ----------
     Мера строки под чтение, первая секция без гигантского отступа:
     на подстранице за H1 должен сразу идти текст, а не воздух. */
  .prose-wrap { max-width: 68ch; }
  .prose-wrap > *:first-child { padding-block-start: var(--space-5); }
  .prose-wrap h2 { margin-block-start: var(--space-6); }
  .prose-wrap p { max-width: 66ch; }
  .prose-wrap table { margin-block: var(--space-4); }

  /* ---------- ИСТОЧНИКИ ---------- */
  .refs { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
  .refs li {
    padding-block: var(--space-3); border-block-end: 1px solid var(--line);
    color: var(--text-muted);
  }
  .refs li:first-child { border-block-start: 1px solid var(--line); }
  .refs b { color: var(--text); font-weight: 600; }

  /* ---------- КАЛЬКУЛЯТОР ---------- */
  .tool {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
    padding: clamp(var(--space-4), 3vw, var(--space-6));
  }
  .tool::before {
    content: ""; position: absolute; inset-inline-end: -120px; inset-block-start: -140px;
    width: 420px; height: 420px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgb(255 45 111 / 0.20), transparent 62%);
  }
  .tool > * { position: relative; }
  .tool__title { margin-block-end: var(--space-3); }
  .tool__sub { color: var(--text-muted); margin-block-end: var(--space-5); max-width: 52ch; }
  .tool__row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
  .tool__row label { font-family: var(--font-mono); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
  .tool__big {
    font-family: var(--font-display); font-variant-numeric: tabular-nums;
    font-size: var(--fs-num); font-weight: 400; color: var(--accent); letter-spacing: -0.04em;
  }
  .tool__slider { width: 100%; margin-block: var(--space-3); accent-color: var(--accent); height: 44px; }
  .tool__quick { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .tool__rule { border: 0; border-block-start: 1px solid var(--line); margin-block: var(--space-5) var(--space-4); }
  .tool__grid {
    display: grid; gap: var(--space-2);
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    grid-template-rows: auto auto;
  }
  .metric {
    display: grid; grid-row: span 2; grid-template-rows: subgrid; gap: var(--space-2);
    background: var(--surface-2); border-radius: var(--radius-sm); padding: var(--space-3);
  }
  .metric__value {
    font-family: var(--font-display); font-variant-numeric: tabular-nums;
    font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 400; letter-spacing: -0.03em;
    line-height: 1; align-self: end;
  }
  .metric--lead { background: var(--accent); }
  .metric--lead .metric__name { color: var(--accent-ink); opacity: .8; }
  .metric--lead .metric__value { color: var(--accent-ink); }
  .tool__alt {
    font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.7;
    color: var(--accent-text); margin-block-start: var(--space-3);
  }
  .tool__fine { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.7; color: var(--text-muted); margin-block-start: var(--space-4); }
  .tool__warn {
    font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.7;
    margin-block-start: var(--space-4); padding-block-start: var(--space-3);
    border-block-start: 1px solid var(--line);
  }

  /* ---------- ПЛЮСЫ / МИНУСЫ ---------- */
  .pc { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
  .pc__list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
  .pc__list li { display: flex; gap: var(--space-3); padding-block: var(--space-3); border-block-end: 1px solid var(--line); }
  .pc__list li:last-child { border-block-end: 0; padding-block-end: 0; }
  .pc__list li::before { flex: none; font-family: var(--font-mono); font-weight: 700; }
  .pc--pro li::before { content: "+"; color: var(--accent-text); }
  .pc--con li::before { content: "–"; color: var(--hot); }

  /* ---------- MIDA ME KONTROLLISIME ---------- */
  .audit { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
  .audit__source { margin-block-end: var(--space-3); }
  .audit .card p:last-child { margin-block-end: 0; }

  /* ---------- ТАБЛИЦА УСЛОВИЙ ---------- */
  .matrix { font-size: var(--fs-sm); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .matrix th, .matrix td { padding: var(--space-3); border-block-end: 1px solid var(--line); vertical-align: top; }
  .matrix thead th {
    background: var(--ink); color: var(--ink-text);
    font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
  }
  .matrix tbody tr:last-child td, .matrix tbody tr:last-child th { border-block-end: 0; }
  .matrix tbody th { font-weight: 600; letter-spacing: -0.01em; }
  .matrix__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 700; }
  .matrix__note { color: var(--text-muted); }
  @media (max-width: 44rem) {
    .matrix, .matrix tbody, .matrix tr, .matrix td, .matrix tbody th { display: block; }
    .matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .matrix { border: 0; background: transparent; }
    .matrix tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-block-end: var(--space-3); padding: var(--space-3); }
    .matrix td, .matrix tbody th { border: 0; padding: var(--space-1) 0; }
    .matrix td::before {
      content: attr(data-label) " · "; font-family: var(--font-mono); font-size: var(--fs-xs);
      text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted);
    }
  }

  /* ---------- FAQ ---------- */
  .qa { border-block-end: 1px solid var(--line); }
  .qa:first-of-type { border-block-start: 1px solid var(--line); }
  .qa summary {
    cursor: pointer; list-style: none;
    font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 400;
    letter-spacing: -0.02em; line-height: 1.2;
    padding-block: var(--space-4); min-height: 48px;
    display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4);
  }
  .qa summary::-webkit-details-marker { display: none; }
  .qa summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); flex: none; }
  .qa[open] summary::after { content: "–"; }
  .qa__text { color: var(--text-muted); max-width: 62ch; padding-block-end: var(--space-4); margin: 0; }

  /* ---------- ЛИПКИЙ CTA (моб.) ---------- */
  .dock {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
    display: none; gap: var(--space-3); align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--surface); border-block-start: 1px solid var(--line);
    box-shadow: var(--shadow-2);
  }
  .dock__info { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.4; min-width: 0; margin: 0; }
  .dock__info b, .dock__info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dock__info b { font-family: var(--font-display); font-size: var(--fs-sm); letter-spacing: -0.01em; }
  .dock .button { margin-inline-start: auto; }

  @media (max-width: 48rem) {
    .top__stand { font-size: var(--fs-xs); color: var(--ink-muted); margin: 0; margin-inline-start: auto; }
  .top__bar { padding-block: var(--space-3); row-gap: var(--space-2); }
    .dock { display: flex; bottom: 0; }
    body.has-sticky-cta { --bottom-space: 76px; }
  }

  /* ---------- ПОДВАЛ ---------- */
  .foot { background: var(--ink); color: var(--ink-text); margin-block-start: var(--section); }
  .foot__cols { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); padding-block: var(--space-7) var(--space-5); }
  .foot__head { color: var(--ink-muted); margin-block-end: var(--space-3); }
  .foot__links { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
  .foot__links a { color: var(--ink-text); text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
  .foot__links a:hover { color: var(--accent); }
  .legal-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
    border-block-start: 1px solid rgb(255 255 255 / 0.12); padding-block: var(--space-4) var(--space-6);
    font-family: var(--font-mono); font-size: var(--fs-xs); line-height: 1.7; color: var(--ink-muted);
  }
  .legal-bar .legal__badge { color: var(--ink-text); }
  .legal-bar span:not(.legal__badge) { max-width: 64ch; }
  .legal-bar a { color: var(--accent); }
}

@layer utilities {
  /* видимая метка плейсхолдера — чтобы незаполненное не уехало в прод */
  .flag {
    background: var(--ph-bg); color: var(--ph-text);
    border-radius: var(--radius-sm); padding: 0 .35em;
    font-size: .95em; font-style: normal; box-decoration-break: clone;
  }
  .quiet { color: var(--ghost); }            /* двухтонный заголовок */
  .dim { color: var(--text-muted); }
  .nobreak { white-space: nowrap; }
  .deck {
    font-size: var(--fs-lead); line-height: 1.55; letter-spacing: 0;
    color: var(--text-muted); max-width: 62ch; margin-block-end: var(--space-5);
  }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .gap-top { margin-block-start: var(--space-5); }

  /* ---------- ПРОЯВЛЕНИЕ ПО СКРОЛЛУ (приём эталона) ----------
     Слова лида серые и темнеют по мере чтения; заголовки секций
     и карточки всплывают на 1 шаг. Любой отказ JS = всё видно сразу. */
  .fade-word { color: var(--ghost); transition: color .5s ease; }
  .fade-word.is-in { color: var(--text); }
  .js .rise {
    opacity: 0; transform: translateY(12px);
    transition: opacity .6s ease, transform .6s ease;
    animation: reveal-failsafe 0.01s linear 4s forwards;   /* страховка от сбоя JS */
  }
  @keyframes reveal-failsafe { to { opacity: 1; transform: none; } }
  .js .rise.is-in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .fade-word { color: var(--text); }
    .js .rise { opacity: 1; transform: none; }
  }
}
