/* ============================================
   FOCUS RING (accessibility pass, 2026-10)
   One ring for every keyboard focus on the site: buttons, links, fields,
   the step and section buttons, tabs, and the controls drawn over a hidden
   input (file and logo pickers) and the consent radio cards.

   Loaded last on every page so nothing after it can take the ring away.
   The outline is !important for the same reason: a component rule with
   outline: none (or a thinner, paler outline) no longer wins.

   --focus-ring is the dark navy: 14.7:1 on white, 13.9:1 on cream, 13.1:1
   on warm, and at least 3:1 on every tool tint. On a dark band it switches
   to white. test/hardening/focus-ring.test.js checks these numbers and
   test/hardening/a11y-pass-check.js measures every stop in a browser.
   ============================================ */
:root {
    --focus-ring: #142942;
    --focus-ring-width: 3px;
}

/* Dark bands: a white ring. */
.landing-hero-band {
    --focus-ring: #ffffff;
}

:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring) !important;
    outline-offset: 2px;
}

/* The file and logo inputs are visually hidden, so the ring goes on the
   button drawn for them; a consent radio rings its whole card. */
.file-picker input:focus-visible + .file-picker-btn,
.logo-picker input:focus-visible + .logo-picker-btn,
.story-radio:has(input:focus-visible) {
    outline: var(--focus-ring-width) solid var(--focus-ring) !important;
    outline-offset: 2px;
}

/* Windows high contrast and other forced colors: the system highlight. */
@media (forced-colors: active) {
    :focus-visible {
        outline-color: Highlight !important;
    }
}
