:root {
  --fg: #111318;
  --muted: #59616d;
  --line: #252a31;
  --line-soft: #d7dce2;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-alt: #f0f3f6;
  --accent: #1558b0;
  --success: #176b3a;
  --warning: #8a5a00;
  --secondary: #6b3fa0;
  --info: #0b6e75;
  --unknown: #737b86;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:visited { color: #4a3f9e; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 10; padding: 8px 12px; color: #fff; background: var(--accent); }
.skip-link:focus { top: 8px; }
.container { width: min(calc(100% - 32px), var(--max-width)); margin-inline: auto; }
.site-header { padding-top: 24px; text-align: center; }
.eyebrow { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: 1.7rem; line-height: 1.25; }
h2 { margin: 0 0 12px; padding-bottom: 7px; font-size: 1.2rem; line-height: 1.3; border-bottom: 1px solid var(--line); }
h3 { margin: 24px 0 7px; font-size: 1rem; }
p { margin: 0 0 12px; }
.intro { max-width: 760px; margin: 7px auto 16px; color: var(--muted); }
.boundary, .caution { padding: 10px 12px; border: 1px solid var(--warning); background: #fffbf1; text-align: left; }
.boundary { max-width: 930px; margin: 0 auto 12px; }
.snapshot { display: flex; justify-content: center; gap: 0; margin: 12px auto; font-size: 13px; font-variant-numeric: tabular-nums; }
.snapshot div { display: flex; gap: 6px; padding: 4px 10px; border-right: 1px solid var(--line-soft); }
.snapshot div:last-child { border-right: 0; }
.snapshot dt { color: var(--muted); }
.snapshot dd { margin: 0; font-weight: 700; }
nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 17px; padding: 11px 0; border-block: 1px solid var(--line-soft); font-size: 14px; }
main section { margin-top: 35px; scroll-margin-top: 12px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.section-heading h2 { border: 0; margin-bottom: 0; }
.section-heading p { color: var(--muted); }
.search-form, .interaction-form, .filter-form { display: flex; align-items: end; gap: 12px; padding: 13px; border: 1px solid var(--line); background: var(--surface); }
.field { display: grid; gap: 5px; min-width: 190px; }
.field.grow { flex: 1; }
label { font-size: 13px; font-weight: 700; }
input, select, button { font: inherit; color: inherit; }
input, select { width: 100%; min-height: 40px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); }
.button, .icon-button { min-height: 40px; padding: 7px 12px; border: 1px solid var(--accent); border-radius: 0; color: #fff; background: var(--accent); font-weight: 700; cursor: pointer; }
.button:hover { background: #0f478f; }
.button.secondary, .icon-button { color: var(--accent); background: var(--surface); }
.button.secondary:hover, .icon-button:hover { background: #edf4fc; }
.form-help { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat-card, .record-card { padding: 11px 13px; border: 1px solid var(--line); background: var(--surface); }
.stat-card span { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.result-summary { font-weight: 700; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.record-card { display: flex; flex-direction: column; gap: 7px; text-align: left; cursor: pointer; }
.record-card:hover { border-color: var(--accent); background: #fbfdff; }
.record-card[aria-pressed="true"] { border: 2px solid var(--accent); padding: 10px 12px; }
.record-card h3 { margin: 0; font-size: 1rem; }
.record-card p { margin: 0; color: var(--muted); font-size: 13px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 2px 6px; border: 1px solid currentColor; font-size: 11.5px; font-weight: 700; line-height: 1.4; text-transform: uppercase; }
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.status-available, .status-embedded-demo { color: var(--success); }
.status-unavailable, .status-launch-candidate { color: var(--warning); }
.status-planned { color: var(--secondary); }
.status-contract-required { color: var(--secondary); }
.status-connected, .status-current { color: var(--info); }
.status-fixture-current, .status-accepted-demo { color: var(--success); }
.status-fixture-delayed, .status-delayed, .status-needs-review, .status-substantive-fixture, .status-operational-fixture { color: var(--warning); }
.status-administrative-fixture { color: var(--secondary); }
.status-not-connected, .status-unknown, .status-dismissed-demo, .status-technical-fixture { color: var(--unknown); }
.table-scroll { width: 100%; overflow: auto; border: 1px solid var(--line); background: var(--surface); }
.table-scroll table { min-width: 760px; }
.source-health-table { min-width: 1040px !important; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 6px 8px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
th:last-child, td:last-child { border-right: 0; }
thead th { position: sticky; top: 0; z-index: 2; border-bottom: 2px solid var(--line); background: var(--surface-alt); white-space: nowrap; }
.comparison-table tbody th { position: sticky; left: 0; z-index: 1; min-width: 160px; background: var(--surface-alt); font-weight: 700; }
.group-start th, .group-start td { border-top: 2px solid var(--line); }
caption { caption-side: bottom; padding: 7px 8px; color: var(--muted); font-size: 12px; text-align: left; }
.table-action { min-height: 30px; padding: 3px 7px; border: 1px solid var(--accent); color: var(--accent); background: #fff; cursor: pointer; }
.table-action.secondary { border-color: var(--line); color: var(--fg); }
.subsection-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-top: 24px; }
.subsection-heading h3 { margin-top: 0; }
.subsection-heading p { color: var(--muted); }
.filter-form { margin: 8px 0 12px; }
.filter-form .field:first-child { min-width: 150px; }
.change-table { min-width: 1450px !important; }
.change-table th:nth-child(1) { min-width: 130px; }
.change-table th:nth-child(2) { min-width: 150px; }
.change-table th:nth-child(4) { min-width: 145px; }
.change-table th:nth-child(5), .change-table th:nth-child(6) { min-width: 180px; }
.change-table th:nth-child(7) { min-width: 100px; }
.change-table th:nth-child(8) { min-width: 160px; }
.change-table th:nth-child(9) { min-width: 135px; }
.change-table td:nth-child(5), .change-table td:nth-child(6) { max-width: 220px; }
.change-table th:last-child, .change-table td:last-child { position: sticky; right: 0; min-width: 205px; border-left: 2px solid var(--line); background: var(--surface); }
.change-table thead th:last-child { z-index: 3; background: var(--surface-alt); }
.change-table .row-needs-review td:last-child { background: #fffdf7; }
.assertion { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }
.table-note { margin-top: 4px; color: var(--muted); font-size: 12px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 185px; }
.row-needs-review th, .row-needs-review td { background: #fffdf7; }
.message { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line-soft); background: var(--surface-alt); }
.message.error { border-color: #9d2424; background: #fff3f3; }
.message.fixture-message { border-color: var(--secondary); background: #faf7ff; }
.message.api-message { border-color: var(--info); background: #f1fbfc; }
.interaction-form { margin-top: 12px; }
.interaction-form .field { flex: 1; }
.drawer { width: min(680px, calc(100% - 24px)); max-width: none; max-height: calc(100vh - 24px); margin: 12px 12px 12px auto; padding: 16px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); }
.drawer::backdrop { background: rgba(17, 19, 24, .42); }
.drawer-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.drawer-header h2 { flex: 1; }
.drawer table th { width: 150px; background: var(--surface-alt); }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9em; }
footer { margin-top: 54px; padding: 18px 0 30px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12.5px; }
[hidden] { display: none !important; }

@media (max-width: 1100px) {
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  nav { justify-content: flex-start; }
  .search-form, .interaction-form, .filter-form { align-items: stretch; flex-direction: column; }
  .field { min-width: 0; }
  .section-heading { align-items: stretch; flex-direction: column; padding-bottom: 12px; }
  .section-heading .button { align-self: start; }
  .snapshot { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .card-grid, .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .container { width: calc(100% - 24px); }
  table { font-size: 13px; }
  .snapshot { justify-content: flex-start; }
  .site-header { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
