/* ============================================================================
   Samal & Meganet — promo landing — design system (Module 01)
   Palette (ТЗ1 §2): green #159c33 · dark #333 · accent yellow #faff00.
   Art direction: Apple-grade restraint (clarity / hierarchy / deference) fused
   with brand expressiveness. Yellow is a *spark*, never a flat slab. Green leads
   intent; dark grounds text; white & soft tints carry the air.
   Mobile-first → desktop. Accessibility is craft: AA contrast, visible focus,
   ≥44px targets, reduced-motion honoured, no horizontal scroll.
   ========================================================================== */

:root {
  /* --- Brand & ink ----------------------------------------------------- */
  --green: #159c33;          /* brand green — accents, large type, borders, chips */
  --green-cta-1: #0f8a2b;    /* AA-safe gradient top for white CTA text (~4.6:1) */
  --green-cta-2: #0c6f23;    /* AA-safe gradient bottom (~6:1) */
  --green-700: #0e7726;      /* text/link green on white (~5.7:1) — white-on-green fills */
  --green-800: #0a5c1d;
  --green-dark: #0e7726;     /* back-compat alias (links) */
  --green-050: #f1f9f3;
  --green-100: #e0f2e6;
  --green-200: #c4e7cd;

  --accent: #faff00;         /* dosed: badges / one rule per surface / accent CTA */
  --accent-soft: #fffce0;    /* faint tint for the KZ status banner */
  --accent-edge: #d9d600;    /* darker yellow hairline so it reads on white */
  --accent-deep: #8a5a00;    /* readable amber text for promo notes */

  --dark: #333;              /* brand dark (spec) — primary headings/text */
  --ink-strong: #1b1f1b;     /* display headings — max punch */
  --ink: #333;               /* body text */
  --muted: #5b615b;          /* secondary text (~5.8:1) */
  --faint: #828a82;          /* tertiary / decorative only */
  --ink-dark-bg: #15181a;    /* dark section background */

  --bg: #ffffff;
  --bg-soft: #f5f7f4;
  --bg-tint: #eef5f0;
  --surface: #ffffff;
  --line: #e6eae4;
  --line-strong: #d4dacf;

  /* --- Type ------------------------------------------------------------ */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --fs-eyebrow: .78rem;
  --fs-xs: .8rem;
  --fs-sm: .9rem;
  --fs-base: 1.0625rem;      /* 17px */
  --fs-md: 1.15rem;
  --fs-lead: clamp(1.12rem, 1.02rem + .55vw, 1.32rem);
  --fs-h3: clamp(1.16rem, 1.06rem + .5vw, 1.42rem);
  --fs-h2: clamp(1.7rem, 1.28rem + 2vw, 2.55rem);
  --fs-display: clamp(2.35rem, 1.5rem + 4.3vw, 4.05rem);
  --lh-tight: 1.05;
  --lh-snug: 1.18;
  --lh-base: 1.6;
  --track-tight: -0.022em;
  --track-eyebrow: 0.13em;

  /* --- Space / rhythm -------------------------------------------------- */
  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem; --sp-9: 6rem;
  --section-y: clamp(3.25rem, 2rem + 6vw, 6.25rem);
  --gutter: clamp(1.1rem, .55rem + 2vw, 2rem);
  --maxw: 1140px;

  /* --- Radius ---------------------------------------------------------- */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --space: 1rem;             /* back-compat alias */

  /* --- Elevation (soft, brand-tinted) ---------------------------------- */
  --shadow-xs: 0 1px 2px rgba(20,32,20,.06);
  --shadow-sm: 0 2px 10px -2px rgba(20,32,20,.08), 0 1px 2px rgba(20,32,20,.05);
  --shadow-md: 0 14px 34px -16px rgba(18,44,22,.22), 0 3px 10px -4px rgba(18,44,22,.08);
  --shadow-lg: 0 30px 64px -24px rgba(14,70,30,.30), 0 8px 24px -12px rgba(18,44,22,.12);
  --shadow-green: 0 26px 56px -22px rgba(21,156,51,.42), 0 6px 18px -8px rgba(21,156,51,.22);

  /* --- Motion ---------------------------------------------------------- */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-in-out: cubic-bezier(.62,.05,.36,1);
  --dur-1: .14s; --dur-2: .24s; --dur-3: .42s;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: var(--lh-base);
  font-size: var(--fs-base);
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
}

h1, h2, h3, h4 {
  line-height: var(--lh-snug);
  color: var(--dark);
  letter-spacing: var(--track-tight);
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }
a { color: var(--green-dark); }
img, svg { max-width: 100%; }
img { height: auto; }
strong { font-weight: 700; }
:where(section[id], [id]) { scroll-margin-top: 76px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------- focus (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 8px;
}
/* High-contrast focus on dark surfaces */
.trust :focus-visible, .urgency :focus-visible, .site-footer :focus-visible {
  outline-color: var(--accent);
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--dark);
  padding: .65rem 1rem; z-index: 100; font-weight: 700; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------- shared components */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 0 0 .85rem;
  font-size: var(--fs-eyebrow); font-weight: 700;
  letter-spacing: var(--track-eyebrow); text-transform: uppercase;
  color: var(--green-700);
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(21,156,51,.16);
}

.section__head { max-width: 56ch; margin-bottom: clamp(1.4rem, 1rem + 1.6vw, 2.6rem); }
.section__title { font-size: var(--fs-h2); margin: 0 0 .5rem; }
.section__sub { color: var(--muted); font-size: var(--fs-lead); margin: 0; }
.hint { color: var(--muted); font-size: var(--fs-sm); margin: .4rem 0 0; }

section { padding: var(--section-y) 0; }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .8rem 1.4rem;
  border-radius: var(--radius-pill); border: 1.5px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--dur-1) var(--ease),
              box-shadow var(--dur-2) var(--ease),
              background var(--dur-2) var(--ease),
              border-color var(--dur-2) var(--ease),
              color var(--dur-2) var(--ease);
}
.btn--lg { min-height: 54px; padding: 1rem 1.8rem; font-size: 1.05rem; }
.btn__icon { width: 1.15em; height: 1.15em; flex: 0 0 auto;
  transition: transform var(--dur-2) var(--ease); }

.btn--primary {
  background: linear-gradient(180deg, var(--green-cta-1), var(--green-cta-2));
  color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.16);
}
.btn--primary:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn--primary:hover .btn__icon { transform: translateX(3px); }
.btn--primary:active { transform: translateY(0) scale(.99); box-shadow: var(--shadow-sm); }

.btn--ghost { background: #fff; color: var(--dark); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--green); color: var(--green-700);
  box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn--ghost:active { transform: translateY(0); }

.btn--accent { background: var(--accent); color: var(--dark); box-shadow: var(--shadow-sm); }
.btn--accent:hover { transform: translateY(-1px); box-shadow: var(--shadow-md);
  filter: saturate(1.05) brightness(1.02); }
.btn--accent:active { transform: translateY(0); }

/* Secondary / neutral surface — sober affordance for admin actions that are neither the
   primary CTA nor destructive (e.g. «Открыть вручение», «Одобрить»). A defined border + light
   fill make a bare action read as a real, tappable control instead of unstyled link text; the
   #333-on-soft fill is high-contrast and the ≥44px target comes from .btn--small. */
.btn--neutral { background: var(--bg-soft); color: var(--dark); border-color: var(--line-strong); }
.btn--neutral:hover { background: #fff; border-color: var(--green); color: var(--green-700);
  box-shadow: var(--shadow-xs); transform: translateY(-1px); }
.btn--neutral:active { transform: translateY(0); box-shadow: none; }

/* --------------------------------------------------------- header/nav */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex; align-items: center; gap: .9rem;
  min-height: 60px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; gap: .42rem; align-items: center;
  text-decoration: none; font-weight: 800; font-size: 1.18rem;
  letter-spacing: -.02em;
}
.brand__mark { width: 22px; height: 22px; color: var(--green); flex: 0 0 auto; }
.brand__samal { color: var(--green); }
.brand__amp { color: var(--faint); font-weight: 500; }
.brand__meganet { color: var(--dark); }

.nav { display: none; gap: 1.4rem; margin-left: auto; }
.nav a {
  position: relative; color: var(--dark); text-decoration: none;
  font-weight: 600; font-size: .96rem; padding: .4rem 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: .1rem; height: 2px;
  background: var(--green); border-radius: 2px;
  transition: right var(--dur-2) var(--ease);
}
.nav a:hover { color: var(--green-700); }
.nav a:hover::after { right: 0; }

.header-cta { display: none; }

.lang {
  margin-left: auto; display: inline-flex; align-items: center;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 3px; gap: 2px;
}
.lang__btn {
  padding: .4rem .75rem; min-height: 44px; display: inline-flex; align-items: center;
  text-decoration: none; color: var(--muted); font-weight: 700; font-size: .82rem;
  border-radius: var(--radius-pill); transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.lang__btn:hover { color: var(--dark); }
.lang__btn--active { background: var(--green-700); color: #fff; }

.kz-banner {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-edge);
  box-shadow: inset 4px 0 0 var(--accent);
  color: var(--dark);
  padding: .7rem var(--gutter); font-size: .92rem; text-align: center; font-weight: 500;
}

/* ============================================================ BLOCK 1 — hero */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(2.4rem, 1.5rem + 4vw, 5rem) 0 clamp(3rem, 2rem + 4vw, 5.5rem);
  background:
    radial-gradient(82% 60% at 80% -10%, rgba(21,156,51,.16), transparent 60%),
    radial-gradient(60% 48% at 4% 8%, rgba(21,156,51,.07), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
}
.hero::before { /* faint dotted texture for depth */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(21,156,51,.07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, transparent 92%);
  mask-image: linear-gradient(180deg, transparent, #000 30%, transparent 92%);
  opacity: .6;
}
.hero__grid { display: grid; gap: clamp(1.8rem, 1rem + 3vw, 3.2rem); align-items: center; }

.hero__eyebrow { color: var(--green-700); }
.hero__eyebrow .eyebrow__dot { animation: pulse 2.4s var(--ease-in-out) infinite; }

.hero__slogan {
  font-size: var(--fs-display); line-height: var(--lh-tight);
  letter-spacing: var(--track-tight); color: var(--ink-strong);
  margin: 0 0 .7rem; max-width: 16ch;
}
.hero__slogan::after {
  content: ""; display: block; width: 72px; height: 6px; margin-top: .85rem;
  background: var(--accent); border-radius: 4px;
  box-shadow: 0 2px 8px rgba(217,214,0,.45);
}
.hero__hook {
  font-size: var(--fs-h3); font-weight: 700; color: var(--dark);
  letter-spacing: -.01em; margin: 0 0 .55rem; max-width: 30ch;
}
.hero__sub { color: var(--muted); font-size: var(--fs-lead); max-width: 44ch; margin: 0 0 1.5rem; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 1.1rem 1.4rem; margin: 0 0 .4rem; }
.hero__cta-group { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; min-width: 0; }
.hero__cta .btn { width: 100%; }
.hero__cta-sub, .hero__hint { font-size: var(--fs-sm); color: var(--muted); margin: 0; max-width: 36ch; }
.hero__hint { font-weight: 500; }

/* prize showcase (ТЗ1: «Фокус на призах») */
.hero__showcase { display: grid; gap: 1rem; align-content: start; }
.prizes { display: grid; gap: 1rem; }

.prize {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; background: var(--surface); box-shadow: var(--shadow-sm);
}
.prize--super {
  border-color: rgba(21,156,51,.3);
  background:
    radial-gradient(130% 90% at 100% 0%, rgba(21,156,51,.09), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-green);
}
.prize--super::before { /* dosed yellow corner spark */
  content: ""; position: absolute; top: -34px; right: -34px; width: 130px; height: 130px;
  background: radial-gradient(circle at 32% 68%, rgba(250,255,0,.55), transparent 70%);
  pointer-events: none;
}
.prize__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.prize__eyebrow {
  font-size: var(--fs-eyebrow); font-weight: 800; letter-spacing: var(--track-eyebrow);
  text-transform: uppercase; color: var(--green-700);
}
.prize__badge {
  background: var(--accent); color: var(--dark); font-weight: 800;
  padding: .32rem .7rem; border-radius: var(--radius-pill);
  font-size: .82rem; letter-spacing: -.01em; box-shadow: var(--shadow-xs);
  white-space: nowrap;
}
.prize__icon {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: .85rem;
  background: var(--green-050); color: var(--green-700);
  display: grid; place-items: center;
}
.prize__icon svg { width: 26px; height: 26px; }
.prize__text { margin: 0; color: var(--ink); }
.prize--super .prize__text { font-size: 1.02rem; }
.prize--weekly { background: var(--bg-soft); }
.prizes__note { font-size: var(--fs-xs); color: var(--muted); margin: .2rem 0 0; }

/* pending discipline — a placeholder must never read as a real value */
.pending { color: var(--muted); font-style: italic; }
.pending__tag {
  display: inline-block; font-style: normal; font-weight: 800; font-size: .66rem;
  letter-spacing: .04em; text-transform: uppercase;
  background: #fff6c2; color: #6b5b00; border: 1px solid #e9d97a;
  padding: .06rem .42rem; border-radius: 6px; vertical-align: middle; white-space: nowrap;
}

/* ============================================================ BLOCK 2 — steps */
.how { background: var(--bg); }
.how__head { margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.8rem); }
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: clamp(.9rem, .5rem + 1.5vw, 1.3rem);
}
.step {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.6rem 1.4rem 1.4rem; box-shadow: var(--shadow-xs);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-200); }
.step__num {
  position: absolute; top: .7rem; right: 1.1rem;
  font-size: 2.7rem; font-weight: 800; line-height: 1;
  color: var(--green-100); letter-spacing: -.04em; user-select: none;
}
.step__icon {
  display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 1.1rem;
  border-radius: 15px; background: var(--green-050); color: var(--green-700);
  box-shadow: inset 0 0 0 1px rgba(21,156,51,.12);
}
.step__icon svg { width: 26px; height: 26px; }
.step__body p { margin: 0; }
.step__body > p { font-weight: 500; color: var(--ink); }
.step__extra { margin-top: .65rem !important; font-size: var(--fs-sm); }

/* ============================================================ BLOCK 2.5 — trust (dark band) */
.trust {
  position: relative; isolation: isolate; color: #e9ede9;
  background:
    radial-gradient(70% 80% at 88% 0%, rgba(21,156,51,.22), transparent 55%),
    radial-gradient(50% 60% at 0% 100%, rgba(21,156,51,.12), transparent 55%),
    var(--ink-dark-bg);
}
.trust__grid { display: grid; gap: clamp(1.8rem, 1rem + 3vw, 3rem); }
.trust .section__title { color: #fff; }
.trust .section__title::after {
  content: ""; display: block; width: 56px; height: 4px; margin-top: .8rem;
  background: var(--accent); border-radius: 3px;
}
.trust__lead { color: #b9c2b9; font-size: var(--fs-lead); max-width: 46ch; margin: 1.1rem 0 1.6rem; }
.trust__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.trust__point {
  display: flex; gap: .85rem; align-items: flex-start;
  font-size: 1.04rem; color: #dfe5df;
}
.trust__check {
  flex: 0 0 auto; width: 28px; height: 28px; padding: 4px; border-radius: 50%;
  color: var(--green); background: rgba(21,156,51,.16); margin-top: -1px;
}

.winners {
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg); padding: clamp(1.3rem, 1rem + 1.5vw, 1.9rem);
  align-self: start;
}
.winners__title { color: #fff; font-size: var(--fs-h3); margin: 0 0 1rem; }
.winners__placeholder {
  display: grid; place-items: center; gap: .85rem; text-align: center;
  border: 1.5px dashed rgba(255,255,255,.2); border-radius: var(--radius);
  padding: 1.8rem 1.2rem; background: rgba(0,0,0,.16);
}
.winners__trophy { width: 44px; height: 44px; color: var(--accent); }
.winners__placeholder .pending { color: #c8d0c8; }
.winners__placeholder .pending__tag { background: rgba(250,255,0,.14); color: #f3f0b0; border-color: rgba(250,255,0,.4); }
.winners__photo { color: #9aa39a; font-size: var(--fs-sm); margin: 1rem 0 0; }

/* ============================================================ BLOCK 3 — coverage */
.coverage { background: var(--bg); }
.coverage__intro { color: var(--muted); font-size: var(--fs-lead); max-width: 60ch; margin: 0; }
.coverage__grid { display: grid; gap: clamp(1.2rem, .8rem + 1.6vw, 2rem); align-items: start; }

.coverage__map {
  position: relative; overflow: hidden;
  border: 1px solid var(--green-200); border-radius: var(--radius-lg);
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(21,156,51,.10), transparent 60%),
    linear-gradient(160deg, var(--green-050), #fff);
  padding: 1.6rem;
}
.router-fig {
  display: grid; place-items: center; margin: 0 0 1.1rem;
  width: 84px; height: 84px; border-radius: 22px;
  background: #fff; color: var(--green-700);
  box-shadow: var(--shadow-sm); border: 1px solid var(--green-100);
}
.router-fig svg { width: 46px; height: 46px; }
.coverage__map-note { margin: 0 0 1rem; color: var(--muted); font-size: var(--fs-sm); }
.coverage__cities { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.coverage__cities li {
  background: var(--green-700); color: #fff; padding: .34rem .8rem;
  border-radius: var(--radius-pill); font-size: .86rem; font-weight: 600;
  box-shadow: var(--shadow-xs);
}
.coverage__conflict { font-size: var(--fs-xs); color: var(--muted); margin: 1rem 0 0; }

.coverage__panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 1rem + 1vw, 1.7rem); box-shadow: var(--shadow-sm);
}
.coverage__result { margin-top: 1rem; }

/* --------------------------------------------------------------- forms */
.form { display: grid; gap: 1rem; max-width: 520px; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .92rem; color: var(--dark); }
.field input, .field select, .tariff-calc select {
  min-height: 48px; padding: .6rem .8rem; width: 100%;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.field input:hover, .field select:hover { border-color: var(--green-200); }
.field input:focus, .field select:focus, .tariff-calc select:focus {
  border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(21,156,51,.18);
}
.field__error { color: #b00020; font-size: .85rem; margin: 0; font-weight: 600; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: .12rem; flex: 0 0 auto; accent-color: var(--green); }

/* --------------------------------------------- htmx loading (progressive) */
/* Submit row holds the button + an inline busy indicator. The indicator only
   exists for the htmx path; without JS the plain POST navigates and it never
   shows. CSP-safe (no injected htmx style tag) — defined here, toggled by the
   `htmx-request` class htmx adds to the in-flight form. */
.form__submit, .tariff-calc .form__submit {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
}
.form__loading {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
}
.htmx-indicator { opacity: 0; transition: opacity var(--dur-2) var(--ease); }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }
.spinner {
  width: 18px; height: 18px; flex: 0 0 auto; border-radius: 50%;
  border: 2.5px solid var(--green-200); border-top-color: var(--green-700);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
button[disabled], .btn[disabled], button[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; box-shadow: none; transform: none;
}

.result { border-radius: var(--radius-lg); padding: 1.3rem; }
.result--ok {
  background: linear-gradient(180deg, var(--green-050), #fff);
  border: 1px solid var(--green-200);
}
.result--ok strong { color: var(--green-800); }
.result--ok .btn { margin-top: .8rem; }
/* Well-formed but not accepted (duplicate / daily cap): amber, informative — not
   an input error (those render inline on the date/digits fields). */
.result--warn {
  background: var(--accent-soft);
  border: 1px solid var(--accent-edge);
  box-shadow: inset 4px 0 0 var(--accent);
}
.result--warn p { color: var(--accent-deep); margin: 0; }
.result--lead { background: var(--bg-soft); border: 1px solid var(--line); }

/* --------------------------------------------- modal (CSS :target, no-JS) */
.modal { position: fixed; inset: 0; z-index: 60; display: none; }
.modal:target { display: block; }
/* The retention dialog is focused programmatically by app.js (tabindex=-1); it is
   a full-viewport container, so suppress its outline — the trapped controls inside
   keep their own visible focus. */
.modal:focus { outline: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15,25,15,.5);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal__panel {
  position: relative; z-index: 1; background: #fff; max-width: 540px;
  margin: 8vh auto 0; padding: 1.6rem; border-radius: var(--radius-lg);
  max-height: 84vh; overflow: auto; width: calc(100% - 2rem);
  box-shadow: var(--shadow-lg);
}
.modal:target .modal__panel { animation: pop var(--dur-3) var(--ease) both; }
.modal__close {
  position: absolute; top: .6rem; right: .8rem; font-size: 1.7rem; line-height: 1;
  text-decoration: none; color: var(--muted); width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.modal__close:hover { background: var(--bg-soft); color: var(--dark); }
.modal__title { margin: 0 0 .4rem; font-size: var(--fs-h3); color: var(--dark); }

/* Retention modal (cabinet) opens on load — post-registration there is no URL
   fragment to :target. It still closes WITHOUT JS: the closer anchor precedes the
   modal, so :target on it hides the following .modal--open (sibling combinator —
   no :has(), works in every browser). */
.modal-anchor { display: block; height: 0; overflow: hidden; }
.modal--open { display: block; }
.modal--open .modal__panel { animation: pop var(--dur-3) var(--ease) both; }
#receipt-warning-closed:target ~ .modal--open { display: none; }

/* ============================================================ BLOCK 4 — tariffs */
.tariffs { background: var(--bg-soft); }
.tariffs__note { margin: 0 0 1.4rem; }
.tariff-calc {
  display: grid; gap: 1.3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 1rem + 1vw, 1.8rem); max-width: 660px; box-shadow: var(--shadow-sm);
}
.tariff-calc__group { border: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.tariff-calc__group legend {
  font-weight: 700; padding: 0; margin-bottom: .35rem;
  font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.seg {
  display: inline-flex; gap: .55rem; align-items: center;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .6rem .8rem; cursor: pointer; min-height: 48px; background: #fff;
  font-weight: 600; color: var(--dark);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.seg:hover { border-color: var(--green-200); }
.seg input { width: 20px; height: 20px; accent-color: var(--green); }
.seg:has(input:checked) {
  border-color: var(--green); background: var(--green-050);
  box-shadow: 0 0 0 1px var(--green) inset;
}
.tariff-calc__options { gap: .85rem; }

.tariff-result { margin-top: 1.3rem; }
.quote {
  background: #fff; border: 1px solid var(--green-200); border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 1rem + 1vw, 1.7rem); max-width: 660px;
  box-shadow: var(--shadow-md); font-feature-settings: "tnum" 1;
}
.quote__name { margin: 0 0 .9rem; color: var(--green-800); font-size: var(--fs-h3); }
.quote__lines { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.quote__lines li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line); }
.quote__old { text-decoration: line-through; color: var(--faint); margin-right: .5rem; }
.quote__new { font-size: 1.7rem; font-weight: 800; color: var(--green-800); letter-spacing: -.02em; }
.quote__badge {
  display: inline-block; margin-left: .5rem; background: var(--accent); color: var(--dark);
  font-weight: 800; padding: .14rem .55rem; border-radius: var(--radius-pill); font-size: .8rem;
}
.quote__promo { display: grid; gap: .35rem; }
.quote__total strong { font-size: 1.45rem; color: var(--green-800); }
.quote__note { color: var(--accent-deep); font-size: .85rem; margin: .5rem 0 0; }
.quote__pending-total { color: var(--muted); }
.quote .btn { margin-top: 1rem; }

/* ============================================================ BLOCK 5 — FAQ */
.faq { background: var(--bg); }
.faq__list { display: grid; gap: .7rem; max-width: 800px; }
.faq__item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; padding: 0 1.2rem; box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.faq__item:hover { border-color: var(--green-200); }
.faq__q {
  cursor: pointer; font-weight: 700; padding: 1.05rem 2.2rem 1.05rem 0; list-style: none;
  position: relative; color: var(--dark);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: ""; position: absolute; right: .1rem; top: 50%; width: 14px; height: 14px;
  margin-top: -7px;
  background:
    linear-gradient(var(--green-700), var(--green-700)) center/14px 2px no-repeat,
    linear-gradient(var(--green-700), var(--green-700)) center/2px 14px no-repeat;
  transition: transform var(--dur-2) var(--ease);
}
.faq__item[open] { border-color: var(--green); box-shadow: var(--shadow-sm); }
.faq__item[open] .faq__q::after { transform: rotate(90deg); opacity: .9;
  background: linear-gradient(var(--green-700), var(--green-700)) center/14px 2px no-repeat; }
.faq__a { padding: 0 0 1.1rem; color: var(--muted); }
.faq__a p { margin: 0; }

/* ============================================================ urgency strip */
.urgency {
  background: linear-gradient(120deg, var(--green-800), var(--green));
  color: #fff; padding: clamp(1.6rem, 1.2rem + 1.5vw, 2.4rem) 0;
}
.urgency__row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.6rem; justify-content: space-between; }
.urgency__text { margin: 0; font-size: var(--fs-md); font-weight: 600; max-width: 62ch; }
.urgency .btn--accent { flex: 0 0 auto; }

/* ============================================================ footer */
.site-footer { background: var(--ink-dark-bg); color: #d7dcd7; padding: clamp(2.6rem, 2rem + 2vw, 4rem) 0 2.4rem; }
.site-footer a { color: #fff; }
.site-footer__title { color: #fff; font-size: var(--fs-h3); margin: 0 0 1rem; }
.footer-contacts { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .4rem; }
.footer-contacts .pending { color: #c2c8c2; }
.footer-links { display: grid; gap: .55rem; margin-bottom: 1.4rem; }
.footer-links a { text-decoration: none; color: #d7dcd7; transition: color var(--dur-2) var(--ease); }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-note { color: #9aa39a; font-size: .82rem; margin: 1.2rem 0 0; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.1); }

/* ============================================================ stubs / legal / 404 */
.stub, .legal { background: #fff; min-height: 52vh; }
.legal__draft {
  background: #fff6c2; border: 1px solid #e9d97a; color: #6b5b00;
  padding: .9rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-weight: 600;
}

/* ============================================================ Module 02 — participant cabinet */
/* Auth-gated cabinet: restrained & functional (CLAUDE.md), built on the M01
   tokens/components. Adds authenticated sub-nav, dev mock-OTP notice, balance
   card, consents, retention warnings, the «where are the digits» receipt hint,
   and the empty history skeletons. Mobile-first; AA contrast; ≥44px targets. */

.container--narrow { max-width: 720px; }

.cab { background: var(--bg); padding-top: clamp(1.8rem, 1.3rem + 2.4vw, 3rem); }
.cab--auth {
  background:
    radial-gradient(72% 50% at 50% -8%, rgba(21,156,51,.08), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), #fff);
  min-height: 62vh;
}
.cab .section__title { margin-bottom: .4rem; }
.cab__intro { color: var(--muted); font-size: var(--fs-lead); max-width: 54ch; margin: 0 0 1.6rem; }
.cab__greeting { font-weight: 600; color: var(--green-800); margin: -.2rem 0 1.3rem; }
.cab__note { color: var(--muted); font-size: var(--fs-sm); margin: .9rem 0 0; max-width: 50ch; }

/* --- authenticated sub-navigation (sits under the sticky site header) --- */
.cab-nav {
  position: sticky; top: 60px; z-index: 30;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.cab-nav__row {
  display: flex; align-items: center; gap: .4rem 1rem;
  min-height: 56px; flex-wrap: wrap; justify-content: space-between;
}
.cab-nav__links { display: flex; flex-wrap: wrap; gap: .2rem; margin-left: -.55rem; }
.cab-nav__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .75rem;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem;
  border-radius: var(--radius-pill);
  transition: color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.cab-nav__link:hover { color: var(--green-700); background: var(--green-050); }
.cab-nav__link--active { color: var(--green-800); background: var(--green-100); }
.cab-nav__logout { margin: 0; }

.btn--sm { min-height: 44px; padding: .5rem 1rem; font-size: .9rem; }

/* --- cabinet forms --- */
.cab-form { max-width: 520px; }
.cab-form--resend { margin-top: 1.1rem; }

/* dev mock OTP — clearly flagged demo code (AUTH_DEV_CODE), never a live channel */
.cab-devcode {
  display: flex; align-items: baseline; gap: .3rem .9rem; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid var(--accent-edge);
  border-radius: var(--radius-sm); padding: .85rem 1.05rem; margin: 0 0 1.2rem;
}
.cab-devcode__label {
  font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-deep);
}
.cab-devcode__value {
  font-size: 1.55rem; font-weight: 800; letter-spacing: .24em; color: var(--dark);
  font-feature-settings: "tnum" 1;
}

/* --- dashboard balance card --- */
.cab-balance {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(21,156,51,.08), transparent 55%),
    linear-gradient(160deg, var(--green-050), #fff);
  border: 1px solid var(--green-200); border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 1rem + 1.6vw, 2rem); box-shadow: var(--shadow-sm);
  margin: 0 0 1.5rem;
}
.cab-balance__label {
  display: block; font-size: var(--fs-eyebrow); font-weight: 800;
  letter-spacing: var(--track-eyebrow); text-transform: uppercase; color: var(--green-700);
  margin-bottom: .35rem;
}
.cab-balance__value {
  display: block; font-size: clamp(2.7rem, 2rem + 3vw, 3.7rem); font-weight: 800;
  line-height: 1; color: var(--green-800); letter-spacing: -.03em;
  font-feature-settings: "tnum" 1;
}
.cab-balance .hint { margin-top: .65rem; max-width: 48ch; }

.cab-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.cab-actions .btn { flex: 1 1 12rem; }

/* --- consents fieldset (registration) --- */
.consents {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft);
  padding: 1.1rem 1.2rem 1.2rem; margin: 0; display: grid; gap: .8rem;
}
.consents legend { font-weight: 700; padding: 0 .4rem; color: var(--dark); font-size: 1rem; }
.consents > .hint { margin: 0 0 .2rem; }
.consents .check { font-size: .94rem; }
.check__req { color: #b00020; font-weight: 800; margin-left: .15rem; }
.check__doc {
  position: relative;
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: .4rem;
  border: 1px solid var(--green-200); border-radius: 50%;
  color: var(--green-700); text-decoration: none; font-size: .72rem; font-weight: 800;
  line-height: 1; vertical-align: middle; flex: 0 0 auto;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
/* ≥44px tap target without enlarging the visible disc: a transparent, centered
   overlay expands the pointer/touch area (WCAG 2.5.5). */
.check__doc::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px; transform: translate(-50%, -50%);
}
.check__doc:hover { background: var(--green-050); border-color: var(--green); }

/* --- receipt-retention warnings (icon + text; zettel 10) --- */
.cab-warning { display: flex; gap: .8rem; align-items: flex-start; }
.cab-warning p { margin: 0; }
.cab-warning__icon { width: 26px; height: 26px; flex: 0 0 auto; color: var(--accent-deep); margin-top: .1rem; }
.cab-warning--inline {
  background: var(--accent-soft); border: 1px solid var(--accent-edge);
  border-radius: var(--radius-sm); padding: .9rem 1.05rem; margin: 0 0 1.5rem;
}
.cab-warning--inline p { font-size: var(--fs-sm); color: var(--accent-deep); font-weight: 500; }

/* --- «where on the receipt are the digits» hint (AC-CAB-6) --- */
/* Real example photo is customer media (КП exclusion / pending). This is a
   neutral illustrative placeholder pointing at the last N digits. */
.receipt-hint { margin: 1.6rem 0; max-width: 440px; }
.receipt-hint__title { font-weight: 600; font-size: .92rem; color: var(--dark); margin: 0 0 .6rem; }
.receipt-hint__demo {
  display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); padding: 1.3rem 1.2rem;
}
.receipt-hint__paper {
  width: 100%; max-width: 230px; background: #fff;
  border-radius: 6px; padding: 1rem .95rem 1.1rem; box-shadow: var(--shadow-sm);
  display: grid; gap: .5rem;
}
.receipt-hint__bar { height: 9px; border-radius: 3px; background: var(--line-strong); }
.receipt-hint__bar--sm { width: 72%; }
.receipt-hint__bar--xs { width: 46%; }
.receipt-hint__zone {
  margin-top: .4rem; padding: .55rem .5rem .45rem;
  border: 1.5px dashed var(--green); border-radius: 8px; background: var(--green-050);
}
.receipt-hint__slots { display: flex; gap: .25rem; justify-content: center; }
.receipt-hint__slot {
  width: 15px; height: 21px; border-radius: 3px;
  background: #fff; border: 1px solid var(--green-200);
}
.receipt-hint__zone-label {
  display: block; text-align: center; margin-top: .42rem;
  font-size: .7rem; font-weight: 700; color: var(--green-800);
}

/* --- history skeletons (empty states) --- */
.cab-history { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.cab-history__title { font-size: var(--fs-h3); margin: 0 0 .8rem; color: var(--dark); }
.cab-history__empty {
  display: flex; align-items: center; gap: .6rem;
  color: var(--muted); font-size: var(--fs-sm);
  background: var(--bg-soft); border: 1px dashed var(--line-strong);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0;
}

/* history skeleton tables — surface the status + points columns; the body stays
   an explicit empty state until the M03/M04/M05 engine supplies real rows. */
.cab-table__wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cab-table { width: 100%; border-collapse: collapse; }
.cab-table th {
  text-align: left; padding: .5rem .7rem .55rem; color: var(--muted);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.cab-table__num { text-align: right; }
.cab-table td { padding: .8rem .7rem; vertical-align: middle; }
/* row dividers, consistent with the cabinet line system; last row has none so the
   table doesn't double-up with the section padding below it. */
.cab-table tbody tr { border-bottom: 1px solid var(--line); }
.cab-table tbody tr:last-child { border-bottom: 0; }
/* the participant's own receipt digits: tabular/mono so leading zeros and digit
   groups stay legible and aligned (the value is shown unmasked, as entered). */
.cab-table__digits {
  font-variant-numeric: tabular-nums; letter-spacing: .06em;
  font-feature-settings: "tnum" 1; color: var(--dark);
}

/* «Баллы» cell hierarchy — the figure the participant watches accrue gets the
   accent, so "earned a point" and "earned nothing" never read the same. A minted
   "+1" is green + bold + tabular (the balance is the prize-counter); the "—"
   placeholder is muted. Both colours clear AA on white. The "spent" token is
   reserved now for the M05 draw engine (a struck deduction) so spend rows land on
   a single, agreed treatment instead of each milestone inventing its own. */
.cab-points { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.cab-points--earned { color: var(--green-800); font-weight: 700; }
.cab-points--none { color: var(--muted); font-weight: 400; }
.cab-points--spent { color: var(--muted); font-weight: 400; text-decoration: line-through; }

/* status badge/pill for the receipt-history status (accepted = green; duplicate /
   limit = neutral; rejected = warning). Sized for touch/legibility; colours meet
   AA on their tint. */
.status-pill {
  display: inline-block; padding: .2rem .6rem; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; line-height: 1.3;
  border: 1px solid transparent; white-space: nowrap;
}
.status-pill--ok { background: var(--green-100); color: var(--green-800); border-color: var(--green-200); }
.status-pill--neutral { background: var(--bg-soft); color: var(--muted); border-color: var(--line-strong); }
.status-pill--warn { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-edge); }

/* ====================================================== draw history (cabinet) */
/* Draw-history table: keep the code legible and the type a quiet sub-label. */
.cab-draw__code { font-weight: 700; color: var(--dark); display: block; }
.cab-draw__type { color: var(--muted); font-size: var(--fs-sm); display: block; margin-top: .15rem; }
.cab-draw__yes { color: var(--green-800); white-space: nowrap; }
.cab-draw__won { color: var(--green-800); font-weight: 700; }
.cab-draw__other { color: var(--muted); }
.cab-draw__prize { display: block; font-size: var(--fs-sm); color: var(--accent-deep); margin-top: .2rem; }
/* «Ближайший розыгрыш» note inside the accepted-receipt banner. */
.result__nearest { margin: .6rem 0 0; color: var(--green-800); }
.result__nearest strong { color: var(--green-800); }

/* ================================================ public «Наши победители» page */
.winners-page { background: var(--bg); padding-top: clamp(1.8rem, 1.3rem + 2.4vw, 3rem); }
.winners-page .section__title { margin-bottom: .4rem; }
.winners-page__intro { color: var(--muted); font-size: var(--fs-lead); max-width: 60ch; margin: 0 0 1.6rem; }
.winners-page__anon {
  background: var(--green-050); border: 1px solid var(--green-200); color: var(--green-800);
  border-radius: var(--radius); padding: .9rem 1.1rem; font-size: var(--fs-sm); margin: 0 0 1.6rem;
  max-width: 70ch;
}
.winners-page__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.winners-principle {
  background: var(--ink-dark-bg); color: #fff; border-radius: var(--radius-lg);
  padding: clamp(1.2rem, .9rem + 1.6vw, 1.8rem); margin: 0 0 1.6rem;
}
.winners-principle__title { color: #fff; font-size: var(--fs-h3); margin: 0 0 1rem; }
.winners-principle__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.winners-principle__item { display: flex; gap: .7rem; align-items: flex-start; color: #d7ddd7; }
.winners-principle__item .trust__check { color: var(--accent); flex: 0 0 auto; margin-top: .15rem; }

.draw-cards { display: grid; gap: 1.2rem; }
.draw-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.1rem, .9rem + 1.2vw, 1.6rem); box-shadow: var(--shadow-sm);
}
.draw-card__head {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); padding-bottom: .9rem; margin-bottom: 1rem;
}
.draw-card__id-label { display: block; font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); }
.draw-card__code { font-size: var(--fs-h3); color: var(--dark); }
.draw-card__facts {
  display: grid; gap: .9rem 1.4rem; margin: 0 0 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.draw-card__fact dt { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 .15rem; }
.draw-card__fact dd { margin: 0; color: var(--ink); font-weight: 600; }
.draw-card__num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.draw-card__winners { border-top: 1px solid var(--line); padding-top: 1rem; }
.draw-card__winners-title { font-size: var(--fs-h3); margin: 0 0 .7rem; color: var(--dark); }

.winner-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.winner-list__item {
  display: flex; gap: .6rem; align-items: center;
  background: var(--green-050); border: 1px solid var(--green-200);
  border-radius: var(--radius-sm); padding: .6rem .8rem;
}
.winner-list__item .winners__trophy { width: 26px; height: 26px; color: var(--green-700); flex: 0 0 auto; }
.winner-list__place {
  font-size: var(--fs-xs); font-weight: 700; color: var(--green-800);
  background: var(--green-100); border-radius: var(--radius-pill); padding: .15rem .6rem; white-space: nowrap;
}
.winner-list__code { font-weight: 700; color: var(--dark); }

.draw-protocol { margin-top: 1.1rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.draw-protocol__summary {
  cursor: pointer; font-weight: 700; color: var(--green-700); list-style: none;
  min-height: 44px; display: flex; align-items: center; gap: .5rem; padding: .4rem .1rem;
}
/* display:flex drops the native disclosure triangle — restore the affordance with a
   chevron (right when closed, down when open), mirroring the FAQ marker. currentColor
   keeps it green-700 on the white card, so contrast is unchanged. */
.draw-protocol__summary::-webkit-details-marker { display: none; }
.draw-protocol__summary::before {
  content: ""; flex: 0 0 auto; width: 11px; height: 11px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform var(--dur-2) var(--ease);
}
.draw-protocol[open] .draw-protocol__summary::before { transform: rotate(45deg); }
.draw-protocol__body { margin: .9rem 0 0; display: grid; gap: .6rem; }
.draw-protocol__row { display: flex; flex-wrap: wrap; gap: .3rem .8rem; justify-content: space-between; }
.draw-protocol__row dt { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.draw-protocol__row dd { margin: 0; color: var(--ink); font-weight: 600; }
.draw-protocol__hash {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 400;
  font-size: var(--fs-xs); color: var(--muted); word-break: break-all; max-width: 100%;
}

.draw-empty {
  text-align: center; background: #fff; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg); padding: clamp(2rem, 1.4rem + 3vw, 3.4rem);
}
.draw-empty .winners__trophy { width: 48px; height: 48px; color: var(--green-700); }
.draw-empty__title { font-size: var(--fs-h3); margin: .8rem 0 .4rem; color: var(--dark); }
.draw-empty__body { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.draw-empty__cta { margin-top: 1.6rem; display: flex; justify-content: center; }

.winners__link { margin-top: 1rem; }

/* ============================================================ motion / reveal */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(21,156,51,.16); }
  50% { box-shadow: 0 0 0 7px rgba(21,156,51,0); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* hero entrance (CSS-only, runs once) */
@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow { animation: rise .55s var(--ease) both; }
  .hero__slogan { animation: rise .6s .06s var(--ease) both; }
  .hero__hook { animation: rise .6s .12s var(--ease) both; }
  .hero__sub { animation: rise .6s .18s var(--ease) both; }
  .hero__cta { animation: rise .6s .24s var(--ease) both; }
  .hero__showcase { animation: rise .7s .14s var(--ease) both; }
}

/* scroll reveal — only when JS is present; content is always visible without JS */
html.has-js .reveal { opacity: 0; transform: translateY(22px);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease); }
html.has-js .reveal.is-in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.reveal:nth-child(4) { transition-delay: .18s; }

/* ============================================================ responsive */
@media (min-width: 600px) {
  .form { max-width: 540px; }
  .tariff-calc__group:first-of-type,
  .tariff-calc__group:nth-of-type(2) { grid-auto-flow: column; grid-auto-columns: max-content; }
  .hero__cta-group { min-width: 220px; }
  .hero__cta .btn { width: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 880px) {
  .nav { display: flex; }
  .lang { margin-left: 0; }
  .header-cta { display: inline-flex; }
  .hero__grid { grid-template-columns: 1.15fr .85fr; }
  .trust__grid { grid-template-columns: 1.2fr .8fr; align-items: start; }
  .coverage__grid { grid-template-columns: 1fr 1fr; }
  .footer-grid, .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1080px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html.has-js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ====================================================== Module 06 admin contour */
/* Sober, functional, mobile-first operator UI (behind ADMIN_TOKEN) — not the public
   vitrine. Nav links reuse the cabinet sub-nav classes (.cab-nav__link). */
.admin-page { padding: clamp(1.4rem, 1rem + 2vw, 2.6rem) 0 var(--sp-7); background: var(--bg); }
.admin-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem;
  padding-bottom: 1rem; margin-bottom: 1.3rem; border-bottom: 1px solid var(--line);
}
.admin-nav__logout { margin-left: auto; }

.admin-hint { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 1rem; max-width: 72ch; }
.admin-empty {
  text-align: center; color: var(--muted); background: var(--bg-soft);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: clamp(1.6rem, 1.2rem + 2vw, 2.6rem); margin: 1rem 0;
}
.form-error {
  color: #b00020; background: #fdecef; border: 1px solid #f5c2cb;
  border-radius: var(--radius-sm); padding: .6rem .8rem; font-weight: 600; margin: 0 0 1rem;
}
/* Operator alert (amber) — a non-error outcome that still needs attention, e.g. the ЭСК-B
   «no reserve» notice on the handover screen. Distinct from .form-error (red = failure). */
.admin-notice {
  color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-edge);
  border-radius: var(--radius-sm); padding: .7rem .9rem; font-weight: 600; margin: 0 0 1.2rem;
  max-width: 72ch;
}

/* Block-by-id card (find a participant by surrogate id → block with mandatory reason). */
.admin-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.1rem; margin: 0 0 1.4rem; box-shadow: var(--shadow-xs);
}
.admin-card__title { font-size: var(--fs-md); margin: 0 0 .25rem; color: var(--dark); }
.admin-blockform { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Data tables: the wrap scrolls horizontally on narrow screens so the page itself never
   overflows (CC-6); the table stays legible. */
.admin-table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.admin-table th, .admin-table td {
  text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table th { color: var(--muted); font-weight: 700; font-size: var(--fs-xs); white-space: nowrap; }
.admin-table tbody tr:hover { background: var(--bg-soft); }

.admin-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.admin-actions form { margin: 0; max-width: none; display: inline-flex; }
.admin-inline { display: flex; gap: .35rem; align-items: center; }

/* Compact buttons keep a ≥44px touch target. */
.btn--small {
  min-height: 44px; padding: .45rem .85rem; font-size: var(--fs-sm); font-weight: 600;
  border-radius: var(--radius-sm); white-space: nowrap;
}
.btn--danger { background: #b00020; color: #fff; border-color: #b00020; }
.btn--danger:hover { background: #930019; border-color: #930019; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn--danger:active { transform: translateY(0); }

/* Admin form fields (login + inline action inputs). */
.form__label { font-weight: 600; font-size: .92rem; color: var(--dark); }
.form__input {
  min-height: 48px; padding: .6rem .8rem; width: 100%;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink);
  transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.form__input:hover { border-color: var(--green-200); }
.form__input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(21,156,51,.18); }
.form__input--small { min-height: 44px; width: auto; min-width: 7.5rem; padding: .45rem .65rem; font-size: var(--fs-sm); }

.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-sm); }
.muted { color: var(--muted); }

/* ── Module 07 admin panel ─────────────────────────────────────────────────
   Sober operator surfaces built on the existing .admin-* primitives. Mobile-first:
   stat cards and toolbars wrap; data tables scroll inside .admin-table-wrap. */

/* Nav: right-aligned role badge + logout. */
.admin-nav__end { margin-left: auto; display: flex; align-items: center; gap: .55rem; }
.admin-nav__role {
  font-size: var(--fs-xs); font-weight: 700; color: var(--green-800);
  background: var(--green-100); border: 1px solid var(--green-200);
  border-radius: var(--radius-pill); padding: .2rem .6rem; white-space: nowrap;
}
.admin-mask-badge {
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: .15rem .55rem; vertical-align: middle;
}

/* Stat cards (anonymized summary). */
.admin-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: .7rem; margin: 0 0 1.4rem;
}
.admin-stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .85rem 1rem; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: .15rem;
}
.admin-stat__num { font-size: var(--fs-h); font-weight: 800; color: var(--dark); line-height: 1.1; }
.admin-stat__label { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }

/* Toolbars (export buttons) + search / filter rows. */
.admin-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.admin-search, .admin-filter {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1.2rem;
}

/* Deanonymization disclosure (acts as the mandatory-reason «modal»). */
.admin-deanon { display: inline-block; }
.admin-deanon > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center;
}
.admin-deanon > summary::-webkit-details-marker { display: none; }
.admin-deanon[open] > summary { margin-bottom: .4rem; }
.admin-breakglass { margin-top: 1.4rem; }
.admin-breakglass > summary {
  cursor: pointer; color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
  padding: .4rem 0; list-style: none;
}
.admin-breakglass > summary::-webkit-details-marker { display: none; }

/* Revealed-PII panel (no-store; amber-edged so it reads as sensitive). */
.admin-reveal { border-color: var(--accent-edge); background: var(--accent-soft); }
.admin-reveal p { margin: .25rem 0; }

/* Matched winner row (receipt-id search). */
.admin-row--match { background: var(--accent-soft) !important; }

/* Audit meta cell: keep JSON context compact and from blowing up the row width. */
.admin-meta { max-width: 22rem; overflow-wrap: anywhere; color: var(--muted); }
