/**
 * Element defaults and small shared utilities.
 */

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
h1 { font-size: 36px; line-height: 44px; letter-spacing: -0.015em; margin: 0 0 var(--space-4); }
h2 { font-size: 28px; line-height: 36px; letter-spacing: -0.01em; margin: var(--space-8) 0 var(--space-3); }
h3 { font-size: 22px; line-height: 30px; margin: var(--space-6) 0 var(--space-2); }
h4 { font-size: 18px; line-height: 26px; font-weight: 600; margin: var(--space-5) 0 var(--space-2); }
p { margin: 0 0 var(--space-4); }

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

:where(code, kbd, pre, samp) { font-family: var(--font-mono); font-size: 13px; }
:where(:not(pre) > code) {
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: var(--surface-sunken);
}

hr { height: 0; margin: var(--space-6) 0; border: 0; border-top: 1px solid var(--border); }

::selection { background: var(--primary-soft); color: var(--on-primary-soft); }

/* Shared utilities ------------------------------------------------------- */
.dl-icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}
.dl-eyebrow {
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.dl-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.dl-stack { display: grid; gap: var(--space-4); }
.dl-measure { max-width: var(--measure); }

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  word-wrap: normal;
}
.visually-hidden.focusable:is(:active, :focus) {
  position: static !important;
  overflow: visible;
  clip: auto;
  width: auto;
  height: auto;
}
[hidden], .hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
