/* CodePixel Labs — shared styles.
   Home and legal pages sit on warm paper; each game page swaps the tokens for its own palette. */

@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --paper: #efebe2;
  --paper-2: #e5e0d4;
  --paper-3: #d9d3c4;
  --ink: #15130f;
  --ink-2: #47433a;
  --ink-3: #6b6558;
  --rule: rgba(21, 19, 15, 0.14);
  --rule-strong: rgba(21, 19, 15, 0.32);
  --accent: #ff4a1c;
  --accent-ink: #c2320c;
  --night: #0d0f12;
  --night-2: #16191e;
  --on-night: #ece8df;
  --on-night-2: #a7a397;
  --live: #3ddc84;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --pad: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --gap: clamp(16px, 2vw, 24px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.04em; line-height: 1.5; }
.label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font-family: var(--mono); font-size: 13px; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ top bar */
.bar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.bar.is-stuck { border-bottom-color: var(--rule); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: inherit; }
.brand svg { width: 22px; height: 22px; flex: none; }
.brand .llc { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.06em; color: var(--ink-3); margin-left: 2px; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav a { text-decoration: none; font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 560px) { .brand .llc { display: none; } .nav .opt { display: none; } }

/* ------------------------------------------------------------------ buttons */
.btn {
  --b: var(--ink); --f: var(--paper);
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px 14px 22px;
  background: var(--b); color: var(--f);
  border: 1px solid var(--b); border-radius: 2px;
  font-family: var(--mono); font-size: 13.5px; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn .arr { display: inline-block; transition: transform 0.3s var(--ease); }
.btn:hover { color: var(--f); background: var(--accent); border-color: var(--accent); }
.btn:hover .arr { transform: translateX(4px); }
.btn:hover .arr.ne { transform: translate(3px, -3px); }
.btn.ghost { background: transparent; color: var(--b); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--b); background: transparent; color: var(--b); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 70% 40%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.hero-copy { padding-top: 8px; }
.hero-copy .label { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.hero-copy .label::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.hero h1 {
  font-size: clamp(2.35rem, 4.6vw, 4.35rem);
  font-weight: 650;
  font-stretch: 92%;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 28px;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; font-stretch: 125%; font-weight: 800; letter-spacing: -0.045em; }
.hero .lede { font-size: 18px; color: var(--ink-2); max-width: 36em; margin-bottom: 32px; }
.hero .lede a { color: var(--ink); }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.2rem, 8.4vw, 3.6rem); }
}

/* the two games, laid on the hero like prints on a desk */
.showcase { position: relative; padding-bottom: 22%; }
.show { position: relative; display: block; overflow: hidden; border-radius: 4px; text-decoration: none; color: #fff; background: #111; box-shadow: 0 0 0 1px rgba(21,19,15,0.85), 0 34px 70px -30px rgba(21,19,15,0.6); }
.show img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.9s var(--ease); }
.show:hover img { transform: scale(1.035); }
.show:hover { color: #fff; }
.show-descent { width: 88%; margin-left: auto; }
.show-otd { position: absolute; left: 0; bottom: 0; width: 56%; box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px rgba(21,19,15,0.2), 0 34px 70px -24px rgba(21,19,15,0.65); }
.show-go { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; display: grid; place-items: center; background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: 16px; border-radius: 2px; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s var(--ease); }
.show:hover .show-go, .show:focus-visible .show-go { opacity: 1; transform: none; }
.show-descent img { aspect-ratio: 1360 / 690; object-position: top; }
@media (max-width: 980px) { .showcase { margin-top: 12px; } }
@media (max-width: 560px) {
  .showcase { padding-bottom: 0; display: grid; gap: 14px; }
  .show-descent, .show-otd { position: relative; width: 100%; box-shadow: 0 0 0 1px rgba(21,19,15,0.85), 0 24px 50px -24px rgba(21,19,15,0.6); }
  .show-otd { order: -1; }
}

/* ------------------------------------------------------------------ section headings */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.sec-head { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 0 var(--gap); align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head .label { padding-bottom: 8px; }
.sec-head h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-stretch: 110%; font-weight: 750; letter-spacing: -0.035em; text-wrap: balance; }
.sec-head p { grid-column: 2; margin-top: 18px; max-width: 40em; color: var(--ink-2); }
@media (max-width: 760px) { .sec-head { grid-template-columns: 1fr; } .sec-head p { grid-column: 1; } }

/* ------------------------------------------------------------------ game plates (home) */
.plate { position: relative; color: var(--on-night); background: var(--night); overflow: hidden; isolation: isolate; }
.plate + .plate { border-top: 1px solid rgba(255,255,255,0.06); }
.plate .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); padding-top: clamp(56px, 8vw, 112px); padding-bottom: clamp(56px, 8vw, 112px); align-items: center; }
.plate.flip .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.plate.flip .plate-copy { order: 2; }
.plate .label { color: var(--on-night-2); display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.plate .label b { font-weight: 400; color: var(--pc, #fff); }
.plate h3 { font-size: clamp(2.6rem, 6vw, 5.2rem); font-stretch: 125%; font-weight: 850; letter-spacing: -0.045em; line-height: 0.92; margin-bottom: 26px; }
.plate h3 small { display: block; font-size: 0.34em; font-stretch: 100%; font-weight: 500; letter-spacing: -0.01em; color: var(--on-night-2); margin-top: 14px; line-height: 1.25; }
.plate p { color: #cfcbc0; font-size: 16.5px; max-width: 34em; }
.plate .btn { --b: var(--pc); --f: #111; }
.plate .btn.ghost { --b: var(--on-night); }
.plate .btn:hover { background: #fff; border-color: #fff; color: #111; }
.plate .btn.ghost:hover { background: transparent; color: #fff; border-color: #fff; }
.specs { margin: 28px 0 32px; display: grid; grid-template-columns: max-content 1fr; gap: 0; border-top: 1px solid rgba(255,255,255,0.12); font-size: 14.5px; }
.specs dt, .specs dd { margin: 0; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.specs dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-night-2); padding-right: 22px; padding-top: 11px; }
.specs dd { color: var(--on-night); }
@media (max-width: 980px) {
  .plate .wrap, .plate.flip .wrap { grid-template-columns: 1fr; }
  .plate.flip .plate-copy { order: 0; }
}

/* On The Dot plate */
.plate.otd { --pc: #ffd166; background: radial-gradient(120% 90% at 78% 50%, #10303a 0%, #0b1a20 45%, #07090c 100%); }
.plate.otd .media { position: relative; }
.plate.otd .screen { position: relative; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 40px 80px -30px rgba(0,0,0,0.8); background: #0b1418; aspect-ratio: 1; width: min(100%, 560px); margin-left: auto; margin-right: 12%; }
.plate.otd .screen video, .plate.otd .screen img { width: 100%; height: 100%; object-fit: cover; }
.plate.otd .phone-card { position: absolute; right: 0; bottom: -34px; width: 28%; min-width: 120px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 6px #050608, 0 0 0 7px rgba(255,255,255,0.14), 0 30px 60px rgba(0,0,0,0.6); }
.ring-deco { position: absolute; right: -18vw; top: 50%; width: 60vw; aspect-ratio: 1; transform: translateY(-50%); border-radius: 50%; border: 1px solid rgba(63, 208, 232, 0.12); z-index: -1; pointer-events: none; }
.ring-deco::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; border: 1px solid rgba(63, 208, 232, 0.08); }
@media (max-width: 980px) { .plate.otd .phone-card { right: 8px; bottom: -24px; width: 30%; } .plate.otd .media { margin-bottom: 24px; } }

/* Descent Inc. plate */
.plate.descent { --pc: #ff9b3d; background: linear-gradient(180deg, #1c1531 0%, #211a36 28%, #2a2433 29%, #262a3c 52%, #2c2618 76%, #150f0c 100%); }
.plate.descent .media { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: auto auto; gap: 12px; }
.plate.descent .media figure { margin: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 30px 60px -24px rgba(0,0,0,0.75); }
.plate.descent .media .a { grid-column: 1 / 7; }
.plate.descent .media .b { grid-column: 1 / 3; }
.plate.descent .media .c { grid-column: 3 / 7; }
.plate.descent .media img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.plate.descent .media .b img { aspect-ratio: auto; object-position: 50% 62%; }

/* ------------------------------------------------------------------ apps */
.app-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--gap); }
.app { display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(20px, 3vw, 40px); padding: 32px 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); align-items: start; }
.app img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 0 0 1px var(--rule), 0 14px 30px -12px rgba(21,19,15,0.45); }
.app h3 { font-size: 30px; font-stretch: 110%; font-weight: 750; margin-bottom: 10px; }
.app p { color: var(--ink-2); }
.app .specs { margin: 0; border-top-color: var(--rule); }
.app .specs dt, .app .specs dd { border-bottom-color: var(--rule); }
.app .specs dt { color: var(--ink-3); }
.app .specs dd { color: var(--ink); }
@media (max-width: 900px) { .app-row { grid-template-columns: 1fr; } .app { grid-template-columns: 72px minmax(0, 1fr); } .app img { width: 72px; height: 72px; border-radius: 17px; } .app .specs { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ contact + footer */
.contact { background: var(--ink); color: var(--paper); }
.contact .wrap { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(56px, 8vw, 96px); display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--gap); }
.contact .label { color: #9a9486; }
.contact h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); font-stretch: 110%; font-weight: 700; letter-spacing: -0.035em; margin-bottom: 26px; max-width: 16em; text-wrap: balance; }
.contact p { color: #bdb7a9; max-width: 36em; }
.mail { display: inline-block; margin: 8px 0 28px; font-family: var(--display); font-size: clamp(1.35rem, 3.4vw, 2.6rem); font-stretch: 105%; font-weight: 500; letter-spacing: -0.02em; color: var(--paper); text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 4px; overflow-wrap: anywhere; }
.mail:hover { color: var(--accent); }
@media (max-width: 760px) { .contact .wrap { grid-template-columns: 1fr; } }

.foot { background: var(--ink); color: #9a9486; border-top: 1px solid rgba(255,255,255,0.09); font-size: 13.5px; }
.foot .wrap { display: grid; grid-template-columns: 180px repeat(3, minmax(0, 1fr)); gap: 24px var(--gap); padding-top: 36px; padding-bottom: 40px; }
.foot h4 { font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #6f6a5f; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 4px 0; }
.foot a { color: #d9d4c8; text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot .brand { color: var(--paper); }
.foot .fine { grid-column: 2 / -1; border-top: 1px solid rgba(255,255,255,0.09); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-family: var(--mono); font-size: 11.5px; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr 1fr; } .foot .fine, .foot .brand-col { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ reveal on scroll */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .rise { opacity: 1; transform: none; transition: none; } }

/* ================================================================== game pages */
.game { --g-bg: #07090c; --g-ink: #ece8df; --g-ink-2: #a7a397; --g-rule: rgba(255,255,255,0.12); --g-accent: #ffd166; background: var(--g-bg); color: var(--g-ink); color-scheme: dark; }
.game ::selection { background: var(--g-accent); color: #111; }
.game .bar { background: color-mix(in srgb, var(--g-bg) 82%, transparent); }
.game .bar.is-stuck { border-bottom-color: var(--g-rule); }
.game .brand .llc, .game .nav a { color: var(--g-ink-2); }
.game .nav a:hover, .game .nav a[aria-current="page"] { color: var(--g-ink); }
.game a:hover { color: var(--g-accent); }
.game .label { color: var(--g-ink-2); }
.game .btn { --b: var(--g-accent); --f: #111; }
.game .btn:hover { background: #fff; border-color: #fff; color: #111; }
.game .btn.ghost { --b: var(--g-ink); background: transparent; color: var(--g-ink); border-color: var(--g-rule); }
.game .btn.ghost:hover { border-color: var(--g-ink); color: var(--g-ink); }
.game .sec-head p { color: var(--g-ink-2); }
.game .foot, .game .contact { background: #050608; }

.crumbs { font-family: var(--mono); font-size: 12px; color: var(--g-ink-2); margin-bottom: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { text-decoration: none; color: var(--g-ink-2); }
.crumbs a:hover { color: var(--g-ink); }

.g-hero { position: relative; padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.g-hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.g-hero h1 { font-size: clamp(3rem, 9vw, 8.4rem); font-stretch: 125%; font-weight: 850; letter-spacing: -0.05em; line-height: 0.86; margin-bottom: 28px; }
.g-hero .lede { font-size: clamp(17px, 1.6vw, 20px); color: #d8d4c9; max-width: 32em; margin-bottom: 30px; }
.g-hero .specs { max-width: 560px; margin-top: 36px; border-top-color: var(--g-rule); }
.g-hero .specs dt, .g-hero .specs dd { border-bottom-color: var(--g-rule); }
@media (max-width: 980px) { .g-hero-grid { grid-template-columns: 1fr; } }

.shot { margin: 0; border-radius: 6px; overflow: hidden; background: #000; box-shadow: 0 0 0 1px var(--g-rule), 0 40px 80px -36px rgba(0,0,0,0.9); }
.shot img, .shot video { width: 100%; }
figcaption, .cap { font-family: var(--mono); font-size: 12px; color: var(--g-ink-2); margin-top: 12px; line-height: 1.5; }
figure { margin: 0; }

.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.two.wide-l { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.two.wide-r { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.prose { font-size: 17px; color: #d3cfc4; max-width: 36em; }
.prose h3 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-stretch: 110%; font-weight: 750; color: var(--g-ink); margin-bottom: 18px; letter-spacing: -0.03em; }
.prose strong { color: var(--g-ink); font-weight: 600; }
@media (max-width: 900px) { .two, .two.wide-l, .two.wide-r { grid-template-columns: minmax(0, 1fr); } }

.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); border-top: 1px solid var(--g-rule); border-left: 1px solid var(--g-rule); }
.mode { padding: 22px 22px 26px; border-right: 1px solid var(--g-rule); border-bottom: 1px solid var(--g-rule); position: relative; }
.mode .fam { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mc, var(--g-ink-2)); }
.mode h3 { font-size: 22px; font-stretch: 110%; font-weight: 700; margin: 10px 0 8px; letter-spacing: -0.02em; }
.mode p { font-size: 15px; color: var(--g-ink-2); margin: 0; }
.mode::before { content: ""; position: absolute; left: -1px; top: -1px; width: 3px; height: 28px; background: var(--mc, transparent); }

.arch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--g-rule); }
.arch > div { padding: 24px; border-right: 1px solid var(--g-rule); position: relative; }
.arch > div:last-child { border-right: 0; }
.arch h4 { font-family: var(--mono); font-weight: 500; font-size: 13px; letter-spacing: 0.02em; color: var(--g-accent); margin-bottom: 12px; }
.arch ul { margin: 0; padding: 0; list-style: none; font-size: 14.5px; color: #cfcbc0; }
.arch li { padding: 6px 0; border-top: 1px dashed var(--g-rule); }
.arch li:first-child { border-top: 0; }
.arch code { font-family: var(--mono); font-size: 12.5px; color: var(--g-ink); }
.arch > div:not(:last-child)::after { content: "⇄"; position: absolute; right: -13px; top: 22px; width: 24px; height: 24px; display: grid; place-items: center; background: var(--g-bg); color: var(--g-ink-2); font-size: 14px; z-index: 1; }
@media (max-width: 820px) { .arch { grid-template-columns: 1fr; } .arch > div { border-right: 0; border-bottom: 1px solid var(--g-rule); } .arch > div:last-child { border-bottom: 0; } .arch > div:not(:last-child)::after { content: "⇅"; right: auto; left: 22px; top: auto; bottom: -13px; } }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--g-rule); }
.facts div { padding: 22px 16px 0 0; }
.facts b { display: block; font-family: var(--display); font-size: clamp(2rem, 4vw, 3.2rem); font-stretch: 115%; font-weight: 750; letter-spacing: -0.04em; line-height: 1; color: var(--g-ink); font-variant-numeric: tabular-nums; }
.facts span { display: block; margin-top: 10px; font-size: 14px; color: var(--g-ink-2); max-width: 17em; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; } }

.next-game { display: block; text-decoration: none; border-top: 1px solid var(--g-rule); padding: clamp(40px, 6vw, 72px) 0; }
.next-game .label { display: block; margin-bottom: 12px; }
.next-game b { display: block; font-family: var(--display); font-size: clamp(2.4rem, 7vw, 6rem); font-stretch: 125%; font-weight: 850; letter-spacing: -0.05em; line-height: 0.9; transition: color 0.25s; }
.next-game:hover b { color: var(--g-accent); }
.next-game .arr { display: inline-block; transition: transform 0.35s var(--ease); }
.next-game:hover .arr { transform: translateX(10px); }

/* ---------------------------------------------------------------- On The Dot page */
.t-otd { --g-bg: #080b0e; --g-accent: #ffd166; --g-cyan: #3fd0e8; }
.t-otd .g-hero { background: radial-gradient(90% 90% at 75% 45%, #0f2c35 0%, #0a171c 42%, #080b0e 80%); }
.t-otd .g-hero h1 { font-family: "Space Grotesk", var(--display); font-stretch: 100%; font-weight: 700; letter-spacing: -0.04em; }
.t-otd .g-hero h1 span { color: var(--g-accent); }
.t-otd .num { font-family: var(--mono); }

.toy { position: relative; aspect-ratio: 1; max-width: 520px; width: 100%; margin: 0 auto; border-radius: 50%; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.toy canvas { width: 100%; height: 100%; }
.toy:focus-visible { box-shadow: 0 0 0 2px var(--g-bg), 0 0 0 4px var(--g-accent); }
.toy-read { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.toy-read .digits { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: clamp(56px, 11vw, 104px); letter-spacing: -0.02em; line-height: 1; color: #f3f0e8; font-variant-numeric: tabular-nums; transition: color 0.2s; }
.toy-read .state { margin-top: 12px; font-family: "Space Grotesk", sans-serif; font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: #8a948f; min-height: 1.4em; }
.toy[data-grade="dead"] .digits { color: #ffd166; text-shadow: 0 0 28px rgba(255, 209, 102, 0.45); }
.toy[data-grade="hair"] .digits { color: #7ee2a8; }
.toy[data-grade="close"] .digits { color: #3fd0e8; }
.toy[data-grade="miss"] .digits { color: #ff6b81; }
.toy-log { display: flex; justify-content: center; gap: 22px; margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--g-ink-2); flex-wrap: wrap; text-align: center; }
.toy-log b { color: var(--g-ink); font-weight: 500; }
.toy-pips { display: flex; justify-content: center; gap: 6px; margin-top: 12px; min-height: 10px; }
.toy-pips i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.toy-pips i.dead { background: #ffd166; } .toy-pips i.hair { background: #7ee2a8; } .toy-pips i.close { background: #3fd0e8; } .toy-pips i.miss { background: #ff6b81; }

.phone { width: min(300px, 76vw); margin: 0 auto; border-radius: 34px; overflow: hidden; box-shadow: 0 0 0 9px #0a0b0d, 0 0 0 10px rgba(255,255,255,0.16), 0 50px 90px -30px rgba(0,0,0,0.9); }
.phone img { width: 100%; }
.phones { display: flex; justify-content: center; gap: clamp(20px, 4vw, 48px); flex-wrap: wrap; padding: 10px; }
.phones .phone { width: min(260px, 70vw); }
.phones .phone:nth-child(2) { transform: translateY(40px); }
@media (max-width: 620px) { .phones .phone:nth-child(2) { transform: none; } }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--mono); font-size: 12px; color: var(--g-ink-2); margin-top: 18px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }

/* ---------------------------------------------------------------- Descent Inc. page */
.t-descent { --g-bg: #140f1f; --g-accent: #ff9b3d; --g-ok: #33b36b; }
.t-descent .g-hero { background: linear-gradient(180deg, #1b1330 0%, #241a3d 55%, #2b2340 100%); }
.t-descent .g-hero h1 { color: #fff; }
.t-descent .g-hero h1 span { color: var(--g-accent); }
.strata { position: relative; }
.stratum { position: relative; background: var(--sb); border-top: 1px solid rgba(255,255,255,0.05); }
.stratum::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1.5px), radial-gradient(rgba(0,0,0,0.25) 1px, transparent 1.5px);
  background-size: 23px 19px, 31px 27px; background-position: 0 0, 11px 7px;
}
.stratum > .wrap { position: relative; }
.stratum .band-tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--so, var(--g-accent)); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.stratum .band-tag::before { content: ""; width: 10px; height: 10px; background: var(--so, var(--g-accent)); transform: rotate(45deg); box-shadow: 0 0 12px var(--so, var(--g-accent)); }

.gauge { position: fixed; right: clamp(8px, 1.6vw, 22px); top: 50%; transform: translateY(-50%); z-index: 40; width: 12px; height: min(56vh, 460px); display: flex; flex-direction: column; border-radius: 3px; overflow: visible; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.gauge.on { opacity: 1; }
.gauge i { flex: 1; background: var(--c); opacity: 0.55; border-bottom: 1px solid rgba(0,0,0,0.5); }
.gauge i:first-child { border-radius: 3px 3px 0 0; } .gauge i:last-child { border-radius: 0 0 3px 3px; }
.gauge .mark { position: absolute; left: -8px; right: -8px; height: 2px; background: #fff; top: 0; box-shadow: 0 0 10px rgba(255,255,255,0.7); transition: top 0.12s linear; }
.gauge .mark span { position: absolute; right: 26px; top: -10px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(0,0,0,0.6); padding: 2px 7px; border-radius: 2px; white-space: nowrap; color: #fff; }
@media (max-width: 700px) { .gauge .mark span { display: none; } .gauge { width: 6px; } }

.loop { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--g-rule); counter-reset: step; }
.loop li { list-style: none; padding: 22px 18px 0 0; }
.loop li::before { counter-increment: step; content: "0" counter(step); display: block; font-family: var(--mono); font-size: 12px; color: var(--g-accent); margin-bottom: 14px; }
.loop b { display: block; font-family: var(--display); font-size: 24px; font-stretch: 115%; font-weight: 750; letter-spacing: -0.02em; margin-bottom: 8px; }
.loop span { color: var(--g-ink-2); font-size: 15px; }
@media (max-width: 860px) { .loop { grid-template-columns: 1fr 1fr; row-gap: 26px; } }

.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.gallery figure:nth-child(1) { grid-column: 1 / 8; }
.gallery figure:nth-child(2) { grid-column: 8 / 13; }
.gallery figure:nth-child(3) { grid-column: 1 / 6; }
.gallery figure:nth-child(4) { grid-column: 6 / 13; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 760px) { .gallery figure { grid-column: 1 / -1 !important; } }

.quote { font-family: var(--display); font-size: clamp(1.5rem, 3.2vw, 2.6rem); font-stretch: 105%; font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; max-width: 26em; margin: 0; text-wrap: balance; }
.quote cite { display: block; margin-top: 18px; font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--g-ink-2); letter-spacing: 0.04em; }

/* ---------------------------------------------------------------- legal pages */
.legal { padding: clamp(40px, 6vw, 80px) 0 clamp(64px, 8vw, 112px); }
.legal .wrap { display: grid; grid-template-columns: 180px minmax(0, 46em); gap: var(--gap); }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-stretch: 110%; font-weight: 750; letter-spacing: -0.035em; margin-bottom: 10px; }
.legal .updated { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); margin-bottom: 36px; }
.legal h2 { font-size: 22px; font-stretch: 105%; margin: 40px 0 12px; letter-spacing: -0.015em; }
.legal h3 { font-size: 18px; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 6px; }
.legal .toc { position: sticky; top: 96px; align-self: start; font-family: var(--mono); font-size: 12.5px; }
.legal .toc a { display: block; text-decoration: none; color: var(--ink-3); padding: 4px 0; }
.legal .toc a:hover { color: var(--ink); }
@media (max-width: 860px) { .legal .wrap { grid-template-columns: 1fr; } .legal .toc { position: static; } }

/* stepped, pixel-cut edge where one layer meets the next */
.stratum::after {
  content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 16px; pointer-events: none;
  background: var(--sb);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 8h8V4h8v4h16V0h8v8h8v4h16V8h16V4h8v4h16v4h8V4h16V0h8v8h16v8H0z'/%3E%3C/svg%3E") repeat-x left bottom / 160px 16px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='16' shape-rendering='crispEdges'%3E%3Cpath d='M0 8h8V4h8v4h16V0h8v8h8v4h16V8h16V4h8v4h16v4h8V4h16V0h8v8h16v8H0z'/%3E%3C/svg%3E") repeat-x left bottom / 160px 16px;
}
.stratum { border-top: 0; }
.t-descent .g-hero h1 { font-size: clamp(3rem, 8vw, 7.2rem); }
@media (max-width: 560px) {
  .plate .label span:nth-child(2) { display: none; }
}
.phones figure { margin: 0; }
.phones figure .phone { width: min(260px, 70vw); }
.phones figure:nth-child(2) { transform: translateY(40px); }
.phones figure:nth-child(2) .phone { transform: none; }
@media (max-width: 620px) { .phones figure:nth-child(2) { transform: none; } }

@media (max-width: 620px) {
  .modes { grid-template-columns: 1fr 1fr; }
  .mode { padding: 16px 14px 18px; }
  .mode h3 { font-size: 18px; margin: 8px 0 6px; }
  .mode p { font-size: 13.5px; line-height: 1.5; }
  .phones { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; margin: 0 calc(-1 * var(--pad)); padding: 12px var(--pad) 20px; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phones > * { flex: none; scroll-snap-align: center; }
  .phones .phone, .phones figure .phone { width: 64vw; }
  .g-hero .phone { width: min(240px, 64vw); }
}

/* compact app row, aligned with the section heading's text column */
.app { grid-template-columns: 96px minmax(0, 1fr); margin-left: calc(180px + var(--gap)); max-width: 820px; }
@media (max-width: 760px) { .app { margin-left: 0; grid-template-columns: 72px minmax(0, 1fr); } }
@media (max-width: 980px) { .plate.otd .screen { margin-right: 18%; } }
.mode.feature { grid-column: 1 / -1; background: linear-gradient(90deg, rgba(255, 209, 102, 0.09), rgba(255, 209, 102, 0.02) 70%); }
.mode.feature h3 { font-size: 28px; }
.mode.feature p { max-width: 44em; font-size: 16px; color: #d8d4c9; }
@media (max-width: 620px) {
  .modes { grid-template-columns: 1fr; }
  .mode { padding: 14px 16px 16px; }
  .mode .fam { display: none; }
  .mode h3 { margin: 0 0 4px; }
  .mode p { font-size: 14.5px; }
  .g-hero .specs { display: none; }
  .phones .phone, .phones figure .phone { width: 58vw; }
  .gauge { display: none; }
  .loop { grid-template-columns: 1fr; row-gap: 0; }
  .loop li { display: grid; grid-template-columns: 34px 1fr; padding: 14px 0; border-bottom: 1px solid var(--g-rule); }
  .loop li::before { margin: 6px 0 0; grid-row: 1 / 3; }
  .loop b { font-size: 20px; margin-bottom: 2px; }
}
