/* Roto Hardpoint — one stylesheet for the app.
   Tokens first (light, then dark from the device setting), then the shell, then ~15 components.
   Legacy names (--green, --surface, .section…) are kept as aliases so older markup picks up the new look. */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(/fonts/archivo.woff2) format('woff2-variations'), url(/fonts/archivo.woff2) format('woff2'); }

:root {
  color-scheme: light dark;
  /* palette */
  --ink: #14213D; --paper: #F7F8FA; --surface: #FFFFFF; --fill: #EEF1F6; --rule: #D9DEE7; --rule-strong: #B9C1D0;
  --muted: #56627A; --faint: #5E6982;
  --good: #1F7A4D; --good-fill: #E5F3EB; --good-rule: #A9D6BD;
  --bad: #C8102E; --bad-fill: #FBE8EB; --bad-rule: #EDB0BA;
  --warn: #8F5B00; --warn-fill: #FCF1D6; --warn-rule: #EBCF8A;
  --info: #1D5FA8; --info-fill: #E6EFFA; --info-rule: #A9C5EA;
  --extra: #5B3FB0; --extra-fill: #EEE9FA; --extra-rule: #C6B8EE;
  --pole: #E3A008;
  --action: var(--ink); --on-action: #FFFFFF;
  --focus: #1D5FA8;
  /* type */
  --font-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: var(--font-ui);
  --font-data: var(--font-ui);
  --display-stretch: 112%; --display-weight: 700; --display-track: -0.01em;
  --data-stretch: 87.5%;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 24px; --fs-xxl: 32px;
  /* shape */
  --r-control: 6px; --r-panel: 10px;
  --shadow-pop: 0 8px 24px rgba(20, 33, 61, .16);
  --rail-w: 224px;

  /* legacy aliases used across app.js inline styles */
  --bg: var(--paper); --surface2: var(--fill); --border: var(--rule); --border2: var(--rule-strong);
  --text: var(--ink); --dim: var(--faint);
  --green: var(--good); --green-bg: var(--good-fill); --green-bd: var(--good-rule);
  --red: var(--bad); --red-bg: var(--bad-fill); --red-bd: var(--bad-rule);
  --yellow: var(--warn); --yellow-bg: var(--warn-fill); --yellow-bd: var(--warn-rule);
  --blue: var(--info); --blue-bg: var(--info-fill); --blue-bd: var(--info-rule);
  --purple: var(--extra); --purple-bg: var(--extra-fill); --purple-bd: var(--extra-rule);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8ECF4; --paper: #0F1726; --surface: #16213A; --fill: #1C2944; --rule: #283453; --rule-strong: #3A4868;
    --muted: #A3AEC4; --faint: #8C98B0;
    --good: #4CC38A; --good-fill: #12322A; --good-rule: #24604A;
    --bad: #FF6B7D; --bad-fill: #3A1824; --bad-rule: #7A2A3C;
    --warn: #F2B630; --warn-fill: #352A12; --warn-rule: #6E5520;
    --info: #74B4FF; --info-fill: #14294A; --info-rule: #2C4F82;
    --extra: #B9A2FF; --extra-fill: #241D45; --extra-rule: #4A3C8A;
    --pole: #F2B630;
    --action: #E8ECF4; --on-action: #0F1726;
    --focus: #74B4FF;
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --ink: #E8ECF4; --paper: #0F1726; --surface: #16213A; --fill: #1C2944; --rule: #283453; --rule-strong: #3A4868;
  --muted: #A3AEC4; --faint: #8C98B0;
  --good: #4CC38A; --good-fill: #12322A; --good-rule: #24604A;
  --bad: #FF6B7D; --bad-fill: #3A1824; --bad-rule: #7A2A3C;
  --warn: #F2B630; --warn-fill: #352A12; --warn-rule: #6E5520;
  --info: #74B4FF; --info-fill: #14294A; --info-rule: #2C4F82;
  --extra: #B9A2FF; --extra-fill: #241D45; --extra-rule: #4A3C8A;
  --pole: #F2B630; --action: #E8ECF4; --on-action: #0F1726; --focus: #74B4FF;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, .45);
}

/* ── Base ─────────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-ui); font-size: var(--fs-md); line-height: 1.5;
  display: flex; flex-direction: column; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--info); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .92em; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── Shell: header, rail, tab bar ─────────────────────────────────── */
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 14px; height: 26px; flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-stretch: 125%; font-weight: 800; font-size: 17px; letter-spacing: -0.01em; line-height: 1; white-space: nowrap; }
.hdr-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.date-tag { display: none; }
.sync-indicator { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-indicator.live { color: var(--muted); }
.sync-indicator.live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: 1px; }

.layout { display: flex; flex: 1; overflow: hidden; }
.sidebar { width: var(--rail-w); flex-shrink: 0; overflow-y: auto; display: none; background: var(--surface); border-right: 1px solid var(--rule); }
@media (min-width: 900px) { .sidebar { display: block; } }
.sidebar-inner { padding: 12px 10px 24px; }
.nav-lbl { font-size: var(--fs-xs); font-weight: 600; color: var(--faint); padding: 14px 10px 4px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; margin-bottom: 1px;
  border: none; background: transparent; border-radius: var(--r-control); color: var(--muted); font: inherit; font-size: 14px; text-align: left; cursor: pointer; text-decoration: none; }
.nav-item:hover { background: var(--fill); color: var(--ink); }
.nav-item.active { color: var(--ink); font-weight: 600; background: var(--fill); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--pole); }
.nav-item.top { font-size: 15px; color: var(--ink); padding: 8px 10px; }
.nav-item.top svg.i { color: var(--muted); }
.nav-item.top.active svg.i { color: var(--ink); }
.nav-grp { padding: 10px 10px 2px 40px; }
.nav-sub { padding-left: 40px !important; font-size: 13px !important; }
.nav-dot { display: none; }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.nav-flag { margin-left: auto; font-size: var(--fs-xs); color: var(--bad); font-weight: 600; }
.nav-flag.ok { color: var(--faint); font-weight: 400; }
.nav-league { font-size: 13.5px; }
.nav-league span.n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.main-inner { max-width: 1080px; margin: 0 auto; padding: 20px 16px 100px; }
@media (min-width: 900px) { .main-inner { padding: 28px 32px 64px; } }
.backbar { max-width: 1080px; margin: 0 auto; padding: 14px 16px 0; }
@media (min-width: 900px) { .backbar { padding: 20px 32px 0; } }
.backbar:empty { display: none; }
.backbar + .main-inner { padding-top: 6px; }
.back-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; padding: 4px 0; text-decoration: none; }
.back-btn:hover { color: var(--ink); }
.back-btn svg.i { width: 16px; height: 16px; }

.bottom-nav { display: flex; flex-shrink: 0; background: var(--surface); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 900px) { .bottom-nav { display: none; } }
.bottom-nav-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px;
  border: none; background: transparent; color: var(--faint); font: inherit; font-size: 11px; font-weight: 500; cursor: pointer; }
.bottom-nav-item.active { color: var(--ink); font-weight: 700; }
.bottom-nav-item.active::before { content: ''; position: absolute; top: -1px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 2px 2px; background: var(--pole); }
.bottom-nav-icon { display: flex; }
.bottom-nav-item .nav-count { position: absolute; top: 3px; left: calc(50% + 6px); margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 5px; }

/* ── 1. Page header ───────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.page-title { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: var(--fs-xl); line-height: 1.15; }
@media (min-width: 900px) { .page-title { font-size: 28px; } }
.page-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 4px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2.sec, .sec-title { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: var(--fs-lg); line-height: 1.25; margin: 0 0 10px; }

/* ── 2. Buttons ───────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 14px; border-radius: var(--r-control);
  border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-primary:disabled { background: var(--fill); color: var(--faint); cursor: not-allowed; filter: none; }
.btn-secondary { background: var(--surface); border-color: var(--rule-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--fill); }
.btn-quiet { background: transparent; color: var(--muted); padding: 7px 8px; }
.btn-quiet:hover { color: var(--ink); background: var(--fill); }
.btn svg.i { width: 16px; height: 16px; }

/* ── 3. Segmented control ─────────────────────────────────────────── */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--fill); border-radius: 8px; max-width: 100%; overflow-x: auto; }
.seg button, .seg a { flex: 1 0 auto; border: none; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600;
  padding: 6px 14px; border-radius: var(--r-control); cursor: pointer; text-decoration: none; white-space: nowrap; }
.seg .on, .seg [aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20,33,61,.12), 0 0 0 1px var(--rule); }

/* ── 4. Form controls (all selects/inputs inside the app) ─────────── */
.main select, .main input[type="text"], .main input[type="search"], .main input[type="email"], .main input[type="password"], .main input[type="number"], .main input:not([type]), .main textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-control);
  min-height: 36px; padding: 6px 10px; }
.main select { padding-right: 28px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236A758C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
.main input::placeholder { color: var(--faint); }
.main input:focus, .main select:focus, .main textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

/* ── 5. Tables ────────────────────────────────────────────────────── */
.tbl, .roster-table { width: 100%; border-collapse: collapse; font-stretch: var(--data-stretch); font-size: var(--fs-sm); }
.tbl th, .roster-table th { font-size: var(--fs-xs); font-weight: 600; color: var(--muted); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule-strong);
  background: var(--surface); white-space: nowrap; font-family: var(--font-ui) !important; letter-spacing: 0 !important; text-transform: none !important; }
.tbl td, .roster-table td { padding: 8px 10px; border-bottom: 1px solid var(--rule); color: var(--ink); vertical-align: middle; }
.tbl tbody tr:last-child td, .roster-table tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td, .roster-table tbody tr:hover td { background: var(--fill); }
.roster-table td:first-child { color: var(--ink); font-weight: 600; }
.tbl .r, .roster-table .r { text-align: right; }
.ttable-wrap, .tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); }
.ttable td, .ttable th { white-space: nowrap; }
.ttable .tsticky, .ttable th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.ttable .tsticky { box-shadow: 1px 0 0 var(--rule); max-width: 160px; }
.ttable .tsticky div { overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 700px) { .ttable .tsticky { max-width: 280px; } }
.tbadge { display: inline-flex; font-size: var(--fs-xs); font-weight: 600; line-height: 1; padding: 3px 6px; border-radius: 4px; margin-left: 4px; background: var(--fill); border: none !important; }
.tag + .tag, td .tag { margin-left: 4px; }
.sub { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.proj-val { color: var(--info); font-weight: 600; }
.proj-good, .pos { color: var(--good); }
.proj-bad, .neg { color: var(--bad); }
tr.mine td:first-child, .mine-mark { box-shadow: inset 3px 0 0 var(--pole); }

/* ── 6. Panels (legacy .section/.card/.settings-panel share the look) ─ */
.panel, .section, .settings-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 16px; margin-bottom: 16px; }
.section-lbl, .settings-title { font-family: var(--font-display); font-stretch: var(--display-stretch); font-size: var(--fs-md); font-weight: 650; color: var(--ink);
  letter-spacing: 0; text-transform: none; margin-bottom: 10px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 16px; margin-bottom: 12px; cursor: pointer; }
.card:hover { border-color: var(--rule-strong); }
.card.highlighted { box-shadow: inset 3px 0 0 var(--good); }
.card-title { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: var(--fs-lg); }
.card-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.card-meta { font-size: var(--fs-xs); color: var(--faint); margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

/* ── 7. Lists (hubs, settings) ────────────────────────────────────── */
.list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); margin-bottom: 20px; overflow: hidden; }
.list-head { font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin: 0 0 8px 2px; }
.list-item, .hub-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 16px; border: none; border-bottom: 1px solid var(--rule);
  background: transparent; color: var(--ink); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.list-item:last-child, .hub-card:last-child { border-bottom: none; }
.list-item:hover, .hub-card:hover { background: var(--fill); }
.list-item .t, .hub-card .hub-t { font-size: var(--fs-md); font-weight: 600; }
.list-item .d, .hub-card .hub-d { font-size: var(--fs-sm); color: var(--muted); margin-top: 1px; line-height: 1.45; }
.list-item .body, .hub-card .body { flex: 1; min-width: 0; }
.list-item .chev, .hub-card .chev { color: var(--faint); }
.list-item > svg.i:first-child { color: var(--muted); }
.hub-card.sub { padding-left: 48px; }

/* ── 8. Tags & badges ─────────────────────────────────────────────── */
.tag, .badge { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 4px;
  letter-spacing: 0; text-transform: none; white-space: nowrap; }
.badge { min-width: 40px; justify-content: center; flex-shrink: 0; }
.tag.good { color: var(--good); background: var(--good-fill); } .tag.bad { color: var(--bad); background: var(--bad-fill); }
.tag.warn { color: var(--warn); background: var(--warn-fill); } .tag.info { color: var(--info); background: var(--info-fill); }
.tag.plain { color: var(--muted); background: var(--fill); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { border-radius: 14px; padding: 4px 10px; font-size: var(--fs-xs); display: flex; align-items: center; gap: 6px; }

/* ── 9. Player rows (lineup) ──────────────────────────────────────── */
.player-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.player-row:last-child { border-bottom: none; }
.player-info { flex: 1; min-width: 0; }
.pname { font-size: var(--fs-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmeta { font-size: var(--fs-xs); color: var(--muted); margin-top: 1px; }
.preason { font-size: var(--fs-sm); color: var(--muted); margin-top: 3px; line-height: 1.45; }
.pproj { font-size: var(--fs-xs); color: var(--info); margin-top: 2px; }
.slot { width: 44px; flex-shrink: 0; font-stretch: var(--data-stretch); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }

/* ── 10. Notes & banners ──────────────────────────────────────────── */
.note, .priority { border: 1px solid var(--rule); border-left: 3px solid var(--info); background: var(--surface); border-radius: var(--r-control); padding: 12px 14px; margin-bottom: 16px; font-size: var(--fs-sm); }
.note.bad { border-left-color: var(--bad); } .note.warn { border-left-color: var(--warn); } .note.good, .priority { border-left-color: var(--good); }
.priority-lbl { font-size: var(--fs-xs); font-weight: 600; color: var(--good); margin-bottom: 4px; letter-spacing: 0; text-transform: none; }
.priority-text { font-size: var(--fs-md); font-weight: 600; line-height: 1.4; }
.alerts-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; }
.alert-chip { font-size: var(--fs-xs); white-space: nowrap; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 5px 10px; }

/* ── 11. Fields (settings) ────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); letter-spacing: 0; text-transform: none; }
.field input, .field select, .field textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-control); padding: 8px 10px; }
/* Inline editor panels under a settings row (League settings: slots, categories, rules, alerts) */
.edit-box { margin-top: 12px; padding: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); }
.edit-box .intro { font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.edit-grid .field { margin-bottom: 0; min-width: 0; }
.edit-grid.tight { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }   /* many short number boxes (points editor) */
.field .pair { display: flex; gap: 6px; } .field .pair input { flex: 1; min-width: 0; } .field .pair select { width: auto; }
.edit-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm); cursor: pointer; margin-top: 12px; }
.check input { width: 16px; height: 16px; accent-color: var(--good); }
.upload-zone { border: 2px dashed var(--rule-strong); border-radius: var(--r-panel); padding: 20px; text-align: center; cursor: pointer; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--info); background: var(--info-fill); }
.upload-zone input { display: none; }

/* ── 12. Loading, empty, progress ─────────────────────────────────── */
.loading-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; gap: 12px; }
.spinner { width: 24px; height: 24px; border: 2px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-msg { font-size: var(--fs-sm); color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 220px; gap: 8px; padding: 24px 4px; }
.empty-icon { display: none; }
.empty-title { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: var(--fs-lg); color: var(--ink); }
.empty-sub { font-size: var(--fs-sm); color: var(--muted); max-width: 52ch; line-height: 1.6; }
.prog-wrap { width: 100%; height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; margin: 8px 0; }
.prog-fill { height: 100%; background: var(--ink); transition: width .4s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ── 13. League status table (Leagues home) ───────────────────────── */
.lg-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--rule); cursor: pointer; text-decoration: none; color: var(--ink); }
.lg-row:last-child { border-bottom: none; }
.lg-row:hover { background: var(--fill); }
.lg-name { font-weight: 650; font-size: var(--fs-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-team { font-size: var(--fs-xs); color: var(--muted); }
.lg-status { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lg-fa { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--muted); min-height: 1.5em; }
@media (min-width: 900px) { .lg-row { grid-template-columns: minmax(200px, 1.2fr) 1.6fr auto; } .lg-fa { grid-column: auto; } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }

/* ── 14. League page: lineup beside best available on wide screens ── */
.lg-two { display: block; }
@media (min-width: 1180px) { .lg-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; } }
.tbl.lineup td.slot { width: 52px; font-weight: 700; color: var(--muted); }
.nav-item.top.open { color: var(--ink); font-weight: 600; }
.nav-item.top.open svg.i { color: var(--ink); }
.nav-flag { color: var(--warn); }

/* ── 15. Utilities (used by page markup in app.js) ────────────────── */
.c-faint { color: var(--faint); } .c-muted { color: var(--muted); } .c-ink { color: var(--ink); }
.c-good { color: var(--good); } .c-bad { color: var(--bad); } .c-warn { color: var(--warn); } .c-info { color: var(--info); } .c-extra { color: var(--extra); }
.fs-xs { font-size: var(--fs-xs); } .fs-sm { font-size: var(--fs-sm); } .fs-md { font-size: var(--fs-md); } .fs-lg { font-size: var(--fs-lg); }
.fw-5 { font-weight: 500; } .fw-6 { font-weight: 600; } .fw-7 { font-weight: 700; }
.lh { line-height: 1.55; } .nw { white-space: nowrap; } .ptr { cursor: pointer; }
.ta-r { text-align: right; } .ta-c { text-align: center; } .ta-l { text-align: left; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; }
/* Layout and spacing helpers. They replace inline style="" in app.js markup, so they win over component rules the way
   the inline styles did (!important). Off-scale values keep a px suffix (gap-6px); scale steps match mt-/mb- (1 = 4px). */
.d-flex { display: flex !important; } .d-iflex { display: inline-flex !important; } .d-grid { display: grid !important; }
.d-block { display: block !important; } .d-iblock { display: inline-block !important; } .d-none { display: none !important; }
.wrap { flex-wrap: wrap !important; } .f-col { flex-direction: column !important; } .f-1 { flex: 1 !important; }
.fb-180 { flex: 1 1 180px !important; } .fb-220 { flex: 1 1 220px !important; } .min-0 { min-width: 0 !important; } .shrink-0 { flex-shrink: 0 !important; }
.ai-c { align-items: center !important; } .ai-s { align-items: flex-start !important; } .ai-e { align-items: flex-end !important; }
.jc-sb { justify-content: space-between !important; } .ml-auto { margin-left: auto !important; }
.gap-1 { gap: 4px !important; } .gap-6px { gap: 6px !important; } .gap-2 { gap: 8px !important; } .gap-10px { gap: 10px !important; }
.gap-3 { gap: 12px !important; } .gap-14px { gap: 14px !important; }
.gfit-140 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important; } .gfit-150 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; }
.gfit-160 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important; } .gfit-240 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; }
.gfill-70 { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)) !important; }
.gfit-140, .gfit-150, .gfit-160, .gfit-240, .gfill-70 { display: grid !important; }
.m-0 { margin: 0 !important; } .my-1 { margin: 4px 0 !important; } .my-6px { margin: 6px 0 !important; } .my-2 { margin: 8px 0 !important; } .my-10px { margin: 10px 0 !important; }
.m-0.mb-2 { margin: 0 0 8px !important; } .t-display.mt-5.mb-2 { margin: 20px 0 8px !important; }
.meta-line { margin: 6px 0 8px !important; } .sec-gap { margin: 18px 0 8px !important; } .page-sub.pull-up { margin: -4px 0 10px; }
.p-0 { padding: 0 !important; } .p-12 { padding: 12px !important; } .px-2px { padding: 0 2px !important; } .px-1 { padding: 0 4px !important; }
.py-2px { padding: 2px 0 !important; } .py-3px { padding: 3px 0 !important; } .py-5px { padding: 5px 0 !important; } .py-6px { padding: 6px 0 !important; }
.py-7px { padding: 7px 0 !important; } .py-2 { padding: 8px 0 !important; } .py-9px { padding: 9px 0 !important; } .py-3 { padding: 12px 0 !important; }
.pt-10px { padding-top: 10px !important; } .indent-30 { padding: 0 0 8px 30px !important; }
.bb { border-bottom: 1px solid var(--rule) !important; } .bt { border-top: 1px solid var(--rule) !important; } .bd-strong { border-color: var(--rule-strong) !important; }
.bd-none { border: none !important; } .bg-none { background: none !important; } .bg-surface { background: var(--surface) !important; }
.w-100 { width: 100% !important; } .w-min { width: 1% !important; } .mw-100 { max-width: 100% !important; } .mw-170 { max-width: 170px !important; } .mw-220 { max-width: 220px !important; }
.minw-120 { min-width: 120px !important; } .minw-200 { min-width: 200px !important; } .sp-8 { width: 8px !important; } .caret { width: 12px !important; }
.sz-16 { width: 16px !important; height: 16px !important; } .sz-17 { width: 17px !important; height: 17px !important; }
.ws-n { white-space: normal !important; } .fw-4 { font-weight: 400 !important; } .ff-i { font-family: inherit !important; } .lh-1 { line-height: 1 !important; }
.td-u { text-decoration: underline !important; } .va-t { vertical-align: top !important; } .dim { opacity: .75; }
.t-display { font-family: var(--font-display); font-stretch: var(--display-stretch); }
.chk { accent-color: var(--good); }
/* Small components that were inline styles */
.btn.btn-sm, .btn-sm { padding: 6px 10px !important; } .btn.btn-sm2 { padding: 6px 12px !important; } .btn.btn-xs { padding: 5px 9px !important; } .btn.btn-xs2 { padding: 4px 10px !important; }
.btn.btn-drag { cursor: grab; min-height: 44px; padding: 10px 22px !important; }
.btn-bare { background: none !important; border: none !important; }
.chip-btn { background: none; border: 1px solid var(--rule-strong); border-radius: var(--r-panel); padding: 1px 8px; font: inherit; color: inherit; }
.chip-btn.lg { border-radius: 8px; padding: 4px 8px; }
.deal-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 14px; padding: 3px 4px 3px 10px; margin: 0 6px 6px 0; }
.mini-badge { display: inline-block; border: 1px solid var(--rule-strong); border-radius: 4px; padding: 1px 5px; margin: 1px 3px 1px 0; }
.card-sm { border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 10px 12px; background: var(--surface); }
.box-good, .box-warn { border-radius: var(--r-panel); padding: 14px; }
.box-good { background: var(--good-fill); border: 1px solid var(--good-rule); } .box-warn { background: var(--warn-fill); border: 1px solid var(--warn-rule); }
.priority.warn { background: var(--warn-fill); border-color: var(--warn-rule); border-left-color: var(--warn); }
.dropzone { padding: 16px; background: var(--paper); border: 1px dashed var(--rule-strong); border-radius: var(--r-panel); }
.input-plain { background: var(--paper) !important; border: 1px solid var(--rule) !important; border-radius: 8px !important; padding: 10px !important; }
.input-plain.sm { width: 100%; max-width: 360px; padding: 8px !important; }
.kv-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--rule); }
.sticky-col { position: sticky; left: 0; background: var(--surface) !important; }
.sticky-detail { position: sticky; left: 12px; max-width: min(760px, calc(100vw - 64px)); }
.detail-cell { background: var(--paper) !important; padding: 10px 12px !important; white-space: normal !important; }
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; }
.sheet { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 70px); transform: translateX(-50%); width: min(460px, calc(100vw - 24px)); max-height: 72vh;
  overflow: auto; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 14px; padding: 14px; z-index: 51; }
.sheet.sm { width: min(440px, calc(100vw - 24px)); max-height: 70vh; }
.comps-head { display: flex; align-items: center; gap: 6px; margin: 12px 0 6px; padding: 8px 0; border-top: 1px solid var(--rule); }
.why-list { margin: 0 0 10px 18px; padding: 0; } .tbl-plain { width: 100%; border-collapse: collapse; }
.late-col { border-left: 1px solid var(--rule) !important; padding-left: 6px !important; }
.meter { width: 60px; height: 6px; background: var(--rule); border-radius: 3px; }
.sum-tag { margin-left: 6px; vertical-align: 2px; } .pp-day { width: 106px; } .pp-cell { padding: 3px !important; vertical-align: top; }
.al-ic { display: inline-flex; width: 22px; justify-content: center; color: var(--muted); flex-shrink: 0; }
.al-ic svg.i { width: 18px; height: 18px; }
.mt-2px { margin-top: 2px !important; } .mt-10px { margin-top: 10px !important; } .w-150 { width: 150px !important; } .mw-360 { max-width: 360px !important; }
.meter-fill { height: 6px; background: var(--good); border-radius: 3px; }
/* Alerts: home strip, count badge and cards */
.al-strip { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 10px 12px; margin-bottom: 14px; background: var(--surface); }
.al-strip.now { border-color: var(--bad); }
.al-count { margin-left: auto; font-size: var(--fs-xs); padding: 1px 6px; border-radius: 8px; background: var(--fill); color: var(--muted); }
.al-count.now { background: var(--bad); color: var(--on-action); } .al-count.new { background: var(--good); color: var(--on-action); }
.al-card { border: 1px solid var(--rule); border-left: 3px solid var(--rule); border-radius: var(--r-panel); padding: 10px 12px; margin-bottom: 8px; background: var(--surface); display: flex; gap: 10px; align-items: flex-start; }
.al-card.sev-now { border-left-color: var(--bad); } .al-card.sev-week { border-left-color: var(--warn); } .al-card.sev-fyi { border-left-color: var(--muted); }
/* Dynasty values: season bars and the season-by-season rows */
.sbars { display: flex; align-items: flex-end; gap: 1px; height: 22px; } .sbars.wide { gap: 2px; }
.sbar { width: 4px; background: var(--rule-strong); border-radius: 1px; } .sbars.wide .sbar { width: 7px; } .sbar.on { background: var(--ink); }
.se-row { display: grid; grid-template-columns: 42px 1fr 44px 40px; gap: 8px; align-items: center; font-size: var(--fs-xs); margin: 3px 0; } .se-row.tight { margin: 1px 0; }
.se-track { height: 8px; background: var(--rule); border-radius: 4px; } .se-row.tight .se-track { height: 6px; }
.se-fill { height: 100%; background: var(--good); border-radius: 4px; } .se-fill.late { background: var(--good-rule); }
/* Probable pitchers grid (moved from a <style> block in app.js) */
.pp-wrap{overflow-x:auto;background:var(--surface);border:1px solid var(--border);border-radius:10px;-webkit-overflow-scrolling:touch}
.pp-tab{border-collapse:separate;border-spacing:0;font-size:var(--fs-xs);width:max-content}
.pp-tab th{font-variant-numeric:tabular-nums;font-size:var(--fs-xs);color:var(--muted);padding:6px 4px;position:sticky;top:0;background:var(--surface);z-index:1}
.pp-team{position:sticky;left:0;z-index:2;background:var(--bg);font-variant-numeric:tabular-nums;font-weight:700;font-size:var(--fs-xs);padding:4px 8px;border-right:1px solid var(--border)}
.pp-c{border:1px solid var(--border);border-radius:6px;padding:4px 5px;margin-bottom:2px;min-height:44px;width:100px;box-sizing:border-box;overflow:hidden}
.pp-n{font-weight:600;font-size:var(--fs-xs);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-o{font-size:var(--fs-xs);color:var(--ink)}
.pp-d{font-variant-numeric:tabular-nums;font-size:var(--fs-xs);display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.pp-off{color:var(--dim);font-size:var(--fs-xs);text-align:center;padding-top:14px;width:100px}
.pp-c.faded { opacity: .35; } .pp-c.hl { outline: 2px solid var(--info); }
/* ── 16. Filter pills ─────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 16px; border: 1px solid var(--rule-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.pill:hover { background: var(--fill); }
.pill[aria-pressed="true"] { background: var(--action); border-color: var(--action); color: var(--on-action); }
.pill .n { font-weight: 400; opacity: .75; }
.rk-cell { display: flex; gap: 8px; align-items: baseline; white-space: normal; }
.rk-cell .rk { min-width: 26px; text-align: right; color: var(--faint); font-size: var(--fs-xs); font-weight: 600; }
.rk-cell .who { min-width: 0; overflow: hidden; }
.rk-cell .who .tag { margin-left: 6px; vertical-align: 1px; }
/* Phones: 16px controls so iOS doesn't zoom when one is tapped */
@media (max-width: 899px) { .main select, .main input, .main textarea { font-size: 16px; } }

/* ── 16. Landing (signed out) ─────────────────────────────────────────
   The signed-out view: what Roto Hardpoint does, the evidence, early access and sign-in. App navigation is hidden. */
[hidden] { display: none !important; }
body.signed-out .sidebar, body.signed-out .bottom-nav, body.signed-out .backbar { display: none; }
body.signed-out .main-inner { padding-bottom: 48px; }
.lp { display: flex; flex-direction: column; gap: 48px; }
.lp-hero { display: grid; gap: 28px; align-items: center; padding-top: 8px; }
@media (min-width: 900px) { .lp-hero { grid-template-columns: 1.1fr 1fr; gap: 40px; padding-top: 24px; } }
.lp-h1 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); letter-spacing: var(--display-track);
  font-size: var(--fs-xl); line-height: 1.12; margin: 0 0 12px; text-wrap: balance; }
@media (min-width: 900px) { .lp-h1 { font-size: var(--fs-xxl); } }
.lp-lead { font-size: var(--fs-md); color: var(--muted); line-height: 1.6; max-width: 56ch; margin: 0 0 20px; }
.lp-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-ctas .btn { min-height: 44px; padding: 10px 18px; }
.lp-note { font-size: var(--fs-sm); color: var(--muted); margin-top: 12px; }
.lp-sec-title { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: var(--fs-xl); line-height: 1.2; margin: 0 0 6px; text-wrap: balance; }
.lp-sec-lead { color: var(--muted); max-width: 62ch; margin: 0 0 18px; line-height: 1.6; }
.lp-three { display: grid; gap: 12px; }
@media (min-width: 760px) { .lp-three { grid-template-columns: repeat(3, 1fr); } }
.lp-item { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 16px; }
.lp-item h3 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: var(--fs-lg); margin: 0 0 6px; }
.lp-item p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.55; }
.lp-item .ci { display: block; margin-top: 10px; font-size: var(--fs-xs); color: var(--faint); }
.lp-two { display: grid; gap: 12px; }
.lp-shot { margin: 0; justify-self: center; max-width: 390px; width: 100%; }
.lp-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--surface); }
.lp-shot figcaption { font-size: var(--fs-sm); color: var(--muted); margin-top: 8px; }
@media (min-width: 760px) { .lp-two { grid-template-columns: 1fr 1fr; } }
.lp-join { display: grid; gap: 12px; }
@media (min-width: 900px) { .lp-join { grid-template-columns: 1.2fr 1fr; } }
.lp-join .lp-item { padding: 20px; }
@media (min-width: 900px) { .lp-join.lp-join-open { grid-template-columns: minmax(0, 560px); } }
/* Membership (2026-10-29): plan buttons, the ended screen */
.plan-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; max-width: 460px; }
.plan-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule-strong); border-radius: var(--r-control); font: inherit; }
.plan-btn:hover { background: var(--fill); }
.plan-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.plan-btn b { font-size: var(--fs-md); }
.plan-btn span { font-size: var(--fs-sm); color: var(--muted); }
.plan-btn:disabled { opacity: .6; cursor: wait; }
.ended { max-width: 560px; margin: 24px auto 0; }
.lp-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.lp-form .btn { min-height: 44px; }
.lp-form input, .lp-form select { width: 100%; }
.lp-msg, .form-msg { font-size: var(--fs-sm); min-height: 18px; }
.lp-msg.ok, .form-msg.ok { color: var(--good); } .lp-msg.err, .form-msg.err { color: var(--bad); } .form-msg.wait { color: var(--muted); }
.lp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lp-foot { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--rule); padding-top: 18px; font-size: var(--fs-sm); color: var(--muted); }
.lp-foot a { color: var(--muted); }
.lp-eyebrow { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 8px; }
.lp-eyebrow::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--pole); }   /* gold is for marks, not text: fails contrast in light */
.lp-hero .lp-shot { max-width: 340px; }
.lp-hero .lp-shot img { max-height: 480px; object-fit: cover; object-position: top; }
.lp-job { display: grid; gap: 16px; align-items: center; padding: 20px 0; border-top: 1px solid var(--rule); }
.lp-job:first-of-type { border-top: none; padding-top: 4px; }
.lp-job .lp-shot { max-width: 320px; }
.lp-job .lp-shot img { max-height: 440px; object-fit: cover; object-position: top; }
@media (min-width: 760px) { .lp-job { grid-template-columns: 320px 1fr; gap: 40px; } .lp-job.flip { grid-template-columns: 1fr 320px; } .lp-job.flip .lp-shot { order: 2; } }
.lp-job-title { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: var(--fs-xl); margin: 0 0 8px; }
.lp-job-text { font-size: var(--fs-md); line-height: 1.6; margin: 0 0 12px; max-width: 52ch; }
.lp-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.lp-points li { display: flex; gap: 8px; }
.lp-points li::before { content: ""; flex: none; width: 4px; height: 4px; margin-top: .6em; border-radius: 50%; background: var(--pole); }
.lp-demo-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
.lp-demo-cta .btn { min-height: 44px; padding: 10px 18px; }
@media (max-width: 759px) { .lp-demo-cta .btn { width: 100%; } }
.lp-faq { border-top: 1px solid var(--rule); max-width: 760px; }
.lp-faq details { border-bottom: 1px solid var(--rule); }
.lp-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: var(--fs-md); }
.lp-faq summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.lp-faq p { margin: 0 0 14px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; max-width: 68ch; }
/* The landing is also written into index.html so it reads without JavaScript (search and AI crawlers); a saved
   session hides that copy until the app draws, so signed-in members never see it flash. */
.has-session .lp-static { display: none; }

/* ── 17. Public pages (fantrax-lineup-optimizer.html etc., written by public-pages/build.js) ── */
.pub { height: auto; overflow: visible; display: block; line-height: 1.6; }
.pub-wrap { max-width: 880px; margin: 0 auto; padding: 0 16px 64px; }
.pub-hdr { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
.pub-hdr .back { color: var(--muted); font-size: var(--fs-sm); text-decoration: none; }
.pub h1 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: var(--fs-xl); line-height: 1.15; margin: 0 0 10px; text-wrap: balance; }
@media (min-width: 760px) { .pub h1 { font-size: var(--fs-xxl); } }
.pub h2 { font-family: var(--font-display); font-stretch: var(--display-stretch); font-weight: 650; font-size: var(--fs-lg); margin: 32px 0 6px; }
.pub p, .pub li { font-size: var(--fs-md); max-width: 68ch; }
.pub .lead { color: var(--muted); }
.pub-split { display: grid; gap: 24px; align-items: start; }
@media (min-width: 760px) { .pub-split { grid-template-columns: 1fr 280px; gap: 40px; } }
.pub-shot { margin: 0 0 16px; }
.pub-shot img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto; border: 1px solid var(--rule); border-radius: var(--r-panel); }
.pub-shot figcaption { font-size: var(--fs-xs); color: var(--muted); text-align: center; margin-top: 6px; }
.pub-cta { margin: 32px 0 0; padding: 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-panel); }
.pub-cta p { margin: 0 0 12px; }
.pub-cta .btn { min-height: 44px; padding: 10px 18px; text-decoration: none; }
.pub-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: var(--fs-sm); }
.pub-foot a { color: var(--muted); }

/* Sortable table headers: a real button so the keyboard and screen readers can use them */
.th-sort { all: unset; cursor: pointer; white-space: nowrap; font: inherit; color: inherit; }
.th-sort:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 3px; }

/* Stuff+ trend chart (Stuff+ trends page) */
.trend-chart { display: block; width: 100%; height: auto; max-height: 260px; }
.trend-chart .tc-grid { stroke: var(--rule); stroke-width: 1; }
.trend-chart .tc-base { stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 4 3; }
.trend-chart .tc-lbl { fill: var(--muted); font-size: 12px; }
.trend-chart .tc-dot { fill: var(--muted); }
.trend-chart .tc-roll { fill: none; stroke: var(--good); stroke-width: 2.5; }
.trend-chart .tc-win { fill: var(--fill); }
.filters input[type="number"] { width: 90px; }
.filters label { align-self: center; }

/* Account page: invite list rows */
.inv-row { padding: 10px 0; border-top: 1px solid var(--rule); }
.inv-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.inv-email { font-size: var(--fs-sm); font-weight: 600; overflow-wrap: anywhere; }
.inv-status { font-size: var(--fs-xs); color: var(--faint); }
.inv-status.joined { color: var(--good); }
.inv-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.inv-actions .btn { padding: 6px 10px; font-size: var(--fs-sm); }
.inv-opts { display: flex; gap: 16px; flex-wrap: wrap; }
.inv-opts .check { margin-top: 8px; }
.field.narrow { max-width: 360px; }
/* Start here: three things to try */
.try-list { list-style: none; margin: 8px 0 0; padding: 0; }
.try-list li { border-top: 1px solid var(--rule); }
.try-list a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; font-size: var(--fs-sm); color: var(--ink); text-decoration: none; }
.try-list a:hover b { text-decoration: underline; }
.try-list .sub { display: block; margin-top: 2px; }
.try-list li.done b { color: var(--muted); }
/* Prospect and Dynasty rankings */
.src-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.src-col { display: flex; flex-direction: column; }
.src-col .upload-zone { flex: 1; }
.src-lbl { font-size: var(--fs-xs); font-weight: 600; color: var(--warn); margin-bottom: 6px; }
.src-lbl.on { color: var(--good); }
.upload-zone.sm { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; }
.upload-zone.sm input { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload-zone.sm:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.rank-table { min-width: 600px; }
tr.taken td { color: var(--muted); }
.tag.extra { color: var(--extra); background: var(--extra-fill); }
.filters input[type="search"] { flex: 1; min-width: 140px; }
/* Hitter contact trends */
.ct-table { min-width: 720px; }
/* Minor-league park factors */
.pk-table { min-width: 420px; }
/* Player news */
/* Bullpens */
.bp-team { margin-bottom: 24px; }
.bp-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; } .bp-tags:empty { display: none; }
.bp-tags .tag + .tag, .bp-tags .tbadge { margin-left: 0; }
.roster-table td.bp-day { padding-left: 4px; padding-right: 4px; min-width: 28px; }
.bp-fa { list-style: none; padding: 0; margin: 0; }
.bp-fa li { display: flex; gap: 8px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: var(--fs-sm); }
.bp-fa li:last-child { border-bottom: none; }
.nw-list { list-style: none; padding: 0; }
.nw-item { padding: 12px 16px; border-bottom: 1px solid var(--rule); font-size: var(--fs-sm); }
.nw-item:last-child { border-bottom: none; }
.nw-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.nw-x { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; margin-top: 4px; }
.nw-where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.nw-where .btn { min-height: 28px; padding: 2px 8px; }
.nw-il, .nw-watch { list-style: none; margin: 8px 0 0; padding: 0; font-size: var(--fs-sm); }
.nw-il li { padding: 6px 0; border-bottom: 1px solid var(--rule); }
.nw-watch li { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--rule); }
/* Lists in the composite */
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.rk-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px 14px; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: var(--fs-sm); }
.rk-row .rk-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.rk-row .rk-meta { font-size: var(--fs-xs); color: var(--muted); }
.rk-row .rk-pct { font-size: var(--fs-xs); color: var(--muted); }
.rk-row .rk-acts { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
.rk-row .rk-acts:empty { display: none; }
.rk-row .rk-acts .check { margin-top: 0; }
.rk-row.off .rk-name { color: var(--muted); }
.rk-w { width: 64px; font: inherit; font-size: 14px; text-align: center; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-control); padding: 6px 4px; }
.rk-add { margin-top: 16px; }
.rk-add summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
@media (min-width: 720px) {
  .rk-row { grid-template-columns: minmax(0, 1fr) auto 64px 14px auto; }
  .rk-row .rk-acts { grid-column: auto; justify-content: flex-end; }
  .rk-row .rk-acts:empty { display: block; }
}

/* Setup checklist (Today and Leagues, new members) */
.setup-card .setup-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.setup-steps { list-style: none; padding: 0; margin: 8px 0 0; }
.setup-steps li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); font-size: var(--fs-sm); }
.setup-steps .st-mark, .try-list .st-mark { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule-strong); flex-shrink: 0; display: grid; place-items: center; }
.setup-steps .st-mark svg.i, .try-list .st-mark svg.i { width: 14px; height: 14px; stroke: var(--on-action); }
.setup-steps li.done .st-mark, .try-list li.done .st-mark { background: var(--good); border-color: var(--good); }
.setup-steps li.done .st-t { color: var(--muted); }
.setup-steps .st-t { flex: 1; min-width: 0; }
.setup-steps .st-end { margin-left: auto; flex-shrink: 0; }
.setup-steps .btn { padding: 6px 10px; font-size: var(--fs-sm); }
.steps-list { font-size: var(--fs-sm); line-height: 1.8; padding-left: 20px; margin: 0; }

/* Season projections (#ranges): a player's range card and the table rows that pick him */
.rg-card { display: flex; flex-direction: column; gap: 12px; }
.rg-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.rg-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.rg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rg-sw { display: inline-block; width: 18px; height: 8px; border-radius: 2px; }
.rg-sw.band { background: var(--rule-strong); }
.rg-sw.box { background: var(--info); }
.rg-sw.med { width: 2px; height: 12px; border-radius: 0; background: var(--ink); }
.rg-sw.dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: var(--surface); }
.rg-strips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 24px; }
.rg-strip { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rg-strip-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rg-lab { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rg-proj { font-family: var(--font-data); font-stretch: var(--data-stretch); font-size: var(--fs-xl); font-weight: 650; font-variant-numeric: tabular-nums; }
.rg-strip svg { display: block; width: 100%; height: 26px; overflow: visible; }
.rg-band { stroke: var(--rule-strong); stroke-width: 4; stroke-linecap: round; }
.rg-box { fill: var(--info); }
.rg-med { stroke: var(--ink); stroke-width: 2; }
.rg-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.rg-nums { display: flex; justify-content: space-between; gap: 6px; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.rg-table td { font-variant-numeric: tabular-nums; }
.rg-row { cursor: pointer; }
.rg-row.sel td { background: var(--info-fill); }
.rg-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* Text for screen readers only (a column heading for a button column, etc.) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
