/* Base reset & typography — built on top of design-system.css tokens */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
}

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

a { color: var(--color-primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-primary-hover); }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-3);
  color: var(--color-text);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-4); }

p, li { line-height: var(--leading-relaxed); }

ul, ol { padding-left: 1.25rem; }

/* Visible focus states everywhere — accessibility requirement */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section {
  padding: var(--space-7) 0;
}

.section--tight {
  padding: var(--space-6) 0;
}

.visually-hidden {
  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: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--text-sm); }

@media (max-width: 640px) {
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  .section { padding: var(--space-6) 0; }
}
