/* Layout: a deck of full-screen panels, one on screen at a time. A cinematic dark world opens it, an atmosphere
   fades into pale, precise "paper" panels, and dark panels return for powerups, the Great Reset and the end. */
:root {
  --void: #05060b;      /* space behind the planet */
  --night: #0b1020;     /* dark panels */
  --atmo: #3156ff;      /* atmosphere blue */
  --ember: #ff7a2f;     /* arcs and sunset rim */
  --amber: #f5b630;     /* the Swap prefix colour from the mod */
  --paper: #eef0f3;     /* light panels, cool to sit next to the blue */
  --paper-2: #e3e6eb;
  --ink: #0c0e14;
  --ink-2: #4a5061;
  --mute: #8b91a3;
  --line: rgba(12, 14, 20, 0.12);
  --line-dark: rgba(255, 255, 255, 0.12);
  --hud-green: #55cc55;
  --hud-yellow: #ffd24a;
  --danger: #e5484d;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --f-pixel: "Pixelify Sans", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --nav-space: calc(84px + env(safe-area-inset-top, 0px));
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-nav: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-loading { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--atmo); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  font-stretch: 87.5%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.4;
}
.display {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(30px, min(4.6vw, 7.4vh), 72px);
  line-height: 0.96;
  letter-spacing: -0.01em;
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--void); color: #fff;
  clip-path: inset(0 0 0 0);
}
.loader__inner { display: grid; justify-items: center; gap: 22px; width: min(220px, 60vw); }
.loader__glass { width: 64px; height: 64px; image-rendering: pixelated; animation: hourglass 1.6s cubic-bezier(0.7, 0, 0.3, 1) infinite; }
@keyframes hourglass {
  0%, 45% { transform: rotate(0deg); }
  70%, 100% { transform: rotate(180deg); }
}
.loader__meta { display: flex; justify-content: space-between; width: 100%; color: rgba(255, 255, 255, 0.6); }
.loader__count { color: #fff; font-variant-numeric: tabular-nums; }
.loader__bar { width: 100%; height: 1px; background: rgba(255, 255, 255, 0.14); }
.loader__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--ember)); transform: scaleX(0); transform-origin: left; }

/* ---------- Stack of panels ----------
   Every panel is sticky, so each one slides up over the one before it as the page scrolls. A panel taller than the
   screen gets a negative sticky top (set in site.js) so its own content scrolls first. */
.deck { position: relative; }
.panel {
  position: sticky; top: 0;
  min-height: 100svh;
  overflow: hidden;
}
.panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: #000; opacity: var(--dim, 0);
}
.panel__scroll {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: flex; flex-direction: column;
  will-change: transform;
}
.panel__inner {
  margin-block: auto;
  padding-top: var(--nav-space);
  padding-bottom: clamp(28px, 5vh, 64px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding-inline: 22px; border-radius: 999px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn--solid { background: #fff; color: var(--ink); }
.btn--solid:hover { background: var(--amber); }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #262a36; }
.btn--dark:disabled { opacity: 0.5; cursor: progress; }
.btn--text { background: none; color: var(--ink-2); padding-inline: 4px; }
.btn--text:hover { color: var(--ink); }

/* ---------- Navigation (after NorthGarden) ---------- */
.nav-wrap {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 0;
  pointer-events: none;
}
.nav {
  --nav-w: max(33vw, 470px);
  pointer-events: auto;
  position: relative;
  width: min(var(--nav-w), 100%);
  height: 44px;
  display: flex; align-items: center;
  border-radius: 4px;
  overflow: hidden;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  backdrop-filter: blur(24px) saturate(1.3);
  transition: width 0.7s cubic-bezier(0.34, 1.32, 0.5, 1), background-color 0.6s var(--ease-nav), color 0.6s var(--ease-nav);
}
.nav.is-light { color: #3a3f4c; background: rgba(12, 14, 20, 0.05); }
.nav.is-folded { width: 112px; }
.nav__row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding-inline: 22px; }
.nav__letter { font-family: var(--f-display); font-weight: 650; font-size: 14px; text-decoration: none; min-width: 10px; text-align: center; }
.nav__links { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav__links a {
  font-family: var(--f-mono); font-size: 11.5px; font-stretch: 87.5%; letter-spacing: -0.01em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; opacity: 0.55;
  transition: opacity 0.15s var(--ease-nav), filter 0.45s var(--ease-nav), transform 0.45s var(--ease-nav);
}
.nav__links a:hover, .nav__links a.is-here { opacity: 1; }
.nav.is-folded .nav__links a { opacity: 0; filter: blur(8px); transform: scale(0.94); pointer-events: none; }
.nav__mark {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px;
  transform: translate(-50%, -50%) scale(0.85); filter: blur(10px); opacity: 0; pointer-events: none;
  transition: opacity 0.45s var(--ease-nav), filter 0.45s var(--ease-nav), transform 0.45s var(--ease-nav);
}
.nav__mark img { width: 16px; height: 16px; image-rendering: pixelated; }
.nav.is-folded .nav__mark { opacity: 1; filter: blur(0); transform: translate(-50%, -50%) scale(1); }

/* ---------- Pager ---------- */
.pager {
  position: fixed; z-index: 40; right: var(--gutter); bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums; transition: color 0.6s var(--ease-nav);
  pointer-events: none;
}
.pager.is-light { color: var(--ink-2); }
.pager__sep { width: 28px; height: 1px; background: currentColor; opacity: 0.5; }

/* ---------- Hero ---------- */
.hero { color: #fff; background: var(--void); }
.hero__globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(70% 80% at 18% 78%, rgba(5, 6, 11, 0.62), transparent 70%);
}
.hero__inner {
  width: 100%; max-width: var(--max); margin: auto auto 0;
  padding: var(--nav-space) var(--gutter) clamp(56px, 10vh, 112px);
  display: grid; gap: 24px; justify-items: start;
}
.hero__eyebrow { color: rgba(255, 255, 255, 0.8); }
.hero__title {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 850; text-transform: uppercase;
  font-size: clamp(44px, min(8.4vw, 13vh), 132px); line-height: 0.9; letter-spacing: -0.015em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__title .line > span { display: inline-block; }
.hero__lede { max-width: 44ch; color: rgba(255, 255, 255, 0.72); font-size: 17px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.hero__meta {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, 0.5);
}
.hero__meta-line { width: 64px; height: 1px; background: linear-gradient(90deg, rgba(255,255,255,0.15), var(--ember)); }

/* ---------- Atmosphere ---------- */
.atmos { color: #fff; background: linear-gradient(180deg, var(--void) 0%, #0a1033 24%, #2a3fd6 58%, #9fb0ff 82%, var(--paper) 100%); }
.atmos__glow {
  position: absolute; left: 50%; top: 52%; width: 140vw; height: 70vw; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 122, 47, 0.24), transparent 70%);
  pointer-events: none;
}
.atmos__title { font-size: clamp(34px, min(6.6vw, 11vh), 108px); max-width: 15ch; }

/* ---------- Light panels ---------- */
.premise, .cycle, .mods, .creators, .apply { background: var(--paper); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(20px, 4.4vh, 48px); max-width: 860px; }
.section-head .label { color: var(--ink-2); }
.section-head__lede { max-width: 58ch; color: var(--ink-2); }
.section-head--dark .label, .section-head--dark .section-head__lede { color: rgba(255, 255, 255, 0.62); }

/* ---------- Premise and house rules ---------- */
.premise__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.premise__copy { display: grid; gap: 22px; max-width: 34em; }
.premise__copy .label { color: var(--ink-2); }
.premise__lead { font-size: clamp(21px, min(2.1vw, 3.3vh), 30px); line-height: 1.32; letter-spacing: -0.01em; }
.premise__copy p:last-child { color: var(--ink-2); }
.rules__list { margin: 0; display: grid; gap: 0; }
.rules__list > div { padding: clamp(14px, 2.4vh, 22px) 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.rules__list > div:last-child { border-bottom: 1px solid var(--line); }
.rules__list dt { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: 19px; }
.rules__list dd { margin: 0; color: var(--ink-2); max-width: 52ch; font-size: 15.5px; }

/* ---------- Cycle: the whole loop on one screen ---------- */
.cycle__wrap { display: grid; gap: clamp(28px, 5vh, 56px); }
.cycle__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.cycle__intro { display: grid; gap: 18px; align-content: center; }
.cycle__lede { max-width: 40ch; color: var(--ink-2); }
.cycle .screen { max-height: 44vh; justify-self: end; }

.timeline { display: grid; gap: 18px; }
.timeline__bar { position: relative; display: flex; gap: 3px; height: 10px; }
.seg {
  flex: var(--grow) 1 0; min-width: 10px; height: 100%; padding: 0; border: 0; border-radius: 2px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 28%, var(--paper-2));
  transition: background-color 0.4s var(--ease-out);
}
.seg.is-on { background: var(--c); }
.seg:hover { background: color-mix(in srgb, var(--c) 60%, var(--paper-2)); }
.seg.is-on:hover { background: var(--c); }
.timeline__head {
  position: absolute; top: -7px; bottom: -7px; left: 0; width: 2px; margin-left: -1px;
  background: var(--ink); border-radius: 1px; pointer-events: none;
  transform: translateX(var(--x, 0px));
}
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); }
.phase__btn {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: 6px; width: 100%;
  padding-top: 14px; border-top: 2px solid var(--line); position: relative;
  color: var(--mute); transition: color 0.4s var(--ease-out);
}
.phase__btn::before {
  content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: 100%;
  background: var(--c); transform: scaleX(var(--p, 0)); transform-origin: left;
}
.phase__btn:focus-visible { outline: 2px solid var(--atmo); outline-offset: 4px; }
.phase__time { font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.phase__name { font-family: var(--f-display); font-stretch: 112%; font-weight: 700; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.15; }
.phase__text { font-size: 14.5px; line-height: 1.45; }
.phase.is-on .phase__btn { color: var(--ink); }
.phase.is-on .phase__time { color: var(--ink-2); }
.phase.is-on .phase__text { color: var(--ink-2); }

/* The game screen mock: the mod's HUD, screens and inventory, drawn in CSS */
.screen {
  position: relative; aspect-ratio: 16 / 10; width: 100%; max-width: 100%; max-height: 62vh; justify-self: center;
  border-radius: 6px; overflow: hidden; background: #10131c; color: #fff;
  box-shadow: 0 40px 80px -40px rgba(12, 14, 20, 0.55);
  font-family: var(--f-pixel);
}
.screen__sky { position: absolute; inset: 0; background: linear-gradient(180deg, #7aa7ff 0%, #b9d2ff 55%, #dfe9ff 100%); transition: filter 0.6s var(--ease-out); }
.screen.is-dim .screen__sky { filter: brightness(0.35) saturate(0.7); }
.hud {
  position: absolute; z-index: 3; top: 6%; left: 50%; transform: translateX(-50%);
  width: min(62%, 360px); padding: 8px 10px 10px; background: rgba(16, 16, 24, 0.66); outline: 1px solid rgba(255, 255, 255, 0.38);
  text-align: center; font-size: clamp(11px, 1.15vw, 15px);
}
.hud__line { white-space: nowrap; color: var(--hud-yellow); }
.hud__line b { color: #fff; font-weight: 500; }
.hud__line .who { color: var(--hud-green); font-weight: 700; }
.hud__line .sep { color: #555; }
.hud__line .modname { background: linear-gradient(90deg, #ff55ff, #ffd24a, #55ffff); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.hud__bar { margin-top: 6px; height: 4px; background: rgba(0, 0, 0, 0.5); }
.hud__bar i { display: block; height: 100%; width: 100%; background: var(--hud-yellow); transform-origin: left; }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s var(--ease-out); }
.scene.is-on { opacity: 1; }
.scene__flat { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: linear-gradient(180deg, #6fb04a 0 10%, #5b8f3c 10% 14%, #8a6a46 14% 70%, #3b3b3b 70%); }
.scene__flat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10%; background-image: repeating-linear-gradient(90deg, rgba(0,0,0,0.08) 0 6px, transparent 6px 18px); }
.scene--chosen { display: grid; place-content: center; gap: 18px; background: rgba(10, 12, 20, 0.55); text-align: center; }
.game-title { font-size: clamp(22px, 3.6vw, 44px); color: #ffaa00; text-shadow: 3px 3px 0 #3f2a00; }
.mini-cards { display: flex; gap: 10px; justify-content: center; }
.mini-card { width: clamp(70px, 9vw, 104px); padding: 10px 6px 8px; display: grid; justify-items: center; gap: 6px; background: #2a2a34; outline: 1px solid #55555f; font-size: clamp(9px, 0.9vw, 12px); }
.mini-card img { width: 32px; height: 32px; image-rendering: pixelated; }
.mini-card.is-picked { background: #25402b; outline-color: #6be07a; }
.scene__hills {
  position: absolute; left: -5%; right: -5%; bottom: 0; height: 52%;
  background:
    radial-gradient(60% 90% at 20% 100%, #4c7d33 60%, transparent 61%),
    radial-gradient(50% 80% at 70% 100%, #3f6b2b 60%, transparent 61%),
    radial-gradient(40% 70% at 95% 100%, #5b8f3c 60%, transparent 61%);
}
.actionbar { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); white-space: nowrap; font-size: clamp(9px, 1vw, 13px); color: #ddd; text-shadow: 1px 1px 0 #222; }
.actionbar span { color: #ffaa00; }
.scene--takeback { display: grid; place-items: center; background: rgba(10, 12, 20, 0.6); }
.inv { background: #c6c6c6; padding: 10px; box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #555; outline: 2px solid #000; }
.inv__title { color: #404040; font-size: clamp(10px, 1vw, 13px); margin: 0 0 8px 2px; }
.inv__grid { display: grid; grid-template-columns: repeat(9, clamp(18px, 2.4vw, 30px)); gap: 2px; }
.inv__grid i { aspect-ratio: 1; background: #8b8b8b; box-shadow: inset 1px 1px 0 #373737, inset -1px -1px 0 #fff; display: grid; place-items: center; }
.inv__grid i img { width: 80%; height: 80%; image-rendering: pixelated; }
.inv__grid i.on { background: #5fbf5f; }

/* ---------- Modifiers table (corner-bracketed, after United Carriers) ---------- */
.mods__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.mods__grid .section-head { margin-bottom: 0; }
.table { position: relative; border-top: 1px solid var(--line); }
.table::before, .table::after { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid var(--ink); }
.table::before { top: -4px; left: -4px; border-width: 1px 0 0 1px; }
.table::after { bottom: -4px; right: -4px; border-width: 0 1px 1px 0; }
.table__row {
  display: grid; grid-template-columns: minmax(140px, 1.1fr) 64px minmax(0, 2fr); gap: 20px; align-items: baseline;
  padding: clamp(9px, 1.6vh, 15px) 4px; border-bottom: 1px solid var(--line);
  transition: background-color 0.25s var(--ease-out), padding 0.35s var(--ease-out);
}
.table__row:not(.table__row--head):hover { background: var(--paper-2); padding-inline: 14px; }
.table__row--head { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); padding-block: 10px; }
.table__row > span:last-child { color: var(--ink-2); font-size: 15.5px; }
.mod {
  font-family: var(--f-display); font-stretch: 118%; font-weight: 800; text-transform: uppercase; font-size: clamp(16px, min(1.7vw, 2.6vh), 22px); line-height: 1.1;
  background: linear-gradient(90deg, var(--a, var(--ink)), var(--b, var(--ink))); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mod--rainbow { background-image: linear-gradient(90deg, #ff4d6d, #ffb020, #3ddc84, #3aa0ff, #b26bff); }
.table .num { font-family: var(--f-mono); font-size: 13px; color: var(--ink); }

/* ---------- Powerups ---------- */
.powerups { background: var(--night); color: #fff; }
.pu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.pu { background: var(--night); padding: clamp(18px, 2.6vh, 32px) clamp(20px, 2.4vw, 34px); display: grid; gap: 12px; align-content: start; grid-template-rows: auto auto 1fr auto; }
.pu__icon { width: 56px; height: 56px; image-rendering: pixelated; margin-bottom: 6px; transition: transform 0.6s var(--ease-out); }
.pu:hover .pu__icon { transform: translateY(-4px) rotate(-4deg); }
.pu h3 { font-family: var(--f-display); font-stretch: 118%; font-weight: 800; font-size: 22px; text-transform: uppercase; }
.pu p { color: rgba(255, 255, 255, 0.66); font-size: 15px; }
.pu__foot { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
/* a crafting grid in the game's own slot style */
.recipe { display: grid; grid-template-columns: repeat(3, 26px); gap: 2px; flex: none; padding: 3px; background: rgba(255, 255, 255, 0.04); border-radius: 2px; }
.recipe i { width: 26px; height: 26px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), inset -1px -1px 0 rgba(255, 255, 255, 0.08); }
.recipe img { width: 20px; height: 20px; image-rendering: pixelated; }
.pu .pu__key { color: rgba(255, 255, 255, 0.45); font-size: 10px; }

/* ---------- Creators ---------- */
.creators__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { background: #fff; border-radius: 4px; padding: 24px 22px 28px; display: grid; gap: 10px; align-content: start; transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.feature:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(12, 14, 20, 0.35); }
.feature .label { color: var(--atmo); }
.feature h3 { font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: 21px; line-height: 1.15; }
.feature p { color: var(--ink-2); font-size: 15px; }

/* ---------- The Great Reset ---------- */
.reset { background: #0a0204; color: #fff; }
.reset__vignette { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, transparent 30%, rgba(176, 0, 0, 0.6) 100%); }
.reset__inner { display: grid; justify-items: center; text-align: center; gap: 22px; }
.reset__label { color: #ff6b6b; }
.reset__title {
  position: relative; font-family: var(--f-display); font-stretch: 125%; font-weight: 900; text-transform: uppercase;
  font-size: clamp(40px, min(9vw, 16vh), 150px); line-height: 0.92; letter-spacing: -0.01em;
  background: linear-gradient(90deg, #7f1d1d, #ef4444 70%, #ff9a9a); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.reset__title::before, .reset__title::after { content: attr(data-glitch); position: absolute; inset: 0; pointer-events: none; -webkit-text-fill-color: transparent; background: none; }
.reset__title::before { text-shadow: -3px 0 rgba(255, 0, 48, 0.7); clip-path: inset(var(--g1, 0) 0 var(--g2, 100%) 0); transform: translateX(var(--gx, 0)); }
.reset__title::after { text-shadow: 3px 0 rgba(0, 229, 255, 0.55); clip-path: inset(var(--g3, 100%) 0 var(--g4, 0) 0); transform: translateX(calc(var(--gx, 0) * -1)); }
.reset__coords { color: #ffd24a; font-variant-numeric: tabular-nums; font-size: 12px; }
.reset__copy { max-width: 52ch; color: rgba(255, 255, 255, 0.7); }

/* ---------- Apply ---------- */
.apply__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.apply__intro { display: grid; gap: 18px; }
.apply__intro .label { color: var(--ink-2); }
.apply__intro > p:not(.label) { color: var(--ink-2); max-width: 44ch; }
.apply__notes { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.apply__notes li { padding-left: 18px; position: relative; color: var(--ink-2); font-size: 15px; }
.apply__notes li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; background: var(--amber); }

.form-card { background: #fff; border-radius: 6px; padding: clamp(22px, 3vw, 36px); box-shadow: 0 30px 60px -48px rgba(12, 14, 20, 0.5); }
.progress { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.progress li { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--mute); display: grid; gap: 8px; }
.progress li::before { content: ""; height: 3px; background: var(--paper-2); border-radius: 2px; transition: background-color 0.4s var(--ease-out); }
.progress li.is-done::before, .progress li.is-current::before { background: var(--ink); }
.progress li.is-current { color: var(--ink); }

.form-step { border: 0; margin: 0; padding: 0; display: none; gap: 18px; min-width: 0; }
.form-step.is-current { display: grid; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field label, .field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field__opt { font-weight: 400; color: var(--mute); margin-left: 6px; font-size: 13px; }
.field__hint { font-size: 12.5px; color: var(--mute); }
.field.is-invalid .field__hint:not(:has([data-count])) { display: none; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1px solid transparent; border-radius: 4px; padding: 11px 13px;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  color-scheme: light;
}
.field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.field input:hover, .field select:hover, .field textarea:hover { background: var(--paper-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(49, 86, 255, 0.15); }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--danger); background: #fff5f5; }
.field__error { font-size: 12.5px; color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; height: 36px; padding-inline: 14px; border-radius: 999px; background: var(--paper); font-size: 14px; color: var(--ink-2); transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out); }
.chip:hover span { background: var(--paper-2); }
.chip input:checked + span { background: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--atmo); outline-offset: 2px; }
.field.is-invalid .chip span { box-shadow: inset 0 0 0 1px var(--danger); }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); color-scheme: light; }
.check.is-invalid span { color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin-top: 18px; padding: 12px 14px; border-radius: 4px; background: #fff1f1; color: #9b1c1f; font-size: 14px; }
.form-nav { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 24px; }
.form-nav [data-action="back"] { margin-right: auto; }
.form-done { display: grid; gap: 12px; padding-block: 24px; }
.form-done .label { color: #2f7d3a; }
.form-done h3 { font-family: var(--f-display); font-stretch: 118%; font-weight: 800; font-size: 34px; text-transform: uppercase; }
.form-done p:not(.label) { color: var(--ink-2); }

/* ---------- Footer panel ---------- */
.footer { background: var(--void); color: rgba(255, 255, 255, 0.7); }
.footer__inner { margin-block: auto 0; padding-bottom: 0; display: grid; gap: clamp(32px, 7vh, 100px); }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; font-size: 15px; }
.footer__cols .label { color: rgba(255, 255, 255, 0.45); margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__word {
  font-family: var(--f-display); font-stretch: 125%; font-weight: 900; text-transform: uppercase; white-space: nowrap;
  font-size: clamp(56px, min(15vw, 26vh), 240px); line-height: 0.8; letter-spacing: -0.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.24);
  height: 0.7em; overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .creators__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
  .pu-grid { grid-template-columns: 1fr; }
  .pu { grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: none; column-gap: 20px; }
  .pu > * { grid-column: 2; }
  .pu__icon { grid-column: 1; grid-row: 1 / span 3; }
  .apply__grid, .mods__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cycle__top, .premise__grid { grid-template-columns: 1fr; }
  .cycle .screen { justify-self: stretch; max-height: none; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .hero__meta { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { --nav-w: 100%; }
  .nav__links { gap: 12px; }
  .nav__links a { font-size: 10.5px; }
  .nav__links a:not(.nav__apply):nth-child(1) { display: none; }
  .table__row { grid-template-columns: minmax(0, 1fr) 56px; gap: 4px 12px; }
  .table__row > span:last-child { grid-column: 1 / -1; }
  .table__row--head > span:last-child { display: none; }
  .creators__grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; }
  .mini-cards { gap: 6px; }
  .pager { display: none; }
}
@media (max-height: 740px) and (min-width: 861px) {
  .powerups .section-head__lede { display: none; }
  .pu { gap: 8px; }
  .pu__icon { width: 44px; height: 44px; margin-bottom: 2px; }
  .phase__text { font-size: 13.5px; }
}
@media (max-height: 620px) {
  .hero__meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* ---------- Legal pages: a normal scrolling page with a contents rail ---------- */
.doc-page { background: var(--paper); color: var(--ink); overflow-x: clip; }
.doc { padding-top: calc(var(--nav-space) + clamp(24px, 6vh, 64px)); padding-bottom: clamp(64px, 10vh, 120px); }
.doc__head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(40px, 7vh, 80px); }
.doc__lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.45; color: var(--ink-2); max-width: 54ch; }
.doc__meta { font-family: var(--f-mono); font-size: 12px; color: var(--mute); }
.doc__layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.doc__toc { position: sticky; top: calc(var(--nav-space) + 8px); }
.doc__toc-title { font-family: var(--f-mono); font-size: 12px; color: var(--mute); margin-bottom: 12px; }
.doc__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.doc__toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; text-decoration: none; color: var(--ink-2); font-size: 14.5px; transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out); }
.doc__toc a:hover { color: var(--ink); border-left-color: var(--ink); }
.doc__body { max-width: 68ch; display: grid; gap: clamp(36px, 5vh, 52px); }
.doc__body section { display: grid; gap: 14px; scroll-margin-top: calc(var(--nav-space) + 16px); }
.doc__body h2 { font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: clamp(21px, 2vw, 26px); line-height: 1.2; }
.doc__body p, .doc__body li { color: var(--ink-2); line-height: 1.65; }
.doc__body strong { color: var(--ink); font-weight: 600; }
.doc__body ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.doc__body li::marker { color: var(--mute); }
.doc__body a, .doc-footer a, .form-legal a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mute); text-underline-offset: 3px; }
.doc__body a:hover, .form-legal a:hover { text-decoration-color: var(--ink); }
.is-missing { background: #fff1c2; color: #6b4e00; padding: 0 4px; border-radius: 2px; outline: 1px dashed #c9a227; cursor: help; }
.doc-footer { background: var(--void); color: rgba(255, 255, 255, 0.6); padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.doc-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.doc-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 20px; }
.doc-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.doc-footer a:hover { color: #fff; }
.form-legal { font-size: 13px; color: var(--mute); }
@media (max-width: 860px) {
  .doc__layout { grid-template-columns: 1fr; }
  .doc__toc { position: static; }
}

/* ---------- Download and admin pages ---------- */
.dl__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.dl__main { display: grid; gap: 22px; }
.dl__form, .dl__done { display: grid; gap: 10px; max-width: 460px; background: #fff; border-radius: 6px; padding: clamp(20px, 3vw, 32px); box-shadow: 0 30px 60px -48px rgba(12, 14, 20, 0.5); }
.dl__form label { font-size: 14px; font-weight: 600; }
.dl__code {
  width: 100%; font-family: var(--f-mono); font-size: clamp(18px, 2.2vw, 22px); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: var(--paper); border: 1px solid transparent; border-radius: 4px; padding: 14px 16px; color-scheme: light;
}
.dl__code:focus { outline: none; background: #fff; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(49, 86, 255, 0.15); }
.dl__form .btn { justify-self: start; margin-top: 6px; }
.dl__done-title { font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: 22px; color: #2f7d3a; }
.dl__done p:not(.dl__done-title) { color: var(--ink-2); }
.dl__done a { color: var(--ink); text-underline-offset: 3px; }
.dl__side { display: grid; gap: 14px; padding-top: 8px; }
.dl__side h2 { font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: 20px; }
.dl__side h2 + * { margin-bottom: 14px; }
.dl__steps, .dl__notes { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--ink-2); line-height: 1.55; }
.dl__side code { font-family: var(--f-mono); font-size: 0.86em; background: var(--paper-2); padding: 1px 5px; border-radius: 3px; }
.adm { display: grid; gap: 24px; max-width: 980px; }
.adm__card { background: #fff; border-radius: 6px; padding: clamp(20px, 3vw, 28px); display: grid; gap: 14px; }
.adm__card h2 { font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: 20px; }
.adm__card > label { font-size: 14px; font-weight: 600; }
.adm__row { display: flex; gap: 10px; }
.adm__row input, .adm .field input { flex: 1; font: inherit; font-size: 16px; background: var(--paper); border: 1px solid transparent; border-radius: 4px; padding: 11px 13px; color-scheme: light; }
.adm__row input:focus, .adm .field input:focus { outline: none; background: #fff; border-color: var(--ink); }
.adm__panel { display: grid; gap: 24px; }
.adm__panel .btn--dark { justify-self: start; }
.adm__code { font-family: var(--f-mono); font-size: 26px; letter-spacing: 0.1em; background: var(--paper); padding: 14px 16px; border-radius: 4px; user-select: all; }
.adm__head { display: flex; justify-content: space-between; align-items: center; }
.adm__table-wrap { overflow-x: auto; }
.adm__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm__table th { text-align: left; font-family: var(--f-mono); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--mute); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.adm__table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; white-space: nowrap; }
.adm__table td:last-child { text-align: right; padding-right: 0; }
.adm__table .btn { padding: 0; min-height: 0; height: auto; }
.adm__table .btn + .btn { margin-left: 14px; }
.adm__warn { color: var(--danger); }
.adm .field__hint code { font-family: var(--f-mono); font-size: 0.86em; background: var(--paper); padding: 1px 5px; border-radius: 3px; }
@media (max-width: 860px) {
  .dl__grid { grid-template-columns: 1fr; }
  .adm__row { flex-direction: column; }
}
