/* Делимобиль «Приведи друга» — styles.css. Mobile-first, dark mode, WCAG AA. */

@layer reset, tokens, fonts, base, layout, components, motion;

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/unbounded.woff2?v=20260719l') format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+00AB, U+00BB, U+00B7, U+0301, U+0400-04FF, U+0500-052F, U+1C80-1C8A, U+2010-2027, U+2030-205E, U+20B4, U+20BD, U+2116, U+2122, U+FE2E-FE2F, U+0401, U+0451;
}

@font-face {
  font-family: 'Unbounded Fallback';
  src: local('Helvetica Neue'), local('Arial'), local('Segoe UI'), local('Roboto'), local('Droid Sans');
  /* Метрики вычислены из hhea статического шрифта Unbounded wght=800:
     ascender=995, descender=-245, lineGap=0, unitsPerEm=1000 → total=1240.
       ascent-override  =  995/1240*100 = 80.2419%
       descent-override =  245/1240*100 = 19.7581%
       line-gap-override=    0/1240*100 = 0%
       size-adjust      = 1240/1000*100 = 124.0000%
     effective ascent = 0.802419 × 1.24 × em = 0.995 em  (совпадает с Unbounded 995/1000). */
  ascent-override: 80.2419%;
  descent-override: 19.7581%;
  line-gap-override: 0%;
  size-adjust: 124%;
}

@layer reset {
  *,*::before,*::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100vh; min-height: 100dvh; line-height: 1.6; }
  img, svg { display: block; max-width: 100%; }
  button, input { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: none; }
  a { color: inherit; }
  ul, ol { list-style: none; padding: 0; }
  @media (prefers-reduced-motion: reduce) {
    *,*::before,*::after {
      animation-duration: .001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .001ms !important;
      scroll-behavior: auto !important;
    }
  }
}

@layer tokens {
  :root {
    --accent: #007D6A;       /* AA: белый текст на акценте ≈ 5.0:1 (раньше #00C9A7 давал ≈ 2.1:1) */
    --accent-hover: #006B5A;
    --accent-press: #005A4B;
    --accent-soft: #E0FAF5;
    --accent-contrast: #FFFFFF;

    --text: #1A1D1F;
    --text-muted: #5A6266;
    --text-faint: #5F676B;
    --surface: #FFFFFF;
    --surface-2: #F5F7F8;
    --border: #E4E9EB;
    --control-border: #7A8185;
    --hairline: rgba(26,29,31,.08);
    --bg: #FFFFFF;
    --code-bg: #F1F4F5;

    --radius-btn: 12px;
    --radius-voucher: 20px;
    --radius-pill: 999px;
    --radius-card: 16px;

    --shadow-voucher: 0 12px 30px -12px rgba(0,80,70,.30), 0 2px 6px rgba(0,0,0,.05);
    --filter-voucher: drop-shadow(0 10px 20px rgba(0,80,70,.24)) drop-shadow(0 2px 4px rgba(0,0,0,.06));
    --shadow-sticky: 0 -4px 18px -8px rgba(0,0,0,.18);
    --shadow-toast: 0 8px 24px -8px rgba(0,0,0,.4);
    --perf: color-mix(in srgb, var(--text) 38%, var(--accent-soft)); /* пунктир: один непрозрачный цвет поверх ваучера */

    --container: 1080px;
    --gutter: clamp(1rem, 5vw, 2rem);
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
    --font-display: "Unbounded", "Unbounded Fallback", var(--font-sans);
    --font-mono: "Consolas", ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, monospace;

    --step-h1: clamp(2rem, 6vw + 1rem, 3.4rem);
    --step-h2: clamp(1.5rem, 3vw + 1rem, 2.2rem);
    --step-h3: clamp(1.15rem, 1.5vw + .8rem, 1.35rem);
    --step-body: clamp(1rem, .4vw + .9rem, 1.0625rem);
    --step-code: clamp(2.2rem, 10vw + .5rem, 4.2rem);
  }

  @supports (color: oklch(0 0 0)) {
    :root {
      --accent: oklch(.50 .11 172);
      --accent-hover: oklch(.44 .11 172);
      --accent-press: oklch(.38 .10 172);
      --accent-soft: oklch(.96 .04 172);
      --text: oklch(.22 .01 240);
      --surface-2: oklch(.97 .005 220);
      --border: oklch(.91 .006 200);
    }
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #0E1116; --surface: #161A20; --surface-2: #1C2128;
      --text: #E8EAED; --text-muted: #A6AEB5; --text-faint: #8A939A;
      --border: #2A3038; --hairline: rgba(255,255,255,.08);
      --accent: #00D9B4; --accent-hover: #00F0C6; --accent-press: #00BFA0;
      --accent-soft: #1B2925; --accent-contrast: #0E1116; --code-bg: #1F262D; --control-border: #8B94A0;
      --shadow-voucher: 0 16px 40px -16px rgba(0,0,0,.65), 0 0 0 1px rgba(0,217,180,.10);
      --filter-voucher: drop-shadow(0 16px 32px rgba(0,0,0,.6)) drop-shadow(0 0 1px rgba(0,217,180,.20));
      color-scheme: dark;
      --perf: var(--bg);
    }
    @supports (color: oklch(0 0 0)) {
      :root:not([data-theme="light"]) {
        --accent: oklch(.78 .13 172); --accent-hover: oklch(.84 .14 172);
        --text: oklch(.94 .005 220);
        --surface: oklch(.22 .01 240); --surface-2: oklch(.27 .01 240);
        --accent-soft: oklch(.30 .04 172);
      }
    }
  }

  /* Ручной выбор тёмной темы (приоритет над системной) */
  :root[data-theme="dark"] {
    --bg: #0E1116; --surface: #161A20; --surface-2: #1C2128;
    --text: #E8EAED; --text-muted: #A6AEB5; --text-faint: #8A939A;
    --border: #2A3038; --hairline: rgba(255,255,255,.08);
    --accent: #00D9B4; --accent-hover: #00F0C6; --accent-press: #00BFA0;
    --accent-soft: #1B2925; --accent-contrast: #0E1116; --code-bg: #1F262D; --control-border: #8B94A0;
    --shadow-voucher: 0 16px 40px -16px rgba(0,0,0,.65), 0 0 0 1px rgba(0,217,180,.10);
    --filter-voucher: drop-shadow(0 16px 32px rgba(0,0,0,.6)) drop-shadow(0 0 1px rgba(0,217,180,.20));
    color-scheme: dark;
  }
  @supports (color: oklch(0 0 0)) {
    :root[data-theme="dark"] {
      --accent: oklch(.78 .13 172); --accent-hover: oklch(.84 .14 172);
      --text: oklch(.94 .005 220);
      --surface: oklch(.22 .01 240); --surface-2: oklch(.27 .01 240);
      --accent-soft: oklch(.30 .04 172);
    }
  }
  :root[data-theme="light"] { color-scheme: light; }
}

@layer base {
  body {
    font-family: var(--font-sans);
    font-size: var(--step-body);
    color: var(--text); background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-bottom: calc(var(--safe-bottom) + 5rem);
    overflow-x: hidden;
    overflow-x: clip;
  }
  h1,h2,h3 { line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; font-family: var(--font-display); }
  h1 { letter-spacing: -.03em; }
  strong { font-weight: 700; }
  code { font-family: var(--font-mono); }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
  .skip-link {
    position: absolute; left: 50%; transform: translate(-50%, -150%);
    background: var(--accent); color: var(--accent-contrast);
    padding: .6rem 1rem; border-radius: 0 0 var(--radius-btn) var(--radius-btn);
    font-weight: 700; z-index: 100; transition: transform .2s ease;
  }
  .skip-link:focus { transform: translate(-50%, 0); }
  .visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
}

@layer components {
  .theme-toggle {
    position: fixed; top: calc(.75rem + var(--safe-top)); right: calc(.75rem + var(--gutter));
    width: 44px; height: 44px; min-height: 44px; padding: 0;
    display: grid; place-items: center;
    background: var(--surface); border: 1px solid var(--control-border);
    border-radius: 50%; color: var(--text-muted);
    z-index: 90; cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
  .theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .no-js .theme-toggle { display: none; }
  /* Без JS reveal не сработает — шаги должны быть видны сразу (progressive enhancement) */
  .no-js .step[data-reveal] { opacity: 1; transform: none; }
  /* Иконка отражает текущую тему: солнце в светлой, луна в тёмной.
     Порядок приоритета: data-theme="dark" > системная dark > иначе light. */
  .theme-toggle__icon--sun { display: block; }
  .theme-toggle__icon--moon { display: none; }
  :root[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
  :root[data-theme="dark"] .theme-toggle__icon--moon { display: block; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle__icon--sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle__icon--moon { display: block; }
  }
}

@layer layout {
  main { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
  :where(main, section[id]) { scroll-margin-top: 1.5rem; }
  main:focus { outline: none; }
  section { padding-block: clamp(2rem, 6vw, 3.5rem); }
  footer { padding-block: clamp(.4rem, 1.2vw, .7rem); }
  /* content-visibility: авто-пропуск layout/paint для off-screen секций — ускоряет
     Speed Index на длинном лендинге (FAQ, steps, terms…). contain-intrinsic-size —
     резервирование места под высоту секции, чтобы избежать CLS при прокрутке к ней.
     Hero намеренно НЕ входит — он above-the-fold и должен лейаутиться сразу для LCP. */
  .steps, .cities, .terms, .faq,
  [data-block="definition"], [data-block="final"] {
    content-visibility: auto;
    contain-intrinsic-size: auto 1400px;
  }
  .section-head { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }
  .section-head__title { font-size: var(--step-h2); }
  .section-head__sub { color: var(--text-muted); margin-top: .4rem; font-size: 1.0625rem; }
}

@layer components {
  /* HERO */
  .hero {
    padding-top: calc(3rem + var(--safe-top));
    padding-bottom: clamp(2rem, 6vw, 3.5rem);
    overscroll-behavior: none; position: relative;
  }
  .hero__inner { display: grid; gap: clamp(1.25rem, 3vw, 1.75rem); }
  .eyebrow {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .8125rem; font-weight: 600; color: var(--text-muted);
    max-width: max-content;
  }
  .eyebrow--caption { margin-top: .15rem; }
  .hero__note { display: flex; flex-direction: column; gap: .35rem; }
  .eyebrow__dot {
    width: 16px; height: 16px; flex: 0 0 16px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .eyebrow__dot::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
  }
  .hero__copy { min-width: 0; }
  .hero__aside { display: flex; flex-direction: column; gap: clamp(1.25rem, 3vw, 1.75rem); }
  .hero__title { font-size: var(--step-h1); }
  .hero__subtitle {
    font-size: clamp(1.0625rem, 1.5vw + .7rem, 1.3rem);
    color: var(--text-muted); margin-top: .85rem; max-width: 46ch; text-wrap: pretty;
  }
  .hero__subtitle strong { color: var(--text); }
  .inline-code {
    font-family: var(--font-mono); font-weight: 700;
    background: var(--code-bg); padding: .1em .4em; border-radius: 6px;
    letter-spacing: .06em; color: var(--accent-hover); font-size: .95em;
  }
  .copy-chip {
    display: inline-flex; align-items: center; gap: .35em;
    font-family: var(--font-mono); font-weight: 800; font-size: .95em;
    letter-spacing: .06em; color: var(--accent-hover);
    background: var(--code-bg); border: 1px solid var(--accent);
    padding: .25em .6em; border-radius: var(--radius-pill); cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation; min-height: 44px;
  }
  .copy-chip:hover { background: var(--accent-soft); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--code-bg)); }
  .copy-chip:active { transform: scale(.97); }
  .copy-chip__icon { opacity: .8; flex-shrink: 0; }
  .copy-chip__icon--check { display: none; }
  .copy-chip[data-copied="true"] .copy-chip__icon--copy { display: none; }
  .copy-chip[data-copied="true"] .copy-chip__icon--check { display: block; opacity: 1; }

  /* ВАУЧЕР-КАРТА */
  .voucher__wrap {
    filter: var(--filter-voucher);
    margin: .5rem 0 .25rem;
    isolation: isolate;
  }
  .voucher {
    position: relative; display: grid; grid-template-columns: 1fr;
    background: transparent; border-radius: var(--radius-voucher);
    overflow: hidden; isolation: isolate;
  }
  .voucher__body {
    min-width: 0;
    padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1.25rem, 5vw, 2rem) 1.25rem;
    background: var(--accent-soft);
    background: radial-gradient(130% 90% at 18% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--accent-soft);
    /* Сквозная перфорация: вырезаем полукружки на нижних углах тела ваучера
       (вторая половина — на верхних углах .voucher__cta). Вместе — настоящие
       прозрачные отверстия на линии отрыва, учитываемые drop-shadow. */
    -webkit-mask:
      radial-gradient(circle 14px at 0 100%, transparent 97%, #000 100%),
      radial-gradient(circle 14px at 100% 100%, transparent 97%, #000 100%);
    -webkit-mask-composite: source-in;
    mask:
      radial-gradient(circle 14px at 0 100%, transparent 97%, #000 100%),
      radial-gradient(circle 14px at 100% 100%, transparent 97%, #000 100%);
    mask-composite: intersect;
  }
  .voucher__label {
    font-size: .75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .12em; color: var(--text-muted);
  }
  .voucher__code {
    font-family: var(--font-mono); font-weight: 800; font-size: var(--step-code);
    letter-spacing: .08em; color: var(--text); line-height: 1.1;
    margin: .5rem 0 .75rem; user-select: all; -webkit-user-select: all;
    font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
    white-space: nowrap; overflow-wrap: normal;
    max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    font-kerning: none; text-rendering: geometricPrecision;
  }
  .voucher__code::-webkit-scrollbar { display: none; }
  .voucher__meta { color: var(--text-muted); font-size: .9375rem; margin-bottom: .85rem; }
  .voucher__amount { color: var(--text); font-weight: 700; }
  .voucher__chips { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; min-height: 2rem; }
  .voucher__chip {
    display: inline-flex; align-items: center; padding: .3em .85em;
    background: var(--surface); color: var(--text);
    border-radius: var(--radius-pill); font-size: .8125rem; font-weight: 600;
    border: 1px solid var(--border);
  }
  .voucher__chip--count { font-family: var(--font-mono); color: var(--accent-hover); font-variant-numeric: tabular-nums; }
  .voucher__perf {
    height: 3px; margin-inline: 14px; box-sizing: border-box;
    background: var(--accent-soft);
    border-top: 3px dashed var(--perf);
  }
  .voucher__cta {
    position: relative;
    padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1.25rem, 5vw, 2rem);
    background: var(--accent-soft);
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--accent-soft) 80%, transparent)), var(--accent-soft);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    -webkit-mask:
      radial-gradient(circle 14px at 0 0, transparent 97%, #000 100%),
      radial-gradient(circle 14px at 100% 0, transparent 97%, #000 100%);
    -webkit-mask-composite: source-in;
    mask:
      radial-gradient(circle 14px at 0 0, transparent 97%, #000 100%),
      radial-gradient(circle 14px at 100% 0, transparent 97%, #000 100%);
    mask-composite: intersect;
  }
  .voucher__cta .btn--copy { display: flex; width: 100%; }
  .voucher__hint {
    font-size: .8125rem; color: var(--accent-hover);
    margin-top: .5rem; min-height: 1.1em; font-weight: 600;
  }

  /* КНОПКИ */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55em;
    padding: .85em 1.3em; min-height: 48px; font-weight: 700; font-size: 1rem;
    border-radius: var(--radius-btn); background: var(--accent); color: var(--accent-contrast);
    text-decoration: none; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .btn:hover { background: var(--accent-hover); }
  .btn:active { background: var(--accent-press); transform: scale(.98); }
  .btn__icon { flex-shrink: 0; }
  .btn--ghost { background: transparent; color: var(--text); border: 1.5px solid var(--control-border); }
  .btn--ghost:hover { background: var(--surface-2); border-color: var(--text-faint); }
  /* В тёмной теме transparent-фон сливается со страницей — кнопка с заливкой */
  :root[data-theme="dark"] .btn--ghost { background: var(--surface); }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn--ghost { background: var(--surface); }
  }
  .btn--sm { min-height: 44px; padding: .6em 1em; font-size: .875rem; }
  .btn--lg { min-height: 56px; font-size: 1.0625rem; }
  .btn--copy .btn__check {
    width: 0; opacity: 0; overflow: hidden;
    transition: width .25s ease, opacity .2s ease .05s;
  }
  .btn--copy[data-copied="true"] .btn__check { width: 1.25em; opacity: 1; }

  /* STORES */
  .stores { display: flex; flex-wrap: wrap; gap: .75rem; }
  .store {
    display: inline-flex; align-items: center; gap: .6em;
    padding: .6em 1.1em; min-height: 52px;
    background: var(--text); color: var(--surface); border-radius: var(--radius-btn);
    text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
    flex: 1 1 auto; justify-content: center; -webkit-tap-highlight-color: transparent;
  }
  .store:hover { transform: translateY(-1px); }
  .store:active { transform: translateY(0); }
  .store__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
  .store__small { font-size: .6875rem; opacity: .8; }
  .store__big { font-size: 1.0625rem; font-weight: 700; }
  .store[data-native="true"] {
    box-shadow: 0 0 0 2.5px var(--accent), 0 4px 14px -4px var(--accent); order: -1;
  }
  .store[data-native="false"] { opacity: .78; }
  .store-buffer { display: none; font-weight: 600; font-size: .8125rem; color: var(--text-muted); }
  body.is-armed .store-buffer { display: block; }

  .hero__cta .btn { width: 100%; }
  .hero__aside-actions { display: flex; flex-direction: column; gap: clamp(1rem, 2vw, 1.25rem); }
  .hero__aside-actions .btn--ghost { width: 100%; }

  /* STICKY-BAR */
  .stickybar {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: var(--surface); box-shadow: var(--shadow-sticky);
    border-top: 1px solid var(--border);
    padding: .6rem var(--gutter) calc(.6rem + var(--safe-bottom));
    z-index: 50; transform: translateY(110%);
    transition: transform .3s cubic-bezier(.2,.7,.2,1);
  }
  .stickybar[data-visible="true"] { transform: translateY(0); }
  .stickybar__inner {
    max-width: var(--container); margin: 0 auto;
    display: flex; align-items: center; gap: .75rem; min-width: 0;
  }
  .stickybar__code {
    font-family: var(--font-mono); font-weight: 800; font-size: 1.125rem;
    letter-spacing: .12em; color: var(--text); margin-right: auto;
    user-select: all; -webkit-user-select: all;
  }
  .stickybar__actions { display: flex; gap: .5rem; flex-shrink: 0; }
  .stickybar__label-short { display: none; }

  /* ШАГИ */
  .steps__list { display: grid; gap: clamp(1rem, 3vw, 1.5rem); }
  .step {
    position: relative; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-card); padding: clamp(1.25rem, 4vw, 1.75rem);
    display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; align-items: start;
  }
  .step--accent {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--accent-soft), var(--surface) 40%);
  }
  .step__num {
    font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
    color: var(--accent); letter-spacing: .02em; grid-row: 1;
  }
  .step__body { min-width: 0; }
  .step__title { font-family: var(--font-sans); font-weight: 800; font-size: var(--step-h3); margin-bottom: .3rem; letter-spacing: -.01em; }
  .step__text { color: var(--text-muted); }
  .step__store {
    color: var(--accent-hover); font-weight: 700; text-decoration: none;
    border-bottom: 1.5px solid transparent; transition: border-color .15s;
  }
  .step__store:hover { border-color: var(--accent-hover); }
  .step__hint { margin-top: .75rem; font-size: .9rem; color: var(--accent-hover); font-weight: 600; }

  /* УСЛОВИЯ */
  .terms__list { display: grid; gap: .85rem; }
  .term {
    display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: start;
    padding: 1rem 1.1rem; background: var(--surface-2);
    border-radius: var(--radius-btn); border: 1px solid var(--border);
  }
  .term__icon { color: var(--accent); display: inline-flex; flex-shrink: 0; }
  .term__text { color: var(--text); }
  .term__text strong { color: var(--text); }
  .term__note { display: block; margin-top: .2rem; font-size: .9em; color: var(--text-muted); }
  .terms__deadline {
    margin-top: 1.5rem; padding: 1rem 1.25rem;
    border: 1px dashed var(--border); border-radius: var(--radius-btn);
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: .75rem;
  }
  .terms__rules {
    display: inline-flex; align-items: center; gap: .35em;
    color: var(--accent-hover); font-weight: 600; text-decoration: none;
    border-bottom: 1.5px solid transparent; transition: border-color .15s;
  }
  .terms__rules:hover { border-color: var(--accent-hover); }
  .disclosure { margin-top: 1.5rem; padding: 1rem 1.1rem; font-size: .875rem; color: var(--text-muted); line-height: 1.55; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-btn); }
  .disclosure p { margin: 0; }
  .disclosure p + p { margin-top: .4rem; }
  .disclosure strong { color: var(--text); }

  /* FAQ */
  .faq__list { display: grid; gap: .6rem; }
  @supports (interpolate-size: allow-keywords) {
    .faq__list { interpolate-size: allow-keywords; }
  }
  .faq__item {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-btn); overflow: hidden;
  }
  .faq__item summary {
    list-style: none; cursor: pointer; padding: 1rem 1.1rem;
    font-weight: 600; font-size: 1.0625rem;
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; min-height: 48px;
  }
  .faq__item summary::-webkit-details-marker { display: none; }
  .faq__item summary::after {
    content: ""; width: 12px; height: 12px;
    border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg); transition: transform .2s ease; flex-shrink: 0; margin-top: -4px;
  }
  .faq__item[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .faq__answer { padding: 0 1.1rem 1.1rem; color: var(--text-muted); }
  @supports (interpolate-size: allow-keywords) {
    .faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size .3s ease; }
    .faq__item[open]::details-content { block-size: auto; }
  }

  /* CTA */
  .final-cta {
    display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
    text-align: center; background: var(--accent-soft);
    border-radius: var(--radius-voucher);
    padding: clamp(1.75rem, 5vw, 2.5rem);
  }
  .final-cta__title { font-size: var(--step-h2); }
  .final-cta__actions { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; width: 100%; max-width: 460px; }
  .final-cta .btn--copy { width: 100%; }
  .final-cta .stores { width: 100%; }

  .noscript-note {
    max-width: 60ch; margin: 1.5rem auto; padding: 1rem 1.1rem;
    background: var(--accent-soft); border: 1px solid var(--border);
    border-radius: var(--radius-btn); font-size: .9375rem; color: var(--text); line-height: 1.55;
  }

  /* ПОДВАЛ */
  .footer {
    max-width: var(--container); margin: 0 auto;
    padding: clamp(.4rem, 1.2vw, .7rem) var(--gutter);
    display: flex; flex-direction: column; gap: .5rem; align-items: flex-start;
  }
  .footer__note { color: var(--text-faint); font-size: .8125rem; }
  .footer__links { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: .875rem; }
  .footer__links a { color: var(--accent-hover); text-decoration: none; border-bottom: 1px solid transparent; }
  .footer__links a:hover { border-color: var(--accent-hover); }

  /* TOAST */
  .toast {
    position: fixed; left: 50%; bottom: calc(1rem + var(--safe-bottom));
    transform: translate(-50%, 150%);
    background: var(--text); color: var(--surface);
    padding: .85em 1.25em; border-radius: var(--radius-pill);
    font-size: .9rem; font-weight: 600;
    box-shadow: var(--shadow-toast);
    z-index: 60; max-width: calc(100vw - 2rem);
    transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .3s; opacity: 0;
  }
  .toast[data-visible="true"] { transform: translate(-50%, 0); opacity: 1; }
  body.sticky-on .toast { bottom: calc(4.5rem + var(--safe-bottom)); }
  body:has(.stickybar[data-visible="true"]) .toast { bottom: calc(4.5rem + var(--safe-bottom)); }

  /* HERO — VERIFIED */
  .hero__verified {
    display: inline-flex; align-items: center; gap: .45rem;
    font-size: .8125rem; font-weight: 600; color: var(--text-muted);
    max-width: max-content;
  }
  .hero__verified-icon { width: 16px; height: 16px; flex: 0 0 16px; color: var(--accent-hover); }

  /* ОПРЕДЕЛЕНИЕ */
  .definition {
    display: grid; grid-template-columns: auto 1fr; gap: 1rem 1.25rem; align-items: start;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-card); padding: clamp(1.25rem, 4vw, 1.75rem);
  }
  .definition__icon { flex-shrink: 0; border-radius: var(--radius-btn); }
  .definition__title { font-size: var(--step-h3); margin-bottom: .4rem; }
  .definition__text { color: var(--text-muted); line-height: 1.6; }

  /* ГОРОДА */
  .cities__chips {
    display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem;
  }
  .cities__chip {
    display: inline-flex; align-items: center;
    padding: .5em 1em; border-radius: var(--radius-pill);
    background: var(--surface-2); border: 1px solid var(--border);
    font-size: .9375rem; color: var(--text-muted);
  }
  .cities__chip--strong {
    color: var(--text); font-weight: 700;
    border-color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
    background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  }
  .cities__hint { margin-top: 1rem; font-size: .875rem; color: var(--text-muted); }

  /* УСЛОВИЯ — ДОП */
  .terms__faq-link {
    margin-top: 1rem; font-size: .9375rem;
  }
  .terms__faq-link a {
    color: var(--accent-hover); font-weight: 600; text-decoration: none;
    border-bottom: 1px solid transparent; transition: border-color .15s;
  }
  .terms__faq-link a:hover { border-color: var(--accent-hover); }

  /* FAQ — SIMPLE LIST */
  .faq__list-simple { padding-left: 1.25rem; margin: .5rem 0; }
  .faq__list-simple li { list-style: disc; margin-bottom: .3rem; }
}

@layer motion {
  .step[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
  .step[data-reveal][data-revealed="true"] { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .step[data-reveal] { opacity: 1; transform: none; }
  }
}

[hidden] { display: none !important; }

/* АДАПТИВНОСТЬ */
@media (min-width: 640px) {
  /* Hero на 640–1023 остаётся одноколоночным: двухколоночная раскладка здесь
     обрезала H1 (Unbounded очень широкий) и моноширинный код ваучера. */
  .steps__list { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .step { grid-template-rows: auto 1fr; }
  .terms__list { grid-template-columns: 1fr 1fr; }
  .terms__deadline { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 55fr 45fr; align-items: start; gap: clamp(1.5rem, 4vw, 2.5rem); width: 100%; }
  /* CTA (слева) и «Как получить»+сторы (справа) — на одном уровне (row2).
     H1 и ваучер — в row1. */
  .hero__copy { grid-column: 1; grid-row: 1; }
  .hero__cta { grid-column: 1; grid-row: 2; }
  .hero__aside { grid-column: 2; grid-row: 1; }
  .hero__aside-actions { grid-column: 2; grid-row: 2; }
  .faq__list { grid-template-columns: 1fr 1fr; align-items: start; }
  /* content-visibility:auto не используем: секции #terms/#cities/#faq — цели якорей,
     а auto + contain-intrinsic-size ломает приземление по якорю. Страница маленькая, выгода незначительна. */
}

/* «2000 бонусов» с nbsp — неразрывная связка ~9em; на ≤370px при --step-h1
   она шире колонки и визуально обрезается. Сужаем только заголовок. */
@media (max-width: 370px) {
  .hero__title { font-size: clamp(1.75rem, 8vw, 2rem); }
}

@media (max-width: 480px) {
  /* sticky-бар: полный лейбл «Открыть Делимобиль» не влезает — короткий вариант */
  .stickybar__label-full { display: none; }
  .stickybar__label-short { display: inline; }
  .stickybar__code { font-size: .95rem; letter-spacing: .08em; }
  /* btn--lg: «Скопировать промокод» не должна переноситься на две строки */
  .btn--lg { min-height: 52px; font-size: 1rem; }
}
@media (max-width: 359px) {
  /* на 320px оставляем только primary-действие */
  .stickybar__actions .btn--ghost { display: none; }
}
