/* Reset, typography and utilities. Uses tokens.css only. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-14);
  line-height: 1.5;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-family: var(--font-display); font-size: var(--fs-36); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-family: var(--font-display); font-size: var(--fs-22); font-weight: 650; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-16); }
h4 { font-size: var(--fs-14); }
p { margin: 0 0 1em; }
small, .small { font-size: var(--fs-13); }
.xs { font-size: var(--fs-12); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

::selection { background: rgba(106, 168, 255, 0.35); }

/* numbers */
.num, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-feature-settings: 'zero' 0; letter-spacing: -0.01em; }
.tnum { font-variant-numeric: tabular-nums; }

/* color helpers */
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.pos { color: var(--up); }
.neg { color: var(--down); }
.warn { color: var(--warn); }
.info { color: var(--info); }

/* layout helpers */
.hidden, [hidden] { display: none !important; }
.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 { position: absolute; left: var(--s-3); top: -60px; z-index: 300; padding: var(--s-2) var(--s-4); border-radius: var(--r-control); background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
.skip-link:focus { top: var(--s-3); }
.flex { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.flex.nowrap { flex-wrap: nowrap; white-space: normal; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-2 { display: flex; flex-direction: column; gap: var(--s-2); }
.spacer { flex: 1 1 auto; min-width: 0; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.w-auto { width: auto !important; }
.mt-1 { margin-top: var(--s-3); }
.mt-2 { margin-top: var(--s-6); }
.mb-1 { margin-bottom: var(--s-3); }
.mb-2 { margin-bottom: var(--s-6); }
.grid { display: grid; gap: var(--s-4); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
}

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