/* Keeper Manager — "Front Office" design system.
   Surface tokens switch on [data-mode] (System follows prefers-color-scheme). Team colours come
   from --tp/--ts/--td/--ts-ink, set inline on <html> by keeper.theming (see palette.py).
   Element styles use :where() so that classes always override them. */

:root, [data-mode="light"] {
  color-scheme: light;
  --bg: #F6F5F2; --card: #FFFFFF; --raised: #FAF9F6; --ink: #15171C; --muted: #5B6270; --line: #E4E1DB;
  --good: #1F7A45; --warn: #8A5A0F; --bad: #B3261E;
  --accent: var(--tp); --on-accent: #FFFFFF;
  --hero-bg: var(--tp); --hero-ink: #FFFFFF; --hero-chip: rgb(255 255 255 / 0.16);
  --mark-bg: var(--ts); --mark-ink: var(--ts-ink);
  --shadow: 0 1px 2px rgb(21 23 28 / 0.04), 0 8px 24px rgb(21 23 28 / 0.06);
}
[data-mode="dark"] {
  color-scheme: dark;
  --bg: color-mix(in srgb, var(--tp) 20%, #08090C); --card: color-mix(in srgb, var(--tp) 24%, #111318);
    --raised: color-mix(in srgb, var(--tp) 30%, #16191F); --ink: #ECEEF2; --muted: #B0B8C4;
    --line: color-mix(in srgb, var(--ts) 30%, #2A2F38);
  --good: #4ADE80; --warn: #FBBF24; --bad: #F87171;
  --accent: var(--td); --on-accent: #10131A;
  --hero-bg: linear-gradient(120deg, color-mix(in srgb, var(--tp) 72%, #000000) 45%, color-mix(in srgb, var(--ts) 40%, #000000)); --hero-ink: #FFFFFF; --hero-chip: rgb(255 255 255 / 0.12);
  --mark-bg: var(--ts); --mark-ink: var(--ts-ink);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
}
@media (prefers-color-scheme: dark) {
  [data-mode="system"] {
    color-scheme: dark;
    --bg: color-mix(in srgb, var(--tp) 20%, #08090C); --card: color-mix(in srgb, var(--tp) 24%, #111318);
    --raised: color-mix(in srgb, var(--tp) 30%, #16191F); --ink: #ECEEF2; --muted: #B0B8C4;
    --line: color-mix(in srgb, var(--ts) 30%, #2A2F38);
    --good: #4ADE80; --warn: #FBBF24; --bad: #F87171;
    --accent: var(--td); --on-accent: #10131A;
    --hero-bg: linear-gradient(120deg, color-mix(in srgb, var(--tp) 72%, #000000) 45%, color-mix(in srgb, var(--ts) 40%, #000000)); --hero-ink: #FFFFFF; --hero-chip: rgb(255 255 255 / 0.12);
    --mark-bg: var(--ts); --mark-ink: var(--ts-ink);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}
/* derived tints: declared wherever a mode is, so they follow that element's --accent */
:root, [data-mode] {
  --soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --good-soft: color-mix(in srgb, var(--good) 12%, transparent);
  --warn-soft: color-mix(in srgb, var(--warn) 14%, transparent);
  --bad-soft: color-mix(in srgb, var(--bad) 12%, transparent);
}

/* ---------- base elements ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); font: 400 16px/1.5 Manrope, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
:where(h1, h2, h3) { font-family: "Bricolage Grotesque", Manrope, system-ui, sans-serif; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.5em; }
:where(h1) { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.4rem); }
:where(h2) { font-size: 1.4rem; }
:where(h3) { font-size: 1.15rem; }
:where(p) { margin: 0 0 1em; }
:where(a) { color: var(--accent); text-underline-offset: 3px; }
:where(small), .muted { color: var(--muted); }
:where(small), .small { font-size: 0.85rem; }
.num, :where(code) { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.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; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.icon { flex: none; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .container { padding: 0 32px; } }
main.container { padding-top: 24px; padding-bottom: 64px; }

/* buttons */
:where(button, [role="button"]) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 1px solid var(--accent); border-radius: 12px;
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
:where(button, [role="button"]):hover { filter: brightness(1.08); }
.secondary, .outline, .btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.secondary:hover, .outline:hover, .btn-ghost:hover { background: var(--raised); filter: none; }
.btn-block { width: 100%; min-height: 52px; border-radius: 16px; font-size: 1rem; }
td :where(button, [role="button"]) { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }

/* forms */
:where(form) { margin: 0 0 16px; }
td form, .actions form, .topbar form { margin: 0; }
:where(label) { display: block; font-weight: 600; margin-bottom: 16px; }
:where(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
  display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
  font: inherit; font-weight: 400;
}
:where(textarea) { min-height: 120px; }
:where(input[type="checkbox"], input[type="radio"]) { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
[aria-invalid="true"] { border-color: var(--bad); }
:where(fieldset) { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
:where(legend) { font-weight: 700; margin-bottom: 8px; padding: 0; }
:where([role="group"]) { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; margin-bottom: 16px; }
:where([role="group"]) > :where(input, select) { flex: 1 1 200px; width: auto; margin-top: 0; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.input-sm { width: 5.5rem; min-height: 36px; margin: 0; padding: 6px 10px; }
.option { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-weight: 500; }

/* cards, tables, alerts */
:where(article), .card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px 24px; margin: 0 0 20px; box-shadow: var(--shadow); }
:where(article) > :where(header) { margin: -20px -24px 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--raised); border-radius: 20px 20px 0 0; }
:where(figure), .table-wrap { margin: 0 0 20px; overflow-x: auto; }
.card.table-wrap { padding: 8px 16px 12px; }
.card:has(> table), :where(article):has(> table) { overflow-x: auto; }
:where(table) { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
:where(th, td) { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
:where(thead th) { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
:where(tbody tr):hover { background: var(--raised); }
th.num, td.num { text-align: right; }
:where(mark) { background: var(--warn-soft); color: var(--warn); padding: 2px 8px; border-radius: 6px; font-weight: 600; }
[role="alert"], .alert {
  padding: 14px 16px; margin: 0 0 20px; border-radius: 14px; font-weight: 600; color: var(--ink);
  background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
}
[role="alert"] mark { background: none; color: inherit; padding: 0; }
.alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
:where(details) { margin: 0 0 16px; }
:where(summary) { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--raised); color: var(--ink); border: 1px solid var(--line); }
.badge.accent { background: var(--soft); border-color: transparent; }
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }

/* ---------- page chrome ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.2rem; }
.brand svg { color: var(--accent); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.seg { display: flex; flex-wrap: nowrap; gap: 2px; padding: 3px; margin: 0; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.seg button { min-height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 0.8125rem; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.profile { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.avatar { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: var(--mark-bg); color: var(--mark-ink); font-size: 0.75rem; font-weight: 700; }
@media (max-width: 719px) {
  .seg-label, .profile-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .topbar .logout { display: none; }
}
@media (max-width: 419px) {
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 28px; margin: 0 0 8px; border-radius: 24px; background: var(--hero-bg); color: var(--hero-ink); }
.hero a { color: inherit; text-decoration: underline; }
.hero-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.mark { flex: none; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--mark-bg); color: var(--mark-ink); font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.25rem; }
.hero-title { margin: 0; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.2rem); color: inherit; }
.hero-league, .hero-meta { margin: 0; font-size: 0.9375rem; opacity: 0.9; }
.hero-chip { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--hero-chip); font-weight: 700; }
.hero-chip small { display: block; color: inherit; opacity: 0.85; font-weight: 500; }
.hero-plain { background: transparent; color: var(--ink); padding: 8px 0; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.profile-grid .card { margin: 0; }
#colours { margin-top: 16px; }
.seasons { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 16px; scrollbar-width: none; }
.seasons a { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 0.875rem; text-decoration: none; }
.seasons a:hover { color: var(--ink); }
.seasons a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seasons small { font-weight: 500; color: inherit; opacity: 0.8; }
.alert.archive { display: flex; gap: 10px; align-items: flex-start; }
.alert.archive svg { flex: none; margin-top: 3px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin: 0 0 24px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs a { flex: none; padding: 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1, .page-head h2 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { margin: 0 0 6px; font-family: Manrope, sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 1.0625rem; max-width: 62ch; }
.narrow { max-width: 640px; }

/* ---------- keepers ---------- */
.keepers { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; margin: 0; }
.keepers-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.keepers-main .card { margin: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 1.25rem; }
.player { display: grid; grid-template-columns: 24px minmax(160px, 1.2fr) 56px minmax(0, 3fr); align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; }
.player + .player { margin-top: 4px; }
.player.picked { background: var(--soft); }
.player.contract { grid-template-columns: 24px minmax(0, 1fr) auto; background: var(--raised); }
.player.blocked { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 14px; }
.player.blocked .player-name strong { color: var(--muted); font-weight: 600; }
.player .icon { color: var(--accent); }
.player-name { display: flex; flex-direction: column; gap: 2px; margin: 0; font-weight: 400; min-width: 0; }
label.player-name { cursor: pointer; }
.player-name small { font-size: 0.8125rem; }
.price { font-size: 1.1rem; font-weight: 600; }
.base { color: var(--muted); }
.lengths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.length { position: relative; margin: 0; font-weight: 400; }
.length input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.length-body { display: flex; flex-direction: column; gap: 2px; min-height: 48px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.length-label { font-size: 0.75rem; font-weight: 700; }
.length-body .num { font-size: 0.8125rem; font-weight: 600; }
.salaries { display: flex; flex-wrap: wrap; gap: 0 8px; }
.salaries span + span { opacity: 0.75; }
.length:hover .length-body { border-color: var(--accent); }
.length input:checked + .length-body, .length-body.chosen { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.length input:focus-visible + .length-body { outline: 3px solid var(--accent); outline-offset: 2px; }
.budget { position: sticky; top: 88px; margin: 0; padding: 28px; border-radius: 24px; display: flex; flex-direction: column; gap: 18px; }
.budget h2 { margin: 0; }
.budget-figure { margin: 0; font-size: 3.5rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.budget-figure.is-bad { color: var(--bad); }
.kv { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; }
.kv dt, .kv dd { margin: 0; }
.meter-row { display: flex; justify-content: space-between; font-size: 0.875rem; font-weight: 600; }
.slots { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.slot { height: 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.slot.on { background: var(--accent); border-color: transparent; }
.slot.on.over { background: var(--bad); }
.meter { height: 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.live-errors { list-style: none; margin: 0; padding: 12px 14px; }
@media (max-width: 959px) {
  .keepers { grid-template-columns: minmax(0, 1fr); }
  .player { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .player .lengths { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .budget { top: auto; bottom: 0; z-index: 10; padding: 14px 16px; gap: 10px; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 32px rgb(0 0 0 / 0.18); }
  .budget .kv, .budget .budget-note, .budget .slots, .budget .cap-row, .budget .cap-meter { display: none; }
  .budget-figure { font-size: 2rem; }
  .budget .btn-block { min-height: 48px; }
}

/* ---------- dashboard, home ---------- */
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.dash .card { margin: 0; }
.feature { background: var(--hero-bg); color: var(--hero-ink); border-color: transparent; }
.feature .eyebrow { color: inherit; opacity: 0.85; }
.feature a:not([role="button"]) { color: inherit; }
.feature-figure { margin: 0 0 8px; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.9rem; font-weight: 700; }
.feature [role="button"] { background: var(--mark-bg); color: var(--mark-ink); border-color: transparent; }
.league-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.league-card { display: flex; flex-direction: column; gap: 4px; margin: 0; color: var(--ink); text-decoration: none; transition: transform 0.15s ease; }
.league-card:hover { transform: translateY(-2px); }
.landing { max-width: 640px; padding: 48px 0; }
.landing h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); }

/* ---------- draft date poll ---------- */
table.poll th, table.poll td { text-align: center; vertical-align: middle; }
table.poll th[scope="row"] { text-align: left; font-weight: 600; }
table.poll thead th.best { background: var(--soft); }
/* days: alternate tinted bands + heavy dividers so each day reads as one block */
table.poll { --band: color-mix(in srgb, var(--accent) 7%, transparent); --divide: color-mix(in srgb, var(--ink) 55%, transparent); }
table.poll .band-1 { background: var(--band); }
table.poll .day-start, table.poll th.day-head { border-left: 2px solid var(--divide); }
table.poll th.day-head { font-size: 0.875rem; letter-spacing: 0.04em; color: var(--ink); padding-top: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--divide); }
table.poll th.day-head.band-0 { background: color-mix(in srgb, var(--ink) 5%, transparent); }
table.poll th.day-head.band-1 { background: color-mix(in srgb, var(--accent) 16%, transparent); }
table.poll tr.mine th, table.poll tr.mine td { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin: 0 0 32px; }
.day-card { margin: 0; padding: 0 0 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.day-card .slot-row { padding-left: 18px; padding-right: 18px; }
.day-card-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.day-card.band-1 .day-card-head { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.day-card-head > span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.day-card-head strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.25rem; letter-spacing: -0.01em; }
.day-card-head small { color: var(--muted); font-weight: 600; }
.day-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 58px; flex: none; border-radius: 12px; background: var(--accent); color: var(--on-accent); line-height: 1; }
.day-tile small { color: inherit; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.day-tile strong { font-size: 1.5rem; margin: 2px 0; color: inherit; }
.slot-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.slot-row:first-of-type { border-top: 0; }
.slot-time { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 600; font-variant-numeric: tabular-nums; }
.slot-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.slot-meta .tally { margin: 0; min-width: 0; }
.slot-meta .counts { display: flex; gap: 10px; white-space: nowrap; font-weight: 600; font-size: 0.75rem; }
.counts .c-yes { color: var(--good); } .counts .c-maybe { color: var(--warn); } .counts .c-no { color: var(--bad); }
@media (max-width: 420px) {
  .day-grid { grid-template-columns: 1fr; }
  .slot-row { grid-template-columns: 48px 1fr; }
  .slot-row .vote { grid-column: 1 / -1; justify-content: stretch; }
  .slot-row .vote button { flex: 1; }
}
.tally { display: flex; height: 6px; min-width: 96px; margin-top: 8px; border-radius: 999px; overflow: hidden; background: var(--raised); }
.tally-yes { background: var(--good); }
.tally-maybe { background: var(--warn); }
.tally-no { background: var(--bad); }
.vote { display: flex; flex-wrap: nowrap; gap: 4px; justify-content: center; margin: 0; }
.vote button { min-height: 36px; padding: 0 10px; font-size: 0.8125rem; background: transparent; color: var(--muted); border: 1px solid var(--line); }
.vote .vote-yes[aria-pressed="true"] { background: var(--good-soft); color: var(--good); border-color: var(--good); }
.vote .vote-maybe[aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.vote .vote-no[aria-pressed="true"] { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.answer { font-size: 0.8125rem; font-weight: 700; }
.answer-yes { color: var(--good); }
.answer-maybe { color: var(--warn); }
.answer-no { color: var(--bad); }
.answer-none { color: var(--muted); }

/* ---------- all keepers ---------- */
.counts { list-style: none; margin: 0; padding: 0; }
.counts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.counts li:last-child { border-bottom: 0; }
.dots { display: flex; gap: 4px; }
.dot { width: 10px; height: 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.dot.on { background: var(--accent); border-color: transparent; }
.keeper-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.keeper-list .icon { color: var(--accent); vertical-align: -3px; }

/* ---------- theme picker ---------- */
.theme-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 28px; align-items: start; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.swatch { position: relative; margin: 0; font-weight: 400; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch-body { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.swatch input:checked + .swatch-body { border: 2px solid var(--ink); box-shadow: var(--shadow); }
.swatch input:focus-visible + .swatch-body { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatch-dot { position: relative; flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--tp); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08); }
.swatch-dot::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 999px; background: var(--ts); box-shadow: 0 0 0 2px var(--card); }
.swatch-text { display: flex; flex-direction: column; min-width: 0; }
.swatch-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.previews { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; }
.preview { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.preview-hero { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--hero-bg); color: var(--hero-ink); }
.preview-hero .mark { width: 40px; height: 40px; border-radius: 12px; font-size: 0.875rem; }
.preview-hero small { display: block; color: inherit; opacity: 0.85; }
.preview-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 18px; }
.preview-body .player { grid-template-columns: minmax(0, 1fr) auto; background: var(--soft); }
.preview-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.preview-foot { display: flex; justify-content: space-between; align-items: center; margin: 0; }
.preview-figure { font-size: 1.6rem; font-weight: 600; }
.preview-btn { padding: 10px 16px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 0.875rem; }
@media (max-width: 959px) {
  .theme-layout { grid-template-columns: minmax(0, 1fr); }
  .previews { position: static; }
}

/* ---------- draft board ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stats .card { margin: 0; }
.stat-figure { margin: 0; font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; }
table.board tr.mine { background: var(--soft); }
.bid { min-width: 200px; }
.bid-bar { display: inline-block; width: 60%; height: 8px; margin-right: 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); overflow: hidden; vertical-align: middle; }
.bid-bar span { display: block; height: 100%; background: var(--accent); }
.bid-value { font-weight: 700; }
@media print {
  .topbar, .tabs, .seasons, .hero, .page-head button { display: none !important; }
  .card { box-shadow: none; }
}

/* ---------- price calculator ---------- */
.calc { display: flex; flex-direction: column; gap: 20px; }
.calc-input { margin: 0; max-width: 260px; }
.calc-money { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-family: "JetBrains Mono", monospace; font-size: 2rem; font-weight: 600; }
.calc-money input { margin: 0; font-size: 2rem; font-weight: 600; min-height: 60px; }
.calc-rows { display: flex; flex-direction: column; gap: 8px; }
.calc-row { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); }
.calc-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-weight: 600; }
.calc-step { display: inline-flex; flex-direction: column; line-height: 1.2; }
.calc-step small { font-family: Manrope, sans-serif; font-size: 0.7rem; }
.calc-arrow { color: var(--muted); }
.calc-total { color: var(--muted); font-size: 0.875rem; }
@media (max-width: 719px) { .calc-row { grid-template-columns: minmax(0, 1fr) auto; } .calc-path { grid-column: 1 / -1; grid-row: 2; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- history ---------- */
.history-block { margin: 0 0 32px; }
.history-block > h3 { margin: 0 0 12px; }
.history-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 24px; align-items: start; }
.crumbs { margin: 0 0 12px; font-size: 0.875rem; color: var(--muted); }
.champions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.champion-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.champion-card:hover { border-color: var(--accent); }
.champion-card.latest { background: var(--hero-bg); color: var(--hero-ink); border-color: transparent; }
.champion-card.latest .muted, .champion-card.latest .eyebrow { color: inherit; opacity: 0.8; }
.champion { display: flex; align-items: center; gap: 8px; font-family: "Bricolage Grotesque", sans-serif; font-size: 1.25rem; line-height: 1.2; }
.champion svg { flex: none; width: 22px; height: 22px; color: #D4A017; }
.champion-card.latest .champion svg { color: var(--mark-bg); }
.podium { display: flex; flex-direction: column; gap: 4px; margin: 10px 0 0; padding: 10px 0 0; list-style: none; border-top: 1px solid color-mix(in srgb, currentColor 15%, transparent); font-size: 0.875rem; }
.podium li { display: flex; align-items: center; gap: 8px; }
.place { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); font-weight: 700; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.place.gold { background: #D4A017; border-color: #D4A017; color: #1A1400; }
.place.gold svg { width: 15px; height: 15px; }
.podium .place { min-width: 22px; height: 22px; font-size: 0.75rem; background: transparent; }
table.hall .titles { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
table.hall .titles svg { width: 16px; height: 16px; color: #D4A017; }
table.hall tr.mine, table.standings tr.mine { background: var(--soft); }
table.standings tr.gold th, table.standings tr.gold td { font-weight: 700; }
.my-finishes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.finish { display: inline-flex; flex-direction: column; align-items: center; min-width: 48px; padding: 6px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 1.125rem; line-height: 1.1; }
.finish small { font-size: 0.6875rem; font-weight: 600; color: var(--muted); }
.finish.gold { background: #D4A017; border-color: #D4A017; color: #1A1400; }
.finish.gold small { color: inherit; opacity: 0.75; }
.finish.podium-place { border-color: var(--accent); }
.season-list { display: grid; gap: 8px; }
.season-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.season-link:hover { border-color: var(--accent); }
.season-link .muted { display: inline-flex; align-items: center; gap: 6px; }
.season-link svg { width: 16px; height: 16px; color: #D4A017; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.team-card { margin: 0; scroll-margin-top: 80px; }
.team-card header { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 0 0 12px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
table.compact .term { white-space: nowrap; font-size: 0.8125rem; }
.team-card header > div { display: flex; flex-direction: column; line-height: 1.25; }
.team-card header small { font-size: 0.8125rem; }
table.compact { font-size: 0.875rem; margin: 0; }
table.compact th, table.compact td { padding: 6px 8px; }
.plain-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.plain-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Commissioner keepers overview */
.stat-figure.small-figure { font-size: 1.1rem; }
.adjust-form { display: grid; grid-template-columns: auto auto; gap: 6px 8px; align-items: center; margin: 0; }
.adjust-form label { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--muted); white-space: nowrap; margin: 0; }
.adjust-form input[name="note"] { grid-column: 1 / -1; width: 100%; }
.adjust-form button { grid-column: 1 / -1; justify-self: start; }
.move-form select { max-width: 100%; flex: 1 1 14rem; }
.move-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; }
.move-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.move-list form { margin: 0 0 0 auto; }
.adjust summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.adjust summary::-webkit-details-marker { display: none; }
.adjust-edit { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-decoration: underline; }
.adjust[open] .adjust-edit { display: none; }
.adjust .adjust-form { margin-top: 8px; }
