/* ============================================================================
   ChonkBlocker - site design system
   Hue Shift palette: cool teal arena + warm CHONK/BLOCKER wordmark.
   Type: Bungee (display) / Inter (body) / JetBrains Mono (data).
   ========================================================================= */

/* ----- Fonts ------------------------------------------------------------- */
@font-face {
  font-family: "Bungee";
  src: url("/assets/fonts/Bungee-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "InterVar";
  src: url("/assets/fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}

/* ----- Tokens ------------------------------------------------------------ */
:root {
  color-scheme: dark;

  /* Surfaces (teal arena) */
  --bg: #04100f;
  --bg-2: #061a19;
  --panel: #08201f;
  --well: #091f1f;
  --well-deep: #051413;

  /* Frame chrome */
  --frame: #144e4e;
  --frame-bright: #1f6e6e;
  --frame-deep: #0a3333;

  /* Hairlines */
  --line: rgba(120, 205, 198, 0.14);
  --line-strong: rgba(120, 205, 198, 0.28);

  /* Ink */
  --ink: #eaf7f5;
  --muted: #93b9b4;
  --muted-2: #6a918d;

  /* Gem faces / highlights / shadows */
  --cyan: #44efef;       --cyan-hi: #a5fbfb;   --cyan-lo: #1cb9b9;
  --amber: #f6af3b;      --amber-hi: #fdcb93;  --amber-lo: #d8a71d;
  --pink: #d4287f;       --pink-hi: #ef86c9;   --pink-lo: #801558;
  --blue: #2f74ff;       --blue-hi: #6885fd;   --blue-lo: #0a4cb4;

  /* Accents */
  --accent: #44efef;            /* electric cyan - primary action */
  --accent-2: #c039c0;          /* magenta strip / chain */
  --chain: #06b6d4;

  /* Warm wordmark */
  --chonk: #ffe45e;
  --blocker: #ff9f1c;
  --stroke: #06111f;

  /* Geometry */
  --radius: 10px;
  --radius-lg: 16px;
  --gem-radius: 12px;
  --gutter: clamp(18px, 4vw, 72px);
  --maxw: 1200px;

  --display: "Bungee", "Arial Black", system-ui, sans-serif;
  --body: "InterVar", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --shadow-1: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-2: 0 30px 90px rgba(0, 0, 0, 0.55);
}

/* ----- Reset ------------------------------------------------------------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Ambient arena glow */
  background-image:
    radial-gradient(1100px 680px at 78% -8%, rgba(68, 239, 239, 0.10), transparent 60%),
    radial-gradient(900px 620px at 6% 4%, rgba(192, 57, 192, 0.10), transparent 58%),
    radial-gradient(1200px 900px at 50% 120%, rgba(11, 76, 180, 0.12), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img, video, canvas { max-width: 100%; display: block; }
::selection { background: rgba(68, 239, 239, 0.28); color: #fff; }

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

/* ----- Typography -------------------------------------------------------- */
h1, h2, h3 { margin: 0; line-height: 1.0; letter-spacing: 0.005em; }

.display {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 400;
}

.kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker.warm { color: var(--chonk); }
.kicker.pink { color: var(--pink-hi); }

.lede {
  margin: 22px 0 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 2.1vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink);
}
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Section title scale */
.section-title {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4.4vw, 3.4rem);
  line-height: 0.98;
}
.eyebrow-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 38px); }

/* ----- Wordmark ---------------------------------------------------------- */
.wordmark {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
}
.wordmark .ch { color: var(--chonk); }
.wordmark .bl { color: var(--blocker); }
.wordmark .ch, .wordmark .bl {
  -webkit-text-stroke: clamp(2px, 0.6vw, 5px) var(--stroke);
  paint-order: stroke fill;
  text-shadow:
    0 3px 0 var(--stroke),
    0 0 28px rgba(255, 159, 28, 0.35);
}

/* ----- Layout shells ----------------------------------------------------- */
.wrap { width: min(var(--maxw), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(54px, 8vw, 110px); }
.section.tight { padding-block: clamp(36px, 5vw, 64px); }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ----- Top navigation ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: linear-gradient(180deg, rgba(4, 16, 15, 0.86), rgba(4, 16, 15, 0.5));
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}
.brand {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  width: 14px; height: 14px; border-radius: 4px;
  background: linear-gradient(150deg, var(--cyan-hi), var(--cyan) 45%, var(--cyan-lo));
  box-shadow: 0 0 14px rgba(68, 239, 239, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}
.brand b { color: var(--chonk); }
.brand i { color: var(--blocker); font-style: normal; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 30px); }
.nav-link {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.nav-cta { color: var(--bg) !important; }

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.2s, border-color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(165deg, var(--cyan-hi), var(--cyan) 50%, var(--cyan-lo));
  color: #032524;
  box-shadow: 0 10px 30px rgba(68, 239, 239, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(68, 239, 239, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.btn-warm {
  background: linear-gradient(165deg, var(--chonk), var(--blocker));
  color: #2a1500;
  box-shadow: 0 10px 30px rgba(255, 159, 28, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-warm:hover { transform: translateY(-1px); box-shadow: 0 14px 40px rgba(255, 159, 28, 0.42); }
.btn-ghost {
  background: rgba(120, 205, 198, 0.06);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(68, 239, 239, 0.08); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 0.76rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Bare <button> elements (account/activate forms) get a tidy default. */
button:not([class]) {
  min-height: 50px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(120, 205, 198, 0.07); color: var(--ink);
  font-family: var(--mono); font-weight: 700; font-size: 0.84rem;
  letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.12s;
}
button:not([class]):hover { border-color: var(--accent); background: rgba(68, 239, 239, 0.1); }
button:not([class]):active { transform: translateY(1px); }
button:not([class]):disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(820px, 94vh);
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero-art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% center;
  filter: saturate(1.08) contrast(1.04);
  z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 16, 15, 0.95) 0%, rgba(4, 16, 15, 0.72) 38%, rgba(4, 16, 15, 0.08) 72%),
    linear-gradient(0deg, rgba(4, 16, 15, 0.92), rgba(4, 16, 15, 0.0) 52%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 1; opacity: 0.5;
  background-image:
    linear-gradient(rgba(120, 205, 198, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 205, 198, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 90% at 70% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 2; padding-block: clamp(90px, 12vh, 150px); }
.hero .wordmark {
  font-size: clamp(3.4rem, 12vw, 8.4rem);
  margin-bottom: 8px;
}
.hero-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 18px 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-meta {
  margin-top: 26px;
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.hero-meta b { color: var(--ink); font-weight: 700; }

/* ============================================================================
   GEM TILE  (the "Stack" signature)
   ========================================================================= */
.gem {
  --face: var(--cyan);
  --hi: color-mix(in srgb, var(--face) 45%, #ffffff);
  --lo: color-mix(in srgb, var(--face) 72%, #000000);
  position: relative;
  border-radius: var(--gem-radius);
  background:
    linear-gradient(158deg, var(--hi) 0%, var(--face) 44%, var(--lo) 100%);
  box-shadow:
    inset 0 2px 1px rgba(255, 255, 255, 0.55),
    inset 0 -6px 12px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.10);
  isolation: isolate;
}
.gem::after {
  /* gloss sweep */
  content: "";
  position: absolute; left: 8%; top: 7%; right: 42%; height: 34%;
  border-radius: 8px 8px 14px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
  opacity: 0.7;
  pointer-events: none;
}
.gem.cyan  { --face: var(--cyan);  --hi: var(--cyan-hi);  --lo: var(--cyan-lo); }
.gem.amber { --face: var(--amber); --hi: var(--amber-hi); --lo: var(--amber-lo); }
.gem.pink  { --face: var(--pink);  --hi: var(--pink-hi);  --lo: var(--pink-lo); }
.gem.blue  { --face: var(--blue);  --hi: var(--blue-hi);  --lo: var(--blue-lo); }

/* The board well that holds the leaderboard stack */
.board {
  position: relative;
  background:
    linear-gradient(180deg, var(--well) 0%, var(--well-deep) 100%);
  border-radius: var(--radius-lg);
  padding: clamp(12px, 1.6vw, 18px);
  border: 1px solid var(--frame);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.5),
    inset 0 2px 30px rgba(0, 0, 0, 0.55),
    0 0 0 1px var(--frame-deep),
    var(--shadow-2);
}
.board::before {
  /* top magenta accent strip, like the in-game board */
  content: "";
  position: absolute; left: 14px; right: 14px; top: 0;
  height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-2) 30%, var(--cyan) 70%, transparent);
  opacity: 0.8;
}

/* ============================================================================
   LEADERBOARD
   ========================================================================= */
.lb {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(22px, 3.5vw, 48px);
  align-items: start;
}
.lb-copy { position: sticky; top: 88px; }
.lb-copy .lede { margin-bottom: 22px; }

.lb-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.lb-select { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-windows .chip { font-size: 0.68rem; }
.lb-board-label { font-family: var(--mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.chip {
  appearance: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); background: rgba(120, 205, 198, 0.05);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; transition: all 0.16s;
}
.chip[aria-pressed="true"] { color: var(--ink); border-color: var(--accent); background: rgba(68, 239, 239, 0.1); }
.chip:hover { color: var(--ink); }

.lb-head {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 0 14px 10px;
  font-family: var(--mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2);
}
.lb-list { display: grid; gap: 9px; list-style: none; margin: 0; padding: 0; }

.lb-row {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--gem-radius);
  background: linear-gradient(158deg, color-mix(in srgb, var(--row-face, var(--cyan)) 30%, #07201f), #061514 80%);
  border: 1px solid color-mix(in srgb, var(--row-face, var(--cyan)) 32%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.14s ease, box-shadow 0.2s, border-color 0.2s;
}
.lb-row:hover {
  transform: translateX(3px);
  border-color: color-mix(in srgb, var(--row-face, var(--cyan)) 64%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.lb-row.is-you {
  border-color: var(--chonk);
  box-shadow: 0 0 0 1px rgba(255, 228, 94, 0.4), 0 12px 34px rgba(0, 0, 0, 0.4);
}
.lb-row .rank-gem {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 0.95rem;
  color: #06201f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.lb-row .who { min-width: 0; }
.lb-row .who strong { display: block; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .who span { display: block; margin-top: 2px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.lb-row .score { font-family: var(--mono); font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.lb-row .score small { display: block; font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; color: var(--muted-2); text-transform: uppercase; }
.lb-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.lb-foot-me { margin-top: 10px; }
.lb-note { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; color: var(--muted-2); text-transform: uppercase; }

/* A flagged row (hidden/anonymized/quarantined): server already swapped identity; render subdued. */
.lb-row.is-flagged { opacity: 0.6; }
.lb-row.is-flagged .who span { color: var(--chonk); }

/* Empty / error / unavailable state shown inside the standings list. */
.lb-state {
  list-style: none;
  padding: 26px 14px;
  text-align: center;
  font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.03em;
  color: var(--muted);
}
.lb-state .btn { margin-left: 8px; }

/* Gated Online Versus panel — honest "coming with online play" card, never fake standings. */
.lb-gated { margin-top: 22px; padding: 18px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: rgba(0,0,0,0.22); }
.lb-gated h2 { margin: 0 0 6px; font-size: 1rem; }
.lb-gated p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.lb-gated-note { margin-top: 14px; }

/* podium for top-3 mini display in hero/teaser */
.mini-lb { display: grid; gap: 8px; }

/* ============================================================================
   CHALLENGES (/challenges) — discovery cards + scoped standings
   ========================================================================= */
.ch-page { display: grid; gap: 20px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ch-empty { margin: 0; padding: 22px 4px; font-family: var(--mono); font-size: 0.86rem; color: var(--muted); }

.ch-card {
  appearance: none; cursor: pointer; text-align: left;
  display: grid; gap: 8px; align-content: start;
  padding: 16px 18px; min-height: 116px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  color: var(--ink); transition: transform 0.14s ease, border-color 0.2s, box-shadow 0.2s;
}
.ch-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-1); }
.ch-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-1); background: linear-gradient(180deg, rgba(68, 239, 239, 0.08), var(--bg-2)); }
.ch-kind { font-family: var(--mono); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--chonk); }
.ch-card-title { font-size: 1.05rem; line-height: 1.2; overflow-wrap: anywhere; }
.ch-card-when { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); }

.ch-board { margin-top: 4px; }
.ch-objective { margin: 0 0 4px; padding: 0 2px; color: var(--ink); font-size: 0.98rem; }
.ch-window { margin: 0 0 16px; padding: 0 2px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-2); }

/* ============================================================================
   TRAILER
   ========================================================================= */
.trailer-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--frame);
  background: #020a0a;
  box-shadow: var(--shadow-2), 0 0 0 1px var(--frame-deep);
}
.trailer-frame video { width: 100%; height: 100%; object-fit: cover; }
.trailer-band { display: grid; grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }

/* ============================================================================
   MODES
   ========================================================================= */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.mode-card {
  position: relative;
  padding: clamp(22px, 2.6vw, 30px);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.16s, border-color 0.2s;
}
.mode-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.mode-card .tag {
  position: absolute; top: 18px; right: 18px;
  width: 26px; height: 26px; border-radius: 7px;
}
.mode-card h3 { font-family: var(--display); text-transform: uppercase; font-size: 1.25rem; margin-bottom: 10px; }
.mode-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.mode-card .glow { position: absolute; inset: auto -40% -60% -10%; height: 160px; background: radial-gradient(closest-side, var(--mc, rgba(68,239,239,0.22)), transparent); filter: blur(6px); }

/* ============================================================================
   PLATFORMS
   ========================================================================= */
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.plat {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  font-family: var(--mono); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
  transition: transform 0.16s, border-color 0.2s;
}
.plat:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.plat-i { width: 18px; height: 18px; fill: currentColor; color: var(--cyan); flex: none; }

/* ============================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
  padding-block: clamp(40px, 6vw, 72px);
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-grid h4 { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 14px; }
.footer-grid a { display: block; color: var(--muted); padding: 5px 0; transition: color 0.16s; }
.footer-grid a:hover { color: var(--ink); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; color: var(--muted-2); text-transform: uppercase; }

/* ============================================================================
   MOBILE NAV
   ========================================================================= */
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(4, 16, 15, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { border-bottom: 1px solid var(--line); padding: 16px 0; font-size: 0.95rem; }
  .nav-links .btn { margin-top: 12px; }
  .lb { grid-template-columns: 1fr; }
  .lb-copy { position: static; }
  .trailer-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .lb-row { grid-template-columns: 38px 1fr auto; }
  .lb-head { grid-template-columns: 38px 1fr auto; }
  .hero-meta { gap: 8px 18px; }
}

/* ============================================================================
   ACCOUNT / REPLAY / LEGAL  (restyled legacy components)
   ========================================================================= */
.page-shell { padding-block: clamp(36px, 6vw, 80px); }
.subpage-hero { padding-block: clamp(40px, 7vw, 84px) clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--line); }
.subpage-hero h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.4rem, 7vw, 5.4rem); }

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 34px);
}
.prose { max-width: 70ch; }
.prose p { color: var(--muted); }
.prose h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.4rem, 3vw, 2rem); margin: 36px 0 12px; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 24px 0 40px; }
.stat-grid > div { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-grid span { display: block; font-family: var(--mono); font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 700; line-height: 1; color: var(--ink); }
.stat-grid p { margin: 10px 0 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Account chrome reused by account.js */
.account-page { min-height: 100vh; }
.account-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding-inline: var(--gutter); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(4,16,15,0.86), rgba(4,16,15,0.5)); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 50; }
.account-shell { width: min(var(--maxw), 100%); margin-inline: auto; padding: clamp(28px, 5vw, 64px) var(--gutter); display: grid; gap: clamp(26px, 4vw, 48px); }
.account-login, .account-dashboard { max-width: 1080px; }
.account-login h1, .account-dashboard h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 5rem); }
.account-login p:not(.kicker) { max-width: 60ch; color: var(--muted); }
.account-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 30px; }
.account-heading-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ownership { font-family: var(--mono); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--chonk); border: 1px solid rgba(255, 228, 94, 0.4); border-radius: 8px; padding: 10px 14px; white-space: nowrap; }

.auth-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 18px; }
.auth-divider { display: flex; align-items: center; gap: 14px; max-width: 780px; margin: 22px 0; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2); }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.steam-button { background: #1b2838; color: var(--ink); }
.apple-button { background: var(--ink); color: #04100f; }

label { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
input, textarea, select {
  min-height: 50px; width: 100%;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(0, 0, 0, 0.28); color: var(--ink);
  padding: 0 14px; font-family: var(--body); font-size: 1rem;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.checkout, .code-entry, .device-code-panel, .profile-form { display: grid; gap: 10px; max-width: 780px; margin-top: 18px; }
.checkout-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.checkout-status { min-height: 22px; margin: 0; font-family: var(--mono); font-weight: 700; color: var(--chonk); }
.device-code { display: inline-flex; width: max-content; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 16px 20px; background: rgba(0,0,0,0.3); color: var(--cyan); font-family: var(--mono); font-size: clamp(2rem, 7vw, 4.4rem); font-weight: 700; line-height: 1; letter-spacing: 0.08em; }

/* Social + match list (account.js) */
.account-social { margin: 8px 0 40px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.section-heading h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.5rem, 3.4vw, 2.4rem); }
.section-heading .checkout-status { min-height: 0; text-align: right; }
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.social-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--panel), var(--bg-2)); padding: 16px 18px; }
.social-panel.wide { grid-column: 1 / -1; }
.social-panel h3 { margin: 0 0 12px; font-family: var(--mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan); }
.social-list { display: grid; gap: 8px; }
.social-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 60px; padding: 12px 14px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); }
.social-row strong { display: block; }
.social-row span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); }
.social-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.match-history h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.5rem, 3.4vw, 2.4rem); margin-bottom: 18px; }
.match-list { display: grid; gap: 9px; }
.match-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); }
.match-row strong { color: var(--chonk); font-family: var(--mono); }
.match-row span, .match-row time { color: var(--muted); font-family: var(--mono); font-size: 0.82rem; }
.empty-history { color: var(--muted); }
.replay-actions { justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; }
.replay-status, .replay-download { font-family: var(--mono); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.replay-status.ready { color: var(--cyan); }
a.replay-status { text-decoration: none; }
a.replay-status:hover, .replay-download:hover { text-decoration: underline; }
.replay-download { color: var(--muted); text-decoration: none; }

/* Generic button fallback for legacy markup that uses bare <button> */
button.primary, .button.primary { background: linear-gradient(165deg, var(--cyan-hi), var(--cyan-lo)); color: #032524; border: 0; border-radius: 8px; min-height: 48px; padding: 0 18px; font-family: var(--mono); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; }
.button.secondary, button.secondary { background: rgba(120, 205, 198, 0.06); border: 1px solid var(--line-strong); color: var(--ink); border-radius: 8px; min-height: 48px; padding: 0 18px; display: inline-flex; align-items: center; cursor: pointer; }
.danger-button { background: transparent; color: #ff8f8a; border: 1px solid rgba(240, 90, 80, 0.5); border-radius: 8px; min-height: 44px; padding: 0 16px; font-family: var(--mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; }
.danger-zone { max-width: 780px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.danger-zone h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.4rem, 3vw, 2.2rem); margin-bottom: 10px; }
.danger-zone p { max-width: 60ch; color: var(--muted); }

/* Replay viewer */
.replay-shell { width: min(1180px, 100%); margin-inline: auto; padding: clamp(24px, 4vw, 56px) var(--gutter); display: grid; gap: clamp(20px, 3vw, 40px); }
.replay-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.replay-heading h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2rem, 5vw, 4rem); }
.replay-status-line { margin: 0; font-family: var(--mono); font-weight: 700; color: var(--chonk); }
.replay-stage { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: clamp(16px, 3vw, 30px); align-items: start; }
.replay-player { display: grid; gap: 12px; border: 1px solid var(--frame); border-radius: var(--radius-lg); padding: clamp(12px, 2vw, 18px); background: linear-gradient(180deg, var(--well), var(--well-deep)); }
.replay-player.is-you { border-color: rgba(255, 228, 94, 0.5); box-shadow: 0 0 0 1px rgba(255, 228, 94, 0.14), var(--shadow-1); }
.replay-player-heading { min-height: 54px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.replay-player-heading h2 { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.1rem, 2.4vw, 1.7rem); overflow-wrap: anywhere; }
.replay-player-heading span { flex: 0 0 auto; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.replay-board { width: 100%; aspect-ratio: 1 / 2; border: 1px solid var(--frame); border-radius: var(--radius); background: var(--well-deep); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5); }
.board-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; }
.board-stats div { background: rgba(0, 0, 0, 0.3); padding: 10px; min-width: 0; }
.board-stats dt { font-family: var(--mono); font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.board-stats dd { margin: 5px 0 0; font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.replay-controls { width: min(1000px, 100%); display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(0, 0, 0, 0.32); }
.transport-controls, .speed-control { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 46px; height: 46px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(120, 205, 198, 0.06); color: var(--ink); font-size: 1.05rem; cursor: pointer; transition: all 0.14s; }
.icon-button.primary { background: linear-gradient(165deg, var(--cyan-hi), var(--cyan-lo)); border-color: transparent; color: #032524; }
.icon-button:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-1px); }
.icon-button:disabled { cursor: not-allowed; opacity: 0.4; }
.scrub-control { display: grid; gap: 6px; min-width: 0; }
.time-row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.scrub-control input { width: 100%; min-height: 28px; padding: 0; accent-color: var(--cyan); }
.speed-control { justify-content: flex-end; }
.speed-control output { min-width: 56px; min-height: 46px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: rgba(0, 0, 0, 0.3); font-family: var(--mono); font-weight: 700; }

.success-page { min-height: 100vh; display: grid; place-items: center; padding: var(--gutter); }
.success-panel { max-width: 720px; }
.success-panel h1 { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.6rem, 8vw, 6rem); }

@media (max-width: 820px) {
  .replay-stage { grid-template-columns: 1fr; }
  .replay-controls { grid-template-columns: 1fr; }
  .account-heading-actions { justify-content: flex-start; }
}
