/* Reaction Mass: sodium and rime theme */
:root {
  --void: #0F1013;
  --regolith: #1C1A17;
  --deep: #121210;
  --stone: #2A2621;
  --line: #3A352E;
  --line-strong: #6B6458;
  --bone: #E9E2D3;
  --text: #D8D0C0;
  --soft: #C9C1B1;
  --dust: #A79E8E;
  --sodium: #F2A341;
  --sodium-light: #F7C07A;
  --rime: #A9D3B0;
  --ember: #C4472F;
  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --stencil: "Big Shoulders Stencil", "Big Shoulders", Impact, sans-serif;
  --read: "Literata", Georgia, serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--regolith); color: var(--bone); font-family: var(--read); font-size: 19px; line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sodium); }
a:hover { color: var(--sodium-light); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--sodium); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 0.98; margin: 0; color: var(--bone); }
p { margin: 0; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--sodium); color: var(--regolith); padding: 12px 18px; font-family: var(--display); font-weight: 700; z-index: 10; }
.skip:focus { left: 16px; top: 16px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* Header */
.site-header { background: var(--void); border-bottom: 1px solid var(--stone); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px; min-height: 76px; padding: 10px 0; }
.wordmark { font-family: var(--stencil); font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; color: var(--bone); text-decoration: none; }
.nav .wordmark { font-size: 28px; padding: 8px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 0 28px; flex: 1 1 auto; margin: 0; padding: 0; list-style: none; }
.nav-links a { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--bone); text-decoration: none; padding: 12px 0; display: inline-block; }
.nav-links a:hover { color: var(--sodium-light); }
.nav-links a[aria-current="page"] { color: var(--sodium); }

/* Buttons */
.btn { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.1; text-decoration: none; border-radius: 2px; padding: 14px 26px; min-height: 52px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--sodium); color: var(--regolith); }
.btn-primary:hover { background: var(--sodium-light); color: var(--regolith); }
.btn-secondary { background: transparent; color: var(--bone); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--bone); color: var(--bone); }
.btn-small { font-size: 20px; padding: 10px 20px; min-height: 44px; }
.btn-large { font-size: 24px; padding: 16px 30px; min-height: 56px; }

/* Hero */
.hero { position: relative; min-height: 840px; background: var(--void); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-content { position: relative; padding-top: 128px; padding-bottom: 180px; }
.hero-copy { max-width: 600px; display: flex; flex-direction: column; gap: 28px; }
.hero h1 { font-family: var(--stencil); font-weight: 800; font-size: 152px; line-height: 0.84; letter-spacing: 0.01em; text-transform: uppercase; }
.tagline { font-style: italic; font-size: 27px; line-height: 1.35; color: var(--bone); }
.hero-lede { color: var(--soft); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 4px; }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 40px; }
.caption-row { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; }
.caption-year { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--sodium); font-variant-numeric: tabular-nums; }
.caption-text { font-size: 17px; line-height: 1.5; color: var(--soft); }
@media (max-width: 640px) {
  .hero h1 { font-size: 76px; }
  .hero-content { padding-top: 72px; padding-bottom: 220px; }
  .tagline { font-size: 23px; }
}

/* Sections */
.section { padding: 128px 0 120px; }
.section-tight { padding: 0 0 128px; }
.section-deep { background: var(--deep); padding: 112px 0; }
.h2 { font-size: 60px; }
@media (max-width: 900px) { .h2 { font-size: 46px; } }
.prose { display: flex; flex-direction: column; gap: 26px; }
.prose p { color: var(--text); max-width: 36em; }
.intro { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.intro p { color: var(--text); }
.stack { display: flex; flex-direction: column; gap: 56px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.cols-2.center { align-items: center; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; }
@media (max-width: 900px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); gap: 44px; } }

/* Timeline */
.timeline { margin: 0; padding: 0 0 0 28px; list-style: none; border-left: 1px solid #4A443B; display: flex; flex-direction: column; gap: 26px; }
.timeline li { display: flex; flex-direction: column; gap: 2px; }
.timeline .year { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; color: var(--bone); }
.timeline .event { font-size: 17px; line-height: 1.5; color: var(--dust); }
.timeline .now .year { color: var(--sodium); }
.timeline .now .event { color: var(--text); }

/* Play pillars */
.pillar { display: flex; flex-direction: column; gap: 14px; border-top: 2px solid var(--sodium); padding-top: 22px; }
.pillar h3 { font-weight: 800; font-size: 76px; line-height: 0.9; }
.pillar p { font-size: 18px; line-height: 1.65; color: var(--soft); }
@media (max-width: 900px) { .pillar h3 { font-size: 60px; } }

/* Rime */
.rime-title { color: var(--rime); }
figure { margin: 0; }
figure img { border-radius: 2px; }
figcaption { font-size: 15px; line-height: 1.5; color: var(--dust); margin-top: 12px; }

/* Demo band */
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 36px 64px; background: var(--stone); padding: 56px; border-radius: 2px; }
.band-copy { display: flex; flex-direction: column; gap: 16px; flex: 1 1 420px; min-width: 0; }
.band-copy p { color: var(--text); max-width: 34em; }
.band-action { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.small { font-size: 15px; line-height: 1.5; color: var(--dust); }
@media (max-width: 640px) { .band { padding: 32px 24px; } }

/* Universe list */
.projects { margin: 0; display: flex; flex-direction: column; }
.projects > div { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.projects > div:last-child { border-bottom: 0; }
.projects dt { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--bone); }
.projects .status { font-weight: 600; font-size: 19px; color: var(--dust); }
.projects .status.live { color: var(--sodium); }
.projects dd { margin: 0; font-size: 17px; line-height: 1.55; color: var(--soft); }

/* Signup */
.signup { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 64px; }
.signup-copy { display: flex; flex-direction: column; gap: 14px; flex: 1 1 380px; min-width: 0; }
.signup-copy h2 { font-size: 44px; line-height: 1; }
.signup-copy p { font-size: 18px; line-height: 1.65; color: var(--soft); max-width: 32em; }
.signup-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; flex: 1 1 420px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 8px; flex: 1 1 240px; min-width: 0; }
.field label { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--text); }
.field input { font-family: var(--read); font-size: 17px; color: var(--bone); background: var(--regolith); border: 1px solid var(--line-strong); border-radius: 2px; padding: 12px 14px; min-height: 52px; width: 100%; }
.form-note { flex-basis: 100%; font-size: 16px; color: var(--soft); min-height: 1.5em; }

/* Footer */
.site-footer { border-top: 1px solid var(--stone); padding: 64px 0 48px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.footer-grid h2 { font-size: 22px; margin-bottom: 8px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-grid a, .footer-grid li { font-size: 16px; }
.footer-grid a { text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-grid .later { color: var(--dust); padding: 4px 0; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; border-top: 1px solid var(--stone); padding-top: 24px; margin-top: 56px; }
.footer-base .wordmark { font-size: 26px; }

/* Play page */
.play-main { padding-top: 56px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 36px; }
.play-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; }
.play-head h1 { font-size: 64px; line-height: 0.95; }
.play-head p { color: var(--text); max-width: 40em; }
.play-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.game-col { flex: 999 1 720px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.game-frame { aspect-ratio: 16 / 9; background: var(--void); border: 1px solid var(--line); border-radius: 2px; display: flex; align-items: center; justify-content: center; padding: 24px; position: relative; overflow: hidden; }
.game-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.game-start { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.game-start .wordmark { font-size: 64px; line-height: 0.9; }
.game-start p { font-size: 16px; line-height: 1.6; color: var(--dust); max-width: 30em; }
.game-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.side h2 { font-size: 26px; line-height: 1; }
.side .block { display: flex; flex-direction: column; gap: 10px; }
.feature { display: flex; flex-direction: column; gap: 4px; border-top: 2px solid var(--sodium); padding-top: 12px; }
.feature h3 { font-size: 22px; }
.side p, .side li { font-size: 16px; line-height: 1.6; color: var(--soft); }
.side ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.feedback { background: var(--stone); padding: 22px; border-radius: 2px; display: flex; flex-direction: column; gap: 14px; }
.feedback .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.feedback .link { font-family: var(--display); font-weight: 600; font-size: 19px; text-decoration: none; padding: 10px 4px; }
.footer-slim { border-top: 1px solid var(--stone); padding: 28px 0; }
.footer-slim .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px; }
.footer-slim .wordmark { font-size: 24px; }
[hidden] { display: none !important; }

/* Lore */
summary:focus-visible { outline: 3px solid var(--sodium); outline-offset: 3px; }
.nav-links a[aria-current="true"] { color: var(--sodium); }
.lore-bar { position: sticky; top: 0; z-index: 5; background: var(--void); border-bottom: 1px solid var(--stone); }
.lore-bar .wrap { display: flex; align-items: center; gap: 12px 24px; min-height: 64px; }
.lore-nav { flex: 1 1 auto; min-width: 0; }
.lore-tabs { display: flex; gap: 0 26px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.lore-tabs::-webkit-scrollbar { display: none; }
.lore-tabs a { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--soft); text-decoration: none; display: inline-block; padding: 18px 0 16px; border-bottom: 2px solid transparent; white-space: nowrap; }
.lore-tabs a:hover { color: var(--bone); }
.lore-tabs a:focus-visible { outline-offset: -3px; }
.lore-tabs a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--sodium); }
.lore-tabs a.tab-rime[aria-current="page"] { border-bottom-color: var(--rime); }

.spoiler-toggle { flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px 8px 10px; background: transparent; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--bone); font-family: var(--display); font-weight: 600; font-size: 18px; cursor: pointer; }
.spoiler-toggle:hover { border-color: var(--bone); }
.spoiler-toggle .switch { position: relative; width: 36px; height: 20px; border-radius: 10px; background: var(--stone); border: 1px solid var(--line-strong); }
.spoiler-toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--dust); transition: transform 0.15s, background-color 0.15s; }
.spoiler-toggle .state { color: var(--dust); min-width: 1.6em; }
.spoiler-toggle[aria-pressed="true"] .switch { background: rgba(169, 211, 176, 0.16); border-color: var(--rime); }
.spoiler-toggle[aria-pressed="true"] .switch::after { transform: translateX(16px); background: var(--rime); }
.spoiler-toggle[aria-pressed="true"] .state { color: var(--rime); }
@media (prefers-reduced-motion: reduce) { .spoiler-toggle .switch::after { transition: none; } }

.lore-head { padding: 72px 0 64px; display: flex; flex-direction: column; gap: 22px; max-width: 860px; }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sodium); }
.eyebrow.rime { color: var(--rime); }
.lore-head h1 { font-size: 92px; line-height: 0.9; }
.lore-lede { font-size: 22px; line-height: 1.6; color: var(--text); max-width: 36em; }
@media (max-width: 640px) {
  .lore-head { padding: 48px 0 44px; }
  .lore-head h1 { font-size: 58px; }
  .lore-lede { font-size: 20px; }
}

.lore-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 72px; align-items: start; padding-bottom: 128px; }
.lore-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.lore-toc h2 { font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dust); font-weight: 600; }
.lore-toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.lore-toc a { display: block; padding: 5px 0; font-size: 16px; line-height: 1.4; color: var(--soft); text-decoration: none; }
.lore-toc a:hover { color: var(--sodium-light); }
.lore-toc a:focus-visible { outline-offset: -2px; }
@media (max-width: 900px) {
  .lore-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-bottom: 96px; }
  .lore-toc { position: static; max-height: none; }
}

.lore-article { display: flex; flex-direction: column; gap: 96px; min-width: 0; }
.lore-section { display: flex; flex-direction: column; gap: 24px; scroll-margin-top: 88px; }
.lore-section > h2 { font-size: 54px; }
.lore-section h3 { font-size: 30px; line-height: 1.05; padding-top: 12px; }
.lore-section p, .lore-section li { color: var(--text); max-width: 38em; }
.lore-section ul, .lore-section ol.list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.lore-section strong { color: var(--bone); font-weight: 600; }
.lore-section.rime > h2 { color: var(--rime); }
@media (max-width: 900px) { .lore-section > h2 { font-size: 42px; } .lore-section h3 { font-size: 26px; } }
@media (max-width: 640px) { body { font-size: 18px; } }

.lore-quote { margin: 0; padding-left: 24px; border-left: 2px solid var(--sodium); font-style: italic; font-size: 30px; line-height: 1.35; color: var(--bone); }

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 2px; }
.lore-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.lore-table th, .lore-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.lore-table thead th { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--bone); background: var(--stone); }
.lore-table td { color: var(--soft); }
.lore-table tbody th { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.2; color: var(--bone); }
.lore-table tbody tr:last-child > * { border-bottom: 0; }

.chronicle { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.chronicle li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 28px; padding: 22px 0; border-top: 1px solid var(--line); }
.chronicle .when { display: flex; flex-direction: column; gap: 2px; }
.chronicle .year { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.1; color: var(--bone); font-variant-numeric: tabular-nums; }
.chronicle .ac { font-size: 15px; color: var(--dust); }
.chronicle h3 { font-size: 26px; padding-top: 0; }
.chronicle p { font-size: 17px; line-height: 1.6; color: var(--soft); margin-top: 6px; }
.chronicle .now .year, .chronicle .now h3 { color: var(--sodium); }
.chronicle .ahead .year { color: var(--ember); }
@media (max-width: 640px) { .chronicle li { grid-template-columns: minmax(0, 1fr); } }

.terms { margin: 0; display: flex; flex-direction: column; }
.terms > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px 28px; padding: 16px 0; border-top: 1px solid var(--line); }
.terms dt { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--bone); }
.terms dd { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 17px; line-height: 1.6; color: var(--soft); }
.terms dd p { color: var(--soft); }
@media (max-width: 640px) { .terms > div { grid-template-columns: minmax(0, 1fr); } }

.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 2px; }
.facts > div { background: var(--regolith); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.facts dt { font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dust); }
.facts dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--bone); }

.lore-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.lore-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; background: var(--stone); border-top: 2px solid var(--sodium); border-radius: 2px; text-decoration: none; color: inherit; }
.lore-card:hover { background: #332E28; color: inherit; }
.lore-card h3 { font-size: 40px; padding-top: 0; }
.lore-card p { font-size: 17px; line-height: 1.6; color: var(--soft); }
.lore-card .more { margin-top: auto; padding-top: 6px; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--sodium); }
.lore-card.rime { border-top-color: var(--rime); }
.lore-card.rime .more { color: var(--rime); }
@media (max-width: 760px) { .lore-cards { grid-template-columns: minmax(0, 1fr); } }

.note { background: var(--stone); border-left: 2px solid var(--rime); padding: 20px 24px; border-radius: 2px; display: flex; flex-direction: column; gap: 10px; }
.note p { font-size: 17px; line-height: 1.6; color: var(--soft); }
.note h2, .note h3 { font-size: 24px; padding-top: 0; color: var(--bone); }

/* Spoilers */
.spoiler { border: 1px dashed rgba(169, 211, 176, 0.45); border-radius: 2px; background: rgba(169, 211, 176, 0.035); }
.spoiler[open] { border-style: solid; border-color: rgba(169, 211, 176, 0.28); }
.spoiler > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 18px; font-family: var(--display); font-weight: 600; font-size: 19px; line-height: 1.25; color: var(--rime); }
.spoiler > summary::-webkit-details-marker { display: none; }
.spoiler > summary::after { content: "Show"; flex: none; font-size: 16px; color: var(--dust); border: 1px solid var(--line-strong); border-radius: 2px; padding: 4px 12px; }
.spoiler[open] > summary::after { content: "Hide"; }
.spoiler > summary:hover::after { color: var(--bone); border-color: var(--bone); }
.spoiler-body { padding: 6px 18px 24px; display: flex; flex-direction: column; gap: 20px; }
.spoiler-body > h3:first-child { padding-top: 0; }
.spoiler.compact > summary { min-height: 40px; padding: 6px 12px; font-size: 16px; }
.spoiler.compact > summary::after { font-size: 14px; padding: 2px 10px; }
.spoiler.compact .spoiler-body { padding: 2px 12px 14px; gap: 10px; }
.spoiler.compact .spoiler-body p { font-size: 16px; }
@media (max-width: 640px) {
  .lore-bar { position: static; }
  .lore-bar .wrap { flex-wrap: wrap; padding-top: 6px; padding-bottom: 14px; }
  .lore-nav { flex-basis: 100%; }
  .lore-tabs { flex-wrap: wrap; overflow: visible; gap: 0 20px; }
  .lore-tabs a { padding: 10px 0 8px; }
  .lore-section { scroll-margin-top: 16px; }
}
picture { display: block; }
