/* === BASE — reset, typography, accessibility === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--primary);
  color: var(--btn-ink);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.02em;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { max-width: 68ch; color: var(--ink-soft); }
p + p { margin-top: var(--space-4); }

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

/* Universal focus ring */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
:focus:not(:focus-visible) { outline: none; }

/* Lists */
ul, ol { padding-left: var(--space-6); }
li { color: var(--ink-soft); }

/* Misc */
img, svg { display: block; max-width: 100%; }
strong { color: var(--ink); font-weight: 600; }
code, pre {
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* Eyebrow utility */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: var(--space-3);
}

/* Mono tag */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: var(--surface-alt);
  letter-spacing: .05em;
}

/* Status dot */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: var(--glow-green);
  margin-right: var(--space-2);
  flex-shrink: 0;
}
.dot--alert { background: var(--alert); box-shadow: 0 0 12px rgba(255,107,74,.3); }

/* Screen-reader only */
.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;
}
