/* Page styles for base/templates/base/advanced_analytics.html.
   Moved out of the template unchanged; linked from the same point in the
   page, so these rules still resolve in exactly the order they used to. */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-ui);
    background: var(--surface-2);
    color: var(--ink);
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Page Body ──────────────────────────────────────────────
   The page asks the shell for the wide tier (`page-content--wide`) and then
   used to take 1600px back off it here, so a page of multi-series plots was
   narrower than the basic analytics page it sits in a tab strip beside. Same
   measure as that page now — there is no third width. */
.page-body {
    max-width: var(--nh-page-measure-wide);
    margin: 0 auto;
    padding: 28px 24px 48px;
}

/* ── Banners ──────────────────────────────────────────────── */
.banner {
    display: none;
    padding: 12px 18px;
    border-radius: var(--r-sm);
    font-size: 0.85rem;
    margin-bottom: 18px;
}
.banner-loading {
    background: white;
    border-left: 3px solid var(--accent);
    color: var(--ink-2);
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.banner-error {
    background: var(--critical-tint);
    border-left: 3px solid var(--critical);
    color: var(--critical-ink);
    font-weight: 500;
}

/* ── Section Labels ───────────────────────────────────────── */
.section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.section-tag {
    font-size: var(--fs-0);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--link);
    background: var(--accent-tint);
    padding: 2px 8px;
    border-radius: var(--r-xs);
}
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
}
.section-sep {
    height: 1px;
    background: var(--surface-2);
    margin: 32px 0 28px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: white;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.03);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 1px;
}
.card-subtitle {
    font-size: 0.78rem;
    color: var(--ink-3);
}

/* ── Tech Controls (3-column) ─────────────────────────────── */
.tech-controls {
    display: grid;
    grid-template-columns: 210px 1fr 1fr;
    border-bottom: 1px solid var(--line);
}
.tc-col {
    padding: 18px 20px;
    border-right: 1px solid var(--line);
}
.tc-col:last-child { border-right: none; }

.tc-label {
    font-size: var(--fs-0);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 12px;
    display: block;
}

/* ── Site List ────────────────────────────────────────────── */
.site-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 186px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.site-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 7px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 0.81rem;
    color: var(--ink-2);
    transition: background 0.1s;
}
.site-check:hover { background: var(--surface-2); }
.site-check input[type="checkbox"] {
    accent-color: var(--link);
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    cursor: pointer;
}
.sites-badge {
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: var(--r-sm);
    font-size: 0.73rem;
    font-weight: 600;
    display: none;
    background: var(--accent-tint);
    color: var(--link);
}

/* ── Pill Toggles ─────────────────────────────────────────── */
.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}
.pill { position: relative; }
.pill input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.pill label {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: var(--r-pill);
    border: 1.5px solid var(--line);
    font-size: 0.77rem;
    font-weight: 500;
    color: var(--ink-3);
    cursor: pointer;
    transition: all 0.12s;
    user-select: none;
    white-space: nowrap;
    line-height: 1.4;
}
.pill label:hover { border-color: #94a3b8; color: var(--ink-2); }

/* default checked = slate */
.pill input:checked + label { background: #1e293b; border-color: #1e293b; color: white; }

/* per-indicator accent colours */
.pill-sma  input:checked + label { background: #0284c7; border-color: var(--accent); }
.pill-ema  input:checked + label { background: #7c3aed; border-color: #7c3aed; }
.pill-boll input:checked + label { background: #0d9488; border-color: #0d9488; }
.pill-std  input:checked + label { background: #10b981; border-color: #10b981; }
.pill-vol  input:checked + label { background: var(--warning); border-color: var(--warning); }
.pill-anom input:checked + label { background: var(--critical); border-color: var(--critical); }

/* ── Small Controls ───────────────────────────────────────── */
.ctrl-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-3);
    margin-bottom: 5px;
}
.ctrl-select {
    width: 100%;
    padding: 7px 9px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.83rem;
    color: var(--ink);
    background: var(--surface-2);
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 14px;
    appearance: auto;
}
/* W14 D10-7. These six :focus rules used to open with `outline: none`, which
   REPLACES the focus indicator with a 1.5px border tint instead of supplementing
   it — and the accompanying box-shadow rings are 10-15% alpha, i.e. effectively
   invisible. WCAG 2.1 SC 2.4.7 (Focus Visible, AA). They were also the only
   `outline: none` rules in the whole codebase, so this page was inconsistent
   with every other one, which uses real 2-3px :focus-visible outlines
   (map.css, analytics.css, assistant.css, site_notes.css).

   The border-colour change is kept — it is a nice extra affordance — and the
   outline is simply no longer suppressed, so the browser's own indicator draws
   on top of it. `.zip-input`'s border also moves from #38bdf8 (2.14:1 against
   white — fails SC 1.4.11's 3:1 for a non-text indicator) to #0284c7 (4.10:1),
   matching the other five. */
.ctrl-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(2,132,199,0.1);
    background: white;
}

/* ── Param Grid ───────────────────────────────────────────── */
.param-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 18px;
}
.param-field label {
    display: block;
    font-size: var(--fs-0);
    font-weight: 500;
    color: var(--ink-3);
    margin-bottom: 3px;
}
.param-field input {
    width: 100%;
    padding: 5px 8px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    color: var(--ink);
    background: var(--surface-2);
    transition: border-color 0.15s;
}
.param-field input:focus {
    border-color: var(--accent);
    background: white;
}

/* ── Timeframe Row ────────────────────────────────────────── */
.tf-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.tf-field label {
    display: block;
    font-size: var(--fs-0);
    font-weight: 500;
    color: var(--ink-3);
    margin-bottom: 3px;
}
.tf-field select,
.tf-field input {
    width: 100%;
    padding: 6px 8px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.81rem;
    color: var(--ink);
    background: var(--surface-2);
    transition: border-color 0.15s;
}
.tf-field select:focus,
.tf-field input:focus {
    border-color: var(--accent);
    background: white;
}

/* ── Anomaly counter ──────────────────────────────────────── */
.anomaly-counter {
    display: none;
    margin-top: 8px;
    padding: 5px 10px;
    background: var(--critical-tint);
    border-radius: var(--r-sm);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--critical-ink);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--r-sm);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.13s;
    white-space: nowrap;
}
/* The CEDEN export is an <a>, not a <button>, so it needs the link
   decoration cleared to sit level with the buttons beside it. */
a.btn { text-decoration: none; }
/* Was #0284c7 resting with var(--accent) on hover — a hue the token system
   does not contain, darkening to a different hue on hover. One accent now. */
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 3px 10px rgba(31,109,143,0.3);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: white;
    color: var(--ink-2);
    border: 1.5px solid var(--line);
}
.btn-secondary:hover {
    border-color: #94a3b8;
    color: var(--ink);
}

/* ── Chart area ───────────────────────────────────────────── */
.chart-wrap {
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface-2);
}
.chart-pad { padding: 12px 16px 16px; }

/* ── Explorer controls ────────────────────────────────────── */
.explorer-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 16px 20px;
}
.ec-field {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}
.ec-field label {
    font-size: var(--fs-0);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 5px;
}
.ec-field select,
.ec-field input {
    padding: 8px 10px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    font-size: 0.83rem;
    color: var(--ink);
    background: var(--surface-2);
    transition: border-color 0.15s;
}
.ec-field select:focus,
.ec-field input:focus {
    border-color: var(--accent);
    background: white;
}
.ec-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
    align-self: flex-end;
    padding-bottom: 1px;
}

/* ── Stats strip ──────────────────────────────────────────── */
/* JS appends .stat-card elements into #statsGrid */
#statsGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: var(--surface-2);
}
#statsGrid .stat-card {
    flex: 1;
    min-width: 140px;
    padding: 14px 18px;
    background: white;
    text-align: center;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
#statsGrid .stat-card:last-child { border-right: none; }
/* What the numbers beside it do NOT cover. Full width so it cannot be read as
   one more card, and dark enough on the amber to clear AA (7.4:1). */
#statsGrid .stat-truncation-note {
    flex: 1 0 100%;
    padding: 10px 18px;
    background: #fef3c7;
    color: #713f12;
    font-size: 0.8rem;
    line-height: 1.35;
    border-bottom: 1px solid var(--line);
}
/* The same warning above the charts, for the reader who never scrolls to the
   summary cards. */
#externalDataNote {
    background: #fef3c7;
    color: #713f12;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.82rem;
    line-height: 1.4;
}
#externalDataNote p { margin: 0 0 4px; }
#externalDataNote p:last-child { margin-bottom: 0; }
#statsGrid .stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 3px;
    line-height: 1.2;
}
#statsGrid .stat-label {
    font-size: var(--fs-0);
    font-weight: 500;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── 2×2 histogram grid ───────────────────────────────────── */
.chart-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--surface-2);
}
.chart-cell {
    background: white;
    padding: 12px 16px;
}

/* ── Histogram bins inline control ───────────────────────── */
.inline-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--ink-3);
    font-weight: 500;
}
.inline-ctrl input {
    width: 58px;
    padding: 4px 7px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-xs);
    font-size: 0.81rem;
    color: var(--ink);
    background: var(--surface-2);
}
.inline-ctrl input:focus {
    border-color: var(--accent);
    background: white;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
    .tech-controls {
        grid-template-columns: 1fr;
    }
    .tc-col {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .tc-col:last-child { border-bottom: none; }
    .chart-grid-2x2 { grid-template-columns: 1fr; }
    .ec-actions { margin-left: 0; width: 100%; }
}

@media (max-width: 600px) {
    .page-body { padding: 14px 12px 32px; }
    .param-grid { grid-template-columns: 1fr; }
    .tf-row { grid-template-columns: 1fr; }
}

/* ── Phones ───────────────────────────────────────────────────
   Everything above assumes a control row can sit side by side. On a
   360–430px screen it can't: fixed min-widths overflow the viewport and
   the page scrolls sideways. Below, every control becomes full width,
   charts get shorter, and the header collapses to one line. */
@media (max-width: 560px) {

    .tc-col { padding: 14px 14px; }
    .card-header, .precip-row, .export-controls { padding: 12px 14px; }

    /* Controls: one per row, full width, no fixed minimums. */
    .ec-field, .ctrl-select, .zip-input, .data-note,
    #threeDVarPickers .reg-group { min-width: 0; width: 100%; }
    .ec-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .ec-actions .btn { flex: 1 1 100%; }
    .btn { width: 100%; justify-content: center; }
    .tab-strip, .chip-row { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* Charts: Plotly is responsive, but the default heights waste a
       phone screen. The heights are inline on the divs (Plotly sizes
       itself from them), so overriding needs !important. (#threeDChart's
       moved into this sheet with the rest of the regression panel — its
       !important is now only guarding source order.) */
    .chart-cell, .chart-box, .plot-box { min-height: 0; }
    .js-plotly-plot, .plot-container { max-width: 100%; }
    #technicalChart { height: 420px !important; }
    #threeDChart { height: 380px !important; }
    #tempHistogram, #conductivityHistogram, #depthHistogram,
    #correlationMatrix { height: 260px !important; }
    #statsGrid .stat-card { min-width: 50%; }

    /* Any wide block scrolls inside itself rather than the page. Scoped to
       this page's own body class — a bare `table` selector from one page
       sheet restyles every table on any page that co-loads it. */
    .page-body table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ── Precipitation Row ─────────────────────────────────────── */
.precip-row {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
}
.precip-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.zip-input {
    width: 110px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.85rem;
    font-family: inherit;
}
.zip-input:focus {
    /* #0284c7, not #38bdf8: 4.10:1 against white instead of 2.14:1. SC 1.4.11
       requires 3:1 for a non-text indicator. */
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(2,132,199,0.25);
}
.zip-input::placeholder { color: var(--ink-3); }
.pill-rain input:checked + label {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pill-weather input:checked + label {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.data-note {
    font-size: 0.76rem;
    color: var(--ink-2);
    background: var(--accent-tint);
    border: 1px solid #bae6fd;
    border-radius: var(--r-sm);
    padding: 6px 12px;
    flex: 1;
    min-width: 220px;
    line-height: 1.4;
}

/* ── Dark mode ─────────────────────────────────────────────
   Follows the site-wide toggle (localStorage 'darkMode'); the JS
   (checkDarkMode) adds .dark-mode to <body> and re-themes the charts. */
body.dark-mode { background: #0f172a; color: var(--ink); }
body.dark-mode .page-body { color: var(--ink); }
body.dark-mode .card { background: var(--surface-2); border-color: var(--ink-2);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.25); }
body.dark-mode .card-header { border-bottom-color: var(--ink-2); }
body.dark-mode .card-title { color: var(--ink); }
body.dark-mode .card-subtitle { color: var(--ink-3); }
body.dark-mode .section-title { color: var(--ink); }
body.dark-mode .section-tag { color: var(--accent-tint-ink); background: var(--accent-tint); }
body.dark-mode .section-sep { background: var(--surface-2); }
body.dark-mode .banner-loading { background: var(--surface-2); color: #cbd5e1; box-shadow: none; }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background: var(--paper); color: var(--ink); border-color: var(--ink-2); }
body.dark-mode label { color: #cbd5e1; }
body.dark-mode .btn-secondary { background: var(--surface-2); color: var(--ink); border-color: var(--ink-2); }
body.dark-mode .pill { color: var(--ink); }
body.dark-mode .chart-wrap { background: var(--surface-2); }
body.dark-mode .page-body a { color: var(--accent-tint-ink); }
/* Summary stat tiles (Mean / Std Dev / Range …) */
body.dark-mode #statsGrid { background: var(--paper); }
body.dark-mode #statsGrid .stat-card { background: var(--surface-2); border-color: var(--ink-2); }
body.dark-mode #statsGrid .stat-value { color: var(--ink); }
body.dark-mode #statsGrid .stat-label { color: var(--ink-3); }
/* Distribution histograms: the cell behind each dark plot + the grid gap lines */
body.dark-mode .chart-grid-2x2 { background: var(--surface-2); }
body.dark-mode .chart-cell { background: var(--surface-2); }

/* Floating theme toggle (matches the rest of the site) */
.theme-toggle {
    position: fixed; bottom: 20px; right: 20px; z-index: 1000;
    padding: 8px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong);
    background: var(--surface); color: var(--ink-2); cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 8px; font-size: 0.9rem;
}
body.dark-mode .theme-toggle { background: #1969b9; color: var(--ink); border-color: var(--line); }

/* Sensor Regressions controls: caption-above fields, grouped so related
   pairs (site+var, from+to) stay together and wrap as units. */
#threeDVarPickers {
    display: flex; flex-wrap: wrap; align-items: flex-end;
    gap: 12px 18px; margin-bottom: 6px; font-size: 0.85rem;
}
#threeDVarPickers > label,
#threeDVarPickers .reg-group > label {
    display: inline-flex; flex-direction: column; gap: 3px;
    font-size: 0.72rem; font-weight: 600; color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.02em;
}
body.dark-mode #threeDVarPickers > label,
body.dark-mode #threeDVarPickers .reg-group > label { color: var(--ink-3); }
#threeDVarPickers .reg-group {
    display: flex; gap: 8px; align-items: flex-end;
    padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
}
body.dark-mode #threeDVarPickers .reg-group { border-color: var(--ink-2); }
#threeDVarPickers .ctrl-select { min-width: 108px; }
#threeDVarPickers input[type="date"].ctrl-select { min-width: 130px; }
#regFitPickers { display: flex; gap: 12px; align-items: center; }
#regFitPickers .reg-fit-label {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.85rem; text-transform: none; letter-spacing: normal; font-weight: 400;
}
@media (max-width: 640px) {
    #threeDVarPickers .reg-group { flex: 1 1 100%; }
    #threeDVarPickers .ctrl-select { flex: 1 1 auto; min-width: 0; }
}

/* The Sensor Regressions plot and the cards beneath it.
   ── Where these rules came from ────────────────────────────────────────
   The cards under the chart (the equation + R² per fit, the 3D "Axes" card,
   the "pick a fit" / error notes) were built in advanced_analytics.js as HTML
   strings carrying `style="..."` attributes, with the dark-mode border and
   caption ink chosen by a JS `isDarkMode ? … : …` on every render. That is the
   one arrangement this codebase has been moving away from: it is a style-src
   'unsafe-inline' dependency, and it splits one card's appearance across two
   files. The declarations are here now, unchanged in effect except that the
   captions and notes moved off a hardcoded #94a3b8 (2.7:1 on white — it did
   not pass) onto --ink-3, which is AA on both surfaces and needs no branch. */
#threeDChart { height: 450px; }
#regressionStats { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.reg-card {
    flex: 1; min-width: 220px;
    border: 1px solid var(--line); border-radius: var(--r-sm);
    padding: 10px 12px;
}
/* The 3D cards carry a three-line axis list / a two-variable equation. */
.reg-card--wide { min-width: 260px; }
.reg-card-title { font-weight: 700; font-size: 0.8rem; }
/* One colour per fit degree, the same three the fitted lines are drawn in
   (advanced_analytics.js, `fitColors`) — the card is the line's label, so if
   one of those hexes changes the other has to change with it. */
.reg-card-title--fit1 { color: #D55E00; }
.reg-card-title--fit2 { color: #009E73; }
.reg-card-title--fit3 { color: #7c3aed; }
.reg-card-title--surface { color: #0072B2; }
.reg-card-title--axes { color: var(--ink-2); }
.reg-card-eq {
    font-family: var(--font-data);
    font-size: 0.79rem; margin: 4px 0; word-break: break-word;
}
.reg-card-meta { font-size: 0.78rem; color: var(--ink-3); }
.reg-card-axes { display: grid; gap: 2px; font-size: 0.78rem; color: var(--ink-3); }
.reg-card-axes b { color: var(--ink-2); font-weight: 700; }
.reg-note { font-size: 0.82rem; color: var(--ink-3); }
.reg-note--error { color: var(--critical-ink); }
/* No `body.dark-mode .reg-card` rule is needed: --line and --ink-3 are both
   redefined under .dark-mode in tokens.css, and land within a shade of the two
   hexes the JS branch used to pick (#374151 border, #9ca3af caption). */

/* Skip link (W14 D10-7, WCAG 2.1 SC 2.4.1 Bypass Blocks, Level A).
   This page is its own document — it does not extend main.html — so it
   inherited neither the shell's skip link nor its styling, and it is one of the
   pages with the LONGEST control preamble before the content. Same rule as
   static/css/site.css:51; duplicated rather than imported because this page
   does not load site.css at all. */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 12px 20px;
    z-index: 9999;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--r-xs) 0;
}
.skip-link:focus { top: 0; }

/* The per-axis site search (2026-09-01). Sits directly above its <select> and
   takes the same width, so an axis reads as one control rather than two. */
.reg-site-search {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 4px;
  font-size: .8rem;
}
