/*
 * ACAD1 Review Center — base + focus
 * child-theme-guide.md §4 "Base + focus (10-base.css)", verbatim, with one
 * substitution: ::selection uses the --a1-selection token instead of the
 * guide's inline literal (see 00-tokens.css pre-flight block).
 */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--a1-bg);
  color: var(--a1-text);
  font-family: var(--a1-font);
  font-size: var(--a1-body);
  line-height: var(--a1-lh-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-weight: 800; margin: 0 0 var(--a1-s-3); }
h1 { font-size: var(--a1-h1); line-height: var(--a1-lh-display); letter-spacing: var(--a1-ls-display); }
h2 { font-size: var(--a1-h2); line-height: var(--a1-lh-heading); letter-spacing: var(--a1-ls-heading); }
h3 { font-size: var(--a1-h3); line-height: 1.2;  letter-spacing: -0.022em; }
h4 { font-size: var(--a1-h4); line-height: 1.25; letter-spacing: -0.02em; }

a { color: var(--a1-accent); text-underline-offset: 3px; }
a:hover { color: var(--a1-accent-lt); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--a1-accent); outline-offset: 2px; }
::selection { background: var(--a1-selection); }

/*
 * On-dark and on-accent focus ring.
 *
 * DELIBERATE DEVIATION from §4's literal "flip to --a1-accent-lt", and from
 * keying the flip to `.a1-dark` alone. Both halves of the original rule are
 * broken, and §12 ("Lighthouse: Accessibility ≥ 95, no contrast failures")
 * is what they break.
 *
 * 1. WRONG COLOUR. WCAG 2.2 SC 1.4.11 sets a 3:1 floor for non-text
 *    contrast, and a focus ring is non-text UI. Measured against this
 *    theme's own tokens (same method the ratios in 00-tokens.css use):
 *      --a1-accent-lt  on --a1-primary (charcoal)  2.96:1   FAILS
 *      --a1-accent-lt  on --a1-accent  (oxblood)   1.54:1   FAILS
 *      --a1-accent     on --a1-accent  (oxblood)   1.00:1   invisible
 *      --a1-contrast   on --a1-primary            16.22:1   passes
 *      --a1-contrast   on --a1-accent              8.45:1   passes
 *    So the specified flip colour does not fix the problem it exists to
 *    fix. --a1-contrast does, and it is an existing token — no new value
 *    is introduced.
 *
 * 2. WRONG SELECTOR. Nothing in this theme's CSS or PHP ever emits
 *    `.a1-dark`; it is assumed to be hand-added to GenerateBlocks content.
 *    The classes that actually ship dark and accent grounds are
 *    .a1-section--dark and .a1-card--dark (charcoal) and .a1-section--accent
 *    (oxblood — the band .a1-btn--onaccent exists specifically to sit in).
 *    On that accent band the default ring was oxblood on oxblood: literally
 *    invisible. All four selectors are listed; `.a1-dark` is kept so
 *    hand-authored markup that does use it still gets the corrected ring.
 */
.a1-dark :focus-visible,
.a1-section--dark :focus-visible,
.a1-section--accent :focus-visible,
.a1-card--dark :focus-visible { outline-color: var(--a1-contrast); }

img, svg, video { display: block; max-width: 100%; height: auto; }
