:root {
  color-scheme: light;
  --bg: #f4f7fa;
  --panel: #ffffff;
  --ink: #07172f;
  --muted: #5f6c7d;
  --line: #d7e0ea;
  --navy: #082452;
  --teal: #087f72;
  --teal-soft: #ddf7ef;
  --blue: #1456a0;
  --blue-soft: #e7f0fb;
  --amber: #9a5d00;
  --amber-soft: #fff0cc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; letter-spacing: 0; }

.topbar {
  align-items: center;
  background: var(--navy);
  color: white;
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
}

.brand { font-size: 24px; font-weight: 850; }
.topbar nav { display: flex; gap: 24px; font-size: 14px; font-weight: 750; }
.topbar nav a { border-bottom: 3px solid transparent; padding: 22px 0 18px; }
.topbar nav a:hover { border-bottom-color: #5ee0c2; }

main { margin: 0 auto; max-width: 1380px; padding: 38px 28px 72px; }

.report-header {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) 240px;
  padding: 12px 0 34px;
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 9px;
  text-transform: uppercase;
}

h1 { font-size: 48px; line-height: 1.04; margin-bottom: 16px; }
h2 { font-size: 28px; line-height: 1.15; margin-bottom: 0; }
h3 { font-size: 16px; margin-bottom: 12px; }
.lede { color: var(--muted); font-size: 18px; line-height: 1.65; margin: 0; max-width: 900px; }

.verdict {
  align-content: center;
  background: var(--teal-soft);
  border-left: 4px solid var(--teal);
  display: grid;
  min-height: 128px;
  padding: 20px;
}

.verdict span, .verdict small { color: #315c55; font-size: 12px; font-weight: 750; }
.verdict strong { color: var(--teal); font-size: 34px; line-height: 1.2; text-transform: uppercase; }

.metric-strip {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric { border-right: 1px solid var(--line); min-height: 116px; padding: 24px 26px; }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); display: block; font-size: 12px; font-weight: 750; margin-bottom: 9px; text-transform: uppercase; }
.metric strong { font-size: 34px; line-height: 1; }

.report-section { border-bottom: 1px solid var(--line); padding: 40px 0; }
.section-heading { align-items: end; display: flex; gap: 32px; justify-content: space-between; margin-bottom: 24px; }
.section-heading > p { color: var(--muted); line-height: 1.55; margin: 0; max-width: 620px; }

.evidence-chain {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  list-style: none;
  margin: 0;
  overflow-x: auto;
  padding: 0 0 10px;
}

.chain-step { border-left: 1px solid var(--line); min-height: 250px; padding: 0 18px 18px; }
.chain-step:first-child { border-left: 4px solid var(--blue); }
.chain-sequence { align-items: center; background: var(--blue-soft); color: var(--blue); display: flex; font-size: 14px; font-weight: 850; height: 32px; justify-content: center; margin-bottom: 18px; width: 32px; }
.chain-step strong { display: block; font-size: 15px; line-height: 1.35; min-height: 42px; }
.chain-step p { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 98px; }

.status-chip { background: var(--teal-soft); color: var(--teal); display: inline-flex; font-size: 11px; font-weight: 850; min-height: 25px; padding: 6px 9px; text-transform: uppercase; width: fit-content; }
.status-chip.baseline { background: var(--blue-soft); color: var(--blue); }

.run-table-wrap { overflow-x: auto; }
table { background: var(--panel); border-collapse: collapse; min-width: 1050px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 15px 14px; text-align: left; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
td { font-size: 13px; }
td a { color: var(--blue); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.digest { font-size: 12px; }

.boundary-band { background: var(--panel); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1.2fr 0.8fr; }
.boundary-enforced, .boundary-excluded { padding: 38px; }
.boundary-excluded { background: #fff8e8; border-left: 1px solid #efd8a9; }
.boundary-enforced dl { display: grid; gap: 0 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 24px 0 0; }
.boundary-enforced dl div { border-top: 1px solid var(--line); min-width: 0; padding: 14px 0; }
dt { color: var(--muted); font-size: 11px; text-transform: uppercase; }
dd { font-size: 13px; font-weight: 750; margin: 5px 0 0; overflow-wrap: anywhere; }
.boundary-excluded ul, .disclosure ul { margin: 22px 0 0; padding-left: 20px; }
.boundary-excluded li, .disclosure li { line-height: 1.55; margin: 9px 0; }

.disclosure-grid { display: grid; gap: 50px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.disclosure-grid > div { border-top: 2px solid var(--line); padding-top: 20px; }
.disclosure-note { background: var(--blue-soft); border-left: 4px solid var(--blue); color: #23415f; line-height: 1.55; margin: 24px 0 0; padding: 16px; }

footer { align-items: center; background: var(--navy); color: white; display: flex; font-size: 13px; justify-content: space-between; min-height: 76px; padding: 0 32px; }
footer a { color: #8ee7d1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.load-error { background: #fee8e8; border-left: 4px solid #b4232f; color: #8b1720; margin-bottom: 20px; padding: 16px; }

@media (max-width: 900px) {
  .report-header { align-items: stretch; grid-template-columns: 1fr; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(2) { border-right: 0; }
  .boundary-band { grid-template-columns: 1fr; }
  .boundary-excluded { border-left: 0; border-top: 1px solid #efd8a9; }
}

@media (max-width: 620px) {
  .topbar { align-items: flex-start; gap: 12px; padding: 16px 18px; }
  .topbar nav { flex-wrap: wrap; gap: 8px 16px; justify-content: flex-end; }
  .topbar nav a { padding: 4px 0; }
  main { padding: 26px 16px 50px; }
  h1 { font-size: 36px; }
  .lede { font-size: 16px; }
  .metric { padding: 20px 16px; }
  .metric strong { font-size: 28px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .evidence-chain { grid-template-columns: 1fr; overflow: visible; }
  .chain-step {
    border-bottom: 1px solid var(--line);
    border-left: 4px solid var(--line);
    display: grid;
    gap: 7px 12px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-height: 0;
    padding: 16px 0 16px 14px;
  }
  .chain-sequence { grid-row: 1 / span 3; margin: 0; }
  .chain-step strong { min-height: 0; }
  .chain-step p { grid-column: 2 / -1; min-height: 0; margin: 0; }
  .chain-step .status-chip { grid-column: 2; }
  .boundary-enforced, .boundary-excluded { padding: 28px 20px; }
  .boundary-enforced dl, .disclosure-grid { grid-template-columns: 1fr; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; justify-content: center; padding: 18px; }
  footer a { overflow-wrap: anywhere; }
}
