/* Base reset + body + a11y utilities. Component visuals live in components.css. */

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100svh;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0 0 var(--space-3);
  line-height: 1.15;
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-3); color: var(--text-primary); }

small, .text-meta {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

a {
  color: var(--secondary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Numerals use the theme's display face (Fraunces in Heirloom, Outfit in
   Nordic Frost) — opt in with the .numeral class. */
.numeral {
  font-family: var(--font-numeral);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Visible focus ring on every interactive element (§17). Never remove without
   a same-or-better replacement. */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Screen-reader-only utility — used for icon-button labels, chart summaries. */
.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;
}

/* Native inputs default to system font; force ours. */
input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Hide scrollbars on horizontal chip strips while keeping wheel/swipe scroll. */
.scroll-x {
  overflow-x: auto;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar { display: none; }
