:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --delta-up: #006300;
  --delta-down: #d03b3b;
  --banner-bg: #fff4d6;
  --banner-ink: #5c4300;
  --playoff-wash: rgba(11, 11, 11, 0.04);

  /* Categorical slots, fixed order (validated default palette). */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --text-primary: #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --delta-up: #0ca30c;
    --delta-down: #e66767;
    --banner-bg: #3a2f10;
    --banner-ink: #f5dfa3;
    --playoff-wash: rgba(255, 255, 255, 0.05);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.10);
  --accent: #3987e5;
  --delta-up: #0ca30c;
  --delta-down: #e66767;
  --banner-bg: #3a2f10;
  --banner-ink: #f5dfa3;
    --playoff-wash: rgba(255, 255, 255, 0.05);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --series-4: #c98500;
  --series-5: #d55181;
  --series-6: #008300;
  --series-7: #9085e9;
  --series-8: #e66767;}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.site-header { padding: 28px 0 12px; }
.site-header h1 { margin: 0; font-size: 26px; letter-spacing: -0.01em; }
.sub { margin: 2px 0 0; color: var(--text-secondary); }

.banner {
  margin: 8px 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--banner-bg);
  color: var(--banner-ink);
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-head h2 { margin: 0; font-size: 18px; }
.muted { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; max-width: 60ch; }
ul.explain { padding-left: 20px; margin-top: 8px; }
ul.explain li + li { margin-top: 4px; }

.control { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.control select {
  font: inherit;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
}

.chart { width: 100%; height: 520px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; }
.legend button {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; color: var(--text-secondary);
  background: none; border: 0; padding: 2px 0; cursor: pointer;
}
.legend button[aria-pressed="false"] { opacity: 0.4; }
.swatch { display: inline-block; width: 18px; height: 0; border-top: 2px solid currentColor; }
.swatch.dashed { border-top-style: dashed; }

.table-scroll { overflow-x: auto; }
table.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
.standings th {
  text-align: left; font-weight: 600; color: var(--text-muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 6px 10px; border-bottom: 1px solid var(--axis); white-space: nowrap;
}
.standings td { padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.standings .num { text-align: right; font-variant-numeric: tabular-nums; }
.team { display: flex; align-items: center; gap: 8px; }
.standings tr.cutline td { border-bottom: 2px solid var(--axis); }
.delta-up { color: var(--delta-up); }
.delta-down { color: var(--delta-down); }
.delta-none { color: var(--text-muted); }
/* Page navigation */
.site-nav { display: flex; gap: 0; margin-top: 14px; box-shadow: inset 0 1px var(--axis), inset 0 -1px var(--axis);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; scrollbar-width: none; }
.site-nav a {
  padding: 8px 12px; color: var(--text-secondary); text-decoration: none; font-size: 14px;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.site-nav a + a { border-left: 1px solid var(--axis); }
.site-nav a:last-child { border-right: 1px solid var(--axis); }
.site-nav a:hover { color: var(--text-primary); background: var(--playoff-wash); }
.site-nav a[aria-current="page"] { color: var(--text-primary); font-weight: 600; border-bottom-color: var(--accent); }

/* Sortable table headers */
.sortable th button {
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit;
  background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap;
}
.sortable th[aria-sort="ascending"], .sortable th[aria-sort="descending"] { color: var(--text-primary); }
.sortable th.num button { text-align: right; }

/* Finishes grid */
table.finish-grid { border-collapse: separate; border-spacing: 2px; font-size: 13px; }
.finish-grid th { font-weight: 600; color: var(--text-muted); font-size: 12px; padding: 4px 8px; text-align: left; white-space: nowrap; }
.finish-grid th.num, .finish-grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.finish-grid tbody th { color: var(--text-primary); font-size: 14px; font-weight: 400; }
.finish-grid td { padding: 6px 8px; white-space: nowrap; }
.finish-grid td.finish { text-align: center; min-width: 56px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.finish-grid td.empty { background: var(--grid); opacity: 0.5; }
.finish-grid td.in-progress { color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--border); }
.finish-grid td.in-progress small { display: block; font-size: 10px; color: var(--text-muted); line-height: 1; }

.control input[type="checkbox"] { accent-color: var(--accent); }
.sortable { font-size: 13px; }
.sortable th, .sortable td { padding-left: 7px; padding-right: 7px; }

.champ {
  font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--text-secondary); border: 1px solid var(--axis); border-radius: 999px; padding: 1px 7px;
}

/* Rivalries: head-to-head grid */
table.h2h-grid { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.h2h-grid thead th.col { vertical-align: bottom; padding: 0 0 6px; font-weight: 600; color: var(--text-muted); }
.h2h-grid thead th.col span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; display: inline-block; }
.h2h-grid tbody th { font-weight: 400; font-size: 13px; padding: 0 10px 0 0; white-space: nowrap; text-align: left; }
.h2h-grid td { width: 46px; min-width: 46px; height: 30px; text-align: center; border-radius: 4px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.h2h-grid td.cell { cursor: pointer; }
.h2h-grid td.cell:hover, .h2h-grid td.cell:focus-visible { outline: 2px solid var(--text-primary); outline-offset: -2px; }
.h2h-grid td.self { background: repeating-linear-gradient(45deg, var(--grid) 0 3px, transparent 3px 7px); }
.h2h-grid td.never { background: transparent; border: 1px dashed var(--grid); }
.h2h-grid .former-start { border-left: 2px solid var(--axis); }
.h2h-grid tr.former-start th, .h2h-grid tr.former-start td { border-top: 2px solid var(--axis); }

.diverging-key { font-size: 12px; color: var(--text-muted); width: 260px; max-width: 100%; }
.diverging-key .bar { height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #c2413f, #f0efec 50%, #1c5cab); }
:root[data-theme="dark"] .diverging-key .bar { background: linear-gradient(90deg, #e66767, #383835 50%, #3987e5); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .diverging-key .bar { background: linear-gradient(90deg, #e66767, #383835 50%, #3987e5); }
}
.diverging-key .labels { display: flex; justify-content: space-between; margin-top: 4px; }

/* Rivalries: highlight tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: inherit;
  background: var(--page); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; cursor: pointer;
}
.tile:hover { border-color: var(--axis); }
.tile-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
.tile-value { font-size: 24px; font-weight: 600; }
.tile-names { color: var(--text-primary); }
.tile-detail { font-size: 13px; color: var(--text-secondary); }

/* Rivalries: comparison */
.compare-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.compare-controls select {
  font: inherit; color: var(--text-primary); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px;
}
.icon-btn {
  font: inherit; color: var(--text-secondary); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin: 8px 0 20px; }
.versus .side { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.versus .side.right { justify-content: flex-end; }
.versus .big { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.versus .vs { color: var(--text-muted); font-size: 13px; }
.versus .dot { width: 12px; height: 12px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; margin: 0 0 8px; }
.facts div { border-top: 1px solid var(--grid); padding-top: 8px; }
.facts dt { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.facts dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.muted-inline { color: var(--text-muted); font-size: 13px; }
.subhead { font-size: 15px; margin: 24px 0 4px; }
.small { font-size: 13px; margin: 0 0 8px; }
.chart-short { height: 260px; }
.standings td.strong { font-weight: 700; }

/* Draft page: position colors (categorical slots; text label always shown) */
.pos-QB  { --pos: var(--series-1); }
.pos-RB  { --pos: var(--series-3); }
.pos-WR  { --pos: var(--series-2); }
.pos-TE  { --pos: var(--series-5); }
.pos-K   { --pos: var(--series-7); }
.pos-DEF { --pos: var(--series-6); }
.pos-bg-QB  { --pos: var(--series-1); }
.pos-bg-RB  { --pos: var(--series-3); }
.pos-bg-WR  { --pos: var(--series-2); }
.pos-bg-TE  { --pos: var(--series-5); }
.pos-bg-K   { --pos: var(--series-7); }
.pos-bg-DEF { --pos: var(--series-6); }
.pos-tag { display: inline-block; min-width: 30px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--text-primary); background: color-mix(in srgb, var(--pos) 30%, var(--surface));
  border-left: 3px solid var(--pos); border-radius: 3px; padding: 1px 5px; }
.pos-key { display: flex; gap: 6px; flex-wrap: wrap; }
.tile.static { cursor: default; }
.tile-label .pos-tag { margin-right: 4px; }
.mix-cell { min-width: 58px; text-align: center; border-radius: 4px; font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--pos) calc(var(--share) * 85%), var(--surface)); }
.mix-cell.empty { background: none; color: var(--text-muted); }
.pick-cell { min-width: 92px; max-width: 120px; padding: 4px 6px; border-radius: 4px; font-size: 12px; line-height: 1.25;
  color: var(--text-primary); background: color-mix(in srgb, var(--pos) 26%, var(--surface));
  border-left: 3px solid var(--pos); white-space: normal; }
.pick-cell b { display: block; font-size: 11px; }
.pick-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-cell small { display: block; color: var(--text-secondary); font-size: 11px; }
.pick-cell.empty { background: var(--grid); border: 0; opacity: 0.4; }
.draft-board .pick-cell.mine { outline: 2px solid var(--text-primary); outline-offset: -2px; }
.board-team { vertical-align: bottom; font-weight: 600; }
.board-team .muted-inline { display: block; font-weight: 400; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
/* Draft board: equal-width team columns that always fit the card (no side scroll). */
.draft-board { table-layout: fixed; width: 100%; }
.draft-board th:first-child { width: 30px; padding-left: 0; padding-right: 4px; }
.draft-board th, .draft-board td { padding: 3px; }
.draft-board .board-team { overflow: hidden; white-space: nowrap; }
.draft-board .board-team .team { gap: 5px; min-width: 0; }
.draft-board .board-team .team .swatch { width: 12px; flex: none; }
.draft-board .board-team .clip, .draft-board .pick-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.draft-board .pick-cell { min-width: 0; max-width: none; overflow: hidden; }
.draft-board .pick-cell small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-team.mine { color: var(--text-primary); }
.highlight-row th { font-weight: 700; }
.league-row th { color: var(--text-muted); font-weight: 400; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px 28px; }
.split .subhead { margin-top: 0; }

/* Start/Sit page */
.tag { display: inline-block; font-size: 12px; color: var(--text-secondary); border: 1px solid var(--axis);
  border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.tag.bad { color: var(--delta-down); border-color: currentColor; }
.swap { white-space: nowrap; line-height: 1.7; }
.standings td a { color: var(--accent); text-decoration: none; }
.standings td a:hover { text-decoration: underline; }

/* Players page */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 4px 0 16px; }
.filter-bar .small { margin: 0; }
table.pos-grid { border-collapse: separate; border-spacing: 2px; font-size: 13px; }
.pos-grid th { font-weight: 600; color: var(--text-muted); font-size: 12px; padding: 4px 8px; text-align: left; white-space: nowrap; }
.pos-grid th.num { text-align: center; }
.pos-grid tbody th { color: var(--text-primary); font-size: 14px; font-weight: 400; }
.pos-grid th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.pos-cell { min-width: 64px; padding: 7px 8px; text-align: center; border-radius: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos-cell.small-sample { color: var(--text-muted); border: 1px dashed var(--grid); }
.pos-cell.empty { color: var(--text-muted); }
.crown { font-size: 11px; }
button.link { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
button.link:hover { text-decoration: underline; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 13px; color: var(--text-primary); background: var(--page); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.chip:hover { border-color: var(--axis); }
.player-summary { margin: 0 0 10px; }
#player-search { font: inherit; color: var(--text-primary); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 10px; width: 240px; max-width: 100%; }

@media (max-width: 640px) {
  .chart { height: 440px; }
  #bump-chart { height: 340px; }
  .chart-short { height: 220px; }
  .card { padding: 14px; }
  .versus .big { font-size: 32px; }
  .versus .side { font-size: 15px; }
}

/* Pickups page: expandable trade rows */
tr.expandable { cursor: pointer; }
tr.expandable:hover td { background: var(--grid); }
.expand-btn { font: inherit; color: var(--text-secondary); background: none; border: 0; padding: 0 2px; cursor: pointer; }
.detail-row > td { white-space: normal; background: var(--page); padding: 12px 14px 16px; }
.trade-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 28px; margin-top: 8px; }
.trade-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.trade-side ul { list-style: none; margin: 0; padding: 0; }
.trade-side li { padding: 4px 0; border-bottom: 1px solid var(--grid); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.trade-side li.current { font-weight: 600; }
.trade-pts { margin-left: auto; font-variant-numeric: tabular-nums; }
.trade-total { margin-top: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Manager profiles */
.manager-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.manager-tile {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font: inherit; color: inherit;
  background: var(--page); border: 1px solid var(--border); border-radius: 10px; padding: 14px 8px 10px; cursor: pointer;
}
.manager-tile:hover { border-color: var(--axis); }
.manager-tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.manager-tile .avatar { margin-bottom: 6px; }
.manager-tile-name { font-weight: 600; }
.manager-tile-meta { font-size: 12px; color: var(--text-muted); }
.avatar {
  position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden;
  background: color-mix(in srgb, var(--c) 22%, var(--surface)); border: 2px solid var(--c);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar .initials { font-weight: 700; color: var(--text-primary); }
.avatar-md { width: 64px; height: 64px; }
.avatar-md .initials { font-size: 20px; }
.avatar-lg { width: 112px; height: 112px; border-width: 3px; }
.avatar-lg .initials { font-size: 36px; }
.team-logo { width: 96px; height: 96px; flex: none; margin-left: auto; }
.team-logo img { width: 100%; height: 100%; object-fit: contain; }
.team-logo.no-img, .hero-top:has(.avatar.using-logo) .team-logo { display: none; }
.hero-top { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.hero-name h2 { margin: 0; font-size: 28px; }
.hero-name .muted { margin-top: 2px; }
.hero-titles { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.team-names { font-size: 14px; }
.profile-chart { height: 320px; }
.swatch.dotted { border-top-style: dotted; }
.standings tr.highlight td { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); font-weight: 600; }
.trade-log td { vertical-align: top; }
.trade-items div { display: flex; gap: 6px; align-items: baseline; }
.trade-items .trade-pts { margin-left: auto; padding-left: 12px; color: var(--text-secondary); }
.tile-rank { margin-top: 6px; }
.show-more { margin-top: 12px; }
.tag.lead { color: var(--text-primary); border-color: var(--accent); font-weight: 600; }
@media (max-width: 640px) {
  .hero-top { flex-wrap: wrap; }
  .avatar-lg { width: 84px; height: 84px; }
  .team-logo { width: 72px; height: 72px; }
  .profile-chart { height: 260px; }
}
.finish-tag { font-weight: 400; color: var(--text-muted); }
.finish-tag.champ-tag { color: var(--text-primary); font-weight: 600; }

/* Trade Greaser */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tg-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.tg-controls .control > span { white-space: nowrap; }
.tg-controls .control { max-width: 100%; }
.tg-controls select { flex: 0 1 auto; min-width: 0; text-overflow: ellipsis; }
.tg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tg-check { gap: 4px; cursor: pointer; }
fieldset.tg-shape { border: 0; margin: 0; padding: 0; }
.tg-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-primary); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px 3px 7px; cursor: pointer; background: var(--page); }
.tg-pill:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tg-pill input, .tg-check input { accent-color: var(--accent); margin: 0; }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 12px; }
.tg-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--page); }
.tg-team { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.tg-team .muted-inline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-none { margin: 6px 0 0; }
.tg-idea { border-top: 1px solid var(--grid); padding-top: 8px; margin-top: 8px; }
.tg-sides { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tg-side h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.tg-side ul { list-style: none; margin: 0; padding: 0; }
.tg-side li { display: flex; align-items: baseline; gap: 5px; font-size: 13px; padding: 2px 0; min-width: 0; }
.tg-side li a { min-width: 0; color: var(--accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-side li a:hover { text-decoration: underline; }
.tg-val { flex: none; margin-left: auto; padding-left: 6px; font-variant-numeric: tabular-nums; color: var(--text-secondary); }
.tg-total { margin-top: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.tg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--text-secondary);
  font-variant-numeric: tabular-nums; }
tr.tg-kept td { color: var(--text-muted); }
@media (max-width: 640px) {
  .tg-grid { grid-template-columns: 1fr; }
  /* The four trade shapes on one line: the highlighted pill shows the choice, so the radio dot hides. */
  fieldset.tg-shape { flex-wrap: nowrap; gap: 5px; }
  .tg-pill { position: relative; padding: 4px 9px; white-space: nowrap; }
  .tg-pill input { position: absolute; opacity: 0; pointer-events: none; }
  .tg-pill:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
}

/* Draft board and draft history on phones: real column widths and sideways scrolling instead of
   squeezing every team into the screen; the round labels stay pinned on the left. */
@media (max-width: 640px) {
  table.draft-board { table-layout: auto; width: max-content; min-width: 100%; }
  .draft-board .pick-cell, .draft-board .board-team { min-width: 92px; max-width: 110px; }
  .draft-board tr > th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
}