:root {
  --bg: #0E1116; --surface: #161A21; --surface2: #1D232C; --line: #2A313C; --line2: #222832;
  --text: #E8EAED; --muted: #9AA3AE; --soft: #C3C9D1;
  --accent: #C6F24E; --accent-hi: #E2FF8F; --accent-bg: #2B3A12; --accent-fg: #D7F77E;
  --neg: #FF9A5C; --neg-bg: #3A2A1F; --neg-fg: #FFB27F;
  --info: #7CC4FF; --info-bg: #1D2B3A; --info-fg: #9CD2FF;
  --ok-bg: #1F2A22; --ok-fg: #9FE0A8; --bar: #4A5563; --bar2: #5B6675;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; }
a { color: var(--accent); } a:hover { color: var(--accent-hi); }
button { font: inherit; color: inherit; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .soft { color: var(--soft); }
.pos { color: var(--accent); } .negc { color: var(--neg); } .infoc { color: var(--info); }

header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  padding: 10px 32px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(14,17,22,.96);
  backdrop-filter: blur(6px); z-index: 10; }
.brand { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text); text-decoration: none; }
.brand span { color: var(--accent); }
.left { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
nav.main { display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a { padding: 12px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--muted); }
nav.main a.on { color: var(--text); background: var(--surface2); font-weight: 600; }
.chips { display: flex; gap: 14px; align-items: center; flex-wrap: nowrap; min-width: 0; font-size: 13px; color: var(--muted); }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; }
.iconbtn { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--soft); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.iconbtn:hover { border-color: var(--bar2); color: var(--text); }

main { max-width: 1360px; margin: 0 auto; padding: 28px 32px 64px; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 4px 0 6px; font-family: var(--display); font-weight: 700; font-size: 50px; line-height: 1; text-transform: uppercase; }
h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 24px; text-transform: uppercase; letter-spacing: .02em; }
.hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 10px; background: var(--accent); color: #0E1116; font-weight: 600; font-size: 15px; text-decoration: none;
  border: 0; cursor: pointer; }
.btn:hover { background: var(--accent-hi); color: #0E1116; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--bar2); }
.btn[disabled] { opacity: .5; cursor: default; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cardhead { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.cardhead .muted { font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.grow { flex: 999 1 560px; min-width: 0; }
.side { flex: 1 1 360px; min-width: 0; }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.tile { background: var(--surface2); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile .lbl { font-size: 12px; color: var(--muted); }
.tile .val { font-family: var(--mono); font-size: 24px; }

.score .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.score .lbl { font-size: 13px; font-weight: 600; color: var(--soft); }
.score .big { font-family: var(--mono); font-size: 38px; font-weight: 500; letter-spacing: -.02em; }
.badge { font-size: 12px; padding: 3px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.b-good { background: var(--accent-bg); color: var(--accent-fg); }
.b-bad { background: var(--neg-bg); color: var(--neg-fg); }
.b-mid { background: var(--line); color: var(--soft); }
.b-info { background: var(--info-bg); color: var(--info-fg); }
.b-ok { background: var(--ok-bg); color: var(--ok-fg); }
.range { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.range .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.range .tick { position: absolute; top: -4px; width: 2px; height: 14px; background: var(--muted); }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 10px; flex-wrap: wrap; }
.seg button { flex: 1; min-height: 38px; padding: 0 12px; border: 0; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; background: transparent; color: var(--muted); white-space: nowrap; }
.seg button.on { background: var(--line); color: var(--text); }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 500;
  padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
td.r, th.r { text-align: right; }
tfoot td { border-bottom: 0; font-weight: 600; }
.slot { display: inline-block; min-width: 44px; text-align: center; padding: 3px 6px; border-radius: 6px; background: var(--surface2);
  font-size: 12px; font-weight: 600; color: var(--soft); }
.plink { color: var(--text); text-decoration: none; font-weight: 500; }
.plink:hover { color: var(--accent); }
.sub { color: var(--muted); font-size: 12px; }
.rbar { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.rbar .lo, .rbar .hi { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 34px; }
.rbar .lo { text-align: right; }
.rbar .track { position: relative; flex: 1; height: 6px; background: var(--line); border-radius: 3px; }
.rbar .span { position: absolute; top: 0; bottom: 0; background: var(--bar); border-radius: 3px; }
.rbar .med { position: absolute; top: -3px; width: 3px; height: 12px; background: var(--accent); border-radius: 2px; }

.lt-row { display: grid; grid-template-columns: 24px minmax(0, 1.2fr) minmax(0, 1fr) 52px; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 8px; font-size: 13px; }
.lt-row.you { background: var(--surface2); font-weight: 600; }
.lt-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.hbar > div { height: 8px; border-radius: 4px; }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 10px; background: var(--surface2); font-size: 14px; line-height: 1.5; color: var(--soft); }
.callout strong { color: var(--text); }
.benchgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.bitem { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--surface2); min-width: 0; }
.bitem.drop { border-color: #6B4126; }
.bitem .v { font-family: var(--mono); font-size: 20px; width: 48px; }

.hist { display: flex; align-items: flex-end; gap: 4px; height: 140px; border-bottom: 1px solid var(--line); }
.hist div { flex: 1; border-radius: 4px 4px 0 0; }
.axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.vbars { display: grid; gap: 14px; align-items: end; height: 180px; border-bottom: 1px solid var(--line); }
.vbars .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.vbars .col div { width: 100%; max-width: 64px; border-radius: 6px 6px 0 0; }
.vlabels { display: grid; gap: 14px; text-align: center; font-size: 12px; color: var(--muted); }

.wrow { display: grid; grid-template-columns: minmax(0, 1fr) 110px 60px 86px; gap: 12px; align-items: center; width: 100%;
  text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.wrow:hover { border-color: var(--bar2); }
.wrow.on { border-color: var(--accent); background: var(--surface2); }
.whead { display: grid; grid-template-columns: minmax(0, 1fr) 110px 60px 86px; gap: 12px; padding: 0 16px; font-size: 11px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 36px; }
.spark span { flex: 1; border-radius: 3px 3px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--soft); }
.check i { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #0E1116; font-size: 12px; font-weight: 700; font-style: normal; }
.cmp { display: grid; grid-template-columns: 120px minmax(0, 1fr) 100px; gap: 10px; align-items: center; font-size: 13px; }
.cmp .track { position: relative; height: 8px; background: var(--line); border-radius: 4px; }
.cmp .track div { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.sticky { position: sticky; top: 80px; }

.scoreboard { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.team-col { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.team-col .tn { font-family: var(--display); font-weight: 700; font-size: 32px; text-transform: uppercase; line-height: 1; }
.team-col .tp { font-family: var(--mono); font-size: 46px; }
.wp { flex: 1 1 260px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wp .pct { font-family: var(--mono); font-size: 54px; line-height: 1; }
.wpbar { width: 100%; max-width: 320px; height: 12px; border-radius: 6px; background: var(--info); overflow: hidden; }
.wpbar div { height: 12px; background: var(--accent); }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 52px 56px 150px 52px minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 10px 6px; border-bottom: 1px solid var(--line2); }
.edge { position: relative; height: 10px; background: var(--surface2); border-radius: 5px; }
.edge .mid { position: absolute; top: -3px; bottom: -3px; left: 50%; width: 1px; background: var(--bar); }
.edge .b { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
select { min-height: 44px; width: 100%; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2);
  color: var(--text); font: inherit; font-size: 14px; }
input[type=text], input[type=search], input[type=password], textarea {
  min-height: 44px; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2);
  color: var(--text); font: inherit; font-size: 14px; }
textarea { min-height: 96px; font-family: var(--mono); font-size: 12px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--soft); }
.watch { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface2); }
.watch .t { flex: none; font-size: 11px; font-weight: 700; padding: 2px 6px; height: fit-content; border-radius: 6px; color: #0E1116; }

.loading { padding: 80px 0; text-align: center; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { padding: 16px; border-radius: 12px; background: var(--neg-bg); color: var(--neg-fg); line-height: 1.5; }
.err a { color: #FFD3B5; }
.empty { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
.prow { cursor: pointer; }
.prow:hover td { background: var(--surface2); }

@media (max-width: 760px) {
  header.top { padding: 8px 16px; position: static; }
  main { padding: 20px 16px 48px; }
  h1 { font-size: 36px; }
  .wrow, .whead { grid-template-columns: minmax(0, 1fr) 70px 70px; }
  .wrow .spark, .whead .sparkh { display: none; }
  .mrow { grid-template-columns: minmax(0, 1.3fr) 40px 40px minmax(0, 1fr); gap: 6px; }
  .mrow select { font-size: 12px !important; }
  .mrow > .num { text-align: center !important; font-size: 13px; }
  .mrow .edge, .mrow .slotc { display: none; }
  .team-col .tp { font-size: 36px; }
  .chips .chip.hide-sm, .chips .hide-sm { display: none; }
  .sticky { position: static; }
}

/* ---------- player card modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(5, 7, 10, .72); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 24px; overflow-y: auto; }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: 100%; max-width: 1080px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.modal-x { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface2); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.modal-x:hover { border-color: var(--bar2); }
body.noscroll { overflow: hidden; }
.hist .hmark { position: absolute; top: -6px; bottom: 0; width: 2px; background: var(--info); }
.hist .hmark span { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-family: var(--mono);
  font-size: 12px; color: var(--info-fg); background: var(--info-bg); padding: 1px 6px; border-radius: 6px; }
.hist { margin-top: 22px; }
.rbar .act { position: absolute; top: -4px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--info);
  border: 2px solid var(--surface); }

/* ---------- recommendations ---------- */
.rec { border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.rec.on { border-color: var(--accent); }
.rec-top { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; align-items: flex-start; }
.rec-body { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px; }
.linkbtn { border: 0; background: none; color: var(--accent); cursor: pointer; font-size: 13px; padding: 6px 0; min-height: 32px; text-decoration: underline; }

/* ---------- league scoreboard ---------- */
.sbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sb { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-width: 0; }
.sb:hover { border-color: var(--bar2); }
.sb.on { border-color: var(--accent); background: var(--surface2); }
.sb-team { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14px; min-width: 0; }
.sb-score { font-size: 18px; font-weight: 500; }
.chip.live { color: #0E1116; background: var(--accent); border-color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #0E1116; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .chip.live .dot { animation: none; } }
.mrow { grid-template-columns: minmax(0, 1fr) 64px 52px 120px 64px minmax(0, 1fr); padding: 12px 6px; }

@media (max-width: 760px) {
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; min-height: 100%; padding: 20px 16px; }
  .mrow { grid-template-columns: minmax(0, 1fr) 46px 46px minmax(0, 1fr); }
}

/* players page: full-width table that scrolls on its own */
#plist .tbl-wrap { max-height: calc(100vh - 260px); min-height: 420px; overflow: auto; }
#plist thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
@media (max-width: 760px) { #plist .tbl-wrap { max-height: 70vh; min-height: 0; } }
@media (max-width: 760px) {
  .mrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "lp rp" "lc rc"; row-gap: 4px; column-gap: 12px; }
  .mrow > :nth-child(1) { grid-area: lc; }
  .mrow > :nth-child(2) { grid-area: lp; text-align: left !important; }
  .mrow > :nth-child(3), .mrow > :nth-child(4) { display: none; }
  .mrow > :nth-child(5) { grid-area: rp; text-align: right; }
  .mrow > :nth-child(6) { grid-area: rc; }
  .mrow .badge { white-space: normal; }
}

/* player card: same section spacing as pages */
#pmodal-body { display: flex; flex-direction: column; gap: 22px; }
#pmodal-body > .row { gap: 16px; }
/* matchup: per-team win chance, live badge */
.winpill { display: inline-flex; align-items: baseline; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface2); border: 1px solid var(--line); font-size: 13px; color: var(--soft); }
.winpill .num { font-size: 22px; color: var(--text); }
.winpill.fav { background: var(--accent-bg); border-color: #4F6B1B; color: var(--accent-fg); }
.winpill.fav .num { color: var(--accent-hi); }
.wp .vs { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--muted); letter-spacing: .08em; }
.b-live { background: #3A1820; color: #FF9EB0; display: inline-flex; align-items: center; gap: 5px; }
.b-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #FF6B86; animation: pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .b-live .dot { animation: none; } }
.ptcell { display: inline-flex; flex-direction: column; align-items: inherit; line-height: 1.15; }
.mrow > span:nth-child(2) .ptcell { align-items: flex-end; }
.projsm { font-family: var(--mono); font-size: 11px; color: var(--info-fg); opacity: .85; white-space: nowrap; }
@media (max-width: 760px) { .mrow > span:nth-child(2) .ptcell { align-items: flex-start; } }

/* ---------- time zone chip ---------- */
.tzchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 12px; }
.tzchip select { min-height: 30px; width: auto; border: 0; background: transparent; padding: 0 4px; font-size: 13px; }

/* ---------- availability watch: compact rows that expand ---------- */
.watch-d { border-radius: 10px; background: var(--surface2); }
.watch-d summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto 14px; align-items: center; gap: 10px;
  padding: 10px 12px; min-height: 44px; cursor: pointer; border-radius: 10px; }
.watch-d summary::-webkit-details-marker { display: none; }
.watch-d summary:hover { background: var(--line2); }
.watch-d summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.watch-d .wtags { display: flex; gap: 4px; }
.watch-d .t { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; color: #0E1116; }
.watch-d .wname { font-size: 14px; font-weight: 500; }
.watch-d .wrole { font-size: 12px; color: var(--muted); white-space: nowrap; }
.watch-d .wrole.start { color: var(--text); font-weight: 600; }
.watch-d .chev { color: var(--muted); transition: transform .15s; }
.watch-d[open] .chev { transform: rotate(180deg); }
.watch-d .wbody { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; font-size: 13px; line-height: 1.5; color: var(--soft); }
.watch-d .wbody a { font-size: 13px; color: var(--accent); align-self: flex-start; }

/* ---------- matchup rows: more room, no overlapping ---------- */
.mrow { grid-template-columns: minmax(0, 1fr) 76px 56px 110px 76px minmax(0, 1fr); column-gap: 16px; padding: 14px 6px; }
.mrow .badge { white-space: nowrap; max-width: 100%; line-height: 1.35; }
.mrow > span:first-child, .mrow > span:last-child { min-width: 0; gap: 4px !important; }
.mrow .ell { max-width: 100%; display: block; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.mrow .swapnote { color: var(--neg-fg); font-size: 12px; }
.mrow > span:nth-child(5) .ptcell { align-items: flex-start; }
.mwrap { display: flex; flex-direction: column; }
@media (max-width: 760px) {
  .mrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; padding: 14px 4px; }
}

/* ---------- bench & coverage ---------- */
.role { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; color: var(--soft); cursor: help; }
.role i { width: 8px; height: 8px; border-radius: 50%; background: var(--bar2); flex: none; }
.role-good i { background: var(--accent); } .role-good { color: var(--text); }
.role-info i { background: var(--info); }
.role-bad i { background: var(--neg); } .role-bad { color: var(--neg-fg); }
tr.row-flag td { background: rgba(255, 154, 92, .05); }
.covtbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.covtbl td { padding: 10px 8px; vertical-align: top; }
.covtbl .cov-w { color: var(--soft); white-space: nowrap; width: 64px; border-bottom: 1px solid var(--line2); }
.covtbl tr:last-child td { border-bottom: 0; }
.hole { color: var(--neg-fg); }
@media (max-width: 760px) { .hide-sm { display: none; } }
.benchtbl { min-width: 520px; }
.benchtbl td, .covtbl td { padding-top: 10px; padding-bottom: 10px; }
.benchtbl .sub, .covtbl .sub { margin-top: 2px; }
@media (max-width: 760px) {
  .benchtbl { min-width: 0; }
  .benchtbl th, .benchtbl td { padding-left: 6px; padding-right: 6px; }
  .benchtbl .role { white-space: normal; font-size: 12px; }
}
/* not played yet: projection, not a score */
.num.pending { color: var(--muted); font-style: italic; font-weight: 400; }

/* ---------- trades ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.tf { gap: 14px; }
.tf-swap { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.tf-arrow { font-size: 20px; color: var(--muted); text-align: center; padding-top: 22px; }
.tp { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.tp + .tp { border-top: 1px solid var(--line2); }
.tf-fits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tf-fit { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--surface2); }
.tf-why { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--soft); }
.pick { display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; margin: -4px -6px 0; }
.pick-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 8px; cursor: pointer; min-height: 44px; }
.pick-row:hover { background: var(--surface2); }
.pick-row.on { background: var(--accent-bg); }
.pick-row input { width: 18px; height: 18px; accent-color: #C6F24E; margin: 0; }
.pick-name { display: flex; flex-direction: column; min-width: 0; font-weight: 500; }
.pick-val { color: var(--soft); }
.ta-heads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ta-team { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: var(--surface2); }
.ta-tbl { min-width: 640px; }
.ta-tbl td { vertical-align: top; padding: 14px 10px; }
.ta-tbl td:first-child { width: 30%; }
.ta-tbl td div + div { margin-top: 3px; }
@media (max-width: 760px) {
  .tf-list { grid-template-columns: 1fr; }
  .ta-heads, .tf-fits { grid-template-columns: 1fr; }
  .tf-swap { grid-template-columns: 1fr; }
  .tf-arrow { padding: 0; transform: rotate(90deg); }
}
.picked { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pchip { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--accent-bg); color: var(--accent-fg); font-size: 13px; font-weight: 500; }
.pchip .sub { color: var(--accent-fg); opacity: .8; }
.pick { max-height: 460px; }
@media (max-width: 760px) {
  .ta-tbl { min-width: 0; }
  .ta-tbl thead { display: none; }
  .ta-tbl, .ta-tbl tbody, .ta-tbl tr, .ta-tbl td { display: block; width: auto !important; }
  .ta-tbl tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .ta-tbl td { border: 0; padding: 6px 2px; }
  .ta-tbl td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
}

/* ---------- off-limits players ---------- */
.lockcard { margin-bottom: 22px; gap: 12px; }
.lockchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--neg-bg); color: var(--neg-fg); font-size: 13px; font-weight: 500; }
.lchip .sub { color: var(--neg-fg); opacity: .8; }
.lchip button { border: 0; background: transparent; color: var(--neg-fg); font-size: 16px; line-height: 1; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.lchip button:hover { background: rgba(255,255,255,.08); }
.lockgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.lockrow { display: grid; grid-template-columns: 20px minmax(0, 1fr) 14px; gap: 10px; align-items: center; min-height: 40px; padding: 4px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.lockrow:hover { background: var(--surface2); }
.lockrow.on { background: var(--neg-bg); color: var(--neg-fg); }
.lockrow input { width: 18px; height: 18px; accent-color: #FF9A5C; margin: 0; }
.pick-row.locked { opacity: .55; cursor: not-allowed; }
.lockmark { color: var(--neg-fg); margin-right: 6px; vertical-align: -1px; }
.tf-near { border-style: dashed; }

/* ---------- buy low / sell high ---------- */
.mk-col { gap: 12px; }
.mk-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 12px; background: var(--surface2); }
.mk-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mk-head .plink { font-size: 16px; font-weight: 600; }
.mk-nums { display: grid; grid-template-columns: auto 18px auto 1fr; gap: 4px 14px; align-items: end; }
.mk-nums > div { display: flex; flex-direction: column; gap: 1px; }
.mk-nums .num { font-size: 22px; }
.mk-nums > div:last-child { justify-self: end; text-align: right; }
.mk-arrow { color: var(--muted); padding-bottom: 20px; }
.mk-why { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--soft); }
.mk-why li + li { margin-top: 3px; }
.mk-why li.caution { color: var(--neg-fg); }
.mk-btn { min-height: 40px; font-size: 14px; padding: 0 14px; }
.mk-btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) { .mk-nums { grid-template-columns: auto 18px auto; } .mk-nums > div:last-child { grid-column: 1 / -1; justify-self: start; text-align: left; } }

/* ---------- header: league name + profile menu ---------- */
.leaguename { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--soft);
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livedot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(198,242,78,.18); animation: pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .livedot { animation: none; } }
.profile { position: relative; }
.profbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 3px 12px 3px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 14px; font-weight: 500; }
.profbtn:hover, .profbtn[aria-expanded="true"] { border-color: var(--bar2); background: var(--surface2); }
.profbtn svg { color: var(--muted); transition: transform .15s; }
.profbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent-fg);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.profname { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profmenu { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 2px; z-index: 30; }
.profmenu[hidden] { display: none; }
.pm-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; font-size: 12px; }
.pm-head strong { font-size: 15px; color: var(--text); }
.pm-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--soft); text-decoration: none; font-size: 14px; cursor: pointer; text-align: left; }
.pm-item:hover, .pm-item:focus-visible { background: var(--surface2); color: var(--text); }
.pm-item svg { flex: none; color: var(--muted); }
.pm-stack { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; }
.pm-sub { font-size: 12px; color: var(--muted); }
.pm-field { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; font-size: 12px; color: var(--muted); }
.pm-field select { min-height: 36px; width: 100%; }
#signoutBtn { border-top: 1px solid var(--line2); border-radius: 0 0 8px 8px; margin-top: 4px; }
@media (max-width: 760px) {
  .leaguename { max-width: 46vw; font-size: 13px; }
  .profbtn { padding-right: 8px; }
  .profname { display: none; }
  .chips { width: 100%; justify-content: space-between; }
  .profmenu { width: min(300px, calc(100vw - 32px)); }
}

/* ---------- players: horizontal recommendation strip ---------- */
.recstrip { gap: 8px; padding: 14px 20px; }
.recstrip .cardhead h2 { font-size: 20px; }
.rectrack-wrap { position: relative; }
.rectrack { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 4px; padding: 2px 2px 6px;
  overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--bar) transparent; }
.rectrack:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.rectrack::-webkit-scrollbar { height: 8px; }
.rectrack::-webkit-scrollbar-thumb { background: var(--bar); border-radius: 8px; }
.reccard { flex: 0 0 200px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; border-radius: 10px;
  background: var(--surface2); border: 1px solid var(--line); min-width: 0; }
.reccard.good { border-color: rgba(198,242,78,.28); }
.reccard.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.reccard .plink { font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reccard .sub { font-size: 11px; }
.reccard .badge { font-size: 11px; padding: 2px 7px; }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc-top .badge { overflow: hidden; text-overflow: ellipsis; }
.rc-top .cmpchk { width: 16px; height: 16px; }
.rc-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rc-gain { display: flex; align-items: baseline; gap: 5px; }
.rc-gain .num { font-size: 20px; font-weight: 600; font-family: var(--display); line-height: 1; }
.rc-gain .spark { margin-left: auto; height: 18px; width: 52px; gap: 2px; align-self: flex-end; }
.rc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.rc-foot .linkbtn { padding: 0; min-height: 24px; font-size: 12px; flex: none; }
.recnav { position: absolute; top: 50%; transform: translateY(-60%); z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.recnav:hover { border-color: var(--bar2); }
.recnav.prev { left: -14px; } .recnav.next { right: -14px; }
.recnav[hidden] { display: none; }
#recdetail:empty { display: none; }
.recdet { border-top: 1px solid var(--line2); padding-top: 14px; }
@media (max-width: 760px) { .recnav { display: none; } .reccard { flex-basis: 64%; } }

/* compare checkboxes, tray */
.cmpchk { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; flex: none; }
.cmpchk:disabled { cursor: not-allowed; opacity: .35; }
th.ccol, td.ccol { width: 34px; padding-right: 0; }
.cmptray { position: sticky; bottom: 16px; z-index: 20; align-self: center; width: min(760px, 100%); display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--bar); box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.cmptray[hidden] { display: none; }
.cmpchips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; align-items: center; }
.cmpchips .pchip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; padding: 0 0 0 2px; min-height: 24px; }
.cmptray .btn { min-height: 40px; }
@media (max-width: 760px) { .cmptray { flex-wrap: wrap; bottom: 8px; } .cmpchips { flex-basis: 100%; } .cmptray .btn { flex: 1; } }

/* compare modal */
.verdict { display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.55; color: var(--soft); }
.verdict p { margin: 0; }
.verdict p:first-child { color: var(--text); font-weight: 500; font-size: 16px; }
.ctbl th[scope="col"] { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); font-weight: 600; vertical-align: bottom; padding-bottom: 12px; }
.ctbl th[scope="col"] .sub { font-weight: 400; margin-top: 2px; }
.ctbl th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--soft); font-weight: 400; border-bottom: 1px solid var(--line2); padding: 10px 8px; }
.ctbl th[scope="row"] .sub { font-size: 11px; }
.ctbl td { position: relative; width: 26%; }
.ctbl tr.cgrp th { padding: 18px 8px 6px; font-size: 11px; color: var(--accent); letter-spacing: .12em; border-bottom: 1px solid var(--line); }
.ctbl td.cwin { background: rgba(198,242,78,.07); color: var(--text); font-weight: 600; }
.cmark { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; background: var(--accent);
  color: #0E1116; font-size: 11px; font-weight: 700; vertical-align: 1px; }
@media (max-width: 760px) {
  .ctbl { font-size: 12px; table-layout: fixed; }
  .ctbl th, .ctbl td { white-space: normal; }
  .ctbl thead th:first-child { width: 30%; }
  .ctbl th[scope="row"] { font-size: 12px; padding: 8px 4px; }
  .ctbl th[scope="col"] { font-size: 13px; padding: 0 4px 10px; overflow-wrap: anywhere; }
  .ctbl th[scope="col"] .sub { font-size: 11px; }
  .ctbl td { width: auto; padding: 8px 4px; overflow-wrap: anywhere; }
  .ctbl td.cwin { color: var(--accent); }
  .cmark { display: none; }
}

/* ---------- headshots ---------- */
.face { flex: none; width: 26px; height: 26px; border-radius: 50%; object-fit: cover; object-position: center top; background: var(--surface2);
  border: 1px solid var(--line); vertical-align: middle; }
.face.logo { object-fit: contain; object-position: center; padding: 2px; background: #fff1; }
.face.xs { width: 20px; height: 20px; }
.face.sm { width: 30px; height: 30px; }
.face.md { width: 36px; height: 36px; }
.face.lg { width: 52px; height: 52px; display: block; margin-bottom: 8px; }
.face.xl { width: 84px; height: 84px; border-width: 2px; }
.plink { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; vertical-align: middle; }
.plink .pn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mrow .plink .pn { white-space: normal; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.who-hero { display: flex; gap: 18px; align-items: center; min-width: 0; }
.pick-name { flex-direction: row !important; align-items: center; gap: 10px; }
.pick-t { display: flex; flex-direction: column; min-width: 0; }
.pchip, .lchip { align-items: center; }
.pchip .face, .lchip .face { margin-left: -4px; }
@media (max-width: 760px) { .face.xl { width: 60px; height: 60px; } .who-hero { gap: 12px; } }
/* matchup lineups: headshots in a straight column on each outer edge */
.mcell { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.mcell.r { flex-direction: row-reverse; }
.mcell > .face { margin-top: 1px; }
@media (max-width: 760px) { .mcell { gap: 6px; } .mcell > .face { width: 24px; height: 24px; } }

/* No text caret or I-beam when clicking around: only real text boxes get them */
html, body { caret-color: transparent; cursor: default; }
input, textarea, [contenteditable="true"] { caret-color: auto; cursor: text; }
input[type="checkbox"], input[type="radio"], select, button, a[href], label, summary, .prow, [data-r], [data-id] { cursor: pointer; }
:focus:not(:focus-visible) { outline: none; }

/* trade ideas: rating, market check */
.tf-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.tf-vote { display: inline-flex; gap: 6px; }
.vbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--soft); font-size: 13px; font-weight: 500; cursor: pointer; }
.vbtn:hover { border-color: var(--bar2); color: var(--text); }
.vbtn.up.on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-fg); }
.vbtn.down:hover { border-color: #6B4126; color: var(--neg-fg); }
.vbtn:disabled { opacity: .5; cursor: progress; }
.tf-market { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--surface2); }
.tf-market .badge { flex: none; }
.tf-market .sub { line-height: 1.5; }
.tf-learned { margin: 0; color: var(--info-fg); }
.tf-learnbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px;
  border: 1px dashed var(--line); border-radius: 10px; }
.tf-learnbar .btn { min-height: 36px; padding: 0 14px; font-size: 13px; }
.tf.tf-hidden { padding: 14px 18px; border-style: dashed; opacity: .8; }
.tf-gone { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 760px) { .tf-market { flex-direction: column; gap: 6px; } .vbtn { padding: 0 10px; } }
#tfRerank[hidden] { display: none; }

/* trade ideas: reasoning tucked into a dropdown */
.tf-more { border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); }
.tf-more > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  min-height: 44px; padding: 8px 40px 8px 14px; position: relative; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.tf-more > summary::-webkit-details-marker { display: none; }
.tf-more > summary::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.tf-more[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.tf-more > summary:hover::after { border-color: var(--text); }
.tf-peek { font-size: 12px; font-weight: 400; color: var(--muted); }
.tf-more-body { display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 14px; border-top: 1px solid var(--line2); padding-top: 12px; }
.tf-more-body .tf-fits > * { background: var(--surface); }
.tf-list { align-items: start; }

/* invite links (admin) */
.invform { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.invform .f { flex: 1 1 200px; }
.invlist { display: flex; flex-direction: column; gap: 8px; }
.invrow { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); }
.invrow.fresh { border-color: var(--accent); }
.invrow.dead { opacity: .7; }
.invmain { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; min-width: 0; }
.invlink { width: 100%; font-size: 13px; min-height: 38px; }
.invbtns { display: flex; gap: 8px; }
.invold > summary { cursor: pointer; padding: 4px 0; }
.invold .invlist { margin-top: 8px; }

/* pick your team */
.pickwrap { max-width: 860px; width: 100%; margin: 4vh auto 0; display: flex; flex-direction: column; gap: 20px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pickteam { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; min-height: 72px; text-align: left;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; }
.pickteam:hover:not(:disabled) { border-color: var(--bar2); background: var(--surface2); }
.pickteam.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-bg); }
.pickteam.taken { opacity: .55; cursor: not-allowed; }
.pickteam .badge { margin-top: 4px; }
.pt-name { font-weight: 600; font-size: 15px; }
.pickbar { position: sticky; bottom: 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--bar); box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.pickbar #pterr { flex-basis: 100%; order: 3; }
.pickbar #pterr:empty { display: none; }
