:root {
  --ink: #18201d;
  --muted: #51615c;
  --paper: #f7f4ed;
  --panel: #ffffff;
  --line: #d8d2c4;
  --ember: #cf5f29;
  --gold: #e8b852;
  --teal: #1f7a72;
  --deep: #101716;
  --deep-soft: #1b2826;
  --white: #ffffff;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--white);
  background: rgba(16, 23, 22, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.brand,
.site-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.65rem;
  min-width: 0;
  font-weight: 720;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold), var(--ember) 62%, #6b2012);
  box-shadow: 0 0 18px rgba(232, 184, 82, 0.55);
  flex: 0 0 auto;
}

.site-nav {
  gap: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--white);
  border-bottom-color: var(--gold);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
  background: var(--deep);
}

.hero-review {
  min-height: 72vh;
  background:
    radial-gradient(circle at top right, rgba(232, 184, 82, 0.18), transparent 32%),
    linear-gradient(135deg, #131c1b 0%, #0f1716 46%, #1f2f2c 100%);
}

.hero-compact {
  min-height: 72vh;
}

.hero-canvas,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-canvas {
  width: 100%;
  height: 100%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(16, 23, 22, 0.90), rgba(16, 23, 22, 0.58) 48%, rgba(16, 23, 22, 0.22)),
    linear-gradient(0deg, rgba(16, 23, 22, 0.26), rgba(16, 23, 22, 0.08));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 7rem 0 5rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--teal);
  font-weight: 760;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--gold);
}

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

h1 {
  margin-bottom: 1rem;
  font-size: 5rem;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  max-width: 840px;
  font-size: 2.45rem;
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero .hero-copy {
  max-width: 660px;
  margin-bottom: 1.8rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.28rem;
}

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

.primary-action,
.secondary-action {
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 730;
}

.primary-action {
  color: #1c120b;
  background: var(--gold);
}

.secondary-action {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
}

.section {
  padding: 5rem 1.5rem;
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-light {
  background: var(--paper);
}

.status-banner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--gold);
  border-left: 6px solid var(--ember);
  border-radius: 14px;
  background: var(--panel);
}

.status-banner h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.status-banner p {
  margin: 0;
  color: var(--muted);
}

.section-dark {
  color: var(--white);
  background: var(--deep-soft);
}

.section-plain {
  background: var(--panel);
}

.section-heading {
  margin-bottom: 2rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric-card,
.output-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric-card {
  min-height: 9.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-value {
  color: var(--ember);
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 780;
}

.metric-label {
  color: var(--muted);
  font-weight: 640;
}

.metric-copy {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: start;
}

.section-dark .eyebrow {
  color: var(--gold);
}

.copy-stack {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.copy-stack p:last-child {
  margin-bottom: 0;
}

.output-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.output-item {
  padding: 1rem;
}

.output-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.output-item a {
  color: var(--teal);
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 0.14rem;
}

abbr[title] {
  text-decoration: underline dotted;
  text-underline-offset: 0.16rem;
  cursor: help;
}

.executive-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 1rem;
  align-items: stretch;
}

.executive-panel,
.decision-card,
.topic-group,
.diagram-panel,
.redirect-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.executive-panel p:last-child,
.decision-card p:last-child,
.topic-group p:last-child,
.diagram-panel p:last-child,
.redirect-card p:last-child {
  margin-bottom: 0;
}

.decision-grid,
.topic-groups,
.risk-grid,
.reference-list {
  display: grid;
  gap: 0.9rem;
}

.decision-grid,
.topic-groups {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.risk-grid,
.reference-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-group details {
  margin-top: 0.75rem;
}

.topic-group summary {
  color: var(--teal);
  font-weight: 760;
  cursor: pointer;
}

.topic-group ul,
.reference-list ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.topic-group li + li,
.reference-list li + li {
  margin-top: 0.35rem;
}

.decision-card {
  background: var(--paper);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  margin-bottom: 0.6rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--teal);
  font-size: 0.78rem;
  font-weight: 780;
}

.diagram-panel {
  overflow: auto;
}

.diagram-panel svg {
  display: block;
  width: 100%;
  min-width: 640px;
  height: auto;
}

.payload-diagram text,
.test-ladder text {
  fill: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.payload-diagram .muted,
.test-ladder .muted {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 640;
}

.payload-diagram .box,
.test-ladder .box {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 2;
}

.payload-diagram .envelope {
  fill: #f7f4ed;
  stroke: var(--teal);
  stroke-width: 3;
}

.payload-diagram .optics {
  fill: #e9f3f1;
  stroke: var(--teal);
}

.payload-diagram .thermal,
.test-ladder .active {
  fill: #fff4d8;
  stroke: var(--gold);
}

.test-ladder .connector {
  stroke: var(--teal);
  stroke-width: 2;
}

.redirect-card {
  max-width: 720px;
}

.compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.progress-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 2rem;
  align-items: center;
}

.progress-visuals {
  display: grid;
  gap: 1rem;
}

.progress-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.progress-figure {
  margin: 0;
}

.progress-figure img {
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(16, 23, 22, 0.18);
  background: var(--deep);
}

.progress-figure-hero img {
  min-height: 320px;
  object-fit: cover;
}

.progress-figure figcaption {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.video-panel {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.video-panel video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(16, 23, 22, 0.18);
  border-radius: 8px;
  background: var(--deep);
}

.video-panel figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-dark .progress-figure figcaption {
  color: rgba(255, 255, 255, 0.76);
}

.progress-summary h2 {
  margin-bottom: 1.4rem;
}

.status-list {
  display: grid;
  gap: 0.75rem;
}

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

.status-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.status-kicker {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 780;
  text-transform: uppercase;
}

.status-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.review-stack p {
  color: rgba(255, 255, 255, 0.82);
}

.review-actions {
  margin-top: 1rem;
}

.build-map-shell {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.build-map-figure {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: var(--deep);
}

.build-map-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: var(--deep);
}

.build-map-figure figcaption {
  padding: 0.8rem 1rem 1rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
}

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

.build-program-table .review-table {
  min-width: 1080px;
}

.review-highlight-grid,
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.review-highlight {
  min-width: 0;
  min-height: 10rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-table-wrap {
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: var(--panel);
}

.review-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.review-table th,
.review-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: normal;
  word-break: normal;
}

.review-table th {
  color: var(--deep);
  background: #f1ece2;
  font-size: 0.9rem;
}

.review-table td {
  color: var(--muted);
}

.review-table tr:last-child td {
  border-bottom: 0;
}

.table-note {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.question-block {
  margin-top: 2rem;
}

.question-block .table-note {
  color: var(--muted);
}

.answer-cell {
  min-width: 18rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.42);
}

.todo-table code {
  font-size: 0.88rem;
}

.table-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 720;
  white-space: nowrap;
}

.status-open {
  color: #694017;
  background: #f6e7bf;
}

.status-blocked {
  color: #7c1d1d;
  background: #f7d4d4;
}

.status-complete-pending-commit {
  color: #1c5b56;
  background: #d9f1ee;
}

.status-done {
  color: #f7f4ed;
  background: var(--teal);
}

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

.roadmap-list li {
  min-height: 5.5rem;
  padding: 1rem 1rem 1rem 3.1rem;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.roadmap-list li::before {
  counter-increment: roadmap;
  content: counter(roadmap);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--teal);
  font-size: 0.8rem;
  font-weight: 780;
}

.roadmap-list li.roadmap-done {
  border-color: rgba(31, 122, 114, 0.42);
  background: #eef6f3;
}

.roadmap-list li.roadmap-done::before {
  content: "OK";
  background: var(--ember);
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.94em;
  overflow-wrap: anywhere;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.72);
  background: var(--deep);
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem;
  }

  .site-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.55rem 1rem;
    font-size: 0.92rem;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-review,
  .hero-compact {
    min-height: auto;
  }

  .hero-content {
    width: min(100% - 2rem, 760px);
    padding-top: 3.5rem;
  }

  .hero-review .hero-content,
  .hero-compact .hero-content {
    padding-bottom: 3.5rem;
  }

  h1 {
    font-size: 3.25rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .metric-grid,
  .output-list,
  .review-highlight-grid,
  .evidence-grid,
  .executive-summary,
  .decision-grid,
  .topic-groups,
  .risk-grid,
  .reference-list,
  .roadmap-list,
  .status-list-grid,
  .progress-layout,
  .progress-gallery,
  .two-column {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 1rem;
  }

  .review-table {
    min-width: 920px;
  }

  .review-table th,
  .review-table td {
    padding: 0.65rem 0.5rem;
    font-size: 0.82rem;
  }

}
