/* ============================================================================
   ARCADE NOIR — the shared design system for games.amit.marketing
   One stylesheet. Each game re-tints the entire site with a single --hue.
   ========================================================================== */

@font-face{font-family:Geist;src:url(/assets/fonts/geist.woff2) format('woff2');font-weight:100 900;font-display:swap;font-style:normal}
@font-face{font-family:'Geist Mono';src:url(/assets/fonts/geist-mono.woff2) format('woff2');font-weight:100 900;font-display:swap;font-style:normal}

:root{
  --hue:255;
  --good:oklch(0.75 0.165 55);      /* CVD-safe orange — never paired with hue alone */
  --info:oklch(0.65 0.175 250);     /* CVD-safe blue */
  --danger:oklch(0.63 0.20 25);

  --r-s:8px; --r-m:14px; --r-l:20px; --r-xl:28px; --r-pill:999px;
  --edge:inset 0 1px 0 rgb(255 255 255 / .07);
  --sh-1:0 1px 2px rgb(0 0 0 / .45);
  --sh-2:0 4px 14px rgb(0 0 0 / .38), 0 1px 3px rgb(0 0 0 / .5);
  --sh-3:0 14px 44px rgb(0 0 0 / .48), 0 2px 8px rgb(0 0 0 / .5);
  --glow:0 0 28px color-mix(in oklch, var(--accent), transparent 74%);

  --ease-out:cubic-bezier(.16,1,.3,1);
  --ease-pop:cubic-bezier(.34,1.56,.64,1);
  --t-fast:120ms; --t-base:220ms; --t-slow:500ms;
  --wrap:1120px;
  --sans:Geist,'Geist Fallback',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:'Geist Mono',ui-monospace,'SF Mono',Menlo,monospace;
  color-scheme:dark;
}

/* Hue-derived tokens are declared on <body> because that is where the per-game
   --hue lives. Declaring them on :root would bake the root hue into every page. */
body{
  --bg:oklch(0.135 0.014 var(--hue));
  --bg-deep:oklch(0.10 0.012 var(--hue));
  --surface:oklch(0.175 0.016 var(--hue));
  --surface-2:oklch(0.215 0.019 var(--hue));
  --line:oklch(0.29 0.015 var(--hue));
  --text:oklch(0.96 0.006 var(--hue));
  --muted:oklch(0.66 0.014 var(--hue));
  --accent:oklch(0.74 0.175 var(--hue));
  --accent-hi:color-mix(in oklch, var(--accent), white 16%);
  --accent-dim:color-mix(in oklch, var(--accent), var(--bg) 72%);
  --glow:0 0 28px color-mix(in oklch, var(--accent), transparent 74%);
}
/* per-game hues */
[data-game=starlock]{--hue:85}
[data-game=outrank]{--hue:255}
[data-game=summit]{--hue:158}

*,*::before,*::after{box-sizing:border-box}
*{margin:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--sans);background:var(--bg);color:var(--text);
  font-size:17px;line-height:1.6;min-height:100svh;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
/* the studio signature: an accent spotlight behind everything + fine film grain */
body::before{
  content:'';position:fixed;inset:0;z-index:-2;pointer-events:none;
  background:
    radial-gradient(1000px 620px at 50% -12%, color-mix(in oklch,var(--accent),transparent 84%), transparent 70%),
    radial-gradient(700px 480px at 88% 8%, color-mix(in oklch,var(--info),transparent 92%), transparent 70%),
    linear-gradient(var(--bg-deep), var(--bg) 40%);
}
body::after{
  content:'';position:fixed;inset:0;z-index:9999;pointer-events:none;
  opacity:.045;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
img,svg{display:block;max-width:100%}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-hi)}
/* ---------------------------------------------------------------------------
   DESIGNED FOCUS (spec §3.6)

   This is not a nicety on a games site. Every playfield here is driven from the
   keyboard, and three of the eight (Starlock, Summit, Outrank) are played
   entirely by tabbing between real <button> elements. A ring that is drawn but
   painted over is the same as no ring at all, so:

     · the outline is NEVER removed anywhere in this stylesheet or any of the
       eight per-game stylesheets — audited 2026-08-04, zero `outline:none`;
     · it is drawn in --accent-hi, not --accent. --accent-hi is derived per arm
       (lighter on the two dark arms, darker on arm C "paper"), so it always
       moves AWAY from its own ground — and it is a different colour from
       --accent, which several games already spend on selected/chosen states;
     · it carries no box-shadow. A shadow halo here would be the obvious way to
       add contrast and it is a trap: box-shadow is load-bearing on this site —
       Starlock draws its region walls with `inset` shadows on .cell — so a
       global focus shadow erases the puzzle's regions the moment a keyboard
       player tabs onto a tile. Width + offset + a derived colour carry it;
     · focused controls that sit under a decorative overlay are lifted per
       stylesheet, never globally — a blanket `position:relative` here would
       re-flow every absolutely-positioned control that can take focus (the ad
       anchor's close button, the result-sheet dismiss) and spend CLS budget on
       a focus state. See the z-index lift in game-starlock.css instead.

   Purely additive: no hover, no theme value and no arm assignment is touched.
   --------------------------------------------------------------------------- */
:focus-visible{
  outline:3px solid var(--accent-hi);
  outline-offset:3px;
  border-radius:var(--r-s);
}
/* Keyboard focus INSIDE a playfield: same ring, tighter offset so a focused
   tile never overlaps its neighbour on a dense grid. */
.stage :focus-visible{outline-offset:2px}
::selection{background:color-mix(in oklch,var(--accent),transparent 65%)}

/* ---------- breadcrumb (visible half of the BreadcrumbList) ----------
   Mono spec voice, hairline under, sits directly beneath the nav. Emitted by
   page() from the SAME array as the JSON-LD — see shared/templates.mjs. */
.crumbs{
  display:flex;flex-wrap:wrap;align-items:center;gap:.42rem;
  font-family:var(--mono);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--muted);padding:.9rem 0 0;
}
.crumbs a{color:var(--muted);border-bottom:1px solid transparent;transition:color var(--t-fast),border-color var(--t-fast)}
.crumbs a:hover{color:var(--accent-hi);border-bottom-color:currentColor}
.crumbs i{font-style:normal;color:var(--line-2,var(--line));opacity:.8}
.crumbs [aria-current=page]{color:var(--text)}

/* ---------- dated source line (§6.4) ---------- */
.srcline{
  margin-top:.85rem;padding-top:.6rem;border-top:1px solid var(--line);
  font-family:var(--mono);font-size:.7rem;letter-spacing:.09em;color:var(--muted);
  display:flex;flex-wrap:wrap;gap:.4rem;align-items:baseline;
}
.srcline a{color:var(--muted);border-bottom:1px solid color-mix(in oklch,var(--muted),transparent 65%)}
.srcline a:hover{color:var(--accent-hi)}
.srcline i{font-style:normal;opacity:.55}

/* ---------- type ---------- */
h1,h2,h3{line-height:1.04;letter-spacing:-.032em;text-wrap:balance;font-weight:600}
h1{font-size:clamp(2.4rem,7vw,4.4rem)}
h2{font-size:clamp(1.6rem,3.6vw,2.4rem);letter-spacing:-.028em}
h3{font-size:1.2rem;letter-spacing:-.02em}
p{text-wrap:pretty}
.num,.mono,time{font-family:var(--mono);font-variant-numeric:tabular-nums;letter-spacing:-.01em}
.lede{font-size:clamp(1.05rem,2.1vw,1.3rem);color:var(--muted);max-width:60ch}
.kicker{font-family:var(--mono);font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);font-weight:500}
.muted{color:var(--muted)}
.small{font-size:.86rem}

/* ---------- layout ---------- */
.wrap{width:min(100% - 2.4rem,var(--wrap));margin-inline:auto}
main{padding-block:clamp(2rem,5vw,4rem) clamp(3rem,7vw,6rem)}
section+section{margin-top:clamp(2.5rem,6vw,4.5rem)}
.prose{max-width:68ch}
.prose h2{margin-top:2.4em}
.prose h3{margin-top:1.8em}
.prose p,.prose ul,.prose ol{margin-top:1em;color:oklch(0.86 .008 var(--hue))}
.prose li{margin-top:.4em}
.prose ul,.prose ol{padding-left:1.3em}
.prose strong{color:var(--text);font-weight:600}

/* ---------- nav ---------- */
.nav{
  position:sticky;top:0;z-index:60;
  background:color-mix(in oklch,var(--bg),transparent 22%);
  backdrop-filter:blur(18px) saturate(1.5);-webkit-backdrop-filter:blur(18px) saturate(1.5);
  border-bottom:1px solid color-mix(in oklch,var(--line),transparent 55%);
}
.nav-in{display:flex;align-items:center;gap:.5rem;height:60px}
.brand{display:flex;align-items:center;gap:.55rem;font-weight:600;letter-spacing:-.02em;color:var(--text);font-size:1.02rem}
.brand .mark{width:22px;height:22px;flex:none}
.nav-links{margin-left:auto;display:flex;gap:.2rem;align-items:center}
.nav-links a{
  color:var(--muted);font-size:.9rem;font-weight:500;padding:.42rem .7rem;border-radius:var(--r-pill);
  transition:color var(--t-fast) var(--ease-out),background var(--t-fast) var(--ease-out);
}
.nav-links a:hover{color:var(--text);background:color-mix(in oklch,var(--surface-2),transparent 40%)}
.nav-links a[aria-current=page]{color:var(--text);background:var(--surface-2);box-shadow:var(--edge)}
@media(max-width:620px){.nav-links a{padding:.4rem .5rem;font-size:.84rem}.nav-links a.hide-sm{display:none}}

/* ---------- surfaces ---------- */
.card{
  background:linear-gradient(color-mix(in oklch,var(--surface),transparent 8%),var(--surface));
  border:1px solid var(--line);border-radius:var(--r-l);
  box-shadow:var(--edge),var(--sh-2);
}
.pad{padding:clamp(1.1rem,2.6vw,1.8rem)}

/* ---------- buttons ---------- */
.btn{
  --btn-bg:var(--surface-2);
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  font:inherit;font-weight:560;font-size:.96rem;letter-spacing:-.01em;
  padding:.72rem 1.15rem;border-radius:var(--r-m);cursor:pointer;
  color:var(--text);background:var(--btn-bg);
  border:1px solid var(--line);border-bottom-width:3px;
  box-shadow:var(--edge),var(--sh-1);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;
  transition:transform var(--t-fast) var(--ease-out),background var(--t-fast) var(--ease-out),box-shadow var(--t-fast) var(--ease-out);
}
.btn:hover{background:color-mix(in oklch,var(--btn-bg),white 6%)}
.btn:active{transform:translateY(2px) scale(.985);border-bottom-width:1px;margin-bottom:2px}
.btn-primary{
  --btn-bg:var(--accent);color:oklch(0.16 0.03 var(--hue));font-weight:640;
  border-color:color-mix(in oklch,var(--accent),black 30%);
  box-shadow:var(--edge),var(--sh-2),var(--glow);
}
.btn-primary:hover{--btn-bg:var(--accent-hi)}
.btn-ghost{--btn-bg:transparent;border-bottom-width:1px;color:var(--muted)}
.btn-ghost:hover{color:var(--text);--btn-bg:var(--surface)}
.btn-ghost:active{margin-bottom:0}
.btn-row{display:flex;gap:.65rem;flex-wrap:wrap}

/* ---------- hero ---------- */
.hero{padding-block:clamp(2.5rem,7vw,5rem) clamp(1.5rem,4vw,2.5rem);text-align:center}
.hero h1{margin-top:.5rem}
.hero .lede{margin:1.1rem auto 0}
.badge{
  display:inline-flex;align-items:center;gap:.5rem;padding:.34rem .8rem;border-radius:var(--r-pill);
  background:color-mix(in oklch,var(--accent),transparent 88%);
  border:1px solid color-mix(in oklch,var(--accent),transparent 66%);
  color:var(--accent-hi);font-size:.78rem;font-weight:560;font-family:var(--mono);letter-spacing:.04em;
}
.dot{width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 10px var(--accent)}
@media(prefers-reduced-motion:no-preference){.dot{animation:pulse 2.4s var(--ease-out) infinite}}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.8)}}

/* ---------- game tiles (hub) ---------- */
.tiles{display:grid;gap:1.1rem;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.tile{
  position:relative;display:flex;flex-direction:column;gap:.75rem;
  padding:1.5rem;border-radius:var(--r-xl);overflow:hidden;color:var(--text);
  background:linear-gradient(160deg,color-mix(in oklch,var(--surface-2),transparent 20%),var(--surface));
  border:1px solid var(--line);box-shadow:var(--edge),var(--sh-2);
  transition:transform var(--t-base) var(--ease-out),box-shadow var(--t-base) var(--ease-out),border-color var(--t-base) var(--ease-out);
}
.tile::before{
  content:'';position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:radial-gradient(340px 190px at 84% -10%,color-mix(in oklch,var(--accent),transparent 76%),transparent 70%);
}
.tile:hover{transform:translateY(-4px);border-color:color-mix(in oklch,var(--accent),transparent 55%);box-shadow:var(--edge),var(--sh-3),var(--glow)}
.tile h3{font-size:1.55rem;letter-spacing:-.03em}
.tile .tile-tag{font-family:var(--mono);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.tile .tile-art{height:104px;display:grid;place-items:center;margin:-.25rem 0 .1rem}
.tile p{color:var(--muted);font-size:.94rem;flex:1}
.tile .tile-meta{display:flex;gap:.5rem;flex-wrap:wrap;font-size:.78rem;color:var(--muted);font-family:var(--mono)}
.tile .tile-meta span{padding:.22rem .55rem;border-radius:var(--r-pill);background:color-mix(in oklch,var(--bg),transparent 30%);border:1px solid var(--line)}
.tile .go{display:inline-flex;align-items:center;gap:.4rem;font-weight:600;color:var(--accent);font-size:.95rem}

/* animated conic sheen on the featured tile */
@property --sheen{syntax:'<angle>';initial-value:0deg;inherits:false}
.tile-feature{border:none;padding:1px;background:conic-gradient(from var(--sheen),transparent 0 62%,color-mix(in oklch,var(--accent),transparent 30%) 78%,transparent 92%),var(--line);border-radius:calc(var(--r-xl) + 1px)}
@media(prefers-reduced-motion:no-preference){.tile-feature{animation:sheen 7s linear infinite}}
@keyframes sheen{to{--sheen:360deg}}
.tile-feature>.tile{border-radius:var(--r-xl);border-color:transparent;height:100%}

/* ---------- game shell ---------- */
.gamebar{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin-bottom:1rem}
.stat{
  display:flex;flex-direction:column;gap:.05rem;padding:.45rem .8rem;border-radius:var(--r-m);
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--edge);min-width:74px;
}
.stat b{font-family:var(--mono);font-size:1.16rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.15}
.stat span{font-size:.64rem;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);font-family:var(--mono)}
.gamebar .spacer{margin-left:auto}
.icon-btn{
  width:38px;height:38px;display:grid;place-items:center;border-radius:var(--r-m);cursor:pointer;
  background:var(--surface);border:1px solid var(--line);color:var(--muted);box-shadow:var(--edge);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
  transition:color var(--t-fast),background var(--t-fast),transform var(--t-fast)
}
.icon-btn:hover{color:var(--text);background:var(--surface-2)}
.icon-btn:active{transform:scale(.92)}
.icon-btn[aria-pressed=true]{color:var(--accent);border-color:color-mix(in oklch,var(--accent),transparent 55%)}

.stage{
  position:relative;border-radius:var(--r-xl);padding:clamp(.85rem,2.4vw,1.4rem);
  background:linear-gradient(color-mix(in oklch,var(--surface),transparent 20%),color-mix(in oklch,var(--bg-deep),transparent 30%));
  border:1px solid var(--line);box-shadow:var(--edge),var(--sh-3);
}
@media(prefers-reduced-motion:no-preference){
  .shake{animation:shake var(--shk-t,240ms) var(--ease-out)}
  @keyframes shake{
    0%{transform:translate(0)}15%{transform:translate(calc(var(--shk)*-1),calc(var(--shk)*.5))}
    32%{transform:translate(var(--shk),calc(var(--shk)*-.4))}52%{transform:translate(calc(var(--shk)*-.6),0)}
    74%{transform:translate(calc(var(--shk)*.4),calc(var(--shk)*.3))}100%{transform:translate(0)}
  }
}
#fx{position:fixed;inset:0;pointer-events:none;z-index:200}
.pop{
  position:fixed;z-index:210;pointer-events:none;font-family:var(--mono);font-weight:700;
  font-size:1.3rem;color:var(--accent-hi);text-shadow:0 0 14px color-mix(in oklch,var(--accent),transparent 40%);
  mix-blend-mode:plus-lighter;
}
@media(prefers-reduced-motion:no-preference){.pop{animation:pop 620ms var(--ease-out) forwards}}
@keyframes pop{0%{transform:translate(-50%,0) scale(.5);opacity:0}18%{transform:translate(-50%,-6px) scale(1.2);opacity:1}100%{transform:translate(-50%,-38px) scale(1);opacity:0}}
.hitstop *{animation-play-state:paused!important;transition:none!important}

/* ---------- result sheet ---------- */
.sheet-back{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:1rem;
  background:color-mix(in oklch,var(--bg-deep),transparent 22%);backdrop-filter:blur(10px)}
.sheet{
  width:min(100%,460px);max-height:88svh;overflow:auto;border-radius:var(--r-xl);padding:1.6rem;
  background:linear-gradient(color-mix(in oklch,var(--surface-2),transparent 10%),var(--surface));
  border:1px solid var(--line);box-shadow:var(--edge),var(--sh-3),var(--glow);text-align:center;
}
@media(prefers-reduced-motion:no-preference){.sheet{animation:rise 420ms var(--ease-pop)}}
@keyframes rise{from{transform:translateY(26px) scale(.96);opacity:0}}
.sheet h2{font-size:1.9rem;margin-bottom:.15rem}
.sheet .verdict{font-family:var(--mono);color:var(--accent);letter-spacing:.1em;text-transform:uppercase;font-size:.75rem}
.scoreline{font-family:var(--mono);font-size:3.2rem;font-weight:700;letter-spacing:-.04em;line-height:1.05;margin:.5rem 0 .1rem;font-variant-numeric:tabular-nums}
.artifact{
  font-family:var(--mono);font-size:.92rem;line-height:1.7;white-space:pre-wrap;text-align:center;
  background:var(--bg-deep);border:1px solid var(--line);border-radius:var(--r-m);padding:.9rem;margin:1rem 0;
  box-shadow:inset 0 2px 8px rgb(0 0 0/.35);
}
.sheet .btn-row{justify-content:center;margin-top:.3rem}
.sheet .btn-row .btn{flex:1 1 46%}
.next-in{margin-top:1rem;font-family:var(--mono);font-size:.8rem;color:var(--muted)}
.streak-line{display:flex;justify-content:center;gap:1.2rem;margin-top:.9rem;font-size:.8rem;color:var(--muted);font-family:var(--mono)}

/* duel banner */
.duel{
  display:flex;align-items:center;gap:.8rem;padding:.8rem 1rem;border-radius:var(--r-m);margin-bottom:1rem;
  background:color-mix(in oklch,var(--info),transparent 88%);border:1px solid color-mix(in oklch,var(--info),transparent 62%);
}
.duel .avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:none;
  background:var(--info);color:var(--bg-deep);font-weight:700;font-family:var(--mono)}
.duel b{font-weight:600}
.duel .small{color:var(--muted)}
.vs-grid{display:grid;grid-template-columns:1fr auto 1fr;gap:.6rem;align-items:center;margin:1rem 0;
  background:var(--bg-deep);border:1px solid var(--line);border-radius:var(--r-m);padding:.9rem}
.vs-grid .who{font-size:.74rem;color:var(--muted);font-family:var(--mono);text-transform:uppercase;letter-spacing:.1em}
.vs-grid .val{font-family:var(--mono);font-size:1.5rem;font-weight:700;font-variant-numeric:tabular-nums}
.vs-grid .win{color:var(--good)}
.vs-grid .mid{font-family:var(--mono);color:var(--muted);font-size:.8rem}

/* toast */
#toast{position:fixed;left:50%;bottom:calc(1.2rem + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:400;
  background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-pill);padding:.6rem 1.1rem;
  box-shadow:var(--edge),var(--sh-3);font-size:.9rem;opacity:0;pointer-events:none;transition:opacity var(--t-base),transform var(--t-base)}
#toast.on{opacity:1;transform:translateX(-50%) translateY(-4px)}

/* ---------- generic content blocks ---------- */
.grid-2{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.linkcard{display:block;padding:1rem 1.15rem;border-radius:var(--r-m);background:var(--surface);border:1px solid var(--line);
  box-shadow:var(--edge);color:var(--text);transition:transform var(--t-fast) var(--ease-out),border-color var(--t-fast)}
.linkcard:hover{transform:translateY(-2px);border-color:color-mix(in oklch,var(--accent),transparent 60%);color:var(--text)}
.linkcard b{display:block;font-weight:600;letter-spacing:-.015em}
.linkcard span{font-size:.85rem;color:var(--muted)}
.faq{border-top:1px solid var(--line);padding:1.1rem 0}
.faq h3{font-size:1.05rem;margin-bottom:.4rem}
.faq p{color:var(--muted);font-size:.95rem}
.archive-list{display:grid;gap:.5rem;grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
.archive-list a{padding:.7rem .9rem;border-radius:var(--r-m);background:var(--surface);border:1px solid var(--line);
  box-shadow:var(--edge);color:var(--text);font-family:var(--mono);font-size:.88rem;display:flex;justify-content:space-between;gap:.5rem}
.archive-list a:hover{border-color:color-mix(in oklch,var(--accent),transparent 60%)}
.archive-list a span{color:var(--muted)}
.spoiler{border:1px solid var(--line);border-radius:var(--r-m);background:var(--surface);padding:1rem 1.15rem;margin-top:1rem}
.spoiler summary{cursor:pointer;font-weight:600;list-style:none;display:flex;align-items:center;gap:.5rem}
.spoiler summary::-webkit-details-marker{display:none}
.spoiler summary::before{content:'▸';color:var(--accent);transition:transform var(--t-fast)}
.spoiler[open] summary::before{transform:rotate(90deg)}
.spoiler .body{margin-top:.9rem;padding-top:.9rem;border-top:1px solid var(--line)}

/* ---------- footer ---------- */
footer{border-top:1px solid var(--line);margin-top:clamp(3rem,8vw,6rem);padding-block:2.4rem 3rem;
  background:color-mix(in oklch,var(--bg-deep),transparent 40%)}
footer .cols{display:grid;gap:1.6rem;grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
footer h4{font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);font-family:var(--mono);font-weight:500;margin-bottom:.7rem}
footer a{display:block;color:var(--muted);font-size:.92rem;padding:.14rem 0}
footer a:hover{color:var(--text)}
footer .fine{margin-top:2rem;padding-top:1.2rem;border-top:1px solid var(--line);color:var(--muted);font-size:.82rem;display:flex;gap:1rem;flex-wrap:wrap}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
body[data-fx=off] #fx{display:none}

/* mobile polish */
.brand span{white-space:nowrap}
@media(max-width:420px){
  .brand span{font-size:.95rem}
  .stat{min-width:64px;padding:.4rem .65rem}
  .stat b{font-size:1.05rem}
}

/* ============================================================================
   MOTION VOCABULARY — three named entrances used consistently sitewide.
   Everything decorative sits behind prefers-reduced-motion.
   ========================================================================== */
@keyframes rise-in{from{opacity:0;transform:translateY(16px)}}
@keyframes spring-in{0%{opacity:0;transform:scale(.86)}62%{transform:scale(1.05)}100%{opacity:1;transform:scale(1)}}
@keyframes flip-in{from{opacity:0;transform:perspective(600px) rotateX(62deg)}to{opacity:1;transform:perspective(600px) rotateX(0)}}
@media(prefers-reduced-motion:no-preference){
  .anim-rise{animation:rise-in 560ms var(--ease-out) both;animation-delay:calc(var(--d,0)*70ms)}
  .anim-spring{animation:spring-in 460ms var(--ease-pop) both;animation-delay:calc(var(--d,0)*70ms)}
  .anim-flip{animation:flip-in 520ms var(--ease-out) both;animation-delay:calc(var(--d,0)*55ms)}
  .sheet>*{animation:rise-in 440ms var(--ease-out) both}
  .sheet>*:nth-child(3){animation-delay:60ms}
  .sheet>*:nth-child(4){animation-delay:120ms}
  .sheet>*:nth-child(5){animation-delay:180ms}
  .sheet>*:nth-child(6){animation-delay:240ms}
  .sheet>*:nth-child(n+7){animation-delay:300ms}
}
body[data-fx=off] .anim-rise,
body[data-fx=off] .anim-spring,
body[data-fx=off] .anim-flip,
body[data-fx=off] .sheet>*{animation:none!important}

/* the result sheet is the most-screenshotted surface on the site */
.sheet{position:relative;overflow:hidden;padding-top:2rem}
.sheet-band{position:absolute;inset:0 0 auto;height:5px;
  background:linear-gradient(90deg,var(--accent),color-mix(in oklch,var(--accent),white 34%),var(--accent))}
.sheet .verdict{display:inline-block;padding:.26rem .72rem;border:1.5px solid var(--accent);
  border-radius:var(--r-s);transform:rotate(-1.5deg)}
.scoreline{
  background:linear-gradient(180deg,var(--text),var(--accent-hi));
  -webkit-background-clip:text;background-clip:text;color:transparent;
  filter:drop-shadow(0 0 22px color-mix(in oklch,var(--accent),transparent 66%));
}
.artifact{position:relative;text-align:left;
  border:1px dashed color-mix(in oklch,var(--accent),transparent 48%);
  box-shadow:inset 0 2px 8px rgb(0 0 0/.32),0 0 0 4px color-mix(in oklch,var(--bg-deep),transparent 55%)}
.artifact::before,.artifact::after{content:'';position:absolute;top:50%;width:16px;height:16px;
  border-radius:50%;background:var(--surface);border:1px solid var(--line);transform:translateY(-50%)}
.artifact::before{left:-9px}.artifact::after{right:-9px}

/* rank letter, shown on every result sheet */
.rankbadge{display:grid;place-items:center;width:74px;height:74px;margin:.2rem auto .1rem;
  border-radius:var(--r-m);font:800 2.6rem/1 Geist,system-ui,sans-serif;
  border:2px solid currentColor;letter-spacing:-.04em}
@media(prefers-reduced-motion:no-preference){.rankbadge{animation:spring-in 520ms var(--ease-pop) 140ms both}}
.rankbadge[data-r="S"]{color:var(--good);box-shadow:0 0 30px color-mix(in oklch,var(--good),transparent 55%),var(--edge)}
.rankbadge[data-r="A"]{color:var(--accent-hi)}
.rankbadge[data-r="B"]{color:var(--accent)}
.rankbadge[data-r="C"],.rankbadge[data-r="D"]{color:var(--muted)}

/* ---------------------------------------------------------------------------
   AD ZONES — reserved so enabling ads never shifts layout (CLS stays 0), and
   visually separated so an ad can never be mistaken for a game control.
   --------------------------------------------------------------------------- */
.adzone{
  display:block;margin:clamp(2rem,5vw,3.2rem) auto;padding:.5rem 0 0;
  max-width:728px;min-height:120px;text-align:center;
  border-top:1px solid var(--line);
}
.adzone-wide{max-width:970px;min-height:140px}
.adzone-label{
  display:block;font-family:var(--mono);font-size:.62rem;letter-spacing:.18em;
  text-transform:uppercase;color:var(--muted);opacity:.65;margin-bottom:.5rem;
}
.adzone ins{display:block;min-height:90px}
/* never let an ad sit next to the playfield */
.stage + .adzone{margin-top:clamp(3rem,7vw,5rem)}
@media(max-width:620px){.adzone{min-height:110px}}

/* ============================================================================
   TURBO POP — object-layer tokens (game objects, keylines, display type ≥28px
   ONLY; never body text, so the audited AA ratios are untouched).
   ========================================================================== */
body{
  --hue2:calc(var(--hue) + 165);
  --obj:oklch(0.72 0.23 var(--hue));
  --obj-lite:oklch(0.86 0.14 var(--hue));
  --obj-line:oklch(0.24 0.06 var(--hue));
  --obj2:oklch(0.74 0.21 var(--hue2));
  --obj2-line:oklch(0.24 0.06 var(--hue2));
  --gold:oklch(0.83 0.171 88);
  --gold-line:oklch(0.30 0.08 88);
  --hazard:oklch(0.62 0.24 27);
  --hazard-line:oklch(0.22 0.09 27);
  --chrome-a:oklch(0.97 0.02 var(--hue));
  --chrome-b:oklch(0.62 0.10 var(--hue));
  --chrome-c:oklch(0.30 0.06 var(--hue));
}
[data-game=updraft]{--hue:210}
[data-game=perimeter]{--hue:335}
[data-game=ricochet]{--hue:55}
[data-game=blitz]{--hue:25}
[data-game=dash]{--hue:285}
/* Arm B runs the object layer hotter */
:root[data-theme="b"] body{--obj:oklch(0.74 0.27 var(--hue));--obj-lite:oklch(0.88 0.16 var(--hue))}

/* ---------- display type utilities (Geist only, no new fonts) ---------- */
.t-poster{font-weight:900;text-transform:uppercase;letter-spacing:-.01em;transform:skewX(-6deg);display:inline-block}
.t-chrome{
  background:linear-gradient(180deg,var(--chrome-a) 0%,#fff 18%,var(--chrome-b) 48%,var(--chrome-c) 55%,var(--chrome-a) 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  -webkit-text-stroke:2px var(--obj-line);paint-order:stroke fill;
}
.t-stamp{text-shadow:2px 2px 0 var(--obj-line),4px 4px 0 color-mix(in oklch,var(--obj),transparent 40%),0 8px 24px rgb(0 0 0/.5)}

/* hub hero chrome + tile state chips */
.hero-chrome{font-size:1.06em;-webkit-text-stroke:2.5px var(--obj-line)}
.tile-state{padding:.22rem .55rem;border-radius:var(--r-pill);font-family:var(--mono);
  font-size:.66rem;letter-spacing:.1em;border:1px solid var(--line)}
.tile-state[data-s=new]{color:var(--accent-hi);border-color:color-mix(in oklch,var(--accent),transparent 50%)}
@media(prefers-reduced-motion:no-preference){.tile-state[data-s=new]{animation:pulse 2.4s var(--ease-out) infinite}}
.tile-state[data-s=done]{color:var(--good);border-color:color-mix(in oklch,var(--good),transparent 50%)}

/* ============================================================================
   EDITORIAL LAYER — appended for the long-form / hub upgrade.
   ONE block, deliberately at the end of the file.

   Everything here is built out of the existing tokens only (--surface, --line,
   --accent, --muted, --r-*, --mono), so it inherits arm A (noir), arm B (neon,
   which tightens every radius) and arm C (paper, which flips to light) with no
   per-theme overrides at all. Nothing below is used on a playfield.
   ========================================================================== */

/* ---------- article shell: head, meta bar, body + sticky contents ---------- */
.article-head{padding-block:clamp(1.6rem,4vw,2.6rem) 0;text-align:left}
.article-head h1{font-size:clamp(2rem,5.2vw,3.2rem);margin-top:.55rem}
.article-head .lede{margin:1rem 0 0}
.article-meta{
  display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .85rem;
  margin-top:1.25rem;padding-top:.9rem;border-top:1px solid var(--line);
  font-family:var(--mono);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);
}
.article-meta b{color:var(--text);font-weight:600}

.article{
  display:grid;gap:clamp(1.6rem,3vw,3rem);
  grid-template-columns:minmax(0,1fr);
  margin-top:clamp(1.6rem,4vw,2.6rem);
  align-items:start;
}
.article-body{min-width:0;max-width:68ch}
@media(min-width:1040px){
  .article{grid-template-columns:minmax(0,1fr) 244px}
  .article-body{order:1}
  .toc{order:2;position:sticky;top:76px}
}

/* ---------- table of contents ---------- */
.toc{
  border:1px solid var(--line);border-radius:var(--r-m);padding:1rem 1.1rem 1.1rem;
  background:color-mix(in oklch,var(--surface),transparent 26%);box-shadow:var(--edge);
}
.toc h2{
  font-family:var(--mono);font-size:.68rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--muted);font-weight:500;margin:0 0 .7rem;
}
.toc ol{list-style:none;margin:0;padding:0;counter-reset:toc}
.toc li{counter-increment:toc;margin:0}
.toc a{
  display:flex;gap:.6rem;padding:.34rem 0;color:var(--muted);font-size:.86rem;line-height:1.35;
  border-top:1px solid color-mix(in oklch,var(--line),transparent 55%);
}
.toc li:first-child a{border-top:0}
.toc a::before{
  content:counter(toc,decimal-leading-zero);font-family:var(--mono);font-size:.72rem;
  color:var(--accent);flex:none;padding-top:.12rem;
}
.toc a:hover{color:var(--text)}

/* ---------- the prose itself ---------- */
.prose-editorial{font-size:1.04rem;counter-reset:sec}
.prose-editorial h2{
  counter-increment:sec;margin-top:2.5em;padding-top:1.1em;
  border-top:1px solid color-mix(in oklch,var(--line),transparent 40%);
  font-size:clamp(1.35rem,2.8vw,1.85rem);scroll-margin-top:76px;
}
.prose-editorial h2::before{
  content:counter(sec,decimal-leading-zero);display:block;
  font-family:var(--mono);font-size:.7rem;letter-spacing:.2em;color:var(--accent);
  font-weight:500;margin-bottom:.55rem;
}
.prose-editorial>h2:first-child{border-top:0;padding-top:0;margin-top:0}
.prose-editorial>p.lead-p{font-size:1.13rem;line-height:1.55;color:var(--text)}
.prose-editorial>p.lead-p::first-letter{
  float:left;font-size:3.4em;line-height:.8;font-weight:700;
  padding:.05em .1em 0 0;color:var(--accent);
}
.prose-editorial ul,.prose-editorial ol{padding-left:1.15em}
.prose-editorial li::marker{color:var(--accent)}
.prose-editorial li{margin-top:.5em}

/* pull quote — always a restatement of the section it sits in */
.pullquote{
  margin:clamp(1.8rem,4vw,2.6rem) 0;padding:.2rem 0 .2rem 1.3rem;
  border-left:3px solid var(--accent);
  font-size:clamp(1.2rem,2.5vw,1.55rem);line-height:1.3;letter-spacing:-.022em;
  font-weight:600;color:var(--text);text-wrap:balance;
}
.pullquote::before{content:"\201C";color:var(--accent)}
.pullquote::after{content:"\201D";color:var(--accent)}

/* takeaway strip that closes a long guide */
.takeaway{
  margin-top:clamp(2rem,4vw,3rem);padding:1.2rem 1.35rem;border-radius:var(--r-m);
  background:color-mix(in oklch,var(--accent),transparent 92%);
  border:1px solid color-mix(in oklch,var(--accent),transparent 68%);
}
.takeaway h2{
  margin:0 0 .6rem;border:0;padding:0;font-family:var(--mono);font-size:.68rem;
  letter-spacing:.18em;text-transform:uppercase;color:var(--accent);font-weight:500;
}
.takeaway h2::before{display:none}
.takeaway p{margin:0;color:var(--text)}

/* ---------- step cards (hint pages) ---------- */
.steps{list-style:none;margin:1.3rem 0 0;padding:0;counter-reset:st;display:grid;gap:.7rem}
.steps>li{
  counter-increment:st;position:relative;margin:0;
  padding:1rem 1.15rem 1rem 3.4rem;border-radius:var(--r-m);
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--edge);
  color:var(--text);font-size:.97rem;line-height:1.55;
}
.steps>li::before{
  content:counter(st);position:absolute;left:.95rem;top:.95rem;
  width:1.75rem;height:1.75rem;display:grid;place-items:center;border-radius:var(--r-s);
  font-family:var(--mono);font-size:.8rem;font-weight:600;
  color:var(--accent);border:1px solid color-mix(in oklch,var(--accent),transparent 55%);
  background:color-mix(in oklch,var(--accent),transparent 90%);
}
.steps>li b{color:var(--text)}

/* ---------- hub: proposition strip + visual how-it-works ---------- */
.props{
  display:grid;gap:.6rem;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));
  margin:1.7rem auto 0;max-width:760px;
}
.prop{
  padding:.75rem .5rem;border-radius:var(--r-m);text-align:center;
  background:color-mix(in oklch,var(--surface),transparent 40%);border:1px solid var(--line);
}
.prop b{display:block;font-family:var(--mono);font-size:1.3rem;font-weight:700;letter-spacing:-.03em;color:var(--text)}
.prop span{display:block;font-size:.66rem;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);font-family:var(--mono);margin-top:.2rem}

.flow{
  display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  margin-top:1.3rem;counter-reset:fl;
}
.flow-step{
  position:relative;padding:1.35rem 1.25rem 1.25rem;border-radius:var(--r-l);counter-increment:fl;
  background:linear-gradient(160deg,color-mix(in oklch,var(--surface-2),transparent 35%),var(--surface));
  border:1px solid var(--line);box-shadow:var(--edge),var(--sh-1);
}
.flow-step::before{
  content:counter(fl,decimal-leading-zero);position:absolute;top:.9rem;right:1rem;
  font-family:var(--mono);font-size:.72rem;letter-spacing:.14em;color:var(--muted);opacity:.7;
}
.flow-ico{width:56px;height:56px;margin-bottom:.85rem}
.flow-step b{display:block;font-size:1.02rem;letter-spacing:-.02em;margin-bottom:.35rem}
.flow-step p{color:var(--muted);font-size:.9rem;margin:0}
@media(min-width:900px){
  .flow-step:not(:last-child)::after{
    content:'';position:absolute;top:2.6rem;right:-1rem;width:1rem;height:1px;
    background:linear-gradient(90deg,color-mix(in oklch,var(--accent),transparent 40%),transparent);
  }
}

/* ---------- comparison table (/games/) ---------- */
.cmp-scroll{overflow-x:auto;margin-top:1.3rem;border:1px solid var(--line);border-radius:var(--r-m);background:color-mix(in oklch,var(--surface),transparent 40%)}
.cmp{width:100%;border-collapse:collapse;font-size:.9rem;min-width:660px}
.cmp th,.cmp td{text-align:left;padding:.78rem .9rem;border-top:1px solid var(--line);vertical-align:top}
.cmp thead th{
  border-top:0;font-family:var(--mono);font-size:.66rem;letter-spacing:.16em;
  text-transform:uppercase;color:var(--muted);font-weight:500;white-space:nowrap;
}
.cmp tbody th{font-weight:600;white-space:nowrap}
.cmp tbody th a{color:var(--text)}
.cmp tbody th a:hover{color:var(--accent)}
.cmp tbody th small{display:block;font-family:var(--mono);font-size:.66rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);font-weight:400;margin-top:.2rem}
.cmp td.cell-m{font-family:var(--mono);white-space:nowrap;color:var(--muted);font-size:.82rem}
.cmp tbody tr:hover{background:color-mix(in oklch,var(--accent),transparent 94%)}

/* per-game cards on /games/ and /404 */
.pickcard{display:flex;flex-direction:column;gap:.5rem;padding:1.2rem 1.25rem;border-radius:var(--r-l);
  background:var(--surface);border:1px solid var(--line);box-shadow:var(--edge);color:var(--text)}
.pickcard .tile-tag{font-family:var(--mono);font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:var(--accent)}
.pickcard h3{font-size:1.15rem}
.pickcard p{font-size:.9rem;color:var(--muted);margin:0}
.pickcard-links{display:flex;gap:.45rem;flex-wrap:wrap;margin-top:.25rem;font-size:.82rem}
.pickcard-links a{padding:.2rem .6rem;border-radius:var(--r-pill);border:1px solid var(--line);color:var(--muted)}
.pickcard-links a:hover{color:var(--accent);border-color:color-mix(in oklch,var(--accent),transparent 55%)}

/* ---------------------------------------------------------------------------
   NAV OVERFLOW FIX
   With eight games the link row is 676px wide, so below ~900px it ran straight
   off the side of the screen and `body{overflow-x:hidden}` silently clipped it
   — four of the eight games were unreachable from the nav on a phone, on all
   280 pages. Making the row scroll keeps every game one tap away; the fade on
   the right edge is what tells you there is more.
   --------------------------------------------------------------------------- */
@media(max-width:900px){
  .nav-in{gap:.35rem}
  .brand{flex:none}
  .nav-links{
    min-width:0;overflow-x:auto;overscroll-behavior-x:contain;
    scrollbar-width:none;-ms-overflow-style:none;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent);
    mask-image:linear-gradient(90deg,#000 calc(100% - 26px),transparent);
  }
  .nav-links::-webkit-scrollbar{display:none}
  .nav-links a{flex:none;white-space:nowrap}
}

/* ---------- sibling / related link rail ---------- */
.rail{margin-top:clamp(2rem,5vw,3rem);padding-top:1.3rem;border-top:1px solid var(--line)}
.rail h2{font-family:var(--mono);font-size:.68rem;letter-spacing:.18em;text-transform:uppercase;color:var(--muted);font-weight:500;margin-bottom:.9rem}

/* music toggle sits with the other chrome buttons */
#musicToggle[data-off="1"]{opacity:.5}

/* bottom anchor unit — content pages only, never over a playfield */
.adanchor{
  position:fixed;left:0;right:0;bottom:0;z-index:70;
  display:flex;align-items:center;justify-content:center;
  min-height:60px;padding:.35rem .5rem;
  background:color-mix(in oklch,var(--bg),transparent 8%);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-top:1px solid var(--line);
}
.adanchor-x{
  position:absolute;top:-13px;right:8px;width:26px;height:26px;border-radius:50%;
  border:1px solid var(--line);background:var(--surface-2);color:var(--muted);
  font:600 14px/1 var(--mono);cursor:pointer;display:grid;place-items:center;
}
.adanchor-x:hover{color:var(--text)}
body:has(.adanchor) footer{padding-bottom:76px}
/* sticky article rail, wide screens only */
.adrail{display:none}
@media(min-width:1200px){
  .adrail{display:block;position:sticky;top:84px;width:300px;min-height:600px;float:right;margin:0 0 1.5rem 2rem}
}
