/* tfter.app: the app's own world (app/lib/core/theme). Dark only. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c0b09;
  --well: #110f0c;
  --card: #13110e;
  --surface: #1a1712;
  --hex-inner: #17140f;
  --item: #4a3f2c;
  --text: #f2ece1;
  --text-2: #d8d0c2;
  --text-3: #bdb4a5;
  --muted: #a69e90;
  --subtle: #8a8275;
  --accent: #ffe45e;
  --on-accent: #14110b;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.16);
  --cost-1: #8f897e;
  --cost-2: #5fa383;
  --cost-3: #5b8ec4;
  --cost-4: #a777cf;
  --cost-5: #e0b866;
  --bronze: #9a6a40;
  --bronze-ink: #fbebd8;
  --silver: #aeb3bb;
  --silver-ink: #121212;
  --gold: #d9b36c;
  --gold-ink: #14110b;
  --page: min(1240px, 100% - 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scrollbar-color: #2a251d var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  font-family: "Geist", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

/* Top bar */

.bar {
  width: var(--page);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.mark img {
  width: 34px;
  height: 34px;
}

.bar nav {
  display: flex;
  gap: 28px;
  font-size: 15px;
  color: var(--muted);
}
.bar nav a {
  text-decoration: none;
  transition: color 0.2s;
}
.bar nav a:hover {
  color: var(--text);
}

/* Hero: the board is the page */

.hero > *,
.chapter > * {
  min-width: 0;
}
.hero {
  width: var(--page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(12px, 3vw, 36px) 0 clamp(48px, 5vw, 72px);
}

.pitch h1 {
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.pitch p {
  color: var(--text-3);
  font-size: 19px;
  max-width: 34ch;
  margin: 22px 0 30px;
}
.pitch p.more {
  font-size: 15px;
  color: var(--muted);
  max-width: 40ch;
  margin: -16px 0 30px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.store a.badge {
  display: inline-block;
  border-radius: 12px;
  transition: transform 0.3s var(--ease);
}
.store a.badge:hover {
  transform: translateY(-2px);
}
.store a.badge img {
  width: 168px;
  height: auto;
}
.store .soon {
  font-size: 14px;
  color: var(--subtle);
}

/* The board well, as in the comp detail screen */

.well {
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(18px, 2.6vw, 34px);
}

.comp-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(18px, 2.4vw, 28px);
}
.tier {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 22px;
  color: #ffedef;
  background: linear-gradient(160deg, #d93a55 0%, #a8183a 52%, #6c0a22 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 180, 195, 0.3),
    0 4px 10px -4px rgba(0, 0, 0, 0.7);
  text-shadow: 0 1px 1px rgba(60, 0, 15, 0.55);
  flex: none;
}
.comp-head h2 {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.15;
}
.comp-head h2 span {
  display: block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--subtle);
  font-weight: 500;
  margin-top: 3px;
}

.board-area > * {
  min-width: 0;
}
.board-wrap {
  container-type: inline-size;
}
.board-area {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(14px, 2vw, 26px);
  align-items: start;
}

.traits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trait {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.25s, border-color 0.25s;
}
.trait i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
}
.trait i img {
  width: 16px;
  height: 16px;
}
.trait[data-style="bronze"] i {
  background: var(--bronze);
}
.trait[data-style="silver"] i {
  background: var(--silver);
}
.trait[data-style="gold"] i {
  background: var(--gold);
}
.trait[data-style="bronze"] i img,
.trait[data-style="gold"] i img,
.trait[data-style="silver"] i img {
  filter: brightness(0);
}
.trait[data-style="bronze"] i img {
  filter: brightness(0) invert(0.92);
}
.trait b {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
  color: var(--subtle);
  font-size: 13px;
}
.trait.dim {
  color: var(--muted);
}
.trait.on {
  border-color: rgba(255, 228, 94, 0.55);
}

/* Hexes: 4 rows of 7, odd rows shifted by half a hex (HexBoard). */

.board {
  --w: min(78px, 100cqw / 7.75);
  --h: calc(var(--w) * 1.136);
  --gap: calc(var(--w) * 0.07);
  --pitch: calc(var(--h) * 0.8);
  position: relative;
  width: calc(7 * var(--w) + 6 * var(--gap) + var(--w) / 2);
  height: calc(3 * var(--pitch) + var(--h));
  margin: 0 auto;
}

.hex {
  position: absolute;
  left: calc(var(--c) * (var(--w) + var(--gap)) + var(--odd) * (var(--w) + var(--gap)) / 2);
  top: calc(var(--r) * var(--pitch));
  width: var(--w);
  height: var(--h);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--line);
  border: 0;
  padding: 0;
}
.hex::after {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: inherit;
  background: var(--hex-inner);
}
button.hex {
  cursor: pointer;
  background: var(--cost, var(--cost-1));
  transition: transform 0.35s var(--ease), filter 0.25s;
}
button.hex::after {
  display: none;
}
button.hex img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: cover;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
button.hex:hover {
  filter: brightness(1.12);
}
button.hex[aria-pressed="true"] {
  background: var(--accent);
  transform: translateY(-3px);
}
button.hex:focus-visible {
  outline: none;
  background: var(--accent);
}

.board .items,
.board .stars {
  position: absolute;
  left: calc(var(--c) * (var(--w) + var(--gap)) + var(--odd) * (var(--w) + var(--gap)) / 2);
  width: var(--w);
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.board .items {
  top: calc(var(--r) * var(--pitch) + var(--h) - var(--w) * 0.27);
  gap: 1px;
}
.board .items img {
  width: calc(var(--w) * 0.25);
  height: calc(var(--w) * 0.25);
  border-radius: 2px;
  background: var(--item);
  box-shadow: 0 0 0 1px var(--bg);
}
.board .stars {
  top: calc(var(--r) * var(--pitch) + var(--w) * 0.12);
}
.board .stars span {
  display: inline-flex;
  gap: 1px;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(12, 11, 9, 0.9);
  border: 1px solid rgba(255, 228, 94, 0.4);
}
.board .stars svg {
  width: calc(var(--w) * 0.13);
  height: calc(var(--w) * 0.13);
  fill: var(--accent);
}

/* The selected unit, as the app's unit sheet */

.unit {
  margin-top: clamp(18px, 2.4vw, 28px);
  border-top: 1px solid var(--line);
  padding-top: clamp(16px, 2vw, 22px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 84px;
}
.unit .face {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  outline: 2px solid var(--cost, var(--cost-1));
}
.unit h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.unit p {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.unit p .mono {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
}
.unit ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
}
.unit li img {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--item);
}
.unit .none {
  font-size: 14px;
  color: var(--subtle);
}
.hint {
  font-size: 13px;
  color: var(--subtle);
  margin: 14px 0 0;
}

/* Chapters: the app's tabs */

.chapter {
  width: var(--page);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: clamp(56px, 8vw, 104px) 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  scroll-margin-top: 20px;
}
.chapter h2 {
  font-size: clamp(32px, 3.6vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 18px;
  text-wrap: balance;
}
.chapter .lede {
  color: var(--text-3);
  font-size: 18px;
  max-width: 40ch;
  margin: 0;
}

/* The last chapter reads across: heading, then the four parts in a row. */

.chapter.wide {
  grid-template-columns: 1fr;
  gap: clamp(28px, 4vw, 48px);
}
.chapter.wide .facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  border-top: 0;
}
.chapter.wide .facts li {
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 18px 0 0;
  border-bottom: 0;
  border-top: 2px solid var(--line-strong);
}

/* Live chapter: the app's Live tab, without identities */

.live {
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(18px, 2.6vw, 30px);
}
.live-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e5534b;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.chips button {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--chip, #15130f);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  height: 38px;
  padding: 0 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chips button:hover {
  border-color: rgba(255, 255, 255, 0.3);
}
.chips button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.streams {
  display: flex;
  flex-direction: column;
}
.stream {
  margin: 0;
}
.stream .shot {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface);
}
.stream .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stream.main {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  margin-bottom: 8px;
}
.stream.main .shot {
  border-radius: 0;
  aspect-ratio: 2.4;
}
.pill {
  position: absolute;
  top: 12px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(12, 11, 9, 0.82);
  color: var(--text);
}
.pill.red {
  left: 12px;
  background: #e5534b;
  color: #fff;
}
.pill.lang {
  right: 12px;
}
.stream.main figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  flex: none;
}
.bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.bars b {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: #2a251d;
  width: 42%;
}
.bars b + b {
  width: 74%;
  background: #1f1b15;
}
.stream.row {
  display: grid;
  grid-template-columns: clamp(104px, 11vw, 140px) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.stream.row .shot {
  aspect-ratio: 1.78;
  border-radius: 10px;
}
.stream .lang {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 13px;
  color: var(--subtle);
}
.streams [hidden] {
  display: none;
}
.streams .empty {
  margin: 4px 0 0;
  padding: 18px 0;
  color: var(--muted);
  font-size: 15px;
  border-top: 1px solid var(--line);
}
.live .hint {
  margin-top: 16px;
}
@media (prefers-reduced-motion: no-preference) {
  .dot {
    animation: pulse 1.8s var(--ease) infinite;
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

/* Comps chapter: the tier list rows */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rows li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}
.rows .t {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 19px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.rows .t.s {
  color: #ffedef;
  background: linear-gradient(160deg, #d93a55, #a8183a 52%, #6c0a22);
}
.rows .t.a {
  color: #14110b;
  background: linear-gradient(160deg, #e4ca98, #d9b36c 50%, #947a49);
}
.rows .t.b {
  color: #16181b;
  background: linear-gradient(160deg, #eef0f3, #b4b9c1 50%, #7a7f88);
}
.rows strong {
  font-weight: 600;
  font-size: 16px;
}
.rows small {
  display: block;
  color: var(--subtle);
  font-size: 13px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
}
.rows .carry {
  display: flex;
}
.rows .carry img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--card);
  margin-left: -8px;
}

/* Codex chapter: an item recipe */

.recipe {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(20px, 3vw, 32px);
}
.recipe .champ {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.recipe .champ img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  outline: 2px solid var(--cost, var(--cost-1));
}
.recipe .champ h3 {
  margin: 0;
}
.recipe .champ p {
  margin: 2px 0 0;
}
.recipe .mono {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
}
.recipe .ladder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.recipe .ladder .name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.recipe .ladder .name i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--silver);
}
.recipe .ladder .name img {
  width: 18px;
  height: 18px;
  filter: brightness(0);
}
.recipe .ladder ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
}
.recipe .ladder li {
  min-width: 44px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 14px;
  color: var(--subtle);
  background: var(--surface);
  border: 1px solid var(--line);
}
.recipe .ladder li.lit {
  background: var(--silver);
  color: var(--silver-ink);
  border-color: transparent;
}
.recipe .eq {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: "Geist Mono", ui-monospace, monospace;
  color: var(--subtle);
  font-size: 22px;
}
.recipe .eq img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--item);
}
.recipe .eq .out {
  outline: 2px solid var(--accent);
}
.recipe .eq + h3 {
  margin: 20px 0 6px;
}
.recipe h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}
.recipe p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 52ch;
}

/* Lists of plain facts (profile, live, my comps) */

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.facts li {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.facts b {
  font-weight: 600;
}
.facts span {
  color: var(--muted);
}

/* Closing install action: the mascot takes its hex on a slice of board. */

.get {
  width: var(--page);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 10vw, 128px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.perch {
  --w: clamp(40px, 5vw, 60px);
  --h: calc(var(--w) * 1.136);
  position: relative;
  display: flex;
  gap: calc(var(--w) * 0.07);
  padding-top: calc(var(--w) * 2.4);
  margin-bottom: clamp(32px, 4vw, 48px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  mask: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
}
.perch i {
  position: relative;
  width: var(--w);
  height: var(--h);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--line-strong);
}
.perch i::after {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: inherit;
  background: var(--hex-inner);
}
.perch i.lit {
  background: var(--accent);
}
.perch img {
  position: absolute;
  left: 50%;
  bottom: calc(var(--h) * -0.04);
  width: calc(var(--w) * 3.1);
  height: auto;
  translate: -50% 0;
}

.get h2 {
  margin: 0 0 14px;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
}
.get p {
  margin: 0 0 32px;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--text-3);
  max-width: 38ch;
  text-wrap: balance;
}
.get .store {
  justify-content: center;
}

/* Footer */

.foot {
  width: var(--page);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  font-size: 14px;
  color: var(--subtle);
}
.foot nav {
  display: flex;
  gap: 22px;
}
.foot nav a {
  color: var(--text-3);
  text-decoration: none;
}
.foot nav a:hover {
  color: var(--text);
}
.foot .legal {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  max-width: none;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.005em;
}

/* Reading pages (privacy, terms, 404) */

.doc {
  width: min(720px, 100% - 40px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 56px) 0 clamp(56px, 8vw, 96px);
}
.doc h1 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1;
  font-weight: 600;
  margin: 0 0 12px;
}
.doc .updated {
  color: var(--subtle);
  font-size: 14px;
  margin: 0 0 36px;
}
.doc .updated time {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
}
.doc h2 {
  font-size: 21px;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 40px 0 10px;
}
.doc p,
.doc li {
  color: var(--text-2);
  max-width: 68ch;
}
.doc a {
  color: var(--accent);
}

/* Entrance: the units take their hexes once (already visible without JS). */

@media (prefers-reduced-motion: no-preference) {
  .js .board button.hex {
    animation: land 0.7s var(--ease) both;
    animation-delay: calc(var(--n) * 70ms + 120ms);
  }
  .js .board .items,
  .js .board .stars {
    animation: fade 0.5s var(--ease) both;
    animation-delay: calc(var(--n) * 70ms + 420ms);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .js .perch.waiting img {
    opacity: 0;
    transform: translateY(-36px) scale(0.9);
  }
  .js .perch img {
    transition: opacity 0.4s var(--ease), transform 0.8s var(--ease);
  }
}
@keyframes land {
  from {
    transform: translateY(-14px) scale(0.86);
    opacity: 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* Responsive */

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .pitch {
    order: -1;
  }
  .chapter {
    grid-template-columns: 1fr;
  }
  .chapter.wide .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .bar nav {
    display: none;
  }
  .board-area {
    grid-template-columns: 1fr;
  }
  .traits {
    flex-direction: row;
    flex-wrap: wrap;
    order: 2;
  }
  .unit {
    grid-template-columns: auto 1fr;
  }
  .unit ul {
    grid-column: 1 / -1;
  }
  .facts li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .chapter.wide .facts {
    grid-template-columns: 1fr;
  }
  .trait {
    height: 30px;
    font-size: 13px;
  }
  .foot {
    grid-template-columns: 1fr;
  }
}
