/* Reset, element defaults, focus, accessibility helpers */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
::selection { background: rgba(var(--fg-rgb), .18); }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; }

:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: var(--focus-offset); }
.sheet :focus-visible { outline-color: var(--paper-focus); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: var(--space-2); left: var(--space-2); z-index: var(--z-skip);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  background: var(--accent); color: var(--on-accent); text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

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