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

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 20rem;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

button, input, select, textarea { font: inherit; }
button, select { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-primary); }

img { display: block; max-width: 100%; }

h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--text-3xl); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: var(--text-xl); line-height: 1.25; letter-spacing: -0.015em; }
h3 { font-size: var(--text-lg); line-height: 1.3; }

button { border: 0; }

:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

::selection { background: var(--text-primary); color: var(--bg-page); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--text-secondary); }
.quiet { color: var(--text-muted); }
.editorial { font-family: var(--font-editorial); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after {
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
}
