/* Reset, document defaults, accessibility basics (mockup base + kit guards). */

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

html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 var(--fs-body)/var(--lh-base) var(--font-body);
  overflow-x: clip;            /* nothing may scroll the page sideways */
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 { font-family: var(--font-display); line-height: var(--lh-tight); text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

a { color: inherit; }

ul, ol { list-style: none; padding: 0; }

/* Visible focus is not optional. */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 6px; }
: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: -9999px; top: 0; z-index: var(--z-modal);
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-16); border-radius: var(--radius-sm);
  background: var(--color-button); color: #fff; font-weight: 600;
}
.skip-link:focus { left: var(--space-8); top: var(--space-8); }

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

/* Tap targets: 24×24 minimum added 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;
}

.tnum { font-variant-numeric: tabular-nums; }
