:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #12161b;
  --surface-2: #171c22;
  --line: #2a323c;
  --line-soft: #20262d;
  --text: #edf2f7;
  --muted: #8f9baa;
  --cyan: #45c2d8;
  --green: #58c78b;
  --amber: #e6ab52;
  --red: #e46b6b;
  --blue: #5f8ed8;
  --white-soft: #cad3de;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-width: 320px;
}

a {
  color: inherit;
}

.topbar {
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #0d1014;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 13px;
}

.mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font: 700 15px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 21px;
  line-height: 1.1;
  font-weight: 700;
}

h2 {
  max-width: 780px;
  font-size: clamp(23px, 3vw, 38px);
  line-height: 1.12;
  font-weight: 680;
}

h3 {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 650;
}

.eyebrow {
  color: var(--muted);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.header-status,
.mission-state {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-amber {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(230, 171, 82, 0.12);
}

.status-green {
  background: var(--green);
}

.status-red {
  background: var(--red);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
  line-height: 1.5;
}

.tabs {
  height: 43px;
  padding: 0 clamp(18px, 4vw, 58px);
  display: flex;
  align-items: stretch;
  gap: 28px;
  border-bottom: 1px solid var(--line-soft);
  background: #0d1014;
  position: sticky;
  top: 0;
  z-index: 5;
}

.tabs a {
  display: flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 2px solid transparent;
}

.tabs a:hover,
.tabs a.active {
  color: var(--text);
  border-bottom-color: var(--cyan);
}

.overview-band,
.content-band {
  padding: 34px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid var(--line-soft);
}

.overview-band {
  background: #0e1115;
}

.content-band:nth-of-type(odd) {
  background: #0d1014;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 20px;
}

.section-heading.compact h2 {
  font-size: 23px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 18px;
}

.metric {
  min-height: 116px;
  padding: 18px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric:last-child {
  border-right: 0;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  font: 700 29px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.metric-detail {
  color: var(--white-soft);
  font-size: 11px;
}

.overview-grid,
.evidence-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-heading svg,
.section-heading svg {
  width: 18px;
  height: 18px;
  color: var(--cyan);
  flex: 0 0 auto;
}

.data-note {
  color: var(--muted);
  font: 600 10px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
}

.bar-chart,
.stack-chart {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 150px minmax(90px, 1fr) 54px;
  align-items: center;
  gap: 12px;
}

.bar-label,
.bar-value {
  font: 600 11px/1.3 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.bar-label {
  color: var(--white-soft);
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-value {
  text-align: right;
}

.bar-track {
  height: 9px;
  background: #232a32;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  background: var(--cyan);
}

.bar-fill.strong {
  background: var(--green);
}

.bar-fill.weak {
  background: var(--red);
}

.gate-copy {
  color: var(--white-soft);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.gate-list {
  margin: 0;
  border-top: 1px solid var(--line-soft);
}

.gate-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.gate-list dt {
  color: var(--muted);
}

.gate-list dd {
  margin: 0;
  text-align: right;
}

code {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.stack-row {
  display: grid;
  grid-template-columns: 135px minmax(100px, 1fr) 62px;
  gap: 12px;
  align-items: center;
}

.stack-name,
.stack-value {
  font: 600 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.stack-value {
  text-align: right;
  color: var(--muted);
}

.stack-track {
  display: flex;
  height: 10px;
  background: #222932;
}

.stack-primary {
  background: var(--blue);
}

.stack-supplemental {
  background: var(--amber);
}

.legend {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 17px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-swatch {
  width: 9px;
  height: 9px;
}

.legend-swatch.primary {
  background: var(--blue);
}

.legend-swatch.supplemental {
  background: var(--amber);
}

.ratio-block {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 30px 0 14px;
}

.ratio-block strong {
  font: 700 42px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  color: var(--cyan);
}

.ratio-block span {
  color: var(--white-soft);
  font-size: 13px;
  line-height: 1.4;
}

.progress-track {
  height: 7px;
  background: #242b33;
  margin-bottom: 14px;
}

.progress-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  background: var(--cyan);
}

.evidence-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--surface);
}

.evidence-table th,
.evidence-table td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.evidence-table th {
  color: var(--muted);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
  background: var(--surface-2);
}

.evidence-table tbody tr:last-child td {
  border-bottom: 0;
}

.evidence-table td:nth-child(3) {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}

.pill.pass {
  color: var(--green);
}

.pill.active {
  color: var(--amber);
}

.pill.no-go {
  color: var(--red);
}

.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.pipeline-step {
  min-height: 77px;
  display: grid;
  grid-template-columns: 46px 190px minmax(220px, 1fr) 110px;
  align-items: center;
  gap: 14px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.pipeline-step:last-child {
  border-bottom: 0;
}

.step-number {
  color: var(--muted);
  font: 700 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.step-name {
  font-size: 13px;
  font-weight: 650;
}

.step-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.step-state {
  justify-self: end;
}

.decision-band {
  padding-bottom: 42px;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.decision {
  padding: 17px 0;
  border-top: 2px solid var(--line);
}

.decision.go {
  border-top-color: var(--green);
}

.decision.hold {
  border-top-color: var(--amber);
}

.decision.stop {
  border-top-color: var(--red);
}

.decision h3 {
  margin-bottom: 8px;
}

.decision p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

footer {
  min-height: 64px;
  padding: 18px clamp(18px, 4vw, 58px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}

footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white-soft);
  text-decoration: none;
}

footer svg {
  width: 13px;
  height: 13px;
}

@media (max-width: 980px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric {
    border-bottom: 1px solid var(--line);
  }

  .metric:nth-child(even) {
    border-right: 0;
  }

  .metric:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .overview-grid,
  .evidence-layout {
    grid-template-columns: 1fr;
  }

  .pipeline-step {
    grid-template-columns: 38px 155px 1fr 90px;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
  }

  .header-status {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 175px;
    white-space: normal;
  }

  .header-status .muted {
    width: 100%;
    text-align: right;
  }

  .tabs {
    gap: 20px;
    overflow-x: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    border-right: 0;
  }

  .metric:last-child {
    grid-column: auto;
  }

  .bar-row {
    grid-template-columns: 105px minmax(70px, 1fr) 42px;
    gap: 8px;
  }

  .stack-row {
    grid-template-columns: 102px minmax(80px, 1fr) 56px;
    gap: 8px;
  }

  .pipeline-step {
    grid-template-columns: 32px 1fr auto;
    gap: 10px;
  }

  .step-detail {
    grid-column: 2 / -1;
  }

  .step-state {
    grid-column: 3;
    grid-row: 1;
  }

  .decision-grid {
    grid-template-columns: 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
