/* ---------------------------------------------------------------------------
   Fantasy Board — design tokens
   Dark-first, because that's what a live sports board wants to be.
--------------------------------------------------------------------------- */
:root {
  --bg:            #07090d;
  --bg-elev:       #0e1117;
  --surface:       #121722;
  --surface-2:     #171c26;
  --surface-3:     #1d2330;
  --line:          #262f3f;
  --line-soft:     #1a202b;
  --text:          #e8ecf3;
  --text-dim:      #98a2b3;
  --text-faint:    #647087;

  --good:          #34d399;
  --good-ink:      #6ee7b7;
  --good-bg:       rgba(52, 211, 153, .10);
  --good-line:     rgba(52, 211, 153, .28);

  --bad:           #f87171;
  --bad-ink:       #fca5a5;
  --bad-bg:        rgba(248, 113, 113, .10);
  --bad-line:      rgba(248, 113, 113, .28);

  --warn:          #fbbf24;
  --warn-bg:       rgba(251, 191, 36, .12);
  --warn-line:     rgba(251, 191, 36, .32);

  --live:          #ff4d4f;
  --accent:        #60a5fa;

  --radius:        14px;
  --radius-sm:     9px;
  --shadow:        0 1px 2px rgba(0,0,0,.5), 0 8px 28px rgba(0,0,0,.32);
  --topbar-h:      58px;
  --header-h:      58px; /* measured at runtime: top row + summary row */

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6f9; --bg-elev: #ffffff; --surface: #ffffff; --surface-2: #f7f9fc;
    --surface-3: #eef2f7; --line: #dde3ec; --line-soft: #e9edf4;
    --text: #101725; --text-dim: #5a6579; --text-faint: #8b95a7;
    --good: #059669; --good-ink: #047857; --good-bg: rgba(5,150,105,.09); --good-line: rgba(5,150,105,.26);
    --bad: #dc2626; --bad-ink: #b91c1c; --bad-bg: rgba(220,38,38,.08); --bad-line: rgba(220,38,38,.24);
    --warn: #b45309; --warn-bg: rgba(180,83,9,.10); --warn-line: rgba(180,83,9,.28);
    --shadow: 0 1px 2px rgba(16,23,37,.06), 0 6px 20px rgba(16,23,37,.07);
  }
}

*, *::before, *::after { box-sizing: border-box; }
/* An explicit `display` on a class beats the [hidden] UA rule, which silently
   breaks every hidden={true} in the app. Make hidden actually mean hidden. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  display: flex; align-items: center; gap: 14px;
  max-width: 1600px; margin: 0 auto; padding: 0 18px;
  height: var(--topbar-h);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); flex: none; }
.brand__mark { width: 27px; height: 27px; }
.brand__text { font-weight: 700; font-size: 15.5px; letter-spacing: -.02em; }
.brand__accent { color: var(--text-dim); font-weight: 600; }

.weeknav { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.weeknav__scroll {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 3px 2px; scroll-snap-type: x proximity;
}
.weeknav__scroll::-webkit-scrollbar { display: none; }
.weeknav__step {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  cursor: pointer; color: var(--text-dim);
}
.weeknav__step svg { width: 15px; height: 15px; }
.weeknav__step:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.weeknav__step:disabled { opacity: .35; cursor: default; }

.wk {
  flex: none; scroll-snap-align: center;
  border: 1px solid transparent; background: transparent; color: var(--text-dim);
  border-radius: 8px; padding: 5px 10px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; letter-spacing: .01em;
}
.wk:hover { background: var(--surface-2); color: var(--text); }
.wk[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.wk--now::after {
  content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--good); margin-left: 6px; vertical-align: 1px;
}
.wk[aria-selected="true"].wk--now::after { background: var(--bg); }

.topbar__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.iconbtn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px;
  cursor: pointer; color: var(--text-dim);
}
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn:hover { background: var(--surface-3); color: var(--text); }
.iconbtn.is-spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.refresh { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); white-space: nowrap; }
.refresh__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); flex: none; }
.refresh[data-live="1"] .refresh__dot { background: var(--live); animation: pulse 1.8s ease-in-out infinite; }
.refresh[data-live="1"] .refresh__text { color: var(--bad-ink); font-weight: 600; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* Holds the week rail + summary on narrow screens, in normal flow, so they
   scroll under the pinned brand bar instead of eating a third of the viewport.
   Empty (and hidden) on desktop, where those parts stay inside .topbar. */
.subhead:empty { display: none; }

/* --------------------------------------------------------------- summary */
.summary {
  max-width: 1600px; margin: 0 auto; padding: 0 18px 11px;
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
}
.chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 3.5px 11px; font-size: 12px; color: var(--text-dim);
}
.chip b { color: var(--text); font-weight: 650; font-size: 12.5px; }
.chip--good { border-color: var(--good-line); background: var(--good-bg); color: var(--good-ink); }
.chip--good b { color: var(--good-ink); }
.chip--bad { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad-ink); }
.chip--bad b { color: var(--bad-ink); }
.chip--warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.chip--warn b { color: var(--warn); }

/* ------------------------------------------------------------------ main */
.main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 20px 18px 72px; }
.board { display: flex; flex-direction: column; gap: 26px; }

.slot { scroll-margin-top: calc(var(--header-h) + 12px); }
.slot__head {
  position: sticky; top: calc(var(--header-h) - 1px); z-index: 20;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 9px 2px 9px; margin-bottom: 11px;
  /* Solid, not a fade: when this wraps to two lines the fade lets cards show through. */
  background: var(--bg);
  box-shadow: 0 10px 10px -10px var(--bg);
}
.slot__time { font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.slot__day { color: var(--text-dim); font-weight: 500; }
.slot__meta { font-size: 11.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.slot__live { color: var(--live); }

.slot__games { display: grid; gap: 13px; align-items: start; grid-template-columns: repeat(auto-fill, minmax(470px, 1fr)); }
@media (max-width: 560px) { .slot__games { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------- game card */
.game {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 58px);
  display: flex; flex-direction: column;
}
.game--post { opacity: .8; border-color: var(--line-soft); box-shadow: none; background: var(--bg-elev); }
.game--post .game__head { background: transparent; }
.game--post:hover { opacity: 1; }
.game--in { border-color: color-mix(in srgb, var(--live) 42%, var(--line)); }
.game--empty .game__body { display: none; }
/* Dim a game you have no stake in — but never a live one. Dimming used to win
   over .game--post, so a live game you had nobody in read as finished. */
.game--empty:not(.game--in) { opacity: .5; }
.game--empty:not(.game--in):hover { opacity: .85; }
.game--in.game--empty { opacity: 1; }

.game__head {
  padding: 13px 15px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--line-soft);
}
/* Capped so the scoreline stays compact on a wide card instead of the score
   drifting away from the team it belongs to. */
.game__scoreline {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 12px; max-width: 460px; margin: 0 auto;
}
.side { display: flex; align-items: center; gap: 9px; min-width: 0; }
.side--home { flex-direction: row-reverse; text-align: right; }
.side__logo { width: 32px; height: 32px; object-fit: contain; flex: none; }
.side__id { min-width: 0; }
.side__abbr { font-weight: 750; font-size: 14px; letter-spacing: -.01em; display: block; }
.side__rec { font-size: 10.5px; color: var(--text-faint); display: block; white-space: nowrap; }
.side__score { font-size: 24px; font-weight: 750; letter-spacing: -.03em; line-height: 1; margin-left: auto; }
.side--home .side__score { margin-left: 0; margin-right: auto; }
.side--loser .side__score, .side--loser .side__abbr { color: var(--text-faint); font-weight: 650; }
.side__poss { color: var(--warn); font-size: 9px; vertical-align: 3px; }

.game__status { text-align: center; min-width: 88px; }
.status__pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-dim);
  background: var(--surface-3);
}
.status__pill--in { background: color-mix(in srgb, var(--live) 15%, transparent); border-color: color-mix(in srgb, var(--live) 40%, transparent); color: var(--live); }
.status__pill--in .status__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--live); animation: pulse 1.8s ease-in-out infinite; }
.status__pill--post { background: transparent; }
.status__detail { display: block; margin-top: 4px; font-size: 11px; color: var(--text-faint); }
.status__clock { font-variant-numeric: tabular-nums; }

.game__body { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .game__body { grid-template-columns: 1fr; } }

.col { padding: 11px 13px 13px; min-width: 0; }
.col + .col { border-left: 1px solid var(--line-soft); }
@media (max-width: 480px) { .col + .col { border-left: 0; border-top: 1px solid var(--line-soft); } }

.col__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding-bottom: 8px; margin-bottom: 9px; border-bottom: 1px solid var(--line-soft);
}
.col--for .col__head { color: var(--good); }
.col--against .col__head { color: var(--bad); }
.col__total { font-variant-numeric: tabular-nums; letter-spacing: .02em; opacity: .85; font-weight: 650; }
.col__empty { font-size: 12px; color: var(--text-faint); font-style: italic; padding: 3px 0 5px; }

.plist { display: flex; flex-direction: column; gap: 9px; }

.player { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; }
.player__face {
  width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: cover;
  background: var(--surface-3); border: 1px solid var(--line);
}
.player__crest {
  width: 30px; height: 30px; border-radius: 50%; flex: none; object-fit: contain;
  background: var(--surface-3); border: 1px solid var(--line); padding: 3px;
}
.player__badge {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 750; letter-spacing: .02em;
  background: var(--surface-3); border: 1px solid var(--line); color: var(--text-dim);
}
.player__main { min-width: 0; }
.player__top { display: block; }
.player__mult {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .01em;
  padding: 0 5px; border-radius: 5px; line-height: 1.5; margin-right: 4px; vertical-align: 1px;
}
.col--for .player__mult { background: var(--good-bg); color: var(--good-ink); border: 1px solid var(--good-line); }
.col--against .player__mult { background: var(--bad-bg); color: var(--bad-ink); border: 1px solid var(--bad-line); }
.player__name { font-weight: 650; font-size: 13.5px; letter-spacing: -.01em; }
.col--for .player__name { color: var(--good-ink); }
.col--against .player__name { color: var(--bad-ink); }
.player__pos { font-size: 10px; color: var(--text-faint); font-weight: 650; letter-spacing: .04em; margin-left: 4px; white-space: nowrap; }
.player__inj {
  display: inline-block; margin-left: 4px; white-space: nowrap; font-size: 9.5px; font-weight: 750; color: var(--warn); background: var(--warn-bg);
  border: 1px solid var(--warn-line); border-radius: 4px; padding: 0 4px; letter-spacing: .03em;
}
.player__conflict {
  display: inline-block; margin-left: 4px; white-space: nowrap; font-size: 9.5px; font-weight: 750; color: var(--warn); background: var(--warn-bg);
  border: 1px solid var(--warn-line); border-radius: 4px; padding: 0 4px; letter-spacing: .03em;
  cursor: help;
}
.player__leagues { margin: 3px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 1px; }
.player__league { display: flex; align-items: baseline; gap: 7px; font-size: 11.5px; color: var(--text-dim); }
.player__league-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__league-slot { font-size: 9.5px; color: var(--text-faint); letter-spacing: .04em; flex: none; }
.player__pts {
  margin-left: auto; flex: none; font-variant-numeric: tabular-nums;
  font-weight: 650; font-size: 11.5px; color: var(--text);
}
.player__pts--zero { color: var(--text-faint); font-weight: 500; }

/* ------------------------------------------------- finished-game collapse
   A final game keeps its scoreline but trades the two player columns for a
   single digest strip, so the week scrolls down to whatever is actually being
   played. The full body stays in the DOM (hidden) — that keeps the refresh
   patcher's cells alive and makes opening one back up instant. */
.game.is-collapsed .game__body { display: none; }
.game.is-collapsed .game__head { padding: 9px 13px 8px; }
.game.is-collapsed .side__logo { width: 24px; height: 24px; }
.game.is-collapsed .side__score { font-size: 19px; }
.game.is-collapsed .side__rec { display: none; }
.game.is-collapsed .status__pill--post { padding: 2px 7px; font-size: 9.5px; }
/* Opening a final game means you want to read it, so undo the finished dimming. */
.game--post:not(.is-collapsed) { opacity: 1; }

.digest {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin: 0; padding: 8px 13px; text-align: left; cursor: pointer;
  border: 0; border-top: 1px solid var(--line-soft);
  background: transparent; color: inherit; font: inherit;
}
.digest:hover { background: var(--surface-2); }
.digest:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.digest__sides { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
@media (max-width: 560px) { .digest__sides { grid-template-columns: 1fr; } }
.digest__side { display: flex; align-items: baseline; gap: 7px; min-width: 0; flex-wrap: wrap; }
.digest__label { font-size: 9.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; flex: none; }
.digest__side--for .digest__label { color: var(--good); }
.digest__side--against .digest__label { color: var(--bad); }
.digest__total { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.digest__names { display: flex; flex-wrap: wrap; gap: 2px 9px; min-width: 0; font-size: 11px; color: var(--text-dim); }
.digest__name b { margin-left: 3px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }
.digest__more, .digest__none { color: var(--text-faint); }
.digest__none { font-style: italic; }
.digest__chev { flex: none; width: 16px; height: 16px; color: var(--text-faint); transition: transform .15s ease; }
/* Expanded, the strip stays on as a totals header — the names would just
   repeat the columns underneath it. */
.game:not(.is-collapsed) .digest__names { display: none; }
.game:not(.is-collapsed) .digest__chev { transform: rotate(180deg); }

/* -------------------------------------------------------------- oddments */
.idle { border: 1px dashed var(--line); border-radius: var(--radius); padding: 13px 15px; }
.idle__head { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 7px; }
.idle__list { display: flex; flex-wrap: wrap; gap: 6px; }
.idle__item { font-size: 11.5px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--line-soft); border-radius: 7px; padding: 2px 8px; }

.notice { display: flex; gap: 9px; align-items: flex-start; border-radius: var(--radius-sm); padding: 10px 13px; font-size: 12.5px; border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.notice + .notice { margin-top: 7px; }
.notice b { font-weight: 700; }

.stateslot:empty { display: none; }
.empty { text-align: center; padding: 72px 20px; color: var(--text-dim); }
.empty h2 { font-size: 19px; color: var(--text); margin: 0 0 7px; letter-spacing: -.02em; }
.empty p { margin: 0 auto 18px; max-width: 44ch; font-size: 13.5px; }

.skeleton { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(470px, 1fr)); }
.skeleton__card { height: 168px; border-radius: var(--radius); border: 1px solid var(--line); background:
  linear-gradient(100deg, var(--surface) 30%, var(--surface-3) 50%, var(--surface) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton__card { animation: none; } }

.foot {
  width: 100%; max-width: 1600px; margin: 0 auto; padding: 22px 18px 34px;
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  font-size: 11.5px; color: var(--text-faint); border-top: 1px solid var(--line-soft);
}
.foot__sep { opacity: .4; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }
.linkbtn:hover { color: var(--text); }

/* ----------------------------------------------------------------- forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text);
  padding: 8px 15px; font-size: 13.5px; font-weight: 620; cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: .5; cursor: default; }
.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--primary:hover:not(:disabled) { opacity: .88; background: var(--text); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--bad-ink); border-color: var(--bad-line); background: transparent; }
.btn--sm { padding: 5px 11px; font-size: 12px; }

.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 12px; font-weight: 650; color: var(--text-dim); margin-bottom: 5px; }
.field__hint { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; line-height: 1.5; }
.input {
  width: 100%; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg); color: var(--text); padding: 9px 11px; font-size: 13.5px; font-family: inherit;
}
.input:focus { border-color: var(--accent); outline: none; }
.input--mono { font-family: var(--mono); font-size: 12px; }
textarea.input { resize: vertical; min-height: 62px; }

/* ----------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(4,6,10,.72); backdrop-filter: blur(3px); }
.modal__panel {
  position: relative; width: min(660px, 100%); max-height: min(86vh, 860px);
  display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 17px; box-shadow: 0 24px 64px rgba(0,0,0,.6); overflow: hidden;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.modal__head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.modal__body { padding: 18px; overflow-y: auto; }

.section { border: 1px solid var(--line); border-radius: var(--radius); padding: 15px; }
.section + .section { margin-top: 13px; }
.section__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.section__title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.section__logo { width: 19px; height: 19px; border-radius: 5px; }
.section__sub { font-size: 12px; color: var(--text-faint); margin-bottom: 13px; line-height: 1.5; }
.section__status { font-size: 11.5px; color: var(--good); font-weight: 600; }
.section__status--err { color: var(--bad-ink); }

.leaguelist { list-style: none; margin: 13px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.leaguerow { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--radius-sm); cursor: pointer; }
.leaguerow:hover { background: var(--surface-2); }
.leaguerow input { accent-color: var(--good); width: 15px; height: 15px; flex: none; cursor: pointer; }
.leaguerow__name { font-size: 13px; font-weight: 600; }
.leaguerow__meta { font-size: 11px; color: var(--text-faint); }
.leaguerow__body { min-width: 0; flex: 1; }

.steps { counter-reset: s; list-style: none; margin: 0 0 13px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.steps li { counter-increment: s; position: relative; padding-left: 26px; font-size: 12.5px; color: var(--text-dim); line-height: 1.55; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--line);
  font-size: 10px; font-weight: 700; color: var(--text-dim);
}
.steps code { font-family: var(--mono); font-size: 11.5px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.steps a { color: var(--accent); }


/* ------------------------------------------------------------ narrow view */
@media (max-width: 760px) {
  .topbar__inner { flex-wrap: wrap; height: auto; padding: 9px 14px; gap: 9px 12px; }
  .brand { order: 1; }
  .topbar__actions { order: 2; margin-left: auto; }
  .subhead { background: var(--bg); padding-top: 4px; }
  .weeknav { flex-basis: 100%; padding: 0 8px; }
  .weeknav__step { display: none; }
  .weeknav__scroll { padding: 3px 6px 5px; }
  .refresh__text { display: none; }
  .refresh { gap: 0; }
  .refresh__dot { width: 7px; height: 7px; }
  .tabs { padding: 2px; }
  .brand { gap: 7px; }
  .brand__text { font-size: 13.5px; }
  .brand__mark { width: 23px; height: 23px; }
  .topbar__inner { gap: 7px; }
  .iconbtn { width: 30px; height: 30px; }
  .summary { padding: 9px 14px 10px; gap: 6px; }
  .chip { font-size: 11.5px; padding: 3px 9px; }
  .main { padding: 16px 14px 60px; }
  .board { gap: 20px; }
  .slot__head { padding: 8px 2px; gap: 8px; }
  .slot__time { font-size: 14px; }
  .slot__meta:last-child { display: none; }
  .game__scoreline { gap: 8px; }
  .side__score { font-size: 21px; }
  .side__logo { width: 27px; height: 27px; }
  .foot { padding: 18px 14px 30px; }
}
/* Three tabs plus the action buttons no longer clear a phone alongside the
   wordmark, and a bar that wraps costs a pinned row on every screen. The mark
   alone still says whose app this is. */
@media (max-width: 470px) {
  .brand__text { display: none; }
}

.help { margin: 0 0 13px; }
.help > summary {
  cursor: pointer; list-style: none; font-size: 12.5px; font-weight: 600;
  color: var(--accent); padding: 3px 0; user-select: none;
}
.help > summary::-webkit-details-marker { display: none; }
.help > summary::before { content: "▸ "; display: inline-block; transition: transform .15s; }
.help[open] > summary::before { content: "▾ "; }
.help > summary:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------ device hand-off */
.grab { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; margin-bottom: 13px; background: var(--surface-2); }
.grab__title { font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 11px; }
.grab__mark {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--good-bg); border: 1px solid var(--good-line); color: var(--good-ink);
  border-radius: var(--radius-sm); padding: 7px 13px; font-size: 13px; font-weight: 650;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.grab__mark:hover { background: color-mix(in srgb, var(--good) 18%, transparent); }
.grab__status { margin-left: 9px; font-size: 11.5px; color: var(--good); font-weight: 600; }
.grab__note { margin: 11px 0 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.55; }
/* Roomier numbered steps, for a walkthrough rather than a footnote. */
.steps--lg li { padding-left: 30px; font-size: 13px; color: var(--text-dim); }
.steps--lg li::before { width: 21px; height: 21px; font-size: 11px; top: 0; }
.steps--lg b { color: var(--text); font-weight: 650; }
.steps--lg { gap: 12px; }

.pair { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pair__qr {
  /* Sized so a dense (version ~21) code still lands above ~2.5 CSS px per module,
     which is what a phone camera needs at arm's length. */
  flex: none; width: 100%; max-width: 288px; aspect-ratio: 1; display: grid; place-items: center;
  background: #fff; border-radius: var(--radius-sm); padding: 10px; border: 1px solid var(--line);
}
.pair__qr svg { width: 100%; height: 100%; display: block; }
.pair__qr-fallback { font-size: 11px; color: #64748b; text-align: center; padding: 0 10px; line-height: 1.5; }
.pair__side { flex: 1; min-width: 200px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pair__status { font-size: 11.5px; color: var(--good); font-weight: 600; min-height: 15px; }
.pair__note { margin: 0; font-size: 11.5px; color: var(--text-faint); line-height: 1.55; }

/* --------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 2px; flex: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.tab {
  border: 0; background: transparent; color: var(--text-dim); cursor: pointer;
  border-radius: 8px; padding: 5px 14px; font-size: 13px; font-weight: 620; letter-spacing: -.01em;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.3); }

/* The pinned bar has to stay one row on a phone: mark + three tabs + actions.
   These live here rather than in the narrow block further up, because the base
   .tab rule above is declared after it and would otherwise win on source order.
   Measured at 390px: mark 23 + tabs + actions 83 + gaps 14 + padding 28. */
@media (max-width: 760px) {
  .tab { padding: 4px 8px; font-size: 12px; }
}
@media (max-width: 400px) {
  .tab { padding: 4px 6px; }
}
.weeknav--muted { opacity: .38; pointer-events: none; }

.leagues { display: flex; flex-direction: column; gap: 22px; }

/* ------------------------------------------------------- cheer module */
.cheer { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cheer__title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 13px 17px 11px; border-bottom: 1px solid var(--line-soft);
}
.cheer__titletext { min-width: 0; }
.cheer__title h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.cheer__sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-faint); }
.cheer__why-btn { flex: none; font-size: 12px; }
.cheer__cols { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .cheer__cols { grid-template-columns: 1fr; } }
.cheer__col { padding: 13px 15px 15px; min-width: 0; }
.cheer__col + .cheer__col { border-left: 1px solid var(--line-soft); }
@media (max-width: 700px) { .cheer__col + .cheer__col { border-left: 0; border-top: 1px solid var(--line-soft); } }
.cheer__head {
  display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; padding-bottom: 9px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
}
.cheer__col--for .cheer__head { color: var(--good); }
.cheer__col--against .cheer__head { color: var(--bad); }
.cheer__count { margin-left: auto; opacity: .7; font-variant-numeric: tabular-nums; }
.cheer__list { list-style: none; margin: 0; padding: 0; }
.cheer__empty { font-size: 12px; color: var(--text-faint); font-style: italic; margin: 9px 0 0; }
.cheer__more { margin-top: 9px; font-size: 12px; }
.cheer__tie { margin: 0; padding: 11px 17px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--warn); background: var(--warn-bg); }

/* One line per player: strength, who, which leagues (by rank), points. The
   full reasoning sits in .rootrow__why and only unfolds on request. */
.rootrow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0 7px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line-soft);
}
.rootrow:last-child { border-bottom: 0; }
.rootrow__rank {
  font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  min-width: 21px; text-align: center; border-radius: 5px; padding: 2px 0; line-height: 1.4;
}
.rootrow--for .rootrow__rank { background: var(--good-bg); color: var(--good-ink); border: 1px solid var(--good-line); }
.rootrow--against .rootrow__rank { background: var(--bad-bg); color: var(--bad-ink); border: 1px solid var(--bad-line); }
.rootrow__name {
  min-width: 0; font-size: 13px; font-weight: 650; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rootrow--for .rootrow__name { color: var(--good-ink); }
.rootrow--against .rootrow__name { color: var(--bad-ink); }
.rootrow__pos { font-size: 10px; color: var(--text-faint); font-weight: 650; margin-left: 5px; letter-spacing: .04em; }
.rootrow__meta { display: flex; align-items: center; gap: 3px; }
.rootrow__rk {
  font-size: 9.5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: help;
  color: var(--text-faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 3px;
}
.rootrow__mark { font-size: 10px; color: var(--warn); cursor: help; }
.rootrow__mark--soft { color: var(--text-faint); }
.rootrow__pts { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text-dim); }
/* Second grid row, hidden until "Show why" — the #ranks above are the glanceable version. */
.rootrow__why {
  grid-column: 1 / -1; display: none;
  margin: 1px 0 3px; font-size: 11px; line-height: 1.45; color: var(--text-dim);
}
.leagues--why .rootrow__why { display: block; }

/* ---------------------------------------------------- scenario module */
/* One card per undecided matchup, ordered by how much is still in doubt. The
   band colour is the whole point: amber means shout, grey means sit down. */
.scns { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.scns__title { padding: 13px 17px 11px; border-bottom: 1px solid var(--line-soft); }
.scns__title h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.scns__sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-faint); }
.scns__list { list-style: none; margin: 0; padding: 0; }

.scn {
  --scn: var(--text-faint);
  padding: 12px 17px 13px 14px; border-left: 3px solid var(--scn);
  border-bottom: 1px solid var(--line-soft);
}
.scn:last-child { border-bottom: 0; }
.scn--flip { --scn: var(--warn); background: var(--warn-bg); }
.scn--live { --scn: var(--accent); }
.scn--tilt { --scn: var(--text-dim); }
/* Faded, but still readable — a settled matchup is information, not decoration. */
.scn--calm { --scn: var(--text-faint); opacity: .7; }
.scn--calm:hover { opacity: 1; }

.scn__top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.scn__rk {
  flex: none; font-size: 9.5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: help;
  color: var(--text-faint); border: 1px solid var(--line); border-radius: 4px; padding: 0 3px;
}
.scn__league {
  min-width: 0; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scn__band {
  flex: none; margin-left: auto; font-size: 10px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--scn);
}
.scn__prob { flex: none; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text-dim); }

.scn__meter { height: 4px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin: 7px 0 8px; cursor: help; }
.scn__meter > span { display: block; height: 100%; background: var(--scn); border-radius: 3px; }

.scn__headline { margin: 0; font-size: 13px; line-height: 1.4; }
.scn__detail { margin: 3px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--text-dim); }

.scn__side { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-top: 7px; }
.scn__sidelabel {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; min-width: 88px;
}
.scn__side--for .scn__sidelabel { color: var(--good); }
.scn__side--against .scn__sidelabel { color: var(--bad); }
.scn__names { display: flex; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.scn__player {
  font-size: 12px; font-weight: 600; cursor: help; border-radius: 5px; padding: 1px 6px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.scn__side--for .scn__player { color: var(--good-ink); border-color: var(--good-line); background: var(--good-bg); }
.scn__side--against .scn__player { color: var(--bad-ink); border-color: var(--bad-line); background: var(--bad-bg); }
/* A dot means the ball is in the air right now, not just later today. */
.scn__player--live::after {
  content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--live); margin-left: 5px; vertical-align: middle;
}
.scn__rest { font-size: 11px; color: var(--text-faint); align-self: center; }

@media (max-width: 520px) {
  .scn { padding: 11px 13px 12px 11px; }
  .scn__sidelabel { min-width: 0; }
}

/* --------------------------------------------------------- league cards */
.lglist { display: flex; flex-direction: column; gap: 11px; }
.lglist__head { display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap; }
.lglist__head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.lglist__hint { font-size: 11.5px; color: var(--text-faint); }

.lg { max-width: 880px; display: grid; grid-template-columns: auto 1fr; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.lg--settled { opacity: .72; box-shadow: none; }
.lg--settled:hover { opacity: 1; }
.lg__rank { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lg__num { font-size: 15px; font-weight: 750; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.lg__move { width: 24px; height: 20px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-dim); border-radius: 6px; cursor: pointer; font-size: 8px; line-height: 1; }
.lg__move:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.lg__move:disabled { opacity: .28; cursor: default; }
.lg__main { min-width: 0; }
.lg__head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.lg__name { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.lg__tags { display: flex; gap: 5px; }
.lg__tag { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.lg__bye { margin: 0; font-size: 13px; color: var(--text-dim); }

.lg__score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin-bottom: 11px; }
.lg__team { min-width: 0; }
.lg__team--opp { text-align: right; }
.lg__teamname { display: block; font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg__pts { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.lg__proj { display: block; font-size: 10.5px; color: var(--text-faint); }
.lg__vs { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }

.lg__prob { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lg__headline, .lg__detail, .need { max-width: 68ch; }
.lg__bar { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lg__bar span { display: block; height: 100%; border-radius: 3px; background: var(--text-faint); transition: width .4s ease; }
.lg--good .lg__bar span { background: var(--good); }
.lg--bad .lg__bar span { background: var(--bad); }
.lg--even .lg__bar span { background: var(--warn); }
.lg__probval { font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; min-width: 74px; text-align: right; }
.lg__probval small { font-weight: 500; font-size: 10px; color: var(--text-faint); margin-left: 4px; }
.lg--good .lg__probval { color: var(--good-ink); }
.lg--bad .lg__probval { color: var(--bad-ink); }

.lg__headline { margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.lg__detail { margin: 3px 0 0; font-size: 12px; color: var(--text-dim); line-height: 1.5; }

.need { margin-top: 11px; border-top: 1px solid var(--line-soft); padding-top: 10px; display: flex; flex-direction: column; gap: 9px; }
.need__player { min-width: 0; }
.need__name { font-size: 13px; font-weight: 650; }
.need__pos { font-size: 10px; color: var(--text-faint); font-weight: 650; margin-left: 5px; letter-spacing: .04em; }
.need__live { font-size: 9.5px; font-weight: 750; color: var(--live); background: color-mix(in srgb, var(--live) 14%, transparent); border: 1px solid color-mix(in srgb, var(--live) 34%, transparent); border-radius: 4px; padding: 0 4px; margin-left: 5px; letter-spacing: .03em; }
.need__has { display: block; font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.need__ways { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.need__way { font-size: 12px; font-weight: 650; color: var(--good-ink); background: var(--good-bg); border: 1px solid var(--good-line); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.need__or { font-size: 10.5px; color: var(--text-faint); }
.need__caveat { font-size: 10px; color: var(--text-faint); font-style: italic; cursor: help; }

/* split badge on the Live board */
.player__split {
  display: inline-block; margin-left: 4px; white-space: nowrap; font-size: 9.5px; font-weight: 750;
  border-radius: 4px; padding: 0 4px; letter-spacing: .03em; cursor: help;
}
.player__split--for { color: var(--good-ink); background: var(--good-bg); border: 1px solid var(--good-line); }
.player__split--against { color: var(--bad-ink); background: var(--bad-bg); border: 1px solid var(--bad-line); }
.player__split--tie { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }

@media (max-width: 760px) {
  .tabs { order: 1; }
  .lg { padding: 12px 13px; gap: 10px; }
  .lg__pts { font-size: 19px; }
  .cheer__title { padding: 13px 14px 11px; }
  .cheer__col { padding: 11px 13px 13px; }
}
.empty__detail {
  display: block; margin: 7px auto 0; max-width: 60ch;
  font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--text-faint);
  word-break: break-word;
}
.empty code { font-family: var(--mono); font-size: .92em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; color: var(--text-dim); }
.warnbox, .okbox {
  margin: 0 0 13px; padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 1.55;
}
.warnbox { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.okbox { color: var(--good-ink); background: var(--good-bg); border: 1px solid var(--good-line); }
.warnbox code, .okbox code { font-family: var(--mono); font-size: .92em; }

/* ---------------------------------------------------------- players tab */
.wire { display: flex; flex-direction: column; gap: 26px; }

.wire__head { display: flex; flex-direction: column; gap: 9px; max-width: 78ch; }
.wire__weeknav { display: flex; align-items: center; gap: 8px; }
.wire__week { font-size: 17px; letter-spacing: -.02em; color: var(--text-dim); }
.wire__week b { color: var(--text); font-weight: 750; }
.wire__blurb { margin: 0; font-size: 12px; line-height: 1.55; color: var(--text-faint); }

.wire__title { display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap; margin-bottom: 12px; }
.wire__title h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.wire__sub { font-size: 11.5px; color: var(--text-faint); }

.wire__loading { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 64px 20px; text-align: center; }
.wire__loading p { margin: 0; font-size: 14px; font-weight: 650; }
.wire__loading span { font-size: 12px; color: var(--text-faint); max-width: 44ch; }
.wire__spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin 850ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wire__spinner { animation-duration: 3s; } }

/* ------------------------------------------------- 1. waiver position */
.worder__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.worder__row {
  display: grid; grid-template-columns: auto minmax(150px, 1.1fr) minmax(190px, 1fr) minmax(0, 1.5fr);
  gap: 14px; align-items: center; max-width: 1000px;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--radius); padding: 11px 15px;
}
.worder__row--good { border-left-color: var(--good); }
.worder__row--warn { border-left-color: var(--warn); }
.worder__row--bad  { border-left-color: var(--bad); }
.worder__rk { font-size: 12px; font-weight: 750; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.worder__league { min-width: 0; }
.worder__name { display: block; font-size: 14px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.worder__tags { display: flex; gap: 5px; margin-top: 3px; }

.worder__figure { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
.worder__money { font-size: 20px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.worder__money small { font-size: 11px; font-weight: 500; color: var(--text-faint); margin-left: 5px; letter-spacing: 0; }
.worder__bar { flex: 1 1 70px; height: 5px; min-width: 50px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.worder__bar > span { display: block; height: 100%; border-radius: 3px; background: currentColor; }
.worder__row--good .worder__bar > span { background: var(--good); }
.worder__row--warn .worder__bar > span { background: var(--warn); }
.worder__row--bad  .worder__bar > span { background: var(--bad); }
.worder__rank-note { flex-basis: 100%; font-size: 10.5px; color: var(--text-faint); }
.worder__pos { font-size: 20px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.worder__pos small { font-size: 11px; font-weight: 500; color: var(--text-faint); margin-left: 5px; }
.worder__pos--unknown { font-size: 13px; font-weight: 600; color: var(--text-faint); }
.worder__pips { display: flex; gap: 3px; align-items: center; }
.worder__pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); border: 1px solid var(--line); }
.worder__pips i.is-ahead { background: var(--line); }
.worder__pips i.is-you { background: var(--accent); border-color: var(--accent); transform: scale(1.5); }
.worder__read { font-size: 12px; line-height: 1.45; color: var(--text-dim); }

/* -------------------------------------------------- 2. recommended moves */
.moves { display: flex; flex-direction: column; gap: 13px; }
.mvlg { max-width: 1000px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.mvlg--stand-pat, .mvlg--blocked { background: var(--surface-2); box-shadow: none; opacity: .82; }
.mvlg--stand-pat:hover, .mvlg--blocked:hover { opacity: 1; }
.mvlg__head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.mvlg__name { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.mvlg__team { font-size: 11.5px; color: var(--text-faint); }
.mvlg__tags { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.mvlg__verdict { margin: 0; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.mvlg--move .mvlg__verdict { color: var(--good-ink); }
.mvlg__detail { margin: 3px 0 0; font-size: 12px; color: var(--text-dim); line-height: 1.5; max-width: 72ch; }

.mvlg__holes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.hole { font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 8px; cursor: help; letter-spacing: .01em; }
.hole small { font-weight: 500; margin-left: 5px; opacity: .85; }
.hole--bye, .hole--out, .hole--empty { color: var(--bad-ink); background: var(--bad-bg); border: 1px solid var(--bad-line); }
.hole--doubtful { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }

.mvlg__moves { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.mv { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px 11px; }
.mv--high { border-color: var(--good-line); background: color-mix(in srgb, var(--good) 5%, var(--surface-2)); }
.mv__mark {
  position: absolute; top: -9px; left: 12px; font-size: 10px; font-weight: 800; letter-spacing: .05em;
  color: var(--good-ink); background: var(--bg-elev); border: 1px solid var(--good-line);
  border-radius: 5px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}
.mv__add { display: flex; align-items: center; gap: 11px; }
.mv__who { min-width: 0; flex: 1; }
.mv__name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.mv__status { font-size: 9px; font-weight: 800; letter-spacing: .06em; color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 4px; padding: 1px 5px; cursor: help; }
.mv__status--free { color: var(--text-faint); background: transparent; border-color: var(--line); }
.mv__meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 4px; }
.mv__proj { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.mv__proj small { font-size: 9.5px; font-weight: 500; color: var(--text-faint); margin-left: 3px; }
.mv__reason { margin: 9px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); max-width: 70ch; }

.mv__cost { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
.mv__bid, .mv__claim, .mv__drop { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; min-width: 0; }
.mv__bidlabel, .mv__droplabel { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); }
.mv__bidval { font-size: 17px; font-weight: 750; letter-spacing: -.02em; color: var(--good-ink); font-variant-numeric: tabular-nums; }
.mv__bidof, .mv__dropval, .mv__alts { font-size: 11px; color: var(--text-faint); }
.mv__bidtier { font-size: 11px; color: var(--text-dim); }
.mv__note { flex-basis: 100%; margin: 0; font-size: 11px; color: var(--text-faint); font-style: italic; }
.mv__claim { font-size: 12px; }
.mv__claim--likely { color: var(--good-ink); }
.mv__claim--contested { color: var(--warn); }
.mv__claim--unlikely { color: var(--bad-ink); }
.mv__claim--free { color: var(--text-dim); }
.mv__dropname { font-size: 13px; font-weight: 650; }
/* .wp__name is a flex row and spaces this itself; here it needs saying. */
.mv__dropname .wp__pos { margin-left: 5px; }
.mv__cautions { margin: 9px 0 0; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 4px; }
.mv__cautions li { font-size: 11.5px; line-height: 1.45; color: var(--warn); max-width: 70ch; }
.mv__movement { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.mv__movementlabel { font-size: 10.5px; color: var(--text-faint); }

/* --------------------------------------------------- 3. best available */
.pool__controls { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.pool__row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.pool__sortlabel { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-right: 3px; }
.pchip {
  font-size: 11.5px; font-weight: 650; color: var(--text-dim); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; cursor: pointer;
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pchip:hover { background: var(--surface-3); color: var(--text); }
.pchip.is-on { color: var(--bg); background: var(--text); border-color: var(--text); }

.pool__head, .pool__list { list-style: none; margin: 0; padding: 0; max-width: 1000px; }
.pool__head li, .wp {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 34px minmax(0, 1fr) 52px 78px 56px 96px;
}
.pool__head li { padding: 0 15px 5px; }
.pool__head span { font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-faint); }
.pool__head span:nth-child(3), .pool__head span:nth-child(4), .pool__head span:nth-child(5) { text-align: right; }
.pool__list { display: flex; flex-direction: column; gap: 4px; }
.wp { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); padding: 8px 15px; }
.wp:hover { border-color: var(--line); background: var(--surface-2); }
.pool__more { margin-top: 10px; }

.wp__id { min-width: 0; }
.wp__name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; font-weight: 650; letter-spacing: -.01em; }
.wp__pos { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; color: var(--text-faint); }
.wp__sub { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 2px; }
.wp__wv { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; color: var(--warn); border: 1px solid var(--warn-line); border-radius: 3px; padding: 0 4px; cursor: help; }
.wp__inj { font-size: 9px; font-weight: 800; letter-spacing: .04em; border-radius: 3px; padding: 0 4px; cursor: help; }
.wp__inj--out { color: var(--bad-ink); background: var(--bad-bg); border: 1px solid var(--bad-line); }
.wp__inj--doubtful { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.wp__inj--questionable { color: var(--text-faint); border: 1px solid var(--line); }

.wp__opp { font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wp__opp--bye { color: var(--bad-ink); font-weight: 700; }
.wp__grade { font-size: 10px; font-weight: 700; border-radius: 4px; padding: 0 6px; cursor: help; white-space: nowrap; }
.wp__grade--great { color: var(--good-ink); background: var(--good-bg); border: 1px solid var(--good-line); }
.wp__grade--good  { color: var(--good-ink); border: 1px solid var(--good-line); }
.wp__grade--tough { color: var(--text-faint); border: 1px solid var(--line); }
.wp__grade--hard  { color: var(--bad-ink); background: var(--bad-bg); border: 1px solid var(--bad-line); }

.wp__proj { font-size: 15px; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wp__gain { font-size: 12px; font-weight: 650; text-align: right; color: var(--text-faint); font-variant-numeric: tabular-nums; cursor: help; }
.wp__gain--up { color: var(--good-ink); }
.wp__gain small { font-size: 9.5px; font-weight: 600; opacity: .8; margin-left: 3px; }
.wp__formcell, .wp__movecell { display: flex; align-items: center; gap: 5px; justify-content: flex-end; }
.wp__movecell { justify-content: flex-start; flex-wrap: wrap; }
.wp__form { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: help; }
.wp__form small, .wp__own small, .wp__move small { font-size: 9px; font-weight: 500; color: var(--text-faint); margin-left: 2px; }
.wp__form--none { color: var(--text-faint); }
.wp__own { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: help; }
.wp__move { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: help; white-space: nowrap; }
.wp__move--up { color: var(--good-ink); }
.wp__move--down { color: var(--bad-ink); }
.wp__move--flat, .wp__quiet { color: var(--text-faint); font-weight: 500; font-size: 11px; }

.wp__face, .wp__badge { border-radius: 50%; background: var(--surface-3); object-fit: cover; }
.wp__face { width: 34px; height: 34px; }
.wp__face--crest { object-fit: contain; padding: 3px; background: var(--surface-2); }
.wp__face--lg { width: 44px; height: 44px; }
.wp__badge { width: 34px; height: 34px; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: var(--text-faint); letter-spacing: .03em; }
.wp__badge--lg { width: 44px; height: 44px; font-size: 11px; }

@media (max-width: 860px) {
  .worder__row { grid-template-columns: auto 1fr; row-gap: 9px; }
  .worder__figure, .worder__read { grid-column: 1 / -1; }
  .pool__head { display: none; }
  .pool__head li, .wp { grid-template-columns: 34px minmax(0, 1fr) 52px; row-gap: 6px; }
  .wp__gain { grid-column: 2; text-align: left; }
  .wp__formcell { grid-column: 3; }
  .wp__movecell { grid-column: 1 / -1; }
  .mvlg__tags { margin-left: 0; }
}
