/* ─────────────────────────────────────────────────────────────────────────── */
/* LDB — Design System · Amber & Ink                                            */
/* Editorial sports analytics — warm parchment canvas, deep ink chrome          */
/* ─────────────────────────────────────────────────────────────────────────── */

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

/* ── Semantic aliases ────────────────────────────────────────────────────────── */
:root {
  --bg:         var(--t-bg);
  --surface:    var(--t-surface);
  --surface2:   var(--t-surface-2);
  --surface3:   var(--t-surface-3);
  --border:     var(--t-border);
  --border2:    var(--t-border-2);
  --ink:        var(--t-ink);
  --ink2:       var(--t-ink-2);
  --ink-border: var(--t-ink-border);
  --accent:     var(--t-accent);
  --accent-dk:  var(--t-accent-dk);
  --accent-lt:  var(--t-accent-lt);
  --text:       var(--t-text);
  --text-dim:   var(--t-text-dim);
  --text-muted: var(--t-text-muted);
  --text-inv:      var(--t-text-inv);
  --text-inv-dim:  var(--t-text-inv-dim);
  --text-inv-muted:var(--t-text-inv-muted);
  --neutral:    var(--t-text-dim);
  --win:        var(--t-win);
  --win-dim:    var(--t-win-dk);    /* legacy alias */
  --win-dk:     var(--t-win-dk);
  --win-lt:     var(--t-win-lt);
  --loss:       var(--t-loss);
  --loss-dim:   var(--t-loss-dk);   /* legacy alias */
  --loss-dk:    var(--t-loss-dk);
  --loss-lt:    var(--t-loss-lt);
  --accent-dim: var(--t-accent-dk); /* legacy alias */
  --warn:       var(--t-warn);
  --warn-lt:    var(--t-warn-lt);
  --serif:      var(--t-serif);
  --mono:       var(--t-mono);
  --radius:     var(--t-radius);
  --radius-lg:  var(--t-radius-lg);
}

/* ── Base ────────────────────────────────────────────────────────────────────── */
html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

/* ── Scrollbars ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Focus ring ──────────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--t-radius-sm);
}

/* ── Animations ──────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ── Header — dark ink masthead ──────────────────────────────────────────────── */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 0 var(--t-sp-6);
  background: var(--ink);
  border-bottom: 1px solid var(--ink-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: var(--t-sp-2);
}

.header-brand h1 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  line-height: 1;
}

.header-brand .subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--text-inv-dim);
  letter-spacing: 0.01em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: var(--t-sp-3);
}

.as-of {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-inv-muted);
  letter-spacing: 0.02em;
}

/* ── Status badge ────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-ok::before  { animation: pulse 2.4s ease-in-out infinite; }

/* Badges sit on dark ink header — use bright variants that pass WCAG AA on dark bg */
.badge-ok      { color: #4ADE80; background: rgba(74,222,128,0.12); border-color: rgba(74,222,128,0.30); }
.badge-warn    { color: #FBBF24; background: rgba(251,191,36,0.12); border-color: rgba(251,191,36,0.30); }
.badge-error   { color: #FF6B6B; background: rgba(255,107,107,0.12); border-color: rgba(255,107,107,0.30); }
.badge-unknown { color: var(--text-inv-dim); background: rgba(255,255,255,0.08); border-color: var(--ink-border); }

/* ── Nav — sits under dark masthead ──────────────────────────────────────────── */
nav {
  display: flex;
  padding: 0 var(--t-sp-6);
  background: var(--ink2);
  border-bottom: 1px solid var(--ink-border);
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 54px;
  z-index: 99;
}

nav::-webkit-scrollbar { display: none; }

.tab {
  font-family: var(--mono);
  padding: 11px 15px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-inv-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.tab:hover { color: var(--text-inv-dim); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Main layout ─────────────────────────────────────────────────────────────── */
main {
  padding: var(--t-sp-5) var(--t-sp-6) 72px;
  max-width: 1600px;
}

.view { display: none; }

.view.active {
  display: block;
  animation: fadeUp 0.22s ease both;
}

/* ── Grid helpers ────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--t-sp-4);
  margin-bottom: var(--t-sp-4);
}

.grid-3        { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2        { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.grid-matchups { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--t-sp-4) var(--t-sp-5);
  box-shadow: var(--t-shadow-sm);
  transition: box-shadow 0.2s ease;
}

.card:hover { box-shadow: var(--t-shadow); }

.card + .card  { margin-top: var(--t-sp-4); }
.grid + .card  { margin-top: var(--t-sp-4); }
.card + .grid  { margin-top: var(--t-sp-4); }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--t-sp-3);
  padding-bottom: var(--t-sp-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--t-sp-4);
}

/* Page-level section heading (outside cards — e.g. Matchups, Week Preview intro) */
.page-header {
  margin-bottom: var(--t-sp-4);
}

.page-header .page-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--t-sp-1);
}

.page-header .page-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.card-title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.card > .card-title { margin-bottom: var(--t-sp-2); }

.card-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.card-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: var(--t-sp-1);
  letter-spacing: 0.02em;
}

/* Accent-bordered card variant — for key summary cards */
.card-accent {
  border-left: 3px solid var(--accent);
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: var(--t-sp-3);
}

/* ── Tables ──────────────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
}

thead th {
  padding: 8px 12px;
  text-align: left;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

thead th.num { text-align: right; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
}

tbody tr:last-child { border-bottom: none; }

/* Subtle zebra striping */
tbody tr:nth-child(even) { background: rgba(237,230,216,0.40); }

tbody tr:hover { background: rgba(194,57,10,0.05) !important; }

tbody td {
  padding: 9px 12px;
  color: var(--text);
  white-space: nowrap;
}

tbody td.num   { text-align: right; font-variant-numeric: tabular-nums; }
tbody td.dim   { color: var(--text-dim); }
tbody td.muted { color: var(--text-muted); }

/* Rank badges */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  background: var(--surface2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.rank-1 { background: var(--accent-lt); color: var(--accent-dk); border-color: var(--t-accent-md); }
.rank-2 { background: var(--surface2);  color: var(--text);      border-color: var(--border2); }
.rank-3 { background: var(--surface2);  color: var(--text-dim); }

/* First-place row gets a subtle left accent border */
tbody tr.rank-first {
  border-left: 3px solid var(--accent);
}
tbody tr.rank-first td:first-child {
  padding-left: 9px;
}

/* Team name typography — serif for names, mono for records */
.team-name   { font-family: var(--serif); font-weight: 700; font-size: 13px; color: var(--text); }
.team-accent { font-family: var(--serif); font-weight: 700; font-size: 13px; color: var(--accent); }
.record      { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.win-pct     { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ── Chips ────────────────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}

.chip-green  { color: var(--win);   background: var(--win-lt);   border-color: rgba(21,105,47,0.30); }
.chip-red    { color: var(--loss);  background: var(--loss-lt);  border-color: rgba(185,27,27,0.30); }
.chip-gray   { color: var(--text-dim); background: var(--surface2); border-color: var(--border); }
.chip-warn   { color: var(--warn);  background: var(--warn-lt);  border-color: rgba(140,64,0,0.30); }
.chip-ember  { color: var(--accent-dk); background: var(--accent-lt); border-color: rgba(194,57,10,0.30); }

/* ── Toggle group ─────────────────────────────────────────────────────────────── */
.toggle-group {
  display: inline-flex;
  border: 1px solid var(--border2);
  border-radius: var(--t-radius-sm);
  overflow: hidden;
  box-shadow: var(--t-shadow-xs);
}

.toggle-btn {
  font-family: var(--mono);
  border: none;
  border-right: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text-dim);
  padding: 6px 13px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.toggle-btn:last-child { border-right: none; }

.toggle-btn:hover {
  background: var(--surface2);
  color: var(--text);
}

.toggle-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

/* ── Form controls ───────────────────────────────────────────────────────────── */
.select-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.select-wrap label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

select {
  font-family: var(--mono);
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--t-radius-sm);
  color: var(--text);
  font-size: 12px;
  padding: 6px 28px 6px 10px;
  min-width: 160px;
  cursor: pointer;
  box-shadow: var(--t-shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a09688' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

select:hover { border-color: var(--border2); }
select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194,57,10,0.12); }
select option { background: var(--surface); }

.search-input {
  font-family: var(--mono);
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--t-radius-sm);
  color: var(--text);
  font-size: 12px;
  padding: 6px 10px;
  min-width: 180px;
  box-shadow: var(--t-shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194,57,10,0.12);
}

.search-input::placeholder { color: var(--text-muted); }

/* ── Trends / chart ──────────────────────────────────────────────────────────── */
.trends-controls {
  display: flex;
  gap: var(--t-sp-4);
  margin-bottom: var(--t-sp-4);
  flex-wrap: wrap;
  align-items: flex-end;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--t-sp-5);
  box-shadow: var(--t-shadow-sm);
}

.chart-container {
  position: relative;
  height: 320px;
}

/* ── Stat grid ────────────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: var(--t-sp-2);
}

.stat-cell {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--t-radius-sm);
  padding: 10px var(--t-sp-3);
  text-align: center;
  transition: background 0.1s ease;
}

.stat-cell:hover { background: var(--surface3); }

.stat-cell-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stat-cell-value {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Matchup cards — scoreboard style ────────────────────────────────────────── */
.matchup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--t-shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.matchup-card:hover {
  box-shadow: var(--t-shadow);
  transform: translateY(-1px);
}

/* Dark header — looks like a scoreboard */
.matchup-header {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  align-items: center;
  padding: 14px 18px 12px;
  background: var(--ink);
  border-bottom: 1px solid var(--ink-border);
}

.matchup-team { display: flex; flex-direction: column; gap: 3px; }
.matchup-team.away { text-align: right; }

.matchup-team-name {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-inv);
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.matchup-team-record {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-inv-muted);
  font-variant-numeric: tabular-nums;
}

.matchup-vs {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: rgba(237, 230, 216, 0.25);
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Projected wins row */
.matchup-win-counts {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.matchup-proj-wins {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.matchup-proj-wins.right { text-align: right; }

.matchup-proj-wins.leading { color: var(--accent); }

.matchup-proj-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  line-height: 1.4;
}

/* Category rows */
.cat-rows { padding: 6px 0 4px; }

.cat-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 6px;
  padding: 4px 18px;
  transition: background 0.1s ease;
}

.cat-row:hover { background: rgba(194,57,10,0.04); }

.cat-prob-left {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-muted);
}

.cat-prob-right {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: left;
  color: var(--text-muted);
}

.cat-prob-left.fav  { color: var(--win); }
.cat-prob-right.fav { color: var(--win); }

/* Probability bar */
.cat-bar-wrap {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
}

.cat-bar-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 1px;
}

.cat-bar-left {
  height: 6px;
  border-radius: 3px 0 0 3px;
  background: var(--t-accent-md);
  transition: width 0.35s ease;
  flex-shrink: 0;
}

.cat-bar-left.fav { background: var(--win); opacity: 0.55; }

.cat-bar-right {
  height: 6px;
  border-radius: 0 3px 3px 0;
  background: var(--border);
  flex: 1;
}

.cat-name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface);
  padding: 0 4px;
  z-index: 1;
}

.cat-row:hover .cat-name { background: rgba(194,57,10,0.04); }

/* ── Win% progress bar ────────────────────────────────────────────────────────── */
.pct-bar-wrap {
  display: inline-block;
  width: 52px;
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  vertical-align: middle;
}

.pct-bar {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
  max-width: 100%;
}

/* ── Resource chips row ──────────────────────────────────────────────────────── */
.resource-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: var(--t-sp-2);
}

/* ── SOS badges ──────────────────────────────────────────────────────────────── */
.sos-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.sos-easy    { color: var(--win);  background: var(--win-lt);  border-color: rgba(21,105,47,0.30); }
.sos-average { color: var(--text-dim); background: var(--surface2); border-color: var(--border); }
.sos-hard    { color: var(--loss); background: var(--loss-lt); border-color: rgba(185,27,27,0.30); }

/* ── Divider ─────────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--t-sp-4) 0;
}

/* ── Inline number highlight — e.g. large stat inside a sentence ────────────── */
.num-accent {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ── Delta / flag coloring ───────────────────────────────────────────────────── */
.pos  { color: var(--win); }
.neg  { color: var(--loss); }
.neu  { color: var(--text-dim); }
.warn { color: var(--warn); }

.flag-ahead        { color: var(--win); }
.flag-behind       { color: var(--loss); }
.flag-on-pace      { color: var(--text-dim); }
.flag-insufficient { color: var(--text-muted); }

/* ── Loading / empty states ──────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text-dim);
  font-size: 13px;
  gap: var(--t-sp-2);
}

.empty-state-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* ── Brand watermark ──────────────────────────────────────────────────────────── */
.brand-watermark {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: sepia(1) saturate(0);
}

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  header { padding: 0 var(--t-sp-4); }
  nav    { padding: 0 var(--t-sp-4); top: 54px; }
  main   { padding: var(--t-sp-4) var(--t-sp-4) 56px; }

  .grid-2, .grid-matchups { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

  .search-input { min-width: 130px; }
  .cat-row { grid-template-columns: 38px 1fr 38px; padding: 4px 12px; }

  .card-value { font-size: 22px; }

  .matchup-team-name { font-size: 12px; }
}

@media (max-width: 480px) {
  .header-brand .subtitle { display: none; }
  nav { top: 54px; }
}
