/* The shared site header, the same on the plain views and the console: wordmark, search (search.js), the page
   navigation (nav.js; its teal highlight slides to the current page) and the theme button. Colours from the Outrider
   tokens only. Also the bundled Roboto (SIL OFL 1.1, fonts/OFL-roboto.txt), the body face of basculeuw.com. */
@font-face { font-family: Roboto; src: url("/fonts/roboto.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: Roboto; src: url("/fonts/roboto-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

.site-bar { display: flex; align-items: center; gap: 12px 16px; padding: 12px max(24px, calc((100% - 1200px) / 2 + 24px)); border-bottom: 1px solid var(--border);
  flex-wrap: wrap; background: var(--header-bg, var(--bg)); font: 15px/1.5 Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
.site-mark { font: 600 17px "ZT Talk", "Space Grotesk", system-ui, sans-serif; color: var(--ink); text-decoration: none;
  margin-right: auto; display: inline-flex; align-items: center; min-height: 32px; gap: 8px; }
.site-mark .site-logo { width: 22px; height: 22px; display: block; }
/* Liam, 15 Oct 2026: the wordmark in capitals, as on the sign-in screen (the link's name stays "Outrider, Today") */
.site-mark > span:first-of-type { text-transform: uppercase; letter-spacing: 0.08em; }
/* Liam, 16 Oct 2026: Bascule's wordmark beside Outrider's, after a thin rule ("Outrider, by BasculeUW") */
.site-by { display: inline-flex; align-items: center; padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border); height: 20px; }
.site-by .site-logo { width: auto; height: 17px; }
@media (max-width: 460px) { .site-by { display: none; } }   /* a phone keeps the header to one line */
[data-theme="dark"] .site-logo.on-light, [data-theme="light"] .site-logo.on-dark { display: none; }   /* reversed mark on dark */
.site-search { position: relative; flex: 1 1 220px; max-width: 420px; }
.site-search input { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface-2); color: var(--ink); min-height: 44px; }
.site-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; margin-top: 4px; max-height: 320px; overflow-y: auto; }
.site-results a { display: block; padding: 10px 12px; text-decoration: none; color: var(--ink); min-height: 44px; }
.site-results a:hover, .site-results a:focus { background: var(--surface-2); }
.site-results .k { color: var(--muted); font-size: 13px; }
.site-results .sub { color: var(--muted); padding: 10px 12px; margin: 0; }
.site-theme { font: inherit; font-size: 14px; background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 8px 12px; cursor: pointer; min-height: 40px; white-space: nowrap; }
.site-theme:hover { border-color: var(--accent); color: var(--ink); }
@media (max-width: 640px) { .site-bar { padding: 12px 16px; } }
@media print { .site-bar { display: none; } }

.site-nav { position: relative; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px;
  padding: 3px; background: var(--surface); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { position: relative; z-index: 1; padding: 7px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  color: var(--ink); font: 500 14px/1.4 var(--nav-font, inherit); min-height: 34px; display: inline-flex; align-items: center;
  transition: color 0.25s ease; }
.site-nav a:hover { color: var(--accent-text); }
.site-nav a[aria-current="page"] { color: var(--on-accent); }
.site-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-nav .nav-pill { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 999px; background: var(--accent);
  transition: transform 0.32s cubic-bezier(0.3, 0.7, 0.2, 1), width 0.32s cubic-bezier(0.3, 0.7, 0.2, 1); }
.site-nav .nav-pill.still { transition: none; }
.site-nav:not(.ready) a[aria-current="page"] { background: var(--accent); }        /* before nav.js runs, or without it */
@media (prefers-reduced-motion: reduce) { .site-nav .nav-pill, .site-nav a { transition: none; } }
/* UI-10: all five sections fit a 375px phone without the nav scrolling */
@media (max-width: 640px) {
  .site-nav { width: 100%; justify-content: space-between; }
  .site-nav a { padding: 7px 9px; font-size: 13.5px; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* UI-1 (docs/ui-redesign-spec.md 5): the one place the mono face is set. Numbers and identifiers only: mark a value
   with class "num" (a number) or "id" (a claim ref, FIPS, URL); code is mono by default. Never labels or prose. */
.num, .id, code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }

/* UI-4 DataTable (datatable.js; ui-redesign-spec 4.5). Each table scrolls in its own box: sideways on a narrow screen,
   and down past 70% of the window with the header sticking inside the box. */
.dt-wrap { overflow: auto; max-height: 70vh; max-width: 100%; -webkit-overflow-scrolling: touch; }
.dt thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--border); }
.dt th.num-col, .dt td.num, table td.num { text-align: right; }
.dt th.num-col .dt-sort { justify-content: flex-end; }
.dt .dt-sort { all: unset; cursor: pointer; display: inline-flex; width: 100%; gap: 4px; align-items: center; color: inherit; font-weight: inherit; }
.dt .dt-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dt th[aria-sort="ascending"] .dt-sort::after { content: "▲"; font-size: 9px; }
.dt th[aria-sort="descending"] .dt-sort::after { content: "▼"; font-size: 9px; }
.dt tr.total td { font-weight: 600; border-top: 2px solid var(--border); }
.cred-mark { color: var(--muted); font-weight: 400; cursor: help; }
.dt-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 4px 0; font-size: 13px; color: var(--muted); }
.dt-include { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.dt-more { position: relative; }
.dt-more > summary { list-style: none; cursor: pointer; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; line-height: 22px; }
.dt-more > summary::-webkit-details-marker { display: none; }
.dt-more[open] > .dt-csv { position: absolute; right: 0; top: 28px; z-index: 5; white-space: nowrap; }
.dt-csv, .dt-all { font: inherit; font-size: 13px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.dt-all { margin: 6px 0 14px; }
@media (max-width: 640px) {
  .dt td:first-child, .dt th:first-child { position: sticky; left: 0; z-index: 1; background: var(--bg); }
  .dt thead th:first-child { z-index: 3; }
}
@media print { .dt-wrap { max-height: none; overflow: visible; } .dt-bar, .dt-all { display: none; } .dt tr[hidden] { display: table-row; } }

/* Table bars and the "highest" row (datatable.js, data-bars) */
.dt td.bar { background-image: linear-gradient(to right, color-mix(in srgb, var(--accent) 22%, transparent) var(--bar), transparent var(--bar));
  background-repeat: no-repeat; background-size: 100% 70%; background-position: left center; }
.dt tr.top td { font-weight: 600; }
.dt tr.top td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.top-chip { font-size: 11px; font-weight: 500; padding: 0 6px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent-text); margin-left: 4px; white-space: nowrap; }
@media print { .dt td.bar { background-image: none; } }

/* Map zoom buttons and the dot tooltip (frontend islands.tsx, MapProps.zoom) */
.map-zoom-btns { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; gap: 4px; }
.map-zoom-btns button { font: inherit; font-size: 13px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; }
.map-zoom-btns button:hover, .map-zoom-btns button:focus-visible { border-color: var(--accent); outline: none; }
.map-dot-tip { position: absolute; z-index: 4; pointer-events: none; max-width: 320px; padding: 6px 10px; border-radius: 6px;
  font-size: 12px; line-height: 1.35; background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 18%, transparent); }
.map-zoom-hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
@media print { .map-zoom-btns, .map-zoom-hint { display: none; } }
/* UI-12: skip link, the first Tab stop on every page; hidden until focused */
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--ink); color: var(--bg);
  text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; }
main:focus { outline: none; }
