:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-soft: #e9efe9;
  --ink: #17201d;
  --muted: #59645f;
  --line: #cbd3ce;
  --line-strong: #9da9a3;
  --accent: #c56a1a;
  --accent-dark: #81400c;
  --green: #27745a;
  --green-soft: #dbece3;
  --blue: #315e83;
  --blue-soft: #dce9f2;
  --gold-soft: #f5e5c8;
  --shadow-sm: 0 4px 0 rgba(23, 32, 29, 0.12);
  --shadow-md: 0 14px 36px rgba(23, 32, 29, 0.12);
  --font-brand: "Cinzel Decorative", Georgia, serif;
  --font-display: "Caudex", Georgia, serif;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
}

a {
  color: inherit;
}

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

.site-header,
.site-footer,
.section-shell,
.root-card,
.language-ribbon-inner {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 2.7rem;
  height: 2.7rem;
  filter: drop-shadow(0 5px 7px rgba(129, 64, 12, 0.28));
  transition: transform 220ms ease, filter 220ms ease;
}

.brand:hover img {
  filter: drop-shadow(0 7px 9px rgba(129, 64, 12, 0.34));
  transform: translateY(-2px) rotate(-2deg);
}

.site-header nav,
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
}

.site-header nav a,
.footer-links a,
.back-link {
  position: relative;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-header nav a:hover,
.footer-links a:hover,
.back-link:hover {
  color: var(--ink);
}

.site-header nav a:not(.nav-cta)::after {
  position: absolute;
  right: 0;
  bottom: -0.35rem;
  left: 0;
  height: 2px;
  background: var(--accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.site-header nav a:not(.nav-cta):hover::after,
.site-header nav a:not(.nav-cta):focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
  padding: 0.72rem 1.05rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nav-cta {
  color: #fff !important;
}

.nav-cta:hover,
.button:hover {
  background: var(--green);
  box-shadow: 0 6px 0 rgba(23, 32, 29, 0.12);
  transform: translateY(-2px);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.button.secondary:hover {
  background: var(--surface);
}

.section-shell {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(22rem, 0.98fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6.5rem);
  min-height: min(720px, calc(100vh - 5rem));
}

.hero-copy h1,
.root-card h1,
.article-page h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--font-display);
  font-size: clamp(3.6rem, 8vw, 6.7rem);
  font-weight: 700;
  line-height: 0.93;
  letter-spacing: 0;
}

.hero-copy h1::first-line {
  color: var(--accent-dark);
}

.article-page h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 7vw, 4.9rem);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lede {
  max-width: 42rem;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(1.16rem, 2.3vw, 1.45rem);
  font-weight: 700;
  line-height: 1.48;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.65rem;
}

.proof-list {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.proof-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.proof-list li::before {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.game-preview {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #25322d;
  border-radius: 6rem 6rem 8px 8px;
  background: #18221e;
  box-shadow: 18px 20px 0 var(--gold-soft), var(--shadow-md);
  color: #f7f4eb;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  transition: box-shadow 240ms ease, transform 240ms ease;
}

.game-preview:hover {
  box-shadow: 22px 24px 0 var(--gold-soft), 0 18px 42px rgba(23, 32, 29, 0.16);
  transform: translateY(-4px);
}

.game-preview::before {
  position: absolute;
  inset: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5.5rem 5.5rem 5px 5px;
  content: "";
  pointer-events: none;
}

.preview-topline,
.word-analysis,
.harmony-note {
  position: relative;
  z-index: 1;
}

.preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #d5ddd8;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-count {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 0.38rem 0.5rem;
}

.letter-board {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.3rem, 1vw, 0.55rem);
  margin: clamp(2rem, 6vw, 3.5rem) 0;
}

.letter-tile {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.8vw, 2.15rem);
  font-weight: 700;
  transition: border-color 180ms ease, filter 180ms ease, transform 180ms ease;
}

.letter-tile:hover {
  border-color: rgba(255, 255, 255, 0.72);
  filter: brightness(1.08);
  transform: translateY(-5px);
}

.letter-tile.is-root {
  background: var(--green);
}

.letter-tile.is-suffix {
  background: var(--blue);
}

.letter-tile.is-word {
  background: var(--blue);
}

.word-analysis {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  padding: 1.2rem 0;
}

.word-analysis div {
  display: grid;
  min-width: 0;
  gap: 0.25rem;
}

.word-analysis div:last-child {
  text-align: right;
}

.word-analysis span {
  color: #aebbb4;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.word-analysis strong {
  overflow-wrap: anywhere;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.55rem;
}

.analysis-plus {
  color: #d8aa54 !important;
  font-size: 1.35rem !important;
}

.harmony-note {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.15rem;
}

.harmony-note p {
  min-width: 0;
  margin: 0;
  color: #c2ccc6;
  font-size: 0.84rem;
  line-height: 1.45;
}

.harmony-note strong {
  color: #fff;
}

.sound-mark {
  flex: 0 0 auto;
  border-radius: 5px;
  background: #d8aa54;
  color: #19231f;
  padding: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  transition: background 180ms ease, transform 180ms ease;
}

.game-preview:hover .sound-mark {
  background: #efc26d;
  transform: translateX(3px);
}

.language-ribbon {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.language-ribbon-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.language-signal {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.1rem 1rem;
  min-width: 0;
  border-right: 1px solid var(--line);
  padding: 1.5rem clamp(1rem, 3vw, 2.5rem);
  transition: background 180ms ease;
}

.language-signal:first-child {
  border-left: 1px solid var(--line);
}

.language-signal span {
  grid-row: span 2;
  color: var(--accent-dark);
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.language-signal strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.language-signal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.language-signal:nth-child(1):hover {
  background: var(--green-soft);
}

.language-signal:nth-child(2):hover {
  background: var(--blue-soft);
}

.language-signal:nth-child(3):hover {
  background: var(--gold-soft);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(15rem, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 8vw, 7rem);
}

.split-section h2,
.section-heading h2 {
  margin: 0;
  max-width: 17ch;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.rich-copy,
.section-heading p,
.info-card p,
.article-card p,
.faq p,
.article-body {
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 560;
  line-height: 1.72;
}

.rich-copy > p:first-child {
  margin-top: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.55;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(14rem, 0.85fr) minmax(0, 1.15fr);
  gap: 2rem;
  align-items: end;
}

.section-heading .eyebrow,
.section-heading h2 {
  grid-column: 1;
}

.section-heading > p:not(.eyebrow) {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
}

.mode-grid,
.note-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.25rem;
  border: 1px solid var(--line);
  background: var(--line);
}

.note-grid,
.article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.article-card {
  position: relative;
  min-width: 0;
  background: var(--surface);
  padding: clamp(1.25rem, 3vw, 2rem);
  transition: box-shadow 200ms ease, color 200ms ease, transform 200ms ease;
}

.info-card:hover,
.article-card:hover {
  z-index: 1;
  box-shadow: 0 12px 26px rgba(23, 32, 29, 0.13);
  transform: translateY(-5px);
}

.mode-card {
  min-height: 17rem;
}

.mode-card:nth-child(2) {
  background: var(--green-soft);
}

.mode-card:nth-child(3) {
  background: var(--blue-soft);
}

.mode-card:nth-child(4) {
  background: var(--gold-soft);
}

.card-index {
  display: block;
  margin-bottom: 3.5rem;
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
}

.info-card h3,
.article-card h3 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.info-card p,
.article-card p {
  margin-bottom: 0;
}

.article-card h3 a {
  text-decoration: none;
}

.article-card::after {
  position: absolute;
  right: 1.25rem;
  bottom: 1.1rem;
  color: var(--green);
  content: "→";
  font-size: 1.35rem;
  transition: transform 160ms ease;
}

.article-card:hover::after {
  transform: translateX(4px);
}

.article-card:hover h3 a {
  color: var(--accent-dark);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 2.5rem 0 0;
  padding: 0;
  counter-reset: steps;
  list-style: none;
}

.steps li {
  position: relative;
  border-top: 2px solid var(--ink);
  color: var(--ink);
  padding: 1.2rem 2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.45;
  counter-increment: steps;
}

.steps li::before {
  display: block;
  width: 1.8rem;
  margin-top: -2px;
  border-top: 5px solid var(--accent);
  padding-top: 0.75rem;
  color: var(--accent-dark);
  content: "0" counter(steps);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  transition: width 220ms ease;
}

.steps li:hover::before {
  width: 3.25rem;
}

.quest-story {
  overflow: clip;
  border-top: 1px solid #34413c;
  border-bottom: 1px solid #34413c;
  background: #17201d;
  color: #f8f1df;
}

.story-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(18rem, 1.1fr);
  gap: 0.65rem 4rem;
  align-items: end;
  padding-bottom: 2rem;
}

.story-heading .eyebrow,
.story-heading h2 {
  grid-column: 1;
}

.story-heading h2 {
  margin: 0;
  max-width: 15ch;
  color: #fffaf0;
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1.03;
}

.story-heading > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 35rem;
  margin: 0;
  color: #bbc7c0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.55;
}

.story-scroll {
  width: min(100% - 2.5rem, 1180px);
  margin-inline: auto;
}

.story-stage {
  position: relative;
  display: grid;
  min-height: 44rem;
  place-items: center;
  isolation: isolate;
  padding: 3rem 1rem 5rem;
}

.story-portal {
  position: absolute;
  z-index: -2;
  bottom: 4.5rem;
  left: 50%;
  width: min(58rem, 92%);
  height: 80%;
  border: 12px solid #35433d;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  box-shadow: inset 0 0 0 2px #101714, 0 20px 0 #101714;
  transform: translateX(-50%);
}

.story-portal::before,
.story-portal::after {
  position: absolute;
  bottom: -1rem;
  width: 4.5rem;
  height: 11rem;
  border: 2px solid #4a5952;
  background: #26322d;
  content: "";
}

.story-portal::before {
  left: -2.75rem;
}

.story-portal::after {
  right: -2.75rem;
}

.story-portal > span {
  position: absolute;
  top: -2.15rem;
  left: 50%;
  display: grid;
  width: 4.3rem;
  height: 4.3rem;
  place-items: center;
  border: 2px solid #6e7c75;
  border-radius: 50%;
  background: #17201d;
  color: #d8aa54;
  font-family: var(--font-brand);
  font-size: 1.25rem;
  transform: translateX(-50%);
}

.story-book {
  position: relative;
  width: min(50rem, calc(100vw - 4rem));
  border: 1px solid #38281b;
  border-radius: 7px 18px 18px 7px;
  background: #6d4930;
  box-shadow: 0 1.15rem 0 #101714, 0 2.25rem 3rem rgba(0, 0, 0, 0.28);
  padding: 0.75rem;
  perspective: 1100px;
}

.story-book::before {
  position: absolute;
  inset: 0.28rem;
  border: 1px solid #a47b4c;
  border-radius: 5px 14px 14px 5px;
  content: "";
  pointer-events: none;
}

.story-book::after {
  position: absolute;
  z-index: 3;
  top: 0.75rem;
  bottom: 0.75rem;
  left: 50%;
  width: 1px;
  background: #c9b994;
  box-shadow: -5px 0 12px rgba(79, 59, 37, 0.17), 5px 0 12px rgba(79, 59, 37, 0.17);
  content: "";
  pointer-events: none;
}

.story-pages {
  position: relative;
  min-height: 29rem;
  overflow: hidden;
  border: 1px solid #c2b28f;
  border-radius: 3px 12px 12px 3px;
  background: #f7f0df;
}

.story-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 29rem;
  background: #f7f0df;
  color: #202722;
}

.story-page + .story-page {
  border-top: 1px solid #c9b994;
}

[data-story-ready="true"] .story-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px;
}

[data-story-ready="true"] .story-stage {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1;
  height: 100svh;
  min-height: 40rem;
}

[data-story-ready="true"] .story-triggers {
  display: block;
  grid-column: 2;
  grid-row: 1;
}

[data-story-ready="true"] .story-triggers > span {
  display: block;
  height: 92svh;
}

[data-story-ready="true"] .story-page {
  position: absolute;
  inset: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(4%) rotateY(4deg);
  transform-origin: left center;
  visibility: hidden;
  transition: opacity 280ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1), visibility 280ms step-end;
}

[data-story-ready="true"] .story-page[data-state="past"] {
  transform: translateX(-4%) rotateY(-4deg);
  transform-origin: right center;
}

[data-story-ready="true"] .story-page.is-active {
  z-index: 2;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) rotateY(0);
  visibility: visible;
  transition: opacity 280ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0ms step-start;
}

.story-page-visual,
.story-page-copy {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 2.5rem;
}

.story-page-visual {
  border-right: 1px solid #d4c6a6;
  background: #e9dec4;
}

.story-page-copy {
  position: relative;
  align-content: center;
  justify-items: start;
}

.story-page-label {
  margin: 0 0 0.8rem;
  color: #81400c;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-page-copy h3 {
  margin: 0;
  max-width: 11ch;
  color: #17201d;
  font-family: var(--font-display);
  font-size: 2.55rem;
  line-height: 1.02;
}

.story-page-copy > p:last-of-type {
  max-width: 28rem;
  margin: 1.25rem 0 0;
  color: #4f5a54;
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.65;
}

.story-folio {
  position: absolute;
  right: 1.25rem;
  bottom: 1rem;
  color: #81745d;
  font-family: var(--font-display);
  font-size: 0.78rem;
}

.quest-gate {
  position: relative;
  width: 10rem;
  height: 13rem;
  border: 0.8rem solid #2f3c37;
  border-bottom-width: 1.1rem;
  border-radius: 6rem 6rem 4px 4px;
  background: #486156;
  box-shadow: 0.75rem 0.75rem 0 #cdbd99;
}

.quest-keystone {
  position: absolute;
  top: -1.65rem;
  left: 50%;
  display: grid;
  width: 3.3rem;
  height: 3.3rem;
  place-items: center;
  border: 0.3rem solid #2f3c37;
  border-radius: 50%;
  background: #d8aa54;
  color: #17201d;
  font-family: var(--font-brand);
  transform: translateX(-50%);
}

.quest-door-line {
  position: absolute;
  top: 1.7rem;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #2f3c37;
}

.quest-keyhole {
  position: absolute;
  top: 7rem;
  left: 50%;
  width: 0.8rem;
  height: 1.35rem;
  border-radius: 50% 50% 2px 2px;
  background: #17201d;
  transform: translateX(-50%);
}

.quest-word {
  display: grid;
  grid-template-columns: repeat(3, 3.2rem);
  gap: 0.45rem;
  justify-content: center;
}

.quest-word.plain {
  grid-template-columns: repeat(2, 3.5rem);
}

.quest-letter {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #68736e;
  border-radius: 4px;
  background: #f8f1df;
  color: #17201d;
  box-shadow: 0 4px 0 #b8a986;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
}

.quest-word.clues .clue-1 {
  border-color: #246e55;
  background: #27745a;
  color: #fff;
}

.quest-word.clues .clue-2 {
  border-color: #a65d17;
  background: #d8aa54;
}

.quest-word.clues .clue-3 {
  border-color: #6f7a74;
  background: #d8dfda;
}

.quest-routes {
  display: grid;
  width: min(100%, 15rem);
  border-top: 1px solid #6e7b75;
}

.quest-routes span {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.8rem;
  align-items: center;
  border-bottom: 1px solid #6e7b75;
  padding: 0.8rem 0;
  color: #26322d;
  font-family: var(--font-display);
  font-weight: 700;
}

.quest-routes b {
  color: #81400c;
  font-family: var(--font-ui);
  font-size: 0.68rem;
}

.story-progress {
  position: absolute;
  z-index: 5;
  bottom: 1.25rem;
  left: 50%;
  display: flex;
  gap: 0.35rem;
  transform: translateX(-50%);
}

.story-progress button {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid #59675f;
  border-radius: 50%;
  background: #17201d;
  color: #9faca5;
  cursor: pointer;
  font: inherit;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.story-progress button:hover,
.story-progress button:focus-visible,
.story-progress button[aria-current="step"] {
  border-color: #d8aa54;
  color: #f7d38f;
  transform: translateY(-2px);
}

.story-progress button span {
  font-size: 0.68rem;
  font-weight: 850;
}

.story-triggers {
  display: none;
}

.language-notes {
  border-top: 1px solid var(--line);
}

.language-notes .info-card:first-child {
  border-top: 5px solid var(--green);
}

.language-notes .info-card:nth-child(2) {
  border-top: 5px solid var(--blue);
}

.language-notes .info-card:nth-child(3) {
  border-top: 5px solid var(--accent);
}

.articles {
  border-top: 1px solid var(--line);
}

.faq-list {
  display: grid;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid var(--line-strong);
}

.faq-list details {
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  padding: 1.25rem 0;
  transition: background 180ms ease, padding 180ms ease;
}

.faq-list details:hover,
.faq-list details[open] {
  background: rgba(255, 255, 255, 0.58);
  padding-inline: 1rem;
}

.faq-list summary {
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

.faq-list p {
  max-width: 65ch;
  margin-bottom: 0;
}

.faq-list details[open] p {
  animation: answer-in 220ms ease both;
}

.article-page {
  margin-top: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 5vw, 4rem);
}

.article-page header {
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
}

.article-page time {
  color: var(--accent-dark);
  font-weight: 750;
}

.article-body {
  max-width: 72ch;
  margin-top: 2.5rem;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: 0;
}

.related-articles {
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 5vw, 3rem);
}

.compact-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.root-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 0;
}

.root-redirect {
  min-height: 100vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.root-redirect img {
  filter: drop-shadow(0 5px 8px rgba(129, 64, 12, 0.25));
}

.root-redirect p {
  margin: 0;
}

.root-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.root-mark {
  margin-bottom: 1rem;
  filter: drop-shadow(0 6px 10px rgba(129, 64, 12, 0.26));
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  border-top: 1px solid var(--line-strong);
  padding: 2.5rem 0 3.5rem;
}

.site-footer p {
  max-width: 42rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.site-footer small {
  color: var(--muted);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes preview-in {
  from {
    opacity: 0;
    transform: translateX(22px) rotate(1deg);
  }

  to {
    opacity: 1;
    transform: translateX(0) rotate(0);
  }
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes answer-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise-in 600ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 70ms;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 140ms;
  }

  .hero-copy > :nth-child(4) {
    animation-delay: 210ms;
  }

  .hero-copy > :nth-child(5) {
    animation-delay: 280ms;
  }

  .game-preview {
    animation: preview-in 720ms 120ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .letter-tile {
    animation: tile-in 420ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  }

  .letter-tile:nth-child(1) {
    animation-delay: 300ms;
  }

  .letter-tile:nth-child(2) {
    animation-delay: 350ms;
  }

  .letter-tile:nth-child(3) {
    animation-delay: 400ms;
  }

  .letter-tile:nth-child(4) {
    animation-delay: 470ms;
  }

  .letter-tile:nth-child(5) {
    animation-delay: 520ms;
  }

  .letter-tile:nth-child(6) {
    animation-delay: 570ms;
  }

  @supports (animation-timeline: view()) {
    .split-section,
    .mode-grid,
    .steps,
    .language-notes .section-heading,
    .note-grid,
    .articles .section-heading,
    .article-grid,
    .faq-list {
      animation: rise-in linear both;
      animation-range: entry 0% entry 32%;
      animation-timeline: view();
    }
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 4rem;
  }

  .game-preview {
    max-width: 38rem;
  }

  .split-section,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .section-heading > p:not(.eyebrow) {
    grid-column: 1;
    grid-row: auto;
  }

  .mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .note-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .story-heading {
    grid-template-columns: 1fr;
  }

  .story-heading > p:last-child {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0.75rem;
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-header nav,
  .brand {
    min-width: 0;
  }

  .site-header {
    align-items: center;
    flex-direction: row;
    gap: 0.5rem;
    min-height: 4.25rem;
    padding: 0.55rem 0;
  }

  .site-header nav {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: nowrap;
  }

  .site-header nav a:nth-child(1),
  .site-header nav a:nth-child(2) {
    display: none;
  }

  .site-header nav a:not(.nav-cta) {
    padding-block: 0.55rem;
  }

  .nav-cta {
    min-height: 2.55rem;
    margin-left: 0;
    padding: 0.6rem 0.7rem;
    font-size: 0.82rem;
  }

  .language-ribbon-inner,
  .mode-grid,
  .steps,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .language-signal,
  .language-signal:first-child {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  .steps li {
    min-height: 8rem;
  }

  .footer-links {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .hero {
    gap: 2.75rem;
    padding-top: 3rem;
    padding-bottom: 4.5rem;
  }

  .game-preview {
    overflow: hidden;
  }

  .story-heading {
    padding-top: 4.5rem;
    padding-bottom: 1rem;
  }

  .story-heading h2 {
    max-width: 12ch;
    font-size: 2.45rem;
  }

  .story-heading > p:last-child {
    font-size: 1rem;
  }

  .story-scroll {
    width: min(100% - 1.25rem, 1180px);
  }

  .story-stage,
  [data-story-ready="true"] .story-stage {
    height: 100svh;
    min-height: 35rem;
    padding: 2.75rem 0 3.5rem;
  }

  .story-portal {
    bottom: 3rem;
    width: 91%;
    height: 88%;
    border-width: 8px;
    border-bottom: 0;
  }

  .story-portal::before,
  .story-portal::after {
    bottom: -0.6rem;
    width: 2.5rem;
    height: 7rem;
  }

  .story-portal::before {
    left: -1.5rem;
  }

  .story-portal::after {
    right: -1.5rem;
  }

  .story-portal > span {
    top: -1.65rem;
    width: 3.2rem;
    height: 3.2rem;
    font-size: 0.95rem;
  }

  .story-book {
    width: min(100% - 1rem, 23rem);
    height: min(72svh, 36rem);
    min-height: 30rem;
    border-radius: 7px 14px 14px 7px;
    box-shadow: 0 0.75rem 0 #101714, 0 1.5rem 2rem rgba(0, 0, 0, 0.28);
    padding: 0.55rem;
  }

  .story-book::after {
    display: none;
  }

  .story-pages,
  .story-page {
    height: 100%;
    min-height: 0;
  }

  .story-page {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 0.86fr) minmax(0, 1.14fr);
  }

  .story-page-visual,
  .story-page-copy {
    padding: 1.35rem;
  }

  .story-page-visual {
    border-right: 0;
    border-bottom: 1px solid #d4c6a6;
  }

  .story-page-copy {
    align-content: center;
  }

  .story-page-label {
    margin-bottom: 0.55rem;
    font-size: 0.64rem;
  }

  .story-page-copy h3 {
    max-width: 14ch;
    font-size: 1.95rem;
  }

  .story-page-copy > p:last-of-type {
    margin-top: 0.8rem;
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .story-folio {
    right: 0.9rem;
    bottom: 0.65rem;
  }

  .quest-gate {
    width: 7rem;
    height: 8.75rem;
    border-width: 0.55rem;
    border-bottom-width: 0.8rem;
    box-shadow: 0.5rem 0.5rem 0 #cdbd99;
  }

  .quest-keystone {
    top: -1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.78rem;
  }

  .quest-keyhole {
    top: 4.8rem;
  }

  .quest-word {
    grid-template-columns: repeat(3, 2.55rem);
    gap: 0.35rem;
  }

  .quest-word.plain {
    grid-template-columns: repeat(4, 2.55rem);
  }

  .quest-letter {
    font-size: 1.05rem;
  }

  .quest-routes {
    width: min(100%, 13rem);
  }

  .quest-routes span {
    grid-template-columns: 2rem 1fr;
    gap: 0.55rem;
    padding: 0.48rem 0;
    font-size: 0.82rem;
  }

  .story-progress {
    bottom: 0.4rem;
  }

  .story-progress button {
    width: 2.25rem;
    height: 2.25rem;
  }
}

@media (max-width: 480px) {
  .site-header,
  .site-footer,
  .section-shell,
  .root-card,
  .language-ribbon-inner {
    width: min(100% - 1.25rem, 1180px);
  }

  .hero-copy h1,
  .root-card h1 {
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .nav-cta,
  .button {
    width: 100%;
  }

  .nav-cta {
    margin-left: 0;
  }

  .site-header .nav-cta {
    width: auto;
  }

  .brand {
    gap: 0.4rem;
    font-size: 1.3rem;
  }

  .brand img {
    width: 2.25rem;
    height: 2.25rem;
  }

  .site-header nav a:not(.nav-cta) {
    font-size: 0.78rem;
  }

  .hero-actions {
    display: grid;
  }

  .game-preview {
    box-shadow: 8px 9px 0 var(--gold-soft), var(--shadow-md);
  }

  .letter-board {
    gap: 0.25rem;
  }

  .letter-tile {
    font-size: 1.15rem;
  }
}

/* Landing: fixed mobile lobby and desktop scrollytelling codex */
.landing-body {
  background: #090c0b;
}

.landing-experience {
  min-height: 100svh;
  background: #090c0b;
}

.mobile-lobby {
  display: none;
}

.desktop-codex {
  min-height: 100svh;
  overflow: clip;
  background: #090c0b;
  color: #f4ecd8;
}

.codex-scroll {
  width: 100%;
}

.codex-stage {
  position: relative;
  display: grid;
  min-height: 100svh;
  grid-template-rows: 4.5rem minmax(0, 1fr) 4.25rem;
  isolation: isolate;
  overflow: hidden;
}

.desktop-codex[data-story-ready="true"] .codex-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px;
}

.desktop-codex[data-story-ready="true"] .codex-stage {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1;
  height: 100svh;
}

.codex-topbar {
  z-index: 8;
  display: grid;
  width: min(100% - 3rem, 1180px);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-inline: auto;
  border-bottom: 1px solid #334039;
}

.codex-brand {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.55rem;
  color: #f8f1df;
  font-family: var(--font-brand);
  font-size: 1.15rem;
  text-decoration: none;
}

.codex-brand img {
  width: 2.35rem;
  height: 2.35rem;
  filter: drop-shadow(0 4px 8px rgba(216, 170, 84, 0.28));
}

.codex-page-status {
  color: #aeb9b3;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.codex-topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.codex-topbar nav a {
  color: #b9c3bd;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
}

.codex-topbar nav .codex-play {
  border: 1px solid #c8953d;
  border-radius: 4px;
  color: #f5d799;
  padding: 0.55rem 0.8rem;
}

.codex-gate {
  position: absolute;
  z-index: -2;
  bottom: 2rem;
  left: 50%;
  width: min(70rem, calc(100% - 7rem));
  height: calc(100% - 7rem);
  border: 12px solid #25322d;
  border-bottom: 0;
  border-radius: 48% 48% 0 0;
  background: #101714;
  box-shadow: inset 0 0 0 2px #3e4d46, 0 1.25rem 0 #050706;
  transform: translateX(-50%);
}

.codex-gate::before,
.codex-gate::after {
  position: absolute;
  bottom: -1rem;
  width: 5rem;
  height: 13rem;
  border: 2px solid #3c4a44;
  background: #19231f;
  content: "";
}

.codex-gate::before {
  left: -3.5rem;
}

.codex-gate::after {
  right: -3.5rem;
}

.codex-gate > span {
  position: absolute;
  top: -2rem;
  left: 50%;
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border: 1px solid #78867f;
  border-radius: 50%;
  background: #101714;
  color: #d8aa54;
  font-family: var(--font-brand);
  transform: translateX(-50%);
}

.codex-book {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: min(61rem, calc(100vw - 7rem));
  border: 0.7rem solid #65452e;
  border-radius: 7px 15px 15px 7px;
  background: #7b5738;
  box-shadow: 0 0.9rem 0 #050706, 0 2rem 4rem rgba(0, 0, 0, 0.44);
  padding: 0.22rem;
  perspective: 1200px;
}

.codex-book::before {
  position: absolute;
  z-index: 9;
  top: 0.22rem;
  bottom: 0.22rem;
  left: 50%;
  width: 1px;
  background: #c8b78e;
  box-shadow: -8px 0 16px rgba(75, 53, 31, 0.13), 8px 0 16px rgba(75, 53, 31, 0.13);
  content: "";
  pointer-events: none;
}

.codex-spreads {
  position: relative;
  overflow: hidden;
  border: 1px solid #bca77a;
  border-radius: 3px 8px 8px 3px;
  background: #f3ead6;
}

.codex-spread {
  position: relative;
  display: grid;
  min-height: 31rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #f3ead6;
  color: #17201d;
}

.codex-spread + .codex-spread {
  border-top: 1px solid #bca77a;
}

.desktop-codex[data-story-ready="true"] .codex-book,
.desktop-codex[data-story-ready="true"] .codex-spreads,
.desktop-codex[data-story-ready="true"] .codex-spread {
  height: min(31rem, calc(100svh - 10rem));
  min-height: 28rem;
}

.desktop-codex[data-story-ready="true"] .codex-spread {
  position: absolute;
  inset: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(3%) rotateY(3deg);
  transform-origin: left center;
  visibility: hidden;
  transition: opacity 240ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1), visibility 240ms step-end;
}

.desktop-codex[data-story-ready="true"] .codex-spread[data-state="past"] {
  transform: translateX(-3%) rotateY(-3deg);
  transform-origin: right center;
}

.desktop-codex[data-story-ready="true"] .codex-spread.is-active {
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) rotateY(0);
  visibility: visible;
  transition: opacity 240ms ease, transform 420ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0ms step-start;
}

.book-leaf {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 2.4rem;
}

.book-leaf:first-child {
  border-right: 1px solid #d0c29f;
  background: #eadfc3;
}

.book-copy-leaf,
.book-heading-leaf,
.book-final-leaf,
.book-faq-leaf {
  display: grid;
  align-content: center;
}

.book-kicker {
  margin: 0 0 0.65rem;
  color: #8c480f;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.book-leaf h2 {
  margin: 0;
  color: #17201d;
  font-family: var(--font-display);
  font-size: 2.45rem;
  line-height: 1.02;
}

.book-leaf h3 {
  letter-spacing: 0;
}

.book-lede,
.book-heading-leaf > p:last-of-type,
.book-final-leaf > p:not(.book-kicker) {
  margin: 1rem 0 0;
  color: #505b55;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.58;
}

.book-lede.compact {
  font-size: 0.84rem;
}

.book-cover-leaf {
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
}

.book-emblem {
  display: grid;
  justify-items: center;
  color: #17201d;
  font-family: var(--font-brand);
  font-size: 1.3rem;
}

.book-emblem img {
  width: 6.2rem;
  height: 6.2rem;
  filter: drop-shadow(0 8px 10px rgba(129, 64, 12, 0.22));
}

.book-door {
  position: relative;
  align-self: end;
  width: 8rem;
  height: 10.5rem;
  border: 0.65rem solid #2e3b36;
  border-bottom-width: 0.9rem;
  border-radius: 5rem 5rem 2px 2px;
  background: #4f675d;
  box-shadow: 0.65rem 0.65rem 0 #c9b88d;
}

.book-door::before {
  position: absolute;
  top: 1.25rem;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: #25322d;
  content: "";
}

.book-door span {
  position: absolute;
  top: 5.8rem;
  left: 50%;
  width: 0.7rem;
  height: 1.2rem;
  border-radius: 50% 50% 2px 2px;
  background: #17201d;
  transform: translateX(-50%);
}

.book-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.book-actions a {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #17201d;
  border-radius: 4px;
  background: #17201d;
  color: #fffaf0;
  padding: 0.65rem 0.85rem;
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
}

.book-actions a + a {
  background: transparent;
  color: #17201d;
}

.book-actions.vertical {
  width: min(100%, 15rem);
  flex-direction: column;
}

.book-proof {
  display: flex;
  gap: 0.45rem 0.8rem;
  flex-wrap: wrap;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.book-proof li {
  color: #59645f;
  font-size: 0.66rem;
  font-weight: 800;
}

.book-proof li::before {
  color: #27745a;
  content: "• ";
}

.book-board-leaf {
  display: grid;
  place-items: center;
}

.guess-demo {
  width: min(100%, 19rem);
}

.guess-demo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid #9e9275;
  padding-bottom: 0.55rem;
}

.guess-demo-head span {
  color: #7a6e58;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.guess-demo-head strong {
  color: #26322d;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}

.guess-demo-grid {
  display: grid;
  gap: 0.55rem;
}

.guess-demo-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.42rem;
}

.guess-demo-row span {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid #7e8983;
  border-radius: 4px;
  background: #d8dfda;
  color: #17201d;
  box-shadow: 0 4px 0 #b5a783;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.guess-demo-row span.correct {
  border-color: #21664f;
  background: #27745a;
  color: #fff;
}

.guess-demo-row span.present {
  border-color: #a45f18;
  background: #d8aa54;
  color: #17201d;
}

.guess-demo-row span.absent {
  border-color: #7e8983;
  background: #d8dfda;
}

.feedback-list {
  display: grid;
  gap: 0;
  margin: 1.15rem 0 0;
}

.feedback-list > div {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.7rem;
  border-top: 1px solid #cfc1a0;
  padding: 0.6rem 0;
}

.feedback-list dt {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 900;
}

.feedback-list dd {
  margin: 0;
  color: #59645f;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.4;
}

.feedback-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
  background: #d8dfda;
}

.feedback-dot.correct {
  background: #27745a;
}

.feedback-dot.present {
  background: #d8aa54;
}

.book-heading-leaf {
  align-content: center;
}

.book-heading-leaf > p:not(.book-kicker) {
  color: #55615b;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.58;
}

.book-list-leaf {
  display: grid;
  align-content: center;
}

.book-mode-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-mode-list li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.8rem;
  border-top: 1px solid #cfc1a0;
  padding: 0.78rem 0;
}

.book-mode-list li:last-child {
  border-bottom: 1px solid #cfc1a0;
}

.book-mode-list > li > span,
.book-note-list article > span {
  color: #8c480f;
  font-size: 0.64rem;
  font-weight: 900;
}

.book-mode-list h3,
.book-note-list h3,
.book-article-list h3 {
  margin: 0;
  color: #202924;
  font-family: var(--font-display);
  font-size: 1rem;
}

.book-mode-list p,
.book-note-list p,
.book-article-list p {
  margin: 0.25rem 0 0;
  color: #59645f;
  font-size: 0.68rem;
  font-weight: 620;
  line-height: 1.42;
}

.book-note-list {
  display: grid;
}

.book-note-list article {
  display: grid;
  grid-template-columns: 2rem 1fr;
  border-top: 1px solid #cfc1a0;
  padding: 0.9rem 0;
}

.book-note-list article:last-child {
  border-bottom: 1px solid #cfc1a0;
}

.book-note-list article h3,
.book-note-list article p {
  grid-column: 2;
}

.book-directus {
  max-height: 7rem;
  overflow: hidden;
  color: #59645f;
  font-size: 0.72rem;
}

.book-article-list {
  display: grid;
}

.book-article-list article {
  position: relative;
  border-top: 1px solid #cfc1a0;
  padding: 0.65rem 1.4rem 0.65rem 0;
}

.book-article-list article:last-child {
  border-bottom: 1px solid #cfc1a0;
}

.book-article-list time {
  color: #8c480f;
  font-size: 0.58rem;
  font-weight: 850;
}

.book-article-list h3 {
  font-size: 0.92rem;
}

.book-article-list h3 a {
  text-decoration: none;
}

.book-article-list p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-article-list article::after {
  position: absolute;
  top: 50%;
  right: 0.15rem;
  color: #27745a;
  content: "→";
  transform: translateY(-50%);
}

.book-faq-leaf {
  align-content: start;
}

.book-faq-leaf > h2 {
  font-size: 2rem;
}

.book-faq-leaf dl {
  margin: 0.8rem 0 0;
}

.book-faq-leaf dl > div {
  border-top: 1px solid #c7b895;
  padding: 0.55rem 0;
}

.book-faq-leaf dt {
  color: #202924;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
}

.book-faq-leaf dd {
  margin: 0.22rem 0 0;
  color: #59645f;
  font-size: 0.64rem;
  font-weight: 620;
  line-height: 1.38;
}

.book-final-leaf {
  justify-items: start;
}

.book-final-leaf img {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 0.7rem;
  filter: drop-shadow(0 6px 8px rgba(129, 64, 12, 0.22));
}

.book-folio {
  position: absolute;
  z-index: 8;
  bottom: 0.7rem;
  color: #7f735c;
  font-family: var(--font-display);
  font-size: 0.65rem;
}

.book-folio.left {
  left: 1rem;
}

.book-folio.right {
  right: 1rem;
}

.codex-progress {
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.codex-progress button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 1px solid #4e5d55;
  border-radius: 50%;
  background: #101714;
  color: #9faca5;
  cursor: pointer;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 850;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.codex-progress button:hover,
.codex-progress button:focus-visible,
.codex-progress button[aria-current="step"] {
  border-color: #d8aa54;
  color: #f3ca79;
  transform: translateY(-2px);
}

.codex-triggers {
  display: none;
}

.desktop-codex[data-story-ready="true"] .codex-triggers {
  display: block;
  grid-column: 2;
  grid-row: 1;
}

.desktop-codex[data-story-ready="true"] .codex-triggers > span {
  display: block;
  height: 96svh;
}

@media (max-width: 1000px) and (min-width: 761px), (max-height: 720px) and (min-width: 761px) {
  .codex-stage {
    grid-template-rows: 4rem minmax(0, 1fr) 3.75rem;
  }

  .codex-book {
    width: min(55rem, calc(100vw - 4rem));
  }

  .desktop-codex[data-story-ready="true"] .codex-book,
  .desktop-codex[data-story-ready="true"] .codex-spreads,
  .desktop-codex[data-story-ready="true"] .codex-spread {
    height: min(28rem, calc(100svh - 8.75rem));
    min-height: 24rem;
  }

  .book-leaf {
    padding: 1.65rem;
  }

  .book-leaf h2 {
    font-size: 2rem;
  }

  .book-lede,
  .book-heading-leaf > p:last-of-type,
  .book-final-leaf > p:not(.book-kicker) {
    font-size: 0.76rem;
  }

  .book-mode-list li,
  .book-note-list article {
    padding-block: 0.55rem;
  }

  .book-faq-leaf dl > div {
    padding-block: 0.38rem;
  }

  .guess-demo {
    width: min(100%, 16rem);
  }
}

@media (max-width: 760px) {
  .landing-body {
    width: 100%;
    height: 100svh;
    overflow: hidden;
    overscroll-behavior: none;
    background: #060908;
  }

  .landing-experience {
    width: 100%;
    height: 100svh;
    min-height: 0;
    overflow: hidden;
  }

  .desktop-codex {
    display: none;
  }

  .mobile-lobby {
    position: relative;
    display: grid;
    width: 100%;
    height: 100svh;
    min-height: 0;
    grid-template-rows: auto minmax(7rem, 1fr) auto auto auto;
    gap: 0.65rem;
    overflow: hidden;
    background: #060908;
    color: #f4ecd8;
    padding: max(0.8rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(0.65rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  }

  .mobile-locale,
  .mobile-help-toggle {
    position: absolute;
    z-index: 12;
    top: max(0.85rem, env(safe-area-inset-top));
    display: grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border: 1px solid #9d7025;
    border-radius: 50%;
    background: #080c0a;
    color: #e3b85e;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 850;
    text-decoration: none;
  }

  .mobile-locale {
    left: max(1rem, env(safe-area-inset-left));
  }

  .mobile-help-toggle {
    right: max(1rem, env(safe-area-inset-right));
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1rem;
  }

  .mobile-brand-block {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .mobile-brand-block img {
    width: 3.6rem;
    height: 3.6rem;
    filter: drop-shadow(0 7px 10px rgba(216, 170, 84, 0.25));
  }

  .mobile-brand-block h1 {
    margin: -0.15rem 0 0;
    color: #f8f1df;
    font-family: var(--font-brand);
    font-size: 2.25rem;
    line-height: 1;
  }

  .mobile-brand-block p {
    margin: 0.35rem 0 0;
    color: #d0c7b5;
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
  }

  .mobile-brand-block > span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
    color: #a58d65;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-brand-block > span::before,
  .mobile-brand-block > span::after {
    width: 1.5rem;
    height: 1px;
    background: #6b5128;
    content: "";
  }

  .mobile-gate-scene {
    position: relative;
    width: min(78vw, 19rem);
    min-height: 7rem;
    justify-self: center;
    overflow: hidden;
  }

  .mobile-gate-arch {
    position: absolute;
    top: 0.45rem;
    bottom: -1.5rem;
    left: 50%;
    width: 76%;
    border: 0.5rem solid #29332e;
    border-bottom: 0;
    border-radius: 50% 50% 0 0;
    background: #111814;
    box-shadow: inset 0 0 0 1px #5b4930, 0 0 2.5rem rgba(216, 170, 84, 0.13);
    transform: translateX(-50%);
  }

  .mobile-gate-arch::before,
  .mobile-gate-arch::after {
    position: absolute;
    top: 22%;
    bottom: 0;
    width: 0.65rem;
    border: 1px solid #493a29;
    background: #171f1b;
    content: "";
  }

  .mobile-gate-arch::before {
    left: -1.7rem;
  }

  .mobile-gate-arch::after {
    right: -1.7rem;
  }

  .mobile-gate-door {
    position: absolute;
    z-index: 2;
    bottom: 0;
    width: 35%;
    height: 72%;
    border: 1px solid #7d5d2d;
    background: #101512;
    box-shadow: 0 0 1.5rem rgba(216, 170, 84, 0.15);
  }

  .mobile-gate-door.left {
    left: 15%;
    transform: perspective(16rem) rotateY(28deg);
    transform-origin: left;
  }

  .mobile-gate-door.right {
    right: 15%;
    transform: perspective(16rem) rotateY(-28deg);
    transform-origin: right;
  }

  .mobile-gate-path {
    position: absolute;
    z-index: 1;
    right: 37%;
    bottom: -0.3rem;
    left: 37%;
    height: 78%;
    border-right: 1px solid #b27e32;
    border-left: 1px solid #b27e32;
    background: #392d1a;
    box-shadow: 0 0 2.8rem rgba(236, 180, 74, 0.38);
  }

  .mobile-gate-seal {
    position: absolute;
    z-index: 4;
    top: 0;
    left: 50%;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border: 1px solid #a9792e;
    border-radius: 50%;
    background: #090c0b;
    color: #e3b85e;
    font-family: var(--font-brand);
    font-size: 0.78rem;
    transform: translateX(-50%);
  }

  .mobile-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #29332e;
    border-bottom: 1px solid #29332e;
    padding: 0.55rem 0;
  }

  .mobile-feature-grid > div {
    display: grid;
    min-width: 0;
    justify-items: center;
    border-right: 1px solid #29332e;
    padding: 0 0.25rem;
    text-align: center;
  }

  .mobile-feature-grid > div:last-child {
    border-right: 0;
  }

  .mobile-feature-grid span {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    place-items: center;
    border: 1px solid #9d7025;
    border-radius: 50%;
    color: #e3b85e;
    font-size: 0.55rem;
    font-weight: 900;
  }

  .mobile-feature-grid p {
    margin: 0.35rem 0 0;
    color: #d4cbb9;
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .mobile-lobby-actions {
    display: grid;
    gap: 0.55rem;
  }

  .mobile-command {
    display: grid;
    width: 100%;
    min-height: 2.85rem;
    place-items: center;
    border: 1px solid #b58536;
    border-radius: 3px;
    color: #f8f1df;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
  }

  .mobile-command.primary {
    background: #dbc28d;
    color: #1c211e;
    box-shadow: inset 0 0 0 3px #161d19, 0 4px 0 #080a09;
  }

  .mobile-command.secondary {
    background: #080c0a;
  }

  .mobile-lobby-motto {
    margin: 0;
    color: #877c68;
    font-family: var(--font-display);
    font-size: 0.65rem;
    text-align: center;
  }

  .mobile-help-panel {
    position: absolute;
    z-index: 20;
    top: max(3.5rem, env(safe-area-inset-top));
    right: 1rem;
    left: 1rem;
    height: min(34rem, calc(100svh - 4.5rem));
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    align-content: center;
    overflow: hidden;
    border: 1px solid #916a2d;
    background: #111814;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.65);
    padding: 1.3rem;
  }

  .mobile-help-panel[hidden] {
    display: none;
  }

  .mobile-help-panel > button {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    border: 1px solid #68766f;
    border-radius: 50%;
    background: transparent;
    color: #f4ecd8;
    cursor: pointer;
    font: inherit;
    font-size: 1.2rem;
  }

  .mobile-help-panel h2 {
    max-width: 12ch;
    margin: 0;
    color: #f8f1df;
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.05;
  }

  .mobile-help-panel > p:last-child {
    margin: 0.8rem 0 0;
    color: #bac5be;
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.45;
  }

  .mobile-help-panel .guess-demo {
    align-self: center;
    justify-self: center;
    margin-top: 0.9rem;
  }

  .mobile-help-panel .guess-demo-head span,
  .mobile-help-panel .guess-demo-head strong {
    color: #d6cbb5;
  }

  .guess-demo.compact {
    width: min(100%, 15rem);
  }

  .guess-demo.compact .guess-demo-row span {
    font-size: 0.95rem;
  }
}

@media (max-width: 760px) and (max-height: 680px) {
  .mobile-lobby {
    gap: 0.4rem;
    padding-top: max(0.55rem, env(safe-area-inset-top));
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
  }

  .mobile-locale,
  .mobile-help-toggle {
    top: max(0.6rem, env(safe-area-inset-top));
    width: 2rem;
    height: 2rem;
  }

  .mobile-brand-block img {
    width: 2.7rem;
    height: 2.7rem;
  }

  .mobile-brand-block h1 {
    font-size: 1.8rem;
  }

  .mobile-brand-block p {
    margin-top: 0.2rem;
    font-size: 0.68rem;
  }

  .mobile-brand-block > span {
    margin-top: 0.2rem;
    font-size: 0.5rem;
  }

  .mobile-feature-grid {
    padding-block: 0.35rem;
  }

  .mobile-feature-grid span {
    width: 1.45rem;
    height: 1.45rem;
  }

  .mobile-feature-grid p {
    margin-top: 0.2rem;
    font-size: 0.54rem;
  }

  .mobile-command {
    min-height: 2.35rem;
    font-size: 0.76rem;
  }

  .mobile-lobby-actions {
    gap: 0.35rem;
  }

  .mobile-lobby-motto {
    font-size: 0.56rem;
  }
}

@media (max-width: 340px), (max-width: 760px) and (max-height: 570px) {
  .mobile-brand-block > span,
  .mobile-lobby-motto {
    display: none;
  }

  .mobile-lobby {
    grid-template-rows: auto minmax(5rem, 1fr) auto auto;
  }

  .mobile-feature-grid p {
    font-size: 0.5rem;
  }

  .mobile-help-panel {
    top: 2.8rem;
    right: 0.65rem;
    left: 0.65rem;
    height: calc(100svh - 3.45rem);
    padding: 1rem;
  }

  .mobile-help-panel h2 {
    font-size: 1.4rem;
  }

  .mobile-help-panel > p:last-child {
    font-size: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
