:root {
  --ink: #17282e;
  --navy: #183840;
  --navy-deep: #10282f;
  --paper: #f4efe5;
  --paper-2: #ebe2d2;
  --white: #fffdf8;
  --copper: #ad5b36;
  --copper-deep: #824027;
  --sage: #657d6d;
  --sage-soft: #dfe8df;
  --gold: #d2a64f;
  --red: #7a2622;
  --red-soft: #f4dfd9;
  --blue-soft: #e3ecec;
  --text-soft: #5c696e;
  --line: #d5cfc2;
  --shadow: 0 18px 48px rgba(19, 40, 47, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
a { color: var(--copper-deep); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--red); }
img, svg { max-width: 100%; }
.skip-link {
  background: #fff;
  color: #000;
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: -80px;
  z-index: 1000;
}
.skip-link:focus { top: 12px; }

.prototype-banner {
  background: linear-gradient(125deg, #621a17, var(--red));
  color: #fff;
  padding: 8px max(20px, calc((100vw - 1180px) / 2));
}
.prototype-banner strong {
  display: block;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.prototype-banner span {
  color: #f1d6d1;
  display: block;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 3px;
}

.site-header {
  align-items: center;
  background: rgba(255, 253, 248, .96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  justify-content: space-between;
  min-height: 64px;
  padding: 8px max(20px, calc((100vw - 1180px) / 2));
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand {
  align-items: center;
  color: var(--navy);
  display: flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  gap: 10px;
  line-height: 1.25;
  text-decoration: none;
}
.brand-mark {
  align-items: center;
  background: var(--navy);
  border-radius: 50%;
  color: var(--paper);
  display: inline-flex;
  font-family: Georgia, serif;
  font-size: 15px;
  height: 34px;
  justify-content: center;
  width: 34px;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 8px; justify-content: flex-end; }
.site-nav a {
  border-bottom: 2px solid transparent;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  padding: 8px 5px 6px;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus, .site-nav a[aria-current="page"] {
  border-bottom-color: var(--copper);
  color: var(--navy);
}

.hero {
  background: radial-gradient(circle at 86% 12%, rgba(210,166,79,.18), transparent 24%), linear-gradient(130deg, var(--navy-deep), var(--navy) 68%, #285058);
  color: var(--white);
  padding: 50px max(22px, calc((100vw - 1180px) / 2)) 46px;
}
.hero-grid { display: grid; gap: 56px; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .65fr); }
.eyebrow {
  color: var(--copper-deep);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .15em;
  margin: 0 0 14px;
  text-transform: uppercase;
}
.hero .eyebrow { color: #e1b563; }
.hero h1 {
  font-size: clamp(32px, 4.8vw, 52px);
  font-weight: 430;
  letter-spacing: -.045em;
  line-height: 1.04;
  margin: 0;
  max-width: 900px;
}
.hero .lede {
  color: #d4dfdc;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.6;
  margin: 26px 0 0;
  max-width: 860px;
}
.hero .plain-answer {
  border-left: 4px solid var(--gold);
  color: #f6ead0;
  font-size: 13px;
  line-height: 1.65;
  margin: 30px 0 0;
  max-width: 850px;
  padding-left: 20px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button {
  background: var(--copper);
  border: 1px solid var(--copper);
  color: #fff;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 11px 15px;
  text-decoration: none;
}
.button:hover, .button:focus { background: var(--copper-deep); color: #fff; }
.button.secondary { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.button.light { background: var(--white); border-color: var(--line); color: var(--navy); }
.hero-side {
  align-self: end;
  background: rgba(255,255,255,.08);
  border-top: 4px solid var(--gold);
  padding: 24px;
}
.hero-side strong { color: #fff; display: block; font-size: 20px; font-weight: 520; line-height: 1.3; }
.hero-side p, .hero-side li { color: #cad8d5; font-size: 11px; line-height: 1.65; }
.hero-side p:last-child { margin-bottom: 0; }

.jumpbar {
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  padding: 13px max(20px, calc((100vw - 1180px) / 2));
}
.jumpbar nav { display: flex; flex-wrap: wrap; gap: 9px 18px; }
.jumpbar a { color: var(--navy); font-size: 11px; font-weight: 650; text-decoration: none; }
.jumpbar a:hover, .jumpbar a:focus { text-decoration: underline; }

.section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 56px 24px;
}
.full-width { max-width: none; padding-left: max(24px, calc((100vw - 1132px) / 2)); padding-right: max(24px, calc((100vw - 1132px) / 2)); }
.section.alt { background: var(--white); }
.section.paper-deep { background: var(--paper-2); }
.section.dark { background: var(--navy); color: #fff; }
.section-head { display: grid; gap: 20px 40px; grid-template-columns: .38fr 1.12fr .5fr; margin-bottom: 30px; }
.section-head .eyebrow { padding-top: 7px; }
.section-head h2 {
  color: var(--navy);
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 440;
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 0;
}
.section-head > p:last-child { color: var(--text-soft); font-size: 13px; line-height: 1.7; margin: 0; }
.dark .section-head h2, .dark .section-head > p:last-child { color: #fff; }
.dark .section-head .eyebrow { color: #e4b966; }
h3 { color: var(--navy); font-weight: 560; }

.answer-box, .warning-box, .boundary-box, .note-box {
  border-left: 5px solid var(--sage);
  display: grid;
  gap: 20px 34px;
  grid-template-columns: .38fr 1.62fr;
  margin: 24px 0;
  padding: 22px 26px;
}
.answer-box { background: var(--sage-soft); }
.warning-box { background: #fff1d4; border-left-color: var(--gold); }
.boundary-box { background: var(--red-soft); border-left-color: var(--red); }
.note-box { background: var(--blue-soft); border-left-color: var(--navy); }
.answer-box strong, .warning-box strong, .boundary-box strong, .note-box strong { color: var(--navy); font-size: 16px; line-height: 1.35; }
.answer-box p, .warning-box p, .boundary-box p, .note-box p { color: #536065; font-size: 12px; line-height: 1.7; margin: 0; }

.metric-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.metric-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--copper);
  min-height: 145px;
  padding: 20px;
}
.metric-card.sage { border-top-color: var(--sage); }
.metric-card.gold { border-top-color: var(--gold); }
.metric-card .label { color: var(--text-soft); display: block; font-size: 10px; font-weight: 730; letter-spacing: .09em; text-transform: uppercase; }
.metric-card strong { color: var(--navy); display: block; font-size: clamp(21px, 2.5vw, 28px); font-weight: 520; line-height: 1.15; margin: 15px 0 8px; }
.metric-card b { color: var(--copper-deep); display: block; font-size: 12px; }
.metric-card p { color: var(--text-soft); font-size: 11px; line-height: 1.6; margin: 13px 0 0; }
.dark .metric-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.dark .metric-card strong { color: #fff; }
.dark .metric-card .label, .dark .metric-card p { color: #bfd0cc; }

.equation {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr auto 1.1fr;
  margin: 26px 0;
}
.equation > div { background: var(--white); border: 1px solid var(--line); padding: 24px; }
.equation > b { align-self: center; color: var(--copper-deep); font-size: 26px; font-weight: 400; }
.equation span { color: var(--text-soft); display: block; font-size: 10px; font-weight: 730; letter-spacing: .08em; text-transform: uppercase; }
.equation strong { color: var(--navy); display: block; font-size: clamp(22px, 3vw, 32px); font-weight: 520; margin-top: 7px; }
.equation .result { background: var(--navy); border-color: var(--navy); }
.equation .result span { color: #b9cfca; }
.equation .result strong { color: #fff; }

.share-figure { margin: 34px 0; }
.share-bar { display: flex; min-height: 64px; overflow: hidden; }
.share-bar span { align-items: center; display: flex; font-size: 12px; font-weight: 750; justify-content: center; padding: 8px; text-align: center; }
.share-bar .primary { background: var(--copper); color: #fff; }
.share-bar .secondary { background: var(--sage-soft); color: var(--navy); }
.share-figure figcaption { color: var(--text-soft); font-size: 11px; line-height: 1.6; margin-top: 10px; }

.trend-chart {
  background: var(--white);
  border: 1px solid var(--line);
  margin: 30px 0;
  padding: 22px 22px 16px;
}
.trend-chart svg { display: block; height: auto; width: 100%; }
.trend-chart .chart-gridline { stroke: #d9d3c7; stroke-width: 1; }
.trend-chart .chart-axis { stroke: #7c898c; stroke-width: 1.4; }
.trend-chart .chart-line { fill: none; stroke: var(--copper); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.trend-chart .chart-endpoint { fill: var(--white); stroke: var(--copper-deep); stroke-width: 4; }
.trend-chart .chart-label { fill: var(--text-soft); font-size: 13px; }
.trend-chart .chart-value { fill: var(--navy); font-size: 14px; font-weight: 700; }
.trend-chart figcaption { color: var(--text-soft); font-size: 11px; line-height: 1.65; margin-top: 12px; }

.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 21px;
}
.card .tag { color: var(--copper-deep); display: block; font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.domain-card .tag { color: var(--copper-deep); display: block; font-size: 10px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.card h3 { font-size: 18px; line-height: 1.34; margin: 12px 0 8px; }
.card p, .card li { color: var(--text-soft); font-size: 12px; line-height: 1.7; }
.card p:last-child { margin-bottom: 0; }
.card .known, .card .needed { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 13px; }
.card .known b, .card .needed b { color: var(--navy); display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.path-list { counter-reset: path; display: grid; gap: 0; margin: 30px 0; }
.path-step {
  border-left: 2px solid var(--line);
  counter-increment: path;
  display: grid;
  gap: 14px 30px;
  grid-template-columns: .82fr 1.18fr;
  margin-left: 22px;
  padding: 0 0 28px 38px;
  position: relative;
}
.path-step > div:first-child {
  display: none;
}
.path-step > div:nth-child(2) { grid-column: 1; }
.path-step > div:nth-child(3) { grid-column: 2; }
.path-step:last-child { border-left-color: transparent; padding-bottom: 0; }
.path-step::before {
  content: none;
}
.path-step h3 { font-size: 21px; line-height: 1.3; margin: 0; }
.path-step h3::before {
  background: var(--navy);
  border-radius: 50%;
  color: #fff;
  content: counter(path, decimal-leading-zero);
  display: inline-block;
  font-size: 9px;
  font-weight: 760;
  height: 28px;
  line-height: 28px;
  margin: 0 10px 5px 0;
  text-align: center;
  vertical-align: middle;
  width: 28px;
}
.path-step p, .path-step li { color: var(--text-soft); font-size: 12px; line-height: 1.7; margin-top: 0; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; min-width: 760px; width: 100%; }
th { background: var(--navy); color: #fff; font-size: 10px; letter-spacing: .06em; padding: 14px 16px; text-align: left; text-transform: uppercase; }
td { background: rgba(255,253,248,.82); border-bottom: 1px solid var(--line); color: #536066; font-size: 11px; line-height: 1.6; padding: 13px 15px; vertical-align: top; }
td strong { color: var(--navy); }
.status-known, .status-missing, .status-calculated, .status-source {
  border-radius: 999px;
  display: inline-block;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .06em;
  padding: 4px 7px;
  text-transform: uppercase;
}
.status-known { background: var(--sage-soft); color: #35543d; }
.status-missing { background: var(--red-soft); color: var(--red); }
.status-calculated { background: #fff0c8; color: #765511; }
.status-source { background: var(--blue-soft); color: var(--navy); }

.option-grid { display: grid; gap: 1px; grid-template-columns: repeat(4, 1fr); }
.option-grid article { background: var(--white); padding: 25px; }
.option-grid span { color: var(--copper-deep); font-size: 10px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.option-grid h3 { font-size: 18px; line-height: 1.35; margin: 13px 0 8px; }
.option-grid p { color: var(--text-soft); font-size: 11px; line-height: 1.65; }

.flow-strip { display: grid; gap: 1px; grid-template-columns: repeat(6, 1fr); margin: 28px 0; }
.flow-strip div { background: var(--navy); color: #fff; min-height: 112px; padding: 20px 16px; }
.flow-strip span { color: #e5bb69; display: block; font-size: 10px; font-weight: 760; }
.flow-strip strong { display: block; font-size: 14px; line-height: 1.35; margin-top: 10px; }

.gate-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.gate { background: var(--white); border: 1px solid var(--line); display: grid; gap: 15px 24px; grid-template-columns: 52px 1fr; padding: 24px; }
.gate-number { align-items: center; background: var(--navy); border-radius: 50%; color: #fff; display: flex; font-size: 12px; font-weight: 760; height: 44px; justify-content: center; width: 44px; }
.gate h3 { font-size: 19px; margin: 0; }
.gate p, .gate li { color: var(--text-soft); font-size: 11px; line-height: 1.65; }
.gate .gate-output { background: var(--blue-soft); grid-column: 2; padding: 12px 14px; }
.gate .gate-output b { color: var(--navy); display: block; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }

.domain-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.domain-card { background: var(--white); border: 1px solid var(--line); padding: 24px; }
.domain-card h3 { font-size: 19px; margin: 10px 0; }
.domain-card p, .domain-card li { color: var(--text-soft); font-size: 11px; line-height: 1.65; }
.domain-card .domain-count { color: var(--copper-deep); font-size: 24px; font-weight: 550; }
.domain-card code { color: var(--navy); font-size: 10px; overflow-wrap: anywhere; }

.contract-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
.contract-grid code { background: #edf1ee; border-left: 3px solid var(--sage); color: var(--navy); display: block; font-size: 11px; padding: 13px 15px; }

.source-line { background: #eee8dc; color: var(--text-soft); font-size: 10px; line-height: 1.6; margin-top: 24px; padding: 13px 16px; }
.source-line strong { color: var(--navy); }

.next-route { background: var(--navy); color: #fff; display: grid; gap: 28px; grid-template-columns: .6fr 1.4fr; margin: 0 auto; max-width: 1132px; padding: 34px; }
.next-route .eyebrow { color: #e3b866; }
.next-route h2 { color: #fff; font-size: 27px; font-weight: 470; line-height: 1.25; margin: 0; }
.next-route p { color: #c4d2cf; font-size: 12px; line-height: 1.7; margin: 0; }
.next-route a { color: #fff; font-weight: 700; }

.project-boundary { background: #e7ded0; border-top: 1px solid var(--line); margin-top: 56px; padding: 36px max(22px, calc((100vw - 1180px) / 2)); }
.project-boundary h2 { color: var(--navy); font-size: 22px; margin: 0 0 16px; }
.project-boundary p { color: var(--text-soft); font-size: 10px; line-height: 1.65; margin: 6px 0; max-width: 1100px; }
.site-footer { background: var(--navy-deep); color: #b9cbc7; padding: 25px max(22px, calc((100vw - 1180px) / 2)); }
.site-footer { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.site-footer p { font-size: 10px; line-height: 1.5; margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: #fff; font-size: 10px; }

details { background: var(--white); border: 1px solid var(--line); margin: 12px 0; padding: 16px 18px; }
summary { color: var(--navy); cursor: pointer; font-size: 12px; font-weight: 700; }
details p, details li { color: var(--text-soft); font-size: 11px; line-height: 1.65; }
.small { color: var(--text-soft); font-size: 10px; line-height: 1.55; }
.nowrap { white-space: nowrap; }

/* v3.7 question-first bridge and answer library */
.question-chip-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.question-chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sage);
  color: var(--navy);
  display: block;
  min-height: 112px;
  padding: 18px 19px;
  text-decoration: none;
}
.question-chip:hover, .question-chip:focus { border-left-color: var(--copper); box-shadow: var(--shadow); transform: translateY(-1px); }
.question-chip span { color: var(--copper-deep); display: block; font-size: 9px; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.question-chip strong { display: block; font-size: 16px; font-weight: 560; line-height: 1.35; margin-top: 9px; }
.question-chip p { color: var(--text-soft); font-size: 11px; line-height: 1.55; margin: 8px 0 0; }
.question-library-note { color: var(--text-soft); font-size: 11px; line-height: 1.65; margin: 18px 0 0; }
.question-answer-list { display: grid; gap: 16px; }
.question-answer {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sage);
  padding: 24px 26px;
  scroll-margin-top: 82px;
}
.question-answer.attention { border-top-color: var(--gold); }
.question-answer.boundary { border-top-color: var(--red); }
.question-answer-head { align-items: start; display: grid; gap: 18px; grid-template-columns: 1fr auto; }
.question-answer h3 { color: var(--navy); font-size: clamp(20px, 2.5vw, 26px); font-weight: 510; line-height: 1.25; margin: 0; }
.question-answer .answer-lead { color: #3f4f54; font-size: 13px; line-height: 1.7; margin: 14px 0 0; max-width: 930px; }
.question-answer details { background: #f8f5ed; margin: 18px 0 0; }
.evidence-columns { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); margin-top: 15px; }
.evidence-columns > div { border-left: 2px solid var(--line); padding-left: 14px; }
.evidence-columns strong { color: var(--navy); display: block; font-size: 11px; margin-bottom: 6px; }
.evidence-columns p, .evidence-columns li { color: var(--text-soft); font-size: 11px; line-height: 1.62; }
.source-key-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.source-key-grid article { background: var(--white); border: 1px solid var(--line); padding: 18px; }
.source-key-grid .tag { color: var(--copper-deep); display: block; font-size: 9px; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; }
.source-key-grid h3 { font-size: 16px; margin: 8px 0; }
.source-key-grid p { color: var(--text-soft); font-size: 11px; line-height: 1.62; margin-bottom: 0; }

@media (max-width: 1020px) {
  .site-header { align-items: flex-start; position: static; }
  .site-nav { max-width: 660px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { max-width: 680px; }
  .section-head { grid-template-columns: 1fr; }
  .metric-grid, .card-grid.four, .option-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .domain-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-strip { grid-template-columns: repeat(3, 1fr); }
  .question-chip-grid { grid-template-columns: repeat(2, 1fr); }
  .source-key-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-header { display: block; }
  .site-nav { gap: 2px 9px; justify-content: flex-start; margin-top: 10px; }
  .site-nav a { padding-left: 0; }
  .hero { padding-top: 46px; }
  .hero h1 { font-size: clamp(34px, 12vw, 49px); }
  .section, .full-width { padding: 44px 20px; }
  .metric-grid, .card-grid, .card-grid.two, .card-grid.four, .domain-grid, .option-grid, .gate-grid, .contract-grid { grid-template-columns: 1fr; }
  .equation { grid-template-columns: 1fr; }
  .equation > b { display: none; }
  .answer-box, .warning-box, .boundary-box, .note-box, .next-route { grid-template-columns: 1fr; }
  .path-step { grid-template-columns: 1fr; padding-left: 30px; }
  .path-step > div:nth-child(2), .path-step > div:nth-child(3) { grid-column: 1; }
  .path-step::before { left: -23px; }
  .flow-strip { grid-template-columns: repeat(2, 1fr); }
  .share-bar { min-height: 82px; }
  .share-bar span { font-size: 10px; }
  .site-footer { align-items: flex-start; display: block; }
  .site-footer nav { margin-top: 12px; }
  .question-chip-grid, .source-key-grid, .evidence-columns { grid-template-columns: 1fr; }
  .question-answer { padding: 20px; }
  .question-answer-head { grid-template-columns: 1fr; }
}

@media print {
  .prototype-banner, .site-header, .jumpbar, .hero-actions, .next-route, .project-boundary, .site-footer { display: none !important; }
  body { background: #fff; }
  .hero { background: #fff; color: #000; padding: 28px 0; }
  .hero .eyebrow, .hero .lede, .hero .plain-answer, .hero-side p { color: #333; }
  .hero-side { background: #fff; border: 1px solid #aaa; }
  .hero-side strong, .hero h1 { color: #000; }
  .section, .full-width { padding: 30px 0; }
  .section.dark { background: #fff; color: #000; }
  .dark .section-head h2, .dark .section-head > p:last-child { color: #000; }
  .card, .metric-card, .domain-card, .gate { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
