/* Base: reset, type, focus, form fields, motion preferences. */
*, *::before, *::after { box-sizing: border-box; }

/* hidden always hides, also on elements with a display of their own
   (.cluster, .btn, grids) */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
}

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 650; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
small, .muted { color: var(--text-muted); }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

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

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

input, select, textarea {
  min-height: var(--touch);
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  width: 100%;
}
input[type=checkbox], input[type=radio] {
  width: 22px;
  height: 22px;
  min-height: 0;
  accent-color: var(--accent);
}

.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;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; }

.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* reduced motion: no glow animations, no smooth scrolling */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.boot { padding: var(--gutter); color: var(--text-muted); }
