/* Teamsheet -- one stylesheet, no framework. Light by default, dark when the system asks for it. */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #10151c;
  --muted: #5b6573;
  --line: #e2e6eb;
  --accent: #0b6e5a;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3ee;
  --good: #0b7a4b;
  --warn: #a35a00;
  --warn-soft: #fdf1dc;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  --pitch: #eef6f1;
  --pitch-line: #d6e8dd;
  --shadow: 0 1px 2px rgba(16, 21, 28, .05), 0 6px 20px rgba(16, 21, 28, .05);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1116;
    --surface: #151b23;
    --surface-2: #1b232d;
    --text: #e8edf3;
    --muted: #94a0b0;
    --line: #27313d;
    --accent: #3fc6a4;
    --accent-ink: #06221b;
    --accent-soft: #12332b;
    --good: #4fd08f;
    --warn: #f0b24a;
    --warn-soft: #3a2a0e;
    --bad: #ff8a80;
    --bad-soft: #3b1714;
    --pitch: #121d19;
    --pitch-line: #1f322a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
code, .url { font-family: var(--mono); font-size: .92em; }
mark { background: var(--accent-soft); color: inherit; padding: 0 .2em; border-radius: 4px; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.meta { color: var(--muted); font-size: .9rem; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) and (background: color-mix(in srgb, red 50%, transparent)) {
  .top { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
}
.top-row { display: flex; align-items: center; gap: 20px; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
         font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
.brand svg { color: var(--accent); flex: none; }
.nav { display: flex; gap: 18px; margin-left: 8px; }
.nav a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.nav a:hover { color: var(--text); }
.gw-chip { margin-left: auto; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.gw-chip b { color: var(--text); font-weight: 650; }
@media (max-width: 720px) { .nav { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero { padding: 40px 0 26px; }
.hero h1 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 750; max-width: 20em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 14px; color: var(--muted); font-size: 1.08rem; max-width: 40em; }
.team-form { display: flex; gap: 10px; margin-top: 20px; max-width: 520px; }
.team-form input {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.team-form input::placeholder { color: var(--muted); }
.team-form input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.team-form.small { margin-top: 10px; max-width: 460px; }
.team-form.small input { height: 42px; box-shadow: none; }
.btn {
  height: 50px; padding: 0 20px; font: inherit; font-weight: 650; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn[disabled] { opacity: .6; cursor: progress; }
.team-form.small .btn { height: 42px; padding: 0 14px; }
.btn.link { height: auto; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.form-msg { min-height: 1.4em; margin-top: 8px; color: var(--bad); font-size: .93rem; }
.form-msg:empty { min-height: 0; margin-top: 0; }
.helpers { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; align-items: flex-start; }
.helpers details { font-size: .93rem; }
.helpers summary { cursor: pointer; color: var(--muted); list-style: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.helpers summary::-webkit-details-marker { display: none; }
.helpers summary:hover, .helpers details[open] summary { color: var(--text); }
.helpers details[open] { flex-basis: 100%; }
.help-body { margin-top: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; max-width: 620px; }
.help-body p + p { margin-top: 8px; }
.help-body .url { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .hero { padding-top: 34px; }
  .team-form { flex-direction: column; }
  .team-form input { flex: none; width: 100%; }
  .team-form .btn { width: 100%; }
  .top-row { gap: 12px; }
  .gw-chip { font-size: .8rem; }
  .gw-chip .word { display: none; }
}

/* freshness: how close to the deadline the numbers were made */
.fresh { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: .92rem; }
.fresh:empty { display: none; }
.meter { display: inline-flex; gap: 4px; }
.meter i { display: block; width: 34px; height: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.meter i.on { background: var(--accent); border-color: var(--accent); }
.meter.early i.on { background: var(--warn); border-color: var(--warn); }
.fresh .stage { font-size: .92rem; }
.fresh .next { font-size: .92rem; color: var(--text); font-weight: 600; }
.fresh .next .btn.link { font-size: inherit; }
.fresh .why { grid-column: 1 / -1; color: var(--muted); font-size: .92rem; }
.fresh .why b { color: var(--text); font-weight: 600; }

/* ---------------------------------------------------------------- advertising */
.ad { margin: 26px auto; max-width: 1040px; padding: 0 20px; text-align: center; }
.ad.demo > span { display: flex; align-items: center; justify-content: center; min-height: 90px; color: var(--muted);
                  font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
                  border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.ad.demo.mid > span { min-height: 120px; }
.ad-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------------------------------------------------------------- blocks */
.block { margin-top: 44px; }
.block-head h2 { font-size: 1.4rem; letter-spacing: -.015em; }
.block-head .gw-n { color: var(--muted); font-weight: 500; }
.block-head .sub { color: var(--muted); margin-top: 4px; font-size: .97rem; }
.tabs { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.tab { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
       color: var(--muted); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.table-card { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: right; white-space: nowrap; }
th { font-size: .74rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface); }
td { border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
th:nth-child(1), td:nth-child(1) { width: 34px; padding-right: 0; color: var(--muted); text-align: left; }
th:nth-child(2), td:nth-child(2) { text-align: left; white-space: normal; }
td .nm { font-weight: 650; }
td .meta, .chip .meta { display: block; color: var(--muted); font-size: .82rem; font-weight: 400; }
td.xp { font-weight: 700; }
.more { display: block; width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.more:hover { background: var(--surface-2); }
.empty { padding: 22px 16px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c, var(--muted)); box-shadow: 0 0 0 1px rgba(128, 128, 128, .35); vertical-align: baseline; }
.flag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: .72rem; font-weight: 700; vertical-align: 1px; }
.flag.d { background: var(--warn-soft); color: var(--warn); }
.flag.o { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 560px) {
  th, td { padding: 10px 8px; }
  th:nth-child(1), td:nth-child(1) { padding-left: 12px; width: 28px; }
  .hide-s { display: none; }
}

/* ---------------------------------------------------------------- your team */
.team { margin-top: 8px; scroll-margin-top: 74px; }   /* clear of the sticky header when scrolled to */
.team-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.team-head h2 { font-size: 1.5rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.team-head > .btn.link { margin-left: auto; font-size: .92rem; }
.team-head .edited { font-size: .86rem; color: var(--warn); }
.team-head .edited b { font-weight: 700; }
.team-head .edited .btn.link { font-size: inherit; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fact { padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--muted); }
.fact b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.note { margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: .93rem; }
.note.info { background: var(--accent-soft); color: var(--accent); }
@media (prefers-color-scheme: dark) { .note.info { color: var(--text); } .note { color: var(--text); } }
.grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 900px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.plan h3 { font-size: 1.22rem; letter-spacing: -.01em; margin-top: 4px; }
.moves { margin-top: 14px; display: grid; gap: 8px; }
.move { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); gap: 8px; align-items: center;
        padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.move .side { min-width: 0; }
.move .side .lab { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.move .side.in .lab { color: var(--good); }
.move .side.out .lab { color: var(--bad); }
.move .nm { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move .meta { display: block; color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move .arrow { color: var(--muted); text-align: center; }
@media (max-width: 520px) { .move .meta { white-space: normal; } }
.col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; min-width: 0; }   /* never wider than its column */
.sums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.sum { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.sum .k { display: block; font-size: .74rem; color: var(--muted); }
.sum .v { display: block; font-size: 1.12rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum .v.pos { color: var(--good); }
.sum .v.neg { color: var(--bad); }
.explain { margin-top: 12px; color: var(--muted); font-size: .9rem; }
.options { overflow: hidden; }
.options h4 { margin: 0; padding: 14px 18px 8px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 18px; border: 0; border-top: 1px solid var(--line);
       background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.opt:first-of-type { border-top: 0; }
.opt:hover { background: var(--surface-2); }
.opt[aria-pressed="true"] { background: var(--accent-soft); }
.opt .what { flex: 1; min-width: 0; font-size: .93rem; }
.opt .what span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .what .out { color: var(--muted); }
.opt .net { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }
.opt .net.pos { color: var(--good); }
.opt .net.neg { color: var(--muted); }
.opt .tag { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }

/* the line-up */
.lineup-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 16px 18px 0; }
.lineup-head h3 { font-size: 1.08rem; }
.lineup-head .pred { margin-left: auto; color: var(--muted); font-size: .92rem; }
.lineup-head .pred b { color: var(--text); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pitch { margin: 14px 12px 0; padding: 14px 6px; background: var(--pitch); border: 1px solid var(--pitch-line); border-radius: 12px; display: grid; gap: 10px; }
.line { display: flex; justify-content: center; gap: 6px; }
.chip { position: relative; flex: 0 1 112px; min-width: 0; padding: 8px 6px 7px; text-align: center; background: var(--surface);
        border: 1px solid var(--line); border-radius: 10px; }
.chip .nm { display: block; font-weight: 650; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .meta { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .xp { display: block; margin-top: 2px; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.chip.in { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.chip .badge { position: absolute; top: -8px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: .68rem;
               font-weight: 800; line-height: 18px; background: var(--text); color: var(--bg); }
.chip .badge.v { background: var(--muted); }
.chip .badge.new { left: 6px; right: auto; background: var(--good); color: var(--surface); font-size: .6rem; letter-spacing: .04em; }
.chip .risk { display: block; margin-top: 1px; font-size: .68rem; font-weight: 700; color: var(--warn); }
.chip .risk.o { color: var(--bad); }
.bench { padding: 12px 12px 16px; }
.bench .lab { display: block; margin: 0 6px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bench .chip { background: var(--surface-2); }
@media (max-width: 480px) {
  .pitch { margin: 12px 6px 0; padding: 12px 3px; }
  .line { gap: 3px; }
  .chip { padding: 7px 2px 6px; }
  .chip .nm { font-size: .76rem; }
  .chip .meta { font-size: .64rem; }
}
.loading { display: flex; align-items: center; gap: 12px; padding: 22px 0; color: var(--muted); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } html { scroll-behavior: auto; } }

/* league finder */
.league-list { margin-top: 10px; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.league-list button { display: flex; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-top: 1px solid var(--line); background: none;
                      color: inherit; font: inherit; text-align: left; cursor: pointer; }
.league-list button:first-child { border-top: 0; }
.league-list button:hover { background: var(--surface-2); }
.league-list .rk { color: var(--muted); width: 2.4em; font-variant-numeric: tabular-nums; }
.league-list .who { flex: 1; min-width: 0; }
.league-list .who span { display: block; color: var(--muted); font-size: .84rem; }

/* ---------------------------------------------------------------- how + footer */
.foot { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot-row { display: grid; gap: 8px; }
.foot b { color: var(--text); }

/* legal page */
.legal { max-width: 720px; padding-top: 40px; }
.legal h1 { font-size: 1.9rem; letter-spacing: -.02em; }
.legal h2 { font-size: 1.15rem; margin-top: 28px; }
.legal p { margin-top: 10px; color: var(--muted); }
.legal dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 12px 0 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
.todo { color: var(--bad); font-weight: 600; }

/* ---------------------------------------------------------------- the chips card */
.chips { overflow: hidden; }
.chips-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 18px 10px; }
.chips-head h4 { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chips-play { margin-left: auto; font-weight: 700; font-size: .95rem; color: var(--muted); }
.chips-play.on { color: var(--accent); }
.chip-row { padding: 10px 18px 12px; border-top: 1px solid var(--line); }
.chip-row.on { background: var(--accent-soft); }
.chip-name { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.chip-state { font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px;
              border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.chip-state.used { text-decoration: line-through; opacity: .75; }
.chip-why { margin-top: 4px; color: var(--muted); font-size: .9rem; }
.chip-row .btn.link { margin-top: 6px; font-size: .88rem; }
.chips-foot { padding: 12px 18px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }

/* ---------------------------------------------------------------- sortable columns */
th .sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit;
           letter-spacing: inherit; text-transform: inherit; }
th .sort:hover, th .sort.on { color: var(--text); }
th .sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
th .sort .arrow { width: .8em; font-size: .7em; }
.helpers .btn.link { font-size: .93rem; font-weight: 600; }
.helpers .btn.link[disabled] { opacity: .5; cursor: default; }
.chip-why { display: block; margin-top: 2px; color: var(--muted); font-size: .9rem; }
.chip-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; align-items: center; }
.chip-row .chip-name, .chip-row .chip-why { grid-column: 1; }
.chip-row .btn.link { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; white-space: nowrap; }

/* ---------------------------------------------------------------- the one table: places to fill, players beside it */
.team > .grid:first-child { margin-top: 0; }
.grid.busy { opacity: .5; pointer-events: none; }
.card.squad .pitch { margin-bottom: 12px; }
.lineup-head .count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.lineup-head .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.lineup-head .links .btn.link { font-size: .92rem; }
button.chip { font: inherit; color: inherit; cursor: pointer; }
button.chip:hover { border-color: var(--muted); }
.chip.slot { min-height: 76px; display: flex; flex-direction: column; justify-content: center; }
.chip.slot.empty { background: none; border-style: dashed; border-color: var(--muted); color: var(--muted); }
@supports (color: color-mix(in srgb, red 50%, transparent)) { .chip.slot.empty { border-color: color-mix(in srgb, var(--muted) 50%, transparent); } }
.chip.slot.empty:hover { border-color: var(--accent); color: var(--text); }
.chip.slot .plus { display: block; font-size: 1.1rem; line-height: 1; font-weight: 600; }
.chip.sel, .chip.in.sel, .bench .chip.sel { background: var(--accent-soft); border-color: var(--accent); border-style: solid;
                                             box-shadow: 0 0 0 1px var(--accent) inset; }
button.side { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit;
              text-align: left; cursor: pointer; border-radius: 6px; }
button.side:hover .nm { text-decoration: underline; text-underline-offset: 3px; }
button.side.sel { box-shadow: 0 0 0 2px var(--accent); }
.card.picker { padding: 12px; }
.picker-head { display: flex; align-items: center; gap: 14px; }
.picker-q { flex: 1; min-width: 0; height: 40px; padding: 0 12px; font: inherit; color: var(--text); background: var(--surface-2);
            border: 1px solid var(--line); border-radius: 10px; }
.picker-q:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.picker-list { margin-top: 8px; max-height: 264px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
@media (min-width: 901px) { .picker-list { max-height: 360px; } }
.pick { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 12px; border: 0;
        border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pick:first-child { border-top: 0; }
.pick:hover { background: var(--surface-2); }
.pick[disabled] { opacity: .45; cursor: default; }
.pick .nm { font-weight: 650; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .meta { white-space: nowrap; font-variant-numeric: tabular-nums; }
.squad-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: var(--muted); font-size: .92rem; }
.squad-ctl label { display: inline-flex; align-items: center; gap: 6px; }
.squad-ctl > .btn.link { margin-left: auto; font-size: .92rem; }
.hint { margin-top: 8px; color: var(--muted); font-size: .86rem; }
.num-in { width: 4.6em; height: 34px; padding: 0 8px; font: inherit; color: var(--text); background: var(--surface);
          border: 1px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums; }
select.num-in { width: auto; }
.ctl-chips { display: inline-flex; align-items: center; gap: 6px; }
.ctl-chips .tab { height: 30px; padding: 0 10px; font-size: .82rem; }
.tab[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.tab[aria-pressed="false"] { text-decoration: line-through; }

/* ---------------------------------------------------------------- one list switch, and the expected points up front */
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg button { height: 36px; padding: 0 16px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit;
              font-weight: 700; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
#players .sub { margin-top: 10px; color: var(--muted); font-size: .92rem; }
.chip .xp { font-size: 1.08rem; font-weight: 800; color: var(--accent); line-height: 1.25; }
td.xp { font-size: 1.04rem; font-weight: 800; color: var(--accent); }
.lineup-head .pred { color: var(--muted); font-size: .9rem; }
.lineup-head .pred b { color: var(--accent); font-size: 1.55rem; font-weight: 800; letter-spacing: -.01em; }
.pick .meta { margin-left: auto; }
.pick .xp, .pick .hz, .pick-cols span { flex: none; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pick .xp, .pick-cols span:first-child { width: 3.2rem; }
.pick .hz, .pick-cols span:last-child { width: 3.6rem; }
.pick .xp { font-weight: 800; color: var(--accent); }
.pick .hz { font-weight: 600; color: var(--muted); }
.pick-cols { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; gap: 12px; padding: 6px 12px 5px;
             background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted);
             font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pick-cols + .pick { border-top: 0; }
.btn.small { height: 36px; padding: 0 14px; border-radius: 10px; font-size: .92rem; }

/* ---------------------------------------------------------------- a player, opened: where his number comes from */
.panel-head { display: flex; align-items: flex-start; gap: 14px; margin: 2px 2px 0; }
.panel-head > .btn.link { font-size: .92rem; line-height: 1.6; }
.who { flex: 1; min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.who-id { min-width: 0; }
.who .nm { display: block; font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .meta { display: block; font-size: .82rem; }
.who-x { flex: none; white-space: nowrap; color: var(--muted); font-size: .86rem; }
.who-x b { color: var(--accent); font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.parts { margin: 10px 2px 0; border-top: 1px solid var(--line); }
.part { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.part .k { color: var(--muted); }
.part .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.part .v.pos { color: var(--good); }
.part .v.neg { color: var(--bad); }
.part.next { border-bottom: 0; }
.part.next .v { color: var(--muted); }
.picker .lab { display: block; margin: 12px 2px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
               color: var(--muted); }

/* the armband on the advice card */
.cap-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 12px; padding: 9px 12px;
            border: 1px solid var(--line); border-radius: 12px; }
.cap-line .k { font-size: .74rem; color: var(--muted); }
.cap-line .xp { font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.cap-line .vice { margin-left: auto; color: var(--muted); font-size: .88rem; }
.cap-line .vice .namebtn { font-weight: 600; }
.namebtn { all: unset; cursor: pointer; font-weight: 650; }
.namebtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.namebtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button.side.in { text-align: left; }

/* the players table: three gameweeks beside this one, and a row that opens */
td.hz { color: var(--muted); font-weight: 600; }
tr.row { cursor: pointer; }
tr.row:hover td { background: var(--surface-2); }
tr.row.on td { border-bottom-color: transparent; background: var(--surface-2); }
tr.detail td { width: auto; padding: 0 14px 12px 48px; color: inherit; text-align: left; white-space: normal; background: var(--surface-2); }
tr.detail .parts { max-width: 340px; margin: 0; border-top: 0; }
tr.detail .part:last-child { border-bottom: 0; }
@media (max-width: 560px) { tr.detail td { padding-left: 40px; } }

/* a narrow list: the club and price go under the name, so the name keeps its room */
@media (max-width: 520px) {
  .pick { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem 3.6rem; gap: 0 12px; align-items: center; padding: 7px 12px; }
  .pick .nm { grid-column: 1; grid-row: 1; }
  .pick .meta { grid-column: 1; grid-row: 2; margin-left: 0; font-size: .8rem; }
  .pick .xp { grid-column: 2; grid-row: 1 / span 2; }
  .pick .hz { grid-column: 3; grid-row: 1 / span 2; }
}

/* fingers: nothing to tap is under 40px */
@media (hover: none), (max-width: 900px) {
  .tab { height: 40px; }
  .ctl-chips .tab { height: 40px; padding: 0 11px; font-size: .86rem; }
  .num-in { height: 40px; }
  .btn.link { position: relative; }
  .btn.link::after { content: ""; position: absolute; inset: -10px -6px; }
}
