/**
 * reset.css — Minimal, intentional reset.
 *
 * Philosophy: Fix browser inconsistencies; do not re-declare every property.
 * Uses tokens from tokens.css — import that first.
 */

/* ── Box model ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Root ────────────────────────────────────────────────── */
html {
  font-size: 16px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

/* ── Body ────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--ink);
  background: var(--paper);   /* explicit; never transparent */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  color: var(--ink);
}

p {
  line-height: var(--leading-relaxed);
  max-width: 70ch; /* readable line length */
}

/* ── Links ───────────────────────────────────────────────── */
a {
  color: var(--teal);
  text-underline-offset: 3px;
}
a:hover { color: var(--teal-dark); }
a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

/* ── Lists ───────────────────────────────────────────────── */
ul, ol { list-style: none; }

/* ── Media ───────────────────────────────────────────────── */
img, video, svg {
  display: block;
  max-width: 100%;
}

/* ── Forms ───────────────────────────────────────────────── */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

input, select, textarea {
  background: none;
  border: none;
  outline: none;
}

/* ── Tables ──────────────────────────────────────────────── */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ── Overflow containers ─────────────────────────────────── */
/* Any element that might overflow horizontally gets its own scroll context */
pre,
.table-wrap,
.code-wrap {
  overflow-x: auto;
}

/* ── Skip link ───────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--teal);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: top var(--duration-sm) var(--ease-out);
}
.skip-link:focus { top: var(--space-2); }

/* ── Monospaced numerals ─────────────────────────────────── */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}
