/* UONO — ai.uono.ru landing preview. Visual system follows live uono.ru; see DESIGN-REFERENCE.md */

@font-face { font-family: "Loos Wide"; src: url("assets/perf-v1-LoosWide-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/perf-v1-Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/perf-v1-Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/perf-v1-Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Geist"; src: url("assets/perf-v1-Geist-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/perf-v1-JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #002200;
  --ink-soft: #2E4A2E;
  --ink-muted: #4A6450;
  --mint: #3CE4AD;
  --mint-footer: #6FE1CF;
  --blue: #3794FE;          /* decorative lines, underlines */
  --blue-text: #1F6FD6;     /* text and filled badges with white text (≥4.5:1) */
  --green-text: #0B7A57;    /* darker brand #12A77A for text contrast */
  --violet-text: #6A4BE8;
  --cyan: #E3FBFF;
  --cyan-soft: #F1FCFF;
  --line: #E3EFF3;
  --error: #B42318;

  --display: "Loos Wide", "Golos Text", "Geist", system-ui, sans-serif;
  --sans: "Geist", "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(24px, 5.14vw, 74px);   /* 74px at 1440 → 1292px content */
  --section: clamp(60px, 8.33vw, 120px);
  --header-h: 80px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 17px/1.5 var(--sans);
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

:focus-visible { outline: 3px solid var(--blue-text); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 16px; background: var(--ink); color: #fff; border-radius: 4px;
  text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Type ---------- */
.h1 { font: 700 clamp(44px, 8vw, 116px)/0.98 var(--display); overflow-wrap: break-word; }
.h2 { font: 700 clamp(34px, 5.25vw, 76px)/1 var(--display); overflow-wrap: break-word; }
.h3 { font: 700 20px/1.25 var(--sans); }
.lead { font-size: 20px; line-height: 1.45; }
.pending { color: var(--ink-muted); font-style: italic; }

/* Filled label plate (live: blue tags "ЗРЕНИЕ", white "7-9 ЛЕТ") */
.badge {
  display: inline-block; padding: 8px 12px; border-radius: 2px;
  background: var(--blue-text); color: #fff;
  font: 700 14px/1.2 var(--mono); letter-spacing: 0.02em; text-transform: uppercase;
}
.badge--mint { background: var(--mint); color: var(--ink); }
.badge--accent { background: var(--accent); }
.num {
  display: inline-block; padding: 6px 10px; border-radius: 2px;
  background: var(--blue-text); color: #fff;
  font: 700 16px/1 var(--mono);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 0 32px;
  background: var(--mint); color: var(--ink);
  border: 0; border-radius: 4px; cursor: pointer;
  font: 700 clamp(17px, 1.55vw, 22px)/1.1 var(--mono); letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none; text-align: center;
  transition: background-color .15s ease, color .15s ease;
}
/* Live hover: brand blue #3794FE + white. White on #3794FE is 3.2:1, so it is used only while the
   label is large text (bold ≥ 18.66px); smaller labels hover to #1F6FD6 (5.1:1). */
.btn:hover { background: var(--blue-text); color: #fff; }
@media (min-width: 1204px) { .btn:hover { background: var(--blue); } }          /* .btn label ≥ 18.66px */
@media (min-width: 830px) { .btn--lg:hover { background: var(--blue); } }       /* .btn--lg label ≥ 18.66px */
.btn--sm:hover { background: var(--blue-text); }
.btn--lg { min-height: 72px; padding: 0 24px; font-size: clamp(18px, 2.25vw, 32px); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--full { width: 100%; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: #fff; }
.header__inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.header__logo { display: inline-flex; align-items: center; min-height: 44px; }
.header__logo img { width: 128px; }
.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav__list { display: flex; gap: 4px; }
.nav__list a, .nav__phone {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 500; font-size: 16px; text-decoration: none;
  text-underline-offset: 6px; text-decoration-thickness: 2px;
}
.nav__list a:hover, .nav__phone:hover { color: var(--blue-text); text-decoration: underline; }
.nav__phone { font-weight: 600; white-space: nowrap; }
.burger { display: none; }
/* Six nav links + phone: tighten spacing until the full row fits comfortably */
@media (min-width: 1200px) and (max-width: 1359px) {
  .nav { gap: 12px; }
  .nav__list a { padding: 0 6px; }
}

/* ---------- Hero ---------- */
.hero { padding: 16px 0 clamp(28px, 3.5vw, 48px); }
/* Stepped "Union" backdrop (live Union3.svg): tall right tab + full-width lower band, both #E3FBFF. */
.hero__stage {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto;
}
.hero__stage::before, .hero__stage::after {
  content: ""; z-index: -1; background: var(--cyan); border-radius: var(--radius);
}
.hero__stage::before { grid-column: 2; grid-row: 1 / 3; }
.hero__stage::after { grid-column: 1 / 3; grid-row: 2; }
/* Wrapper holds the stage's first grid slot: the H1 and the slogan under it */
.hero__head { grid-column: 1; grid-row: 1; padding: 8px 24px 36px 0; }
/* Longest word "искусственного" ≈ 10em in Loos Wide: 4.2vw keeps it inside the 1.08fr column */
.hero__title { font-size: clamp(30px, 4.2vw, 60px); line-height: 1.06; }
.hero__slogan { margin-top: 16px; font: 700 clamp(18px, 1.9vw, 28px)/1.2 var(--display); color: var(--blue-text); }
/* Offer fills the band row (so the notch sits on the band's top edge) and pins its text to the bottom */
.hero__offer {
  position: relative; grid-column: 1; grid-row: 2;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  padding: 40px 32px 48px 48px;
}
/* Rounded inner notch where the band meets the tab (Union3.svg r=10 → 16px here) */
.hero__offer::before {
  content: ""; position: absolute; right: 0; top: -16px; width: 16px; height: 16px;
  background: radial-gradient(circle at 0 0, transparent 15.5px, var(--cyan) 16px);
}
.nowrap { white-space: nowrap; }
.hero__lead { margin-top: 20px; max-width: 560px; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.35; }
.hero__tracks { margin-top: 12px; display: grid; gap: 6px; max-width: 560px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.35; }
.hero__tracks li { padding-left: 18px; position: relative; }
.hero__tracks li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 8px; height: 8px; background: var(--mint); }
.hero__price { margin-top: 14px; max-width: 560px; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
/* Art column is in normal flow: it contributes its own height, so nothing depends on text row heights. */
.hero__art {
  grid-column: 2; grid-row: 1 / 3; position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 120px 8px 24px;   /* top space = logo (28 + 110) minus the frame's own transparent top */
}
.hero__logo { position: absolute; top: 28px; right: 28px; z-index: 1; width: clamp(64px, 7.6vw, 110px); }
/* Frame = painted box of pixel-hero.png (620×570) incl. its soft halo: x 40–600, y 15–475 → 560×460.
   Egg top ≈ y 78, platform x ≈ 80–556, lower glow ends ≈ y 445, so the frame only trims empty margins.
   The img is scaled/offset against the FRAME width only — independent of text row heights. */
.hero__figure { width: 100%; max-width: 640px; aspect-ratio: 560 / 460; overflow: hidden; }
.hero__pixel {
  width: 110.714%;            /* 620 / 560 */
  max-width: none;
  margin: -2.679% 0 0 -7.143%; /* 15 / 560 top, 40 / 560 left (% margins resolve against width) */
}
/* Third stage row, below the backdrop; on phones it moves between the offer and the art */
.hero__actions {
  grid-column: 1 / -1; grid-row: 3;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 16px 28px; align-items: center;
  margin-top: 16px;
}
.hero__meta { font: 700 14px/1.3 var(--mono); text-transform: uppercase; color: var(--ink-muted); }
/* Secondary game link: plain text link under the meta, so the main CTA stays the only button */
.hero__game { display: inline-block; margin-top: 4px; padding: 10px 0; font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--blue-text); text-underline-offset: 3px; }
.hero__game:hover { color: var(--ink); }
.hero__game-note { font-size: 14px; line-height: 1.4; color: var(--ink-soft); }

/* ---------- Motto marquee (full viewport width, between hero and facts) ---------- */
.motto {
  position: relative; overflow: hidden; margin-bottom: clamp(28px, 3.5vw, 48px);
  background: var(--mint); color: var(--ink);
}
.motto__track { display: flex; width: max-content; animation: motto 45s linear infinite; }
.motto__item {
  flex: none; padding: 16px 56px 16px 0; white-space: nowrap;
  font: 500 clamp(17px, 1.6vw, 22px)/1.3 var(--sans);
}
.motto__item strong { font-weight: 700; }
.motto:hover .motto__track, .motto:focus-within .motto__track, .motto.is-paused .motto__track { animation-play-state: paused; }
@keyframes motto { to { transform: translateX(-50%); } }
.motto__toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer;
}
.motto__toggle:hover { background: var(--cyan); }
.motto__icon--play, .motto__toggle[aria-pressed="true"] .motto__icon--pause { display: none; }
.motto__toggle[aria-pressed="true"] .motto__icon--play { display: block; }

/* ---------- Facts ---------- */
.facts { padding-bottom: var(--section); }
.facts__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fact {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  min-height: 170px; padding: 28px; border-radius: var(--radius);
}
.fact__num { font: 700 clamp(28px, 2.8vw, 40px)/1 var(--display); }
.fact__label { font-weight: 500; font-size: 17px; }
.fact--blue, .tab--t1 { background: radial-gradient(120% 90% at 50% 75%, #3794FE 0%, #62ACFF 55%, #A9D4FF 100%); }
.fact--mint, .tab--t2 { background: radial-gradient(120% 90% at 50% 75%, #3CE4AD 0%, #6CEBC4 55%, #B8F5E2 100%); }
.fact--purple, .tab--t3 { background: radial-gradient(120% 90% at 50% 75%, #9375FF 0%, #A993FF 55%, #D3CAFF 100%); }

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section--flush { padding-top: 0; }
.section__head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px 64px; align-items: end;
  margin-bottom: 48px;
}
.section__head .lead { justify-self: end; max-width: 620px; }
.section__title { margin-bottom: 48px; }

/* Big white inset plate (live "Что это такое" / "Как это устроено") */
.plate { padding: 32px 36px; background: #fff; border-radius: var(--radius); }
.plate--lead { max-width: 1070px; margin-top: 40px; font-size: clamp(17px, 1.5vw, 21px); line-height: 1.45; }
.plate__text { margin-top: 16px; font-size: 19px; line-height: 1.45; }

.cards { display: grid; gap: 16px; margin-top: 16px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--5 { grid-template-columns: repeat(5, 1fr); }
.card { padding: 28px; background: #fff; border-radius: var(--radius); }
.card .num { margin-bottom: 20px; }
.card .h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); font-size: 16px; }
.card--cyan { background: var(--cyan); padding: 36px; }
.card--cyan p { font-size: 17px; }
.card__title { margin-bottom: 16px; font: 700 clamp(22px, 1.8vw, 26px)/1.15 var(--display); color: var(--blue-text); }

.section--about { background: var(--cyan) url("assets/background-about.svg") no-repeat right top / auto 100%; }
.section--about .plate--lead { margin-bottom: 24px; }

/* ---------- Benefits (government framing + child/parent cards) ---------- */
.benefits__title { max-width: 1100px; font-size: clamp(30px, 4.2vw, 60px); line-height: 1.05; }
.benefits__intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 32px; align-items: start;
  margin-top: 40px;
}
.benefits__plate { font-size: 18px; line-height: 1.5; }
.benefits__plate p { max-width: 62ch; }
.benefits__plate p + p, .benefits__bridge + p { margin-top: 14px; }
.benefits__plate .benefits__src { margin-top: 6px; font-size: 14px; line-height: 1.4; }
.benefits__src a { color: var(--ink-muted); text-underline-offset: 3px; overflow-wrap: anywhere; }
.benefits__src a:hover { color: var(--blue-text); }
.benefits__plate .benefits__stat { margin-top: 20px; padding: 18px 20px; background: var(--cyan-soft); border-left: 4px solid var(--mint); border-radius: 8px; }
.benefits__stat strong { font-weight: 700; }
.benefits__num { display: block; margin-bottom: 4px; font: 700 clamp(36px, 3.6vw, 52px)/1 var(--display); color: var(--green-text); }
.benefits__bridge { margin-top: 28px; font: 700 clamp(20px, 1.7vw, 24px)/1.25 var(--display); color: var(--blue-text); }
.benefits__plate .benefits__accent { margin-top: 18px; font-weight: 600; color: var(--ink); }
.benefits__media { margin: 0; }
.benefits__img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #fff; }
.benefits__groups { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: 48px; }
.benefits__group-title { margin-bottom: 16px; font: 700 clamp(22px, 1.8vw, 28px)/1.15 var(--display); }
.benefits__cards { display: grid; gap: 16px; }
.benefits__card p { max-width: 60ch; }
.benefits__actions { margin-top: 40px; }

@media (max-width: 1023px) {
  .benefits__intro, .benefits__groups { grid-template-columns: minmax(0, 1fr); }
  .benefits__media { max-width: 720px; }
  .benefits__groups { gap: 28px; margin-top: 36px; }
}
@media (max-width: 767px) {
  .benefits__title { font-size: clamp(26px, 7.4vw, 34px); line-height: 1.1; }
  .benefits__intro { margin-top: 24px; }
  .benefits__plate { font-size: 16px; }
  .benefits__plate .benefits__stat { padding: 14px 16px; }
  .benefits__num { font-size: 34px; }
  .benefits__bridge { margin-top: 22px; font-size: 19px; }
  .benefits__group-title { font-size: 21px; }
  .benefits__cards { gap: 12px; }
  .benefits__actions { margin-top: 28px; }
}

/* ---------- Programs: tabs ---------- */
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.tab {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 300px; padding: 28px; border: 0; border-radius: var(--radius);
  color: var(--ink); text-align: left; cursor: pointer;
  transition: box-shadow .15s ease;
}
.tab__digit { position: absolute; left: 24px; top: 24px; width: auto; height: 150px; pointer-events: none; }
.tab__icon { position: absolute; right: 36px; top: 96px; width: 112px; pointer-events: none; }
.tab__badge {
  position: absolute; top: 28px; right: 28px; padding: 12px 14px; border-radius: 2px;
  background: #fff; font: 700 18px/1 var(--mono); text-transform: uppercase;
}
.tab__name { position: relative; max-width: 78%; font: 600 21px/1.25 var(--sans); }
.tab:hover { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(0, 34, 0, .35); }
.tab[aria-selected="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ink); }
.tab[aria-selected="true"] .tab__badge::before { content: "✓ "; content: "✓ " / ""; }
.tab:focus-visible { outline-offset: 9px; }

/* ---------- Programs: panel ---------- */
.track--t1 { --accent: var(--blue-text); }
.track--t2 { --accent: var(--green-text); }
.track--t3 { --accent: var(--violet-text); }
.track { padding: 48px; background: var(--cyan); border-radius: var(--radius); }
.track__intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.track__tool { margin-top: 16px; color: var(--ink-soft); }
.track__title { margin-top: 12px; font: 700 clamp(28px, 3vw, 44px)/1.08 var(--display); overflow-wrap: break-word; }
.track__desc { margin-top: 16px; font-size: 18px; line-height: 1.5; color: var(--ink-soft); }
.track__more { display: inline-block; margin-top: 12px; padding: 10px 0; font-weight: 600; color: var(--accent); text-underline-offset: 3px; }
.track__more:hover { color: var(--ink); }
/* Always-visible links to the three course pages (the tab panels hide two of the three) */
.program-links { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: -24px 0 32px; }
.program-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border: 2px solid var(--line); border-radius: 999px; font-weight: 600; text-decoration: none;
}
.program-links a:hover { border-color: var(--blue); }
.trial { padding: 28px; background: #fff; border-radius: var(--radius); }
.trial__title { margin: 16px 0 8px; font: 700 21px/1.25 var(--sans); }
.trial p:last-child { color: var(--ink-soft); }

.months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
.months li { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: #fff; border-radius: 12px; }
.months__n { font: 700 13px/1.6 var(--mono); text-transform: uppercase; color: var(--ink-muted); }
.months__n span { margin-right: 6px; padding: 3px 8px; border-radius: 2px; background: var(--accent); color: #fff; }
.months__t { font-weight: 700; font-size: 18px; line-height: 1.3; }
.months__r { font-size: 15px; line-height: 1.45; color: var(--ink-soft); }

.track__outcome {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap;
  margin-top: 16px; padding: 16px 16px 16px 28px; background: #fff; border-radius: var(--radius);
}
.track__outcome p { font-size: 18px; max-width: 640px; }

/* ---------- Lesson (mint) ---------- */
.section--mint { background: var(--mint) url("assets/background-mint.svg") no-repeat center / cover; }
.lesson__panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
/* Drop gets its own grid column; text + CTA never share space with it. */
.plate--parent { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: end; }
.plate--parent .btn { margin-top: 28px; }
/* The drop's hard-cut bottom/right edges sit flush on the card's bottom/right edge:
   negative margins cancel the plate padding (32px 36px ≥768; the drop is hidden below 768). */
.plate__drop {
  width: 200px; max-width: none; aspect-ratio: 4 / 3; object-fit: cover; object-position: right bottom;
  justify-self: end; margin: 0 -36px -32px 0; border-radius: 0 0 var(--radius) 0;
}
/* Hidden where the card is too narrow for text + 200px art: phones and the 1024–1199 two-card row */
@media (max-width: 767px), (min-width: 1024px) and (max-width: 1199px) {
  .plate__drop { display: none; }
}

/* ---------- Projects: illustrative first-lesson demos ---------- */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.method__step {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center;
  padding: 20px 24px; background: var(--cyan); border-radius: var(--radius);
}
.method__step strong { font: 700 clamp(18px, 1.5vw, 22px)/1.2 var(--display); }
.method__step span:last-child { grid-column: 1 / -1; color: var(--ink-soft); font-size: 16px; }
.demos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.demo {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
}
.demo--t1 { --accent: var(--blue-text); }
.demo--t2 { --accent: var(--green-text); }
.demo--t3 { --accent: var(--violet-text); }
.demo__art { position: relative; margin: 0; }
.demo__image { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
/* Caption stays readable text for everyone: it is the honest "illustration" disclaimer */
.demo__cap { padding: 10px 20px 0; font-size: 13px; line-height: 1.4; color: var(--ink-muted); }
.demo__body { display: flex; flex-direction: column; flex: 1; padding: 16px 24px 24px; }
.demo__labels { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo__labels .badge { background: var(--accent); }
.demo__tag {
  padding: 7px 10px; border: 1.5px dashed var(--accent); border-radius: 2px;
  font: 700 12px/1.2 var(--mono); text-transform: uppercase; color: var(--accent);
}
.demo__title { margin-top: 14px; font: 700 clamp(20px, 1.7vw, 24px)/1.15 var(--display); }
.demo__steps { display: grid; gap: 10px; margin: 16px 0 24px; }
.demo__steps div { padding-left: 12px; border-left: 3px solid var(--line); }
.demo__steps div:nth-child(3) { border-left-color: var(--accent); }
.demo__steps dt { font: 700 12px/1.4 var(--mono); text-transform: uppercase; color: var(--accent); }
.demo__steps dd { margin: 2px 0 0; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.demo__cta { margin-top: auto; }
/* ≥1024 the three cards share 9 content-sized rows (art, caption, labels, title, 4 steps, CTA),
   so matching parts start at the same height. Stacked cards below keep their own flex flow;
   browsers without subgrid keep it too. Gaps become margins so every row stays content-sized. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1024px) {
    .demos { row-gap: 0; }
    .demo, .demo__art, .demo__body, .demo__steps { display: grid; grid-template-rows: subgrid; row-gap: 0; }
    .demo { grid-row: span 9; }
    .demo__art { grid-row: span 2; }
    .demo__body { grid-row: span 7; }
    .demo__steps { grid-row: span 4; }
    .demo__steps div + div { margin-top: 10px; }
  }
}

/* ---------- Learning: how regular study works ---------- */
.learn-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.learn-fact {
  display: flex; flex-direction: column; gap: 6px; padding: 24px;
  background: var(--cyan); border-radius: var(--radius); color: var(--ink-soft);
}
.learn-fact__num { font: 700 clamp(22px, 2.2vw, 32px)/1.1 var(--display); color: var(--blue-text); }
.learn__subtitle { margin: 48px 0 0; font: 700 clamp(22px, 2.2vw, 32px)/1.15 var(--display); }
.learn__month .card { background: var(--cyan); }
.learn__panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.plate--cyan { background: var(--cyan); }
.plate--cyan .btn { margin-top: 24px; }
.path { counter-reset: path; display: grid; gap: 14px; margin-top: 20px; }
.path li { counter-increment: path; position: relative; padding-left: 44px; font-size: 17px; }
.path li::before {
  content: counter(path); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--blue-text); color: #fff; border-radius: 2px; font: 700 15px/1 var(--mono);
}
.checklist { display: grid; gap: 12px; margin-top: 20px; }
.checklist li { position: relative; padding-left: 32px; font-size: 17px; }
.checklist li::before { content: "✓"; content: "✓" / ""; position: absolute; left: 4px; top: 0; font-weight: 700; color: var(--green-text); }

/* ---------- Pricing: packages (figures in PRICING-DATA.json; full package price is primary) ---------- */
.price-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.price-card {
  display: flex; flex-direction: column; min-width: 0;
  padding: 32px; background: var(--cyan-soft); border: 2px solid var(--line); border-radius: var(--radius);
}
/* The middle package gets only a mint frame: no label or perks, packages differ by lesson count and price */
.price-card--accent { background: #fff; border-color: var(--mint); box-shadow: inset 0 0 0 1px var(--mint); }
.price-card__name { font: 700 clamp(20px, 1.7vw, 24px)/1.15 var(--display); }
.price-card__price { margin-top: 28px; font: 700 clamp(30px, 2.9vw, 42px)/1 var(--display); white-space: nowrap; }
.price-card__label { margin-top: 8px; font-size: 15px; color: var(--ink-muted); }
.price-card__facts { display: grid; gap: 10px; margin: 24px 0 0; padding-top: 20px; border-top: 1.5px solid var(--line); }
.price-card__facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.price-card__facts dt { font: 700 13px/1.4 var(--mono); text-transform: uppercase; color: var(--ink-muted); }
.price-card__facts dd { margin: 0; font-weight: 600; font-size: 17px; text-align: right; }
.price-card__per { margin-top: 20px; padding-top: 16px; border-top: 1.5px dashed var(--line); font-size: 15px; color: var(--ink-soft); }
.price-card__per strong { font-weight: 600; color: var(--ink); }
.pricing__foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: center;
  margin-top: 16px; padding: 24px 24px 24px 28px; background: var(--cyan); border-radius: var(--radius);
}
.pricing__format { display: flex; flex-wrap: wrap; gap: 8px; }
.pricing__format li {
  padding: 8px 12px; background: #fff; border-radius: 2px;
  font: 700 14px/1.2 var(--mono); letter-spacing: 0.02em; text-transform: uppercase;
}
.pricing__note { margin-top: 14px; max-width: 70ch; font-size: 15px; line-height: 1.45; color: var(--ink-soft); }
.faq__list details a { color: var(--blue-text); text-underline-offset: 3px; }

@media (max-width: 1199px) {
  .price-card { padding: 28px 24px; }
}
@media (max-width: 1023px) {
  .price-cards { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .pricing__foot { grid-template-columns: minmax(0, 1fr); justify-items: start; }
}
@media (max-width: 767px) {
  .price-cards { gap: 12px; }
  .price-card { padding: 20px; }
  .price-card__price { margin-top: 16px; font-size: 30px; }
  .price-card__facts { margin-top: 16px; padding-top: 14px; }
  .pricing__foot { padding: 20px; }
  .pricing__format li { padding: 6px 8px; font-size: 12px; }
}
@media (max-width: 379px) {
  .price-card__price { font-size: 28px; }
}

/* ---------- Quest (space) ---------- */
.quest {
  overflow: hidden; padding-top: var(--section);
  background: #4DA2FF url("assets/perf-v1-background-space.webp") no-repeat center / cover;
}
.quest__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.quest__panel {
  margin-bottom: var(--section); padding: 44px;
  background: linear-gradient(180deg, #fff 0%, var(--cyan) 100%); border-radius: var(--radius);
}
.quest__title { margin: 20px 0 16px; font: 700 clamp(26px, 2.7vw, 40px)/1.1 var(--display); color: var(--blue-text); }
.quest__text { font-size: 18px; max-width: 520px; }
.quest .btn { margin-top: 28px; }
.quest__pixel { justify-self: center; width: 100%; max-width: 560px; margin-bottom: -8px; }

/* ---------- FAQ ---------- */
.faq__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.faq__art { flex: none; width: clamp(64px, 6.6vw, 96px); }
.faq__list { display: grid; gap: 12px; max-width: 1180px; }
.faq__list details { background: var(--cyan); border-radius: 14px; }
.faq__list summary {
  display: grid; grid-template-columns: 28px 1fr; gap: 20px; align-items: center;
  min-height: 72px; padding: 18px 28px; border-radius: 14px; cursor: pointer; list-style: none;
  font: 700 clamp(16px, 1.7vw, 24px)/1.3 var(--sans);
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::before {
  content: ""; width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat;
}
.faq__list details[open] summary::before {
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat;
}
.faq__list summary:hover { color: var(--blue-text); }
.faq__list details p { padding: 0 28px 24px 76px; font-size: 17px; color: var(--ink-soft); max-width: 900px; }

/* ---------- Signup ---------- */
.signup {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); column-gap: 48px; row-gap: 20px;
  grid-template-areas: "title art" "lead art" "form art";
  grid-template-rows: auto auto 1fr;
}
.signup__title { grid-area: title; font: 700 clamp(30px, 3.35vw, 48px)/1.05 var(--display); }
.signup__lead { grid-area: lead; font-size: 20px; line-height: 1.4; }
.signup__art { grid-area: art; justify-self: end; width: 100%; max-width: 560px; border-radius: var(--radius); }
.preview-note {
  margin-top: 16px; padding: 12px 16px; background: #FFF7DC; border-radius: 12px;
  font-size: 15px; line-height: 1.4;
}
.form { grid-area: form; display: grid; gap: 16px; align-content: start; }
.form__fields { display: grid; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.form__fields:disabled { opacity: .6; }
.form .preview-note { margin-top: 0; }
.form__plate {
  display: grid; gap: 8px; padding: 12px 28px 28px;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-soft) 100%); border-radius: var(--radius);
}
.field { display: grid; gap: 2px; padding-top: 16px; }
.field label { font-weight: 600; font-size: 14px; color: var(--blue-text); }
.field input:not([type="checkbox"]), .field select {
  width: 100%; min-height: 48px; padding: 8px 0;
  background: transparent; border: 0; border-bottom: 1.5px solid var(--blue); border-radius: 0;
  font-weight: 500; font-size: 18px; color: var(--ink); outline: none;
  -webkit-appearance: none; appearance: none;
}
.field select {
  cursor: pointer; padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%231F6FD6' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 4px center;
}
.field input:not([type="checkbox"]):focus-visible, .field select:focus-visible {
  border-bottom-color: var(--blue-text); box-shadow: 0 2px 0 var(--blue-text);
}
.field input::placeholder { color: #4F7690; opacity: 1; }

/* Branded age dropdown (app.js enhances select#f-age; the native select is the fallback) */
.select { position: relative; }
.select__trigger {
  display: block; width: 100%; min-height: 48px; padding: 8px 32px 8px 0; text-align: left; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%231F6FD6' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 4px center;
  border: 0; border-bottom: 1.5px solid var(--blue); border-radius: 0;
  font-weight: 500; font-size: 18px; color: var(--ink); outline: none;
}
.select__trigger[aria-expanded="true"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 8l6-6 6 6' stroke='%231F6FD6' stroke-width='2'/%3E%3C/svg%3E");
}
.select__trigger.is-placeholder { color: #4F7690; }
.select__trigger:focus-visible { border-bottom-color: var(--blue-text); box-shadow: 0 2px 0 var(--blue-text); }
.select__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5;
  display: grid; gap: 2px; margin: 0; padding: 6px;
  background: #fff; border: 1.5px solid var(--blue); border-radius: 12px; outline: none;
}
.select__option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 8px 12px; border-radius: 8px; cursor: pointer;
  font-weight: 500; font-size: 17px; color: var(--ink);
}
.select__option.is-active { background: var(--cyan); }
.select__list:focus .select__option.is-active { box-shadow: inset 0 0 0 2px var(--blue-text); }
.select__option[aria-selected="true"] { font-weight: 700; color: var(--green-text); }
.select__option[aria-selected="true"]::after { content: "✓"; content: "✓" / ""; font-weight: 700; }
/* Phone country picker (assets/phone-input.css + .js): the button shares the field underline */
.field .phone-input {
  --pi-ink: var(--ink); --pi-muted: var(--ink-muted); --pi-line: #C9DCEA; --pi-active: var(--cyan); --pi-accent: var(--blue-text);
}
.field .phone-input__country {
  min-height: 48px; padding: 8px 10px 8px 0;
  border-bottom: 1.5px solid var(--blue); font-weight: 500; font-size: 18px; color: var(--ink);
}
.field .phone-input__chev { color: var(--blue-text); }
.field .phone-input__country:focus-visible { outline: none; border-bottom-color: var(--blue-text); box-shadow: 0 2px 0 var(--blue-text); }
.field .phone-input:has([aria-invalid="true"]) .phone-input__country { border-bottom-color: var(--error); }
.field .phone-input .phone-input__option { font-weight: 500; font-size: 17px; color: var(--ink); }
.field .phone-input .phone-input__option[aria-selected="true"] { font-weight: 700; color: var(--green-text); }
.field [aria-invalid="true"] { border-bottom-color: var(--error) !important; }
.field__error { margin-top: 4px; color: var(--error); font-size: 14px; }
.field__note { font-size: 13px; color: var(--ink-muted); }

.field--check { grid-template-columns: 44px 1fr; column-gap: 4px; align-items: center; padding-top: 12px; }
.field--check input { width: 22px; height: 22px; margin: 11px; accent-color: var(--blue-text); cursor: pointer; }
.field--check label { padding: 10px 0; font-size: 15px; line-height: 1.35; cursor: pointer; }
.field--check .field__note, .field--check .field__error { grid-column: 2; }

.form__status:empty { display: none; }
.form__status { padding: 16px; border-radius: 12px; background: #DDF8EE; font-weight: 600; }
.form__status.is-error { background: #FDECEA; color: var(--error); }

/* ---------- Footer (mint + footer-art drop) ----------
   One composition at every width: contacts/socials top-left, logo top-right,
   legal bottom-left, drop art bottom-right touching the footer's bottom edge.
   Below 768 the legal block takes its own full-width row; nothing else moves. */
.footer { padding-top: clamp(48px, 5.5vw, 80px); background: var(--mint-footer); }
.footer__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; row-gap: 32px;
  grid-template-areas: "reach logo" "legal art";
}
.footer__reach { grid-area: reach; }
.footer__logo { grid-area: logo; align-self: start; justify-self: end; display: block; }
.footer__logo img { width: clamp(64px, 8vw, 112px); }
.footer__legal { grid-area: legal; align-self: end; padding-bottom: 40px; }
/* footer-art.png 1167×696: soft glow top-left, drop at the bottom-right edge (intentional crop) */
.footer__art {
  grid-area: art; align-self: end; justify-self: end; width: clamp(240px, 33vw, 480px); pointer-events: none;
  /* The PNG's glow is opaque at its right edge; fade the last 8% (drop body ends ≈ 89.5%) to remove the seam */
  -webkit-mask-image: linear-gradient(to right, #000 92%, transparent 100%);
  mask-image: linear-gradient(to right, #000 92%, transparent 100%);
}
.footer__contacts, .footer__social { display: flex; flex-wrap: wrap; gap: 12px; }
.footer__social { margin-top: 12px; }
.chip {
  display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 0.6em;
  min-height: 52px; padding: 8px 16px;
  background: #fff; border-radius: 2px; text-decoration: none;
  font: 700 18px/1.25 var(--mono); text-transform: uppercase;
}
.social {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  background: #fff; border-radius: 2px;
}
.social img { width: 32px; height: 32px; }
.chip:hover, .social:hover { background: var(--cyan); }
.footer__docs { display: flex; flex-wrap: wrap; gap: 4px 32px; font-weight: 600; font-size: 15px; }
.footer__docs li { display: flex; align-items: center; min-height: 44px; }
.footer__docs a, .footer__bottom a { text-underline-offset: 4px; }
.footer .pending { color: var(--ink); }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; margin-top: 8px; font-weight: 600; font-size: 15px; }
.footer__bottom a { display: inline-flex; align-items: center; min-height: 44px; }

/* ================= ≤1199 ================= */
@media (max-width: 1199px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .cards--5 { grid-template-columns: repeat(3, 1fr); }
  .learn-facts { grid-template-columns: repeat(2, 1fr); }
  .nav__phone { display: none; }
  .nav { gap: 8px; }
  .nav__list a { padding: 0 8px; }
  .track { padding: 36px; }
  .quest__panel { padding: 36px; }
}

/* ================= ≤1023: burger ================= */
@media (max-width: 1023px) {
  .burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 48px; margin-left: auto; padding: 0; background: none; border: 0; cursor: pointer;
  }
  .burger__lines { display: grid; gap: 8px; width: 40px; }
  .burger__lines span { display: block; height: 3px; background: var(--ink); border-radius: 1px; transition: transform .15s ease, opacity .15s ease; }
  /* Open state: thin 2px X like live */
  .burger[aria-expanded="true"] .burger__lines span { height: 2px; }
  .burger[aria-expanded="true"] .burger__lines span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger__lines span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] .burger__lines span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

  /* Live mobile menu: white full-screen panel under the header, plain left-aligned links */
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; overflow-y: auto;
    display: none; flex-direction: column; align-items: flex-start; gap: 0;
    margin-left: 0; padding: 8px var(--gutter) 32px; background: #fff;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { min-height: 44px; padding: 0; font-weight: 500; font-size: 18px; }
  .nav__phone { display: inline-flex; margin-top: 20px; padding: 0; font-weight: 500; font-size: 16px; }
  .nav .btn { width: auto; margin-top: 12px; }

  .tab { min-height: 240px; padding: 20px; }
  .tab__digit { height: 110px; left: 16px; top: 16px; }
  .tab__icon { width: 76px; right: 20px; top: 84px; }
  .tab__badge { top: 20px; right: 20px; padding: 8px 10px; font-size: 14px; }
  .tab__name { max-width: none; font-size: 17px; }

  .section__head { grid-template-columns: 1fr; }
  .section__head .lead { justify-self: start; }
  .track__intro { grid-template-columns: 1fr; gap: 24px; }
  .months { grid-template-columns: repeat(2, 1fr); }
  .lesson__panels, .learn__panels { grid-template-columns: 1fr; }
  .demos { grid-template-columns: 1fr; max-width: 640px; }
  .method { grid-template-columns: 1fr; }
  .quest__inner { grid-template-columns: 1fr; }
  .quest__panel { margin-bottom: 0; }
  .quest__pixel { max-width: 380px; }

  /* Tablet hero: same two-column stage, tighter paddings (logo is 64px here) */
  .hero__offer { padding: 32px 24px 36px 32px; }
  .hero__art { padding: 96px 8px 20px; }

  /* Tablet signup: intro + capped art on top, full-width form below */
  .signup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 300px); column-gap: 32px;
    grid-template-areas: "title art" "lead art" "form form";
    grid-template-rows: auto 1fr auto;
  }
  .signup__art { max-width: 300px; align-self: start; }
  .form { margin-top: 12px; }
}
@media (max-width: 1023px) {
  /* Without JS the menu stays visible instead of hiding behind a dead burger */
  html:not(.js) .burger { display: none; }
  html:not(.js) .nav { position: static; display: flex; padding: 0 0 16px; border: 0; }
  html:not(.js) .header__inner { flex-wrap: wrap; }
  html:not(.js) .header { position: static; }
}

/* ================= <768: phones ================= */
@media (max-width: 767px) {
  :root { --header-h: 81px; }
  body { font-size: 16px; }
  .header__inner { padding-top: 12px; padding-bottom: 12px; }
  .header__logo img { width: 64px; }
  .lead { font-size: 17px; }

  .btn, .btn--lg { width: 100%; min-height: 48px; padding: 0 16px; font-size: 16px; }

  /* Phone hero: heading → band with offer, CTA + note, then the whole egg below them, so the longer
     headline never pushes the CTA under the art. The band spans rows 2–4; the right 42% tab rises
     28px above it (stepped Union look). */
  .hero { padding-top: 8px; }
  .hero__stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; }
  .hero__stage::before { grid-column: 1; grid-row: 2 / 5; justify-self: end; width: 42%; margin-top: -28px; }
  .hero__stage::after { grid-column: 1; grid-row: 2 / 5; }
  /* bottom padding > the 28px step so the tab never reaches the heading text */
  .hero__head { grid-column: 1; padding: 4px 0 40px; }
  .hero__title { font-size: clamp(24px, 8vw, 44px); line-height: 1.08; }
  .hero__slogan { margin-top: 12px; font-size: 18px; }
  .hero__offer { grid-column: 1; grid-row: 2; padding: 24px 20px 8px; }
  .hero__offer::before { right: 42%; }
  .hero__lead { margin-top: 12px; font-size: 16px; }
  .hero__tracks { font-size: 15px; }
  .hero__price { font-size: 14px; }
  .program-links { margin: -8px 0 24px; }
  .program-links a { font-size: 15px; }
  .hero .badge { font-size: 12px; padding: 6px 8px; }
  .hero__actions { grid-row: 3; grid-template-columns: 1fr; margin-top: 0; padding: 16px 20px 8px; }
  .hero__art { grid-column: 1; grid-row: 4; padding: 0 20px 16px; }
  .hero__figure { max-width: 400px; }
  .hero__logo { display: none; }
  .motto__item { padding: 12px 40px 12px 0; }

  .facts__list { grid-template-columns: 1fr; gap: 8px; }
  /* Row layout: start-aligned (the desktop column's justify-content:flex-end would push it right) */
  .fact { min-height: 0; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 4px 12px; padding: 18px 20px; }
  .fact__num { flex: 0 0 auto; font-size: 24px; }
  .fact__label { flex: 1 1 12em; min-width: 0; font-size: 15px; }

  .section__head, .section__title { margin-bottom: 28px; }
  .plate { padding: 20px; }
  .plate--lead { margin-top: 24px; font-size: 16px; }
  .plate__text { font-size: 16px; }
  .cards--3, .cards--4, .cards--5, .learn-facts { grid-template-columns: 1fr; }
  .learn-fact { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 16px 20px; }
  .learn__subtitle { margin-top: 32px; }
  .method__step { padding: 16px 20px; }
  .demo__body { padding: 14px 20px 20px; }
  .path li, .checklist li { font-size: 16px; }
  .card, .card--cyan { padding: 20px; }
  .card .num { margin-bottom: 12px; }
  .section--about { background-size: auto 420px; }

  .tabs { grid-template-columns: 1fr; gap: 16px; }
  .tab { min-height: 180px; padding: 24px; }
  .tab__digit { display: none; }
  .tab__badge { left: 24px; right: auto; top: 24px; }
  .tab__icon { width: 72px; top: 20px; right: 20px; }
  .tab__name { font-size: 18px; max-width: 80%; }

  .track { padding: 20px 16px; }
  .track__desc { font-size: 16px; }
  .trial { padding: 20px; }
  .months { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
  .months li { padding: 14px 16px; gap: 4px; }
  .months__t { font-size: 16px; }
  .months__r { font-size: 14px; }
  .track__outcome { padding: 16px; }
  .track__outcome p { font-size: 16px; }

  .quest__panel { padding: 24px 20px; }
  .quest__text { font-size: 16px; }
  .quest__pixel { max-width: 260px; }

  .faq__head { margin-bottom: 24px; }
  .faq__list summary { grid-template-columns: 26px 1fr; gap: 16px; min-height: 56px; padding: 14px 16px; }
  .faq__list summary::before { width: 26px; height: 26px; }
  .faq__list details p { padding: 0 16px 18px 58px; font-size: 15px; }

  .signup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 160px); column-gap: 16px;
    grid-template-areas: "title title" "lead art" "form form";
    grid-template-rows: auto;
  }
  .signup__lead { font-size: 16px; align-self: center; }
  .signup__art { max-width: 160px; align-self: center; }
  .form { margin-top: 4px; }
  .form__plate { padding: 4px 20px 20px; }

  /* Footer: same corners; legal gets a full-width row, art stays bottom-right */
  .footer__inner { row-gap: 24px; grid-template-areas: "reach logo" "legal legal" "art art"; }
  .footer__legal { padding-bottom: 0; }
  .chip { min-height: 44px; padding: 6px 12px; font-size: 14px; }
  .social { width: 44px; height: 44px; }
  .social img { width: 28px; height: 28px; }
  .footer__docs { flex-direction: column; gap: 0; font-size: 14px; }
  .footer__bottom { font-size: 14px; }
}

/* Small phones: stack the signup intro so the lead keeps a readable line length */
@media (max-width: 479px) {
  .signup { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "lead" "art" "form"; }
  .signup__art { max-width: 240px; justify-self: start; }
}

/* ---------- Consent links in the signup form ---------- */
.field--check label a, .form__policy a { color: var(--blue-text); text-underline-offset: 3px; }
.form__policy { padding: 8px 0 0 48px; font-size: 14px; }
.btn:disabled, .btn:disabled:hover { background: #C9D6D0; color: var(--ink-soft); cursor: not-allowed; }
.form__submit-hint { margin-top: 8px; font-size: 14px; }
.form__helper { font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
/* Optional advertising consent: its own dashed-off block under the required ones */
.form__optional { margin-top: 12px; padding-top: 16px; border-top: 1.5px dashed #9CC3E0; }
.form__optional-label { font: 700 12px/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); }
.form__optional .field--check { padding-top: 4px; }
.form-slot { grid-area: form; }  /* keeps the section's height while the form is in the dialog */

/* ---------- Signup dialog ----------
   The <dialog> box has no padding and the inner wrapper fills it, so a click whose target is the dialog
   itself is a backdrop click. The dialog scrolls vertically; the age list extends that scroll area. */
html.is-modal-open { overflow: hidden; }
.signup-dialog {
  width: min(600px, calc(100vw - 24px)); max-width: none;
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  margin: auto; padding: 0; border: 0; border-radius: var(--radius);
  background: #fff; color: var(--ink);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 16px 48px rgba(0, 34, 0, .25);
}
.signup-dialog::backdrop { background: rgba(0, 34, 0, .55); }
.signup-dialog__inner { padding: 20px 28px 28px; }
.signup-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.signup-dialog__title { padding-top: 6px; font: 700 clamp(22px, 2.6vw, 32px)/1.1 var(--display); overflow-wrap: break-word; min-width: 0; }
.signup-dialog__close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 4px; background: var(--cyan); color: var(--ink); cursor: pointer;
}
.signup-dialog__close:hover { background: var(--line); }
.signup-dialog .form { margin-top: 0; }
@media (max-width: 767px) {
  .signup-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  .signup-dialog__inner { padding: 12px 16px 20px; }
  .signup-dialog .form__plate { padding: 4px 16px 16px; }
}
/* Success result: reuses the signup dialog shell */
.result__text { font-size: 18px; line-height: 1.45; }
.result__quest { margin-top: 20px; padding: 20px; background: var(--cyan); border-radius: 12px; }
.result__quest-text { margin-top: 0; font-size: 16px; line-height: 1.45; }
.result__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.result__actions .btn { min-height: 52px; padding: 0 12px; font-size: 16px; }
@media (max-width: 479px) { .result__actions { grid-template-columns: 1fr; } }
.footer__settings {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}

/* ---------- Cookie banner ----------
   Fixed to the viewport bottom (cookie-consent.js keeps it first in the DOM, so first in Tab order).
   It overlays page content until a choice is made; max-height + internal scroll keep it from taking over
   short screens or the space left by an on-screen keyboard. All three actions share one style. */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--cyan-soft); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(0, 34, 0, .08);
}
.cookie-banner__inner { display: grid; gap: 10px; padding-top: 12px; padding-bottom: 12px; }
.cookie-banner__inner > * { min-width: 0; }
.cookie-banner__text { max-width: 80ch; font-size: 14px; line-height: 1.4; }
.cookie-banner__text a { color: var(--blue-text); text-underline-offset: 3px; }
.cookie-banner__settings {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 4px 24px;
  margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.cookie-banner__toggle { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.cookie-banner__toggle input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--blue-text); }
.cookie-banner__hint { display: block; font-size: 13px; color: var(--ink-muted); }
.cookie-banner__actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cookie-banner__btn {
  min-width: 0; min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 4px;
  background: #fff; color: var(--ink); cursor: pointer; font-weight: 600; font-size: 14px; line-height: 1.2;
  overflow-wrap: anywhere; hyphens: auto;
}
.cookie-banner__btn:hover { background: var(--cyan); }
@media (max-width: 479px) { .cookie-banner__btn { padding: 6px; font-size: 13px; } }
/* Desktop: text left, actions right in one row; settings (when open) get the full width below */
@media (min-width: 1100px) {
  .cookie-banner__inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
  .cookie-banner__text { grid-column: 1; grid-row: 1; }
  .cookie-banner__actions { grid-column: 2; grid-row: 1; grid-template-columns: repeat(3, 11.5rem); }
  .cookie-banner__settings { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Legal pages (/legal/*) ---------- */
.legal-page .header__logo img { width: auto; height: 40px; }
.legal__back { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; font-weight: 600; text-underline-offset: 4px; }
.legal { padding: 24px 0 var(--section); }
.legal__inner { display: grid; gap: 32px; }
.legal__nav ul { display: flex; flex-wrap: wrap; gap: 8px; }
.legal__nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 4px; font-size: 15px; text-decoration: none;
}
.legal__nav a:hover { background: var(--cyan-soft); }
.legal__nav a[aria-current="page"] { border-color: var(--blue-text); font-weight: 700; }
.legal__doc { min-width: 0; max-width: 72ch; overflow-wrap: break-word; hyphens: auto; }
.legal__title { font: 700 clamp(26px, 3.4vw, 40px)/1.15 var(--sans); }
.legal__version { margin-top: 8px; font-size: 14px; color: var(--ink-muted); }
.legal__body { margin-top: 32px; font-size: 17px; line-height: 1.65; }
.legal__p { white-space: pre-line; }
.legal__p + .legal__p { margin-top: 0.75em; }
.legal__blank { height: 0.75em; }
.legal__h { margin: 1.25em 0 0.5em; font: 700 clamp(19px, 2vw, 22px)/1.3 var(--sans); white-space: pre-line; }
.legal__table { margin: 1em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.legal__table table { width: 100%; min-width: 32rem; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.legal__table td { padding: 8px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal__table td .legal__p + .legal__p { margin-top: 0.5em; }
.legal__back-row .legal__back { margin-left: 0; }
.legal-footer { padding: 24px 0 40px; background: var(--mint-footer); }
.legal-footer__list { display: flex; flex-wrap: wrap; gap: 0 32px; font-size: 14px; font-weight: 600; }
.legal-footer__list li { display: flex; align-items: center; min-height: 44px; }
.legal-footer__list a { text-underline-offset: 4px; }
.legal-footer__button {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  /* pixel-drop.webp is animated; hide it rather than autoplay */
  .plate__drop { display: none; }
  /* Static motto: one copy, wrapped, no loop duplicates and no pause control */
  .motto__track { width: auto; }
  .motto__item[aria-hidden="true"], .motto__toggle { display: none !important; }
  .motto__item { flex: 1 1 auto; min-width: 0; padding: 14px var(--gutter); white-space: normal; text-align: center; }
}

/* The scope selector appears before the document tabs on every legal page. */
.legal__scope a { font-size: 18px; padding: 12px 18px; }
.legal__scope a[aria-current="page"] { background: var(--cyan-soft); }
.legal__scope a:focus-visible { outline: 2px solid var(--blue-text); outline-offset: 3px; }
