/* Sharp public site. Tokens mirror the launcher (teralaunch/src/tokens.css) with a green accent; layout follows a long-form
   chapter page: centered logo hero, chapter bar, prose chapters beside screenshots, requirements table. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/inter-latin-800-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --background: #141922;
  --foreground: #f0f2f5;
  --primary: #22c55e;
  --primary-foreground: #141922;
  --primary-soft: rgba(34, 197, 94, 0.12);
  --muted: #2a303c;
  --muted-foreground: #8b92a0;
  --body-text: #c3c9d4;
  --border: #3a4555;
  --hairline: rgba(255, 255, 255, 0.09);
  --card: #1a1f2a;
  --popover: #161b24;
  --ink: 6, 9, 14;
  --emerald-400: #34d399;
  --amber-400: #fbbf24;
  --red-400: #f87171;
  --radius: 8px;
  --radius-panel: 16px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --maxw: 1160px;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 56px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--background); color: var(--foreground);
  font-family: var(--font); font-size: 16px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--primary); color: var(--primary-foreground); border-radius: var(--radius); font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: min(var(--maxw), calc(100% - 32px)); margin-inline: auto; }
.prose p + p { margin-top: 14px; }
.prose p, .lead { color: var(--body-text); }
.prose a, .inline-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--primary); }
.muted { color: var(--muted-foreground); }

/* ---------- Header ---------- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(var(--ink), 0.85), rgba(var(--ink), 0));
  transition: background 0.25s, border-color 0.25s;
  border-bottom: 1px solid transparent;
}
.site-nav.solid {
  background: rgba(var(--ink), 0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
/* No backdrop-filter while the mobile panel is open: it would make the header the containing block of the fixed panel. */
.site-nav.open { background: rgb(8, 11, 17); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--hairline); }
.site-nav .wrap { display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; transition: opacity 0.25s; }
.brand img { width: 70px; height: auto; }
.brand b { font-weight: 800; letter-spacing: 0.24em; font-size: 14px; color: var(--primary); }
.home .site-nav:not(.solid):not(.open) .brand { opacity: 0; pointer-events: none; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > li > a, .nav-links > li > button {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #d5dae3; background: none; border: 0; border-radius: var(--radius); cursor: pointer; transition: color 0.15s, background 0.15s;
}
.nav-links > li > a:hover, .nav-links > li > button:hover, .nav-links > li > button[aria-expanded="true"] { color: var(--foreground); background: rgba(255, 255, 255, 0.06); }
.nav-links a[aria-current="page"] { color: var(--primary); }
.nav-links a[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.nav-links a[aria-disabled="true"]::after { content: "soon"; font-size: 10px; letter-spacing: 0.08em; padding: 1px 6px; border-radius: 99px; background: var(--muted); color: var(--muted-foreground); }
.chev { width: 12px; height: 12px; transition: transform 0.2s; }
[aria-expanded="true"] > .chev { transform: rotate(180deg); }
.has-menu { position: relative; }
.menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 8px;
  background: var(--popover); border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.menu a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--body-text); }
.menu a:hover { background: rgba(255, 255, 255, 0.06); color: var(--foreground); }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-actions .text-link { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #d5dae3; padding: 0 8px; }
.nav-actions .text-link:hover { color: var(--foreground); }
.burger {
  display: none; width: 42px; height: 42px; border-radius: var(--radius); border: 1px solid var(--border);
  background: rgba(var(--ink), 0.5); cursor: pointer; place-items: center;
}
.burger svg { width: 20px; height: 20px; }
.burger .x { display: none; }
.site-nav.open .burger .x { display: block; }
.site-nav.open .burger .bars { display: none; }
.mobile-panel { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 22px; border-radius: var(--radius);
  font: inherit; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
  border: 1px solid var(--border); background: rgba(var(--ink), 0.55); color: var(--foreground);
  cursor: pointer; transition: transform 0.12s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { border-color: var(--primary); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.btn.primary:hover { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2), 0 8px 30px rgba(34, 197, 94, 0.28); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { border-color: var(--border); }
.btn.sm { height: 38px; padding: 0 16px; font-size: 12px; }
.btn.lg { height: 58px; padding: 0 36px; font-size: 15px; }
.btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-note { display: block; margin-top: 10px; font-size: 13px; color: var(--muted-foreground); }

/* ---------- Home hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: calc(var(--nav-h) + 24px) 0 72px; isolation: isolate; overflow: hidden;
}
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.6s ease, transform 9s linear; }
.hero-art img.on { opacity: 1; transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(var(--ink), 0.15), rgba(var(--ink), 0.7) 100%),
    linear-gradient(180deg, rgba(var(--ink), 0.55) 0%, rgba(var(--ink), 0) 28%, rgba(20, 25, 34, 0) 62%, var(--background) 100%);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(460px, 78vw); height: auto; filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.7)); }
.hero-plate {
  display: flex; align-items: center; gap: 16px; margin-top: 6px;
  font-size: clamp(16px, 2.4vw, 22px); font-weight: 800; letter-spacing: 0.6em; padding-left: 0.6em; color: var(--primary);
  text-shadow: 0 0 24px rgba(34, 197, 94, 0.45);
}
.hero-plate::before, .hero-plate::after { content: ""; width: clamp(28px, 7vw, 70px); height: 1px; background: linear-gradient(90deg, transparent, var(--primary)); }
.hero-plate::after { transform: scaleX(-1); }
.hero h1 { margin-top: 28px; font-size: clamp(17px, 2.2vw, 20px); font-weight: 500; color: #dfe4ec; max-width: 40ch; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.hero-status { margin-top: 44px; }
.hero-status h2 { font-size: clamp(22px, 3.4vw, 34px); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8); }
.hero-status p { margin-top: 8px; color: #dfe4ec; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }
.hero .cta { justify-content: center; margin-top: 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.cta.center { justify-content: center; }
.cta.after-list { margin-top: 28px; }
.more-link { margin-top: 24px; }
.live {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center;
  padding: 8px 16px; border: 1px solid var(--hairline); border-radius: 99px;
  background: rgba(var(--ink), 0.6); font-size: 13px;
}
.live span { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-foreground); }
.dot.on { background: var(--emerald-400); animation: ping 2s infinite; }
.dot.off { background: var(--red-400); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.scroll-cue { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--primary); animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Chapter bar ---------- */
.chapters {
  position: sticky; top: var(--nav-h); z-index: 40;
  background: rgba(20, 25, 34, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.chapters ul { display: flex; justify-content: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.chapters ul::-webkit-scrollbar { display: none; }
.chapters a {
  display: block; padding: 14px 14px; white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground);
  border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.chapters a:hover { color: var(--foreground); }
.chapters a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Sections ---------- */
.section { position: relative; padding: 104px 0; }
.section + .section { border-top: 1px solid var(--hairline); }
.section h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -0.015em; }
.section h3 { font-size: 22px; line-height: 1.25; font-weight: 800; }
.section .lead { margin-top: 18px; font-size: 17px; max-width: 68ch; }

/* Story = a narrow column of prose, read like a page rather than a list */
.story .wrap, .story-head { max-width: 760px; }
.story .wrap, .story-head { margin-inline: auto; }
.story h2, .story-head h2, .split h2 { margin-top: 10px; }
.story .prose, .story-head .prose { margin-top: 24px; font-size: 18px; line-height: 1.75; }
.story .prose p + p, .story-head .prose p + p, .split .prose p + p { margin-top: 18px; }
#about .prose p:first-child { color: var(--foreground); }
.split .prose { font-size: 17px; line-height: 1.75; }

/* Gallery = a row of screenshots under a story */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(var(--ink), 0.9)); font-size: 14px; font-weight: 700;
}

/* Band = full-bleed art section behind its content */
.band { isolation: isolate; overflow: hidden; }
.band-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--background) 0%, rgba(20, 25, 34, 0.72) 22%, rgba(20, 25, 34, 0.86) 78%, var(--background) 100%); }

/* Split = text beside media */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split .prose { margin-top: 18px; }
.media { position: relative; border-radius: var(--radius-panel); overflow: hidden; border: 1px solid var(--hairline); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); background: var(--card); }
.media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* Requirements */
.reqs { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 36px; }
.reqs h3 { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-foreground); padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.reqs .rec h3 { color: var(--primary); }
.reqs dl { display: grid; grid-template-columns: 120px 1fr; }
.reqs dt, .reqs dd { padding: 12px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.reqs dt { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-foreground); padding-top: 15px; }
.req-note { margin-top: 26px; display: flex; gap: 10px; color: var(--body-text); font-size: 15px; }
.req-note::before { content: "\2713"; color: var(--primary); font-weight: 800; }

/* News */
.news-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; margin-top: 36px; }
.news-card {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius-panel);
  background: var(--card); border: 1px solid var(--hairline); transition: border-color 0.2s, transform 0.2s;
}
.news-card:hover { border-color: rgba(34, 197, 94, 0.45); transform: translateY(-2px); }
.news-card h3 { font-size: 18px; }
.news-card p { font-size: 14.5px; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted-foreground); }
.tag { padding: 2px 9px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 11px; }
.post { padding: 36px 0; border-bottom: 1px solid var(--hairline); }
.post:first-child { padding-top: 0; }
.post h2 { margin-top: 12px; font-size: clamp(24px, 3vw, 32px); }
.post .prose { margin-top: 16px; max-width: 70ch; }
.post .btn { margin-top: 22px; }
.empty { padding: 40px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius-panel); color: var(--muted-foreground); }

/* ---------- Sub-page header ---------- */
.page-head { position: relative; padding: calc(var(--nav-h) + 76px) 0 64px; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--hairline); }
.page-head img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.page-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(var(--ink), 0.92), rgba(var(--ink), 0.55) 60%, rgba(var(--ink), 0.3)), linear-gradient(180deg, transparent 50%, var(--background)); }
.page-head h1 { margin-top: 10px; font-size: clamp(34px, 5vw, 56px); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
.page-head p { margin-top: 14px; max-width: 58ch; font-size: 17px; color: var(--body-text); }
.page-body { padding: 64px 0 96px; }
.page-body > .wrap:not(.rules-layout) > * + * { margin-top: 64px; }
.block-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
.block-title + * { margin-top: 22px; }
.after-signup { max-width: 68ch; font-size: 17px; line-height: 1.75; }
.after-signup p + p { margin-top: 16px; }

/* Download card */
.dl-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
  padding: 32px; border-radius: var(--radius-panel); border: 1px solid rgba(34, 197, 94, 0.35);
  background: radial-gradient(ellipse at 0% 0%, rgba(34, 197, 94, 0.13), transparent 60%), var(--card);
}
.dl-card h2 { font-size: 24px; font-weight: 800; }
.dl-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-size: 14px; color: var(--muted-foreground); }
.dl-facts li { display: inline-flex; align-items: center; gap: 8px; }
.dl-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.dl-card .cta-col { text-align: center; }

.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.step { padding: 24px; border-radius: var(--radius-panel); background: var(--card); border: 1px solid var(--hairline); counter-increment: s; }
.step::before {
  content: counter(s); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: var(--primary-foreground); font-weight: 800; margin-bottom: 14px;
}
.step h3 { font-size: 16px; font-weight: 700; }
.step p { margin-top: 6px; font-size: 14.5px; color: var(--muted-foreground); }

.faq { display: grid; gap: 10px; max-width: 860px; }
details { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); }
summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--primary); font-size: 22px; line-height: 1; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details .prose { padding: 0 22px 20px; font-size: 15px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; padding: 1px 6px; border-radius: 4px; background: var(--muted); color: var(--foreground); }

.notice { display: flex; gap: 14px; padding: 18px 22px; border-radius: var(--radius); background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.3); color: var(--body-text); font-size: 15px; }
.notice::before { content: "!"; flex-shrink: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--amber-400); color: var(--primary-foreground); font-weight: 800; font-size: 13px; }
.notice b { color: var(--foreground); }

/* Register */
.reg-card { max-width: 720px; padding: 40px; border-radius: var(--radius-panel); background: var(--card); border: 1px solid var(--hairline); }
.reg-card h2 { font-size: 26px; font-weight: 800; }
.reg-card .prose { margin-top: 12px; }
.reg-card .cta { margin-top: 26px; }
.reg-card .notice { margin-top: 26px; }

/* Rules */
.rules-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 2px; padding: 10px; border-radius: var(--radius-panel); background: var(--card); border: 1px solid var(--hairline); }
.toc a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 14px; color: var(--body-text); }
.toc a:hover { background: rgba(255, 255, 255, 0.05); color: var(--foreground); }
.rule { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--hairline); }
.rule:last-child { border-bottom: 0; }
.rule h2 { font-size: 24px; font-weight: 800; display: flex; gap: 14px; align-items: baseline; }
.rule h2 span { color: var(--primary); font-size: 15px; font-weight: 700; }
.rule ol { margin-top: 16px; display: grid; gap: 10px; counter-reset: r; }
.rule ol li { position: relative; padding-left: 34px; color: var(--body-text); counter-increment: r; }
.rule ol li::before { content: counter(r); position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--muted); font-size: 12px; font-weight: 700; color: var(--foreground); }
.placeholder { font-style: italic; color: var(--muted-foreground) !important; }

/* ---------- Join CTA + footer ---------- */
.join {
  text-align: center; border-radius: var(--radius-panel); padding: 64px 24px; border: 1px solid var(--hairline);
  background: radial-gradient(ellipse at 50% 0%, rgba(34, 197, 94, 0.16), transparent 62%), var(--card);
}
.join h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.join p { margin: 12px auto 0; max-width: 50ch; color: var(--muted-foreground); }
.join .cta { justify-content: center; margin-top: 28px; }

.site-footer { padding: 56px 0 44px; border-top: 1px solid var(--hairline); background: #10141c; font-size: 13px; color: var(--muted-foreground); text-align: center; }
.site-footer .f-logo { display: inline-block; }
.site-footer .f-logo img { width: 110px; height: auto; margin: 0 auto; opacity: 0.9; }
.site-footer .f-logo b { display: block; margin-top: 4px; font-weight: 800; letter-spacing: 0.5em; padding-left: 0.5em; color: var(--primary); font-size: 12px; }
.f-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-top: 24px; font-size: 14px; font-weight: 500; }
.f-links a { color: var(--body-text); }
.f-links a:hover { color: var(--foreground); }
.f-links a[aria-disabled="true"] { opacity: 0.5; }
.site-footer small { display: block; max-width: 70ch; margin: 24px auto 0; font-size: 12px; line-height: 1.6; opacity: 0.8; }

/* Leaderboards: the logs app fills the space under the header */
.app { overflow: hidden; }
.app .site-nav { background: rgba(var(--ink), 0.96); border-bottom-color: var(--hairline); }
.logs-frame { position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; width: 100%; height: calc(100% - var(--nav-h)); border: 0; background: var(--background); }
.logs-empty { padding: calc(var(--nav-h) + 80px) 16px; text-align: center; color: var(--muted-foreground); }

/* 404 */
.lost { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + 24px) 16px 24px; }
.lost h1 { font-size: 96px; font-weight: 800; color: var(--primary); line-height: 1; }
.lost p { margin: 14px 0 26px; color: var(--muted-foreground); }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links, .nav-actions .text-link { display: none; }
  .burger { display: grid; }
  .home .site-nav:not(.solid):not(.open) .brand { opacity: 1; pointer-events: auto; }
  .mobile-panel {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0; overflow-y: auto;
    padding: 12px 16px 32px; background: rgb(8, 11, 17);
  }
  .site-nav.open .mobile-panel { display: block; }
  .mobile-panel a { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px; border-bottom: 1px solid var(--hairline); font-size: 16px; font-weight: 600; }
  .mobile-panel a[aria-current="page"] { color: var(--primary); }
  .mobile-panel a[aria-disabled="true"] { opacity: 0.5; }
  .mobile-panel a[aria-disabled="true"]::after { content: "soon"; font-size: 11px; color: var(--muted-foreground); }
  .mobile-panel .sub a { padding-left: 22px; font-size: 15px; font-weight: 500; color: var(--body-text); }
  .mobile-panel .label { padding: 18px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-foreground); }
  .mobile-panel .cta { margin-top: 22px; }
  .mobile-panel .cta .btn { flex: 1; }
}
@media (max-width: 860px) {
  .gallery { grid-template-columns: 1fr; gap: 14px; }
  :root { --nav-h: 62px; }
  .section { padding: 72px 0; }
  .split, .reqs, .rules-layout, .dl-card { grid-template-columns: 1fr; gap: 28px; }
  .split.flip > :first-child { order: 0; }
  .chapters ul { justify-content: flex-start; }
  .toc { position: static; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .dl-card .cta-col { text-align: left; }
  .reqs { gap: 32px; }
}
@media (max-width: 520px) {
  .site-nav .btn.sm { padding: 0 12px; }
  .brand b { display: none; }
  .hero .cta .btn, .join .cta .btn, .reg-card .cta .btn { width: 100%; }
  .btn.lg { height: 54px; padding: 0 22px; }
  .dl-card, .reg-card { padding: 24px; }
  .reqs dl { grid-template-columns: 100px 1fr; }
  .story .prose, .story-head .prose { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .rv { opacity: 1; transform: none; }
}
