/* ── Sneet ────────────────────────────────────────────────────────────────
   The site chrome is an ordinary contact page; everything from "THE GAUNTLET"
   down is the Veriform sheet that only exists after Submit.

   Two deliberately opposed looks live in this file:

     Sneet    — warm paper, an engraved-caps masthead, a slate-graphite
                accent, hairline rules, near-square corners. Set like a
                printed card.
     Veriform — cold grey enterprise widget: neutral steel, a monospace
                wordmark, square corners, flat fills. It should feel like a
                third party's software bolted onto a nice page, because that
                is the joke. It re-declares the palette tokens on .gauntlet,
                so every child below inherits the cold theme for free.

   Design tokens. Light is the base; dark overrides only the tokens.
   iOS Safari notes are marked [iOS] throughout.
   ────────────────────────────────────────────────────────────────────── */

/* ── Typefaces ────────────────────────────────────────────────────
   Two faces, self-hosted as variable woff2 in fonts/ — no external font
   service, matching the rest of this site's zero-dependency habit.

     Space Grotesk    — wordmark and the one headline. A squared grotesque
                        with clipped terminals and flat-sided bowls; its caps
                        track out like engraving, so the masthead keeps its
                        stationery feel without a serif doing the work.
     Instrument Sans  — everything else. A tight, slightly condensed
                        grotesque that stays quiet at 15px and still has a
                        voice in the small tracked-caps labels.

   Both are variable (300-700 / 400-700), which is what lets the labels below
   sit on the odd weights — 620, 650 — that a static family would round away.
   The system stacks behind them are a failed-load fallback, not a design
   choice.
   ─────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-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;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700;
  font-display: swap;
  src: url("fonts/space-grotesk-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans-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;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Warm paper stock, not the usual cool blue-grey. */
  --bg:            #f2efe9;
  --bg-elev:       #fbfaf7;
  --bg-sunk:       #f3f0e9;
  --ink:           #191614;
  --ink-2:         #56504a;
  --ink-3:         #8a8279;
  --line:          #ded8cc;
  --line-2:        #cdc4b4;
  /* Slate graphite — the ink a letterpress shop would mix, not a stock hue.
     It reads as grey, but with a faint cool-green cast so it sits against the
     warm stock instead of agreeing with it, which is the whole point. It is
     also deliberately warmer and greener than Veriform's blue-steel grey
     below, so the two greys never look like the same system. Used sparingly:
     the masthead rule, the submit button, focus. Nothing else
     gets to be coloured. */
  --accent:        #3f4542;
  --accent-hi:     #2a2f2c;
  --accent-ink:    #fdfbf8;
  --accent-soft:   rgba(63,69,66,.10);
  --good:          #1c7a52;
  --bad:           #b32b21;
  --warn:          #9a6a10;

  /* Shadows are tight and warm — contact shadows, not glows. */
  --shadow-sm:     0 1px 1px rgba(25,22,20,.05);
  --shadow-md:     0 1px 1px rgba(25,22,20,.05), 0 4px 10px -8px rgba(25,22,20,.30);
  --shadow-lg:     0 2px 6px -3px rgba(25,22,20,.24), 0 18px 44px -20px rgba(25,22,20,.50);

  /* Radii are near-square and used for different jobs, not one soft default:
     tight = controls, card = panels, pill/circle only where the shape means
     something (a meter, a knob, a radio). */
  --r-tight: 2px;
  --r-card:  3px;
  --r-pill:  999px;

  --tap: 44px;                       /* [iOS] minimum comfortable tap target */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  /* Text face — everything that is not the wordmark or the headline. */
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  /* Display face — the wordmark and the headline, and nothing else. Letting
     it near body copy is what turns a page into a font specimen. */
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #14110f;
    --bg-elev:     #1d1a16;
    --bg-sunk:     #100e0c;
    --ink:         #f0ebe3;
    --ink-2:       #aca49a;
    --ink-3:       #7e766c;
    --line:        #2c2723;
    --line-2:      #3f3831;
    /* Same graphite, lifted to a pale slate so it reads on near-black paper. */
    --accent:      #b6bdb8;
    --accent-hi:   #cbd2cc;
    --accent-ink:  #17120f;
    --accent-soft: rgba(182,189,184,.14);
    --good:        #4fbe8f;
    --bad:         #ff7b6a;
    --warn:        #e0a53f;
    --shadow-sm:   0 1px 1px rgba(0,0,0,.5);
    --shadow-md:   0 1px 1px rgba(0,0,0,.5), 0 4px 12px -8px rgba(0,0,0,.8);
    --shadow-lg:   0 2px 8px -3px rgba(0,0,0,.6), 0 22px 50px -22px rgba(0,0,0,.9);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;   /* [iOS] stop landscape font inflation */
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* [iOS] never let a rogue horizontal overflow create a zoomed-out page */
  padding-left: var(--sal);
  padding-right: var(--sar);
}
/* [iOS] overflow:hidden alone does not hold Safari still — the body has to be
   taken out of flow, with its scroll offset preserved by JS via --lock-top. */
body.is-locked {
  position: fixed;
  top: var(--lock-top, 0px);
  left: 0; right: 0;
  width: 100%;
  overflow: hidden;
}

img, svg { max-width: 100%; }
a { color: inherit; }

/* [iOS] kill the grey flash on tap, and the long-press callout on controls */
a, button, input, textarea, select, [role="button"], .tile, .gx-choice {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
button, .btn { touch-action: manipulation; }  /* [iOS] no 300ms double-tap-zoom wait */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 0;
}

/* The masthead rule: one 3px band of accent across the top of the page. It is
   the only large piece of colour on the site and it anchors everything else. */
body::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
  z-index: 60;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: calc(18px + var(--sat)) clamp(20px, 5vw, 44px) 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* Text-only wordmark: the display face in widely tracked caps, with the full
   stop carrying the accent. No icon — the type is the mark. Space Grotesk's
   caps are squared and faintly mechanical, so tracked out they read engraved
   without a serif anywhere; 500 is the weight that holds at 19px, since 400
   goes thin once the letters are this far apart. */
.brand {
  font-family: var(--display);
  font-size: 19px; line-height: 1;
  font-weight: 500; letter-spacing: .145em;
  text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  /* Tracking adds space after the final letter; pull the mark back so it
     still optically aligns with the left edge of the page. */
  margin-inline-end: -.145em;
}
.brand-stop { color: var(--accent); margin-left: -.09em; }
.header-tag {
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--ink-3);
}

/* ── Layout ─────────────────────────────────────────────────────────── */
main { position: relative; z-index: 1; }
section { padding-inline: clamp(20px, 5vw, 44px); }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 22px;
  font: inherit; font-size: 12.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .12em;
  border-radius: var(--r-tight); border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background .16s, color .16s, border-color .16s, box-shadow .16s, opacity .16s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-hi); }
.btn-quiet {
  background: transparent; color: var(--ink-2); border-color: var(--line-2);
}
.btn-quiet:hover { color: var(--ink); border-color: var(--ink-3); }
.btn-block { width: 100%; }

/* ── Contact ────────────────────────────────────────────────────────── */
.contact {
  max-width: 552px; margin-inline: auto;
  padding-block: clamp(44px, 9vw, 88px) clamp(48px, 9vw, 96px);
}
.contact-inner {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-md);
}
/* Copy and form are separated by a hairline, and the copy block is left-set —
   an editorial card, not a centred hero. */
.contact-copy {
  padding: clamp(28px, 5.5vw, 40px) clamp(24px, 5vw, 40px) clamp(24px, 4.5vw, 32px);
  border-bottom: 1px solid var(--line);
}
/* The only place the display face appears at size. Space Grotesk is already
   tightly fitted, so it wants far less negative tracking than the old serif
   did, and a hair more leading. */
.contact-copy h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(31px, 5.6vw, 42px);
  font-weight: 600; letter-spacing: -.015em; line-height: 1.1;
}
.lede {
  margin: 0; color: var(--ink-2);
  font-size: 15px; line-height: 1.55; max-width: 40ch; text-wrap: pretty;
}

.contact-form {
  display: grid; gap: 18px;
  padding: clamp(24px, 4.5vw, 32px) clamp(24px, 5vw, 40px) clamp(26px, 5vw, 36px);
}
.field { display: grid; gap: 7px; }
.field label {
  font-size: 10.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-3);
}
input[type="text"], input[type="email"], textarea {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  font: inherit;
  font-size: 16px;             /* [iOS] < 16px triggers auto zoom-on-focus. Never go lower. */
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-sunk);
  border: 1px solid var(--line-2);
  border-radius: var(--r-tight);
  padding: 12px 14px;
  min-height: var(--tap);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; min-height: 132px; }
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 1; }
input:focus, textarea:focus {
  outline: none; background: var(--bg-elev);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.form-note {
  margin: 0; padding-top: 2px;
  font-size: 12px; color: var(--ink-3); line-height: 1.5;
}
.form-note strong { color: var(--ink-2); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line);
  max-width: 552px; margin-inline: auto;
  padding: 22px clamp(20px, 5vw, 44px) calc(32px + var(--sab));
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 6px 20px;
  color: var(--ink-3);
}
.site-footer p { margin: 0; }
.footer-line { font-size: 12.5px; }
.site-footer .footer-small {
  display: flex; gap: 18px;
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .13em;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink-2); }

/* ═══ THE GAUNTLET ══════════════════════════════════════════════════════
   Cold neutral enterprise widget. Re-declaring the tokens here re-themes
   everything inside the sheet without touching a single child rule.
   ══════════════════════════════════════════════════════════════════════ */

.gauntlet {
  --bg-elev:     #ffffff;
  --bg-sunk:     #f2f3f5;
  --ink:         #15171a;
  --ink-2:       #4c525a;
  --ink-3:       #868c95;
  --line:        #e0e2e6;
  --line-2:      #c5c9cf;
  --accent:      #2f333a;      /* institutional graphite, not a brand colour */
  --accent-hi:   #14171b;
  --accent-ink:  #ffffff;
  --accent-soft: rgba(47,51,58,.07);
  --good:        #167a4b;
  --bad:         #c0271c;
  --warn:        #9a6a10;
  --r-tight:     0px;          /* the widget has no radii at all */
  --r-card:      0px;
  /* Whatever sans the OS hands it. Sneet chose its type; Veriform never
     did, and that gap is half the joke. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  font-family: var(--font);

  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  /* [iOS] dvh tracks the collapsing URL bar; vh is the fallback for old Safari */
  height: 100vh; height: 100dvh;
}
@media (prefers-color-scheme: dark) {
  .gauntlet {
    --bg-elev:     #191b1f;
    --bg-sunk:     #121417;
    --ink:         #e9ebee;
    --ink-2:       #a3a9b2;
    --ink-3:       #767c85;
    --line:        #2a2d33;
    --line-2:      #3b3f47;
    --accent:      #9aa3ae;
    --accent-hi:   #b9c1ca;
    --accent-ink:  #14171b;
    --accent-soft: rgba(154,163,174,.12);
    --good:        #45c08a;
    --bad:         #ff6a5c;
  }
}
.gauntlet[hidden] { display: none; }
@media (min-width: 640px) { .gauntlet { align-items: center; } }

.gauntlet-scrim {
  position: absolute; inset: 0;
  background: rgba(12,10,8,.66);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: fadeIn .22s ease both;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.gauntlet-sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  font-size: 15px;
  /* [iOS] safe-area bottom so the sheet clears the home indicator */
  padding-bottom: var(--sab);
  animation: sheetUp .34s cubic-bezier(.2,.9,.25,1) both;
  overflow: hidden;
}
@media (min-width: 640px) {
  .gauntlet-sheet {
    max-height: min(720px, calc(100vh - 48px));
    max-height: min(720px, calc(100dvh - 48px));
  }
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0 } to { transform: none; opacity: 1 } }

.gauntlet-sheet.shake { animation: shake .42s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px) }
  20%, 80% { transform: translateX(4px) }
  30%, 50%, 70% { transform: translateX(-7px) }
  40%, 60% { transform: translateX(7px) }
}

.gx-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-2);
  background: var(--bg-sunk); flex: none;
}
/* Veriform's wordmark is monospace and shouty — the anti-Sneet. */
.gx-brand {
  font-family: var(--mono);
  font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--ink);
}
.gx-tm { font-size: 8px; vertical-align: super; letter-spacing: 0; color: var(--ink-3); }
.gx-step {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}

.gx-meter { padding: 12px 18px 13px; border-bottom: 1px solid var(--line); flex: none; }
.gx-meter-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.gx-meter-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 650; }
.gx-meter-val { font-family: var(--mono); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); transition: color .3s; }
.gx-bar { height: 5px; background: var(--bg-sunk); border: 1px solid var(--line-2); overflow: hidden; }
.gx-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width .55s cubic-bezier(.2,.8,.3,1), background .4s;
}
.gx-bar-fill.low { background: var(--bad); }

.gx-body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;    /* [iOS] momentum scroll inside the sheet */
  overscroll-behavior: contain;         /* [iOS] don't chain the bounce to the page */
  overflow-x: hidden;                   /* dodging elements must not create a sideways scrollbar */
  padding: 20px 18px;
}
.gx-title { margin: 0 0 6px; font-size: 19px; font-weight: 650; letter-spacing: -.018em; line-height: 1.25; text-wrap: balance; }
.gx-sub { margin: 0 0 18px; font-size: 14px; color: var(--ink-2); text-wrap: pretty; }
.gx-stage { display: grid; gap: 14px; }

.gx-foot { flex: none; padding: 13px 18px 15px; border-top: 1px solid var(--line-2); background: var(--bg-sunk); }
.gx-verdict { margin: 0 0 10px; font-size: 13px; line-height: 1.45; min-height: 0; color: var(--ink-2); }
.gx-verdict:empty { display: none; }
.gx-verdict.bad { color: var(--bad); }
.gx-verdict.good { color: var(--good); }
.gx-actions { display: flex; gap: 8px; }
.gx-actions .btn { flex: 1; min-height: 40px; padding-block: 10px; }
.gx-actions .btn-quiet { flex: 0 0 auto; padding-inline: 16px; }
.gx-legal { margin: 11px 0 0; font-size: 10px; color: var(--ink-3); text-align: center; letter-spacing: .04em; }
.gx-legal a { color: var(--ink-3); text-underline-offset: 2px; text-decoration-color: var(--line-2); }

/* ── Challenge primitives ───────────────────────────────────────────── */

/* reCAPTCHA-style box */
.rc-box {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-sunk); border: 1px solid var(--line-2);
  padding: 14px 16px; position: relative; overflow: hidden;
}
.rc-check {
  -webkit-appearance: none; appearance: none;
  flex: none; width: 26px; height: 26px; border-radius: 1px;
  border: 2px solid var(--line-2); background: var(--bg-elev);
  cursor: pointer; position: relative; margin: 0;
  transition: transform .3s cubic-bezier(.2,.8,.3,1), border-color .2s, background .2s;
}
.rc-check::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/16px 16px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  opacity: 0; transition: opacity .18s;
}
.rc-check[data-on="1"] { background: var(--good); border-color: var(--good); }
.rc-check[data-on="1"]::after { opacity: 1; }
.rc-check.spin { border-color: var(--accent); border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.rc-label { flex: 1; font-size: 14.5px; font-weight: 540; }
.rc-mark { flex: none; text-align: center; font-size: 9px; color: var(--ink-3); line-height: 1.2; }
.rc-mark svg { display: block; margin: 0 auto 3px; }

/* Image tile grid */
.tile-prompt {
  background: var(--accent); color: var(--accent-ink);
  padding: 13px 15px; margin-bottom: -1px;
}
.tile-prompt b { display: block; font-size: 16px; font-weight: 650; letter-spacing: -.012em; }
.tile-prompt span { font-size: 12px; opacity: .78; }
.tile-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  background: var(--line-2); border: 1px solid var(--line-2);
  overflow: hidden;
}
.tile {
  -webkit-appearance: none; appearance: none; border: 0; margin: 0; padding: 0;
  aspect-ratio: 1 / 1;
  min-height: var(--tap);          /* [iOS] never smaller than a thumb */
  position: relative; cursor: pointer;
  background: var(--bg-sunk); color: var(--ink);
  display: grid; place-items: center;
  font-size: clamp(24px, 8vw, 38px); line-height: 1;
  user-select: none; -webkit-user-select: none;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), filter .18s;
  overflow: hidden;
}
.tile:active { filter: brightness(.9); }
.tile[data-sel="1"] { transform: scale(.86); }
.tile[data-sel="1"]::after {
  content: ""; position: absolute; inset: 0;
  border: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 9.5px; line-height: 1.25; padding: 3px 4px;
  background: rgba(0,0,0,.6); color: #fff; font-weight: 500;
}

/* Generic option list */
.gx-choices { display: grid; gap: 8px; }
.gx-choice {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  min-height: var(--tap); padding: 12px 14px;
  font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--bg-sunk); border: 1px solid var(--line-2);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.gx-choice[data-sel="1"] { border-color: var(--accent); background: var(--accent-soft); }
.gx-choice .bullet {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-2); display: grid; place-items: center;
}
.gx-choice[data-sel="1"] .bullet { border-color: var(--accent); background: var(--accent); }
.gx-choice[data-sel="1"] .bullet::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }

/* Big question / equation */
.gx-equation {
  display: grid; place-items: center; gap: 4px;
  padding: 26px 16px;
  background: var(--bg-sunk); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: clamp(26px, 8vw, 40px); font-weight: 600;
  letter-spacing: -.02em; user-select: none; -webkit-user-select: none;
  font-variant-numeric: tabular-nums;
}
.gx-equation small { font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }

.gx-input {
  -webkit-appearance: none; appearance: none;
  width: 100%; font: inherit; font-size: 16px;   /* [iOS] 16px floor, no zoom */
  color: var(--ink); background: var(--bg-sunk);
  border: 1px solid var(--line-2);
  padding: 12px 14px; min-height: var(--tap);
}
.gx-input:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
textarea.gx-input { resize: none; min-height: 110px; line-height: 1.5; }
.gx-input.comic { font-family: "Comic Sans MS", "Chalkboard SE", "Comic Neue", cursive; font-size: 18px; }
.gx-input.blindfold { color: transparent; caret-color: transparent; text-shadow: none; }
.gx-input.blindfold::selection { background: transparent; }

.gx-hint { font-size: 12px; color: var(--ink-3); margin: 0; }
.gx-hint b { color: var(--ink-2); font-weight: 600; }
.gx-count { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Slider */
.gx-slider-wrap {
  background: var(--bg-sunk); border: 1px solid var(--line-2);
  padding: 18px 16px 16px;
  touch-action: none;              /* [iOS] we own the drag; no scroll hijack */
  user-select: none; -webkit-user-select: none;
}
.gx-slider-read { text-align: center; font-size: 13px; color: var(--ink-2); margin: 0 0 14px; min-height: 2.6em; }
.gx-slider-read b { color: var(--ink); font-weight: 620; }
.gx-track {
  position: relative; height: 10px;
  background: var(--line-2);
  margin: 0 22px;
}
.gx-zone {
  position: absolute; top: -4px; bottom: -4px;
  background: color-mix(in srgb, var(--good) 26%, transparent);
  border: 1px solid var(--good);
  transition: left .5s cubic-bezier(.2,.8,.3,1), width .5s cubic-bezier(.2,.8,.3,1);
}
/* The knob stays a circle: it is the one control whose shape says "drag me". */
.gx-knob {
  position: absolute; top: 50%; width: 44px; height: 44px;   /* [iOS] full tap target */
  margin: -22px 0 0 -22px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-md);
  display: grid; place-items: center; cursor: grab;
  font-size: 15px;
}
.gx-knob:active { cursor: grabbing; transform: scale(1.06); }
.gx-scale { display: flex; justify-content: space-between; margin-top: 12px; font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3); }

/* Canvas */
.gx-canvas-wrap {
  position: relative; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-sunk);
  touch-action: none;              /* [iOS] drawing, not scrolling */
}
.gx-canvas { display: block; width: 100%; height: 200px; }
.gx-canvas-hint {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ink-3); font-size: 13px; pointer-events: none; transition: opacity .2s;
}

/* Scroll-to-accept terms */
.gx-terms {
  height: 180px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  background: var(--bg-sunk); border: 1px solid var(--line-2);
  padding: 14px 16px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
}
.gx-terms p { margin: 0 0 10px; }
.gx-terms p:last-child { margin-bottom: 0; }

/* Audio challenge */
.gx-audio {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-sunk); border: 1px solid var(--line-2); padding: 14px;
}
.gx-play {
  -webkit-appearance: none; appearance: none; border: 0;
  flex: none; width: var(--tap); height: var(--tap); border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 15px; cursor: pointer;
  display: grid; place-items: center;
}
.gx-wave { flex: 1; display: flex; align-items: center; gap: 3px; height: 30px; }
.gx-wave i { flex: 1; background: var(--line-2); height: 20%; transition: height .12s; }
.gx-audio.playing .gx-wave i { background: var(--accent); animation: bob .9s ease-in-out infinite; }
@keyframes bob { 0%,100% { height: 15% } 50% { height: 90% } }
.gx-transcript { font-size: 12.5px; color: var(--ink-3); font-style: italic; margin: 0; }

/* Countdown */
.gx-countdown {
  display: grid; place-items: center; gap: 6px; padding: 30px 16px;
  background: var(--bg-sunk); border: 1px solid var(--line-2);
}
.gx-countdown b { font-family: var(--mono); font-size: clamp(34px, 12vw, 54px); font-weight: 620; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.gx-countdown span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }

/* Escaping / dodging elements */
.gx-dodge { transition: transform .28s cubic-bezier(.2,.8,.3,1); }

/* Fine print blocks that appear under a challenge */
.gx-fineprint { font-size: 10.5px; color: var(--ink-3); line-height: 1.55; margin: 0; }

/* Toast — squared off, like a status bar rather than a pill. */
.toast {
  position: fixed; z-index: 200;
  left: 50%; transform: translateX(-50%);
  bottom: calc(20px + var(--sab));
  max-width: min(440px, calc(100vw - 32px));
  background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: var(--r-tight);
  font-size: 13px; font-weight: 550; text-align: center;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s cubic-bezier(.2,.9,.25,1) both;
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px) } to { opacity: 1; transform: translate(-50%, 0) } }

/* Landscape phones: the sheet gets short, so claw back every pixel of body. */
@media (max-height: 520px) and (orientation: landscape) {
  .gauntlet-sheet {
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
  }
  .gx-head { padding: 9px 18px 8px; }
  .gx-meter { padding: 8px 18px 9px; }
  .gx-body { padding: 14px 18px; }
  .gx-foot { padding: 10px 18px 11px; }
  .gx-title { font-size: 17px; }
  .gx-sub { margin-bottom: 12px; font-size: 13.5px; }
  .gx-verdict { font-size: 12.5px; margin-bottom: 8px; }
  .gx-legal { display: none; }
  .gx-countdown { padding-block: 16px; }
  .gx-equation { padding-block: 16px; }
  .gx-canvas { height: 150px; }
  .gx-terms { height: 130px; }
}
