/* ==================================================
   BEACONCORE — COMPONENTS
   Shared visual behaviour: panels, plates, images, cards.
   All hover/focus/active states live here.
   ================================================== */

/* --------------------------------------------------
   PANEL SYSTEM — unified grammar
   panel-hero  (was: artifact-hero, protocol-hero)
   panel-body  (was: artifact-body, protocol-overview, protocol-artifacts)
   -------------------------------------------------- */

/* Base (light / no saber-on) */
.panel-hero,
.panel-body,
.artifact-hero,
.artifact-body,
.protocol-hero,
.protocol-overview,
.protocol-artifacts {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    background: transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Saber-on: hero panels */
html.saber-on .panel-hero,
html.saber-on .artifact-hero,
html.saber-on .protocol-hero {
    background: var(--color-bg-base);
    color: var(--color-text-bright);
    border: 1px solid var(--color-border-panel);
    border-radius: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Saber-on: body panels */
html.saber-on .panel-body,
html.saber-on .artifact-body,
html.saber-on .protocol-overview,
html.saber-on .protocol-artifacts {
    background: var(--color-bg-base);
    color: var(--color-text-bright);
    border: 1px solid var(--color-border-panel);
    border-radius: 10px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* --------------------------------------------------
   MAIN CONTAINER HOVER — soft blue glow
   Fires on direct hover OR when a child sub-container is hovered (:has)
   -------------------------------------------------- */
html.saber-on .panel-hero:hover,
html.saber-on .artifact-hero:hover,
html.saber-on .protocol-hero:hover,
html.saber-on .panel-body:hover,
html.saber-on .artifact-body:hover,
html.saber-on .protocol-overview:hover,
html.saber-on .protocol-artifacts:hover,
html.saber-on .codex-class:hover,
html.saber-on .protocol-doctrine:hover,
html.saber-on .panel-hero:has(.artifact-plate:hover),
html.saber-on .artifact-hero:has(.artifact-plate:hover),
html.saber-on .panel-body:has(.artifact-plate:hover),
html.saber-on .artifact-body:has(.artifact-plate:hover),
html.saber-on .protocol-overview:has(.artifact-plate:hover),
html.saber-on .protocol-artifacts:has(.artifact-plate:hover),
html.saber-on .protocol-artifacts:has(.sf-card:hover) {
    border-color: var(--op-55);
    box-shadow: 0 0 22px var(--op-12), 0 0 6px var(--op-22);
}

/* Surfaces page panel override — resting */
html.saber-red body.surfaces-page .panel-hero,
html.saber-red body.surfaces-page .artifact-hero,
html.saber-red body.surfaces-page .surfaces-hero,
html.saber-red body.surfaces-page .panel-body,
html.saber-red body.surfaces-page .artifact-body,
html.saber-red body.surfaces-page .surfaces-body,
html.saber-red body.surfaces-page .surfaces-doctrine {
    background: var(--color-bg-surfaces-warm);
    border: 1px solid var(--red-warm-22);
    border-radius: 12px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Surfaces page — red hover glow (saber-red only) */
html.saber-red body.surfaces-page .panel-hero:hover,
html.saber-red body.surfaces-page .artifact-hero:hover,
html.saber-red body.surfaces-page .panel-body:hover,
html.saber-red body.surfaces-page .artifact-body:hover,
html.saber-red body.surfaces-page .panel-hero:has(.artifact-plate:hover),
html.saber-red body.surfaces-page .artifact-hero:has(.artifact-plate:hover),
html.saber-red body.surfaces-page .panel-body:has(.artifact-plate:hover),
html.saber-red body.surfaces-page .artifact-body:has(.artifact-plate:hover) {
    border-color: var(--red-65);
    box-shadow: 0 0 22px var(--red-deep-14), 0 0 6px var(--red-28);
}

/* Surfaces page — artifact-plate red left-rule (saber-red only) */
html.saber-red body.surfaces-page .artifact-plate {
    border-left-color: var(--red-warm-45);
}
html.saber-red body.surfaces-page .artifact-plate:hover {
    border-left-color: var(--red-85);
    box-shadow: -4px 0 18px var(--red-deep-30), 0 0 24px var(--red-deep-10);
    transform: translateX(3px);
}

/* --------------------------------------------------
   ARTIFACT PLATE — left-rule quote/callout
   -------------------------------------------------- */
.artifact-plate {
    border: none;
    border-left: 3px solid var(--color-border);
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    background: transparent;
    transition: border-left-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    cursor: default;
}

/* Saber-on resting state */
html.saber-on .artifact-plate {
    background: transparent;
    color: var(--color-text-bright);
    border: none;
    border-left: 3px solid var(--op-35);
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    transition: border-left-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    cursor: default;
}

/* Hover — applies on ALL pages including saber-on */
.artifact-plate:hover,
html.saber-on .artifact-plate:hover {
    border-left-color: var(--color-accent-teal);
    box-shadow: -4px 0 18px var(--color-accent-glow), 0 0 24px var(--glow-teal-08);
    transform: translateX(3px);
}

/* --------------------------------------------------
   ARTIFACT CONTEXT / PREAMBLE / ACTION
   -------------------------------------------------- */
.artifact-context {
    margin-bottom: 0.5rem;
    opacity: 0.75;
}

.artifact-preamble { margin-bottom: 1rem; }

.artifact-action { margin-top: 1.25rem; }

/* Protocol preamble alias */
.protocol-preamble { margin-bottom: 1rem; opacity: 0.85; }

/* --------------------------------------------------
   ARTIFACT BLOCK + IMAGES
   -------------------------------------------------- */
.artifact-block {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Multi-image row — equal columns, wraps on small screens */
.artifact-block--row {
    justify-content: space-between;
    align-items: stretch;
    gap: 1rem;
    flex-wrap: wrap;
}
.artifact-block--row .artifact-image {
    flex: 1 1 140px;
    max-width: 32%;
    height: 200px;
    object-fit: cover;
    margin: 0;
}
@media (max-width: 600px) {
    .artifact-block--row .artifact-image { max-width: 100%; height: 180px; }
}
.artifact-image,
.artifact-hero-image {
    display: block;
    max-width: 500px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid var(--color-border-image);
}

/* --------------------------------------------------
   SF GRID / CARDS (protocol.html)
   -------------------------------------------------- */
.sf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.sf-card {
    border: 1px solid var(--op-18);
    border-radius: 8px;
    padding: 1.25rem;
    background: var(--panel-scrim-60);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    cursor: default;
}
.sf-card:hover {
    border-color: var(--glow-teal-55);
    box-shadow: 0 0 18px var(--glow-teal-18), 0 0 6px var(--color-accent-glow);
    transform: translateY(-2px);
}

.sf-card h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.sf-card p  { margin-bottom: 0.75rem; font-size: 0.9rem; opacity: 0.85; }
.sf-card a  { font-size: 0.9rem; color: var(--color-accent-teal); text-decoration: none; }
.sf-card a:hover { text-decoration: underline; }

/* Provenance Plate — full-width anchor card */
.sf-card--prov {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
}
.prov-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--op-22);
    flex-shrink: 0;
    opacity: 0.88;
    transition: opacity 0.2s, box-shadow 0.2s;
}
.sf-card--prov:hover .prov-preview {
    opacity: 1;
    box-shadow: 0 0 12px var(--glow-teal-30);
}
.prov-text {
    flex: 1;
    text-align: center;
}
.prov-text h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.prov-text p  { margin-bottom: 0.75rem; font-size: 0.9rem; opacity: 0.85; }
.prov-text a  { font-size: 0.9rem; color: var(--color-accent-teal); text-decoration: none; }
.prov-text a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .sf-card--prov { flex-direction: column; align-items: flex-start; }
    .prov-preview { width: 80px; height: 80px; }
    .prov-text { text-align: left; }
}

/* --------------------------------------------------
   CODEX CLASS SECTIONS (codex.html)
   -------------------------------------------------- */
.codex-class {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--color-border-panel);
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    background: var(--color-bg-base);
    color: var(--color-text-bright);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* --------------------------------------------------
   PROTOCOL DOCTRINE SECTIONS (protocol.html, ignition.html)
   -------------------------------------------------- */
.protocol-doctrine {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--color-border-panel);
    border-radius: 10px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    background: var(--color-bg-base);
    color: var(--color-text-bright);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* --------------------------------------------------
   CODEX DEFINITION BLOCKS
   -------------------------------------------------- */
.codex-definition {
    border-left: 2px solid var(--op-25);
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}

.codex-definition h3 {
    font-family: monospace;
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: var(--color-accent-teal);
}

/* --------------------------------------------------
   LINKS
   -------------------------------------------------- */
html.saber-on main a {
    color: var(--op-link-rest);
    text-decoration: none;
}

html.saber-on main a:hover {
    color: var(--color-accent-teal);
    text-decoration: underline;
}

.sf-open {
    display: inline-block;
    margin-top: 0.5rem;
}

/* ==================================================================
   STATE-CHAIN — GEOMETRIC INSTRUMENT
   Wireframe: LEFT-WEIGHTED. No gridlines, no chart chrome, no TV residue.
   Dark-void aesthetic. Monospace. Receiver-grade.
   ================================================================== */

.sc-section {
    margin-top: 32px;
    color: var(--color-text-primary);
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Section header — auto-summary anchored left */
.sc-section-head {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--op-10);
}
.sc-section-title {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-alpha-72);
}
.sc-summary {
    font-size: 12px;
    color: var(--text-alpha-52);
    letter-spacing: 0.04em;
    flex: 1;
}

/* Top bar — 6 readout slots */
.sc-topbar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--op-18);
    background: var(--panel-scrim-55);
    margin-bottom: 12px;
}
.sc-slot {
    padding: 8px 12px;
    border-right: 1px solid var(--op-10);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sc-slot:last-child { border-right: none; }
.sc-slot-label {
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-alpha-42);
}
.sc-slot-value {
    font-size: 14px;
    color: var(--color-text-primary);
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main wrap — LEFT-WEIGHTED grid: canvas | sidebar (mandatory right anchor) */
.sc-main-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 12px;
    margin-bottom: 12px;
}
.sc-canvas-frame {
    position: relative;
    border: 1px solid var(--op-18);
    background: var(--color-bg-base);
    min-height: 420px;
    overflow: hidden;
}
#sc-canvas {
    display: block;
    width: 100%;
    height: 420px;
}

/* Right sidebar — semantic anchor */
.sc-sidebar {
    border: 1px solid var(--op-18);
    background: var(--panel-scrim-55);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 420px;
}
.sc-sidebar-block { display: flex; flex-direction: column; gap: 6px; }
.sc-sidebar-label {
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-alpha-45);
}
.sc-patterns {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
}
.sc-pat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    font-size: 11px;
    border-left: 2px solid var(--op-35);
    background: var(--op-04);
    color: var(--color-text-primary);
    letter-spacing: 0.06em;
    text-transform: lowercase;
}
.sc-pat-type { color: var(--color-text-primary); }
.sc-pat-meta { color: var(--text-alpha-42); font-size: 10px; }
.sc-pat-empty { border-left-color: var(--shape-empty); color: var(--text-alpha-40); justify-content: flex-start; }
.sc-pat-loop   { border-left-color: var(--glow-teal-55); }
.sc-pat-arc    { border-left-color: var(--op-55); }
.sc-pat-spiral { border-left-color: var(--shape-spiral); }
.sc-pat-funnel { border-left-color: var(--shape-funnel); }
.sc-pat-claw   { border-left-color: var(--red-65); }
.sc-pat-bloom  { border-left-color: var(--shape-bloom); }

.sc-classification {
    font-size: 12px;
    color: var(--color-text-primary);
    letter-spacing: 0.04em;
    padding: 6px 8px;
    border: 1px dashed var(--op-22);
    background: var(--op-04);
}

/* Bottom bar — 3 metric slots */
.sc-bottombar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--op-18);
    background: var(--panel-scrim-55);
    margin-bottom: 10px;
}
.sc-bottombar .sc-slot { border-right: 1px solid var(--op-10); }
.sc-bottombar .sc-slot:last-child { border-right: none; }

/* Footer caption — receiver lock */
.sc-footer {
    padding-top: 8px;
    border-top: 1px solid var(--op-08);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    color: var(--text-alpha-38);
    text-align: left;
}

/* Saber-mode accents — preserve red-saber inversion behaviour */
html.saber-on .sc-canvas-frame,
html.saber-on .sc-topbar,
html.saber-on .sc-bottombar,
html.saber-on .sc-sidebar {
    border-color: var(--op-28);
    box-shadow: 0 0 18px var(--op-05);
}
html.saber-red body:not(.surfaces-page) .sc-canvas-frame,
html.saber-red body:not(.surfaces-page) .sc-topbar,
html.saber-red body:not(.surfaces-page) .sc-bottombar,
html.saber-red body:not(.surfaces-page) .sc-sidebar {
    border-color: var(--red-32) !important;
    box-shadow: 0 0 18px var(--red-06) !important;
}

/* Responsive — collapse sidebar under narrow viewports (still anchored, not removed) */
@media (max-width: 880px) {
    .sc-main-wrap { grid-template-columns: 1fr; }
    .sc-sidebar   { min-height: 0; }
    .sc-topbar, .sc-bottombar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sc-topbar .sc-slot:nth-child(3),
    .sc-topbar .sc-slot:nth-child(6) { border-right: none; }
}

/* =========================================================
   WAVE 7 — STATE-CHAIN SEALING LAYER
   T-WINDOW caption · conceptual bands · axes
   Phase transition pulse · classification lock animation
   Operator-blue sidebar scrollbar · a11y live region
   Reduced-motion handling
   ========================================================= */

/* T-WINDOW caption — bottom-center under canvas
   bottom shifted to 22px to clear the P3.2 scrub bar that sits at bottom: 2px */
.sc-twindow {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9.5px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-alpha-32);
    pointer-events: none;
    user-select: none;
    /* Wave 8 P4.1 — 1Hz tick pulse (RM-safe) */
    animation: sc-twindow-pulse 1s ease-in-out infinite;
    will-change: opacity;
}

@keyframes sc-twindow-pulse {
    0%   { opacity: 0.78; }
    50%  { opacity: 1.00; }
    100% { opacity: 0.78; }
}

@media (prefers-reduced-motion: reduce) {
    .sc-twindow {
        animation: none;
        opacity: 1;
    }
}

/* Conceptual band labels — no lines, no ticks, no grid */
.sc-band {
    position: absolute;
    left: 10px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-alpha-22);
    pointer-events: none;
    user-select: none;
}
.sc-band-top    { top: 10px; }
.sc-band-bottom { bottom: 54px; }   /* lifted above axis caption + scrub bar */

/* Faint x-axis captions — caption only, no ticks/lines */
.sc-axis {
    position: absolute;
    bottom: 38px;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    color: var(--text-alpha-22);
    pointer-events: none;
    user-select: none;
}
.sc-axis-left  { left: 10px; }
.sc-axis-right { right: 10px; }

/* Phase transition pulse — 200ms colour wash on the Storm Phase slot */
.sc-slot { transition: box-shadow 200ms ease-out, border-color 200ms ease-out; }
.sc-slot.sc-pulse-pincer       { box-shadow: inset 0 0 0 1px var(--phase-pincer);  }
.sc-slot.sc-pulse-apex         { box-shadow: inset 0 0 0 1px var(--phase-apex); }
.sc-slot.sc-pulse-collapse     { box-shadow: inset 0 0 0 1px var(--red-85);  }
.sc-slot.sc-pulse-reexpansion  { box-shadow: inset 0 0 0 1px var(--phase-reexpansion); }
.sc-slot.sc-pulse-divergence   { box-shadow: inset 0 0 0 1px var(--op-85);  }

/* Classification lock animation — 120–180ms scale-in + cross-fade */
.sc-classification { transition: opacity 160ms ease-out, transform 160ms ease-out; }
.sc-classification.sc-class-locking {
    animation: sc-class-lock 160ms ease-out;
}
@keyframes sc-class-lock {
    0%   { opacity: 0.30; transform: scale(0.96); }
    60%  { opacity: 1.00; transform: scale(1.02); }
    100% { opacity: 1.00; transform: scale(1.00); }
}

/* Compression reflection — inward vertical squeeze at >70% compression */
.sc-canvas-frame { transition: transform 240ms ease-out; }
.sc-canvas-frame.sc-compress-high { transform: scaleY(0.985); }

/* Operator-blue custom scrollbar on the patterns list */
.sc-patterns::-webkit-scrollbar { width: 6px; }
.sc-patterns::-webkit-scrollbar-track    { background: var(--op-04); }
.sc-patterns::-webkit-scrollbar-thumb    { background: var(--op-30); border-radius: 3px; }
.sc-patterns::-webkit-scrollbar-thumb:hover { background: var(--op-50); }
.sc-patterns { scrollbar-color: var(--op-30) var(--op-04); scrollbar-width: thin; }

/* Visually-hidden helper for the a11y live region (#sc-live) */
.sc-visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

/* Reduced-motion — disable instrument animations + sigil rotation */
@media (prefers-reduced-motion: reduce) {
    .sc-slot,
    .sc-classification,
    .sc-canvas-frame { transition: none !important; }
    .sc-classification.sc-class-locking { animation: none !important; }
    .sc-canvas-frame.sc-compress-high   { transform: none !important; }
    .bc-sigil, .bc-sigil-wrap, [class*="sigil"] {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   WAVE 8 P3.2 — INSTRUMENT REPLAY / SCRUB BAR
   Thin operator-blue range input pinned to the bottom of the
   canvas frame. Hidden when ring has <2 samples. Active state
   shows a faint operator-blue handle and "T-N" label.
   ========================================================= */
.sc-scrub-wrap {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    z-index: 2;
}
.sc-scrub-wrap[hidden] { display: none; }

.sc-scrub {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 14px;
    background: transparent;
    margin: 0;
    cursor: ew-resize;
}
.sc-scrub::-webkit-slider-runnable-track {
    height: 1px;
    background: var(--op-18);
    border: none;
}
.sc-scrub::-moz-range-track {
    height: 1px;
    background: var(--op-18);
    border: none;
}
.sc-scrub::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 2px;
    height: 12px;
    background: var(--op-45);
    border: none;
    border-radius: 0;
    margin-top: -6px;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}
.sc-scrub::-moz-range-thumb {
    width: 2px;
    height: 12px;
    background: var(--op-45);
    border: none;
    border-radius: 0;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}
.sc-scrub:hover::-webkit-slider-thumb,
.sc-scrub:focus-visible::-webkit-slider-thumb {
    background: var(--color-accent-operator);
    box-shadow: 0 0 6px var(--op-55);
}
.sc-scrub:hover::-moz-range-thumb,
.sc-scrub:focus-visible::-moz-range-thumb {
    background: var(--color-accent-operator);
    box-shadow: 0 0 6px var(--op-55);
}
.sc-scrub[data-scrubbing="1"]::-webkit-slider-thumb {
    background: var(--color-text-bright);
    box-shadow: 0 0 8px var(--op-55);
}
.sc-scrub[data-scrubbing="1"]::-moz-range-thumb {
    background: var(--color-text-bright);
    box-shadow: 0 0 8px var(--op-55);
}
.sc-scrub:focus-visible { outline: none; }

.sc-scrub-label {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-alpha-38);
    user-select: none;
    min-width: 36px;
    text-align: right;
}
.sc-scrub[data-scrubbing="1"] ~ .sc-scrub-label {
    color: var(--color-accent-operator);
}

@media (prefers-reduced-motion: reduce) {
    .sc-scrub::-webkit-slider-thumb,
    .sc-scrub::-moz-range-thumb { transition: none !important; }
}

/* =========================================================
   WAVE 8 P2.2 — PERSIST OPT-IN TOGGLE
   Footer caption row that holds the receiver telemetry caption
   on the left and a tiny operator-opt-in toggle on the right.
   Hidden state: persist OFF (sessionStorage only).
   Active state: persist ON  (localStorage mirror, survives reload).
   ========================================================= */
.sc-footer-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.sc-footer-cap { flex: 1; min-width: 0; }

.sc-persist {
    /* Inherits monospace family from .sc-section ancestor */
    font: inherit;
    font-size: 9.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-alpha-42);
    background: transparent;
    border: 1px solid var(--op-18);
    border-radius: 0;
    padding: 3px 8px;
    cursor: pointer;
    transition: color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    flex-shrink: 0;
    white-space: nowrap;
}
.sc-persist:hover,
.sc-persist:focus-visible {
    color: var(--color-accent-operator);
    border-color: var(--op-45);
    outline: none;
}
.sc-persist[data-persist="1"] {
    color: var(--color-accent-operator);
    border-color: var(--op-45);
    box-shadow: inset 0 0 0 1px var(--op-22);
}
.sc-persist[data-persist="1"]:hover {
    color: var(--color-text-bright);
    border-color: var(--op-55);
}
@media (prefers-reduced-motion: reduce) {
    .sc-persist { transition: none; }
}

/* Skip-link — keyboard-only, focusable */
.sr-only-focusable {
    position: absolute;
    left: -10000px;
    top: 6px;
    z-index: 9999;
    background: var(--color-bg-base);
    color: var(--color-accent-operator);
    padding: 8px 12px;
    border: 1px solid var(--op-45);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
}
.sr-only-focusable:focus { left: 12px; }
