/* Dark only. Purdue palette: black, Boilermaker Gold, Rush, Aged, Steel, Railway Gray, Steam.
   Type: Acumin Pro / United Sans where installed, else Libre Franklin / Barlow Condensed. */
:root {
  color-scheme: dark;
  --page: #000000;
  --surface-1: #121212;
  --surface-2: #1b1b1b;
  --text-primary: #ffffff;
  --text-secondary: #c4bfc0;
  --text-muted: #9d9795;
  --grid: #2a2a2a;
  --axis: #555960;
  --border: rgba(207, 185, 145, 0.22);
  --band: rgba(207, 185, 145, 0.08);
  --gold: #cfb991;
  --rush: #daaa00;
  --aged: #8e6f3e;
  --accent: #cfb991;
  /* Methods: colour plus dash pattern (charts.js) so the lines stay distinct. */
  --series-temporal: #daaa00;
  --series-instantaneous: #ef7fa8;
  --series-arx: #5aa9ff;
  --series-oem: #45c476;
  --role-fit: #555960;
  --role-development: #8e6f3e;
  --role-test: #cfb991;
  --role-none: #1b1b1b;
  --body-font: "acumin-pro", "Acumin Pro", "Libre Franklin", "Franklin Gothic Medium", Arial, sans-serif;
  --head-font: "united-sans-condensed", "United Sans Cond", "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--text-primary); font: 16px/1.55 var(--body-font); }
a { color: var(--gold); }
a:hover { color: var(--rush); }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-primary); }
h1, h2, h3, .eyebrow, .wordmark b, .facts dt, .button, button.primary { font-family: var(--head-font); text-transform: uppercase; letter-spacing: 0.02em; }
h1 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.02; margin: 6px 0 12px; max-width: 24ch; font-weight: 700; }
.hero h1 { font-size: clamp(28px, 3.8vw, 46px); max-width: 44ch; }
h2 { font-size: 26px; line-height: 1.1; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.site-header, main, .site-footer { max-width: 1180px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 16px; padding-bottom: 14px; border-bottom: 3px solid var(--gold); }
.wordmark { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--text-primary); }
.wordmark b { font-size: 30px; line-height: 1; color: var(--gold); font-weight: 700; }
.wordmark span { font-size: 13px; color: var(--text-secondary); letter-spacing: 0.04em; text-transform: uppercase; }
.site-header nav { display: flex; gap: 4px; }
.site-header nav a { font-family: var(--head-font); text-transform: uppercase; letter-spacing: 0.06em; font-size: 18px; font-weight: 600; text-decoration: none; color: var(--text-primary); padding: 4px 12px; border-bottom: 3px solid transparent; }
.site-header nav a:hover { color: var(--gold); }
.site-header nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }

.eyebrow { margin: 0; font-size: 15px; letter-spacing: 0.14em; color: var(--gold); font-weight: 600; }
.authors { margin: 0 0 20px; color: var(--text-secondary); }
.lede { max-width: 72ch; margin: 0 0 16px; color: var(--text-secondary); font-size: 17px; }
.hero, .page-heading { padding: 36px 0 8px; }
.video-frame { aspect-ratio: 16 / 9; background: var(--surface-1); border: 1px solid var(--border); overflow: hidden; }
.video-frame video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.intro { display: grid; grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr); gap: 24px 48px; padding: 36px 0 24px; align-items: start; }
.intro p { color: var(--text-secondary); max-width: 68ch; margin: 0 0 14px; }
.facts { margin: 0; display: grid; gap: 14px; }
.facts div { border-left: 3px solid var(--gold); padding-left: 14px; }
.facts dt { font-size: 32px; line-height: 1; font-weight: 700; color: var(--text-primary); }
.facts dd { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.button { display: inline-block; cursor: pointer; border-radius: 0; font-size: 18px; font-weight: 600; letter-spacing: 0.06em; text-decoration: none; padding: 9px 20px; border: 2px solid var(--gold); color: var(--gold); }
.button:hover { background: var(--gold); color: #000; }
.button.primary { background: var(--gold); color: #000; }
.button.primary:hover { background: var(--rush); border-color: var(--rush); color: #000; }

.method-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 8px 0 4px; }
.method-cards article { background: var(--surface-1); border: 1px solid var(--border); padding: 12px 14px; }
.method-cards h3 { display: flex; align-items: center; gap: 8px; }
.method-cards p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.key { display: inline-block; width: 20px; height: 4px; flex: none; }
.key-temporal { background: var(--series-temporal); }
.key-instantaneous { background: var(--series-instantaneous); }
.key-arx { background: var(--series-arx); }
.key-oem { background: var(--series-oem); }

.panel { background: var(--surface-1); border: 1px solid var(--border); padding: 20px; margin: 20px 0; }
.error { margin: 14px 0 0; padding: 10px 14px; max-width: 72ch; border-left: 3px solid #e5484d; background: rgba(229, 72, 77, 0.12); color: #ff9a9d; font-size: 15px; }
.error[hidden] { display: none; }
.note { margin: 12px 0 0; max-width: 86ch; color: var(--text-muted); font-size: 14px; }

.explorer-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 18px; margin-bottom: 14px; font-size: 13px; color: var(--text-secondary); }
.explorer-controls label { display: grid; gap: 3px; min-width: 0; max-width: 100%; }
select, button { font: inherit; font-size: 14px; color: var(--text-primary); background: var(--surface-2); border: 1px solid var(--axis); border-radius: 0; padding: 7px 10px; }
select { max-width: min(420px, calc(100vw - 74px)); }
button { cursor: pointer; }
button:hover { border-color: var(--gold); }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: var(--gold); border-color: var(--gold); color: #000; font-weight: 600; font-size: 16px; letter-spacing: 0.05em; }
button.primary:hover { background: var(--rush); border-color: var(--rush); }
.toggles { display: flex; flex-wrap: wrap; gap: 4px 14px; border: 0; padding: 0; margin: 0; }
.toggles legend { padding: 0; margin-bottom: 3px; }
.toggles label { display: flex; align-items: center; gap: 6px; color: var(--text-primary); }
input[type="checkbox"], input[type="range"] { accent-color: var(--gold); }

.stick-hud { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 8px 12px; font-size: 12px; background: var(--page); border: 1px solid var(--grid); }
.stick-hud div { display: grid; grid-template-columns: 52px 110px; align-items: center; gap: 6px; color: var(--text-secondary); }
.bar { position: relative; height: 6px; background: var(--grid); overflow: hidden; }
.bar.signed::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--text-muted); }
.bar i { position: absolute; top: 0; bottom: 0; left: 0; background: var(--gold); }

.timeline { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; margin-top: 12px; }
.timeline-track { display: grid; gap: 2px; min-width: 0; }
.window-nav { display: flex; gap: 6px; }
#role-strip { width: 100%; height: 9px; display: block; }
#scrub { width: 100%; margin: 0; }
#time-readout { font-variant-numeric: tabular-nums; min-width: 58px; text-align: right; color: var(--text-secondary); }
.role-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.role { display: inline-block; width: 12px; height: 9px; margin-right: 5px; }
.role-fit { background: var(--role-fit); } .role-development { background: var(--role-development); }
.role-test { background: var(--role-test); } .role-none { background: var(--role-none); border: 1px solid var(--axis); }
#window-count { margin-left: auto; }
#arc-readout { color: var(--text-primary); }
.status { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; color: var(--text-secondary); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 6px; font-size: 13px; color: var(--text-secondary); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.chart-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 14px; }
.chart-panel { margin: 0; }
.chart-panel svg, .chart-host svg { width: 100%; height: auto; display: block; overflow: visible; }
.tick { font-size: 10px; fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.panel-title { font-size: 11.5px; font-weight: 600; fill: var(--text-primary); }
.axis-label { font-size: 11px; fill: var(--text-secondary); }
.end-label { font-size: 12px; fill: var(--text-primary); }
.chart-tooltip { position: absolute; z-index: 5; pointer-events: none; width: 200px; padding: 8px 10px; font-size: 12px;
  background: var(--surface-2); border: 1px solid var(--axis); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6); display: grid; gap: 2px; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip span { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.chart-tooltip span b { margin-left: auto; color: var(--text-primary); font-variant-numeric: tabular-nums; font-weight: 600; }
.chart-tooltip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }

.score-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
.score-tile { border: 1px solid var(--border); padding: 10px 12px; display: grid; gap: 2px; background: var(--page); }
.score-tile span { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.score-tile b { font-family: var(--head-font); font-size: 32px; line-height: 1.1; font-weight: 700; }
.score-tile small { color: var(--text-muted); font-size: 12px; }

.table-host { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--grid); white-space: nowrap; vertical-align: top; }
th:first-child, td:first-child, tbody th { text-align: left; }
thead th { font-family: var(--head-font); text-transform: uppercase; letter-spacing: 0.06em; font-size: 15px; font-weight: 600; color: var(--gold); border-bottom: 2px solid var(--gold); }
tbody th { font-weight: 500; }
td.wrap { text-align: left; white-space: normal; min-width: 22ch; color: var(--text-secondary); }
td.left, th.left { text-align: left; }
small.size { color: var(--text-muted); }
button.link { border: 0; padding: 0; background: none; font: inherit; color: var(--gold); text-decoration: underline; cursor: pointer; }
button.link:hover { color: var(--rush); }

.site-footer { margin-top: 28px; padding-top: 16px; padding-bottom: 40px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--text-muted); }
.site-footer p { margin: 0 0 4px; }
.site-footer b { color: var(--text-secondary); font-weight: 600; }

@media (max-width: 820px) {
  .intro { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: auto 1fr auto; }
  .timeline .window-nav { grid-column: 1 / -1; justify-content: center; }
  #window-count { margin-left: 0; flex-basis: 100%; }
  .wordmark span { display: none; }
}
