/* Reset, document defaults, accessibility basics. Values from the approved mockup. */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;          /* nothing may scroll the page sideways */
}

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

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* headings take face, size and line-height from their class */
h1, h2, h3, h4 { font: inherit; }

a { color: inherit; }

ul, ol { list-style: none; padding: 0; }
dl, dd { margin: 0; }
table { border-collapse: collapse; }

/* Figures in data: mono, tabular (mockup .mono / time / .num) */
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "zero" 0; }

/* Icons: Lucide inline, currentColor, sized by CSS */
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; }
.icon--missing { display: inline-block; width: 1em; height: 1em; outline: 1px dashed var(--color-error); }

/* Visible focus is not optional. */
:focus-visible { outline: 3px solid var(--color-ink); outline-offset: 3px; border-radius: var(--radius-s); }
:focus:not(:focus-visible) { outline: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.visually-hidden.visually-hidden { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: var(--z-modal);
  background: var(--color-ink); color: var(--color-bg);
  padding: 12px 16px; font-weight: 700; text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

/* A hidden element must stay hidden even when a component sets display. */
[hidden][hidden] { display: none !important; }

body.no-scroll { overflow: hidden; }

/* Tap targets: 24×24 minimum (WCAG 2.2 AA, 2.5.8) by a pseudo-element, never by padding. */
.tap-target { position: relative; }
.tap-target::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%;
  height: 100%; min-height: 24px; z-index: 1;
}

::selection { background: color-mix(in srgb, var(--color-brand) 28%, transparent); }
