/* accounts, pick'em and fantasy */
:root, :root[data-theme="dark"] {
  --pos-QB: #eb6263; --pos-RB: #0aac23; --pos-WR: #338ced; --pos-TE: #e76624; --pos-K: #9887ef; --pos-DST: #00a888;
}
:root[data-theme="light"] {
  --pos-QB: #ec4647; --pos-RB: #008a17; --pos-WR: #257de0; --pos-TE: #f47230; --pos-K: #6a4ce2; --pos-DST: #00b894;
}

.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); cursor: pointer; font-size: 13px; }
.account-btn.signin { padding: 6px 14px; color: var(--text); }
.account-btn:hover { border-color: var(--accent); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; flex: none; }
@media (max-width: 760px) {
  #acct-btn { display: grid; width: 40px; height: 40px; padding: 0; gap: 0; border-radius: 50%; }
  #acct-btn .avatar { width: 100%; height: 100%; font-size: 13px; }
  #acct-btn > span:not(.avatar) { display: none; }
}
.menu { position: absolute; right: 0; top: 42px; min-width: 200px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 12px 32px var(--shadow); overflow: hidden; z-index: 30; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; background: none; cursor: pointer; color: var(--text); }
.menu a:hover, .menu button:hover { background: var(--panel-2); color: var(--text); }
.menu .who-line { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }

.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 10px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 10px 30px var(--shadow);
  font-size: 14px; animation: toast-in .2s ease-out; }
.toast.ok { border-color: var(--good); }
.toast.err { border-color: var(--bad); color: var(--bad-text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* forms */
.form-card { max-width: 440px; margin: 40px auto; padding: 28px; }
.form-card h1 { font-size: 22px; margin-bottom: 4px; }
.form-card .logo-big { width: 56px; height: 56px; margin-bottom: 12px; }
.field-row { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field-row label { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.field-row small { color: var(--faint); font-size: 12px; }
.field-row .format-cards label, .field-row .seg label { text-transform: none; letter-spacing: normal; font-size: 14px; color: var(--text); }
.field-row .format-cards label small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid-form .field-row small { margin-bottom: 4px; }
.form-actions .btn { white-space: nowrap; }
.inp, select.inp { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; }
.inp:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); font-weight: 650; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad-text); }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }
.form-error { color: var(--bad-text); margin-top: 10px; min-height: 1.2em; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.codebox { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border-radius: 6px;
  background: var(--panel-2); border: 1px dashed var(--line-2); }

/* hubs */
.hub { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.group-list a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.group-list a:hover { background: var(--panel-2); color: inherit; }
.group-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; }
.group-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gi-pool { background: linear-gradient(135deg, #257de0, #6a4ce2); }
.gi-contest { background: linear-gradient(135deg, #f47230, #d28e05); }
.gi-league { background: linear-gradient(135deg, #0aac23, #00a888); }
.group-list .nm { font-weight: 650; }
.group-list .sub { font-size: 12px; color: var(--muted); }
.format-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 6px; }
.format-cards label { display: block; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; cursor: pointer; background: var(--panel-2); }
.format-cards label:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.format-cards input { margin-right: 6px; }
.format-cards small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

.group-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; flex-wrap: wrap; }
.group-head h1 { font-size: 24px; }
.group-head .sub { color: var(--muted); font-size: 13px; }

/* pick'em */
.pick-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; margin-top: 12px; align-items: start; }
.picks { display: flex; flex-direction: column; gap: 10px; }
.pick-game { display: grid; grid-template-columns: 1fr auto 1fr 150px; align-items: center; gap: 10px; padding: 10px 14px; }
.pick-game.locked { opacity: .92; }
.team-pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line-2);
  background: var(--panel-2); cursor: pointer; text-align: left; width: 100%; position: relative; }
.team-pick.home { flex-direction: row-reverse; text-align: right; }
.team-pick:hover:not(:disabled) { border-color: var(--accent); }
.team-pick:disabled { cursor: default; }
.team-pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); box-shadow: inset 0 0 0 1px var(--accent); }
.team-pick.used { opacity: .45; }
.team-pick .tn { font-weight: 650; }
.team-pick .ln { font-size: 12px; color: var(--muted); }
.team-pick .sc { margin-left: auto; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.team-pick.home .sc { margin-left: 0; margin-right: auto; }
.team-pick.win { border-color: var(--good); }
.team-pick.loss.on { border-color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel-2)); }
.team-pick.win.on { box-shadow: inset 0 0 0 1px var(--good); background: color-mix(in srgb, var(--good) 12%, var(--panel-2)); }
.at { color: var(--faint); font-weight: 700; }
.pick-meta { font-size: 12px; color: var(--muted); text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.pick-meta select { width: 70px; }
.others { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.others .avatar { width: 20px; height: 20px; font-size: 9px; }
.result { font-weight: 700; font-size: 12px; }
.result.win { color: var(--good-text); } .result.loss { color: var(--bad-text); } .result.push { color: var(--warn-text); }
.lock { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); }
.lock svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-top: 12px;
  background: color-mix(in srgb, var(--panel) 94%, transparent); border: 1px solid var(--line-2); border-radius: var(--radius); backdrop-filter: blur(6px); }
.survivor-status { padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-weight: 650; }
.survivor-status.alive { background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good-text); }
.survivor-status.out { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad-text); }

/* fantasy */
.ptag { display: inline-block; min-width: 34px; text-align: center; padding: 1px 5px; border-radius: 4px; font-size: 11px; font-weight: 800; color: #fff; }
.ptag-QB { background: var(--pos-QB); } .ptag-RB { background: var(--pos-RB); } .ptag-WR { background: var(--pos-WR); }
.ptag-TE { background: var(--pos-TE); } .ptag-K { background: var(--pos-K); } .ptag-DST { background: var(--pos-DST); }
.ptag-FLEX { background: linear-gradient(90deg, var(--pos-RB), var(--pos-WR), var(--pos-TE)); } .ptag-BN { background: var(--faint); }
.builder { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.slots { display: flex; flex-direction: column; }
.slot { display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); min-height: 54px; }
.slot.empty .pname { color: var(--faint); font-style: italic; }
.slot .pname { font-weight: 600; }
.slot .pinfo { font-size: 12px; color: var(--muted); }
.slot .pts { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 15px; min-width: 44px; text-align: right; }
.slot select { max-width: 260px; }
.capbar { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.capbar .bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; margin-top: 6px; }
.capbar .bar span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.capbar .bar span.over { background: var(--bad); }
.pl { display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; }
.pl .head-img, .pl .logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-2); }
.pl .logo { background: none; border-radius: 0; object-fit: contain; }
.slot > span { text-align: left; min-width: 0; }
.add-btn { width: 28px; height: 28px; font-size: 17px; line-height: 1; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-weight: 800; color: var(--accent); }
.add-btn:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.add-btn:disabled { opacity: .3; cursor: default; }
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.entry .panel-head .pts { margin-left: auto; font-size: 20px; font-weight: 800; }
.entry .slot { min-height: 40px; padding: 6px 12px; grid-template-columns: 44px 1fr auto; }
.rank-badge { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--panel-2); border: 1px solid var(--line-2); }
.rank-badge.r1 { background: #d28e05; color: #fff; border-color: #d28e05; }

.matchup-card { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 14px 18px; }
.matchup-card .side { display: flex; flex-direction: column; gap: 2px; }
.matchup-card .side.r { text-align: right; align-items: flex-end; }
.matchup-card .tn { font-weight: 700; }
.matchup-card .ow { font-size: 12px; color: var(--muted); }
.matchup-card .big { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.matchup-card .big.lead { color: var(--good-text); }
.matchup-card .vs { color: var(--faint); font-weight: 700; text-align: center; font-size: 12px; }
.mu-detail { display: grid; grid-template-columns: 1fr 60px 1fr; }
.mu-detail .row { display: contents; }
.mu-detail .c { padding: 7px 12px; border-bottom: 1px solid var(--line); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.mu-detail .c.r { justify-content: flex-end; text-align: right; }
.mu-detail .c.mid { justify-content: center; }
.mu-detail .p { font-weight: 800; font-variant-numeric: tabular-nums; }

.clock-banner { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--panel)); border: 1px solid var(--accent); }
.clock-banner.mine { background: color-mix(in srgb, var(--good) 16%, var(--panel)); border-color: var(--good); }
.clock-banner .t { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; margin-left: auto; }
.draft-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.draft-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.draft-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.draft-filters .inp { width: 140px; margin-left: auto; }
.avail-list { max-height: 60vh; overflow-y: auto; overflow-x: hidden; }
.avail-list table { width: 100%; table-layout: fixed; }
.avail-list td.l { overflow: hidden; }
.avail-list td.l * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; min-width: 0; }
.dp-row > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dp-row.now b { color: var(--accent); }
.dp-row.next { color: var(--muted); }
.dp-no { min-width: 30px; color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; }
.auto-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px 0 12px; }
.auto-bar .muted { font-size: 12px; flex: 1 1 220px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--good); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.board { overflow: hidden; }
.board table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; font-size: 11px; }
.board th { padding: 6px 4px; color: var(--muted); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board th.mine { color: var(--accent); }
.board td b, .board td small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .board { display: none; } .clock-banner .t { font-size: 20px; } .draft-filters .inp { width: 100%; margin-left: 0; } }
.board td { height: 44px; vertical-align: top; border-radius: 6px; padding: 4px 6px; background: var(--panel-2); border-left: 4px solid transparent; }
.board td.rd { background: none; color: var(--faint); font-weight: 700; text-align: center; vertical-align: middle; }
.board td.now { outline: 2px solid var(--accent); }
.board td b { display: block; font-size: 12px; }
.board td small { color: var(--muted); }
.board td.p-QB { border-left-color: var(--pos-QB); } .board td.p-RB { border-left-color: var(--pos-RB); } .board td.p-WR { border-left-color: var(--pos-WR); }
.board td.p-TE { border-left-color: var(--pos-TE); } .board td.p-K { border-left-color: var(--pos-K); } .board td.p-DST { border-left-color: var(--pos-DST); }
.order-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.order-list { list-style: none; padding: 0; margin: 0; }
.champ { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: var(--radius); margin-bottom: 14px;
  background: linear-gradient(100deg, rgba(210,142,5,.3), transparent 70%); border: 1px solid rgba(210,142,5,.6); font-size: 17px; font-weight: 700; }

@media (max-width: 1000px) {
  .hub, .builder, .draft-layout, .pick-layout { grid-template-columns: minmax(0, 1fr); }
  .pick-layout > :last-child { order: -1; }
}
@media (max-width: 700px) {
  .slot { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .slot > span:nth-child(3):not(:empty) { grid-column: 1 / -1; order: 5; }
  .slot > span:nth-child(3) select { max-width: none; width: 100%; }
  /* Every tab stays in view: pills that wrap onto a second row. */
  .subtabs { flex-wrap: wrap; gap: 6px; border-bottom: 0; margin: 12px 0; }
  .subtabs a { flex: none; margin: 0; padding: 6px 13px; font-size: 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
  .subtabs a.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
  /* Badge beside the name; join code on its own line. */
  .group-head { padding: 14px 16px; gap: 8px 12px; }
  .group-head > div:not(.spacer) { flex: 1 1 0; min-width: 0; }
  .group-head > .spacer { flex-basis: 100%; height: 0; }
  .group-head h1 { font-size: 20px; }
  .group-head .league-badge-lg, .group-head .group-icon { width: 36px; height: 36px; }
  .group-head .codebox { font-size: 13px; padding: 2px 8px; }
  .contest-standings th:nth-child(2) { width: 100%; }
  .contest-standings .who { white-space: normal; overflow-wrap: anywhere; }
  .matchup-card .big { font-size: 22px; }
  .mu-detail .c { padding: 6px 6px; font-size: 12px; }
  .pick-game { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; padding: 10px; }
  .team-pick { min-width: 0; padding: 10px 8px; gap: 6px; }
  .pick-game .pick-meta { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
}

/* Private bot sandbox */
.sandbox-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.sandbox-controls label, .sandbox-heading label { min-width: 0; max-width: 100%; }
.sandbox-controls .inp, .sandbox-heading .inp { display: block; margin-top: 4px; }
.sandbox-heading { margin-top: 18px; justify-content: space-between; align-items: end; }
.sandbox-summary { align-items: start; }
.sandbox-section { margin-top: 14px; }
.sandbox-result { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sandbox-result > :last-child { text-align: right; }
.sandbox-match { display: flex; gap: 12px; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 8px 0; }
.sandbox-match b { margin-left: 3px; }
.sandbox-details { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sandbox-details summary { cursor: pointer; }
.sandbox-bot { margin: 12px 0; padding: 12px; background: var(--panel-2); border-radius: var(--radius); }
.sandbox-events { margin: 0; padding: 0; list-style: none; max-height: 55vh; overflow-y: auto; }
.sandbox-events li { padding: 8px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.sandbox-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sandbox-event-nav { align-items: center; }
@media (max-width: 620px) {
  .sandbox-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.sandbox-seed { width: 130px; }
.sandbox-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sandbox-checks > div { display: flex; justify-content: space-between; align-items: start; gap: 8px; padding: 8px;
  border-radius: 8px; background: var(--panel-2); }
.sandbox-checks > div > b { white-space: nowrap; }
@media (max-width: 760px) {
  .sandbox-checks { grid-template-columns: minmax(0, 1fr); }
}

.sandbox-overview .panel-head { flex-wrap: wrap; }
.sandbox-money { margin-top: 0; }
.sandbox-charts { align-items: start; }
.sandbox-charts section { min-width: 0; }
.sandbox-charts p { margin: 4px 0 8px; }
.sandbox-chart { --chart-height: 120px; display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); gap: 2px; }
.sandbox-chart-column { min-width: 0; text-align: center; }
.sandbox-chart-column > small { font-size: 10px; color: var(--muted); }
.sandbox-bar { display: block; position: relative; width: 100%; height: var(--chart-height); padding: 0;
  border: 1px solid transparent; border-radius: 5px; background: var(--panel-2); cursor: pointer; }
.sandbox-bar[aria-pressed="true"] { border-color: var(--accent); }
.sandbox-bar > span { position: absolute; inset: auto 20% 0; height: var(--bar-size); background: var(--accent); border-radius: 3px 3px 0 0; }
.sandbox-chart.diverging .sandbox-bar::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid var(--line-2); }
.sandbox-chart.diverging .gain > span { bottom: 50%; background: var(--good-text); }
.sandbox-chart.diverging .loss > span { bottom: auto; top: 50%; background: var(--bad-text); border-radius: 0 0 3px 3px; }
.sandbox-week-readout { padding: 8px 10px; border-radius: 6px; background: var(--panel-2); }
.sandbox-inputs { margin-top: 12px; }
.sandbox-inputs p { margin-bottom: 0; }
.sandbox-coverage { display: flex; height: 10px; margin: 8px 0; border-radius: 4px; overflow: hidden; background: var(--panel-2); }
.sandbox-coverage-key { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0; list-style: none; }
.sandbox-coverage-key li { display: inline-flex; align-items: center; gap: 5px; }
.sandbox-coverage-key li > span { width: 10px; height: 10px; border-radius: 2px; }
.sandbox-inputs .archived { background: var(--good-text); }
.sandbox-inputs .modeled { background: var(--accent); }
.sandbox-inputs .live { background: var(--warn-text); }

.sandbox-downloads { display: flex; flex-wrap: wrap; gap: 6px; }
.sandbox-style-chart { margin: 16px 0; }
.sandbox-style-chart p { margin: 4px 0 8px; }
.sandbox-style-row { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr) minmax(92px, auto); gap: 8px;
  padding: 8px 0; align-items: center; border-top: 1px solid var(--line); }
.sandbox-style-row small { display: block; }
.sandbox-style-row > :last-child { text-align: right; }
.sandbox-style-track { min-width: 0; overflow: hidden; height: 12px; border-radius: 4px; background: var(--panel-2); }
.sandbox-style-track > span { display: block; width: var(--share); height: 100%; background: var(--style-ink, var(--accent)); border-radius: 4px; }
.sandbox-style-row[data-profile="0"] { --style-ink: var(--accent); }
.sandbox-style-row[data-profile="1"] { --style-ink: var(--good-text); }
.sandbox-style-row[data-profile="2"] { --style-ink: var(--warn-text); }
.sandbox-style-row[data-profile="3"] { --style-ink: var(--bad-text); }

/* step-by-step replay */
.replay-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; margin: 0 auto; max-width: var(--maxw, 1200px);
  background: color-mix(in srgb, var(--gold) 14%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: var(--radius); }
body.replaying #app { padding-top: 10px; }
.replay-bar .rb-tag { font-weight: 800; font-size: 11px; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; background: var(--gold); color: #1b1300; }
.replay-bar .rb-where small { display: block; color: var(--muted); font-size: 12px; }
.replay-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px; margin-top: 12px; }
.replay-games .rg { display: grid; grid-template-columns: 22px 40px 28px 22px 40px 28px 1fr; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums; }
.replay-games .rg .logo { width: 20px; height: 20px; }
.replay-games .rg small { color: var(--muted); text-align: right; }
@media (max-width: 760px) { .replay-bar { margin: 8px 10px 0; } .replay-bar .spacer { display: none; } }

.replay-bar .rb-you { color: var(--gold-ink, var(--gold)); }
.replay-panel .rw { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; }
.replay-panel .rw.done { opacity: .5; text-decoration: line-through; }

/* moderation */
.mod-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mod-actions p { flex-basis: 100%; margin: 6px 0 0; font-size: 12px; }
.mod-group { grid-template-columns: 36px minmax(0, 1fr) auto; }
.mod-post { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); }
.mod-post > div { min-width: 0; overflow-wrap: anywhere; }
.mod-post.gone > div { opacity: .55; text-decoration: line-through; }
.admin-group { margin-top: 16px; border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.admin-group .panel-body { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.admin-group .muted { flex: 1 1 240px; font-size: 13px; }
.mod-page > .panel, .mod-page .two-col > div > .panel, .mod-page .two-col { margin-bottom: 16px; }
.mod-page .two-col > .panel { margin: 0; }

/* news */
.news-home .page-head { flex-wrap: wrap; gap: 8px; }
.news-home, .news-article { min-width: 0; overflow-wrap: anywhere; }
.news-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.news-head h2 { margin: 0; font-size: 20px; }
.news-note { margin-top: 24px; font-size: 12px; }
.news-top { display: flex; align-items: center; gap: 8px; }
.news-top small { color: var(--faint); margin-left: auto; font-size: 12px; }
.nk { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.nk-preview { color: var(--warn, #b7791f); }

/* the story graphic */
.na { position: relative; overflow: hidden; aspect-ratio: 16 / 8; border-radius: var(--radius) var(--radius) 0 0; color: #fff; isolation: isolate;
  background: linear-gradient(115deg, var(--c1) 0%, var(--c1) 48%, color-mix(in srgb, var(--c2) 85%, #000) 100%); }
.na::before { content: ''; position: absolute; inset: 0; z-index: 0;
  background: repeating-linear-gradient(115deg, rgb(255 255 255 / .06) 0 2px, transparent 2px 22px), linear-gradient(0deg, rgb(0 0 0 / .55), transparent 60%); }
.na-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.na-tint { position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(115deg, color-mix(in srgb, var(--c1) 88%, transparent) 0%, color-mix(in srgb, var(--c1) 50%, transparent) 50%, color-mix(in srgb, var(--c2) 70%, #000 10%) 100%); }
.na.has-photo .na-wm { opacity: .1; }
.na::before { z-index: 1 !important; }
.news-article > p.photo-credit, .photo-credit { font-size: 11px; line-height: 1.4; color: var(--faint); margin: -12px 0 14px; }
.photo-credit a { color: inherit; text-decoration: underline; }
.credit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.credit-grid figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.credit-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.credit-grid figcaption { padding: 10px 12px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.na-wm { position: absolute; left: -6%; top: -18%; width: 62%; opacity: .16; z-index: 0; filter: grayscale(.2); }
.na-shot { position: absolute; right: 2%; bottom: 0; height: 100%; max-width: 58%; object-fit: contain; object-position: bottom right; z-index: 2;
  filter: drop-shadow(-6px 0 14px rgb(0 0 0 / .35)); }
.na-kind { position: absolute; left: 12px; top: 10px; z-index: 3; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: rgb(0 0 0 / .45); padding: 3px 8px; border-radius: 4px; }
.na-match { position: absolute; left: 12px; bottom: 10px; z-index: 3; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 60%;
  font-weight: 800; text-shadow: 0 1px 4px rgb(0 0 0 / .5); }
.na-team { display: inline-flex; align-items: center; gap: 5px; opacity: .8; }
.na-team.won, .na:not(:has(em)) .na-team { opacity: 1; }
.na-team .logo { width: 22px; height: 22px; background: rgb(255 255 255 / .9); border-radius: 50%; padding: 2px; }
.na-team em { font-style: normal; font-size: 20px; font-variant-numeric: tabular-nums; }
.na-at { font-size: 10px; letter-spacing: .1em; opacity: .85; }
.na-match small { flex-basis: 100%; font-size: 11px; font-weight: 650; opacity: .9; }
.na.big { aspect-ratio: 16 / 7; border-radius: var(--radius); }
.na.big .na-kind { left: 20px; top: 18px; font-size: 12px; }
.na.big .na-match { left: 20px; bottom: 18px; gap: 12px; }
.na.big .na-team .logo { width: 36px; height: 36px; }
.na.big .na-team b { font-size: 20px; }
.na.big .na-team em { font-size: 34px; }
.na-name { position: absolute; right: 16px; bottom: 14px; z-index: 3; text-align: right; font-weight: 800; font-size: 15px; text-shadow: 0 1px 6px rgb(0 0 0 / .7);
  background: rgb(0 0 0 / .35); padding: 4px 10px; border-radius: 6px; }
.na-name small { display: block; font-size: 11px; font-weight: 650; opacity: .85; }

.news-lead { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.news-lead:hover, .news-card:hover { border-color: var(--accent); text-decoration: none; }
.news-lead .na.big { border-radius: 0; aspect-ratio: auto; min-height: 320px; }
.nl-body { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 24px; justify-content: center; }
.nl-body b { font-size: 26px; line-height: 1.2; }
.nl-summary { margin: 0; color: var(--muted); line-height: 1.55; }
.nl-more { color: var(--accent); font-weight: 700; font-size: 14px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.news-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); min-width: 0; overflow: hidden; }
.nc-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.news-card b { font-size: 15px; line-height: 1.3; }
.nc-summary { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* the story page */
.news-article { max-width: 760px; margin: 0 auto; }
.news-article > .na { margin: 12px 0 18px; }
.news-article h1 { font-size: 32px; line-height: 1.15; margin: 0 0 8px; }
.news-article > p { font-size: 17px; line-height: 1.7; }
.news-by { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 12px 0 20px; }
.news-by div { display: flex; flex-direction: column; gap: 1px; }
.news-by img { flex: none; }
.news-by .sydney-pic { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); }
.news-by .listen-btn { margin-left: auto; white-space: nowrap; }
.news-by .listen-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.news-article p.reading { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: -10px 0 0 color-mix(in srgb, var(--accent) 12%, transparent), 10px 0 0 color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; transition: background .3s; }
.news-article > p.news-dek { font-size: 19px; line-height: 1.6; }
.news-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 22px 0; }
.news-box h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 8px; }
.nb-head { display: flex; flex-direction: column; gap: 2px; }
.nb-head small { color: var(--muted); }
.nb-line { width: 100%; margin-top: 12px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.nb-line th, .nb-line td { padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line); }
.nb-line th { font-size: 11px; color: var(--faint); }
.nb-line .l { text-align: left; white-space: nowrap; }
.nb-line .logo { width: 20px; height: 20px; vertical-align: -5px; }
.nb-line .tot { font-weight: 800; font-size: 17px; }
.nb-line tr:not(.won) td { color: var(--muted); }
.nb-bars-head { display: grid; grid-template-columns: 60px 1fr 60px; justify-items: center; margin-bottom: 2px; }
.nb-row { display: grid; grid-template-columns: 60px minmax(0, 1fr) 60px; align-items: center; gap: 6px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.nb-row > b { text-align: center; font-size: 14px; }
.nb-label { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); text-align: center; }
.nb-track { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--c2-fallback, var(--line)); overflow: hidden; position: relative; }
.nb-track i { position: absolute; inset: 0; background: linear-gradient(90deg, var(--c1) 0 var(--w), var(--c2) var(--w) 100%); }
.nb-tape { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 14px; text-align: center; }
.nb-tape span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nb-tape .logo { width: 52px; height: 52px; }
.nb-tape em { font-style: normal; color: var(--faint); font-weight: 800; }
.nb-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.nb-stars { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.nb-stars-head { display: flex; align-items: center; gap: 6px; }
.nb-stars-head .logo { width: 20px; height: 20px; }
.nb-star { display: flex; gap: 10px; align-items: center; padding: 6px 8px 0; border-radius: 8px; color: var(--text); min-width: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 22%, transparent), transparent 80%); border-left: 3px solid var(--c1); }
.nb-star:hover { text-decoration: none; background: color-mix(in srgb, var(--c1) 28%, transparent); }
.nb-star img, .nb-nohead { width: 58px; height: 48px; object-fit: cover; object-position: top; flex: none; align-self: flex-end; }
.nb-star > span { display: flex; flex-direction: column; min-width: 0; padding-bottom: 6px; }
.nb-star b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-star small { color: var(--faint); font-size: 11px; }
.nb-star span span { font-size: 12px; color: var(--muted); }
.hidden-article h1 { opacity: .6; }
@media (max-width: 760px) {
  .news-lead { grid-template-columns: minmax(0, 1fr); }
  .news-lead .na.big { min-height: 0; aspect-ratio: 16 / 9; }
  .nl-body { padding: 16px; }
  .nl-body b { font-size: 21px; }
  .na.big .na-team .logo { width: 26px; height: 26px; }
  .na.big .na-team em { font-size: 24px; }
  .na.big .na-team b { font-size: 15px; }
  .na.big .na-name { display: none; }
  .news-article h1 { font-size: 25px; }
  .news-article > p { font-size: 16px; }
  .news-article > p.news-dek { font-size: 17px; }
  .nb-two { grid-template-columns: minmax(0, 1fr); }
  .news-box { padding: 14px; }
}

.home-scores { margin-bottom: 18px; }
.home-scores .news-head { margin-top: 0; }
.home-score-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.home-score { display: grid; gap: 4px; padding: 8px 12px; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.home-score > span { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.home-score small { color: var(--muted); font-size: 11px; }
.home-score strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.home-score .logo { width: 20px; height: 20px; }
@media (max-width: 600px) {
  #app:has(> .news-home, > .news-article) { padding-inline: 12px; }
  .news-home .page-head h1 { flex-basis: 100%; }
  .news-home .page-head .spacer { display: none; }
  .nb-line { table-layout: fixed; }
  .nb-line .l { width: 65px; white-space: normal; }
  .nb-line th, .nb-line td { padding-inline: 2px; }
  .home-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-score:nth-child(n+3) { display: none; }
}

/* League injury reports */
.injuries-page { overflow-wrap: anywhere; }
.injuries-page select { max-width: 100%; }
.injuries-page > p a { text-decoration: underline; }
.injury-report { margin-top: 14px; }
.injury-report ul { list-style: none; margin: 0; padding: 0 16px; }
.injury-report li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.injury-report li:last-child { border-bottom: 0; }
.injury-report li time, .injury-report li span { display: block; font-size: 12px; }
@media (max-width: 600px) {
  #app:has(> .injuries-page) { padding-inline: 12px; }
  .injuries-page .page-head label { flex-basis: 100%; }
}

/* Favorite team hub on Home */
.team-hub .news-head h2 { display: flex; align-items: center; gap: 8px; }
.hub-links { display: flex; gap: 16px; }
.hub-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 3px solid var(--tc, var(--accent)); }
.hub-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hub-title h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hub-title a { font-size: 13px; }
.hub-next { display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.hub-next:hover { text-decoration: none; }
.hub-teams { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.hub-teams .logo { width: 44px; height: 44px; }
.hub-teams i { font-style: normal; color: var(--muted); font-weight: 700; }
.hub-next > b { font-size: 17px; }
.hub-meta { color: var(--muted); font-size: 13px; }
.hub-odds { display: flex; gap: 14px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.hub-odds b { color: var(--text); }
.hub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.hub-record { display: flex; align-items: center; gap: 14px; }
.hub-record > b { font-size: 34px; line-height: 1; font-weight: 800; }
.hub-record span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.hub-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; }
.hs { display: flex; flex-direction: column; align-items: center; padding: 3px 0; border-radius: 6px; font-size: 10px; font-weight: 700; line-height: 1.2;
  color: var(--muted); border: 1px dashed var(--line-2); }
.hs small { font-size: 9px; font-weight: 600; opacity: .75; }
.hs:hover { text-decoration: none; border-color: var(--accent); }
.hs.r-W { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--good) 55%, transparent); }
.hs.r-L { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); }
.hs.r-T, .hs.r-live { border-style: solid; color: var(--text); }
.hub-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: auto; }
.hub-stats span { display: flex; flex-direction: column; }
.hub-stats small { color: var(--muted); font-size: 11px; }
.hub-stats b { font-size: 15px; }
.hub-leaders { display: flex; flex-direction: column; gap: 8px; }
.hub-leaders a { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.hub-leaders a:hover { text-decoration: none; }
.hub-leaders a:hover b { color: var(--accent); }
.hub-leaders img, .hub-leaders .nb-nohead { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.hub-leaders span { display: flex; flex-direction: column; min-width: 0; }
.hub-leaders span b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.hub-leaders small { color: var(--muted); font-size: 11px; }
.hub-leaders strong { font-size: 15px; white-space: nowrap; }
.hub-div { width: 100%; border-collapse: collapse; font-size: 14px; }
.hub-div th { color: var(--muted); font-size: 11px; font-weight: 600; text-align: right; padding: 0 4px 6px; }
.hub-div td { text-align: right; padding: 7px 4px; border-top: 1px solid var(--line); }
.hub-div .l { text-align: left; }
.hub-div td a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 650; }
.hub-div tr.me td { background: color-mix(in srgb, var(--tc, var(--accent)) 14%, transparent); }
.hub-inj { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hub-inj li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hub-inj li:first-child { border-top: 0; padding-top: 0; }
.hub-inj li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inj-s { flex: none; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); }
.inj-out, .inj-injured { color: var(--bad-text); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.inj-doubtful, .inj-questionable { color: var(--warn-text); background: color-mix(in srgb, var(--gold) 16%, transparent); }
.hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hub-grid { grid-template-columns: minmax(0, 1fr); } }
.hs.bye { border-style: solid; border-color: transparent; background: var(--panel-2); }
.hub-story { display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.hub-story:hover { text-decoration: none; }
.hub-story:hover b { color: var(--accent); }
.hub-story .na { border-radius: 8px; overflow: hidden; }
.hub-story b { font-size: 15px; line-height: 1.3; }
.hub-heads { list-style: none; margin: 0; padding: 0; }
.hub-heads li { border-top: 1px solid var(--line); }
.hub-heads a { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; color: var(--text); }
.hub-heads a:hover { text-decoration: none; color: var(--accent); }
.hub-heads b { font-size: 14px; line-height: 1.3; }

/* Weekly league stories: Week in Review and Fantasy Stars */
.wk-art { background: linear-gradient(120deg, #0f3a2e 0%, #164c3c 55%, #08201a 100%); }
.wk-fantasy { background: linear-gradient(120deg, #3a2a08 0%, #6b4a0c 50%, #1e1604 100%); }
.wk-power { background: linear-gradient(120deg, #14213d 0%, #1f3a6b 55%, #0a1224 100%); }
.wk-upset { background: linear-gradient(120deg, #3d1414 0%, #6b1f2a 55%, #1f0a0d 100%); }
.pr-table td, .pr-table th { white-space: nowrap; }
.pr-table th { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pr-team { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.pr-up { color: var(--good-text, #2fa36b); font-size: 11px; font-weight: 700; }
.pr-down { color: var(--bad-text, #d64545); font-size: 11px; font-weight: 700; }
.pr-same { color: var(--faint); font-size: 11px; }
.pr-table td.pos { color: var(--good-text, #2fa36b); }
.pr-table td.neg { color: var(--bad-text, #d64545); }
.up-board { display: grid; gap: 6px; }
.up-board a { display: grid; grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr) 110px; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px; background: var(--panel-2); color: var(--text); }
.up-board a:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.up-dog, .up-fav { display: flex; align-items: center; gap: 6px; min-width: 0; }
.up-dog small, .up-fav small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-line { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.up-line small { display: block; color: var(--faint); font-weight: 500; font-size: 10px; }
.up-chance { position: relative; height: 22px; border-radius: 6px; background: color-mix(in srgb, var(--line-2) 60%, transparent); overflow: hidden; }
.up-chance i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.up-chance em { position: relative; display: block; text-align: right; padding-right: 6px; font-style: normal; font-weight: 700; font-size: 12px; line-height: 22px; }
.nb-note { font-size: 11px; margin: 8px 0 0; }
@media (max-width: 520px) {
  .up-board a { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
  .up-chance { grid-column: 1 / -1; }
}
.wk-wall { position: absolute; inset: -6% -4% -6% 34%; z-index: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6%; align-content: center; transform: rotate(-8deg); opacity: .55; }
.wk-wall img { width: 100%; aspect-ratio: 1; object-fit: contain; background: rgb(255 255 255 / .92); border-radius: 50%; padding: 10%; }
.wk-title { position: absolute; left: 12px; bottom: 10px; z-index: 3; display: flex; flex-direction: column; line-height: 1; text-shadow: 0 2px 8px rgb(0 0 0 / .4); }
.wk-title small { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #f6c875; margin-bottom: 4px; }
.wk-title b { font-size: 28px; font-weight: 800; }
.na.big .wk-title { left: 20px; bottom: 18px; }
.na.big .wk-title small { font-size: 13px; }
.na.big .wk-title b { font-size: 54px; }
.wk-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 6px; }
.wk-results a { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel); }
.wk-results a:hover { border-color: var(--accent); text-decoration: none; }
.wk-results a > span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.wk-results a > span.won { color: var(--text); }
.wk-results em { margin-left: auto; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.wk-results small { position: absolute; top: 4px; right: 50%; transform: translateX(50%); font-size: 9px; font-weight: 800; color: var(--warn-text); }
.wk-stars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.fs-pos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 6px; }
.fs-pos span { display: flex; flex-direction: column; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-width: 0; }
.fs-pos small { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.fs-pos b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-pos em { font-style: normal; font-weight: 800; color: var(--warn-text); }
.fs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fs-table td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: middle; }
.fs-table .rk { width: 28px; white-space: nowrap; color: var(--muted); font-weight: 700; text-align: center; }
.fs-table .pts { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fs-table .fs-line { color: var(--muted); font-size: 12px; }
.fs-who { display: flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.fs-who img, .fs-who .nb-nohead { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--panel-2); flex: none; }
.fs-who span { display: flex; flex-direction: column; min-width: 0; }
.fs-who small { color: var(--muted); font-size: 11px; }
@media (max-width: 640px) { .fs-table .fs-line { display: none; } }
/* Sydney's profile page */
.sydney-page { max-width: 860px; margin: 0 auto; display: grid; gap: 18px; }
.sydney-hero { display: flex; gap: 28px; align-items: center; padding: 8px 0 4px; }
.sydney-hero img { flex: none; width: 160px; height: 160px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px var(--accent), 0 10px 30px rgba(0,0,0,.18); }
.sydney-hero h1 { margin: 2px 0 8px; font-size: 34px; }
.sydney-kicker { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--accent); }
.sydney-lede { font-size: 17px; line-height: 1.5; margin: 0 0 8px; }
.sydney-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 22px; margin: 0; }
.sydney-kinds dt { font-weight: 700; }
.sydney-kinds dd { margin: 2px 0 0; color: var(--muted); }
.sydney-steps { margin: 0; padding-left: 22px; display: grid; gap: 12px; }
.sydney-steps li b { display: block; }
.sydney-steps li span { color: var(--muted); line-height: 1.5; }
.sydney-foot { font-size: 13px; }
.news-by .sydney-link { display: flex; border-radius: 50%; }
@media (max-width: 600px) {
  .sydney-hero { flex-direction: column; text-align: center; gap: 14px; }
  .sydney-hero img { width: 128px; height: 128px; }
}

/* Links to Sydney's profile stand out in the accent color. */
a[href="#/sydney"]:not(.sydney-link):not(.btn):not(.about-card) { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a[href="#/sydney"]:not(.sydney-link):not(.btn):not(.about-card):hover { text-decoration-thickness: 2px; }

.league-badge { width: 32px; height: 32px; flex: none; object-fit: contain; vertical-align: middle; }
.league-badge-lg { width: 44px; height: 44px; }
.badge-picker { min-width: 0; border: 0; margin: 10px 0 0; padding: 0; }
.badge-picker legend { font-weight: 700; padding: 0; margin-bottom: 8px; }
.badge-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(60px, 100%), 1fr)); gap: 6px; }
.badge-option { position: relative; min-width: 0; cursor: pointer; }
.badge-option input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.badge-tile { display: grid; place-items: center; gap: 3px; height: 100%; padding: 6px 2px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 10px; text-align: center; }
.badge-tile .league-badge { width: 36px; height: 36px; }
.badge-default { display: grid; place-items: center; width: 36px; height: 36px; color: var(--muted); font-size: 23px; }
.badge-option input:checked + .badge-tile { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.badge-option input:focus-visible + .badge-tile { outline: 2px solid var(--accent); outline-offset: 2px; }
.league-team-head { flex-wrap: wrap; overflow-wrap: anywhere; }
.league-matchup-name { display: flex; align-items: center; gap: 4px; overflow-wrap: anywhere; min-width: 0; }
.league-matchup-name .league-badge { width: 24px; height: 24px; }
.matchup-card .side { min-width: 0; overflow-wrap: anywhere; }
.order-list .bot-brand-link { margin-left: auto; flex: none; }
.order-list span { min-width: 0; overflow-wrap: anywhere; }
.league-standings .who { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .league-standings table { table-layout: fixed; }
  .league-standings th:first-child { width: 26px; }
  .league-standings th:nth-child(3) { width: 46px; }
  .league-standings th:nth-child(n+4) { width: 60px; }
  .league-standings td:nth-child(n+3) { font-size: 13px; }
  .league-standings td, .league-standings th { padding-inline: 3px; }
  .league-standings .who { gap: 4px; }
  .league-standings .league-badge { width: 24px; height: 24px; }
}

.forecast-note { font-size: 13px; }
.forecast-total { color: var(--accent); font-size: 12px; }
.forecast-chance { padding: 0 18px 12px; }
.forecast-chance-labels { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
.forecast-chance-labels span { color: var(--muted); font-size: 12px; }
.forecast-track { margin-top: 4px; height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--home-chance), var(--line-2) var(--home-chance)); }
.mu-detail { grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); }
.mu-detail .c { min-width: 0; overflow-wrap: anywhere; }
.mu-detail .c small { display: block; }
.mu-detail .c.mid .ptag { white-space: nowrap; padding-inline: 3px; }
.mu-detail .p { flex: 0 0 auto; max-width: 48%; }
.mu-detail .p small { font-size: 10px; font-weight: 600; }
@media (max-width: 480px) {
  .forecast-chance { padding-inline: 12px; }
  .mu-detail { grid-template-columns: minmax(0, 1fr) 39px minmax(0, 1fr); }
  .mu-detail .c { gap: 4px; }
}

.group-identity { margin-top: 12px; align-items: start; }
.group-identity > * { min-width: 0; }
.group-identity h2 { font-size: 16px; overflow-wrap: anywhere; }
.group-bots-branding { margin-top: 12px; }
.entry-badge { display: inline-flex; flex: none; align-items: center; }
.others .entry-badge .league-badge { width: 21px; height: 21px; }
.entry .panel-head h2 { min-width: 0; overflow-wrap: anywhere; }

/* Collapsible forms (phones only); on wider screens the toggle is plain heading text. */
.fold-toggle { all: unset; display: block; }
@media (max-width: 700px) {
  .fold:not(.open) > :not(h2) { display: none; }
  .fold > h2 { margin: 0; }
  .fold-toggle { cursor: pointer; display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .fold-toggle::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--muted); line-height: 1; }
  .fold.open .fold-toggle::after { content: '\2212'; }
  .fold-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
  .fold.open > h2 { margin-bottom: 12px; }
  .hub .panel-head { flex-wrap: wrap; row-gap: 2px; }
  .hub .panel-head .muted { flex-basis: 100%; }
}

.slot.empty[role="button"] { cursor: pointer; }
.slot.empty[role="button"]:hover .pname { color: var(--accent); }
.builder > .panel:last-child { scroll-margin-top: 12px; }
/* Keep sticky save bars above the phone bottom nav. */
@media (max-width: 760px) {
  .savebar { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .savebar { flex-wrap: wrap; row-gap: 8px; padding: 10px 14px; }
  .savebar .btn { white-space: nowrap; }
  .savebar > .muted { flex-basis: 100%; font-size: 13px; }
}

/* Admin: edit a member's account */
.admin-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-edit-grid > form + form { border-left: 1px solid var(--line); }
.admin-edit h3 { font-size: 14px; margin: 0 0 10px; }
@media (max-width: 760px) {
  .admin-edit-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-edit-grid > form + form { border-left: 0; border-top: 1px solid var(--line); }
  .admin-edit .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-edit .panel-head { flex-wrap: wrap; row-gap: 2px; }
  .admin-edit .panel-head .muted { flex-basis: 100%; }
}
.avatar-pic { object-fit: cover; background: var(--line); padding: 0; }

/* Settings */
.settings > div { display: flex; flex-direction: column; gap: 16px; }
.pic-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pic-big .avatar { width: 88px; height: 88px; font-size: 32px; }
.tos ul { color: var(--muted); line-height: 1.65; padding-left: 20px; margin: 0 0 1em; }
.settings p.muted a { color: var(--accent); text-decoration: underline; }
.check a { color: var(--accent); text-decoration: underline; }

/* Play money: create-form fields, the pot and side bets */
.money-fields { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 4px; margin: 12px 0; }
.money-fields legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 6px; }
.money-tab { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.pot-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); }
.pot-head small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pot-head b { font-size: 24px; font-variant-numeric: tabular-nums; }
.pot-prizes { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pot-note { font-size: 12px; padding: 0 16px 12px; }
.sb-group { margin: 14px 0; }
.sb-group h3 { font-size: 13px; color: var(--muted); margin: 0 0 6px; font-weight: 700; }
.sb-closes { font-weight: 400; font-size: 12px; margin-left: 6px; }
.sb-outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.sb-pick { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2, var(--panel)); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.sb-pick b { font-variant-numeric: tabular-nums; }
.sb-pick:hover:not(:disabled) { border-color: var(--accent); }
.sb-pick.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sb-pick:disabled { opacity: .5; cursor: not-allowed; }
.sb-slip { position: sticky; bottom: 0; background: var(--panel); border: 1px solid var(--accent); border-radius: var(--radius); padding: 12px 14px; margin-top: 12px; }
.sb-slip .sb-sel { margin-bottom: 8px; }
.owner-money p { margin: 4px 0 10px; }
@media (max-width: 760px) {
  .sb-slip { bottom: calc(62px + env(safe-area-inset-bottom)); }
  .pot-head b { font-size: 19px; }
  .money-fields .grid-form { grid-template-columns: minmax(0, 1fr); }
  .side-bets .panel-head { flex-wrap: wrap; row-gap: 2px; }
  .side-bets .panel-head .muted { flex-basis: 100%; }
}

/* #/backtests */
.page-head .head-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.bt-seasons { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.bt-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.bt-pill { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--text); background: var(--panel); }
.bt-pill span, .bt-badge span { font-weight: 800; }
.bt-pill.good span, .bt-badge.good { color: var(--good-text); }
.bt-pill.watch span, .bt-badge.watch { color: var(--warn-text); }
.bt-pill.problem span, .bt-badge.problem { color: var(--bad-text); }
.bt-badge { font-size: 13px; font-weight: 700; white-space: nowrap; }
.bt-section { margin-bottom: 16px; scroll-margin-top: 80px; }
.bt-findings { margin: 0 0 14px; padding-left: 20px; line-height: 1.55; }
.bt-table-title { font-size: 14px; margin: 18px 0 2px; }
.bt-note { font-size: 12px; margin: 0 0 6px; }
.bt-section .stats td, .bt-section .stats th { font-variant-numeric: tabular-nums; }
.bt-section .tbl-wrap { max-width: 880px; }
/* A lineup slot already shows its position; repeat it beside the player only
   where it adds something (FLEX and bench slots). */
.slot:has(> .ptag-QB) .pinfo .ptag-QB, .slot:has(> .ptag-RB) .pinfo .ptag-RB, .slot:has(> .ptag-WR) .pinfo .ptag-WR,
.slot:has(> .ptag-TE) .pinfo .ptag-TE, .slot:has(> .ptag-K) .pinfo .ptag-K, .slot:has(> .ptag-DST) .pinfo .ptag-DST { display: none; }
/* Phone story lists: a thumbnail beside the headline instead of a full card.
   "Around the league" keeps its first two stories full size. */
@media (max-width: 640px) {
  .news-compact, .news-around { gap: 10px; }
  :is(.news-compact .news-card, .news-around .news-card:nth-child(n+3)) { display: grid; grid-template-columns: 118px minmax(0, 1fr); align-items: stretch; }
  :is(.news-compact .news-card, .news-around .news-card:nth-child(n+3)) .na { aspect-ratio: auto; min-height: 88px; height: 100%; border-radius: var(--radius) 0 0 var(--radius); }
  :is(.news-compact .news-card, .news-around .news-card:nth-child(n+3)) :is(.na-kind, .na-match) { display: none; }
  :is(.news-compact .news-card, .news-around .news-card:nth-child(n+3)) .na-wm { width: 110%; left: -15%; top: -10%; }
  :is(.news-compact .news-card, .news-around .news-card:nth-child(n+3)) .nc-body { padding: 10px 12px; gap: 4px; justify-content: center; }
  :is(.news-compact .news-card, .news-around .news-card:nth-child(n+3)) b { font-size: 14px; }
  :is(.news-compact .news-card, .news-around .news-card:nth-child(n+3)) .nc-summary { display: none; }
}
/* This week's to-do on the Pick'em and Fantasy hubs. */
.group-list .todo { display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--on-accent); background: var(--accent); }
.group-list .todo.done { color: var(--good-text); background: color-mix(in srgb, var(--good) 14%, transparent); }
/* Phones: the weekly leaders panel shows the top three and you; Standings has the rest. */
.wk-all { display: none; }
@media (max-width: 1000px) { .pick-layout .wk-extra { display: none !important; } .pick-layout .wk-all { display: inline; margin-left: auto; } }
.wk-all { color: var(--accent); font-weight: 650; }
/* A starter spot that will score nothing (empty, or a player on bye) stands out until it's fixed. */
.slots .slot.needs { background: color-mix(in srgb, var(--warn, #e0a500) 12%, var(--panel)); box-shadow: inset 3px 0 0 var(--warn, #e0a500); }
/* Phones: a contest salary stays on the player's line instead of dropping to its own row. */
@media (max-width: 640px) {
  .slot:has(> span.pinfo:nth-child(3)) { grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 8px; }
  .slot > span.pinfo:nth-child(3) { grid-column: auto; order: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
}
/* Phones: player pickers wrap the game line instead of pushing the points off screen;
   free agents keep Avg and Week and drop GP and Total. */
@media (max-width: 640px) {
  table.ptable td.l { white-space: normal; }
  table.ptable .pinfo { line-height: 1.45; }
  #fa-table tr > :nth-child(3), #fa-table tr > :nth-child(5) { display: none; }
  #fa-table td, #fa-table th { padding-inline: 6px; }
}
@media (max-width: 640px) {
  .salary-table td, .salary-table th { padding-inline: 4px; }
  .salary-table td:first-child, .salary-table th:first-child { padding-left: 8px; }
  .salary-table .head-img, .salary-table .logo { width: 28px; height: 28px; }
  .salary-table .pl { gap: 6px; }
  .salary-table td.l { font-size: 13.5px; }
}
@media (max-width: 640px) {
  .salary-table td:first-child { width: 30px; padding-right: 0; }
  .salary-table .add-btn { width: 28px; height: 28px; }
}
@media (max-width: 640px) {
  .salary-table tr > :nth-child(5) { display: none; }
}
@media (max-width: 640px) {
  .salary-table td { font-size: 13px; }
  .salary-table .pinfo { font-size: 11.5px; }
}
/* League matchups: other teams' lineups fold on phones; yours stays open. */
.mu-fold > summary { list-style: none; cursor: pointer; padding: 8px 14px; border-top: 1px solid var(--line); text-align: center;
  font-size: 13px; font-weight: 650; color: var(--accent); }
.mu-fold > summary::-webkit-details-marker { display: none; }
.mu-fold > summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.mu-fold[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.mu-fold .when-open, .mu-fold[open] .when-closed { display: none; }
.mu-fold[open] .when-open { display: inline; }
@media (min-width: 641px) { .mu-fold > summary { display: none; } }
/* Contest scoreboard on phones: points stay on the player's line. */
@media (max-width: 640px) {
  .entry .slot > span.pts:nth-child(3) { grid-column: auto; order: 0; }
}
/* Bench on phones: Drop and the points sit on the player's line. */
@media (max-width: 640px) {
  .slots.bench .slot { grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 8px; }
  .slots.bench .slot > span:nth-child(3) { grid-column: auto; order: 0; }
  .slots.bench .slot > span:nth-child(3):empty { display: none; }
  .slots.bench .slot:has(> span:nth-child(3):empty) { grid-template-columns: 40px minmax(0, 1fr) auto; }
}
@media (max-width: 640px) { .slots.bench .pinfo .nowrap { white-space: normal; } .slots.bench .slot > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; } }
.savebar .unsaved { color: var(--warn-text); font-weight: 700; }
.tag.inj-q { background: color-mix(in srgb, var(--warn-text) 14%, transparent); color: var(--warn-text); border-color: color-mix(in srgb, var(--warn-text) 40%, transparent); }
/* Pick'em tiebreaker */
.tb-panel { margin-top: 12px; }
.tb-panel label { display: block; margin-bottom: 8px; line-height: 1.4; }
.tb-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-row .inp { width: 96px; font-size: 18px; font-weight: 700; text-align: center; }
.tb-row .muted { flex: 1; min-width: 200px; font-size: 13px; }
/* Admin: ESPN data source */
.espn-src { margin-bottom: 16px; }
.espn-row { display: grid; grid-template-columns: 12px minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.espn-row.on { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.espn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad-text); }
.espn-dot.ok { background: var(--good-text); }
.espn-name small { display: block; overflow-wrap: anywhere; }
.espn-check { font-size: 13.5px; }
.espn-check.ok { color: var(--good-text); }
.espn-check.bad { color: var(--bad-text); }
.tag.espn-active { background: var(--accent); color: var(--on-accent, #fff); border-color: transparent; }
.espn-help { padding: 4px 16px 14px; font-size: 13px; margin: 0; }
.espn-src .panel-head { flex-wrap: wrap; gap: 4px 10px; }
@media (max-width: 640px) {
  .espn-row { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .espn-check { grid-column: 2 / -1; grid-row: 2; }
}

/* Sydney's desk (admin) */
.nk-feature { color: #8b5cf6; }
.sy-desk { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 0; }
.sy-desk > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.sy-desk .sy-dot { transform: translateY(-1px); }
.sy-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.sy-dot.ok { background: var(--good-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good-text) 25%, transparent); }
.sy-tabs { overflow-x: auto; scrollbar-width: none; }
.sy-tabs a { white-space: nowrap; }
.sy-count { color: var(--accent); font-variant-numeric: tabular-nums; }
.sy-h { font-size: 16px; margin: 22px 0 8px; }
.sy-note { margin: 6px 0 12px; font-size: 13.5px; }
.sy-note .btn { margin-left: 8px; }
.sy-tiles { margin: 0 0 16px; }
.sy-tiles .tile span { display: block; margin: 2px 0 0; }
.sy-cols { margin-bottom: 16px; }
.sy-cols > .panel { margin: 0; }
#sy-body > .panel { margin-bottom: 16px; }
.sy-top { margin: 0; padding: 8px 16px 12px 36px; }
.sy-top li { padding: 6px 0; }
.sy-top small { display: block; }
.sy-weeks td, .sy-weeks th { white-space: nowrap; }
.sy-run { border-top: 1px solid var(--line); }
.sy-run summary { display: grid; grid-template-columns: 110px 100px 1fr 1.2fr auto; gap: 10px; padding: 10px 16px; cursor: pointer; font-size: 13.5px; align-items: center; }
.sy-run.bad summary { box-shadow: inset 3px 0 0 var(--bad-text); }
.sy-run-body { padding: 0 16px 12px; font-size: 13.5px; }
.sy-run-body ul { margin: 0 0 6px; padding-left: 18px; }
.sy-run-body li { margin: 4px 0; overflow-wrap: anywhere; }
.sy-draft { margin-bottom: 14px; }
.sy-draft .panel-head small { display: block; margin-top: 2px; }
.sy-angle { background: var(--panel-2); border-radius: 8px; padding: 8px 12px; font-size: 13.5px; margin: 0 0 12px; white-space: pre-line; }
.sy-text { max-width: 70ch; }
.sy-text h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.3; }
.sy-text p { margin: 0 0 10px; line-height: 1.55; }
.sy-edit textarea { width: 100%; font: inherit; line-height: 1.5; }
.sy-edit input { width: 100%; }
.sy-actions { flex-wrap: wrap; gap: 8px; }
.sy-note-form { margin-top: 10px; display: grid; gap: 8px; }
.sy-note-form textarea { width: 100%; font: inherit; }
.sy-art { display: grid; grid-template-columns: minmax(0, 1fr) 56px 56px auto; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.sy-art:first-child { border-top: 0; }
.sy-art.hidden-art .sy-art-main a { opacity: .6; }
.sy-art-main small { display: block; }
.sy-art-stats { text-align: center; line-height: 1.1; }
.sy-art-stats b { display: block; font-variant-numeric: tabular-nums; }
.sy-art-stats small { color: var(--faint); font-size: 11px; }
.sy-art-btns { display: flex; gap: 6px; }
.sy-art-form { grid-column: 1 / -1; }
.sy-art-form .form-actions { margin-top: 8px; }
.sy-ideas, .sy-reqs { display: grid; }
.sy-idea { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--line); }
.sy-idea:first-child { border-top: 0; }
.sy-idea small { display: block; margin-top: 2px; }
.sy-idea .btn { flex: none; }
.sy-req { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); }
.sy-req:first-child { border-top: 0; }
.sy-req small { display: block; margin-top: 2px; }
.sy-req-angle { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.sy-st { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.st-draft .sy-st { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.st-writing .sy-st { color: var(--text); }
.st-published .sy-st { color: var(--good-text); }
.st-failed .sy-st { color: var(--bad-text); }
.sy-req-btns { display: flex; gap: 6px; }
#sy-req-form textarea, #sy-req-form .inp { width: 100%; }
#sy-req-form textarea { font: inherit; }
.sy-chat { display: flex; flex-direction: column; height: min(68vh, 680px); margin: 0 0 8px; }
.sy-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sy-msg { max-width: min(80%, 620px); display: flex; flex-direction: column; gap: 3px; }
.sy-msg.from-me { align-self: flex-end; align-items: flex-end; }
.sy-bubble { padding: 9px 13px; border-radius: 14px; background: var(--panel-2); line-height: 1.45; overflow-wrap: anywhere; }
.sy-bubble p { margin: 0 0 6px; }
.sy-bubble p:last-of-type { margin-bottom: 0; }
.from-me .sy-bubble { background: var(--accent); color: var(--on-accent, #fff); border-bottom-right-radius: 4px; }
.from-her .sy-bubble { border-bottom-left-radius: 4px; }
.sy-msg.failed .sy-bubble { opacity: .6; }
.sy-queued { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 700; }
.sy-thinking { padding: 0 16px 8px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sy-thinking[hidden] { display: none; }
.sy-typing { display: inline-flex; gap: 3px; }
.sy-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: sy-blink 1.2s infinite; }
.sy-typing i:nth-child(2) { animation-delay: .2s; }
.sy-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes sy-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sy-typing i { animation: none; opacity: .6; } }
.sy-compose { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.sy-compose textarea { flex: 1; font: inherit; resize: none; min-height: 44px; }
@media (max-width: 760px) {
  .sy-run summary { grid-template-columns: 1fr auto; gap: 2px 10px; }
  .sy-run summary span:nth-child(3), .sy-run summary span:nth-child(4) { grid-column: 1; }
  .sy-art { grid-template-columns: minmax(0, 1fr) 48px 48px; }
  .sy-art-btns { grid-column: 1 / -1; flex-wrap: wrap; }
  .sy-req { grid-template-columns: minmax(0, 1fr) auto; }
  .sy-req-btns { grid-column: 1 / -1; }
  .sy-req-btns:empty { display: none; }
  .sy-msg { max-width: 92%; }
  .sy-chat { height: 64vh; }
  .sy-idea { flex-direction: column; align-items: stretch; }
}
