/* The DFS tab (studio-dfs.js): upload, the lineup card, builds and the player pool; the study's Today
   panel, latest result and Record (dfs-today.js) at the end. */
.dfs-page { display:grid; gap:1rem; min-width:0; }
.dfs-page.is-dragging { outline:2px dashed var(--accent); outline-offset:0.375rem; border-radius:var(--r-card); }
.dfs-page :is(h2, h3) { margin:0; }
.dfs-page h3 { font-size:1.25rem; font-weight:900; text-transform:uppercase; }
.dfs-hint { margin:0; color:var(--muted); font-size:0.8125rem; line-height:1.4; }
.dfs-note, .dfs-alert { margin:0; padding:0.625rem 0.875rem; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-subtle); color:var(--muted); font-size:0.8125rem; line-height:1.45; }
.dfs-alert { display:flex; flex-wrap:wrap; align-items:center; gap:0.75rem; border-color:var(--thin); background:var(--thin-bg); color:var(--ink); }
.dfs-alert p { flex:1 1 16rem; margin:0; }
.dfs-top { display:grid; gap:0.75rem; }

.dfs-top:empty { display:none; }

/* The tab's own title row (the shared heading is hidden here), the upload box opposite the title. */
body[data-active-view=dfs] .page-heading { display:none; }
.dfs-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:0.75rem 1.5rem; }
.dfs-head:has(.dfs-upload-error:not([hidden])) { align-items:flex-start; }
.dfs-head-title { flex:1 1 18rem; display:grid; gap:0.375rem; min-width:0; }
.dfs-page .dfs-title { margin:0; font:800 2.125rem/1 var(--font-display); letter-spacing:-0.03em; color:var(--ink); }
.dfs-lede { margin:0; color:var(--muted); font-size:0.8125rem; line-height:1.5; max-width:53.125rem; }
.dfs-upload-slot { flex:0 1 27rem; min-width:0; margin-left:auto; }
.dfs-upload { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:0.5rem 1rem; padding:0.75rem 1rem; border-style:dashed; }
.dfs-page.is-dragging .dfs-upload { border-color:var(--accent); background:var(--accent-soft); }
.dfs-upload-text { display:grid; gap:0.1875rem; min-width:0; }
.dfs-page .dfs-upload h2 { font-size:1rem; line-height:1.2; }
.dfs-upload p { margin:0; color:var(--muted); font-size:0.8125rem; line-height:1.4; }
.dfs-upload p b { color:var(--ink); }
.dfs-upload .ar-btn { white-space:nowrap; }
.dfs-upload .dfs-upload-error { grid-column:1 / -1; padding-top:0.5rem; border-top:1px solid var(--line); color:var(--bad); overflow-wrap:anywhere; }
@media (max-width:40em) { .dfs-page .dfs-title { font-size:1.75rem; } }
@media (max-width:37.125em) {
  .dfs-upload-slot { flex-basis:100%; }
  .dfs-upload { grid-template-columns:minmax(0, 1fr); }
  .dfs-upload .ar-btn { justify-self:start; }
}
.dfs-page label.ar-btn { cursor:pointer; }
.dfs-page label.ar-btn:has(+ input:focus-visible) { outline:0.1875rem solid var(--accent); outline-offset:0.1875rem; }

.dfs-slate { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:0.75rem 1rem; }
.dfs-slate-title { display:grid; gap:0.375rem; min-width:0; }
.dfs-slate h2 { font-size:2rem; line-height:1; }
.dfs-facts { display:flex; flex-wrap:wrap; gap:0.375rem; margin:0; padding:0; list-style:none; }
.dfs-facts li { padding:0.125rem 0.5rem; border:1px solid var(--line); border-radius:var(--r-data); background:var(--surface); font:700 0.8125rem/1.4 var(--font-body); }
.dfs-facts li:first-child { background:var(--selected-bg); border-color:var(--accent); }
.dfs-file { margin:0; color:var(--muted); font-size:0.75rem; overflow-wrap:anywhere; }

.dfs-body { display:grid; gap:1rem; grid-template-columns:minmax(0, 1fr); }
.dfs-side, .dfs-main { display:grid; gap:1rem; align-content:start; min-width:0; }
@media (min-width:64em) {
  .dfs-body { grid-template-columns:minmax(0, 1.6fr) minmax(22rem, 1fr); }
  .dfs-side { grid-column:2; grid-row:1; position:sticky; top:calc(var(--topbar-height, 4rem) + 1rem); }
  .dfs-main { grid-column:1; grid-row:1; }
}

.dfs-table { width:100%; border-collapse:collapse; font-size:0.875rem; }
.dfs-page label { color:var(--ink); font-size:0.875rem; font-weight:600; }
.dfs-table :is(th, td) { padding:0.4375rem 0.5rem; border-right:0; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; }
.dfs-table thead th { color:var(--muted); font:700 0.6875rem/1.2 var(--font-body); text-transform:uppercase; letter-spacing:0.04em; white-space:nowrap; }
.dfs-table .dfs-num-cell { text-align:right; font-family:var(--font-mono); white-space:nowrap; }
.dfs-table th.dfs-num-cell { font-family:var(--font-body); }
.dfs-table small { display:block; color:var(--muted); font:600 0.75rem/1.2 var(--font-body); }
.dfs-table .dfs-num-cell small { font-family:var(--font-mono); }
.dfs-opp { white-space:nowrap; }
.dfs-name { font-weight:700; overflow-wrap:anywhere; }
.dfs-page .slate-tag { display:inline-block; padding:0.0625rem 0.375rem; border-radius:var(--r-data); background:var(--thin-bg); color:var(--thin); font:800 0.625rem/1.4 var(--font-body); letter-spacing:0.04em; vertical-align:middle; }
.dfs-page .slate-tag.is-out { background:var(--bad-bg); color:var(--bad); }

.dfs-lineup { padding:1rem; }
.dfs-lineup-head { display:flex; align-items:flex-start; justify-content:space-between; gap:0.75rem; margin-bottom:0.5rem; }
.dfs-rem { display:flex; gap:1rem; margin:0; text-align:right; }
.dfs-rem dt { color:var(--muted); font:700 0.6875rem/1.2 var(--font-body); }
.dfs-rem dd { margin:0.125rem 0 0; font:800 1.125rem/1.1 var(--font-mono); }
.dfs-lineup-table tbody tr.is-captain { background:color-mix(in srgb, var(--gold) 8%, transparent); }
.dfs-lineup-table td:first-child { width:3.25rem; }
.dfs-lineup-table tfoot :is(th, td) { border-bottom:0; padding-top:0.625rem; font-size:1rem; }
.dfs-lineup-table tfoot th { text-transform:uppercase; font:800 0.875rem var(--font-body); }
.dfs-lineup-table b, .dfs-proj b { color:var(--ink); font-weight:800; }
.dfs-empty-slot { color:var(--muted); font-style:italic; }
.dfs-cpt { display:inline-flex; align-items:center; gap:0.1875rem; padding:0.0625rem 0.375rem; border-radius:var(--r-data); background:var(--gold); color:var(--accent-ink); font:800 0.6875rem var(--font-mono); white-space:nowrap; }
.dfs-lineup-foot { display:flex; flex-wrap:wrap; align-items:center; gap:0.75rem; margin-top:0.75rem; }

.dfs-build { display:grid; gap:0.75rem; padding:1rem; }
.dfs-output { justify-self:start; }
.dfs-settings, .dfs-actions, .dfs-filters { display:flex; flex-wrap:wrap; align-items:end; gap:0.625rem; }
.dfs-page :is(.dfs-num, .dfs-filters label) { display:grid; gap:0.25rem; color:var(--muted); font:700 0.75rem var(--font-body); }
.dfs-page :is(input[type=number], input[type=search], select) { min-height:2.5rem; padding:0 0.5rem; border:1px solid var(--line); border-radius:var(--r-control); background:var(--bg); color:var(--ink); font:600 0.875rem var(--font-body); }
.dfs-page input[type=number] { width:5.5rem; font-family:var(--font-mono); }
.dfs-search { flex:1 1 12rem; }
.dfs-search input { width:100%; }

.dfs-results-wrap { display:grid; gap:0.5rem; }
.dfs-results { display:grid; gap:0.375rem; margin:0; padding:0; list-style:none; max-height:32rem; overflow-y:auto; }
.dfs-result { width:100%; display:grid; grid-template-columns:2rem auto 1fr; grid-template-areas:"rank pts sal" "rank names names"; align-items:baseline; gap:0.125rem 0.75rem; padding:0.5rem 0.625rem; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-subtle); color:var(--ink); text-align:left; }
.dfs-result:hover { background:var(--surface-raised); }
.dfs-result[aria-pressed=true] { background:var(--selected-bg); border-color:var(--accent); }
.dfs-result-rank { grid-area:rank; align-self:center; color:var(--muted); font:800 1rem var(--font-mono); }
.dfs-result-pts { grid-area:pts; font:800 1.125rem var(--font-mono); }
.dfs-result-pts small { margin-left:0.25rem; color:var(--muted); font:600 0.75rem var(--font-body); }
.dfs-result-sal { grid-area:sal; justify-self:end; color:var(--muted); font:700 0.875rem var(--font-mono); }
.dfs-result-names { grid-area:names; color:var(--muted); font-size:0.75rem; line-height:1.35; }
.dfs-exposure summary { cursor:pointer; padding:0.375rem 0; font-weight:700; }
.dfs-exposure .dfs-table { margin-top:0.25rem; }

.dfs-rules { display:grid; gap:0.625rem; margin:0; padding:1rem; min-width:0; }
.dfs-rules legend { float:left; width:100%; padding:0; font:900 1.25rem var(--font-display); text-transform:uppercase; }
.dfs-rule { display:flex; flex-wrap:wrap; align-items:end; gap:0.5rem 1rem; padding-top:0.625rem; border-top:1px solid var(--line); }
.dfs-rule > label, .dfs-rule > span:first-child { display:flex; align-items:center; gap:0.5rem; min-height:2.5rem; font-weight:700; }
.dfs-checks { display:flex; flex-wrap:wrap; gap:0.25rem 1rem; }
.dfs-checks label { display:flex; align-items:center; gap:0.375rem; min-height:2.5rem; }
.dfs-page input[type=checkbox] { width:1.125rem; height:1.125rem; accent-color:var(--accent); }

.dfs-pool { padding:1rem; min-width:0; }
.dfs-pool-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:0.5rem; margin-bottom:0.75rem; }
.dfs-filters { margin-bottom:0.75rem; }
.dfs-pool-scroll { overflow:auto; max-width:100%; max-height:min(40rem, 70vh); overscroll-behavior:contain; }
.dfs-pool thead th { position:sticky; top:0; z-index:1; background:var(--surface); }
.dfs-pool .dfs-table { min-width:36rem; }
.dfs-pool tbody tr:hover { background:var(--surface-subtle); }
.dfs-pool tr.is-excluded :is(.dfs-name, .dfs-num-cell) { opacity:0.45; text-decoration:line-through; }
.dfs-sort { padding:0; border:0; background:none; color:inherit; font:inherit; text-transform:inherit; letter-spacing:inherit; }
.dfs-sort:hover, [aria-sort=ascending] .dfs-sort, [aria-sort=descending] .dfs-sort { color:var(--ink); }
[aria-sort=ascending] .dfs-sort::after { content:" ▲"; }
[aria-sort=descending] .dfs-sort::after { content:" ▼"; }
.dfs-proj { display:inline-flex; align-items:center; gap:0.375rem; }
.dfs-source { padding:0.0625rem 0.3125rem; border:1px solid var(--line); border-radius:var(--r-data); color:var(--muted); font:700 0.625rem/1.4 var(--font-body); text-transform:uppercase; cursor:help; }
.dfs-source.is-ours { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.dfs-toggles { display:inline-flex; gap:0.25rem; }
.dfs-toggle { min-width:2.75rem; min-height:2rem; padding:0 0.5rem; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-subtle); color:var(--muted); font:700 0.75rem var(--font-body); }
.dfs-toggle:hover { color:var(--ink); }
.dfs-toggle[aria-pressed=true] { background:var(--selected-bg); border-color:var(--accent); color:var(--ink); }
.dfs-toggle.is-exclude[aria-pressed=true] { background:var(--bad-bg); border-color:var(--bad); color:var(--bad); }
/* NBA Classic's rules leave a player out (Ineligible, listed Out): greyed, not struck through, his Lock still live. */
.dfs-pool tr.is-ruled-out :is(.dfs-name, .dfs-num-cell) { opacity:0.45; }
.dfs-source[data-source=no-prop-ineligible] { border-color:var(--bad); background:var(--bad-bg); color:var(--bad); }

@media (max-width:30em) {
  .dfs-slate h2 { font-size:1.625rem; }
  .dfs-lineup, .dfs-build, .dfs-rules, .dfs-pool { padding:0.75rem; }
  .dfs-lineup-head { flex-wrap:wrap; }
  .dfs-lineup-table :is(th, td) { padding:0.375rem 0.25rem; }
  .dfs-lineup-table { font-size:0.8125rem; }
  .dfs-pool .dfs-team-col { display:none; }
  .dfs-pool .dfs-table { min-width:30rem; }
}

/* The study panel, latest result and Record (dfs-today.js). #dfsWork is only a holder within the page's grid. */
.dfs-work { display:contents; }
.dfs-today-wrap { display:grid; grid-template-columns:minmax(0, 1fr); gap:1rem; min-width:0; }
.dfs-today, .dfs-recent { display:grid; grid-template-columns:minmax(0, 1fr); gap:0.75rem; padding:1.25rem; min-width:0; }
.dfs-today { border-color:var(--accent); }
.dfs-today-head { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:0.5rem 1rem; }
.dfs-today-headline { display:grid; gap:0.25rem; min-width:0; flex:1 1 16rem; }
.dfs-today-head .ar-label { color:var(--accent); }
/* Wide enough for "Locks in 23h 59m", so the ticking text never shifts the layout. */
.dfs-countdown { flex:none; box-sizing:content-box; min-width:17ch; padding:0.25rem 0.625rem; border:1px solid var(--accent); border-radius:var(--r-data); background:var(--accent-soft); color:var(--ink);
  font:800 0.875rem/1.4 var(--font-mono); font-variant-numeric:tabular-nums; text-align:center; white-space:nowrap; }
.dfs-live { border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-subtle); font-size:0.875rem; min-width:0; }
.dfs-live > summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:0.25rem 0.75rem; padding:0.5rem 0.875rem; cursor:pointer; }
.dfs-live-body { display:grid; grid-template-columns:minmax(0, 1fr); gap:0.75rem; padding:0 0.875rem 0.875rem; min-width:0; }
.dfs-live-tag { padding:0.0625rem 0.375rem; border-radius:var(--r-data); background:var(--bad-bg); color:var(--bad); font:800 0.6875rem/1.4 var(--font-body); letter-spacing:0.04em; text-transform:uppercase; }
.dfs-live-name { font-weight:800; }
.dfs-live-top b { font-family:var(--font-mono); }
/* A live NBA slate: FPTS so far and PROJ per player and lineup, the player's game clock beside his team. */
.dfs-clock { white-space:nowrap; }
.dfs-clock:not(:empty)::before { content:" · "; }
.dfs-entry-nums.is-live small { display:inline; margin-left:0.1875rem; color:var(--muted); font:700 0.5625rem var(--font-body); letter-spacing:0.04em; }
.dfs-entry-row.is-live > summary { grid-template-columns:auto minmax(0, 1fr) auto; }
.dfs-entry-row.is-live > summary::after { grid-column:3; grid-row:1; }
.dfs-entry-row.is-live .dfs-entry-nums { grid-column:2; grid-row:1; justify-self:end; }
.dfs-entry-row.is-live .dfs-entry-names { grid-column:1 / -1; grid-row:2; }
/* The first entry's card; beside it on wide screens the other entries, where to enter and the paper entries. */
.dfs-today-entries { display:grid; gap:0.75rem 1.25rem; grid-template-columns:minmax(0, 1fr); align-items:start; }
.dfs-today-side { display:grid; grid-template-columns:minmax(0, 1fr); gap:0.75rem; align-content:start; min-width:0; }
.dfs-today-side > .dfs-today-sub { margin-top:0.25rem; }
@media (min-width:64em) {
  .dfs-today-entries { grid-template-columns:minmax(22rem, 32rem) minmax(0, 1fr); }
  .dfs-today-side > .dfs-today-sub:first-child { margin-top:0; }
}
.dfs-player { display:flex; align-items:center; gap:0.5rem; min-width:0; }
.dfs-player-text { min-width:0; }
.dfs-photo { flex:none; display:block; }
.dfs-photo .player-avatar { position:relative; display:grid; place-items:center; width:2rem; height:2rem; overflow:hidden; box-sizing:border-box; border:1px solid var(--line); border-radius:50%;
  background:var(--surface-raised); color:var(--muted); font:800 0.625rem/1 var(--font-body); }
.dfs-photo .player-headshot { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; }
.dfs-photo .player-avatar.has-photo .avatar-initials { visibility:hidden; }
.dfs-photo .dfs-team-logo { border-color:transparent; background:none; }
.dfs-photo .dfs-team-logo .team-mini-badge { width:1.625rem; height:1.625rem; min-width:0; margin:0; }
.dfs-team { display:inline-flex; align-items:center; gap:0.25rem; }
.dfs-team .team-mini-badge { width:0.875rem; height:0.875rem; min-width:0; }
.dfs-title-team { display:inline-flex; align-items:center; gap:0.3em; white-space:nowrap; }
.dfs-title-team .team-mini-badge { width:1.1em; height:1.1em; min-width:0; }
/* The code beside it already names the team, so a badge with no logo (no URL, or a failed image
   players.js removed) folds away instead of leaving arcade.css's empty disc. */
.dfs-team .team-logo-badge:empty, .dfs-title-team .team-logo-badge:empty { display:none; }
.dfs-entry-player { display:inline-flex; align-items:center; gap:0.25rem; vertical-align:middle; }
.dfs-entry-player .dfs-photo .player-avatar { width:1.375rem; height:1.375rem; font-size:0.5rem; }
.dfs-entry-player .dfs-team-logo .team-mini-badge { width:1.125rem; height:1.125rem; }
.dfs-entry-sep { color:var(--muted); }
.dfs-page .dfs-pay.is-up { color:var(--good); }
.dfs-page .dfs-pay.is-down { color:var(--bad); }
.dfs-page .dfs-pay.is-even { color:var(--muted); }
.dfs-basis, .dfs-table small.dfs-basis { display:inline; color:var(--muted); font:700 0.6875rem var(--font-body); }
.dfs-entry-rows { display:grid; gap:0.375rem; margin:0; padding:0; list-style:none; min-width:0; }
.dfs-entry-row { border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-subtle); min-width:0; }
.dfs-entry-row[open] { border-color:var(--accent); }
.dfs-entry-row > summary { display:grid; grid-template-columns:auto minmax(0, 1fr) auto auto; align-items:center; gap:0.25rem 0.625rem; min-height:2.75rem; padding:0.375rem 0.75rem; cursor:pointer; list-style:none; }
.dfs-entry-row > summary::-webkit-details-marker { display:none; }
.dfs-entry-row > summary::after { content:"▸"; grid-column:4; color:var(--muted); }
.dfs-entry-row[open] > summary::after { content:"▾"; }
.dfs-entry-names { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:0.8125rem; color:var(--ink); }
.dfs-entry-nums { display:flex; gap:0.625rem; font:600 0.8125rem var(--font-mono); white-space:nowrap; }
.dfs-entry-sal { color:var(--muted); }
.dfs-entry-row .dfs-today-card { margin:0 0.5rem 0.5rem; background:var(--surface); }
.dfs-contest-lineups { color:var(--muted); font:600 0.75rem var(--font-body); }
.dfs-page .pos-chip.dfs-pos { box-sizing:content-box; min-width:2.1em; border:1px solid transparent; }
.dfs-today-head h2 { font-size:1.75rem; line-height:1.05; }
.dfs-today-empty { margin:0; color:var(--ink); font-weight:700; }
.dfs-page .dfs-facts li.is-late { border-color:var(--thin); background:var(--thin-bg); color:var(--thin); }
.dfs-page .dfs-today-sub { margin-top:0.25rem; font-size:1rem; }
.dfs-today-subhead { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:0.5rem 1rem; margin-top:0.25rem; }
.dfs-today-subhead .dfs-today-sub { margin:0; }
.dfs-today-scroll { overflow-x:auto; max-width:100%; }
.dfs-contests { min-width:20rem; }
.dfs-role { display:inline-block; padding:0.0625rem 0.375rem; border:1px solid var(--accent); border-radius:var(--r-data); background:var(--accent-soft); color:var(--accent); font:800 0.625rem/1.4 var(--font-body); letter-spacing:0.04em; text-transform:uppercase; vertical-align:middle; }
.dfs-role[data-role=double_up] { border-color:var(--gold); background:color-mix(in srgb, var(--gold) 14%, transparent); color:var(--gold); }
.dfs-table small .dfs-role { margin-top:0.25rem; }
.dfs-today-card { display:grid; gap:0.5rem; align-content:start; padding:0.75rem; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-subtle); min-width:0; }
.dfs-today-card-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:0.5rem; }
.dfs-roles { display:flex; gap:0.25rem; }
.dfs-today-card .dfs-role { font-size:0.75rem; }
.dfs-today-card .dfs-lineup-table td:first-child { width:3rem; }
.dfs-today-score { display:flex; flex-wrap:wrap; gap:0.5rem 1.25rem; margin:0; padding-top:0.5rem; border-top:1px solid var(--line); }
.dfs-today-score dt, .dfs-contest-result dt { color:var(--muted); font:700 0.6875rem/1.2 var(--font-body); }
.dfs-today-score dd { margin:0.125rem 0 0; font:800 1.125rem/1.1 var(--font-mono); }
.dfs-finishes { display:grid; gap:0.25rem; margin:0; padding:0; list-style:none; font-size:0.8125rem; }
.dfs-finishes li { display:flex; flex-wrap:wrap; justify-content:space-between; gap:0.125rem 0.75rem; color:var(--muted); }
.dfs-finishes li span:last-child { color:var(--ink); font-family:var(--font-mono); }
.dfs-today-results { display:grid; gap:0.5rem; }
.dfs-contest-results { display:grid; gap:0.5rem; margin:0; padding:0; list-style:none; }
.dfs-contest-result { display:grid; gap:0.375rem; padding:0.625rem 0.75rem; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-subtle); }
.dfs-contest-result > p { margin:0; }
.dfs-contest-result dl { display:flex; flex-wrap:wrap; gap:0.375rem 1.25rem; margin:0; }
.dfs-contest-result dd { margin:0.125rem 0 0; font:700 0.9375rem/1.2 var(--font-mono); }
.dfs-recent-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:0.5rem 1rem; }
.dfs-recent-total { margin:0; color:var(--muted); font-size:0.875rem; }
.dfs-recent-total b { color:var(--ink); font:800 1.125rem var(--font-mono); }
.dfs-recent-total small { margin-left:0.25rem; font:700 0.75rem var(--font-body); }
/* The latest scored slate, in words: the net at the right of its heading, a line per contest. */
.dfs-latest-net { display:grid; justify-items:end; margin:0; }
.dfs-latest-net b { font:800 1.5rem/1.1 var(--font-mono); color:var(--ink); }
.dfs-latest-net small { color:var(--muted); font:700 0.75rem var(--font-body); }
.dfs-page .dfs-latest h3 { font-size:1.375rem; line-height:1.1; }
.dfs-latest-lede { margin:0; color:var(--ink); font-size:0.9375rem; line-height:1.5; }
.dfs-latest-contests { display:grid; gap:0.375rem; margin:0; padding:0; list-style:none; }
.dfs-latest-contest { display:grid; gap:0.25rem; padding:0.5rem 0.75rem; border:1px solid var(--line); border-left-width:0.1875rem; border-radius:var(--r-control); background:var(--surface-subtle); }
.dfs-latest-contest:has(.is-cashed) { border-left-color:var(--good); }
.dfs-latest-contest p { margin:0; }
.dfs-latest-finish { font-size:0.875rem; }
.dfs-latest-count { margin-left:0.25rem; color:var(--muted); font:700 0.6875rem var(--font-body); text-transform:uppercase; letter-spacing:0.04em; }
.dfs-latest-contest.is-uncounted { opacity:0.8; }
/* The Record's head: the title, its filter (lineups per contest, which contests), the pretax total. A phone puts the filter under the title. */
.dfs-record-head { display:grid; grid-template-columns:auto minmax(0, 1fr) auto; grid-template-areas:"title filter total"; align-items:center; gap:0.625rem 1.5rem; }
.dfs-record-head > h3 { grid-area:title; }
.dfs-record-head > .dfs-recent-total { grid-area:total; justify-self:end; white-space:nowrap; }
.dfs-record-filter { grid-area:filter; display:flex; flex-wrap:wrap; align-items:center; gap:0.5rem 1.25rem; min-width:0; }
.dfs-record-top { flex:0 1 24rem; display:grid; grid-template-columns:7.25rem minmax(7rem, 1fr); grid-template-areas:"text range" ". ticks"; align-items:center; column-gap:0.625rem; min-width:0; }
.dfs-record-top-text { grid-area:text; color:var(--ink); font:700 0.8125rem var(--font-body); white-space:nowrap; }
/* The thumb is 1rem: its centre runs from 0.5rem to the far end less 0.5rem, so the fill and the scale use that span. */
.dfs-record .dfs-record-top input.dfs-record-range { grid-area:range; width:100%; height:1.25rem; min-height:0; margin:0; padding:0; border:0; border-radius:0; background:none; box-shadow:none;
  -webkit-appearance:none; appearance:none; cursor:pointer; }
.dfs-record-range::-webkit-slider-runnable-track { height:0.25rem; border-radius:999px;
  background:linear-gradient(to right, var(--accent) calc(0.5rem + (100% - 1rem) * var(--fill, 1)), var(--line) 0); }
.dfs-record-range::-webkit-slider-thumb { -webkit-appearance:none; box-sizing:border-box; width:1rem; height:1rem; margin-top:-0.375rem; border:2px solid var(--edge); border-radius:50%; background:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.dfs-record-range::-moz-range-track { height:0.25rem; border-radius:999px; background:var(--line); }
.dfs-record-range::-moz-range-progress { height:0.25rem; border-radius:999px; background:var(--accent); }
.dfs-record-range::-moz-range-thumb { box-sizing:border-box; width:1rem; height:1rem; border:2px solid var(--edge); border-radius:50%; background:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.dfs-record-range:hover::-webkit-slider-thumb { background:var(--ink); }
.dfs-record-range:focus-visible { outline:0.1875rem solid var(--accent); outline-offset:0.25rem; border-radius:var(--r-data); }
.dfs-record-ticks { grid-area:ticks; display:block; width:calc(100% - 1rem); height:1.125rem; margin:0.125rem 0.5rem 0; overflow:visible; }
.dfs-record-ticks line { stroke:var(--muted); stroke-width:1; }
.dfs-record-ticks text { fill:var(--muted); font:700 0.6875rem var(--font-mono); text-anchor:middle; }
.dfs-record-type { flex:none; }
.dfs-record-type button:focus-visible { outline:0.1875rem solid var(--accent); outline-offset:0.125rem; }
@media (max-width:48em) {
  .dfs-record-head { grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"title total" "filter filter"; }
  .dfs-record-top { flex:1 1 100%; }
}
/* The Record: a row per past slate, grouped by week, the week's payout in its heading row. */
.dfs-record-table .dfs-name { font-weight:700; overflow-wrap:normal; min-width:6.5rem; }
.dfs-record-table tbody th[scope=row] { text-align:left; }
.dfs-record-week-head th { padding-top:0.75rem; background:var(--surface-subtle); text-transform:none; letter-spacing:0; }
.dfs-record-week-head th > span { display:inline-block; margin-right:0.75rem; }
.dfs-record-week-name { font:800 0.9375rem var(--font-body); color:var(--ink); }
.dfs-record-net { color:var(--muted); font:700 0.8125rem var(--font-mono); }
.dfs-record-wait { color:var(--muted); font-size:0.8125rem; }
.dfs-record-table tr[data-event] { cursor:pointer; }
.dfs-record-table tr[data-event]:hover, .dfs-record-table tr.is-open { background:var(--surface-subtle); }
/* An open row's contests, side by side on wide screens; each lineup entered there opens to its card. */
@media (min-width:48em) { .dfs-record-body .dfs-contest-results { grid-template-columns:repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); align-items:start; } }
.dfs-entered-list { display:grid; gap:0.25rem; margin:0; padding:0; list-style:none; min-width:0; }
.dfs-entered { border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface); min-width:0; }
.dfs-entered[open] { border-color:var(--accent); }
.dfs-entered > summary { display:flex; align-items:center; gap:0.5rem; min-height:2.5rem; padding:0.375rem 0.625rem; cursor:pointer; list-style:none; font-size:0.8125rem; }
.dfs-entered > summary::-webkit-details-marker { display:none; }
.dfs-entered > summary::after { content:"▸"; flex:none; margin-left:auto; color:var(--muted); }
.dfs-entered .dfs-roles { flex:none; }
.dfs-entered-line > span { white-space:nowrap; }
.dfs-entered[open] > summary::after { content:"▾"; color:var(--accent); }
.dfs-entered > summary:focus-visible { outline:0.1875rem solid var(--accent); outline-offset:0.125rem; }
.dfs-entered-line { min-width:0; color:var(--ink); font-weight:600; }
.dfs-entered-card { min-width:0; padding:0 0.5rem 0.5rem; overflow-x:auto; }
.dfs-record-open { display:inline-flex; align-items:baseline; gap:0.375rem; padding:0; border:0; background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.dfs-record-open::before { content:"▸"; color:var(--muted); }
.dfs-record-open[aria-expanded=true]::before { content:"▾"; color:var(--accent); }
.dfs-record-open:focus-visible { outline:0.1875rem solid var(--accent); outline-offset:0.125rem; border-radius:var(--r-data); }
.dfs-record-table tr.is-open > :is(th, td) { border-bottom-color:transparent; }
.dfs-record-detail > td { padding:0.5rem 0.5rem 0.875rem; background:var(--surface-subtle); }
.dfs-record-body { display:grid; grid-template-columns:minmax(0, 1fr); gap:0.75rem; min-width:0; }
.dfs-record-body .dfs-today-card { background:var(--surface); }
:is(.dfs-today-card, .dfs-today-results, .dfs-contest-result) { grid-template-columns:minmax(0, 1fr); }
@media (max-width:30em) {
  .dfs-today, .dfs-recent { padding:0.75rem; }
  .dfs-today-head h2 { font-size:1.375rem; }
  .dfs-entry-row > summary { grid-template-columns:auto minmax(0, 1fr) auto; padding:0.375rem 0.5rem; }
  .dfs-entry-row > summary::after { grid-column:3; grid-row:1; }
  .dfs-entry-names { grid-column:1 / -1; grid-row:2; white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .dfs-entry-nums { grid-column:2; grid-row:1; justify-self:end; }
  .dfs-entry-row .dfs-today-card { margin:0 0.25rem 0.25rem; }
  .dfs-today-card { padding:0.5rem; }
  .dfs-record-detail > td { padding:0.375rem 0.25rem 0.625rem; }
  .dfs-latest-net b { font-size:1.25rem; }
  .dfs-contests { min-width:0; }
  .dfs-contests :is(th, td) { padding-inline:0.375rem; }
  .dfs-record-table :is(th, td) { padding-inline:0.1875rem; }
  .dfs-record-table { font-size:0.75rem; }
  .dfs-record-table thead th { white-space:normal; font-size:0.625rem; }
  .dfs-record-table thead small { display:none; }
  .dfs-record-table .dfs-name { min-width:5.5rem; }
  .dfs-record-table .dfs-num-cell small { white-space:normal; font-size:0.6875rem; }
}

/* Contest standings (dfs-today.js): a dialog over the page; the contest in its head, our entries by rank,
   a row's arrow opening its lineup underneath. */
:is(.dfs-standings-open, .dfs-lineups-open) { justify-self:start; display:inline-flex; align-items:center; gap:0.375rem; min-height:2.25rem; padding:0 0.75rem; border:1px solid var(--line); border-radius:var(--r-control);
  background:var(--surface); color:var(--ink); font:700 0.8125rem var(--font-body); cursor:pointer; }
:is(.dfs-standings-open, .dfs-lineups-open):hover { border-color:var(--accent); }
:is(.dfs-standings-open, .dfs-lineups-open):focus-visible { outline:0.1875rem solid var(--accent); outline-offset:0.125rem; }
:is(.dfs-standings-open, .dfs-lineups-open) span { color:var(--accent); font-size:1rem; line-height:1; }
.dfs-standings-dialog { width:min(46rem, calc(100% - 1.75rem)); max-height:90vh; max-height:90dvh; padding:0; overflow:hidden; border:1px solid var(--line); background:var(--bg); color:var(--ink); }
.dfs-standings-dialog[open] { display:flex; flex-direction:column; }
.dfs-standings { display:flex; flex-direction:column; min-height:0; gap:0; }
.dfs-standings-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; flex-shrink:0; padding:1rem 1.25rem 0.75rem; background:var(--surface); }
.dfs-standings-title { display:grid; gap:0.375rem; min-width:0; }
.dfs-standings .card-kicker { margin:0; color:var(--accent); font:800 0.6875rem/1.3 var(--font-body); letter-spacing:0.06em; text-transform:uppercase; }
.dfs-standings-head h2 { margin:0; font-size:1.375rem; line-height:1.2; text-transform:none; overflow-wrap:anywhere; }
.dfs-standings-roles { margin:0; }
.dfs-standings-head .close-button { flex-shrink:0; width:2.75rem; height:2.75rem; padding:0; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface-raised); color:var(--ink); font-size:1.5rem; line-height:1; cursor:pointer; }
.dfs-standings-head .close-button:focus-visible { outline:0.1875rem solid var(--accent); outline-offset:0.125rem; }
.dfs-standings-facts { display:flex; flex-wrap:wrap; gap:0.5rem 1.25rem; flex-shrink:0; margin:0; padding:0 1.25rem 0.875rem; background:var(--surface); border-bottom:1px solid var(--line); }
.dfs-standings-facts dt { color:var(--muted); font:700 0.6875rem/1.2 var(--font-body); }
.dfs-standings-facts dd { margin:0.125rem 0 0; font:700 0.9375rem/1.2 var(--font-mono); }
.dfs-standings-body { display:grid; gap:0.75rem; min-height:0; overflow:auto; overscroll-behavior:contain; padding:0.5rem 1.25rem 1.25rem; scrollbar-width:thin; }
.dfs-standings-table thead th { position:sticky; top:-0.5rem; z-index:1; background:var(--bg); }
.dfs-standings-table tbody th[scope=row] { text-align:left; }
.dfs-standings-table .dfs-name small { display:flex; flex-wrap:wrap; align-items:center; gap:0.25rem; margin-top:0.1875rem; }
.dfs-standings-row.is-mine { background:color-mix(in srgb, var(--accent) 8%, transparent); }
.dfs-standings-row.is-entered > :first-child { box-shadow:inset 0.1875rem 0 0 var(--accent); }
.dfs-standings-row.is-open > :is(th, td) { border-bottom-color:transparent; }
.dfs-standings-row.is-open { background:var(--surface-subtle); }
.dfs-standings-tag { display:inline-block; white-space:nowrap; padding:0.0625rem 0.375rem; border:1px solid var(--line); border-radius:var(--r-data); color:var(--muted); font:800 0.625rem/1.4 var(--font-body); letter-spacing:0.04em; text-transform:uppercase; }
.dfs-standings-tag.is-mine { border-color:var(--good); color:var(--good); }
.dfs-standings .dfs-pay.is-up { font-weight:800; }
.dfs-standings-arrow { width:2.75rem; padding-block:0.25rem; text-align:right; }
.dfs-standings-toggle { display:inline-grid; place-items:center; width:2.25rem; height:2.25rem; padding:0; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface); color:var(--muted); cursor:pointer; }
.dfs-standings-toggle:hover { color:var(--ink); border-color:var(--accent); }
.dfs-standings-toggle:focus-visible { outline:0.1875rem solid var(--accent); outline-offset:0.125rem; }
.dfs-standings-toggle svg { transition:transform var(--dur-fast, 0.15s) ease; }
.dfs-standings-toggle[aria-expanded=true] { border-color:var(--accent); color:var(--accent); }
.dfs-standings-toggle[aria-expanded=true] svg { transform:rotate(180deg); }
.dfs-standings-lineup > td { padding:0 0.25rem 0.75rem; background:var(--surface-subtle); }
.dfs-standings-card { display:grid; gap:0.375rem; padding:0.5rem 0.625rem; border:1px solid var(--line); border-radius:var(--r-control); background:var(--surface); }
.dfs-standings-card .dfs-hint b { color:var(--ink); font-family:var(--font-mono); }
.dfs-standings-card .dfs-lineup-table td:first-child { width:3rem; }
.dfs-lineups-table tbody th.dfs-num-cell { text-align:right; }
.dfs-lineups-tags { display:flex; flex-wrap:wrap; gap:0.25rem; }
.dfs-lineups-table .dfs-name .dfs-lineups-names { display:block; margin-top:0.25rem; color:var(--muted); font:500 0.75rem/1.35 var(--font-body); overflow-wrap:normal; }
.dfs-standings-cut td { padding:0.25rem 0.5rem; border-bottom:2px dashed var(--good); color:var(--good); font:700 0.6875rem/1.3 var(--font-body); text-transform:uppercase; letter-spacing:0.04em; text-align:center; }
@media (prefers-reduced-motion:reduce) { .dfs-standings-toggle svg { transition:none; } }
@media (max-width:30em) {
  .dfs-standings-dialog { width:calc(100% - 1rem); max-height:94dvh; }
  .dfs-standings-head { padding:0.75rem 0.75rem 0.5rem; }
  .dfs-standings-head h2 { font-size:1.125rem; }
  .dfs-standings-facts { gap:0.375rem 0.875rem; padding:0 0.75rem 0.625rem; }
  .dfs-standings-facts dd { font-size:0.8125rem; }
  .dfs-standings-body { padding:0.375rem 0.5rem 0.75rem; }
  .dfs-standings-table { font-size:0.8125rem; }
  .dfs-standings-table :is(th, td) { padding-inline:0.25rem; }
  .dfs-standings-arrow { width:2.5rem; }
  .dfs-lineups-table:is(.has-actual, .has-live) .dfs-sal-col, .dfs-lineup-table.has-live .dfs-sal-col { display:none; }
  .dfs-lineups-table .dfs-name .dfs-lineups-names { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .dfs-standings-lineup > td { padding-inline:0; }
  .dfs-standings-card { padding:0.375rem; }
  .dfs-standings-card .dfs-lineup-table :is(th, td) { padding:0.375rem 0.25rem; }
  .dfs-standings-card .dfs-lineup-table { font-size:0.8125rem; }
  .dfs-lineup-table:is(.has-actual, .has-live) .dfs-photo { display:none; }
  :is(.dfs-standings-card, .dfs-record-body) .dfs-lineup-table.has-actual { font-size:0.75rem; }
  .dfs-record-body .dfs-lineup-table.has-actual tfoot :is(th, td) { font-size:0.8125rem; }
  .dfs-record-body .dfs-lineup-table.has-actual td:first-child { width:auto; }
  .dfs-lineup-table:is(.has-actual, .has-live) :is(th, td) { padding-inline:0.1875rem; }
}
