/* css/base.css — bare-element typography for body, a, button, input/select, kbd, ol/dl. Imported into the base layer by style.css. */

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 220px;
  position: relative;
}

/* Visually hidden but exposed to assistive tech (screen-reader-only content,
   e.g. the #sr-clock live region). Standard clip-rect technique. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: var(--amber-ink); /* AUD-F8 */
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input,
select {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-surface-2);
  border: 1px solid color-mix(in oklab, var(--fg) 15%, transparent);
  border-radius: var(--radius-xs);
  padding: var(--space-2) var(--space-3);
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
}

input:focus,
select:focus {
  border-color: var(--accent-amber);
}

/* AUD-F18: a 1px amber border change was the only focus cue on bare inputs —
   sub-visible generally and 1.74:1 in light theme. P4 restored rings on
   rundown/sheet/switcher fields; this covers the stragglers (show-title,
   settings fields, anything unstyled). */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--amber-ink);
  outline-offset: 1px;
}

kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: var(--bg-surface-2);
  border: 1px solid color-mix(in oklab, var(--fg) 20%, transparent);
  border-radius: var(--radius-xs);
  padding: 2px 6px;
  line-height: 1.5;
}

ol,
dl {
  list-style: none;
}

/* ── Phase 18: utilities (relocated from legacy.css section 11 per D-CW2-07; only `[hidden]` folds here — `.rail`/`.ondeck`/`.minimap` stay in legacy.css for Phase 19 per R-PATTERNS-CW2-5 Option A) ── */
[hidden] {
  display: none !important;
}

/* ── CSS-02: shared fixed-overlay backdrop base (Phase 75) ─────────────────
   Common declarations for all 5 fixed-overlay backdrops. Lives in base layer
   (below components) so per-overlay rules in components reliably win for their
   specific overrides (z-index, background tint, blur, centering, flex-direction).
   The `[hidden]{display:none!important}` rule above (base layer) and each
   overlay's own `[hidden]{display:none}` (components) still beat display:flex. */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
}
