/* Public questionnaire + /verifica styles. Mobile-first (360px), no external resources.
   Look: Roman sand + brick red, editorial. Sand for backgrounds and surfaces, brick for buttons,
   highlights and graphic details. A restrained "liquid glass" layer (frosted, slightly transparent
   cards with a thin luminous edge) is used only on the top bar, the large landing cards and the questions'
   sticky action bar; question options, inputs and forms stay on near-opaque surfaces so they are always easy to read.
   Type: Source Serif 4 throughout — semibold (≈620) for titles, regular for text. */

/* ---------- self-hosted fonts (SIL OFL, see /fonts/OFL-*.txt) ---------- */
/* Source Serif 4: the only face, variable weight 300–700 (upright only): semibold titles, regular text. */
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/fonts/source-serif-4-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('/fonts/source-serif-4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Contrast (WCAG 2.2 AA), computed on the EFFECTIVE colour of each surface. Glass = --glass composited
   over the darkest thing that can sit behind it (light: pure brick #a33c27 for the landing cards, black for
   the prize card over the photo; dark: brick #b4462f, white for the prize card).
   Light  — text: 15.3 surface · 12.6 bg · 10.5 glass-worst; --text-2 ≥ 7.4; --muted ≥ 5.2; --brick-ink ≥ 5.0;
            white on --brick 6.5 (hover 8.3); --border-strong ≥ 3.5 everywhere (4.2 on bg).
   Dark   — text: 14.2 surface · 11.4 glass-worst; --text-2 ≥ 8.0; --muted ≥ 6.1; --brick-ink ≥ 5.8;
            white on --brick 5.4 (hover 6.5); --accent fill vs surface 6.7, ink on accent 7.3; --border-strong ≥ 3.1;
            --brick-edge (outline of brick fills) vs dark glass 5.1.
   Prize card + how-to card (both --glass-strong) over the raw photo, worst case #1a1a1a…#f5f5f5, no tint:
   Light — text 11.5 · text-2 8.1 · muted 5.7 · brick-ink 5.5.  Dark — text 10.0 · text-2 8.1 · muted 6.2 · brick-ink 5.9.
   Prize teaser pill: brick-ink on brick-soft 6.0 light / 6.9 dark.
   Question phase (sticky action bar = --bar, 90% opaque; worst case = bar over dark text / brick / black (light) or
   white / terracotta (dark)):
   Light — text on bar ≥ 10.1 · pip outline 3.5 · pip fill 4.3 · progress fill vs empty segment 3.8 · pending Next label
           (brick-ink on brick-soft) 6.0, its edge vs bar ≥ 4.8 · max-reached pill text 13.7 · error badge 6.2 · error text 7.2 ·
           hint (muted) ≥ 5.5 · open-row disc 5.1 · white tick on brick 6.5 · segment edge / dot outline 5.1 · selected
           segment edge vs soft fill 5.2 · "answer missing" text / row edge 7.2 · selected-country pill edge vs bar ≥ 4.2.
   Dark  — text on bar ≥ 12.1 · pip outline 3.9 · pip fill 5.8 · progress fill vs empty 4.3 · pending Next 6.9, edge ≥ 7.1 ·
           max pill 11.1 · error badge 6.9 · error text 7.4 · hint 9.8 · open-row disc 4.5 · tick on accent 7.3 · segment
           edge 4.5 · selected segment edge 5.6 · "answer missing" 7.4 · selected-country pill edge ≥ 5.8.
   --border is a decorative hairline only; empty progress segments (--track) are decorative (the step is also in text). */
:root {
  --bg: #efe5d6;            /* sand */
  --bg-deep: #e6d6c0;
  --surface: #fffbf5;       /* warm white */
  --surface-2: #f4ece0;     /* inset sand box */
  --text: #2b211a;
  --text-2: #47392e;        /* descriptive / secondary text */
  --muted: #5f4f42;         /* labels, meta */
  --border: #e3d4c1;
  --border-strong: #7e6856;
  --brick: #a33c27;         /* buttons, key graphic details */
  --brick-hover: #8a311f;
  --on-brick: #ffffff;
  --brick-ink: #953421;     /* brick used as text */
  --brick-soft: #f6e2d8;    /* selected fill, highlights */
  --brick-edge: var(--brick); /* outline of brick fills (lighter in dark mode so they read against dark glass) */
  --accent: var(--brick);   /* fill of checked controls / progress */
  --accent-text: #ffffff;
  --accent-soft: var(--brick-soft);
  --selected-border: var(--brick);
  --focus: #1e3a8a;
  --ok: #1d6b32;
  --ok-soft: #e3f1e2;
  --err: #a8162a;
  --err-soft: #fbe5e5;
  --warn-soft: #fbefcf;
  --warn: #8a6a00;
  /* glass */
  --glass: rgba(255, 251, 245, .76);
  --glass-strong: rgba(255, 251, 245, .86);
  --glass-bar: rgba(239, 229, 214, .78);
  --bar: rgba(239, 229, 214, .9);        /* sticky action bar (questions) */
  --track: #d6c3ab;                      /* empty progress segment */
  --glass-line: rgba(255, 255, 255, .78);
  --glass-sheen: linear-gradient(155deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 42%);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .22);
  --card: rgba(255, 251, 245, .95);   /* near-opaque cards (forms, notes) */
  --chip: rgba(255, 251, 245, .9);
  --glow-1: rgba(199, 104, 76, .30);
  --glow-2: rgba(214, 166, 104, .36);
  --glow-3: rgba(163, 60, 39, .14);
  --stage-tint: linear-gradient(180deg, rgba(230, 214, 192, .55), rgba(163, 60, 39, .28));
  --radius: 18px;
  --radius-sm: 14px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(70, 40, 25, .06), 0 18px 40px -18px rgba(90, 45, 25, .30);
  --shadow-sm: 0 1px 2px rgba(70, 40, 25, .06), 0 6px 16px -8px rgba(90, 45, 25, .18);
  --shadow-cta: 0 14px 28px -12px rgba(163, 60, 39, .55), 0 2px 4px rgba(120, 40, 20, .18);
  --tap: 56px;
  --font: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120f;
    --bg-deep: #120e0b;
    --surface: #241d18;
    --surface-2: #30271f;
    --text: #f4ece1;
    --text-2: #e2d5c5;
    --muted: #c9baa8;
    --border: #3f342b;
    --border-strong: #95826f;
    --brick: #b4462f;
    --brick-hover: #a13d28;
    --on-brick: #ffffff;
    --brick-ink: #f0a68b;
    --brick-soft: #40271f;
    --brick-edge: #d97a62;
    --accent: #e58f76;          /* light terracotta: visible fill on dark surfaces */
    --accent-text: #1f140f;
    --selected-border: #e58f76;
    --focus: #a9c1ff;
    --ok: #7fdc95;
    --ok-soft: #173321;
    --err: #ff8b98;
    --err-soft: #3d1a20;
    --warn-soft: #3a3016;
    --warn: #e0b43a;
    --glass: rgba(36, 29, 24, .76);
    --glass-strong: rgba(30, 24, 20, .86);
    --glass-bar: rgba(23, 18, 15, .78);
    --bar: rgba(23, 18, 15, .9);
    --track: #4a3d33;
    --glass-line: rgba(255, 236, 220, .14);
    --glass-sheen: linear-gradient(155deg, rgba(255, 240, 225, .07) 0%, rgba(255, 240, 225, 0) 42%);
    --glass-inner: inset 0 1px 0 rgba(255, 240, 225, .10);
    --card: rgba(36, 29, 24, .95);
    --chip: rgba(36, 29, 24, .9);
    --glow-1: rgba(180, 70, 47, .22);
    --glow-2: rgba(150, 105, 60, .16);
    --glow-3: rgba(120, 40, 25, .22);
    --stage-tint: linear-gradient(180deg, rgba(23, 18, 15, .55), rgba(60, 28, 18, .70));
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 18px 40px -16px rgba(0, 0, 0, .75);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-cta: 0 14px 28px -12px rgba(0, 0, 0, .8);
  }
}

/* More contrast / less transparency requested: glass becomes solid, secondary text becomes full text. */
@media (prefers-contrast: more) {
  :root { --border: var(--border-strong); --muted: var(--text); --text-2: var(--text); }
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--surface); --glass-strong: var(--surface); --glass-bar: var(--bg); --bar: var(--bg); --card: var(--surface); --chip: var(--surface); --glass-sheen: none; }
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(88px + env(safe-area-inset-top)); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* Keep focused controls clear of the sticky top bar (WCAG 2.4.11). */
.opt, .grid-row, .field, .actions, .card, .prize-title { scroll-margin-top: calc(88px + env(safe-area-inset-top)); }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 430;
  line-height: 1.6;
  letter-spacing: .003em;
  font-optical-sizing: auto;
  font-synthesis: none;
  font-kerning: normal;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
/* Warm, soft light behind everything (CSS gradients only: no image download). The glass surfaces blur it. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 42% at 8% 4%, var(--glow-1), transparent 72%),
    radial-gradient(55% 38% at 100% 26%, var(--glow-2), transparent 70%),
    radial-gradient(80% 50% at 40% 104%, var(--glow-3), transparent 72%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brick-ink); text-decoration-thickness: 2px; }

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

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

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: 999px; border: 2px solid var(--focus); font-weight: 600; }
.skip-link:focus { top: 8px; }

/* Preview / simulation banner: deliberately loud, outside the sand/brick palette. */
.sim-banner { position: relative; z-index: 11; background: #ffd23f; color: #1c1a17; text-align: center; font-weight: 700; font-size: .875rem; line-height: 1.3; padding: 7px 12px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid #1c1a17; }

/* ---------- glass ---------- */
/* backdrop-filter only on a few large surfaces: the top bar and the landing cards (.glass). */
.glass {
  background-color: var(--glass);
  background-image: var(--glass-sheen);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-inner), var(--shadow);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  backdrop-filter: blur(22px) saturate(1.35);
}
.glass-strong { background-color: var(--glass-strong); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .glass-strong { background-color: var(--surface); }
  .topbar { background-color: var(--bg) !important; }
}
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .glass, .topbar, .q-bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass { border-color: var(--border); }
}

/* ---------- top bar (frosted glass) ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--glass-bar); -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35); border-bottom: 1px solid var(--glass-line); box-shadow: 0 1px 0 color-mix(in srgb, var(--border) 70%, transparent); padding-top: env(safe-area-inset-top); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .topbar { box-shadow: 0 1px 0 var(--border); } }
.topbar-inner { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 16px; min-height: 60px; }
/* Wordmark in the text face (small size), with a tiny brick arch as the mark. */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; font-family: var(--font); font-weight: 650; font-size: 1.125rem; line-height: 1.2; letter-spacing: .005em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand::before { content: ""; flex: 0 0 auto; width: 16px; height: 20px; border: 2.5px solid var(--brick); border-bottom: 0; border-radius: 8px 8px 0 0; }
.brand:empty::before { display: none; }
.lang-switch { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.lang-icon { position: absolute; left: 12px; pointer-events: none; color: var(--brick-ink); }
.lang-select {
  appearance: none; -webkit-appearance: none;
  min-height: 48px; padding: 8px 36px 8px 40px; border-radius: 999px;
  border: 1.5px solid var(--border-strong); background-color: var(--surface); color: var(--text);
  font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm);
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  transition: border-color .15s;
}
.lang-select:hover { border-color: var(--text); }

.progress { max-width: 560px; margin: 0 auto; padding: 0 16px 12px; }
.progress-track { height: 6px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .35s var(--ease); }
/* One segment per question (--steps is set by the script): segments up to and including the current question
   in brick, the rest in sand (a "you are here" bar, not an answered-count). */
.progress-track[style*="--steps"] {
  --seg: calc((100% + 4px) / var(--steps));
  border-radius: 0; box-shadow: none;
  background: repeating-linear-gradient(90deg, var(--track) 0 calc(var(--seg) - 4px), transparent calc(var(--seg) - 4px) var(--seg));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 4px), transparent calc(var(--seg) - 4px) var(--seg));
  mask: repeating-linear-gradient(90deg, #000 0 calc(var(--seg) - 4px), transparent calc(var(--seg) - 4px) var(--seg));
}
.progress-track[style*="--steps"] .progress-fill { border-radius: 0; }

/* ---------- layout ---------- */
.main { max-width: 560px; margin: 0 auto; padding: 24px 16px calc(40px + env(safe-area-inset-bottom)); outline: none; }
.screen { animation: fade-in .3s var(--ease); }
@keyframes fade-in { from { opacity: .3; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Hierarchy: titles (Source Serif 4 semibold 620) · sub-titles (Source Serif 650) · text (430). */
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; color: var(--text); }
h1, h2 { font-family: var(--display); font-weight: 620; font-synthesis: none; line-height: 1.14; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: 2.05rem; margin-bottom: 14px; }
h1:focus, h2:focus { outline: none; }
h1:focus-visible, h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.15rem; font-weight: 650; margin: 22px 0 6px; letter-spacing: .005em; }
p { margin: 0 0 12px; }
strong, b { font-weight: 650; }
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--text-2); }
.muted { color: var(--muted); }
.small { font-size: 1rem; line-height: 1.55; }
.step-label { font-size: .9375rem; font-weight: 650; color: var(--brick-ink); margin: 0 0 10px; letter-spacing: .1em; text-transform: uppercase; }
.loading { color: var(--muted); padding: 24px 0; }

.card { background: var(--card); border: 1px solid var(--glass-line); border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--glass-inner), var(--shadow); margin: 0 0 20px; }
/* Card titles sit one step below the page h1 (e.g. thank-you h1 → draw-form card h2). */
.card h2 { font-size: 1.5rem; line-height: 1.2; }
body[data-screen="thanks"] h1 { text-wrap: pretty; }

/* ====================================================================================
   Landing page (body[data-screen="landing"])
   ==================================================================================== */
body[data-screen="landing"] .main { max-width: 1120px; padding-top: 14px; }
body[data-screen="landing"] .topbar-inner { max-width: 1120px; }

.landing { display: grid; gap: 22px; }
/* Entrance only on a real screen change (#app gets .screen; a language switch re-renders "calm").
   The hero is visible from the first frame (fast first paint / LCP); the lower sections rise in. */
.screen > .landing > :not(.l-hero) { animation: rise .7s var(--ease) both; }
.screen > .landing > :nth-child(2) { animation-delay: .06s; }
.screen > .landing > :nth-child(3) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .9375rem; font-weight: 650; line-height: 1.3; letter-spacing: .1em; text-transform: uppercase; color: var(--brick-ink); }
.ico { flex: 0 0 auto; display: block; }

/* ----- section 1: presentation ----- */
.l-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 20px 20px 0; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.chip {
  appearance: none; -webkit-appearance: none; font: inherit; cursor: pointer;
  min-width: 48px; min-height: 48px; padding: 0 12px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--chip); color: var(--text); border: 1.5px solid var(--border-strong);
  font-size: .95rem; font-weight: 650; letter-spacing: .08em;
  transition: background-color .2s, border-color .2s, color .2s, transform .1s;
  touch-action: manipulation;
}
.chip:hover { border-color: var(--text); }
.chip:active { transform: scale(.96); }
.chip[aria-current="true"] { background: var(--brick); border-color: var(--brick-edge); color: var(--on-brick); box-shadow: 0 6px 14px -8px rgba(163, 60, 39, .7); }
/* The page title receives focus programmatically on load (not keyboard-operable): no ring on first paint. */
.l-title:focus-visible { outline: none; }
.l-title { font-size: clamp(2.25rem, 9.5vw, 3.75rem); line-height: 1.1; letter-spacing: -.022em; margin: 0 0 16px; max-width: 14ch; }
.l-lead { font-size: 1.1875rem; line-height: 1.6; color: var(--text-2); margin: 0 0 20px; max-width: 38em; }
.facts { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--chip); border: 1px solid var(--border); font-size: 1rem; font-weight: 600; line-height: 1.25; color: var(--text); box-shadow: var(--shadow-sm); }
.fact .ico { color: var(--brick-ink); }
/* Prize teaser: a restrained pill that brings the prize into the first screen on phones. */
.jump { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin: 10px 0 0; padding: 10px 16px 10px 18px; border-radius: 999px; background: var(--brick-soft); border: 1px solid color-mix(in srgb, var(--brick) 30%, transparent); color: var(--brick-ink); font-weight: 650; line-height: 1.3; text-decoration: none; box-shadow: var(--shadow-sm); transition: background-color .2s, border-color .2s; }
.jump-text { text-wrap: balance; }
.jump .ico { transition: transform .25s var(--ease); }
.jump:hover { color: var(--brick-ink); border-color: var(--brick-ink); }
.jump:hover .ico { transform: translateY(3px); }
.arcade { height: 96px; margin: 8px -20px 0; color: var(--brick); opacity: .42; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.arcade svg { display: block; width: 100%; height: 100%; }

/* ----- section 2: prize + how to take part (floating cards over the blurred photo) ----- */
.l-prize { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg); padding: 16px 14px; display: grid; gap: 14px; background: var(--bg-deep); box-shadow: var(--shadow-sm); }
.stage-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.stage-bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; filter: blur(28px) saturate(.85) sepia(.35); transform: scale(1.25); }
/* The photo behind is already blurred: no second backdrop blur on the two cards (cheaper on low-end phones). */
.l-prize .glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
.stage-bg::after { content: ""; position: absolute; inset: 0; background: var(--stage-tint); }
.prize-card { border-radius: 22px; padding: 10px 10px 20px; }
.prize-card > :not(.prize-photo) { margin-left: 10px; margin-right: 10px; }
.prize-photo { position: relative; margin: 0 0 18px; border-radius: 16px; overflow: hidden; aspect-ratio: 3 / 2; background: var(--surface-2); }
.prize-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transition: transform 1.2s var(--ease); }
.prize-card:hover .prize-photo img { transform: scale(1.03); }
/* Caption chip on the photo: near-opaque (no blur needed): ≥ 11:1 even over a black area of the picture. */
.photo-chip { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 6px 12px; border-radius: 999px; background: var(--chip); border: 1px solid var(--glass-line); color: var(--text); font-size: .9375rem; font-weight: 650; line-height: 1.3; box-shadow: var(--shadow-sm); }
.prize-title { font-size: clamp(1.75rem, 7vw, 2.5rem); line-height: 1.14; margin: 0 0 16px; letter-spacing: -.018em; }
.winners { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; padding: 12px 16px; border-radius: 16px; background: var(--brick-soft); border: 1px solid color-mix(in srgb, var(--brick) 22%, transparent); }
.winners-num { font-family: var(--display); font-weight: 620; font-size: 3rem; line-height: 1; color: var(--brick-ink); }
.winners-label { font-size: 1.0625rem; font-weight: 650; line-height: 1.3; color: var(--text); }
.per-winner { font-weight: 600; color: var(--text); margin: 0 0 10px; line-height: 1.45; }
.prize-list, .prize-facts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.prize-list li, .prize-facts li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.45; }
.prize-list li { font-weight: 600; color: var(--text); }
.prize-facts li { color: var(--text-2); }
.prize-list .ico, .prize-facts .ico { margin-top: 2px; color: var(--brick-ink); }
.prize-facts { padding-top: 14px; border-top: 1px solid var(--border); }
.fine { margin-top: 2px; margin-bottom: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-size: 1rem; line-height: 1.5; }

.how-card { border-radius: 22px; padding: 22px 20px 16px; }
.how-title { font-size: 1.7rem; margin: 0 0 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 46px; bottom: -14px; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--brick) 30%, transparent); }
.step-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brick); color: var(--on-brick); font-weight: 650; font-size: 1.0625rem; line-height: 1; box-shadow: 0 6px 14px -8px rgba(163, 60, 39, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.step-body { padding-top: 6px; }
.step-title { margin: 0 0 3px; font-weight: 650; font-size: 1.0938rem; line-height: 1.35; color: var(--text); }
.step-text { margin: 0; color: var(--text-2); font-size: 1.0625rem; line-height: 1.55; }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 18px 0 0; padding-top: 6px; border-top: 1px solid var(--border); }
.legal-links a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 650; color: var(--text); }
.legal-links a:hover { color: var(--brick-ink); }
.legal-note { margin: 6px 0 4px; font-size: .9688rem; line-height: 1.5; color: var(--text-2); }

/* ----- section 3: start ----- */
.l-cta { border-radius: var(--radius-lg); padding: 30px 20px 26px; text-align: center; }
.cta-title { font-size: 1.95rem; margin: 0 0 8px; }
.cta-note { color: var(--text-2); margin: 0 auto 20px; max-width: 32em; }
.btn.btn-cta { width: 100%; min-height: 64px; padding: 16px 28px; gap: 12px; font-size: 1.0625rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; box-shadow: var(--shadow-cta), inset 0 1px 0 rgba(255, 255, 255, .22); transition: background-color .2s, transform .2s var(--ease), box-shadow .2s; }
.btn-cta > span { text-wrap: balance; }
.btn-cta .ico { transition: transform .25s var(--ease); }
.btn-cta:hover { transform: translateY(-1px); }
.btn-cta:hover .ico { transform: translateX(4px); }
.btn-cta:active { transform: scale(.985); }
.cta-meta { margin: 14px 0 0; font-size: 1rem; color: var(--muted); font-weight: 500; text-wrap: balance; }
.cta-meta > span { white-space: nowrap; }
.cta-meta > span + span::before { content: "·"; content: "·" / ""; margin-right: .3em; }

@media (min-width: 600px) {
  .landing { gap: 28px; }
  .l-hero { padding: 32px 36px 0; }
  .arcade { margin: 12px -36px 0; height: 120px; }
  .l-prize { padding: 20px; gap: 20px; }
  .prize-card { padding: 12px 12px 24px; }
  .prize-card > :not(.prize-photo) { margin-left: 16px; margin-right: 16px; }
  .prize-photo { aspect-ratio: 900 / 422; }
  .how-card { padding: 28px 28px 18px; }
  .l-cta { padding: 40px 48px 34px; }
  .btn.btn-cta { width: auto; min-width: 360px; }
}
@media (min-width: 960px) {
  .l-hero { padding: 48px 56px 0; }
  .l-hero > :not(.arcade) { max-width: 780px; }
  .l-lead { font-size: 1.3125rem; }
  .arcade { margin: 20px -56px 0; height: 150px; }
  .l-prize { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; padding: 28px; gap: 24px; }
  .l-cta { max-width: 760px; width: 100%; margin: 0 auto; }
}
/* Wide screens: the shorter how-to card floats alongside the taller prize card while it scrolls, instead of
   leaving an empty patch of photo under it. overflow: clip (unlike hidden) keeps sticky working. */
@media (min-width: 960px) and (min-height: 720px) {
  .how-card { position: sticky; top: calc(84px + env(safe-area-inset-top)); }
  @supports (overflow: clip) { .l-prize { overflow: clip; } }
}
/* Phones: tighter hero so the prize teaser shows in the first screen; the start button stays on one line. */
@media (max-width: 419px) {
  .l-hero { padding-top: 16px; }
  .lang-chips { margin-bottom: 16px; }
  .l-title { margin-bottom: 12px; }
  .l-lead { font-size: 1.125rem; line-height: 1.55; margin-bottom: 16px; }
  .facts { gap: 6px; }
  .fact { padding: 6px 12px 6px 10px; gap: 6px; font-size: .9688rem; }
  .l-cta { padding-left: 16px; padding-right: 16px; }
  .btn.btn-cta { padding: 16px 14px; gap: 8px; font-size: .9375rem; letter-spacing: .02em; }
  .btn-cta .ico { width: 18px; height: 18px; }
  /* the French label is the longest: drop the arrow on phones so it stays on one line */
  .btn-cta:lang(fr) .ico { display: none; }
  .jump { border-radius: 20px; font-size: 1.0625rem; padding: 10px 14px 10px 16px; }
  .jump-meta { display: block; font-weight: 500; }
}
@media (min-width: 420px) {
  .jump-meta::before { content: "·"; content: "·" / ""; margin-right: .35em; }
}
/* Older engines without color-mix(): keep the brick-tinted lines visible with a plain token. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .winners, .end-icon, .jump { border-color: var(--border-strong); }
  .step:not(:last-child)::after { background: var(--border-strong); }
}

/* ---------- buttons (pills) ---------- */
.actions { display: flex; gap: 12px; margin-top: 26px; align-items: stretch; }
.actions.stack { flex-direction: column; }
.btn {
  appearance: none; -webkit-appearance: none; font: inherit; font-weight: 600; font-size: 1.0625rem; line-height: 1.25; letter-spacing: .01em;
  min-height: var(--tap); padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center;
  text-decoration: none; touch-action: manipulation; transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--brick); color: var(--on-brick); border-color: var(--brick-edge); flex: 1 1 auto; box-shadow: 0 10px 22px -12px rgba(163, 60, 39, .6), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-primary:hover { background: var(--brick-hover); border-color: var(--brick-edge); color: var(--on-brick); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text); border-color: transparent; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; font-weight: 600; }
.btn-ghost:hover { color: var(--brick-ink); text-decoration-thickness: 2px; }
.btn-back { flex: 0 0 auto; min-width: var(--tap); padding: 14px 20px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
/* Primary stays readable while busy ("Invio…"): solid muted fill instead of transparency. */
.btn-primary[disabled], .btn-primary[aria-disabled="true"] { opacity: 1; background: var(--muted); border-color: var(--muted); color: var(--surface); box-shadow: none; cursor: progress; }
.btn-block { width: 100%; }

/* ---------- questions ---------- */
/* Question phase: one question per screen, built for answering fast on a phone. Eyebrow (step) → title →
   how-to-answer line → options → sticky action bar. Brick appears only on what the person has SELECTED
   (plus the step label and progress): every option has the same weight before it is chosen. */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; width: 100%; }
.q-step { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .875rem; letter-spacing: .12em; }
.q-step::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
/* Question titles use the TEXT serif, semibold, at a reading size: long questions (up to ~150 characters)
   stay within ~5 lines at 360px and read like a sentence, not a poster. The display face is kept for the
   short screen titles (eligibility, thank-you, ticket). */
legend h1.q-title {
  font-family: var(--font); font-weight: 620; font-size: clamp(1.3125rem, 1.02rem + 1.5vw, 1.625rem);
  line-height: 1.3; letter-spacing: 0; margin: 0 0 10px; text-wrap: pretty; color: var(--text);
}
.hint { color: var(--text-2); font-size: 1.0625rem; line-height: 1.45; margin: 0 0 8px; }
.q-hint { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 1rem; font-weight: 500; color: var(--muted); }
/* the dot sits on the first line when the hint wraps */
.q-hint::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; margin-top: calc((1.45em - 6px) / 2); border-radius: 50%; background: var(--border-strong); }

/* multi: selection counter (lives in the action bar so it is always in view) */
.q-bar-status { display: grid; margin: 0; }
.q-bar-status > :not(:empty) { margin: 0 0 10px; }
/* One row, constant height: "max reached" replaces the count for a few seconds instead of adding a line. */
.counter { display: flex; align-items: center; gap: 10px; min-height: 28px; font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--text); }
.counter-max { padding: 2px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--text); font-weight: 650; }
.pips { display: inline-flex; gap: 5px; }
.pip { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: transparent; transition: background-color .15s, border-color .15s; }
.pip.on { background: var(--accent); border-color: var(--accent); }

.options { display: grid; gap: 10px; margin-top: 18px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: calc(var(--tap) + 8px); padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; line-height: 1.4; font-weight: 480;
  box-shadow: var(--shadow-sm);
  touch-action: manipulation; transition: border-color .15s, background-color .15s, box-shadow .15s, color .15s, transform .1s var(--ease);
}
.opt:active { transform: scale(.99); }
.opt-text { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.opt input {
  appearance: none; -webkit-appearance: none; margin: 0; flex: 0 0 auto;
  width: 26px; height: 26px; border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-content: center; cursor: pointer; transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.opt input[type="radio"] { border-radius: 50%; }
.opt input[type="checkbox"] { border-radius: 8px; }
/* radio: brick ring + white check on a brick disc; checkbox: brick square + white tick */
.opt input::before { content: ""; width: 12px; height: 7px; border-left: 2.5px solid var(--accent-text); border-bottom: 2.5px solid var(--accent-text); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .14s var(--ease); }
.opt input:checked { background: var(--accent); border-color: var(--accent); }
.opt input:checked::before { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
/* The whole card shows keyboard focus (the 26px control alone is a small target to spot). */
.opt input:focus-visible { outline: none; }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
@supports not selector(:has(*)) { .opt input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; } }
/* Selected: 2px brick outline (1px border + 1px inset ring, no layout shift) and a soft brick fill.
   Same weight for selected text, so line breaks never jump. */
.opt:has(input:checked), .opt.is-checked { border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border), var(--shadow-sm); background: var(--accent-soft); }
.opt.is-dimmed { background: var(--surface-2); box-shadow: none; }
.opt.is-dimmed .opt-text { color: var(--muted); }
.opt.shake { animation: shake .3s; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
/* Hover only with a real pointer: on touch screens :hover sticks after a tap and would single out one option. */
@media (hover: hover) and (pointer: fine) {
  .opt:hover { border-color: var(--border-strong); }
  .opt:not(.is-checked):not(.is-dimmed):hover { background: color-mix(in srgb, var(--surface) 70%, var(--surface-2)); }
}

/* grid question: a card per row with one compact segmented control */
.grid-rows { display: grid; gap: 12px; margin-top: 18px; }
.grid-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 12px 12px; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.grid-row.answered { border-color: var(--border-strong); }
.grid-row legend { float: left; width: 100%; font-weight: 650; font-size: 1.0938rem; line-height: 1.35; padding: 0 4px 12px; }
.grid-row legend ~ * { clear: both; }
/* After Next with a row left open: a clear (not alarming) marker on that row, linked to it by aria-describedby. */
.row-missing { display: flex; align-items: center; gap: 8px; margin: -4px 4px 10px; color: var(--err); font-weight: 600; font-size: 1rem; line-height: 1.35; }
.row-missing::before { content: "!"; content: "!" / ""; flex: 0 0 auto; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--err); color: var(--err-soft); font-size: .75rem; font-weight: 700; line-height: 1; }
.row-missing.is-resolved { visibility: hidden; }
.grid-row.is-missing { border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err), var(--shadow-sm); }
/* Grid question: a small status disc at the end of each row label, dashed while open, brick with a tick once
   the row is answered (decorative: the checked radio carries the state). */
.q-grid .grid-row legend { position: relative; padding-right: 38px; }
.q-grid .grid-row legend::after { content: ""; position: absolute; right: 4px; top: 1px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed var(--border-strong); }
.q-grid .grid-row.answered legend::after { border: 1.5px solid var(--accent); background: var(--accent); }
.q-grid .grid-row.answered legend::before { content: ""; position: absolute; z-index: 1; right: 10.5px; top: 7.5px; width: 9px; height: 5px; border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(-45deg); }
.seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.seg-opt { position: relative; display: flex; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
/* Each choice is a small answer card with the same dot + tick as the option cards: brick only once chosen
   (soft fill + brick edge + brick dot with a tick), never a solid block that would compete with Next.
   Wide screens: four columns, dot on top (dots line up across the row, labels hang below).
   Yes/No and phones: dot on the left of the label, like the answer cards. */
.seg-opt span {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; text-align: center;
  min-height: calc(var(--tap) + 4px); padding: 10px 8px; border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong);
  background: var(--surface); font-size: 1rem; font-weight: 550; line-height: 1.25;
  overflow-wrap: break-word; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .1s var(--ease);
}
.seg-opt span::before {
  content: ""; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; box-sizing: border-box;
  border: 1.5px solid var(--border-strong); background: var(--surface); transition: background-color .12s, border-color .12s;
}
/* the tick, centred on the dot: column layout → top 10 + 1.5 + 10 − 3.5; row layout → vertically centred */
.seg-opt span::after {
  content: ""; position: absolute; top: 18px; left: calc(50% - 4.5px); width: 9px; height: 5px;
  border-left: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text);
  transform: rotate(-45deg) scale(0); transition: transform .14s var(--ease); pointer-events: none;
}
.seg-opt input:active + span { transform: scale(.98); }
.seg-opt input:checked + span { background: var(--accent-soft); border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border); }
.seg-opt input:checked + span::before { background: var(--accent); border-color: var(--accent); }
.seg-opt input:checked + span::after { transform: rotate(-45deg) scale(1); }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg.two .seg-opt span { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 12px; min-height: var(--tap); padding: 8px 16px; font-size: 1.0938rem; }
.seg.two .seg-opt span::after { top: calc(50% - 3.5px); left: calc(16px + 1.5px + 10px - 4.5px); }
/* Phones (< 420px): the ordinal scale reads as ONE column in scale order (a 2×2 block can be read by row or
   by column), each choice a compact card. */
@media (max-width: 419px) {
  .seg:not(.two) { grid-template-columns: 1fr; gap: 6px; }
  .seg:not(.two) .seg-opt span { flex-direction: row; align-items: center; text-align: left; gap: 12px; min-height: var(--tap); padding: 8px 14px; }
  .seg:not(.two) .seg-opt span::after { top: calc(50% - 3.5px); left: calc(14px + 1.5px + 10px - 4.5px); }
}
@media (hover: hover) and (pointer: fine) { .seg-opt input:hover + span { border-color: var(--text); } }

.screening-item { margin-bottom: 18px; }
.grid-rows > .screening-item { margin-bottom: 0; }
.screening-item legend { font-weight: 650; font-size: 1.125rem; padding-bottom: 12px; }

/* country picker */
.country-search { position: relative; margin-top: 18px; }
.country-search .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input, .country-search input {
  width: 100%; min-height: var(--tap); padding: 13px 18px; font: inherit; font-size: 1.125rem; font-weight: 450; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.country-search input { -webkit-appearance: none; appearance: none; padding-left: 50px; padding-right: 14px; border-radius: 999px; }
.country-search input::-webkit-search-decoration { -webkit-appearance: none; }
/* the native clear (×) button, drawn in the muted text colour instead of the browser's blue */
.country-search input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin: 0 2px 0 8px; cursor: pointer; border-radius: 50%;
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), var(--muted) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 12px 12px no-repeat,
    linear-gradient(-45deg, transparent calc(50% - 1px), var(--muted) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)) center / 12px 12px no-repeat,
    var(--surface-2);
}
@media (hover: hover) and (pointer: fine) { .input:hover, .country-search input:hover { border-color: var(--text); } }
.input::placeholder, .country-search input::placeholder { color: var(--muted); opacity: 1; }
.input:focus-visible, .country-search input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.country-list { margin-top: 10px; max-height: min(44vh, 420px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 6px; box-shadow: var(--shadow-sm); }
.country-list .group-label { font-size: .875rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--brick-ink); padding: 10px 10px 4px; }
.country-list .opt { min-height: 52px; border-color: transparent; box-shadow: none; padding: 10px 10px; margin-bottom: 2px; }
@media (hover: hover) and (pointer: fine) { .country-list .opt:hover { background: var(--surface-2); } }
.country-list .opt:has(input:checked), .country-list .opt.is-checked { border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border); background: var(--accent-soft); }
.country-list .opt:has(input:focus-visible) { outline-offset: -3px; }
.country-empty { padding: 12px; color: var(--muted); }
.country-zz { margin-top: 10px; }
/* "Selected: …" (country) sits in the action bar, so it is in view wherever the list is scrolled. */
.selected-note { margin: 0; font-weight: 650; }
.selected-note:empty { height: 0; }
.selected-note:not(:empty) { display: inline-flex; justify-self: start; align-items: center; gap: 8px; min-height: 34px; padding: 4px 14px 4px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--selected-border); color: var(--text); line-height: 1.3; }
.selected-note:not(:empty)::before { content: ""; width: 9px; height: 5px; margin: 0 4px 3px 4px; border-left: 2.5px solid var(--brick-ink); border-bottom: 2.5px solid var(--brick-ink); transform: rotate(-45deg); }

/* ---------- sticky action bar (eligibility + questions) ---------- */
/* position: sticky inside the screen: on a long question it rides at the bottom of the viewport, on a short
   one it simply sits under the options. Opaque-enough glass so the buttons never compete with what scrolls
   behind; safe-area aware for phones with a home indicator. */
.q-bar {
  position: sticky; bottom: 0; z-index: 5;
  margin: 22px -16px calc(-40px - env(safe-area-inset-bottom)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bar); border-top: 1px solid var(--glass-line);
  box-shadow: 0 -1px 0 color-mix(in srgb, var(--border) 80%, transparent), 0 -12px 28px -20px rgba(70, 40, 25, .45);
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
}
.q-bar-btns { display: flex; gap: 10px; align-items: stretch; }
.q-bar .alert { margin: 0 0 10px; }
.q-bar .btn-back { padding: 14px 18px 14px 14px; }
.btn-back .ico { flex: 0 0 auto; }
@media (min-width: 600px) {
  .q-bar { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; border-radius: 22px 22px 0 0; border-left: 1px solid var(--glass-line); border-right: 1px solid var(--glass-line); }
}
/* Next before the step is answered: softer, still enabled (pressing it says what is missing). */
.btn-primary.is-pending { background: var(--brick-soft); color: var(--brick-ink); border-color: var(--brick-ink); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .btn-primary.is-pending:hover { background: var(--brick-soft); color: var(--brick-ink); border-color: var(--brick-ink); } }
@media (prefers-contrast: more) { .btn-primary.is-pending { border-width: 2px; } }
@supports not (color: color-mix(in srgb, red 50%, blue)) { .q-bar { box-shadow: 0 -1px 0 var(--border); } }
/* The root scroller keeps focused controls clear of the sticky top bar and of the action bar (WCAG 2.4.11).
   --bar-h is the bar's measured height (set by the script; 150px until measured). */
html.has-bar { scroll-padding-bottom: calc(var(--bar-h, 150px) + 12px); }
/* Short steps: the screen fills the viewport so the bar rests on the bottom edge instead of floating mid-page. */
html.has-bar body { display: flex; flex-direction: column; }
html.has-bar .main { flex: 1 0 auto; width: 100%; display: flex; flex-direction: column; }
html.has-bar #app { flex: 1 0 auto; display: flex; flex-direction: column; }
html.has-bar .q-bar { margin-top: auto; }
html.has-bar fieldset.q, html.has-bar #app > .grid-rows { margin-bottom: 22px; }
body[data-screen="q"] .main, body[data-screen="screening"] .main { padding-top: 22px; }
/* Typing in the country search: the keyboard takes half the screen and Next only matters after a pick,
   so the bar stops floating and rests after the list. */
html.kb-open .q-bar { position: static; }
html.kb-open.has-bar { scroll-padding-bottom: 0; }
/* Short viewports (phone landscape, 200–400% zoom, keyboards that resize the page): two sticky bars would
   leave almost no room for the question (WCAG 1.4.10), so both scroll with the page. */
@media (max-height: 520px) {
  html.has-bar .topbar, html.has-bar .q-bar { position: static; }
  html.has-bar { scroll-padding-top: 12px; scroll-padding-bottom: 0; }
}

/* Step change: a short, discreet slide in the direction of travel (none with reduced motion). */
body[data-screen="q"] .screen[data-dir="fwd"] > :not(.q-bar) { animation: q-in-fwd .32s var(--ease) both; }
body[data-screen="q"] .screen[data-dir="back"] > :not(.q-bar) { animation: q-in-back .32s var(--ease) both; }
body[data-screen="q"] .screen { animation: none; }
@keyframes q-in-fwd { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes q-in-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

/* forms */
.field { margin: 0 0 18px; }
.field label.lbl, .lbl { display: block; font-weight: 650; margin-bottom: 6px; }
.check { display: flex; gap: 14px; align-items: flex-start; padding: 0; }
.check input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 26px; height: 26px; margin: 13px 0; border: 1.5px solid var(--border-strong); border-radius: 7px; background: var(--surface); display: grid; place-content: center; cursor: pointer; }
.check input::before { content: ""; width: 13px; height: 7px; border-left: 2.5px solid var(--accent-text); border-bottom: 2.5px solid var(--accent-text); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .12s var(--ease); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::before { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check label { cursor: pointer; flex: 1 1 auto; padding: 13px 0; line-height: 1.5; }
/* Draw form: each consent is a tappable row, like an answer card (brick only once ticked). */
.card .check { margin-top: 10px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border-strong); transition: border-color .15s, background-color .15s, box-shadow .15s; }
.card .check:has(input:checked) { background: var(--accent-soft); border-color: var(--selected-border); box-shadow: inset 0 0 0 1px var(--selected-border); }
.card .check:has(input[aria-invalid="true"]) { border-color: var(--err); }
.card .check label a { position: relative; z-index: 1; }
.card .field .input { border-radius: var(--radius-sm); }
.card .actions.stack { margin-top: 22px; }
.field-error { display: flex; gap: 8px; align-items: flex-start; color: var(--err); font-weight: 600; font-size: 1rem; line-height: 1.4; margin: 8px 0 0; }
.field-error::before { content: "!"; content: "!" / ""; flex: 0 0 auto; display: grid; place-items: center; width: 19px; height: 19px; margin-top: 1px; border-radius: 50%; background: var(--err); color: var(--err-soft); font-size: .75rem; font-weight: 700; line-height: 1; }
.input[aria-invalid="true"], .check input[aria-invalid="true"] { border-color: var(--err); border-width: 2px; }
/* A note on the page is a small floating card; inside a card it becomes an inset sand box. */
.note { background: var(--card); border: 1px solid var(--glass-line); box-shadow: var(--glass-inner), var(--shadow-sm); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 1rem; line-height: 1.55; color: var(--text-2); margin: 0 0 20px; }
.card .note { background: var(--surface-2); border: 0; box-shadow: none; margin-bottom: 16px; }

/* alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); padding: 12px 14px; margin: 16px 0 0; font-weight: 550; line-height: 1.45; }
.alert:empty { display: none; }
/* Calm, not alarming: a soft tint, a thin edge and a small round badge (the text says what to do). */
.alert::before { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; font-size: .8125rem; font-weight: 700; line-height: 1; }
.alert-error { background: var(--err-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); }
.alert-error::before { content: "!"; content: "!" / ""; background: var(--err); color: var(--err-soft); }
.alert-info { background: var(--warn-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.alert-info::before { content: "i"; content: "i" / ""; border: 1.5px solid var(--warn); color: var(--text); font-style: italic; }
.alert-ok { background: var(--ok-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.q .alert { margin: 14px 0 0; }
/* Answered after a "missing answer" message: the box keeps its height (so the answers below never move under
   the finger) but turns invisible (and silent); it disappears with the next step. */
.alert.is-resolved { visibility: hidden; }
@supports not (color: color-mix(in srgb, red 50%, blue)) { .alert-error { border-color: var(--err); } .alert-info { border-color: var(--warn); } .alert-ok { border-color: var(--ok); } }

/* end screens */
.end-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brick-soft); color: var(--brick-ink); border: 1px solid color-mix(in srgb, var(--brick) 25%, transparent); box-shadow: var(--shadow-sm); margin: 8px 0 18px; }
.ticket { margin: 18px 0; padding: 22px 18px 26px; text-align: center; border: 1.5px dashed var(--brick-edge); border-radius: var(--radius); background: var(--card); box-shadow: var(--glass-inner), var(--shadow); }
.ticket-code { display: inline-block; margin-top: 4px; padding: 10px 16px; border-radius: 12px; background: var(--surface-2); font-family: var(--mono); font-size: clamp(1.625rem, 7vw, 2rem); font-weight: 700; letter-spacing: .08em; line-height: 1.25; color: var(--text); user-select: all; -webkit-user-select: all; word-break: break-all; }
.ticket-label { font-size: .9375rem; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: var(--brick-ink); margin-bottom: 8px; }
.kiosk-note { margin-top: 12px; font-size: 1rem; color: var(--muted); text-align: center; }

/* ---------- verifica page ---------- */
.v-dl { display: grid; grid-template-columns: 1fr; gap: 2px 12px; margin: 0; }
.v-dl dt { font-weight: 650; font-size: .9688rem; color: var(--muted); margin-top: 10px; }
.v-dl dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); font-size: .9375rem; overflow-wrap: anywhere; word-break: break-all; }
.code-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.code-list li { font-family: var(--mono); font-size: .9375rem; background: var(--surface-2); border-radius: 8px; padding: 5px 8px; text-align: center; }
.code-list li.hit { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.ranked { margin: 6px 0 0; padding-left: 1.6em; }
.ranked li { font-family: var(--mono); font-weight: 700; padding: 2px 0; }
.checks { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); }
.checks li.ok { background: var(--ok-soft); }
.checks li.ko { background: var(--err-soft); }
.checks .mark { font-weight: 700; flex: 0 0 auto; width: 1.4em; text-align: center; }
.checks li.ok .mark { color: var(--ok); }
.checks li.ko .mark { color: var(--err); }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 650; min-height: 48px; display: flex; align-items: center; gap: 12px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; content: "+" / ""; margin-left: auto; font-size: 1.4rem; font-weight: 400; line-height: 1; color: var(--brick-ink); }
details[open] > summary::after { content: "\2013"; content: "\2013" / ""; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form .input { flex: 1 1 180px; text-transform: uppercase; font-family: var(--mono); }
.inline-form .btn { flex: 0 0 auto; }
.algo { padding-left: 1.3em; font-size: 1rem; color: var(--text-2); }
.algo li { margin-bottom: 6px; }
.algo code { font-family: var(--mono); font-size: .9rem; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; overflow-wrap: anywhere; }

@media (min-width: 600px) {
  body { font-size: 1.125rem; }
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.9rem; }
  .main { padding-top: 34px; }
  body[data-screen="landing"] .main { padding-top: 24px; }
  .card { padding: 26px; }
  .card h2 { font-size: 1.625rem; }
  .v-dl { grid-template-columns: max-content 1fr; }
  .v-dl dt { margin-top: 0; padding-top: 6px; }
  .v-dl dd { padding-top: 6px; }
}

/* Windows High Contrast / forced colours: decorative layers go away; selected states drawn only with
   backgrounds would vanish, so they get system Highlight colours. */
@media (forced-colors: active) {
  body::before, .stage-bg, .arcade { display: none; }
  .glass, .card, .note, .chip, .fact, .photo-chip, .winners, .fine { border: 1px solid CanvasText; }
  .brand::before { border-color: CanvasText; }
  .step-num { border: 1px solid CanvasText; }
  .step:not(:last-child)::after { background: CanvasText; }
  .chip[aria-current="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .opt input:checked, .check input:checked { forced-color-adjust: none; background: Highlight; border-color: Highlight; }
  .opt input:checked::before, .check input:checked::before { border-color: HighlightText; }
  .pip.on, .q-grid .grid-row.answered legend::after { forced-color-adjust: none; background: Highlight; border-color: Highlight; }
  .q-grid .grid-row.answered legend::before { forced-color-adjust: none; border-color: HighlightText; }
  .q-bar { border-top: 1px solid CanvasText; }
  .btn-primary.is-pending { border-color: ButtonText; }
  .selected-note:not(:empty), .counter-max, .alert, .row-missing { border: 1px solid CanvasText; }
  .grid-row.is-missing { border: 3px solid CanvasText; }
  .seg-opt input:checked + span::before { forced-color-adjust: none; background: Highlight; border-color: Highlight; }
  .seg-opt input:checked + span::after { forced-color-adjust: none; border-color: HighlightText; }
  .progress-track[style*="--steps"] { -webkit-mask: none; mask: none; background: Canvas; }
  .opt:has(input:checked), .opt.is-checked { border-color: Highlight; border-width: 3px; }
  .seg-opt input:checked + span { border-color: Highlight; border-width: 3px; }
  .progress-track { border: 1px solid CanvasText; }
  .progress-fill { forced-color-adjust: none; background: Highlight; }
  .lang-select { appearance: auto; -webkit-appearance: auto; background-image: none; padding-right: 12px; }
  .code-list li.hit { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .prize-card:hover .prize-photo img, .btn-cta:hover, .btn-cta:hover .ico, .jump:hover .ico { transform: none; }
}

@media print {
  .topbar, .skip-link, .actions, .q-bar, .stage-bg, .arcade, .lang-chips, body::before { display: none !important; }
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
}
