/* rulebook — obsidian and aurora.
   Near-black, lit from behind by three slow-drifting colour fields. Glass
   panels, high-contrast type, and motion that responds to what you do rather
   than just decorating the page.

   Everything expensive is switched off under prefers-reduced-motion. */

:root {
  --bg: #06070b;
  --ink: #f4f6fa;
  --dim: #99a2b3;
  --dimmer: #6a7383;

  --mint: #4ff0c0;
  --violet: #9d7bff;
  --pink: #ff5ca8;
  --gold: #ffc861;
  --red: #ff6b6b;

  --glass: rgba(255, 255, 255, 0.038);
  --glass-2: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.09);
  --stroke-2: rgba(255, 255, 255, 0.16);

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --r: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  letter-spacing: -0.011em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: var(--mint); color: #05060a; }

/* --- ambience ----------------------------------------------------------- */

.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.a1 { width: 60vw; height: 60vw; background: #1c5c4d; top: -18vw; left: -10vw; animation: drift1 26s ease-in-out infinite; }
.a2 { width: 52vw; height: 52vw; background: #3b2a72; top: 22vh; right: -14vw; animation: drift2 32s ease-in-out infinite; }
.a3 { width: 44vw; height: 44vw; background: #6b1f45; bottom: -14vw; left: 24vw; animation: drift3 38s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(12vw, 8vh) scale(1.15); } }
@keyframes drift2 { 50% { transform: translate(-10vw, 12vh) scale(0.9); } }
@keyframes drift3 { 50% { transform: translate(8vw, -10vh) scale(1.12); } }

/* Film grain, so the gradients don't band on cheap panels. */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  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)' opacity='.5'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

.spot {
  position: fixed;
  width: 620px; height: 620px;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 240, 192, 0.075), transparent 62%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s;
}

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--mint), var(--violet), var(--pink));
  box-shadow: 0 0 14px rgba(79, 240, 192, 0.55);
}

nav, header, main, footer { position: relative; z-index: 2; }

/* --- nav ---------------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.4rem);
  backdrop-filter: blur(16px) saturate(1.5);
  background: rgba(6, 7, 11, 0.55);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.stuck { border-bottom-color: var(--stroke); background: rgba(6, 7, 11, 0.82); }

.brand {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 640; font-size: 1.02rem; text-decoration: none;
  letter-spacing: -0.02em;
}
.brand .mark { color: var(--mint); display: grid; place-items: center; }

.navlinks { display: flex; gap: 1.5rem; margin-left: auto; }
.navlinks a {
  text-decoration: none; color: var(--dim); font-size: 0.88rem;
  position: relative; transition: color 0.2s;
}
.navlinks a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -5px; height: 1px;
  background: var(--mint); transition: right 0.28s cubic-bezier(.16,1,.3,1);
}
.navlinks a:hover { color: var(--ink); }
.navlinks a:hover::after { right: 0; }

/* --- buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  color: var(--ink);
  font: inherit; font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(.16,1,.3,1), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { border-color: var(--stroke-2); background: var(--glass-2); transform: translateY(-1px); }
.btn.sm { padding: 0.5rem 0.95rem; font-size: 0.84rem; }
.btn.primary {
  background: linear-gradient(120deg, var(--mint), #3ad9ff);
  color: #04120e; border-color: transparent; font-weight: 640;
  box-shadow: 0 6px 26px rgba(79, 240, 192, 0.22);
}
.btn.primary:hover { box-shadow: 0 10px 36px rgba(79, 240, 192, 0.34); }

/* --- hero --------------------------------------------------------------- */

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 7rem) clamp(1rem, 4vw, 2.4rem) 4rem;
  text-align: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em;
  color: var(--dim);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: var(--glass);
  margin-bottom: 1.8rem;
  animation: fadeUp 0.7s cubic-bezier(.16,1,.3,1) backwards;
}
.eyebrow b { color: var(--mint); font-weight: 600; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

h1.kinetic {
  font-size: clamp(2.9rem, 9.2vw, 6.4rem);
  line-height: 0.98;
  font-weight: 680;
  letter-spacing: -0.045em;
  margin: 0;
}
h1.kinetic .w {
  display: inline-block;
  animation: wordIn 0.9s cubic-bezier(.16,1,.3,1) backwards;
}
h1.kinetic .w:nth-child(1) { animation-delay: 0.06s; }
h1.kinetic .w:nth-child(2) { animation-delay: 0.14s; }
h1.kinetic .w:nth-child(3) { animation-delay: 0.22s; }
h1.kinetic .grad {
  background: linear-gradient(100deg, var(--mint) 0%, #7ee7ff 28%, var(--violet) 58%, var(--pink) 88%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: wordIn 0.9s cubic-bezier(.16,1,.3,1) 0.22s backwards, hue 9s linear infinite 1s;
}
@keyframes wordIn { from { opacity: 0; transform: translateY(38px) rotate(2deg); filter: blur(9px); } }
@keyframes hue { to { background-position: 220% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }

.hero-sub {
  max-width: 56ch; margin: 1.5rem auto 0;
  color: var(--dim); font-size: clamp(1rem, 2vw, 1.13rem);
  animation: fadeUp 0.8s cubic-bezier(.16,1,.3,1) 0.32s backwards;
}
.hero-sub b { color: var(--ink); font-weight: 560; }

/* --- ask ---------------------------------------------------------------- */

.ask { max-width: 720px; margin: 2.6rem auto 0; animation: fadeUp 0.8s cubic-bezier(.16,1,.3,1) 0.42s backwards; }

.ask-field {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.35rem 0.5rem 0.35rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(14px);
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.ask-field::before {
  content: ""; position: absolute; inset: -1px; border-radius: 999px; padding: 1px;
  background: linear-gradient(100deg, var(--mint), var(--violet), var(--pink));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.ask-field:focus-within::before { opacity: 1; }
.ask-field:focus-within { background: rgba(255, 255, 255, 0.07); box-shadow: 0 12px 50px rgba(79, 240, 192, 0.14); }
.ask-icon { color: var(--dimmer); flex: none; transition: color 0.25s; }
.ask-field:focus-within .ask-icon { color: var(--mint); }

.ask-field input {
  flex: 1; min-width: 0;
  padding: 0.85rem 0;
  font: inherit; font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: var(--ink);
  background: none; border: none; outline: none;
}
.ask-field input::placeholder { color: var(--dimmer); }
.ask-field input::-webkit-search-cancel-button { -webkit-appearance: none; }

.hint {
  font-family: var(--mono); font-size: 0.74rem; color: var(--dimmer);
  border: 1px solid var(--stroke); border-radius: 7px;
  padding: 0.2rem 0.5rem; margin-right: 0.5rem; flex: none;
}

.chips { display: flex; gap: 0.45rem; flex-wrap: wrap; justify-content: center; margin-top: 1rem; }
.chips button {
  font-size: 0.82rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--dim);
  font-family: inherit;
  cursor: pointer;
  transition: 0.22s cubic-bezier(.16,1,.3,1);
}
.chips button:hover { color: var(--ink); border-color: var(--stroke-2); background: var(--glass); transform: translateY(-2px); }

/* --- verdicts ----------------------------------------------------------- */

.verdicts { max-width: 780px; margin: 1.6rem auto 0; display: grid; gap: 0.9rem; text-align: left; }

.verdict {
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 1.4rem 1.5rem;
  background: var(--glass);
  backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
  animation: springIn 0.55s cubic-bezier(.2,1.1,.3,1) backwards;
}
.verdict::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent); box-shadow: 0 0 20px var(--accent);
}
@keyframes springIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

.verdict .game {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dimmer);
}
.verdict h3 { margin: 0.25rem 0 0.75rem; font-size: 1.16rem; font-weight: 620; letter-spacing: -0.02em; }

.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem; border-radius: 999px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  animation: stamp 0.5s cubic-bezier(.2,1.7,.4,1) 0.14s backwards;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
@keyframes stamp { from { transform: scale(1.9) rotate(-7deg); opacity: 0; } }

.prev { font-family: var(--mono); font-size: 0.7rem; color: var(--dimmer); margin-left: 0.6rem; }
.verdict p { margin: 0.75rem 0 0; color: var(--dim); }
.verdict .lbl {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pink); margin-top: 1.1rem;
}
.verdict .src { font-size: 0.78rem; color: var(--dimmer); word-break: break-word; margin-top: 0.9rem; }
.verdict .src a { color: var(--dim); }

.miss {
  border: 1px dashed var(--stroke-2); border-radius: var(--r);
  padding: 1.6rem; color: var(--dim); text-align: center;
}
.miss b { color: var(--ink); display: block; margin-bottom: 0.4rem; }
.miss a { color: var(--mint); }

/* --- stats -------------------------------------------------------------- */

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; margin: 3.4rem auto 0; max-width: 900px;
  background: var(--stroke);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  overflow: hidden;
}
.stat { padding: 1.4rem 1rem; background: rgba(6, 7, 11, 0.7); transition: background 0.3s; }
.stat:hover { background: rgba(255, 255, 255, 0.035); }
.stat b {
  display: block; font-size: clamp(1.7rem, 4.6vw, 2.5rem); font-weight: 660;
  letter-spacing: -0.04em; line-height: 1.1;
  background: linear-gradient(160deg, var(--ink), var(--dim));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat.hl b { background: linear-gradient(160deg, var(--gold), #ff9d4d); -webkit-background-clip: text; background-clip: text; }
.stat span { font-size: 0.72rem; color: var(--dimmer); text-transform: uppercase; letter-spacing: 0.11em; }

/* --- sections ----------------------------------------------------------- */

main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.4rem) 6rem; }
section { padding: clamp(4rem, 11vh, 8rem) 0 0; }

.head { margin-bottom: 2.6rem; }
.tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mint);
}
.head h2 {
  font-size: clamp(2rem, 5.6vw, 3.4rem);
  line-height: 1.04; font-weight: 660; letter-spacing: -0.04em;
  margin: 0.7rem 0 0;
}
.head h2 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--gold), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: var(--dim); max-width: 60ch; margin: 1rem 0 0; }
.lede em { font-style: normal; color: var(--ink); }

.reveal > * { opacity: 0; transform: translateY(26px); transition: opacity 0.75s cubic-bezier(.16,1,.3,1), transform 0.75s cubic-bezier(.16,1,.3,1); }
.reveal.in > * { opacity: 1; transform: none; }
.reveal.in > *:nth-child(2) { transition-delay: 0.08s; }
.reveal.in > *:nth-child(3) { transition-delay: 0.16s; }

/* --- ticker ------------------------------------------------------------- */

.ticker {
  overflow: hidden; margin-bottom: 2rem;
  border-top: 1px solid var(--stroke); border-bottom: 1px solid var(--stroke);
  padding: 0.8rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.track { display: flex; gap: 2.4rem; width: max-content; animation: slide 34s linear infinite; }
.track span {
  font-family: var(--mono); font-size: 0.82rem; color: var(--dimmer);
  white-space: nowrap; display: flex; align-items: center; gap: 0.7rem;
}
.track span::before { content: "✕"; color: var(--red); font-size: 0.7rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* --- fake rules --------------------------------------------------------- */

.fakes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.fake {
  border: 1px solid var(--stroke); border-radius: var(--r);
  padding: 1.4rem; background: var(--glass); backdrop-filter: blur(10px);
  position: relative; overflow: hidden;
  transition: transform 0.35s cubic-bezier(.16,1,.3,1), border-color 0.3s, box-shadow 0.35s;
}
.fake::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 92, 168, 0.11), transparent 65%);
  pointer-events: none;
}
.fake:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--red) 42%, transparent); box-shadow: 0 22px 60px rgba(0, 0, 0, 0.5); }
.fake:hover::after { opacity: 1; }
.fake .stamp {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.14em;
  color: var(--red); border: 1.5px solid var(--red); border-radius: 5px;
  padding: 0.18rem 0.4rem; transform: rotate(7deg); opacity: 0.8;
}
.fake .game { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); }
.fake h4 { margin: 0.4rem 0 0.6rem; font-size: 1.05rem; font-weight: 620; letter-spacing: -0.02em; padding-right: 4.2rem; }
.fake p { margin: 0; color: var(--dim); font-size: 0.9rem; }

/* --- lying bars --------------------------------------------------------- */

.bars { display: grid; gap: 0.85rem; }
.bar { display: grid; grid-template-columns: minmax(88px, 130px) 1fr auto; gap: 1rem; align-items: center; }
.bar .n { font-size: 0.92rem; color: var(--dim); }
.bar .track2 { position: relative; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, 0.045); overflow: hidden; }
.bar .box, .bar .real {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: 9px;
  width: 0;
  transition: width 1.1s cubic-bezier(.16,1,.3,1);
}
.bar .box { background: rgba(255, 255, 255, 0.13); }
.bar .real { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 55%, transparent), var(--gold)); box-shadow: 0 0 22px rgba(255, 200, 97, 0.28); }
.bar .over { font-family: var(--mono); font-size: 0.8rem; color: var(--gold); white-space: nowrap; }
.bar .over.none { color: var(--dimmer); }
.barkey { display: flex; gap: 1.4rem; margin-top: 1.4rem; font-size: 0.8rem; color: var(--dimmer); }
.barkey i { display: inline-block; width: 22px; height: 9px; border-radius: 3px; vertical-align: middle; margin-right: 0.4rem; }

/* --- filters ------------------------------------------------------------ */

.filters { display: grid; gap: 0.9rem; margin-bottom: 2rem; }
.fgroup { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.fgroup > span {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dimmer); width: 68px; flex: none;
}
.pill {
  font: inherit; font-size: 0.85rem;
  padding: 0.36rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: transparent; color: var(--dim);
  cursor: pointer;
  transition: 0.22s cubic-bezier(.16,1,.3,1);
}
.pill:hover { color: var(--ink); border-color: var(--stroke-2); }
.pill.on { background: var(--mint); color: #04120e; border-color: transparent; font-weight: 580; }

/* --- game cards --------------------------------------------------------- */

.game-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); perspective: 1200px; }

.gcard {
  border: 1px solid var(--stroke); border-radius: var(--r);
  padding: 1.3rem; background: var(--glass); backdrop-filter: blur(10px);
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.35s, transform 0.15s ease-out;
  animation: springIn 0.5s cubic-bezier(.2,1.05,.3,1) backwards;
  transform-style: preserve-3d;
}
.gcard::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(79, 240, 192, 0.12), transparent 62%);
  pointer-events: none;
}
.gcard:hover { border-color: var(--stroke-2); box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55); }
.gcard:hover::after { opacity: 1; }
.gcard:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.gcard .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.gcard .fam { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mint); }
.gcard .cnt { font-family: var(--mono); font-size: 0.68rem; color: var(--dimmer); flex: none; }
.gcard h3 { margin: 0.35rem 0 0.9rem; font-size: 1.28rem; font-weight: 640; letter-spacing: -0.028em; }

.gcard .meta { display: grid; grid-template-columns: auto 1fr; gap: 0.28rem 0.8rem; font-size: 0.86rem; }
.gcard .meta dt { color: var(--dimmer); font-family: var(--mono); font-size: 0.7rem; align-self: center; }
.gcard .meta dd { margin: 0; color: var(--dim); }
.gcard .meta .lie { color: var(--gold); }
.gcard .dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.gcard .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--stroke-2); }
.gcard .dots i.f { background: var(--mint); }
.gcard .scorer {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 0.45rem 1.3rem; font-family: var(--mono); font-size: 0.66rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet);
  background: linear-gradient(0deg, rgba(157, 123, 255, 0.11), transparent);
  transform: translateY(100%); transition: transform 0.3s cubic-bezier(.16,1,.3,1);
}
.gcard:hover .scorer { transform: none; }

.empty { color: var(--dim); }

/* --- panel / scorer ----------------------------------------------------- */

.panel {
  border: 1px solid var(--stroke); border-radius: 22px;
  background: var(--glass); backdrop-filter: blur(14px);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.seg {
  display: inline-flex; gap: 3px; padding: 4px;
  border-radius: 999px; border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.28); margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.seg button {
  font: inherit; font-size: 0.86rem;
  padding: 0.44rem 1rem; border-radius: 999px;
  border: none; background: none; color: var(--dim); cursor: pointer;
  transition: 0.24s cubic-bezier(.16,1,.3,1);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"] { background: var(--ink); color: #06070b; font-weight: 600; }

.panel > label { display: block; font-family: var(--mono); font-size: 0.76rem; color: var(--dimmer); margin-bottom: 0.7rem; }
.score-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.score-row input {
  flex: 1 1 240px; min-width: 0;
  padding: 0.85rem 1.1rem;
  font-family: var(--mono); font-size: 0.98rem; color: var(--ink);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--stroke); border-radius: 12px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.score-row input:focus { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(79, 240, 192, 0.14); }

.score-egs { display: flex; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.8rem; }
.score-egs button {
  font-family: var(--mono); font-size: 0.74rem;
  padding: 0.3rem 0.65rem; border-radius: 8px;
  border: 1px solid var(--stroke); background: none; color: var(--dimmer); cursor: pointer;
  transition: 0.2s;
}
.score-egs button:hover { color: var(--mint); border-color: var(--mint); }

.out {
  font-family: var(--mono); font-size: 0.9rem; white-space: pre-wrap;
  margin: 1.2rem 0 0; padding: 1.1rem; min-height: 3.4rem;
  border-radius: 12px; background: rgba(0, 0, 0, 0.34);
  border: 1px solid var(--stroke); border-left: 2px solid var(--mint);
  color: var(--ink);
}
.out:empty::before { content: "…"; color: var(--dimmer); }
.out.err { border-left-color: var(--red); color: var(--red); }

/* --- install ------------------------------------------------------------ */

.split { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.terminal { border: 1px solid var(--stroke); border-radius: var(--r); overflow: hidden; background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(10px); }
.tbar { display: flex; align-items: center; gap: 0.42rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--stroke); }
.tbar i { width: 10px; height: 10px; border-radius: 50%; }
.tbar i:nth-child(1) { background: #ff5f57; } .tbar i:nth-child(2) { background: #febc2e; } .tbar i:nth-child(3) { background: #28c840; }
.tbar span { margin-left: 0.5rem; font-family: var(--mono); font-size: 0.72rem; color: var(--dimmer); }
.tbody { font-family: var(--mono); font-size: 0.83rem; padding: 1.2rem; margin: 0; white-space: pre-wrap; min-height: 21rem; line-height: 1.6; }
.tbody .p { color: var(--mint); } .tbody .c { color: var(--ink); }
.tbody .o { color: var(--dim); } .tbody .g { color: var(--gold); }

.installs { display: grid; gap: 0.7rem; }
.cmd { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(0, 0, 0, 0.28); padding: 0.6rem 0.6rem 0.6rem 0.9rem; }
.cmd code { font-family: var(--mono); font-size: 0.8rem; color: var(--mint); overflow-x: auto; white-space: nowrap; flex: 1; }
.copy { font: inherit; font-size: 0.74rem; padding: 0.3rem 0.6rem; border-radius: 8px; border: 1px solid var(--stroke); background: none; color: var(--dim); cursor: pointer; flex: none; }
.copy:hover { color: var(--ink); border-color: var(--stroke-2); }

.feats { list-style: none; padding: 0; margin: 0.6rem 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--stroke); border: 1px solid var(--stroke); border-radius: 12px; overflow: hidden; }
.feats li { background: rgba(6, 7, 11, 0.8); padding: 0.9rem; font-size: 0.78rem; color: var(--dimmer); }
.feats b { display: block; font-size: 1.5rem; color: var(--ink); font-weight: 640; letter-spacing: -0.03em; }

/* --- modal -------------------------------------------------------------- */

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.2rem; background: rgba(3, 4, 7, 0.72); backdrop-filter: blur(10px); animation: fade 0.25s; }
.modal[hidden] { display: none; } /* a class selector beats the UA [hidden] rule */
@keyframes fade { from { opacity: 0; } }
.modal-card {
  position: relative; width: min(860px, 100%); max-height: 88svh; overflow-y: auto;
  border: 1px solid var(--stroke-2); border-radius: 22px;
  background: linear-gradient(180deg, #12141c, #08090e);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  animation: pop 0.4s cubic-bezier(.16,1,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(28px) scale(.97); } }
.close { position: absolute; top: 0.9rem; right: 1.1rem; background: none; border: none; color: var(--dimmer); font-size: 1.8rem; line-height: 1; cursor: pointer; }
.close:hover { color: var(--ink); }
.modal-card h2 { margin: 0 0 0.3rem; font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 660; letter-spacing: -0.035em; }
.modal-card h3 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--mint); margin: 2rem 0 0.7rem; }
.modal-card table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.modal-card td { padding: 0.5rem 0.7rem 0.5rem 0; border-bottom: 1px solid var(--stroke); vertical-align: top; color: var(--dim); }
.modal-card td:first-child { color: var(--dimmer); font-family: var(--mono); font-size: 0.74rem; white-space: nowrap; width: 1%; }
.modal-card ol, .modal-card ul { padding-left: 1.2rem; color: var(--dim); }
.modal-card li { margin: 0.35rem 0; }
.modal-card p { color: var(--dim); }
.modal-card .rul { border-left: 2px solid var(--gold); padding-left: 1rem; margin: 1.1rem 0; }
.modal-card .rul.off { border-left-color: var(--mint); }
.modal-card .rul b { display: block; color: var(--ink); font-weight: 600; }
.modal-card .rul .k { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.modal-card .rul.off .k { color: var(--mint); }

/* --- footer ------------------------------------------------------------- */

footer { border-top: 1px solid var(--stroke); padding: 3.5rem clamp(1rem, 4vw, 2.4rem) 4rem; text-align: center; }
.fbrand { font-size: 1.6rem; font-weight: 660; letter-spacing: -0.04em; margin-bottom: 0.5rem; }
footer p { margin: 0.5rem auto; max-width: 62ch; color: var(--dim); }
footer .fine { font-size: 0.79rem; color: var(--dimmer); }
footer a { color: var(--dim); }
footer a:hover { color: var(--mint); }

/* --- narrow ------------------------------------------------------------- */

@media (max-width: 720px) {
  .navlinks { display: none; }
  .bar { grid-template-columns: 84px 1fr; }
  .bar .over { grid-column: 2; justify-self: end; }
  .fgroup > span { width: 100%; }
}

/* --- respect the setting ------------------------------------------------ */

@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;
  }
  .reveal > * { opacity: 1; transform: none; }
  .aurora, .grain, .spot { display: none; }
  .gcard .scorer { position: static; transform: none; padding: 0.5rem 0 0; background: none; }
}

/* --- regions ------------------------------------------------------------- */

.regions { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.region {
  border: 1px solid var(--stroke); border-radius: var(--r);
  padding: 1.3rem; background: var(--glass); backdrop-filter: blur(10px);
  position: relative;
}
.region h4 { margin: 0; font-size: 1.1rem; font-weight: 620; letter-spacing: -0.02em; }
.region .count { font-family: var(--mono); font-size: 0.68rem; color: var(--violet); letter-spacing: 0.12em; text-transform: uppercase; }
.region ul { list-style: none; padding: 0; margin: 0.9rem 0 0; display: grid; gap: 0.5rem; }
.region li a { text-decoration: none; color: var(--dim); font-size: 0.88rem; display: block; transition: color 0.2s; }
.region li a b { color: var(--ink); font-weight: 560; }
.region li a:hover { color: var(--mint); }

/* --- share --------------------------------------------------------------- */

.share {
  margin-top: 1rem;
  font: inherit; font-size: 0.74rem;
  padding: 0.32rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--stroke); background: transparent; color: var(--dimmer);
  cursor: pointer; transition: 0.2s;
}
.share:hover { color: var(--mint); border-color: var(--mint); }
.rul.lit { background: rgba(79, 240, 192, 0.06); border-radius: 0 10px 10px 0; }

/* --- scorepad ------------------------------------------------------------ */

.pad-top { display: flex; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.pad-top input {
  flex: 1 1 180px; min-width: 0;
  padding: 0.7rem 1rem; font: inherit; color: var(--ink);
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--stroke);
  border-radius: 12px; outline: none;
}
.pad-top input:focus { border-color: var(--mint); }

.pad-wrap { overflow-x: auto; }
.pad { width: 100%; border-collapse: collapse; min-width: 320px; }
.pad th, .pad td { padding: 0.45rem 0.5rem; text-align: center; border-bottom: 1px solid var(--stroke); }
.pad th { font-size: 0.85rem; font-weight: 600; color: var(--ink); position: relative; white-space: nowrap; }
.pad .rn { font-family: var(--mono); font-size: 0.72rem; color: var(--dimmer); width: 2.5rem; }
.pad input {
  width: 100%; min-width: 3.2rem; text-align: center;
  padding: 0.4rem 0.2rem; font-family: var(--mono); font-size: 0.92rem; color: var(--ink);
  background: transparent; border: 1px solid transparent; border-radius: 8px; outline: none;
}
.pad input:hover { border-color: var(--stroke); }
.pad input:focus { border-color: var(--mint); background: rgba(0, 0, 0, 0.3); }
.pad .rm {
  background: none; border: none; color: var(--dimmer); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 0 0 0.35rem;
}
.pad .rm:hover { color: var(--red); }
.pad tfoot td { font-family: var(--mono); font-size: 1rem; font-weight: 700; color: var(--dim); border-bottom: none; padding-top: 0.7rem; }
.pad tfoot .lead { color: var(--mint); }

.offline {
  font-size: 0.82rem; color: var(--dimmer);
  border: 1px dashed var(--stroke); border-radius: 12px;
  padding: 0.7rem 0.9rem; margin-top: 0.2rem;
}
.offline.ok { border-style: solid; border-color: color-mix(in srgb, var(--mint) 35%, transparent); color: var(--dim); }
.offline b { color: var(--mint); }

/* --- new data on the game page ------------------------------------------ */

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative; padding-left: 1.4rem; margin: 0 0 1rem;
  border-left: 1px solid var(--stroke);
  padding-bottom: 0.2rem; color: var(--dim);
}
.timeline li::before {
  content: ""; position: absolute; left: -4.5px; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--violet); box-shadow: 0 0 10px var(--violet);
}
.timeline b { color: var(--ink); }
.timeline .yr { font-family: var(--mono); font-size: 0.74rem; color: var(--dimmer); }

.cheat { border-left: 2px solid var(--red); padding-left: 0.9rem; margin: 0.9rem 0; }
.cheat p { margin: 0; }
.cheat .spot { color: var(--mint); font-size: 0.9rem; margin-top: 0.3rem; }

.unver { color: var(--gold); }
.src.conflict { border-left: 2px solid var(--gold); padding-left: 0.7rem; color: var(--dim); }
.src.conflict b { color: var(--gold); }

/* --- quiz ---------------------------------------------------------------- */

.quiz-panel { min-height: 18rem; }
.dimnote { color: var(--dimmer); font-size: 0.85rem; margin-left: 0.8rem; }

.quiz-bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.07); overflow: hidden; margin-bottom: 1.2rem; }
#quiz-progress { height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--mint), var(--violet)); transition: width 0.4s cubic-bezier(.16,1,.3,1); }

.quiz-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: var(--dimmer); letter-spacing: 0.1em; text-transform: uppercase; }
#quiz-q { font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 620; letter-spacing: -0.025em; margin: 0.6rem 0 1.4rem; }

.quiz-answers { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.quiz-answers .btn { flex: 1 1 200px; justify-content: center; padding: 1rem; font-size: 1rem; }
.quiz-answers .btn.right { background: color-mix(in srgb, var(--mint) 22%, transparent); border-color: var(--mint); color: var(--mint); }
.quiz-answers .btn.wrong { background: color-mix(in srgb, var(--red) 18%, transparent); border-color: var(--red); color: var(--red); }
.quiz-answers .btn:disabled { cursor: default; transform: none; }

.quiz-feedback { margin-top: 1.2rem; padding: 1rem 1.2rem; border-radius: 12px; border-left: 2px solid var(--stroke-2); background: rgba(0,0,0,0.28); animation: springIn 0.4s cubic-bezier(.2,1.1,.3,1); }
.quiz-feedback.ok { border-left-color: var(--mint); }
.quiz-feedback.no { border-left-color: var(--red); }
.quiz-feedback p { color: var(--dim); margin: 0.5rem 0; font-size: 0.94rem; }
.quiz-feedback a { color: var(--mint); font-size: 0.86rem; text-decoration: none; }
#quiz-next { margin-top: 1.1rem; }

.quiz-score { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.quiz-score b { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 680; letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--mint), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.quiz-score span { font-family: var(--mono); font-size: 0.86rem; color: var(--gold); letter-spacing: 0.06em; }
.quiz-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 1.2rem 0; }

/* --- museum -------------------------------------------------------------- */

.museum { display: grid; gap: 0.9rem; }
.exhibit {
  display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start;
  border: 1px solid var(--stroke); border-radius: var(--r); padding: 1.3rem;
  background: var(--glass); backdrop-filter: blur(10px);
  transition: border-color 0.3s, transform 0.3s cubic-bezier(.16,1,.3,1);
}
.exhibit:hover { border-color: color-mix(in srgb, var(--red) 40%, transparent); transform: translateX(4px); }
.exhibit .no { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; color: var(--stroke-2); line-height: 1; }
.exhibit .game { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mint); }
.exhibit h4 { margin: 0.3rem 0 0.5rem; font-size: 1.06rem; font-weight: 620; letter-spacing: -0.02em; }
.exhibit p { margin: 0; color: var(--dim); font-size: 0.92rem; }
.exmeta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 0.8rem; font-size: 0.78rem; color: var(--dimmer); }
.exmeta .heat { color: var(--gold); letter-spacing: 2px; }
.exmeta a { color: var(--mint); text-decoration: none; }

/* --- family tree --------------------------------------------------------- */

.tree { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.branch { border: 1px solid var(--stroke); border-radius: var(--r); padding: 1.2rem 1.3rem; background: var(--glass); }
.branch .ancestor {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--violet); padding-bottom: 0.7rem; margin-bottom: 0.9rem; border-bottom: 1px solid var(--stroke);
}
.branch .kids { display: grid; gap: 0.5rem; }
.kid {
  display: block; text-decoration: none; padding: 0.75rem 0.9rem;
  border: 1px solid var(--stroke); border-radius: 12px; background: rgba(0,0,0,0.22);
  transition: 0.22s cubic-bezier(.16,1,.3,1);
}
.kid:hover { border-color: var(--mint); transform: translateY(-2px); }
.kid b { color: var(--ink); font-weight: 600; }
.kid .yr { font-family: var(--mono); font-size: 0.7rem; color: var(--dimmer); margin-left: 0.5rem; }
.kid .why { display: block; margin-top: 0.3rem; font-size: 0.78rem; color: var(--dimmer); line-height: 1.4; }
/* The biggest families are the interesting ones, so let them span. */
.branch:has(.kid:nth-child(3)) { grid-column: span 2; }
.branch:has(.kid:nth-child(3)) .kids { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 720px) { .branch:has(.kid:nth-child(3)) { grid-column: span 1; } }
.originals .ancestor { color: var(--dimmer); }

/* --- game illustrations --------------------------------------------------- */

.gcard .gart {
  display: block; width: calc(100% + 2.6rem); margin: -1.3rem -1.3rem 1rem;
  border-radius: var(--r) var(--r) 0 0;
  /* Height follows the natural ratio. object-fit: cover cropped the game name
     off the illustration — "Battleship" arrived as "attleship". */
  height: auto;
  opacity: 0.85; transition: opacity 0.3s;
}
.gcard:hover .gart { opacity: 1; }

.mart {
  display: block; width: 100%; max-width: 400px;
  border-radius: 14px; margin-bottom: 1.2rem;
  border: 1px solid var(--stroke);
}

.playlinks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.playlinks li {
  border: 1px solid var(--stroke); border-radius: 12px; padding: 0.8rem 1rem;
  background: rgba(0,0,0,0.22); color: var(--dim); font-size: 0.9rem;
}
.playlinks a { color: var(--mint); text-decoration: none; }
.playlinks a b { font-weight: 600; }
