*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--background);
  color: var(--text);
  font-size: 18px;
  line-height: 1.7;
  min-width: 320px;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary-ink); }
a:hover { color: var(--accent-deep); }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 400;
}
.skip:focus { left: 8px; }
.container {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}
.container-narrow { width: min(760px, calc(100% - 32px)); }
section[id] { scroll-margin-top: 88px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 250;
  background: rgba(255, 251, 239, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.masthead {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  background: var(--surface-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}
.brand-name {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 15px;
  white-space: nowrap;
}
.brand-tag {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.category-rail {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 14px;
  min-width: 0;
}
.category-rail a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}
.category-rail a[aria-current="page"],
.category-rail a.is-active {
  border-bottom-color: var(--accent);
}
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  background: var(--accent);
  color: #1a1204;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid #8A5000;
}
.header-cta:hover { color: #1a1204; filter: brightness(0.96); }
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  background: var(--surface);
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 500;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  margin: 4px auto;
}
.mobile-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(86vw, 340px);
  background: var(--background);
  border-left: 1px solid var(--border);
  z-index: 200;
  padding: 128px 22px 32px;
  transform: translateX(100%);
  transition: transform 0.2s ease, visibility 0.2s ease;
  overflow: auto;
  visibility: hidden;
  pointer-events: none;
}
.mobile-drawer.is-open {
  transform: none;
  visibility: visible;
  pointer-events: auto;
}
.drawer-close {
  position: absolute;
  top: 72px;
  left: 16px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
html.is-drawer-open,
html.is-drawer-open body { overflow: hidden; }
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  white-space: nowrap;
}
.drawer-cta {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.hero {
  padding: 28px 0 10px;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 28px;
  align-items: stretch;
}
.hero-copy { min-width: 0; }
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  border-bottom: 2px solid var(--accent);
  margin-bottom: 12px;
}
.hero h1,
#hero-h {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--ink);
  max-width: 18ch;
}
.lede,
.hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 20px;
  max-width: 58ch;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary,
.btn-play {
  background: var(--accent);
  color: #1a1204;
  border-color: #8A5000;
}
.btn-primary:hover,
.btn-play:hover { color: #1a1204; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.frame {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 8px;
  box-shadow: var(--paper-shadow);
  min-width: 0;
}
.frame img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.frame figcaption,
.caption {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 4px 2px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin: 22px 0 8px;
}
.score-mod {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}
.score-mod:last-child { border-right: 0; }
.score-mod span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.score-mod strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  color: var(--ink);
}

.band { padding: 42px 0; }
.band + .band { border-top: 1px solid var(--border); }
.band-paper { background: var(--surface); }
.band-warm { background: var(--surface-2); }
.band-ink {
  background: #142230;
  color: #F6F1E4;
}
.band-ink h2, .band-ink p, .band-ink a { color: #F6F1E4; }
.band-ink .muted { color: #C9D0D6; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr);
  gap: 24px;
  margin-bottom: 22px;
  align-items: end;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  margin: 6px 0 0;
  letter-spacing: -0.02em;
}
.label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.story-rail-wrap { position: relative; }
.story-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.story-card {
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
  min-width: 0;
}
.story-card time {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.story-card h3 { margin: 8px 0; font-size: 18px; }
.story-card p { margin: 0; color: var(--muted); font-size: 15px; }
.rail-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.rail-nav button {
  min-width: 44px;
  min-height: 36px;
  border: 1px solid var(--rule);
  background: var(--surface);
  font-weight: 800;
  cursor: pointer;
}

.ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.ledger article {
  min-width: 0;
  padding: 18px 16px;
  border-right: 1px solid var(--border);
}
.ledger article:last-child { border-right: 0; }
.ledger h3 { margin: 0 0 8px; font-size: 18px; }
.ledger p { margin: 0; color: var(--muted); font-size: 15px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: start;
}
.split.flip { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.split > * { min-width: 0; }
.prose p { margin: 0 0 14px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose h2, .prose h3 { line-height: 1.2; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.step-num {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--surface-2);
}
.step-card, .data-card, .loose-card, .card {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 18px;
  border-radius: var(--radius);
}

.voice {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 24px;
}
blockquote.pull {
  margin: 0;
  padding: 8px 0 8px 18px;
  border-left: 4px solid var(--accent);
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}
.method-note {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px;
}

.shelf {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 20px;
}
.shelf-index { list-style: none; margin: 0; padding: 0; }
.shelf-index a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
}
.shelf-pane {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 20px;
}

.data-table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
.data-table th, .data-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.data-table th { background: var(--surface-2); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }

.feed {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
}
.feed-lead { min-width: 0; }
.feed-rail { list-style: none; margin: 0; padding: 0; }
.feed-rail li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feed-rail a { text-decoration: none; color: var(--ink); font-weight: 700; }

.def-list { margin: 0; }
.def-list div {
  display: grid;
  grid-template-columns: minmax(110px, 180px) minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.def-list dt { font-weight: 800; color: var(--ink); }

.faq-grid, .faq { display: grid; gap: 10px; }
.faq details, details.q-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 14px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
}

.index-list {
  columns: 2;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.index-list li {
  break-inside: avoid;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.index-list a { text-decoration: none; color: var(--ink); font-weight: 700; }

.page-hero { padding: 28px 0 8px; }
.page-hero .frame img { aspect-ratio: 16 / 9; object-fit: cover; }
.card { background: var(--surface); border: 1px solid var(--rule); padding: 18px; }
.data-card, .step-card, .step-num, .loose-card, .band, .faq-grid { border-radius: var(--radius); }
.page-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  margin: 8px 0 14px;
  max-width: 20ch;
}
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.inline-image-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin: 22px 0;
  align-items: center;
}
.inline-image-row img,
.inline-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--rule);
  padding: 6px;
  background: var(--surface);
}

.site-footer {
  background: #142230;
  color: #E8EDF1;
  padding: 42px 0 28px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.site-footer a { color: #E8EDF1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 8px; }
.fineprint {
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  color: #C9D0D6;
  font-size: 13px;
}

.mobile-sticky {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 240;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 251, 239, 0.96);
  border-top: 1px solid var(--border);
}
.mobile-sticky .btn-play {
  width: 100%;
}

.disclaimer {
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 14px 16px;
  background: var(--surface);
}
.support-frame {
  width: 100%;
  min-height: 640px;
  border: 1px solid var(--border);
  background: #06101c;
  display: block;
}

@media (max-width: 899px) {
  .category-rail, .header-cta { display: none; }
  .hamburger { display: inline-block; }
  .masthead { grid-template-columns: minmax(0, 1fr) auto; padding-right: 52px; }
  html.is-drawer-open .site-header { z-index: 550; }
  html.is-drawer-open .mobile-sticky { display: none !important; }
  .hero { min-height: 0; max-height: none; padding: 20px 0 24px; overflow: visible; margin-bottom: 16px; }
  .hero-grid, .split, .split.flip, .voice, .shelf, .feed, .section-head, .inline-image-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero h1, #hero-h { font-size: 32px; max-width: none; }
  .hero-lede { font-size: 16px; }
  .hero-trust { display: none !important; }
  .score-strip, .ledger, .footer-grid, .index-list { grid-template-columns: minmax(0, 1fr); columns: 1; }
  .score-mod, .ledger article { border-right: 0; border-bottom: 1px solid var(--border); }
  .def-list div { grid-template-columns: minmax(0, 1fr); }
  .mobile-sticky { display: block; }
  body.has-sticky { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .hero img { height: auto; width: 100%; object-fit: cover; }
  .frame img { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .story-rail { display: block; overflow: visible; }
  .story-card { margin-bottom: 12px; }
  .mobile-drawer { transition: none; }
}
