/* Prime5 Baseball — Ravix dark. Core scaffold styles. */
:root {
  --bg: #0e1116;
  --surface: #171b22;
  --surface-muted: #1e232d;
  --text: #e8eaf0;
  --muted: #9aa0ae;
  --border: #2a2f3a;
  --accent: #d4a017;
  --accent-text: #161300;
  --cyan: #45c2ff;
  --green: #22a06b;
  --gray: #9aa0a6;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.45;
}
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
/* Header — same as the football site: Ravix logo + wordmark, pill nav. */
header { padding: 18px 0; border-bottom: 1px solid var(--border); }
header .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding-top: 0; padding-bottom: 0; }
/* The header needs more room than the 720px content column: brand +
   full nav + gear is ~740px, so at 720px the nav dropped to a second
   row and doubled the header height (Nov 24, 2026). Football's wrap is
   1080px; 960px keeps the header close to the content width. */
header .wrap { max-width: 960px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 42px; height: 42px; border-radius: 10px; object-fit: contain;
  box-shadow: 0 0 0 1px var(--border), 0 6px 20px rgba(0,0,0,.5); }
.brand span { font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: .12em; font-size: 19px; }
.brand span em { font-style: normal; color: var(--cyan); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text small { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 11px; letter-spacing: .28em; color: var(--muted); text-transform: uppercase; }
nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: .45rem .75rem; border-radius: 8px; }
nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
@media (max-width: 640px) {
  .brand span { font-size: 16px; }
  nav { margin-left: 0; width: 100%; }
  nav a { padding: .75rem .6rem; font-size: .92rem; min-height: 44px; display: inline-flex; align-items: center; }
  .settings-btn { width: 44px; height: 44px; }
}
/* Header settings dropdown (screen names, Nov 24, 2026). */
.settings { position: relative; margin-left: 8px; }
.settings-btn {
  background: transparent; color: var(--muted);
  border: none; border-radius: 50%;
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.settings-btn:hover { background: rgba(255,255,255,.05); color: var(--text); }
.settings-btn svg { width: 22px; height: 22px; }
.settings-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
  width: 300px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.settings-title {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.settings-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 8px 0; }
.settings-label { font-size: 14px; font-weight: 600; }
.settings-desc { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.switch {
  flex: none; width: 44px; height: 24px; border-radius: 999px;
  border: none; background: var(--border); cursor: pointer;
  position: relative; padding: 0;
}
.switch .knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--text); transition: left .15s;
}
.switch.on { background: var(--cyan); }
.switch.on .knob { left: 23px; }
/* Small muted line under a screen name (standings, dashboard). */
.display-sub { display: block; font-size: 12px; color: var(--muted); }
h1 { font-size: 20px; margin: 4px 0 2px; }
h2 { font-size: 15px; margin: 18px 0 6px; }
.sub { color: var(--muted); font-size: 13px; }
.game-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; width: 100%; text-align: left; cursor: pointer;
  font-weight: 700; font-size: 13px; color: var(--muted);
  margin: 12px 0 4px; padding: 8px 2px 0;
  background: none; border: none; border-top: 1px solid var(--border);
  border-radius: 0; font-family: inherit;
}
.game-head:hover { color: var(--text); }
.game-head .game-count { font-weight: 400; font-size: 12px; flex: none; }
.game-head .chev { color: var(--accent); flex: none; }
.game-rows.collapsed { display: none; }
.game-rows[hidden] { display: none; }
.game-head:first-of-type { border-top: none; padding-top: 0; }
.row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; padding: 9px 10px; margin: 3px 0;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-size: 14px; cursor: pointer;
}
button.row:hover { border-color: var(--accent); }
.row.selected { border-color: var(--accent); }
.row.dim { opacity: 0.45; }
.row .num { width: 18px; text-align: center; font-weight: 700; color: var(--accent); flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.in { background: var(--green); }
.dot.out { background: var(--gray); }
.row .main { flex: 1; min-width: 0; }
.row .main .sub2 { color: var(--muted); font-size: 12px; }
.row .right { color: var(--muted); flex: none; text-align: right; }
.card {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px; background: var(--surface-muted); margin-top: 14px;
}
.total { font-weight: 700; font-size: 17px; margin-top: 6px; }
.btn {
  flex: 1; padding: 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent);
  color: var(--accent-text); font-weight: 700; font-size: 15px;
}
.btn.secondary {
  flex: none; background: var(--surface); color: var(--text);
  border-color: var(--border); padding: 10px 14px;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.error {
  border: 1px solid #b3402e; background: #2a1512; color: #f0b4aa;
  border-radius: 8px; padding: 10px; margin: 10px 0;
}
table.standings { width: 100%; border-collapse: collapse; }
table.standings td, table.standings th {
  padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left;
}
table.standings td.num, table.standings th.num { text-align: right; }
.tag {
  font-size: 11px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px;
}
.legend { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.linklike {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--accent); font-size: 13px;
}
.linklike:hover { text-decoration: underline; }

/* Registration + admin. */
.eyebrow {
  font-size: 11px; letter-spacing: 2px; color: var(--accent);
  font-weight: 700;
}
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }
.field {
  display: block; margin-top: 12px; font-size: 12px; font-weight: 600;
}
.field input[type="text"], .field input[type="email"],
.field input[type="tel"] {
  display: block; width: 100%; margin-top: 5px; padding: 10px 11px;
  border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface-muted); color: var(--text); font-size: 14px;
}
.field .hint, .field-label + .hint { font-weight: 400; color: var(--muted); }
.field-label { margin-top: 14px; font-size: 12px; font-weight: 600; }
.radio-row { display: flex; gap: 8px; margin-top: 6px; }
.radio-row label {
  flex: 1; padding: 10px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-muted);
  font-size: 13px; font-weight: 600; text-align: center;
}
.radio-row label:has(input:checked) {
  border-color: var(--accent); color: var(--accent);
}
.pill {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--accent); color: var(--accent);
  font-size: 12px; font-weight: 700; letter-spacing: 1px;
}
table.admin td.actions { white-space: nowrap; text-align: right; }
.btn.small {
  flex: none; padding: 6px 12px; font-size: 13px; width: auto;
}
.btn.secondary.small { padding: 6px 12px; font-size: 13px; }

/* Welcome pop-up tutorial (first visit). */
.welcome-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.welcome-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 18px;
  max-width: 460px; width: 100%; position: relative;
}
.welcome-card .eyebrow {
  font-size: 11px; letter-spacing: 2px; color: var(--accent);
  font-weight: 700;
}
.welcome-card h2 { font-size: 20px; margin: 8px 0 6px; }
.welcome-card .body { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; }
.welcome-close {
  position: absolute; top: 8px; right: 12px;
  border: none; background: none; color: var(--muted);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.welcome-close:hover { color: var(--text); }
.welcome-dots { display: flex; gap: 6px; margin: 16px 0 12px; }
.welcome-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--border);
}
.welcome-dots span.on { background: var(--accent); }
.welcome-actions { display: flex; gap: 8px; }
.welcome-actions .btn.secondary { visibility: hidden; }
.welcome-actions .btn.secondary.show { visibility: visible; }

/* Pick-page redesign (Nov 24, 2026): sticky lineup bar, search,
   collapsible game groups, picked-player chips. */
.sticky-bar {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg); padding: 10px 0 8px;
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.pick-search {
  width: 100%; padding: 10px 11px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--surface-muted);
  color: var(--text); font-size: 14px; margin-bottom: 8px;
}
.pick-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pick-tools .lineup-only {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--muted); cursor: pointer;
}
.pick-tools .sub { margin-left: auto; }
.sticky-bar .btn { flex: none; padding: 8px 14px; }
.sticky-bar .btn.secondary { padding: 8px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips:empty { display: none; }
.chip {
  font-size: 12px; padding: 4px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--surface-muted);
  color: var(--text);
}
.chip.pitcher { border-style: dashed; }

/* Dashboard (Nov 24, 2026): modeled on the football dashboard —
   rank card, two donut charts, my picks, top performers, division
   standings, how scoring works. */
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dash-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .22em; color: var(--muted); }
.dash-title { margin: 2px 0 0; font-size: 22px; }
.dash-badge { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.dash-rank { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; flex-wrap: wrap; }
.dash-place { font-size: 34px; font-weight: 800; color: var(--accent); line-height: 1; }
.dash-pts { font-size: 22px; font-weight: 700; }
.dash-pts span { font-size: 14px; color: var(--muted); font-weight: 500; }
.dash-gap { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dash-next { margin-left: auto; font-size: 13px; color: var(--muted); text-align: right; }
.dash-next b { color: var(--text); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.dash-grid .dash-card { margin-bottom: 0; }
.dash-card p { margin: 8px 0; }
.dash-cardt { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--muted); margin-bottom: 10px; }
.dash-edit { margin-left: 6px; font-size: 13px; letter-spacing: 0; }
.dash-donutwrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dash-legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; min-width: 150px; flex: 1; }
.dash-leg { display: flex; align-items: center; gap: 8px; }
.dash-sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.dash-leg b { margin-left: auto; font-variant-numeric: tabular-nums; padding-left: 12px; }
.dash-subhead { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--cyan); margin: 12px 0 2px; }
.dash-subhead:first-of-type { margin-top: 0; }
.dash-toprow { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dash-toprow:last-child { border-bottom: none; }
.dash-trank { font-weight: 700; color: var(--muted); width: 14px; flex: none; }
.dash-pname { font-weight: 600; }
.dash-team { font-size: 12px; color: var(--muted); }
.dash-ppts { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.dash-div { font-size: 17px; font-weight: 800; margin: 2px 0 8px; }
/* Division label colors: Red Hots gold, White Hots white. */
.div-red { color: #f5c451; }
.div-white { color: #eef3f8; }
/* Head-to-head (Nov 24, 2026): weekly matchups + per-member schedule. */
.h2h-pair { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
a.h2h-pair { color: inherit; text-decoration: none; cursor: pointer; }
a.h2h-pair:hover { background: var(--surface-muted); border-radius: 8px; }
.h2h-chev { color: var(--muted); font-size: 12px; flex: none; }
.h2h-detail-wrap { display: grid; grid-template-rows: 0fr; }
.h2h-detail-wrap.open { grid-template-rows: 1fr; animation: h2h-expand .35s ease; }
@keyframes h2h-expand { from { grid-template-rows: 0fr; opacity: 0; } to { grid-template-rows: 1fr; opacity: 1; } }
.h2h-detail-inner { overflow: hidden; min-height: 0; }
.h2h-detail { padding: 2px 0 10px; }
.h2h-verdict { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; text-align: center; }
.h2h-cols { display: flex; gap: 18px; flex-wrap: wrap; }
.h2h-col { flex: 1; min-width: 220px; }
.h2h-divider { width: 1px; background: var(--border); flex: none; }
@media (max-width: 640px) { .h2h-divider { display: none; } }
.h2h-colhead { font-size: 14px; margin-bottom: 4px; text-align: center; }
.h2h-bigscore { font-size: 32px; font-weight: 800; line-height: 1.15; text-align: center; }
.h2h-bigscore.h2h-lead { color: var(--accent); }
.h2h-scorelabel { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 8px; }
.h2h-pick { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.h2h-pick:last-child { border-bottom: none; }
.h2h-pickmeta { color: var(--muted); }
.h2h-hidden { color: var(--muted); }
.h2h-pair:last-child { border-bottom: none; }
.h2h-mine { background: var(--surface-muted); border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.h2h-side { flex: 1; min-width: 0; }
.h2h-right { text-align: right; }
.h2h-vs { color: var(--muted); font-size: 12px; flex: none; }
.h2h-win { font-weight: 700; }
.h2h-lose { opacity: .55; }
.h2h-badge { color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.h2h-tie { color: var(--muted); font-size: 12px; white-space: nowrap; }
.h2h-live { color: var(--cyan); font-size: 12px; white-space: nowrap; }
.sched-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.pill { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; font-size: 12px; cursor: pointer; font-family: inherit; }
.pill.on { background: var(--cyan); color: #0b0e1a; border-color: var(--cyan); }
.sched-row { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.sched-row:last-child { border-bottom: none; }
.grant-note { background: var(--surface-muted); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 12px; margin: 12px 0; font-size: 13px; }
.dash-foot { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 8px; font-size: 13px; }
