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

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

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

body {
  background:
    radial-gradient(900px 520px at 70% -10%, color-mix(in oklab, var(--c-brand) 7%, transparent), transparent 70%),
    var(--c-bg);
  color: var(--c-text);
  font: 400 var(--fs-body)/var(--lh-base) var(--ff-body);
  font-feature-settings: "cv11", "ss01";
  -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; background: none; border: 0; padding: 0; }

h1, h2, h3, h4 { font-family: var(--ff-head); font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

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

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

/* Visible focus is not optional, whatever the mockup shows. */
:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus-ring); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-modal);
  padding: var(--space-8) var(--space-16); background: var(--c-brand); color: var(--brand-ink); border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { left: var(--space-8); top: var(--space-8); }

.visually-hidden.visually-hidden { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; }

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

/* 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: var(--brand-tint-2); }
