*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 64px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-0)/1.45 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

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

.num { font-variant-numeric: tabular-nums lining-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }
.muted { color: var(--ink-3); }
.sr-only {
  position: absolute !important; 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(--space-3); top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: var(--space-2) var(--space-4); border-radius: var(--radius-s);
}
.skip-link:focus { top: var(--space-3); }

/* Display type: the condensed "scoreboard" voice. Used for titles and big numerals only. */
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.005em; line-height: 1.02; }

.page-title { font: 700 var(--step-4)/1 var(--font-display); letter-spacing: 0.005em; }
@media (max-width: 719px) { .page-title { font-size: 2.125rem; } }

.btn {
  display: inline-flex; align-items: center; gap: var(--space-2); justify-content: center;
  min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: var(--step--1);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.btn:hover { background: var(--surface-2); }
.btn--primary { background: var(--turf); color: var(--turf-ink); border-color: var(--turf); }
.btn--primary:hover { background: var(--turf); filter: brightness(1.08); }
.btn--quiet { border-color: transparent; background: transparent; }
.btn--quiet:hover { background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid transparent;
}
.chip svg { width: 12px; height: 12px; }
.chip--final { background: var(--ink); color: var(--bg); }
.chip--warn { background: var(--warn-bg); color: var(--warn-ink); border-color: var(--warn-line); }
.chip--bad { background: var(--bad-bg); color: var(--bad-ink); border-color: var(--bad-line); }
.chip--info { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-line); }
.chip--market { background: var(--market-soft); color: var(--market); }
.chip--turf { background: var(--turf-soft); color: var(--turf); }

.field {
  min-height: 40px; padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--surface); font-size: var(--step--1);
}
.field::placeholder { color: var(--ink-3); }

.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); padding: 2px; gap: 2px; }
.seg button { min-height: 34px; padding: 0 var(--space-3); border-radius: 4px; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed='true'], .seg button[aria-selected='true'] { background: var(--ink); color: var(--bg); }
.seg button:not([aria-pressed='true']):not([aria-selected='true']):hover { background: var(--surface-2); }

/* Compact brand cues preserve readable team names in both themes. */
.team-swatch { display: inline-block; width: 0.7em; height: 0.7em; margin-right: 0.45em; border: 1px solid var(--line-strong); border-radius: 50%; vertical-align: 0.02em; box-shadow: 0 0 0 1px var(--surface); flex: none; }
