/* Reset, typography, forms — mobile-first. */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 {
  font-size: var(--fs-h3); font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted);
}

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

/* Visible focus for keyboard users everywhere (accessibility §A6). */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .55; }

input, select, textarea {
  font: inherit;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  min-height: 44px;                 /* touch target */
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 var(--s1);
}

/* Screen-reader only, but focusable (skip link). */
.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:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto;
  clip: auto; margin: 0; padding: 10px 16px; background: var(--accent); color: #fff;
  border-radius: var(--radius-sm);
}

.muted { color: var(--muted); font-size: var(--fs-small); }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.stack > * + * { margin-top: var(--s3); }
.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.row-end { justify-content: flex-end; }
.spacer { flex: 1; }

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