/*
  KalqueLord main site stylesheet.
  One file. Tokens first, then shared pieces, then page pieces in the order
  they first appear, then phone and tablet rules, then focus and motion.
  Desktop rules reproduce the approved design export of 2026-11-26 exactly.
*/

/* ---- Fonts (self-hosted, SIL Open Font License) ----
   The weight ranges match what the design used: Cinzel 500 to 700, Inter 400 to 600. */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('/fonts/cinzel-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens ---- */
:root {
  --font-display: 'Cinzel', serif;
  --font-body: Inter, system-ui, sans-serif;

  /* Backgrounds, darkest first */
  --ink-0: #030306;
  --ink-1: #07070c;
  --ink-2: #0b0c12;
  --ink-3: #0b0c14;
  --ink-4: #0c0c13;

  /* Text */
  --white: #ffffff;
  --text-bright: #f6f3ec;
  --text: #f1eee6;
  --text-cool: #eef0f3;
  --text-soft: #dedacf;
  --text-warm: #dcd8ce;
  --text-muted: #c9ccd3;
  --text-muted-warm: #c9c5ba;
  --text-dim: #b9bcc4;
  --text-faint: #9da0a8;

  /* Brand teal */
  --teal: #2ec4c9;
  --teal-bright: #6fe0e3;

  /* Grade colors, Pre-K to 6th */
  --grade-pk: #ffffff;
  --grade-k: #f2c230;
  --grade-1: #f08a1c;
  --grade-2: #2fcb7a;
  --grade-3: #4c8dff;
  --grade-4: #a06bff;
  --grade-5: #f0425a;
  --grade-6: #d5d7dc;

  /* Lines */
  --line: rgba(255,255,255,0.18);
  --line-soft: rgba(255,255,255,0.1);

  /* Review tags, never shipped */
  --amber: #e0a43a;
  --amber-bright: #f3c56b;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink-0); font-family: var(--font-body); }
body.page-deep { background: var(--ink-1); }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .82; }
[hidden] { display: none !important; }

.site { background: var(--ink-1); color: var(--text); }

/* ---- Grade color switches. Set --c on any piece that takes a grade color. ---- */
.seam { --c: var(--teal); }
.pill { --c: var(--teal-bright); }
.legal-link { --c: var(--teal); }
.is-pk { --c: var(--grade-pk); }
.is-k { --c: var(--grade-k); }
.is-g1 { --c: var(--grade-1); }
.is-g2 { --c: var(--grade-2); }
.is-g3 { --c: var(--grade-3); }
.is-g4 { --c: var(--grade-4); }
.is-g5 { --c: var(--grade-5); }
.is-g6 { --c: var(--grade-6); }

/* ---- Seam: the thin diamond line on top of each band ---- */
.seam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0), var(--c) 18%, #ffffff 50%, var(--c) 82%, rgba(255,255,255,0));
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}
.card-seam {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--c);
  clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%);
}

/* ---- Painted buttons: an image with a label on top ---- */
.btn { position: relative; display: inline-block; max-width: 100%; }
.btn--reset { padding: 0; border: 0; background: transparent; cursor: pointer; }
.btn--gap-top { margin-top: 12px; }
.btn--w176 { width: 176px; }
.btn--w220 { width: 220px; }
.btn--w230 { width: 230px; }
.btn--w240 { width: 240px; }
.btn--w250 { width: 250px; }
.btn--w280 { width: 280px; }
.btn--w290 { width: 290px; }
.btn--w300 { width: 300px; }
.btn--w320 { width: 320px; }
.btn--w330 { width: 330px; }
.btn-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.btn-label--xs { font-size: 12px; }
.btn-label--sm { font-size: 13px; }
.btn-label--md { font-size: 14px; }
.btn-label--lg { font-size: 17px; }
.btn-label--xl { font-size: 20px; }

/* ---- Small pieces that take a grade color ---- */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--c);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c);
  white-space: nowrap;
}
.card-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--c);
}
.chapter-name {
  flex: 0 1 230px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.08em;
  color: var(--c);
}
.door-enter {
  display: block;
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--c);
}
.product-kicker { font-size: 12px; letter-spacing: 0.2em; }
.product-kicker--board { color: #a7b7d4; }
.product-kicker--hoard { color: #d9c2a6; }
.product-kicker--books { color: #b9a9d6; }
.product-kicker--vault { color: var(--text-muted-warm); }
.product-kicker--market { color: #a9c4b3; }

/* ---- Form fields ---- */
.field {
  display: block;
  min-width: 0;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.field--w140 { flex: 1 1 140px; }
.field--w180 { flex: 1 1 180px; }
.field--w280 { flex: 1 1 280px; }
.field--w360 { flex: 1 1 360px; }
.form-status {
  flex: 1 1 100%;
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--teal-bright);
}
.form-status[data-state="error"] { color: #ffb4b4; }
form[data-busy] button { opacity: .6; cursor: progress; }
/* Trap field for bots. People never see or reach it. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Legal page tabs ---- */
.legal-link {
  padding: 10px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c);
}

/* ---- Navigation links ---- */
.nav-link { padding: 12px 0; color: var(--text-cool); }
.nav-link.is-active { color: var(--teal-bright); }

/* ---- Navigation ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding: 14px 40px;
  background: rgba(7,7,12,0.94);
  border-bottom: 1px solid var(--line-soft);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
}
.nav-logo {
  height: 54px;
  width: auto;
  margin: -6px 0;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  flex: 1 1 420px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-soon {
  padding: 12px 0;
  color: var(--text-faint);
}
.nav-soon-note {
  font-size: 10px;
}
.img-fluid {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Footer ---- */
.site-footer {
  position: relative;
  padding: 72px 8vw 36px;
  background: var(--ink-0);
  color: var(--text-muted);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 48px;
}
.footer-brand {
  flex: 2 1 300px;
  min-width: 0;
}
.footer-logo {
  display: block;
  height: 76px;
  width: auto;
  margin-left: -8px;
}
.footer-tagline {
  margin: 14px 0 0;
  max-width: 340px;
  font-size: 15px;
  line-height: 1.5;
}
.footer-gems {
  display: flex;
  gap: 6px;
  margin-top: 18px;
}
.icon-30 {
  height: 30px;
  width: auto;
}
.footer-col {
  flex: 1 1 150px;
  min-width: 0;
}
.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--white);
}
.footer-link {
  display: block;
  padding: 9px 0;
  font-size: 15px;
  color: var(--text-muted);
}
.footer-legal {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 13px;
  color: var(--text-faint);
}

/* ---- First used on / ---- */
.mastery-rail {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 20px;
  background: rgba(7,7,12,0.86);
  border: 1px solid rgba(255,255,255,0.14);
}
.mastery-rail-title {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--text-muted-warm);
  text-align: center;
  padding-bottom: 4px;
}
.rail-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 6px;
  font-size: 11px;
  color: #e6e2d8;
}
.icon-24 {
  height: 24px;
  width: auto;
}
.home-hero {
  position: relative;
  min-height: 780px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px 8vw 72px;
  box-sizing: border-box;
  background: var(--ink-3);
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.bg-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shade-left {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(4,4,8,0.92) 0%, rgba(4,4,8,0.6) 42%, rgba(4,4,8,0.08) 100%);
}
.home-hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--teal-bright);
}
.home-hero-title {
  margin: 18px 0 0;
  max-width: 900px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.05;
}
.home-hero-lede {
  margin: 22px 0 0;
  max-width: 620px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-soft);
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}
.scroll-cue {
  margin-top: 40px;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--text-muted-warm);
}
.intro {
  position: relative;
  background: var(--ink-1);
}
.intro-head {
  padding: 92px 8vw 44px;
}
.eyebrow-plain {
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--teal-bright);
}
.intro-title {
  margin: 14px 0 0;
  max-width: 1040px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 62px);
  line-height: 1.08;
}
.intro-lede {
  max-width: 720px;
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-soft);
}
.age-cards {
  display: flex;
  flex-wrap: wrap;
}
.age-card {
  position: relative;
  flex: 1 1 300px;
  min-width: 0;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 28px;
  isolation: isolate;
  overflow: hidden;
}
.age-card-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4,4,8,0) 38%, rgba(4,4,8,0.95) 100%);
}
.icon-34 {
  height: 34px;
  width: auto;
}
.age-card-title {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.04em;
  color: var(--white);
}
.age-card-text {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text);
}
.math-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 56px;
  padding: 64px 8vw 88px;
}
.math-book {
  flex: 0 1 300px;
  min-width: 0;
  width: 300px;
  max-width: 100%;
  height: auto;
}
.math-copy {
  flex: 1 1 460px;
  min-width: 0;
}
.math-title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.8vw, 54px);
  line-height: 1.08;
  color: #8fb6ff;
}
.math-subtitle {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
}
.math-text {
  max-width: 640px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-soft);
}
.chapter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}
.chapter {
  position: relative;
  min-height: 660px;
  box-sizing: border-box;
  padding: 96px 8vw 72px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 40px;
  background: var(--ink-1);
  color: var(--text-bright);
  isolation: isolate;
  overflow: hidden;
}
.chapter-copy {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 620px;
}
.kicker-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-58 {
  height: 58px;
  width: auto;
}
.kicker {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-warm);
}
.lockup-heading {
  margin: 10px 0 0 -24px;
}
.chapter-lockup {
  display: block;
  width: min(640px, 100%);
  height: auto;
}
.chapter-line {
  margin: 20px 0 0;
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-bright);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}
.seal-note {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-warm);
}
.chapter-reverse {
  position: relative;
  min-height: 660px;
  box-sizing: border-box;
  padding: 96px 8vw 72px;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 40px;
  background: var(--ink-1);
  color: var(--text-bright);
  isolation: isolate;
  overflow: hidden;
}
.shade-right {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(270deg, rgba(4,4,8,0.92) 0%, rgba(4,4,8,0.6) 42%, rgba(4,4,8,0.08) 100%);
}
.math-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.chapter-more-link {
  padding: 12px 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--white);
}
.valley {
  position: relative;
  min-height: 520px;
  box-sizing: border-box;
  padding: 96px 8vw 72px;
  background: #0a0f12;
  isolation: isolate;
  overflow: hidden;
}
.valley-title {
  margin: 120px 0 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
}
.valley-text {
  max-width: 560px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-soft);
}
.beyond {
  position: relative;
  padding: 88px 8vw;
  background: var(--ink-1);
}
.beyond-title {
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.product-tile {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: var(--ink-4);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.tile-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4,4,8,0) 40%, rgba(4,4,8,0.95) 100%);
}
.product-name {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 24px;
}
.product-text {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted-warm);
}
.keepers-band {
  position: relative;
  padding: 96px 8vw;
  background: var(--ink-2);
  color: var(--text-cool);
}
.keepers-title {
  margin: 14px 0 0;
  max-width: 820px;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.1;
}
.keepers-lede {
  max-width: 640px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-soft);
}
.keepers-ai {
  max-width: 640px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dim);
}
.keepers-ai-kicker {
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--teal-bright);
}
.keepers-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.home-signup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.home-signup-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 280px;
  max-width: 420px;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.home-signup-input {
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--text-dim);
  background: var(--ink-4);
  color: var(--text-cool);
  font: 16px Inter, sans-serif;
}

/* ---- First used on /world ---- */
.world-hero {
  position: relative;
  min-height: 760px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px 8vw 64px;
  box-sizing: border-box;
  background: var(--ink-3);
  isolation: isolate;
  overflow: hidden;
}
.bg-cover-center {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(4,4,8,0.93) 0%, rgba(4,4,8,0.62) 46%, rgba(4,4,8,0.1) 100%), linear-gradient(0deg, rgba(4,4,8,0.75) 0%, rgba(4,4,8,0) 40%);
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--teal-bright);
}
.page-hero-title {
  margin: 14px 0 0;
  max-width: 900px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 5.4vw, 78px);
  line-height: 1.04;
}
.page-hero-lede {
  margin: 20px 0 0;
  max-width: 640px;
  font-size: 21px;
  line-height: 1.5;
  color: var(--text);
}
.split {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background: var(--ink-1);
}
.split-media {
  position: relative;
  flex: 1 1 480px;
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
}
.fill-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-copy {
  flex: 1 1 420px;
  min-width: 0;
  box-sizing: border-box;
  padding: 72px 6vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split-title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.1;
}
.split-body {
  margin-top: 16px;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-soft);
}
.flush {
  margin: 0;
}
.split-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}
.split-reverse {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  background: var(--ink-1);
}
.for-mark {
  display: inline-block;
  margin: 6px 0;
  padding: 5px 10px;
  border: 1px dashed var(--amber);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-bright);
  background: rgba(20,14,4,0.7);
}
.band-alt {
  position: relative;
  padding: 92px 8vw 84px;
  background: var(--ink-2);
}
.section-title {
  margin: 12px 0 0;
  max-width: 900px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.1;
}
.fact-list {
  margin-top: 34px;
  max-width: 1060px;
  border-top: 1px solid var(--line);
}
.fact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.fact-title {
  flex: 1 1 250px;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--white);
}
.fact-text {
  flex: 2 1 380px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-soft);
}
.fact-aside {
  flex: 0 0 auto;
}

/* ---- First used on /games ---- */
.page-hero {
  position: relative;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px 8vw 64px;
  box-sizing: border-box;
  background: var(--ink-3);
  isolation: isolate;
  overflow: hidden;
}
.chapter-list {
  margin-top: 30px;
  max-width: 1180px;
  border-top: 1px solid var(--line);
}
.chapter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.icon-46 {
  height: 46px;
  width: auto;
}
.chapter-row-grade {
  flex: 0 0 130px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.chapter-row-line {
  flex: 2 1 320px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--text-soft);
}
.gap-top-26 {
  margin-top: 26px;
}
.band {
  position: relative;
  padding: 92px 8vw 84px;
  background: var(--ink-1);
}
.games-beyond-title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.8vw, 52px);
}
.game-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.game-tile {
  position: relative;
  flex: 1 1 280px;
  min-width: 0;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 26px;
  isolation: isolate;
  overflow: hidden;
}
.game-tile-title {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--white);
}
.game-tile-text {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
}
.fine-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}
.signup-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
  max-width: 1060px;
  margin-top: 30px;
}
.field-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 54px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid var(--text-muted);
  background: rgba(4,4,8,0.6);
  color: var(--white);
  font: 16px Inter, sans-serif;
}
.form-note {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-dim);
}

/* ---- First used on /books ---- */
.books-feature {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: wrap;
  background: #000000;
}
.books-feature-media {
  position: relative;
  flex: 1 1 480px;
  min-width: 0;
  min-height: 640px;
  overflow: hidden;
}
.fill-contain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.band-lede {
  margin: 18px 0 0;
  max-width: 680px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-soft);
}

/* ---- First used on /keepers ---- */
.bg-cover-upper {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.doors {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  background: var(--ink-0);
}
.door {
  position: relative;
  flex: 1 1 300px;
  min-width: 0;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
  padding: 34px;
  isolation: isolate;
  overflow: hidden;
}
.door-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4,4,8,0.1) 30%, rgba(4,4,8,0.95) 100%);
}
.door-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: 0.06em;
  color: var(--white);
}
.door-text {
  display: block;
  margin-top: 8px;
  max-width: 340px;
  font-size: 18px;
  line-height: 1.45;
  color: var(--text);
}
.keepers-split {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background: #05070d;
}
.keepers-split-media {
  position: relative;
  flex: 1 1 480px;
  min-width: 0;
  min-height: 620px;
  overflow: hidden;
}
.band-ai {
  position: relative;
  padding: 92px 8vw 84px;
  background: #060a10;
}
.ai-lede {
  margin: 16px 0 0;
  max-width: 680px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* ---- First used on /keepers/families ---- */
.gap-top-22 {
  margin-top: 22px;
}

/* ---- First used on /keepers/schools ---- */
.step-num {
  flex: 0 0 56px;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--teal-bright);
}

/* ---- First used on /proof ---- */
.standard-list {
  margin-top: 30px;
  max-width: 860px;
  border-top: 1px solid var(--line);
}
.standard-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
}
.standard-code {
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  color: var(--teal-bright);
  white-space: nowrap;
}
.band-deep {
  position: relative;
  padding: 92px 8vw 84px;
  background: #04060b;
}
.proof-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  max-width: 980px;
  margin-top: 32px;
}
.proof-figure {
  flex: 1 1 320px;
  min-width: 0;
  margin: 0;
}
.proof-caption {
  padding: 12px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--white);
}
.proof-lede {
  margin: 18px 0 0;
  max-width: 700px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-soft);
}
.gap-top-24 {
  margin-top: 24px;
}

/* ---- First used on /mission ---- */
.mission-hero {
  position: relative;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px 8vw 64px;
  box-sizing: border-box;
  background: var(--ink-3);
  isolation: isolate;
  overflow: hidden;
}
.gap-top-14 {
  margin-top: 14px;
}
.made-lede {
  margin: 18px 0 0;
  max-width: 700px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-soft);
}

/* ---- First used on /legal ---- */
.legal-hero {
  padding: 96px 8vw 48px;
  background: var(--ink-2);
}
.legal-title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 64px);
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 34px;
  margin-top: 26px;
}
.gap-top-18 {
  margin-top: 18px;
}
.legal-band {
  position: relative;
  padding: 84px 8vw 76px;
  background: var(--ink-1);
}
.legal-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.8vw, 52px);
  line-height: 1.1;
}
.legal-body {
  max-width: 780px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-soft);
}
.legal-p {
  margin: 12px 0 0;
}
.legal-bracket {
  color: var(--amber-bright);
}
.legal-subhead {
  margin: 34px 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--white);
}
.legal-list {
  margin: 10px 0 0;
  padding-left: 22px;
}
.legal-item {
  margin: 6px 0;
}
.legal-strong {
  color: var(--white);
}

/* ---- First used on /champion ---- */
.champion-hero {
  position: relative;
  min-height: 780px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px 8vw 72px;
  box-sizing: border-box;
  background: #0d1b33;
  isolation: isolate;
  overflow: hidden;
}
.champion-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(4,4,8,0.9) 0%, rgba(4,4,8,0.5) 45%, rgba(4,4,8,0.05) 100%);
}
.champion-lockup {
  display: block;
  width: min(720px, 100%);
  height: auto;
}
.champion-lede {
  margin: 20px 0 0;
  max-width: 620px;
  font-size: 22px;
  line-height: 1.5;
}
.dragons-band {
  position: relative;
  min-height: 760px;
  box-sizing: border-box;
  padding: 110px 8vw 72px;
  background: #05070b;
  isolation: isolate;
  overflow: hidden;
}
.dragons-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(4,4,8,0.35) 0%, rgba(4,4,8,0.2) 40%, rgba(4,4,8,0.92) 100%);
}
.dragons-title {
  margin: 14px 0 0;
  max-width: 900px;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.05;
}
.dragons-text {
  max-width: 560px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-soft);
}
.dragon-names {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  margin-top: 260px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.14em;
}
.dragon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.dragon-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
}
.champion-math {
  position: relative;
  padding: 88px 8vw;
  background: var(--ink-2);
}
.champion-math-title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
}
.champion-math-text {
  max-width: 640px;
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* ---- Chapter pages (/guardian, /pathfinder, /defender, /vanguard, /voyager, /lightbringer) ---- */
.chapter-hero {
  position: relative;
  min-height: 760px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 80px 8vw 64px;
  box-sizing: border-box;
  background: var(--ink-3);
  isolation: isolate;
  overflow: hidden;
}
/* Text on the right, shade from the right, so the words do not cover Thren. */
.chapter-hero--right { align-items: flex-end; }
.page-hero-shade--right {
  background: linear-gradient(270deg, rgba(4,4,8,0.93) 0%, rgba(4,4,8,0.62) 46%, rgba(4,4,8,0.1) 100%), linear-gradient(0deg, rgba(4,4,8,0.75) 0%, rgba(4,4,8,0) 40%);
}
.chapter-hero-copy { width: min(700px, 100%); }
/* Where a painting is cropped when it fills its box. */
.art-pos-82 { object-position: 82% center; }
.art-pos-72 { object-position: 72% center; }

/* ---- Home teaser cards: where each painting is cropped (art round 3) ---- */
.age-card-art--guardian { object-position: 82% center; }
.age-card-art--champion { object-position: 72% center; }

/* ==== Phone and tablet (under 900px). Desktop is untouched above this line. ==== */
.nav-toggle { display: none; }

@media (max-width: 899px) {
  /* The fixed Mastery rail covers the hero on small screens. */
  .mastery-rail { display: none; }

  .site-nav { gap: 8px 12px; padding: 8px 16px; }
  .nav-logo { height: 46px; margin: -4px 0; }
  .site-nav > .btn { width: 132px; margin-left: auto; }
  .site-nav > .btn .btn-label { font-size: 11px; }

  /* With scripts on, the links fold into a menu. With scripts off they stay visible. */
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    color: var(--text-cool);
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .site-nav[data-open] .nav-toggle-bars { background: transparent; }
  .site-nav[data-open] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .site-nav[data-open] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .nav-links { order: 5; flex: 1 1 100%; }
  .js .nav-links { display: none; }
  .js .site-nav[data-open] .nav-links {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 6px 0 10px;
    border-top: 1px solid var(--line-soft);
    font-size: 17px;
  }
  .js .site-nav[data-open] .nav-link,
  .js .site-nav[data-open] .nav-soon {
    padding: 14px 4px;
    border-bottom: 1px solid var(--line-soft);
  }

  /* The chapter wordmarks hang 24px left on desktop. Pull them back on screen. */
  .lockup-heading { margin-left: -12px; }
}

/* ==== Focus, for keyboard users ==== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
}
input:focus-visible { outline-offset: 0; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--ink-0);
  border: 1px solid var(--teal-bright);
  color: var(--white);
  font-size: 15px;
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after { transition: none; }
}

/* Anchors land below the sticky bar. */
[id] { scroll-margin-top: 84px; }
