:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  --ink: #132238;
  --muted: #526174;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --line: #d5dde8;
  --brand: #173f5f;
  --accent: #007c72;
  --accent-soft: #dff5f1;
  --danger: #a12622;
  --danger-soft: #fde8e7;
  --focus: #ffbf47;
  --shadow: 0 0.6rem 1.8rem rgba(19, 34, 56, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 20rem; }
a { color: #006b8f; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 0.22rem solid var(--focus); outline-offset: 0.18rem; }
.shell { width: min(74rem, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10; padding: 0.7rem 1rem; background: #fff; color: var(--ink); border-radius: 0.35rem; }
.skip-link:focus { top: 1rem; }
.site-header { background: linear-gradient(135deg, #102e49, #18586c); color: #fff; padding: 3.5rem 0 3rem; }
.header-inner { display: flex; align-items: end; justify-content: space-between; gap: 2rem; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 15ch; margin-bottom: 0.75rem; font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: 0.98; letter-spacing: -0.045em; }
h2 { margin-bottom: 0.35rem; font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.15; letter-spacing: -0.025em; }
.eyebrow { margin-bottom: 0.55rem; color: #5f6f82; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.site-header .eyebrow { color: #b9e6df; }
.lede { max-width: 48rem; margin-bottom: 0; color: #e5f0f5; font-size: 1.08rem; }
.repo-link { flex: 0 0 auto; display: inline-block; padding: 0.78rem 1rem; border: 0.12rem solid rgba(255,255,255,.75); border-radius: 0.45rem; color: #fff; font-weight: 750; text-decoration: none; }
main { padding-block: 2.5rem 4rem; }
section { margin-bottom: 3.6rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.2rem; }
.section-heading p { margin-bottom: 0; }
.timestamp { color: var(--muted); font-size: 0.9rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.metric-card { min-height: 10.5rem; padding: 1.25rem; background: var(--surface); border: 0.08rem solid var(--line); border-radius: 0.65rem; box-shadow: var(--shadow); }
.metric-primary { border-top: 0.32rem solid var(--accent); }
.metric-label { margin-bottom: 1rem; color: var(--muted); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.metric-value { margin-bottom: 0.35rem; font-size: 2.35rem; font-weight: 850; line-height: 1; letter-spacing: -0.04em; }
.metric-value.pass { color: #006c62; }
.metric-value.fail { color: var(--danger); }
.metric-detail { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
.hash { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.trend-panel { padding: 1.25rem; background: var(--surface); border: 0.08rem solid var(--line); border-radius: 0.65rem; box-shadow: var(--shadow); }
.trend-chart { min-height: 14rem; margin-bottom: 1rem; }
.trend-chart svg { display: block; width: 100%; height: auto; max-height: 15rem; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 0.08rem solid var(--line); border-radius: 0.5rem; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
#history-table { min-width: 38rem; }
#journey-table { min-width: 50rem; }
#journey-table code { white-space: nowrap; }
caption { padding: 0.7rem 0.9rem; color: var(--muted); text-align: left; font-size: 0.86rem; }
th, td { padding: 0.78rem 0.9rem; border-top: 0.08rem solid var(--line); text-align: left; vertical-align: top; }
th { background: #edf2f7; color: #2f4055; font-size: 0.78rem; letter-spacing: 0.045em; text-transform: uppercase; }
code { padding: 0.12rem 0.28rem; background: #edf2f7; border-radius: 0.22rem; color: #334155; overflow-wrap: anywhere; white-space: normal; }
.status-pill { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.5rem; border-radius: 999px; font-size: 0.82rem; font-weight: 800; }
.status-pill::before { content: ""; width: 0.48rem; height: 0.48rem; border-radius: 50%; background: currentColor; }
.status-pill.pass { background: var(--accent-soft); color: #00665d; }
.status-pill.fail { background: var(--danger-soft); color: #8d211d; }
label { color: var(--muted); font-weight: 750; }
select { display: block; min-height: 2.75rem; margin-top: 0.3rem; padding: 0.45rem 2.2rem 0.45rem 0.7rem; border: 0.1rem solid #8d9bad; border-radius: 0.35rem; background: #fff; color: var(--ink); font: inherit; }
.notice { padding: 0.9rem 1rem; background: #edf2f7; border-left: 0.32rem solid #61758a; border-radius: 0.35rem; }
.notice-success { background: var(--accent-soft); border-left-color: var(--accent); }
.notice-error { background: var(--danger-soft); border-left-color: var(--danger); }
.findings-list { display: grid; gap: 1rem; }
.finding { padding: 1rem; background: var(--surface); border: 0.08rem solid var(--line); border-left: 0.32rem solid var(--danger); border-radius: 0.45rem; }
.finding h3 { margin: 0 0 0.4rem; }
.finding p, .finding ul { margin-bottom: 0.45rem; }
.boundary { padding: 1.35rem; background: #eef3f8; border: 0.08rem solid #c9d4df; border-radius: 0.65rem; }
.boundary p { margin-bottom: 0; }
footer { padding: 1.4rem 0; background: #102e49; color: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; }
.footer-inner p { margin-bottom: 0; }
footer a { color: #fff; }

@media (max-width: 54rem) {
  .header-inner, .section-heading, .footer-inner { align-items: start; flex-direction: column; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 34rem) {
  .site-header { padding-block: 2.4rem; }
  .shell { width: min(100% - 1.2rem, 74rem); }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 0; }
  .section-heading-controls label { width: 100%; }
  select { width: 100%; }
  th, td { padding: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
