/* base.css — reset + base element styling (design tokens live in style.css) */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  /* Anchor and focus scrolling must not park an element under the fixed ticker. */
  scroll-padding-bottom: var(--tick-clear);
}

/* `clip`, not `hidden`: overflow-x:hidden on the root turns it into a scroll
   container, and browsers then refuse to stick any position:sticky descendant —
   which silently disabled both the masthead and the live-tab filter bar. */
html, body { overflow-x: clip; }

body {
  min-height: 100dvh;
  line-height: 1.55;
  font-family: var(--f-body);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--tx);
  background-color: var(--bg);
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; font-weight: 400; }
p, li { text-wrap: pretty; }

::selection { background: color-mix(in srgb, var(--blue) 32%, transparent); color: var(--tx); }
/* --focus-ring is remapped per skin; --blue is the fallback for the bare root. */
:focus-visible {
  outline: 2px solid var(--focus-ring, var(--blue));
  outline-offset: var(--focus-offset, 2px);
  border-radius: 14px;
}

/* ============================================================
   MOTION

   A blanket `animation-duration: 0.01ms !important` used to live here. It is
   deliberately gone. Clamping every duration to zero also erases the feedback
   that tells you something changed, which left a run scoring with no
   acknowledgement at all for exactly the users who most need one — the failure
   mode is worse than the motion.

   So motion degrades in three graded steps instead:

     full     — the whole takeover timeline plays.
     reduced  — journeys and expansions are dropped; sub-120ms colour and
                opacity feedback is kept, and every persistent static marker
                stays. This is what `prefers-reduced-motion` maps to.
     off      — no tweens at all. Static markers still stay.

   `[data-motion]` is set pre-paint from the OS signal and overridable in the
   Display disclosure, so the OS media query only supplies the default. The
   rules below key off the attribute, never the query, so an explicit choice of
   Full is honoured on a machine that reports a reduce preference.
   ============================================================ */

/* Both reduced settings drop every keyframe animation (all of ours are journeys
   or loops) and narrow transitions to properties that cannot displace anything.
   Layout, transform and size changes are applied instantly. */
[data-motion='reduced'] *, [data-motion='reduced'] *::before, [data-motion='reduced'] *::after,
[data-motion='off'] *, [data-motion='off'] *::before, [data-motion='off'] *::after {
  animation: none !important;
  transition-property: color, background-color, border-color, box-shadow, outline-color, opacity, fill, stroke !important;
  scroll-behavior: auto !important;
}
/* Fast enough to read as an immediate state change rather than a movement. */
[data-motion='reduced'] *, [data-motion='reduced'] *::before, [data-motion='reduced'] *::after {
  transition-duration: 100ms !important;
}
[data-motion='off'] *, [data-motion='off'] *::before, [data-motion='off'] *::after {
  transition-duration: 0s !important;
}
[data-motion='reduced'], [data-motion='off'] { scroll-behavior: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
