/*
 * theme.css — THIS APP'S DESIGN-SYSTEM VALUES. Seeded once, then yours.
 *
 * Every token name the design layer reads, in BOTH modes, with a deliberately
 * neutral value. The values are placeholders: rewrite every one of them from
 * the design brief on the first build, and edit them freely afterwards. An
 * app that ships this file unchanged has no design.
 *
 * THE SHAPE IS CHECKED, THE VALUES ARE NOT (lib/themeShape.ts). Three blocks
 * at most and only these selectors:
 *   :root                       the mode the page opens in (add
 *                               `color-scheme: dark` here if that is dark)
 *   html[data-theme="dark"]     the other mode, when the page opens light
 *   html[data-theme="light"]    the other mode, when the page opens dark
 * Inside them, only the token names below (and color-scheme). Every token
 * listed under PALETTE must be declared in :root — each one is a utility
 * (bg-canvas, text-ink, border-border, bg-accent-soft …) with no fallback,
 * so a missing token is a class that paints nothing. Text-on-ground pairs are
 * measured for contrast in both modes (ink on canvas 4.5:1, muted on surface
 * 4.4:1, accent-ink on accent 3:1, and so on) and a pair that fails names
 * itself in the build log. A token may reference another with var(), but a
 * token that references itself through any chain is a cycle, and CSS then
 * makes EVERY token in it invalid — the page goes transparent with white
 * text — so that is refused before it ships.
 *
 * Write colours as hex, rgb() or hsl(), or color-mix(in srgb, …) over those,
 * so the contrast can be measured. oklch and lab are not yet measurable
 * here and are refused on a token that is measured.
 *
 * PALETTE (32) — what each is legible on is in the name:
 *   --canvas           the page              --surface  a card    --surface-2  an inset, a band
 *   --border           a hairline            --border-strong       a control's edge
 *   --ink              text on the page      --muted               secondary text
 *   --accent           the filled action     --accent-hover        its hover
 *   --accent-ink       text ON --accent      --accent-text         accent-coloured text on the page
 *   --accent-soft      a tinted wash         --accent-strong       text on --accent-soft
 *   --accent-border    a tinted edge
 *   --success --success-ink --success-soft --success-strong   (and warning, danger)
 *   --chart-1 … --chart-6   six categorical colours, the brand first
 * TYPE — name the families you link in the layout's <head>:
 *   --font-display --font-body --font-mono --font-sans (= body)
 *   --display-weight --display-tracking --eyebrow-tracking
 * SHAPE — optional; every primitive has a fallback, and one line here
 * retunes all of them: --radius-btn --radius-card --radius-input --border-w
 *   --border-strong-w --shadow-card --shadow-raised --shadow-btn --card-pad
 *   --caps --caps-tracking --btn-weight --measure
 * Gradients and shadow ramps are tokens too: --gradient-<name>, --shadow-<name>.
 */

:root {
  --canvas: #f4f8f7;
  --surface: #ffffff;
  --surface-2: #e8f1ef;
  --border: #d4e4df;
  --border-strong: #a7c3b9;
  --ink: #12483e;
  --muted: #536d67;
  --accent: #12483e;
  --accent-hover: #176454;
  --accent-ink: #ffffff;
  --accent-text: #12483e;
  --accent-strong: #12483e;
  --accent-soft: #d8f2e9;
  --accent-border: #a7c3b9;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dfebe3;
  --success-strong: #137638;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f2e6dd;
  --warning-strong: #a64c08;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f2dfdf;
  --danger-strong: #b91c1c;
  --x-bin-yellow:#f3c74c;--x-bin-yellow-ink:#553b00;--x-bin-red:#c83e49;--x-bin-blue:#2775ad;--x-bin-white:#edf2f5;--x-bin-white-ink:#354c55;--x-bin-light-ink:#ffffff;--chart-1: #12483e;
  --chart-2: #7c285c;
  --chart-3: #7c350c;
  --chart-4: #425605;
  --chart-5: #0b5668;
  --chart-6: #5152a5;

  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 700;
  --display-tracking: -0.02em;
  --eyebrow-tracking: 0.06em;
}

html[data-theme="dark"] {
  --canvas: #12483e;
  --surface: #16372f;
  --surface-2: #176454;
  --border: #35584e;
  --border-strong: #5b8176;
  --ink: #f4f8f7;
  --muted: #b4ccc3;
  --accent: #f4f8f7;
  --accent-hover: #e4f6ee;
  --accent-ink: #12483e;
  --accent-text: #f4f8f7;
  --accent-strong: #f4f8f7;
  --accent-soft: #176454;
  --accent-border: #4e786c;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #172f22;
  --success-strong: #58a474;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #3a2517;
  --warning-strong: #ca854f;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #3b191b;
  --danger-strong: #d57575;
  --x-bin-yellow:#f3c74c;--x-bin-yellow-ink:#553b00;--x-bin-red:#c83e49;--x-bin-blue:#2775ad;--x-bin-white:#edf2f5;--x-bin-white-ink:#354c55;--x-bin-light-ink:#ffffff;--chart-1: #a1a1aa;
  --chart-2: #cb70a4;
  --chart-3: #be6436;
  --chart-4: #98911a;
  --chart-5: #159670;
  --chart-6: #1c9ec8;
}

body{background:var(--canvas);color:var(--ink);font-family:var(--font-body)}.topbar{max-width:1150px;margin:auto;padding:22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{font-size:21px;font-weight:800;display:flex;gap:12px;align-items:center}.brand small{display:block;font-size:9px;letter-spacing:2px;color:var(--muted)}.brand-icon{background:var(--accent);color:var(--accent-ink);padding:12px;border-radius:12px}.topbar nav{display:flex;gap:20px}.topbar a{text-decoration:none;color:var(--ink)}.hero{max-width:1150px;margin:auto;padding:70px 22px;display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center}.eyebrow{font-size:11px;letter-spacing:2px;color:var(--accent-text);font-weight:800}.hero h1{font-size:clamp(42px,5vw,76px);font-weight:800;line-height:1.08;letter-spacing:-2px;margin:20px 0}.hero h1 em{font-style:normal;color:var(--accent-text)}.hero p,.section-head p,.how p{color:var(--muted);line-height:1.7}.hero-actions,.hero-metrics{display:flex;gap:14px;flex-wrap:wrap;margin:26px 0}.hero-metrics{gap:25px}.hero-metrics span{font-size:12px;color:var(--muted)}.hero-metrics b{display:block;color:var(--ink);font-size:26px}.mainbtn,.secondarybtn{display:inline-block;padding:15px 22px;border-radius:12px;font-weight:700;cursor:pointer;text-decoration:none;border:0}.mainbtn{background:var(--accent);color:var(--accent-ink)}.secondarybtn{background:var(--surface);color:var(--ink);border:1px solid var(--border)}.hero-art{background:var(--surface);border:1px solid var(--border);border-radius:24px;padding:35px 20px;text-align:center;box-shadow:0 15px 40px #00000010}.art-heading{font-weight:800;letter-spacing:3px;margin-bottom:35px}.bins{display:flex;gap:10px;justify-content:center}.bin{height:135px;width:24%;border-radius:12px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;font-size:11px;font-weight:900}.bin span{font-size:33px}.yellow{background:var(--x-bin-yellow);color:var(--x-bin-yellow-ink)}.red{background:var(--x-bin-red);color:var(--x-bin-light-ink)}.white{background:var(--x-bin-white);color:var(--x-bin-white-ink);border:1px solid var(--border)}.blue{background:var(--x-bin-blue);color:var(--x-bin-light-ink)}.hero-art p{font-size:12px;margin-top:28px}.play-section,.rankings,.how{padding:65px max(22px,calc((100vw - 1100px)/2))}.play-section{background:var(--surface-2)}.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}.section-head h2,.how h2{font-size:36px;font-weight:800;margin:10px 0}.practice-tag{background:var(--accent-soft);color:var(--accent-strong);padding:10px;border-radius:30px;font-size:11px;font-weight:800}.game-card{max-width:850px;margin:auto;background:var(--surface);border:1px solid var(--border);padding:30px;border-radius:20px}.game-card h3{font-size:25px;font-weight:800}.game-card p{color:var(--muted)}.fields{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:22px 0}.fields label{font-size:13px;font-weight:700}.fields input{display:block;width:100%;padding:12px;margin-top:8px;border:1px solid var(--border-strong);border-radius:10px;background:var(--canvas);color:var(--ink)}.consent{display:flex;gap:9px;margin:20px 0;font-size:13px}.game-top{display:flex;justify-content:space-between}.progress-track{height:8px;background:var(--surface-2);border-radius:10px;margin:20px 0;overflow:hidden}#progress-fill{height:100%;background:var(--accent);width:0}.safety{background:var(--accent-soft);padding:18px;border-radius:12px}.safety span{font-size:12px;font-weight:800;color:var(--accent-strong)}.choices{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:25px 0}.choice{padding:20px 7px;border:0;border-radius:12px;font-size:11px;font-weight:900;cursor:pointer}.choice:disabled{opacity:.65}.special{background:var(--surface-2);color:var(--ink);border:1px dashed var(--border-strong)}.hidden{display:none!important}#feedback{padding:15px 0;font-weight:700}.board{border:1px solid var(--border);border-radius:15px;background:var(--surface);overflow:hidden}.board-row{display:grid;grid-template-columns:50px 1fr 1fr 90px;gap:12px;padding:17px;border-bottom:1px solid var(--border)}.board-row span{color:var(--muted)}.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:25px}.steps article{background:var(--surface);border:1px solid var(--border);padding:24px;border-radius:15px}.steps article>b{color:var(--accent-text)}.steps h3{font-weight:800;font-size:20px;margin:18px 0 8px}footer{text-align:center;padding:30px;border-top:1px solid var(--border);color:var(--muted);font-size:12px}@media(max-width:750px){.topbar nav{display:none}.hero{grid-template-columns:1fr;padding:45px 20px}.bin{height:100px;font-size:9px}.play-section,.rankings,.how{padding:40px 18px}.fields,.steps{grid-template-columns:1fr}.choices{grid-template-columns:repeat(2,1fr)}.board-row{grid-template-columns:35px 1fr 80px}.board-row .hospital{display:none}}