:root {
  --ink: #071522;
  --ink-soft: #304250;
  --muted: #64717a;
  --paper: #f8f5ef;
  --paper-strong: #fffdf8;
  --sand: #e8d4ad;
  --sand-deep: #c59a62;
  --teal: #006d70;
  --teal-soft: #d9eeeb;
  --coral: #db7656;
  --gold: #d4a941;
  --blue: #2076c9;
  --line: rgba(7, 21, 34, 0.14);
  --shadow: 0 24px 80px rgba(7, 21, 34, 0.16);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 245, 239, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(7, 21, 34, 0.08);
}

.nav-wrap {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 820;
  letter-spacing: 0;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--paper-strong);
  background:
    radial-gradient(circle at 30% 25%, #9bdad1 0 16%, transparent 17%),
    linear-gradient(135deg, var(--teal), #103442);
  box-shadow: 0 10px 26px rgba(0, 109, 112, 0.24);
  font-size: 18px;
}

.brand small {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
}

.brand span:last-child {
  min-width: 0;
}

.brand[aria-current="page"] .brand-mark {
  box-shadow:
    0 0 0 3px rgba(0, 109, 112, 0.16),
    0 10px 26px rgba(0, 109, 112, 0.24);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  border-radius: var(--radius);
  color: var(--ink);
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 720;
  color: var(--ink-soft);
  padding: 10px 9px;
  border-radius: var(--radius);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  background: rgba(0, 109, 112, 0.09);
  color: var(--teal);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(0, 109, 112, 0.28);
}

.nav-action {
  color: var(--ink-soft);
}

.hero {
  min-height: calc(100vh - 76px);
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(248, 245, 239, 0.96) 0%, rgba(248, 245, 239, 0.78) 34%, rgba(248, 245, 239, 0.2) 62%, rgba(7, 21, 34, 0.18) 100%),
    linear-gradient(0deg, rgba(7, 21, 34, 0.52) 0%, rgba(7, 21, 34, 0) 38%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) 24px 32px;
  display: grid;
  align-content: space-between;
  gap: 48px;
}

.hero-copy {
  max-width: 680px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(3.5rem, 8.6vw, 8.4rem);
  line-height: 0.92;
  letter-spacing: 0;
  margin-bottom: 22px;
  max-width: 100%;
}

.page-hero h1 {
  font-size: clamp(2.85rem, 5.8vw, 6rem);
}

.long-copy-hero h1 {
  font-size: clamp(2.55rem, 5vw, 5.2rem);
}

.lead {
  font-size: clamp(1.12rem, 2vw, 1.48rem);
  max-width: 720px;
  color: var(--ink-soft);
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 780;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(7, 21, 34, 0.08);
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.hero-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(7, 31, 36, 0.88);
  color: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-panel a {
  min-height: 112px;
  padding: 24px;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-panel a:last-child {
  border-right: 0;
}

.hero-panel strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.hero-panel span {
  color: rgba(255, 255, 255, 0.78);
}

.band {
  padding: clamp(64px, 9vw, 120px) 24px;
}

.band.paper {
  background: var(--paper-strong);
}

.band.dark {
  background: #071f24;
  color: #f5fbf9;
}

.band.sand {
  background:
    linear-gradient(180deg, rgba(232, 212, 173, 0.32), rgba(248, 245, 239, 0)),
    var(--paper);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.6fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: end;
  margin-bottom: 42px;
}

.section-head h2,
.split h2,
.feature-copy h2 {
  font-size: clamp(2rem, 4.8vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
  margin-bottom: 0;
}

.split h2,
.feature-copy h2 {
  margin-bottom: 22px;
}

.section-head p,
.split p,
.feature-copy p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.dark .section-head p,
.dark .split p,
.dark .feature-copy p,
.dark .muted {
  color: rgba(245, 251, 249, 0.72);
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.path-card,
.system-card,
.resource-card,
.role-card,
.spectrum-card,
.loop-step,
.milestone-card {
  background: var(--paper-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 220px;
  text-decoration: none;
  box-shadow: 0 16px 48px rgba(7, 21, 34, 0.06);
}

.path-card {
  display: grid;
  align-content: space-between;
}

.path-card h3,
.system-card h3,
.resource-card h3 {
  margin-bottom: 12px;
  font-size: 1.32rem;
}

.path-card p,
.system-card p,
.resource-card p,
.role-card p,
.spectrum-card p,
.loop-step p,
.milestone-card p {
  color: var(--muted);
}

.path-card:hover,
.resource-card:hover {
  border-color: rgba(0, 109, 112, 0.5);
  transform: translateY(-3px);
}

.card-index {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 820;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(320px, 1fr);
  gap: clamp(28px, 7vw, 90px);
  align-items: center;
}

.split.reverse {
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.78fr);
}

.split.reverse .feature-copy {
  order: 2;
}

.feature-image {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--sand);
}

.feature-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.feature-image.wide img {
  aspect-ratio: 16 / 10;
}

.system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.role-grid,
.spectrum-grid,
.truth-grid,
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.authority-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.role-card h3,
.spectrum-card h3,
.loop-step h3,
.milestone-card h3 {
  font-size: 1.28rem;
  line-height: 1.12;
}

.role-card strong {
  color: var(--ink);
}

.spectrum-card span {
  display: block;
  color: var(--teal);
}

.evidence-loop {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.loop-step span {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 820;
  margin-bottom: 18px;
}

.system-card {
  background: rgba(255, 253, 248, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.system-card p {
  color: rgba(245, 251, 249, 0.72);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.72);
  font-size: 0.88rem;
  font-weight: 700;
}

.dark .pill {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(245, 251, 249, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
}

.pathfinder {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-list button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border-radius: var(--radius);
  padding: 16px;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.choice-list button[aria-selected="true"] {
  background: var(--teal-soft);
  color: #043c3f;
  border-color: rgba(0, 109, 112, 0.2);
}

.choice-panel {
  min-height: 320px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(0, 109, 112, 0.12), rgba(219, 118, 86, 0.08)),
    var(--paper);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 54px);
}

.choice-panel h3 {
  font-size: clamp(1.8rem, 3.4vw, 3.4rem);
  line-height: 1.02;
}

.timeline {
  display: grid;
  gap: 14px;
  counter-reset: phase;
}

.timeline-item {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 18px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--paper-strong);
  border-radius: var(--radius);
}

.timeline-item::before {
  counter-increment: phase;
  content: counter(phase, decimal-leading-zero);
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 820;
}

.quote-panel {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.quote-panel p {
  font-size: clamp(2rem, 5vw, 5.4rem);
  line-height: 0.98;
  color: #f5fbf9;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.resource-card {
  min-height: 0;
}

.resource-card.feature-card {
  grid-column: span 2;
  background: #071f24;
  border-color: rgba(255, 255, 255, 0.16);
  color: #f5fbf9;
}

.resource-card.feature-card p {
  color: rgba(245, 251, 249, 0.74);
}

.resource-card.feature-card .card-index {
  display: block;
  margin-bottom: 18px;
  color: var(--gold);
}

.guide-note {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.guide-note:last-child {
  border-bottom: 1px solid var(--line);
}

.guide-note h3 {
  font-size: clamp(1.4rem, 2.6vw, 2.6rem);
  line-height: 1.05;
}

.guide-note p {
  max-width: 820px;
  color: var(--ink-soft);
}

.template-block {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: 0 16px 48px rgba(7, 21, 34, 0.06);
}

.template-block h3 {
  margin-bottom: 12px;
}

.template-block ul,
.template-block ol {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-link {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.source-link strong {
  color: var(--teal);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 9vw, 130px) 24px clamp(56px, 8vw, 100px);
  background:
    linear-gradient(135deg, rgba(217, 238, 235, 0.9), rgba(248, 245, 239, 0.8)),
    var(--paper);
}

.cinematic-hero {
  min-height: calc(88vh - 76px);
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  color: #f5fbf9;
}

.page-hero.cinematic-hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(40px, 6vw, 76px);
}

.cinematic-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 21, 34, 0.9), rgba(7, 21, 34, 0.42) 48%, rgba(7, 21, 34, 0.08)),
    linear-gradient(0deg, rgba(7, 21, 34, 0.82), rgba(7, 21, 34, 0.1) 48%);
}

.cinematic-hero .wrap {
  position: relative;
  z-index: 1;
  width: 100%;
}

.cinematic-hero .hero-media img {
  object-position: center;
}

.cinematic-hero h1,
.cinematic-hero .lead {
  color: #f5fbf9;
}

.cinematic-hero .mini-map {
  background: rgba(7, 31, 36, 0.84);
  border-color: rgba(255, 255, 255, 0.2);
}

.cinematic-hero .mini-map a {
  color: rgba(245, 251, 249, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.page-hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.55fr);
  gap: clamp(28px, 7vw, 90px);
  align-items: end;
}

.page-hero .mini-map {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.74);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 18px 48px rgba(7, 21, 34, 0.08);
}

.mini-map a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 760;
  color: var(--ink-soft);
}

.mini-map a:last-child {
  border-bottom: 0;
}

.page-hero.cinematic-hero .mini-map {
  background: rgba(7, 31, 36, 0.84);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 70px rgba(7, 21, 34, 0.24);
}

.page-hero.cinematic-hero .mini-map a {
  color: rgba(245, 251, 249, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 54px;
}

.prev-next a {
  display: grid;
  gap: 6px;
  padding: 22px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
}

.dark .prev-next a {
  color: var(--ink);
}

.prev-next span {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .muted {
  color: rgba(245, 251, 249, 0.72);
}

.site-footer {
  background: var(--ink);
  color: #f5fbf9;
  padding: 54px 24px;
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: rgba(245, 251, 249, 0.78);
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 28;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(7, 21, 34, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 76px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--paper-strong);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
  }

  body.menu-open .site-nav {
    display: flex;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 64px;
  }

  .hero-panel,
  .path-grid,
  .system-grid,
  .role-grid,
  .spectrum-grid,
  .truth-grid,
  .milestone-grid,
  .authority-grid,
  .evidence-loop,
  .resource-grid,
  .section-head,
  .split,
  .split.reverse,
  .page-hero .wrap,
  .pathfinder,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .resource-card.feature-card {
    grid-column: span 1;
  }

  .split.reverse .feature-copy {
    order: 0;
  }

  .hero-panel a {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  .hero-panel a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .nav-wrap,
  .hero-inner,
  .band,
  .page-hero,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav-wrap {
    width: min(100%, 390px);
    margin: 0;
  }

  h1 {
    font-size: clamp(2.75rem, 13vw, 4rem);
    line-height: 0.97;
    overflow-wrap: break-word;
  }

  .lead {
    font-size: 1.03rem;
    max-width: 100%;
  }

  .hero-copy,
  .hero-actions,
  .hero-panel {
    max-width: 354px;
  }

  .hero-panel {
    width: 100%;
  }

  .hero::after {
    background:
      linear-gradient(90deg, rgba(248, 245, 239, 0.96), rgba(248, 245, 239, 0.76)),
      linear-gradient(0deg, rgba(7, 21, 34, 0.45), rgba(7, 21, 34, 0));
  }

  .hero-media img {
    object-position: 70% center;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

  .brand span {
    max-width: 160px;
  }
}
