/* ================================================================
   GYAPOTAI DESIGN SYSTEM
   Direct-deploy static CSS — no build step or external dependency.
   ================================================================ */

:root {
  /* Brand colors */
  --forest-950: #0a2f27;
  --forest-900: #123f34;
  --forest-800: #185141;
  --forest-700: #246b54;
  --teal-700: #18636a;
  --teal-500: #8bd3d3;
  --mustard-700: #805400;
  --mustard-500: #e4b64e;
  --mustard-200: #f7ecc7;
  --terra-600: #994f2f;
  --terra-200: #f3e1d5;
  --rose-600: #96382f;
  --rose-200: #f4deda;
  --mint-200: #dceee6;
  --aqua-200: #dceff0;
  --paper: #f7f7f2;
  --white: #ffffff;
  --ink: #163a31;
  --ink-soft: #526860;
  --line: #c9d8d1;

  /* Typography */
  --font-sans: "Aptos", "Segoe UI", Arial, sans-serif;
  --font-mono: "Aptos Mono", "Cascadia Mono", "Courier New", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: clamp(1.0625rem, 1.5vw, 1.25rem);
  --text-xl: clamp(1.35rem, 2.2vw, 1.75rem);
  --text-2xl: clamp(2.15rem, 5vw, 4rem);
  --text-hero: clamp(3.15rem, 6.5vw, 6rem);

  /* Spacing and geometry */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;
  --radius-sm: 0.625rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --shadow-card: 0 24px 60px rgba(10, 47, 39, 0.09);
  --container: 75rem;
  --header-height: 5rem;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--mustard-500);
  outline-offset: 4px;
  box-shadow: 0 0 0 7px var(--forest-950);
}

::selection {
  background: var(--mustard-500);
  color: var(--forest-950);
}

.container {
  width: min(calc(100% - 3rem), var(--container));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-10);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--mustard-500);
  color: var(--forest-950);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header and navigation */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(201, 216, 209, 0.72);
  background: rgba(247, 247, 242, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow 220ms ease, background 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(247, 247, 242, 0.98);
  box-shadow: 0 10px 30px rgba(10, 47, 39, 0.08);
}

.header-inner {
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--forest-900);
  text-decoration: none;
}

.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.35rem;
  border-radius: 0.85rem;
  background: var(--forest-900);
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.045em;
}

.brand-copy small {
  margin-top: 0.34rem;
  color: var(--forest-700);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.075em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
}

.desktop-nav a,
.mobile-nav a {
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 750;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.desktop-nav a:hover {
  color: var(--teal-700);
}

.desktop-nav .nav-cta,
.mobile-nav .nav-cta {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: var(--forest-900);
  color: var(--white);
}

.desktop-nav .nav-cta:hover {
  background: var(--forest-700);
  color: var(--white);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0.28rem auto;
  background: var(--forest-900);
  transition: transform 220ms var(--ease), opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-nav {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: calc(100vh - var(--header-height));
  height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  border-top: 1px solid var(--line);
  background: rgba(247, 247, 242, 0.99);
}

.mobile-nav-inner {
  display: grid;
  gap: 0;
  padding-block: 1rem 2rem;
}

.mobile-nav a {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.1rem;
}

.mobile-nav .nav-cta {
  width: fit-content;
  margin-top: 1.25rem;
  padding-inline: 1.25rem;
  border-bottom: 0;
}

/* Shared section typography */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: var(--forest-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 1.8rem;
  height: 0.18rem;
  border-radius: 999px;
  background: currentColor;
}

.eyebrow-light {
  color: var(--mustard-500);
}

.eyebrow-terra {
  color: var(--terra-600);
}

.section-heading h2 {
  max-width: 19ch;
  margin-bottom: 0;
  color: var(--forest-900);
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
  align-items: end;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

.split-heading > p {
  margin-bottom: 0.25rem;
  color: var(--ink-soft);
  font-size: var(--text-lg);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
  padding-block: clamp(4.5rem, 9vw, 8rem);
  background: var(--forest-900);
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -12rem;
  bottom: -20rem;
  width: 42rem;
  height: 42rem;
  border: 1px solid rgba(220, 169, 61, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 0 5rem rgba(220, 169, 61, 0.035), 0 0 0 10rem rgba(220, 169, 61, 0.025);
}

.hero-pattern {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.22;
  background-image: linear-gradient(rgba(143, 199, 181, 0.18) 1px, transparent 1px), linear-gradient(90deg, rgba(143, 199, 181, 0.13) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: linear-gradient(to bottom, transparent, black 25%, transparent 88%);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(20rem, 0.72fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.hero h1 {
  max-width: 9.5ch;
  margin-bottom: var(--space-5);
  color: var(--white);
  font-size: var(--text-hero);
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.91;
}

.hero-word {
  white-space: nowrap;
}

.hero-lead {
  max-width: 45rem;
  margin-bottom: var(--space-6);
  color: #d6e5de;
  font-size: var(--text-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--mustard-500);
  color: var(--forest-950);
}

.button-primary:hover {
  background: #edbd57;
}

.button-ghost {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.button-ghost:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.07);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 43rem;
  margin: var(--space-8) 0 0;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-facts div {
  padding-right: var(--space-4);
}

.hero-facts div + div {
  padding-left: var(--space-4);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-facts dt {
  margin-bottom: 0.2rem;
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 900;
}

.hero-facts dd {
  margin-bottom: 0;
  color: #adc8bd;
  font-size: var(--text-xs);
  line-height: 1.4;
}

.hero-card {
  position: relative;
  padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 30px 80px rgba(3, 23, 18, 0.24);
  backdrop-filter: blur(14px);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 2rem;
  width: 5rem;
  height: 0.25rem;
  border-radius: 0 0 999px 999px;
  background: var(--mustard-500);
}

.hero-card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--space-5);
  color: #b8d1c7;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.status-dot::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 0.25rem rgba(83, 174, 177, 0.13);
}

.hero-card blockquote {
  margin-bottom: var(--space-6);
  color: var(--white);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.27;
}

.decision-chain {
  display: grid;
  gap: 0;
}

.decision-chain > div {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.chain-index {
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
}

.decision-chain p {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0;
}

.decision-chain strong {
  font-size: var(--text-sm);
}

.decision-chain small {
  color: #a9c2b8;
  font-size: var(--text-xs);
}

/* Results */
.results-section {
  background: #fafaf7;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
}

.result-card {
  min-height: 22rem;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border: 1px solid rgba(22, 58, 49, 0.08);
  border-radius: var(--radius-lg);
  transition: transform 220ms var(--ease), box-shadow 220ms ease;
}

.result-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.result-card-teal { background: var(--aqua-200); }
.result-card-green { background: var(--mint-200); }
.result-card-mustard { background: var(--mustard-200); }
.result-card-terra { background: var(--terra-200); }

.result-accent {
  display: block;
  width: 3.8rem;
  height: 0.7rem;
  margin-bottom: var(--space-7);
  border-radius: 999px;
  background: var(--teal-700);
}

.result-card-green .result-accent { background: var(--forest-700); }
.result-card-mustard .result-accent { background: var(--mustard-500); }
.result-card-terra .result-accent { background: var(--terra-600); }

.result-value {
  margin-bottom: 0.35rem;
  color: var(--forest-900);
  font-family: var(--font-mono);
  font-size: clamp(2.15rem, 4vw, 3.15rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1;
}

.result-card h3 {
  min-height: 3rem;
  margin-bottom: var(--space-5);
  color: var(--forest-900);
  font-size: var(--text-base);
  font-weight: 900;
  line-height: 1.25;
}

.result-card > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.scope-note {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
  padding: 1.25rem 1.5rem;
  border-left: 0.45rem solid var(--forest-700);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: #eef5f1;
}

.scope-note-label {
  color: var(--forest-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scope-note p {
  margin-bottom: 0;
  font-size: var(--text-sm);
}

/* Timing */
.timing-section {
  background: var(--paper);
}

.timing-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 1.1fr);
  align-items: end;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.timing-intro > p {
  margin-bottom: 0.25rem;
  color: var(--ink-soft);
  font-size: var(--text-lg);
}

.timing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.timing-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: start;
  min-height: 17rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
}

.timing-early { background: var(--rose-200); }
.timing-late { background: var(--mustard-200); }
.timing-right { background: var(--mint-200); }

.timing-number {
  display: grid;
  width: 3.15rem;
  height: 3.15rem;
  place-items: center;
  border-radius: 50%;
  background: var(--rose-600);
  color: var(--white);
  font-family: var(--font-mono);
  font-weight: 900;
}

.timing-late .timing-number { background: var(--terra-600); }
.timing-right .timing-number { background: var(--forest-700); }

.timing-card h3 {
  margin: 0.65rem 0 1rem;
  color: var(--forest-900);
  font-size: var(--text-xl);
  font-weight: 900;
  line-height: 1.1;
}

.timing-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

/* Process */
.process-section {
  position: relative;
  overflow: hidden;
  background: var(--forest-950);
  color: var(--white);
}

.process-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 5vw;
  width: min(32vw, 28rem);
  height: 0.4rem;
  background: var(--mustard-500);
}

.process-heading {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: var(--space-5) var(--space-8);
  align-items: end;
  margin-bottom: var(--space-8);
}

.process-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.process-heading h2 {
  color: var(--white);
}

.process-heading > p:last-child {
  margin-bottom: 0.35rem;
  color: #aac4ba;
  font-size: var(--text-lg);
}

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

.process-list li {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-7);
  min-height: 24rem;
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.process-list li:first-child {
  padding-left: 0;
}

.process-list li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.process-list li::before {
  content: "";
  position: absolute;
  top: -0.32rem;
  left: var(--space-5);
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--mustard-500);
}

.process-list li:first-child::before {
  left: 0;
}

.process-index {
  padding-top: var(--space-5);
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
}

.process-kicker {
  margin-bottom: 0.75rem;
  color: var(--teal-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.process-list h3 {
  margin-bottom: var(--space-4);
  color: var(--white);
  font-size: var(--text-xl);
  font-weight: 850;
  line-height: 1.15;
}

.process-list li > div > p:last-child {
  margin-bottom: 0;
  color: #abc1b8;
  font-size: var(--text-sm);
}

/* Phase 2 — shared figure foundations */
.figure-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.figure-heading h3,
.subsection-heading h3 {
  margin-bottom: 0;
  color: var(--forest-900);
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.figure-kicker {
  margin-bottom: 0.55rem;
  color: var(--teal-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* SP1–SP6 */
.phase-section {
  background: #fafaf7;
}

.bridge-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: center;
  margin-bottom: var(--space-7);
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(22, 58, 49, 0.12);
  border-radius: var(--radius-md);
  background: var(--forest-900);
  color: var(--white);
}

.bridge-note-icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border-radius: 50%;
  background: var(--mustard-500);
  color: var(--forest-950);
  font-family: var(--font-mono);
  font-weight: 900;
}

.bridge-note strong {
  display: block;
  margin-bottom: 0.2rem;
}

.bridge-note p {
  margin-bottom: 0;
  color: #c5d8d0;
  font-size: var(--text-sm);
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.phase-card {
  display: flex;
  min-height: 19rem;
  flex-direction: column;
  padding: clamp(1.4rem, 2.8vw, 2rem);
  border: 1px solid rgba(22, 58, 49, 0.08);
  border-radius: var(--radius-lg);
}

.phase-card-green { background: var(--mint-200); --phase-color: var(--forest-700); }
.phase-card-teal { background: var(--aqua-200); --phase-color: var(--teal-700); }
.phase-card-terra { background: var(--terra-200); --phase-color: var(--terra-600); }
.phase-card-mustard { background: var(--mustard-200); --phase-color: var(--mustard-700); }
.phase-card-mint { background: #e9f3ee; --phase-color: var(--forest-800); }
.phase-card-rose { background: var(--rose-200); --phase-color: var(--rose-600); }

.phase-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.phase-code {
  color: var(--phase-color);
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 900;
}

.phase-bbch {
  color: var(--phase-color);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
}

.phase-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.3rem;
  margin-block: var(--space-6);
}

.phase-track::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(22, 58, 49, 0.24);
}

.phase-track i {
  position: relative;
  z-index: 1;
  width: 0.72rem;
  height: 0.72rem;
  border: 2px solid rgba(22, 58, 49, 0.35);
  border-radius: 50%;
  background: var(--paper);
}

.phase-track i.active {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: -0.16rem;
  border: 3px solid var(--paper);
  background: var(--phase-color);
  box-shadow: 0 0 0 2px var(--phase-color);
}

.phase-card h3 {
  margin-bottom: var(--space-4);
  color: var(--forest-900);
  font-size: var(--text-xl);
  font-weight: 900;
  line-height: 1.12;
}

.phase-card > p {
  margin-top: auto;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.phase-footnote {
  margin: var(--space-5) 0 0;
  padding-left: 1rem;
  border-left: 0.25rem solid var(--terra-600);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

/* CNN model and data */
.model-section {
  background: #eef4f0;
}

.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.55fr);
  gap: var(--space-5);
}

.data-flow-figure,
.split-panel,
.comparison-figure,
.parcel-figure {
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid rgba(22, 58, 49, 0.1);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 18px 45px rgba(10, 47, 39, 0.06);
}

.figure-heading > img {
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.32rem;
  border-radius: 0.7rem;
  background: var(--forest-900);
}

.data-flow {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr) auto minmax(8rem, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.data-stage {
  display: flex;
  min-height: 13rem;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: var(--aqua-200);
}

.data-stage-filter {
  background: var(--terra-200);
}

.data-stage-final {
  background: var(--forest-900);
  color: var(--white);
}

.data-stage > span {
  margin-bottom: 0.65rem;
  color: var(--teal-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.data-stage-filter > span { color: var(--terra-600); }
.data-stage-final > span { color: var(--mustard-500); }

.data-stage strong {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

.data-stage small {
  margin-top: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.45;
}

.data-stage-final small { color: #aec6bc; }

.data-operator,
.impact-operator {
  display: grid;
  place-items: center;
  color: var(--forest-700);
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 900;
}

.data-flow-figure figcaption,
.comparison-figure > figcaption,
.parcel-figure figcaption {
  margin-top: var(--space-5);
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.model-specs {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: var(--forest-900);
  color: var(--white);
}

.model-specs .figure-kicker { color: var(--mustard-500); }

.model-specs h3 {
  margin-bottom: var(--space-6);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: clamp(2.25rem, 4vw, 3.4rem);
  line-height: 1;
}

.model-specs dl {
  margin: 0;
}

.model-specs dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.model-specs dt {
  color: #a9c2b8;
  font-size: var(--text-xs);
}

.model-specs dd {
  margin: 0;
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
}

.spec-note {
  margin: var(--space-5) 0 0;
  color: #a9c2b8;
  font-size: var(--text-xs);
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(15rem, 0.6fr) minmax(0, 1.4fr);
  gap: var(--space-7);
  align-items: center;
  margin-top: var(--space-5);
}

.split-copy h3 {
  margin-bottom: 0.8rem;
  color: var(--forest-900);
  font-size: var(--text-xl);
  font-weight: 900;
  line-height: 1.15;
}

.split-copy > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.split-figure {
  margin: 0;
}

.split-figure figcaption {
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.split-bar {
  display: grid;
  grid-template-columns: 7fr 2fr 1fr;
  overflow: hidden;
  min-height: 4.5rem;
  border: 2px solid var(--forest-900);
  border-radius: var(--radius-md);
}

.split-bar span {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 2vw, 1.15rem);
  font-weight: 900;
}

.split-train { background: var(--teal-700); color: var(--white); }
.split-validation { background: var(--aqua-200); color: var(--forest-900); border-left: 2px solid var(--forest-900); }
.split-test { background: var(--forest-900); color: var(--white); }

.split-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}

.split-legend dt {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.split-legend dd {
  margin: 0.25rem 0 0 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
}

.split-legend i,
.series-legend i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 0.15rem;
}

.legend-solid { background: var(--teal-700); }
.legend-open { border: 2px solid var(--teal-700); background: var(--white); }
.legend-dark { background: var(--forest-900); }

.model-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.model-metrics article {
  padding: var(--space-5);
  border: 1px solid rgba(22, 58, 49, 0.1);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.metric-label {
  margin-bottom: 1rem;
  color: var(--teal-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.metric-value {
  margin-bottom: 1rem;
  color: var(--forest-900);
  font-family: var(--font-mono);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
}

.metric-bar {
  overflow: hidden;
  height: 0.65rem;
  margin-bottom: 1rem;
  border: 1px solid var(--teal-700);
  border-radius: 999px;
  background: var(--white);
}

.metric-bar span {
  display: block;
  height: 100%;
  background: var(--teal-700);
}

.metric-bar-kappa { border-color: var(--mustard-500); }
.metric-bar-kappa span { background: var(--mustard-500); }

.model-metrics article > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.validation-warning,
.attribution-warning {
  display: grid;
  grid-template-columns: minmax(10rem, 0.3fr) minmax(0, 1.7fr);
  gap: var(--space-5);
  margin-top: var(--space-5);
  padding: 1.35rem 1.5rem;
  border-left: 0.45rem solid var(--terra-600);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--terra-200);
}

.validation-warning strong,
.attribution-warning strong {
  color: var(--terra-600);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.validation-warning p,
.attribution-warning p {
  margin-bottom: 0;
  font-size: var(--text-sm);
}

/* Decision pipeline */
.pipeline-section {
  overflow: hidden;
  background: var(--forest-900);
  color: var(--white);
}

.pipeline-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: var(--space-5) var(--space-8);
  align-items: end;
  margin-bottom: var(--space-8);
}

.pipeline-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.pipeline-heading h2 {
  color: var(--white);
}

.pipeline-heading > p:last-child {
  margin-bottom: 0.3rem;
  color: #b5cbc2;
  font-size: var(--text-lg);
}

.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-flow li {
  position: relative;
  min-height: 18rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.055);
}

.pipeline-flow li:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -1.25rem;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border-radius: 50%;
  background: var(--mustard-500);
  color: var(--forest-950);
  font-family: var(--font-mono);
  font-weight: 900;
  transform: translateY(-50%);
}

.pipeline-number {
  display: block;
  margin-bottom: var(--space-7);
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 900;
}

.pipeline-label {
  margin-bottom: 0.7rem;
  color: var(--teal-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.pipeline-flow h3 {
  margin-bottom: 1rem;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.18;
}

.pipeline-flow li p:last-child {
  margin-bottom: 0;
  color: #aac2b8;
  font-size: var(--text-xs);
}

.pipeline-inputs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-5);
  align-items: center;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.pipeline-inputs > p {
  margin-bottom: 0;
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.pipeline-inputs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-inputs li {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #bfd1ca;
  font-size: var(--text-xs);
}

.pipeline-guardrail {
  margin: var(--space-5) 0 0;
  padding: 1.15rem 1.25rem;
  border-left: 0.3rem solid var(--mustard-500);
  background: rgba(255, 255, 255, 0.06);
  color: #cfddd7;
  font-size: var(--text-sm);
}

/* Fuzzy section and illustrative map */
.fuzzy-section {
  background: #fafaf7;
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

.membership-grid article {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--aqua-200);
}

.membership-grid article:nth-child(2) { background: var(--mustard-200); }
.membership-grid article:nth-child(3) { background: var(--mint-200); }

.membership-label {
  margin-bottom: 0.55rem;
  color: var(--teal-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.membership-grid article:nth-child(2) .membership-label { color: var(--mustard-700); }
.membership-grid article:nth-child(3) .membership-label { color: var(--forest-700); }

.membership-grid article > p:last-child {
  margin-bottom: 0;
  font-weight: 800;
}

.fuzzy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  gap: var(--space-5);
  align-items: start;
}

.subsection-heading {
  margin-bottom: var(--space-5);
}

.rule-list {
  display: grid;
  gap: 0.85rem;
}

.rule-list article {
  display: grid;
  grid-template-columns: 2.5rem 1fr 3.5rem minmax(9rem, 0.8fr);
  gap: 0.8rem;
  align-items: center;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.rule-if,
.rule-then {
  color: var(--teal-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.rule-then { color: var(--mustard-700); }

.rule-list p,
.rule-list strong {
  margin-bottom: 0;
  font-size: var(--text-xs);
  line-height: 1.35;
}

.rule-list strong {
  color: var(--forest-900);
}

.parcel-figure img {
  width: 100%;
  border-radius: var(--radius-md);
}

.parcel-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.parcel-legend li {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: 0.55rem;
  align-items: start;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.parcel-legend i {
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.12rem;
  border: 1px solid rgba(22, 58, 49, 0.3);
  border-radius: 0.2rem;
}

.parcel-legend strong {
  display: block;
  color: var(--forest-900);
  font-family: var(--font-mono);
}

.priority-watch { background: var(--mint-200); }
.priority-check { background: var(--aqua-200); }
.priority-plan { background: var(--mustard-200); }
.priority-first { background: var(--terra-600); color: var(--white); }

.priority-figure {
  margin: var(--space-5) 0 0;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.priority-figure figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: 1.2rem;
}

.priority-figure figcaption strong {
  color: var(--forest-900);
  font-size: var(--text-lg);
}

.priority-figure figcaption span {
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.priority-scale {
  display: grid;
  grid-template-columns: 24fr 25fr 25fr 26fr;
  overflow: hidden;
  border: 2px solid var(--forest-900);
  border-radius: var(--radius-md);
}

.priority-scale > div {
  display: grid;
  min-height: 6rem;
  align-content: center;
  padding: 1rem;
  border-right: 1px solid var(--forest-900);
}

.priority-scale > div:last-child { border-right: 0; }

.priority-scale strong {
  font-family: var(--font-mono);
  font-size: 1rem;
}

.priority-scale span {
  margin-top: 0.25rem;
  font-size: var(--text-xs);
  font-weight: 800;
}

.fuzzy-note {
  background: #eef5f1;
}

/* Field validation charts */
.field-section {
  background: var(--paper);
}

.field-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
}

.field-facts div {
  padding: 1.5rem;
  border: 1px solid rgba(22, 58, 49, 0.1);
  border-radius: var(--radius-md);
  background: var(--white);
}

.field-facts dt {
  margin-bottom: 0.35rem;
  color: var(--forest-900);
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 900;
}

.field-facts dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.control-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem var(--space-6);
  align-items: start;
  margin-bottom: var(--space-5);
  padding: 1.35rem 1.5rem;
  border-left: 0.4rem solid var(--teal-700);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--aqua-200);
}

.control-panel .figure-kicker {
  grid-column: 1 / -1;
  margin-bottom: 0.2rem;
}

.control-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.control-panel li {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(35, 126, 131, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  font-size: var(--text-xs);
}

.control-panel > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.comparison-heading > div:first-child > p:last-child {
  max-width: 48rem;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: var(--text-xs);
}

.series-legend {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
}

.series-legend span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.series-sp { background: var(--teal-700); }
.series-bbch { border: 2px solid var(--forest-700); background: var(--white); }

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.comparison-card {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfcfa;
}

.comparison-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.comparison-title h4 {
  margin: 0;
  color: var(--forest-900);
  font-size: 1rem;
  font-weight: 900;
}

.comparison-title span {
  flex-shrink: 0;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  background: var(--mustard-200);
  color: var(--forest-900);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
}

.bar-row {
  display: grid;
  grid-template-columns: 3rem 1fr 4.4rem;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
}

.bar-row > span {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
}

.bar-row > strong {
  text-align: right;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.bar-track {
  height: 1.25rem;
  border-bottom: 1px solid #879c93;
  background: #eef2ef;
}

.bar-track i {
  display: block;
  height: 100%;
}

.bar-sp { background: var(--teal-700); }
.bar-bbch { border: 2px solid var(--forest-700); background: var(--white); }

.comparison-note {
  min-height: 2.6rem;
  margin: 1.15rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.attribution-warning {
  background: var(--mustard-200);
  border-left-color: var(--mustard-500);
}

.attribution-warning strong { color: var(--mustard-700); }

/* Economic impact */
.economy-section {
  background: var(--mustard-200);
}

.impact-bridge {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.15fr;
  gap: 1rem;
  align-items: stretch;
}

.impact-bridge article {
  display: flex;
  min-height: 15rem;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid rgba(22, 58, 49, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
}

.impact-bridge article > span {
  margin-bottom: 1rem;
  color: var(--terra-600);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.impact-bridge strong {
  color: var(--forest-900);
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.05;
}

.impact-bridge article p {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.impact-bridge .impact-total {
  border-color: var(--forest-900);
  background: var(--forest-900);
  color: var(--white);
}

.impact-total > span { color: var(--mustard-500) !important; }
.impact-total strong { color: var(--white); }
.impact-total p { color: #b6cbc3 !important; }

.economy-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}

.economy-details article {
  padding: 1.5rem;
  border-top: 0.3rem solid var(--teal-700);
  background: rgba(255, 255, 255, 0.55);
}

.economy-details h3 {
  margin-bottom: 0.75rem;
  color: var(--forest-900);
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 900;
}

.economy-details article > p:last-child,
.economy-details li {
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.economy-details ul {
  margin: 0;
  padding-left: 1.15rem;
}

.economy-caution {
  border-top-color: var(--terra-600) !important;
}

/* Limits and next steps */
.limits-section {
  background: var(--forest-950);
  color: var(--white);
}

.limits-heading {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-5) var(--space-8);
  align-items: end;
  margin-bottom: var(--space-8);
}

.limits-heading .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.limits-heading h2 { color: var(--white); }
.limits-heading > p:last-child { margin-bottom: 0.3rem; color: #adc3ba; font-size: var(--text-lg); }

.limits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.limits-grid article {
  min-height: 16rem;
  padding: 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.limits-grid span {
  display: block;
  margin-bottom: var(--space-6);
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 900;
}

.limits-grid h3 {
  margin-bottom: 1rem;
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 900;
}

.limits-grid p {
  margin-bottom: 0;
  color: #a9bfb6;
  font-size: var(--text-sm);
}

.next-steps {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.3fr);
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.next-steps .figure-kicker { color: var(--mustard-500); }

.next-steps h3 {
  margin-bottom: 0;
  color: var(--white);
  font-size: var(--text-xl);
  font-weight: 900;
}

.next-steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.next-steps li {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: #d4dfdb;
}

.next-steps li span {
  color: var(--teal-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
}

/* Science, publication and booklet */
.science-section {
  background: #fafaf7;
}

.science-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: var(--space-5);
}

.publication-card {
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--forest-900);
  color: var(--white);
}

.publication-card .figure-kicker { color: var(--mustard-500); }

.publication-card > h3 {
  max-width: 28ch;
  margin-bottom: var(--space-5);
  color: var(--white);
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.publication-meta {
  color: #b5cbc2;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.doi-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--space-5);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-decoration: none;
}

.doi-link:hover {
  border-color: var(--mustard-500);
  color: var(--mustard-500);
}

.publication-authors {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.publication-authors p:last-child {
  margin-bottom: 0;
  color: #b5cbc2;
  font-size: var(--text-sm);
}

.science-meta {
  display: grid;
  gap: var(--space-4);
}

.science-meta article {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}

.science-meta ul {
  margin: 0;
  padding-left: 1.1rem;
}

.science-meta li,
.science-meta article > p:not(.figure-kicker),
.science-meta a {
  color: var(--ink-soft);
  font-size: var(--text-sm);
}

.science-meta h3 {
  margin-bottom: 0.5rem;
  color: var(--forest-900);
  font-size: var(--text-xl);
}

.science-meta .project-code {
  overflow-wrap: anywhere;
  color: var(--forest-900) !important;
  font-family: var(--font-mono);
  font-size: var(--text-xs) !important;
  font-weight: 900;
}

.booklet-section {
  background: var(--forest-900);
  color: var(--white);
}

.booklet-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
}

.booklet-document {
  position: relative;
  overflow: hidden;
  min-height: 33rem;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.25rem;
  background: #154b3e;
  box-shadow: 1rem 1rem 0 rgba(220, 169, 61, 0.16);
}

.booklet-document::after {
  content: "";
  position: absolute;
  right: -8rem;
  bottom: -8rem;
  width: 20rem;
  height: 20rem;
  border: 1px solid rgba(220, 169, 61, 0.35);
  border-radius: 50%;
  box-shadow: 0 0 0 3rem rgba(220, 169, 61, 0.04), 0 0 0 6rem rgba(220, 169, 61, 0.025);
}

.booklet-tag {
  display: inline-block;
  margin-bottom: var(--space-8);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--mustard-500);
  color: var(--forest-950);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.booklet-document img {
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: var(--space-6);
  padding: 0.5rem;
  border-radius: 1rem;
  background: var(--forest-950);
}

.booklet-document p {
  max-width: 100%;
  margin-bottom: var(--space-5);
  color: var(--white);
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.booklet-document small {
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 900;
}

.booklet-copy h2 {
  max-width: 15ch;
  margin-bottom: var(--space-5);
  color: var(--white);
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.booklet-copy > p:not(.eyebrow) {
  max-width: 45rem;
  color: #b8cdc5;
  font-size: var(--text-lg);
}

.booklet-copy dl {
  margin: var(--space-7) 0;
}

.booklet-copy dl div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding-block: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.booklet-copy dt {
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  text-transform: uppercase;
}

.booklet-copy dd {
  margin: 0;
  color: #d1ded9;
  font-size: var(--text-sm);
}

.booklet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* Footer */
.site-footer {
  padding-block: var(--space-8) var(--space-4);
  background: #08251f;
  color: #b8cdc5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.75fr;
  gap: var(--space-8);
  padding-bottom: var(--space-7);
}

.brand-footer {
  margin-bottom: var(--space-5);
  color: var(--white);
}

.brand-footer .brand-copy small {
  color: #8eb3a5;
}

.footer-brand > p {
  max-width: 30rem;
  margin-bottom: 0;
  font-size: var(--text-sm);
}

.footer-label {
  margin-bottom: 0.75rem;
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-source p:not(.footer-label),
.footer-meta p:not(.footer-label) {
  margin-bottom: 0.65rem;
  font-size: var(--text-sm);
}

.footer-source a,
.footer-bottom a {
  color: var(--white);
  font-size: var(--text-sm);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.footer-bottom p {
  margin-bottom: 0;
}

/* Responsive */
@media (max-width: 68rem) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero-layout {
    gap: var(--space-7);
  }

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

  .result-card {
    min-height: 19rem;
  }

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

  .model-layout,
  .fuzzy-layout {
    grid-template-columns: 1fr;
  }

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

  .pipeline-flow li {
    min-height: 15rem;
  }

  .pipeline-flow li:not(:last-child)::after {
    display: none;
  }

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

  .process-list li {
    min-height: 20rem;
  }

  .process-list li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .process-list li:nth-child(3)::before {
    left: 0;
  }
}

@media (max-width: 56rem) {
  :root {
    --header-height: 4.5rem;
    --space-10: 6rem;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: auto;
  }

  .hero-layout,
  .split-heading,
  .timing-intro,
  .process-heading,
  .pipeline-heading,
  .split-panel,
  .limits-heading,
  .next-steps,
  .science-layout,
  .booklet-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    gap: var(--space-8);
  }

  .hero h1 {
    max-width: 11ch;
  }

  .split-heading,
  .timing-intro,
  .process-heading {
    gap: var(--space-5);
  }

  .timing-grid {
    grid-template-columns: 1fr;
  }

  .timing-card {
    min-height: auto;
  }

  .process-heading .eyebrow {
    grid-column: auto;
  }

  .pipeline-heading .eyebrow,
  .limits-heading .eyebrow {
    grid-column: auto;
  }

  .data-flow {
    grid-template-columns: 1fr;
  }

  .data-stage {
    min-height: 10rem;
  }

  .data-operator,
  .impact-operator {
    min-height: 1.5rem;
  }

  .rule-list article {
    grid-template-columns: 2.5rem 1fr;
  }

  .rule-then {
    grid-column: 1;
  }

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

  .control-panel {
    grid-template-columns: 1fr;
  }

  .impact-bridge {
    grid-template-columns: 1fr;
  }

  .impact-bridge article {
    min-height: auto;
  }

  .booklet-document {
    width: min(100%, 26rem);
  }

  .footer-grid {
    gap: var(--space-7);
  }
}

@media (min-width: 68.01rem) {
  .mobile-nav {
    display: none !important;
  }
}

@media (max-width: 40rem) {
  :root {
    --space-9: 4.5rem;
    --space-10: 5rem;
  }

  .container {
    width: min(calc(100% - 2rem), var(--container));
  }

  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 2.45rem;
    height: 2.45rem;
  }

  .hero {
    padding-block: 4rem 5rem;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.4rem, 10.8vw, 3.25rem);
    letter-spacing: -0.075em;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .hero-facts {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .hero-facts div,
  .hero-facts div + div {
    padding: 0 0 var(--space-4);
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .hero-card-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-grid,
  .process-list,
  .phase-grid,
  .membership-grid,
  .model-metrics,
  .pipeline-flow,
  .comparison-grid,
  .economy-details,
  .limits-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    min-height: 18rem;
  }

  .scope-note {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .bridge-note,
  .validation-warning,
  .attribution-warning {
    grid-template-columns: 1fr;
  }

  .split-legend,
  .field-facts,
  .parcel-legend {
    grid-template-columns: 1fr;
  }

  .priority-figure figcaption,
  .comparison-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .priority-scale {
    grid-template-columns: 1fr;
  }

  .priority-scale > div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--forest-900);
  }

  .priority-scale > div:last-child {
    border-bottom: 0;
  }

  .booklet-copy dl div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .booklet-actions {
    display: grid;
  }

  .timing-card {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .process-list li,
  .process-list li:nth-child(3) {
    min-height: auto;
    padding: 0 0 var(--space-7) 1.25rem;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
  }

  .process-list li + li {
    border-left: 1px solid rgba(255, 255, 255, 0.18);
  }

  .process-list li::before,
  .process-list li:first-child::before,
  .process-list li:nth-child(3)::before {
    top: 0.5rem;
    left: -0.34rem;
  }

  .process-index {
    padding-top: 0;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

@media (prefers-contrast: more) {
  :root {
    --line: #6f837a;
  }

  .result-card,
  .hero-card {
    border-width: 2px;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header {
    background: var(--paper);
  }

  .hero-card {
    background: var(--forest-800);
  }
}

/* Standalone error page */
.error-page {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(circle at 82% 18%, rgba(83, 174, 177, 0.2), transparent 28rem),
    var(--forest-950);
  color: var(--white);
}

.error-header,
.error-footer {
  padding-block: var(--space-5);
}

.error-header .brand {
  width: max-content;
}

.error-main {
  display: grid;
  align-items: center;
  padding-block: var(--space-8);
}

.error-card {
  max-width: 48rem;
}

.error-code {
  margin-bottom: var(--space-4);
  color: var(--mustard-500);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.error-card h1 {
  max-width: 12ch;
  margin-bottom: var(--space-5);
  font-size: var(--text-2xl);
  line-height: 1;
  letter-spacing: -0.055em;
}

.error-card > p:not(.error-code) {
  max-width: 42rem;
  margin-bottom: var(--space-6);
  color: #d6e5de;
  font-size: var(--text-lg);
}

.error-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #d6e5de;
}

.error-footer p {
  margin: 0;
}
