/* Lineup Lab themes. Every rule in this file uses the color variables below,
   so a theme is just a set of variable values. The app sets
   <html data-theme="..."> from leagues.json, so each league gets its own look.
   Barlow (signage type) carries the personality; the condensed cut handles
   every number and heading. */

/* Default: a night game. Turf-dark background, chalk text, goalpost yellow for
   you, slate blue for the other guy. Used for any league without a theme. */
:root {
  --turf: #0c1712;        /* page */
  --turf-2: #12221a;      /* surfaces */
  --turf-3: #1a2e23;      /* raised / pressed */
  --line: #24392d;        /* hairlines */
  --chalk: #edf1e8;       /* text */
  --dim: #8fa396;         /* secondary text */
  --you: #f2c14e;         /* you */
  --them: #8ea9d6;        /* your opponent */
  --good: #63d291;
  --warn: #f0a94a;
  --bad: #ff7a6b;
  --field: #1f4a30;       /* the field strip */
  --chalk-rgb: 237, 241, 232;
  --pos-qb: #ff8b7b; --pos-rb: #63d291; --pos-wr: #79b8ff;
  --pos-te: #f0a94a; --pos-k: #c3a8ff; --pos-dst: #a9b7ae;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

/* Thunder Dome: the league logo's royal purple, gold and cream. */
:root[data-theme="thunder"] {
  --turf: #0e0718; --turf-2: #180e29; --turf-3: #231538; --line: #33234d;
  --chalk: #f6ecd6; --dim: #a698bd;
  --you: #f5c10b;         /* the logo's gold */
  --them: #a78bfa;        /* royal purple, brightened to read on dark */
  --good: #6fd69a; --warn: #ff9f50; --bad: #ff7a7a;
  --field: #2a1752;       /* the dome's field */
  --chalk-rgb: 246, 236, 214;
  --pos-qb: #ff8b8b; --pos-rb: #6fd69a; --pos-wr: #7cc0ff;
  --pos-te: #ff9f50; --pos-k: #d4b8ff; --pos-dst: #c2b6d1;
}

/* Country Club Misfits: hunter green and cream from the crest, preppy pink for
   you, sky blue for the other guy, and a freshly mowed fairway for the field. */
:root[data-theme="misfits"] {
  --turf: #0a1a12; --turf-2: #10261b; --turf-3: #173324; --line: #23432f;
  --chalk: #f4efe1; --dim: #9db5a5;
  --you: #f7a1c4;         /* the crest's pink */
  --them: #8fc7ff;
  --good: #7fe0a8; --warn: #ffb547; --bad: #ff6f5e;
  --field: #1d5236;
  --chalk-rgb: 244, 239, 225;
  --pos-qb: #ff8b7b; --pos-rb: #7fe0a8; --pos-wr: #8fc7ff;
  --pos-te: #ffb547; --pos-k: #d4b8ff; --pos-dst: #b9c9bf;
}
:root[data-theme="misfits"] .field { background: repeating-linear-gradient(90deg, #1d5236 0 6.25%, #23603f 6.25% 12.5%); }
* { box-sizing: border-box; }
html { background: var(--turf); }
body {
  margin: 0; color: var(--chalk); background: var(--turf);
  font: 16px/1.45 var(--body);
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--you); }
:focus-visible { outline: 2px solid var(--you); outline-offset: 2px; border-radius: 6px; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); } .dim { color: var(--dim); }
.n { font-family: var(--cond); font-weight: 600; letter-spacing: .01em; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--turf) 92%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--line);
}
.bar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand > div { min-width: 0; }
.mark { width: 30px; height: 30px; flex: none; background: var(--turf-3); border-radius: 8px; }
.mark-img { width: 38px; height: 38px; flex: none; object-fit: contain; border-radius: 9px; }
.mark-img[hidden], .mark[hidden] { display: none; }
.mark path { fill: none; stroke: var(--you); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
h1 { margin: 0; font: 700 22px/1 var(--cond); letter-spacing: .01em; }
#updated { margin: 3px 0 0; font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.refresh {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  border: 1px solid var(--line); background: var(--turf-2); border-radius: 99px;
  padding: 7px 13px 7px 10px; font: 600 15px/1 var(--cond); letter-spacing: .02em; cursor: pointer;
}
.refresh svg { width: 16px; height: 16px; fill: none; stroke: var(--you); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.refresh.busy svg { animation: spin 1s linear infinite; }
.refresh.busy { color: var(--you); border-color: color-mix(in srgb, var(--you) 40%, var(--line)); }
.refresh.done svg { stroke: var(--good); }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: flex; gap: 4px; }
.seg button {
  flex: 1; min-width: 0; border: 0; background: none; padding: 7px 4px 8px; cursor: pointer;
  font: 600 16px/1.1 var(--cond); color: var(--dim);
  border-bottom: 2px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button.on { color: var(--chalk); border-bottom-color: var(--you); }

/* ---------- layout & type scale ---------- */
main { max-width: 720px; margin: 0 auto; padding: 18px 16px 28px; }
h2 { font: 600 22px/1.15 var(--cond); margin: 30px 0 4px; letter-spacing: .005em; }
main > h2:first-child { margin-top: 2px; }
.explain { font-size: 14px; color: var(--dim); margin: 0 0 12px; max-width: 62ch; }
.sheetbox { background: var(--turf-2); border-radius: 16px; padding: 4px 14px; }
.sheetbox + .sheetbox { margin-top: 10px; }

/* ---------- matchup: win chance as field position ---------- */
.matchup { background: var(--turf-2); border-radius: 18px; padding: 16px 16px 14px; }
.scoreline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.team-l { min-width: 0; }
.team-r { min-width: 0; text-align: right; }
.tname { font: 600 16px/1.2 var(--cond); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trec { font-size: 13px; color: var(--dim); }
.score { font: 700 52px/0.95 var(--cond); letter-spacing: -.01em; margin-top: 6px; }
.team-l .score { color: var(--you); } .team-r .score { color: var(--them); }

.field {
  position: relative; height: 58px; margin: 18px 0 8px; border-radius: 6px; overflow: hidden;
  background: var(--field);
}
.field::before, .field::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8%; }
.field::before { left: 0; background: color-mix(in srgb, var(--you) 70%, var(--field)); }
.field::after { right: 0; background: color-mix(in srgb, var(--them) 60%, var(--field)); }
.field .play {   /* the 100 yards between the end zones, with a chalk line every 10 */
  position: absolute; left: 8%; right: 8%; top: 0; bottom: 0;
  background: repeating-linear-gradient(90deg, rgba(var(--chalk-rgb), .22) 0 1px, transparent 1px 10%);
}
.field .yd {
  position: absolute; bottom: 4px; transform: translateX(-50%);
  font: 600 11px/1 var(--cond); color: rgba(var(--chalk-rgb), .55);
}
.field .los { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--you); transform: translateX(-1px); }
.field .ball {
  position: absolute; top: 13px; width: 26px; height: 15px; transform: translateX(-50%);
  background: #8a4b2a; border-radius: 50%; box-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}
.field .ball::after { content: ''; position: absolute; left: 7px; right: 7px; top: 7px; height: 1.5px; background: #f3e9dc; }
@media (prefers-reduced-motion: no-preference) {
  .field .ball, .field .los { transition: left .6s cubic-bezier(.2, .8, .2, 1); }
}
.fieldnote { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--dim); }
.fieldnote b { font: 700 18px/1 var(--cond); color: var(--chalk); }

.fix { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; }
.fix strong { color: var(--good); font-weight: 600; }
.fix p { margin: 4px 0 0; color: var(--dim); font-size: 14px; }

/* ---------- alerts ---------- */
.alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; }
.alerts li { background: var(--turf-2); padding: 11px 14px 11px 16px; font-size: 15px; border-left: 3px solid var(--dim); }
.alerts li.lvl-bad { border-left-color: var(--bad); }
.alerts li.lvl-warn { border-left-color: var(--warn); }
.alerts li.lvl-info { border-left-color: var(--you); }

/* ---------- player rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; }
.row + .row { border-top: 1px solid var(--line); }
.slot { font: 600 14px/1 var(--cond); color: var(--dim); text-align: center; letter-spacing: .03em; }
.row.change .slot { color: var(--good); }
.pname { font-weight: 600; font-size: 16px; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; font-size: 13px; color: var(--dim); }
.pos { font: 700 12px/1 var(--cond); letter-spacing: .04em; }
.pos.QB { color: var(--pos-qb); } .pos.RB { color: var(--pos-rb); } .pos.WR { color: var(--pos-wr); }
.pos.TE { color: var(--pos-te); } .pos.K { color: var(--pos-k); } .pos.DST { color: var(--pos-dst); }
.flag { font: 700 12px/1 var(--cond); padding: 3px 5px 2px; border-radius: 4px; letter-spacing: .04em; }
.flag.Q, .flag.D { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.flag.O, .flag.IR, .flag.SUS, .flag.BYE { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.flag.START { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.flag.HOT { background: color-mix(in srgb, #ff8a3d 20%, transparent); color: #ffa060; }
.pts { text-align: right; font: 700 22px/1 var(--cond); }
.pts small { display: block; margin-top: 3px; font: 500 12px/1 var(--body); color: var(--dim); }
.pts.up { color: var(--good); }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 10px; border-top: 1px solid var(--chalk); }
.total span:first-child { color: var(--dim); font-size: 14px; }
.total .n { font-size: 26px; color: var(--you); }

/* ---------- pickups & trades ---------- */
.move { background: var(--turf-2); border-radius: 16px; padding: 14px; }
.move + .move { margin-top: 10px; }
.move-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.gain { text-align: right; font: 700 30px/0.9 var(--cond); color: var(--good); }
.gain small { display: block; margin-top: 4px; font: 500 12px/1 var(--body); color: var(--dim); }
.why { margin: 10px 0 0; font-size: 15px; }
.why .dim { font-size: 14px; }
.drop { margin-top: 8px; padding: 9px 11px; background: var(--turf-3); border-radius: 10px; font-size: 15px; }
.drop .dim { display: block; font-size: 13px; margin-top: 2px; }
.signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.signal { font-size: 13px; padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line); color: var(--dim); }
.signal b { color: var(--chalk); font-weight: 600; }
details.take { margin-top: 10px; }
details.take summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--you); list-style: none; }
details.take summary::-webkit-details-marker { display: none; }
details.take summary::before { content: '+ '; }
details.take[open] summary::before { content: '− '; }
details.take p { margin: 6px 0 0; font-size: 15px; line-height: 1.5; max-width: 62ch; }
.status { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--dim); }

.verdict { font: 700 13px/1.1 var(--cond); letter-spacing: .03em; text-align: center; padding: 6px 4px; border-radius: 6px; }
.verdict.swap, .verdict.safe { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.verdict.depth { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.verdict.keep { color: var(--dim); background: var(--turf-3); }
.row.drow { grid-template-columns: 74px minmax(0, 1fr) auto; }

.deal { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; margin: 10px 0; }
.deal > div { background: var(--turf-3); padding: 9px 11px; }
.deal .side-label { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.deal .give .side-label { color: var(--bad); } .deal .get .side-label { color: var(--good); }
.deal .pl { font-weight: 600; font-size: 15px; line-height: 1.3; }
.deal .pl + .pl { margin-top: 4px; }
.deal .pl .meta { margin-top: 0; }
.tally { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--dim); }
.tally b { font: 700 18px/1 var(--cond); color: var(--chalk); }
.tally b.good { color: var(--good); } .tally b.bad { color: var(--bad); }
.deal-team { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.deal-team b { font: 600 18px/1.2 var(--cond); }

select {
  width: 100%; padding: 11px 12px; margin-bottom: 12px; border-radius: 10px;
  background: var(--turf-3); border: 1px solid var(--line);
}
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick h3 { font: 600 16px/1 var(--cond); margin: 0 0 8px; }
.pick .give-h { color: var(--bad); } .pick .get-h { color: var(--good); }
.chip {
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px; width: 100%;
  text-align: left; padding: 8px 10px; margin-bottom: 6px; border-radius: 9px; cursor: pointer;
  background: var(--turf-3); border: 1px solid transparent; font-size: 14px; line-height: 1.25;
}
.chip .n { color: var(--dim); }
.chip.on { border-color: var(--you); background: color-mix(in srgb, var(--you) 12%, var(--turf-3)); }
.result { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--turf-3); }
.result h3 { margin: 0 0 6px; font: 600 19px/1.2 var(--cond); }

/* ---------- league ---------- */
.outlook { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 16px; overflow: hidden; }
.outlook > div { background: var(--turf-2); padding: 12px; }
.outlook .n { display: block; font-size: 34px; line-height: 1; font-weight: 700; }
.outlook span:last-child { font-size: 13px; color: var(--dim); }
.ifs { font-size: 15px; margin: 12px 0 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { font: 600 14px/1 var(--cond); color: var(--dim); text-align: right; padding: 12px 4px 8px; white-space: nowrap; }
.tbl td { text-align: right; padding: 10px 4px; border-top: 1px solid var(--line); white-space: nowrap; font-family: var(--cond); font-size: 17px; font-weight: 500; }
.tbl th:nth-child(-n+2), .tbl td:nth-child(-n+2) { text-align: left; }
.tbl td.team { font: 600 15px/1.2 var(--body); max-width: 128px; overflow: hidden; text-overflow: ellipsis; }
.tbl td.rank { color: var(--dim); width: 24px; }
.tbl tr.me td { color: var(--you); }
@media (max-width: 420px) {
  .tbl th:nth-child(7), .tbl td:nth-child(7) { display: none; }
  .tbl td { font-size: 16px; padding: 10px 3px; }
  .tbl td.team { max-width: 104px; font-size: 14px; }
}
.odds { display: grid; gap: 9px; padding: 12px 0; }
.odd { display: grid; grid-template-columns: minmax(0, 1fr) 34% 46px; gap: 10px; align-items: center; font-size: 15px; }
.odd .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.odd .t .dim { font-weight: 400; }
.odd .track { height: 8px; background: var(--turf-3); border-radius: 2px; overflow: hidden; position: relative; }
.odd .track i { display: block; height: 100%; background: var(--dim); }
.odd .track .cut { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 1px; background: var(--chalk); opacity: .25; }
.odd.me .t, .odd.me .p { color: var(--you); }
.odd.me .track i { background: var(--you); }
.odd .p { text-align: right; font: 700 18px/1 var(--cond); }
.empty { text-align: center; color: var(--dim); padding: 28px 12px; }
.foot { text-align: center; font-size: 13px; color: var(--dim); margin-top: 32px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 20; max-width: min(92vw, 460px); padding: 11px 14px; border-radius: 12px;
  background: var(--turf-3); border: 1px solid var(--line); font-size: 15px; box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
}
.toast a { margin-left: 6px; }

/* ---------- setup sheet ---------- */
.sheet {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto;
  border: 1px solid var(--line); border-radius: 18px; padding: 20px 18px 16px;
  background: var(--turf-2); color: var(--chalk);
}
.sheet::backdrop { background: rgba(8, 3, 16, .72); }
.sheet h2 { margin: 0 0 8px; }
.sheet p, .sheet li { font-size: 15px; }
.sheet ol { padding-left: 20px; margin: 10px 0 14px; display: grid; gap: 6px; }
.sheet label { display: block; font-weight: 600; margin-bottom: 6px; }
.sheet input { width: 100%; padding: 11px 12px; border-radius: 10px; background: var(--turf); border: 1px solid var(--line); }
.sheet .fine { font-size: 13px; color: var(--dim); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 12px; }
.sheet-actions a { margin-right: auto; font-size: 14px; }
.primary, .ghost { border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer; }
.primary { background: var(--you); color: #1a1400; border: 0; }
.ghost { background: none; border: 1px solid var(--line); }
.sheet-actions a.ghost { border: 0; padding: 0; color: var(--you); }

/* ---------- bottom nav ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--turf) 95%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.tabs button {
  border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 3px;
  padding: 6px 0; font: 600 14px/1 var(--cond); letter-spacing: .02em; color: var(--dim);
}
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--you); }

@media (min-width: 760px) {
  body { padding-bottom: 0; display: flex; flex-direction: column; min-height: 100vh; }
  .top { order: 0; } .tabs { order: 1; } main { order: 2; width: 100%; }
  .top { padding-left: max(16px, calc(50vw - 344px)); padding-right: max(16px, calc(50vw - 344px)); }
  .tabs {
    position: static; max-width: 720px; margin: 0 auto; background: none; border: 0;
    grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px; padding: 14px 16px 0; backdrop-filter: none;
  }
  .tabs button { grid-auto-flow: column; gap: 6px; padding: 8px 12px; border-radius: 8px; font-size: 16px; }
  .tabs button.on { background: var(--turf-2); }
  .tabs svg { width: 18px; height: 18px; }
  .toast { bottom: 24px; }
}

/* ---------- player names are buttons ---------- */
.plink {
  border: 0; background: none; padding: 0; margin: 0; cursor: pointer; text-align: left;
  font: inherit; font-weight: 600; color: inherit;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--chalk) 25%, transparent);
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.plink:hover { text-decoration-color: var(--you); }

/* ---------- player panel ---------- */
.pp-sheet {
  width: min(600px, 100vw); max-width: 100vw; max-height: 92vh; padding: 0;
  margin: auto auto 0; border-radius: 20px 20px 0 0; border-bottom: 0;
}
@media (min-width: 760px) { .pp-sheet { margin: auto; border-radius: 20px; border-bottom: 1px solid var(--line); } }
.pp { padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); }
.pp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.pp-head h2 { margin: 0 0 4px; font: 700 28px/1.05 var(--cond); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.close { border: 0; background: var(--turf-3); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 15px; color: var(--dim); }
.pp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; margin: 14px 0 4px; }
.pp-keys > div { background: var(--turf-3); padding: 10px 12px; }
.pp-keys .n { display: block; font-size: 28px; line-height: 1; font-weight: 700; }
.pp-keys span:last-child { font-size: 13px; color: var(--dim); }

.ps { padding: 18px 0 4px; border-top: 1px solid var(--line); margin-top: 14px; }
.ps h3 { margin: 0 0 4px; font: 600 21px/1.1 var(--cond); }
.ps-sum { margin: 0 0 10px; font-size: 15px; max-width: 62ch; }
.ps-sum .dim { display: block; font-size: 13px; margin-top: 2px; }
.ps-note { font-size: 13px; color: var(--dim); margin: 8px 0 10px; }
.range { display: grid; grid-template-columns: 1fr 1.2fr 1fr; text-align: center; align-items: end; gap: 6px; margin-top: 8px; }
.range .n { display: block; font-size: 30px; line-height: 1; font-weight: 700; }
.range .mid .n { font-size: 44px; color: var(--you); }
.range span:last-child { font-size: 13px; color: var(--dim); }
.rates { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 15px; }
.rates b { font: 700 18px/1 var(--cond); }

.chart { width: 100%; height: auto; display: block; margin-top: 4px; overflow: visible; }
.chart .hit { fill: transparent; }
.chart .b-pts { fill: var(--you); }
.chart .b-snap { fill: var(--them); }
.chart .b-use { fill: var(--pos-rb); }
.chart .tick { stroke: var(--chalk); stroke-width: 2; stroke-linecap: round; }
.chart .wk, .chart .na { font: 600 11px var(--cond); fill: var(--dim); text-anchor: middle; }
.chart .val { font: 600 12px var(--cond); fill: var(--chalk); text-anchor: middle; }
.chart .bar { cursor: pointer; outline: none; }
.chart .bar.on .hit, .chart .bar:focus-visible .hit { fill: rgba(var(--chalk-rgb), .06); }
.chart .bar.on .wk { fill: var(--chalk); }
.readout { font-size: 14px; color: var(--dim); margin: 6px 0 0; min-height: 1.4em; }

.wk-tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.wk-tbl th { font: 600 14px/1 var(--cond); color: var(--dim); text-align: right; padding: 0 4px 8px; }
.wk-tbl td { text-align: right; padding: 7px 4px; font: 500 17px/1.1 var(--cond); border-top: 1px solid var(--line); }
.wk-tbl th:nth-child(-n+2), .wk-tbl td:nth-child(-n+2) { text-align: left; }
.wk-tbl tr.stat td { border-top: 0; padding-top: 0; font: 400 13px/1.3 var(--body); color: var(--dim); text-align: left; }
.wk-tbl tr.dnp td { color: var(--dim); }
.wk-tbl tr.dnp td:last-child { text-align: left; font: 400 14px var(--body); }

.sched { list-style: none; padding: 0; margin: 0; }
.sched li { display: grid; grid-template-columns: 40px 60px 1fr; gap: 8px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.sched li:first-child { border-top: 0; }
.sched .wkn { font: 600 15px var(--cond); color: var(--dim); }
.sched li > span:nth-child(2) { font: 600 17px var(--cond); }
.ease { text-align: right; font-weight: 600; }
.ease.easy { color: var(--good); } .ease.tough { color: var(--bad); } .ease.average { color: var(--chalk); }
.ease .dim { font-weight: 400; font-size: 13px; margin-left: 4px; }

/* ---------- available players ---------- */
.avail-controls { display: grid; gap: 8px; margin-bottom: 10px; }
.avail-controls .seg { background: var(--turf-2); border-radius: 10px; padding: 3px; gap: 2px; }
.avail-controls .seg button { border-bottom: 0; border-radius: 8px; padding: 8px 4px; font-size: 16px; }
.avail-controls .seg button.on { background: var(--turf-3); color: var(--you); }
.sort-seg button { font-size: 15px; }
.row.arow { grid-template-columns: 26px minmax(0, 1fr) auto; }
.row.arow .slot { font-size: 15px; }
.pts small.sub { margin-top: 4px; font-size: 11px; }

.row.ir-bad .slot { color: var(--bad); }

/* ---------- Open in ESPN shortcuts ---------- */
.espn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 12px; }
.espn-row .status { margin-top: 0; flex: 1 1 160px; }
.espn-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--turf-3);
  font: 600 14px/1 var(--body); color: var(--chalk); text-decoration: none; white-space: nowrap;
}
.espn-btn::after {   /* small "opens elsewhere" arrow */
  content: ''; width: 7px; height: 7px; border-top: 1.6px solid var(--you); border-right: 1.6px solid var(--you); transform: rotate(45deg) translate(-1px, 1px);
}
.espn-btn:active { background: var(--line); }
.matchup .espn-row { justify-content: flex-start; }
h2.h-espn { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
h2.h-espn .espn-btn { font-size: 13px; padding: 6px 10px; }
.matchup .espn-row { flex-wrap: nowrap; }
.matchup .espn-btn { font-size: 13px; padding: 7px 10px; }

/* ---------- game day ---------- */
.flag.LIVE { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.flag.FINAL { background: var(--turf-3); color: var(--dim); }
h2 .flag { font-size: 13px; vertical-align: middle; margin-left: 6px; }
.row.locked .slot::after { content: ''; display: block; width: 8px; height: 8px; margin: 4px auto 0; border-radius: 2px; border: 1.5px solid var(--dim); border-top-width: 3px; }
.sofar { font-size: 13px; color: var(--dim); margin-top: 4px; }
.livenote { margin: 10px 0 0; font-size: 13px; color: var(--dim); }

/* ---------- old-data banner ---------- */
.stale { background: color-mix(in srgb, var(--warn) 14%, var(--turf-2)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.stale b { color: var(--warn); }
.stale p { margin: 4px 0 0; font-size: 14px; color: var(--dim); }
.stale a { color: var(--chalk); }

/* ---------- opponent preview, playoffs, waiver priority ---------- */
details.opp { padding: 12px 14px; }
details.opp summary { cursor: pointer; list-style: none; font-size: 16px; }
details.opp summary::-webkit-details-marker { display: none; }
details.opp summary::after { content: 'Show lineup'; float: right; font-size: 13px; color: var(--you); font-weight: 600; }
details.opp[open] summary::after { content: 'Hide'; }
.po-tbl td.ease { text-align: center; font: 600 15px var(--cond); }
.po-tbl th:nth-child(n+3) { text-align: center; }
.po-tbl td.ease.easy { color: var(--good); } .po-tbl td.ease.tough { color: var(--bad); } .po-tbl td.ease.bye { color: var(--warn); }
.po-tbl td.ease.average { color: var(--chalk); }
.po-tbl .plink { font-size: 14px; }
.wpri { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: var(--turf-2); border-radius: 14px; padding: 12px 14px; margin: 4px 0 6px; font-size: 15px; }
.wpri .n { font-size: 34px; font-weight: 700; color: var(--you); line-height: 1; }
.wpri p { margin: 3px 0 0; font-size: 13px; color: var(--dim); }

/* ---------- compact waivers ---------- */
/* Badges stay on one line; on a narrow screen the row scrolls sideways. */
.signals { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.signals::-webkit-scrollbar { display: none; }
.signal { white-space: nowrap; flex: none; }
.drop.shared { margin: 0 0 10px; }
/* Pickups after the top 3: one row, tap to open the full card. */
details.move.more { padding: 10px 14px; }
details.move.more > summary { list-style: none; cursor: pointer; }
details.move.more > summary::-webkit-details-marker { display: none; }
details.move.more .gain { font-size: 24px; }
details.move.more:not([open]) .gain small::after { content: ' ▾'; }
details.move.more[open] { padding: 14px; }
/* Slightly tighter player rows. */
.row { padding: 9px 0; }
.signal { font-size: 12px; padding: 3px 8px; }
.signals { gap: 5px; }
details.more-rows > summary { list-style: none; cursor: pointer; padding: 10px 0 2px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--you); }
details.more-rows > summary::-webkit-details-marker { display: none; }
details.more-rows > summary::after { content: ' ▾'; }
details.more-rows[open] > summary { display: none; }

/* ---------- score ticker ---------- */
.ticker { margin: 8px -16px -4px; }
.ticker > ul { display: flex; gap: 6px; margin: 0; padding: 0 16px 2px; list-style: none; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.ticker > ul::-webkit-scrollbar { display: none; }
.tk { flex: none; min-width: 92px; padding: 5px 9px 4px; border-radius: 10px; background: var(--turf-2); border: 1px solid var(--line); scroll-snap-align: start; font-size: 13px; }
.tk.has-me { border-color: color-mix(in srgb, var(--you) 45%, var(--line)); }
.tk.in.rz { box-shadow: inset 0 -2px 0 var(--bad); }
.tk-teams { display: grid; gap: 1px; }
.tk-team { display: flex; justify-content: space-between; gap: 10px; font: 600 14px/1.15 var(--cond); letter-spacing: .02em; color: var(--chalk); }
.tk-team b { font-weight: 700; }
.tk.post .tk-team { color: var(--dim); }
.tk.post .tk-team.won { color: var(--chalk); }
.tk-ab { display: inline-flex; align-items: center; gap: 4px; }
.tk-ball { width: 7px; height: 5px; border-radius: 50%; background: var(--warn); display: inline-block; }
.tk-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--dim); white-space: nowrap; }
.tk.in .tk-when { color: var(--good); font-weight: 600; }
.tk-when em { font-style: normal; color: var(--bad); }
.tk-dots { display: inline-flex; gap: 3px; }
.tk-me, .tk-opp { min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; display: inline-grid; place-items: center; font: 700 10px/1 var(--body); color: var(--turf); }
.tk-me { background: var(--you); }
.tk-opp { background: var(--them); }
.tk { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tk.open { border-color: var(--you); background: var(--turf-3); }
.tk-detail { margin: 8px 16px 2px; padding: 10px 12px; border-radius: 12px; background: var(--turf-2); border: 1px solid var(--line); font-size: 14px; max-height: 45vh; overflow-y: auto; }
.tkd-title { font: 600 14px/1.2 var(--cond); letter-spacing: .02em; color: var(--dim); margin-bottom: 6px; }
.tkd-side + .tkd-side { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.tkd-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 2px; }
.tkd-side.me .tkd-head b, .tkd-side.me .tkd-head span { color: var(--you); }
.tkd-side.opp .tkd-head b, .tkd-side.opp .tkd-head span { color: var(--them); }
.tk-detail ul { list-style: none; margin: 0; padding: 0; }
.tk-detail li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 8px; padding: 3px 0; }
.tk-detail li.bench { color: var(--dim); }
.tkd-pos { font-size: 12px; color: var(--dim); align-self: center; }
.tkd-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tkd-pts { font: 700 15px/1.3 var(--cond); }
.tkd-pts small { font: 500 11px var(--body); color: var(--dim); }
.tkd-none, .tkd-note { margin: 4px 0 0; font-size: 12px; color: var(--dim); }
