:root,
html[data-theme="light"] {
  --bg: #eceeef;
  --bg-accent: #d8dce1;
  --surface: #ffffff;
  --text: #1a1d21;
  --muted: #5c6370;
  --brand: #4b5563;
  --brand-deep: #2f3640;
  --heading: #163a5f;
  --border: #c5cad1;
  --danger: #9b1c1c;
  --shadow: 0 12px 40px rgba(26, 29, 33, 0.08);
  --font: "Segoe UI", "Trebuchet MS", sans-serif;
  --font-heading: "Source Sans 3", "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --bg: #121417;
  --bg-accent: #1b1e23;
  --surface: #1e2228;
  --text: #e6e8eb;
  --muted: #9aa3ae;
  --brand: #a0a8b4;
  --brand-deep: #6b7380;
  --heading: #8fb4d9;
  --border: #333840;
  --danger: #ff8a8a;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--bg-accent), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, color-mix(in srgb, var(--heading) 12%, transparent), transparent 50%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  height: 2.15rem;
  width: auto;
  flex-shrink: 0;
}

html[data-theme="light"] .brand-mark-dark { display: none; }
html[data-theme="dark"] .brand-mark-light { display: none; }

h1, h2 {
  font-family: var(--font-heading);
  color: var(--heading);
}

.site-nav { display: flex; align-items: center; gap: 1rem; flex: 1; }
.site-nav a { color: var(--text); font-weight: 600; text-decoration: none; }
.nav-user { color: var(--muted); font-size: 0.95rem; font-weight: 500; white-space: nowrap; }

.nav-drop { position: relative; }
.nav-drop > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 13.5rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 20;
}
.nav-drop-menu a {
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
}
.nav-drop-menu a:hover { background: var(--bg-accent); text-decoration: none; }

.nav-sub { position: relative; }
.nav-sub > summary {
  list-style: none;
  cursor: pointer;
  display: block;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
}
.nav-sub > summary::-webkit-details-marker { display: none; }
.nav-sub > summary:hover { background: var(--bg-accent); }
.nav-sub-menu {
  position: absolute;
  left: calc(100% + 0.2rem);
  top: 0;
  min-width: 9.5rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(5, 1.6rem);
  gap: 0.15rem;
  z-index: 21;
}
.nav-sub-menu a {
  display: grid;
  place-items: center;
  padding: 0.3rem 0;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  place-items: center;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1rem;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.nav-toggle-bars {
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.site-header.is-nav-collapsed .nav-toggle { display: grid; }
.site-header.is-nav-collapsed .site-header-inner { flex-wrap: nowrap; }
.site-header.is-nav-collapsed .brand,
.site-header.is-nav-collapsed .header-tools { flex-shrink: 0; }
.site-header.is-nav-collapsed .site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.45rem 1.25rem 0.75rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 20;
}
.site-header.is-nav-collapsed.is-nav-open .site-nav { display: flex; }
.site-header.is-nav-collapsed.is-nav-open .site-nav > a,
.site-header.is-nav-collapsed.is-nav-open .nav-drop > summary,
.site-header.is-nav-collapsed.is-nav-open .nav-user {
  padding: 0.55rem 0;
}
.site-header.is-nav-collapsed .nav-drop-menu,
.site-header.is-nav-collapsed .nav-sub-menu {
  position: static;
  min-width: 0;
  box-shadow: none;
}

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.header-week {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.theme-toggle img {
  width: 22px;
  height: 22px;
  display: block;
}

html[data-theme="light"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }

.site-main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

body.wide-main .site-main {
  max-width: 1400px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p { margin: 0 0 0.45rem; }

.footer-mark {
  display: block;
  margin: 0 auto;
  height: 40px;
  width: auto;
}

html[data-theme="light"] .footer-mark-dark { display: none; }
html[data-theme="dark"] .footer-mark-light { display: none; }

.auth-panel {
  max-width: 420px;
  margin: 2rem auto 0;
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 0.75rem;
}

.auth-brand h1 {
  margin: 0;
}

.auth-brand .brand-mark {
  height: 3.25rem;
}

.auth-panel h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 2.6rem);
  letter-spacing: -0.03em;
}

.auth-panel h2 {
  margin: -0.35rem 0 0.85rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
}

.lede { margin: 0.4rem 0 1.5rem; color: var(--muted); }
.auth-form { display: grid; gap: 0.45rem; }
.auth-form label { font-weight: 600; font-size: 0.92rem; margin-top: 0.55rem; }

.auth-form input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.auth-form button {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--brand), var(--brand-deep));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="dark"] .auth-form button { color: #fff; }

.auth-extra {
  margin: 1rem 0 0;
  text-align: center;
}

.auth-extra a { font-weight: 600; }

.status { color: var(--danger); font-weight: 600; }
.field-error { color: var(--danger); font-size: 0.85rem; }

.home-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.home-card h1 { margin-top: 0; }
.muted { color: var(--muted); }
.success { color: var(--heading); font-weight: 700; }

.home-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.home-hero h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.home-status { font-size: 1.15rem; margin: 0.35rem 0 0.15rem; }
.home-hero .lede { margin: 0 0 1rem; }
.home-hero .grid-leaders { margin: 0.45rem 0 0; }

.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.standings-card,
.quote-card {
  margin-top: 1.25rem;
}

.standings-legend { margin: 0 0 1rem; }

.standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem 2rem;
}

.bcs-grid {
  grid-template-columns: repeat(3, 1fr);
}

.bcs-grid .standings-list li {
  grid-template-columns: minmax(0, 1fr) 3.5rem auto;
}

.bcs-wl {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.bcs-all {
  margin: 0.85rem 0 0;
  text-align: center;
}

.bcs-notes {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.bcs-weights {
  border-collapse: collapse;
  margin: 0 auto 0.45rem;
}

.bcs-weights caption {
  caption-side: top;
  text-align: center;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.bcs-weights th,
.bcs-weights td {
  padding: 0.05rem 0.65rem;
  text-align: center;
  font-weight: 400;
}

.bcs-weights th:first-child,
.bcs-weights td:first-child {
  padding-left: 0;
}

.bcs-weights th:last-child,
.bcs-weights td:last-child {
  padding-right: 0;
}

.bcs-disclaimer { margin: 0; }

.bcs-name {
  position: relative;
  cursor: default;
}

.bcs-tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.2rem);
  z-index: 8;
  min-width: 8.75rem;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.35;
  pointer-events: none;
}

.bcs-name:hover .bcs-tip,
.bcs-name:focus-within .bcs-tip {
  display: table;
}

.bcs-tip th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 0.08rem 0.85rem 0.08rem 0;
}

.bcs-tip td {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 0.08rem 0;
}

html[data-theme="dark"] .bcs-tip {
  background: var(--bg-accent);
}

.standings-div h3 {
  margin: 0 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.standings-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.standings-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}

.standings-list li.is-you {
  background: #fff3a0;
  font-weight: 700;
}

html[data-theme="dark"] .standings-list li.is-you {
  background: #5a4e10;
}

.standings-record {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.standings-star {
  color: #c47d12;
  font-size: 0.85em;
}

.h2h-debug {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.h2h-debug h3 { margin: 0 0 0.35rem; }

.h2h-debug pre {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  max-height: 28rem;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-accent);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.results-card { margin-top: 0; }
.results-card h2 { margin: 0 0 0.35rem; }
.results-after { margin: 0; font-weight: 700; }
.results-card > .tiny { margin: 0.2rem 0 0; }

.results-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-top: 1.15rem;
}

.results-layout h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.results-pair {
  list-style: none;
  margin: 0 0 0.65rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.results-pair-box {
  position: relative;
  margin: 0 0 0.65rem;
}

.results-pair-box .results-pair {
  margin: 0;
}

.results-pair-box.has-more .results-pair {
  padding-bottom: 1.55rem;
}

.h2h-toggle {
  position: absolute;
  right: 0.55rem;
  bottom: 0.42rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.h2h-toggle:hover,
.h2h-toggle:focus-visible {
  color: var(--text);
}

.results-pair li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.35rem 0.6rem;
}

.results-pair li + li { border-top: 1px solid var(--border); }

.results-pair .h2h-blurb {
  display: block;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--muted);
  padding: 0.4rem 0.6rem 0.45rem;
  background: transparent;
}

.results-pair .h2h-blurb[hidden] {
  display: none !important;
}

html[data-theme="dark"] .results-pair {
  border-color: var(--heading);
}

.results-pair li.is-you,
.results-overall li.is-you {
  background: #fff3a0;
  font-weight: 700;
}

.results-pair li.is-nopick {
  background: color-mix(in srgb, var(--bg-accent) 70%, var(--surface));
  color: var(--muted);
}

html[data-theme="dark"] .results-pair li.is-you,
html[data-theme="dark"] .results-overall li.is-you {
  background: #5a4e10;
}

.results-pts {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.results-overall {
  margin: 0;
  padding-left: 1.3rem;
}

.results-overall li {
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

.results-legend {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
}

.results-swatch {
  display: inline-block;
  width: 1.1rem;
  height: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg-accent) 70%, var(--surface));
}

@media (max-width: 700px) {
  .results-layout { grid-template-columns: 1fr; }
  .bcs-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.results-grid-link {
  margin: 1.15rem 0 0;
  font-weight: 700;
}

.grid-tools { margin-bottom: 1.25rem; }
.needs-card { margin-bottom: 1.25rem; }
.needs-card p { margin: 0; line-height: 1.5; }
.needs-card .is-you-need {
  font-weight: 700;
  background: #fff8c6;
  padding: 0.05rem 0.25rem;
  border-radius: 4px;
}
html[data-theme="dark"] .needs-card .is-you-need { background: #5a4e10; }
.grid-filter-title { margin: 0 0 0.75rem; font-weight: 700; }
.grid-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.grid-filter-row label { display: grid; gap: 0.25rem; font-size: 0.85rem; font-weight: 600; }
.grid-filter-row select {
  min-width: 10rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.grid-diff-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0.35rem;
  font-weight: 600;
}
.grid-diff-toggle.is-disabled { color: var(--muted); font-weight: 500; }
.grid-filter-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.85rem;
}
.grid-filter-actions button {
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(160deg, var(--brand), var(--brand-deep));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.grid-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 1rem 0 0;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.grid-scroll {
  overflow: auto;
  max-height: min(78vh, 56rem);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.week-grid {
  --game-col-width: 11.5rem;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 0.88rem;
}

.week-grid th,
.week-grid td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  white-space: nowrap;
  text-align: center;
  background: var(--surface);
}

.week-grid .game-col {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  min-width: 11.5rem;
  max-width: 16rem;
  white-space: normal;
  background: var(--surface);
}

.week-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-accent);
  font-family: var(--font-heading);
}

.week-grid thead th.game-col { z-index: 5; }
.week-grid tfoot th,
.week-grid tfoot td {
  position: sticky;
  bottom: auto;
  font-weight: 700;
}

.week-grid tfoot tr:last-child th,
.week-grid tfoot tr:last-child td {
  position: sticky;
  bottom: 0;
  z-index: 3;
  border-top: 2px solid var(--border);
}

.week-grid tfoot tr:last-child th.game-col { z-index: 5; }

.week-grid .pcol.is-you {
  position: sticky;
  left: var(--game-col-width);
  z-index: 2;
}
.week-grid thead th.pcol.is-you { z-index: 4; }
.week-grid tfoot tr:last-child td.pcol.is-you { z-index: 4; }

.week-grid .is-sidebet { box-shadow: inset 0 -3px 0 #2a9d7c; }
.week-grid .pick-win { background: #fff3a0; color: #9b1c1c; font-weight: 700; }
.week-grid .pick-win2 { background: #f5a54a; color: #1a1d21; }
.week-grid .pick-loss { text-decoration: line-through; color: var(--muted); }
html[data-theme="dark"] .week-grid .pick-win { background: #6b5a12; color: #ffd9d9; }
html[data-theme="dark"] .week-grid .pick-win2 { background: #a65b12; color: #fff; }

.week-grid tr.is-remaining .game-col {
  box-shadow: inset 3px 0 0 var(--heading);
}

.game-line { display: block; font-weight: 700; }
.game-score { display: block; color: var(--heading); font-variant-numeric: tabular-nums; }
.game-flag {
  display: inline-block;
  margin-top: 0.15rem;
  margin-right: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.game-flag-quiet { color: var(--muted); font-weight: 600; }
.week-grid .points { font-variant-numeric: tabular-nums; }

.legend-chip.pick-win { background: #fff3a0; color: #9b1c1c; }
.legend-chip.pick-win2 { background: #f5a54a; }
.legend-chip.pick-loss { text-decoration: line-through; }
.legend-chip.is-sidebet { box-shadow: inset 0 -3px 0 #2a9d7c; }
.legend-chip.is-remaining { box-shadow: inset 3px 0 0 var(--heading); }
.legend-chip.differs-from-you,
.week-grid td.pcol.differs-from-you {
  background: #d4e8f7;
  color: #1a1d21;
}
html[data-theme="dark"] .legend-chip.differs-from-you,
html[data-theme="dark"] .week-grid td.pcol.differs-from-you {
  background: #d4e8f7;
  color: #1a1d21;
}

@media (max-width: 700px) {
  .week-grid:not(.is-limited) .pcol:not(.is-you) { display: none; }
  .week-grid { --game-col-width: 8.5rem; font-size: 0.82rem; }
  .week-grid .game-col { min-width: 8.5rem; }
}

.quote-card blockquote {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  line-height: 1.45;
}

.quote-source {
  margin: 0;
  text-align: right;
  color: var(--muted);
  font-style: italic;
}

.picker-list {
  margin: 0;
  padding-left: 1.3rem;
}

.picker-list li {
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}

.picker-list li.is-you {
  background: #fff3a0;
  font-weight: 700;
}

.picker-received {
  display: grid;
  grid-template-columns: max-content max-content;
  column-gap: 0.85rem;
  row-gap: 0.15rem;
}

.picker-received li {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
}

.picker-who {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
}

.picker-when {
  text-align: left;
  white-space: nowrap;
}

html[data-theme="dark"] .picker-list li.is-you {
  background: #5a4e10;
}

.sidebet-mark { color: var(--danger); font-weight: 700; }
.tiny { font-size: 0.82rem; }

@media (max-width: 700px) {
  .home-split { grid-template-columns: 1fr; }
}

.btn-primary, a.btn-primary {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.2rem;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--brand), var(--brand-deep));
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] a.btn-primary { color: #fff !important; }

.btn-link { font-weight: 700; }

.pick-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: auto;
}

.pick-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.4rem 0.5rem;
  border-bottom: 2px solid var(--border);
}

.pick-table th:nth-child(1) { text-align: right; }
.pick-table th:nth-child(2) { text-align: center; }
.pick-table th:nth-child(3) { text-align: left; }

.pick-table td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.pick-table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-accent) 35%, transparent);
}

.pick-table .pick-spread {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 5.5rem;
}

.pick-visitor { text-align: right; }
.pick-home { text-align: left; }

.pick-visitor .pick-team { justify-content: flex-end; }
.pick-home .pick-team { justify-content: flex-start; }

.picks-form { margin-top: 0; }

.pick-team {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.picks-extras {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
}

.picks-extras h2 {
  margin: 1.25rem 0 0.25rem;
  font-size: 1.05rem;
}

.picks-extras h2:first-child {
  margin-top: 0;
}

.picks-extras select {
  max-width: 280px;
  width: min(100%, 280px);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.picks-extras .sidebet-choices {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.picks-extras .inline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.picks-extras button {
  margin-top: 1rem;
  justify-self: center;
  padding: 0.8rem 1.2rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(160deg, var(--brand), var(--brand-deep));
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

html[data-theme="dark"] .picks-extras button { color: #fff; }

@media (max-width: 700px) {
  .picks-head { display: none; }
}

@media (max-width: 600px) {
  .site-nav { order: 3; width: 100%; }
  .header-tools { margin-left: auto; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-card { margin-top: 0; }
.chat-compose {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.chat-compose textarea {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.chat-compose .btn-primary {
  justify-self: start;
  margin-top: 0;
}
.chat-empty { margin: 0; }
.chat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.chat-msg {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.chat-msg.is-you { background: #fff3a0; }
html[data-theme="dark"] .chat-msg.is-you { background: #5a4e10; }
.chat-msg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}
.chat-who { font-weight: 700; }
.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
.chat-msg-head time {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.chat-del-form { display: flex; }
.chat-del {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.chat-del:hover,
.chat-del:focus-visible {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.chat-body { margin: 0; line-height: 1.45; word-wrap: break-word; }

.scores-card { margin-top: 0; }
.week-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
}
.week-jump a {
  display: grid;
  place-items: center;
  min-width: 2rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.week-jump a:hover { background: var(--bg-accent); text-decoration: none; }
.week-jump a.is-current {
  background: var(--heading);
  border-color: var(--heading);
  color: #fff;
}
html[data-theme="dark"] .week-jump a.is-current { color: #121417; }
.score-table {
  width: max-content;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.score-table tr.is-new-date td { border-top: 1px solid var(--border); }
.score-table td {
  padding: 0.4rem 0;
  vertical-align: middle;
  width: 1%;
  white-space: nowrap;
}
.score-date {
  color: var(--muted);
  font-size: 0.82rem;
  padding-right: 1rem;
}
.score-left { text-align: right; }
.score-right { text-align: left; }
.score-table td.score-spread {
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding: 0.4rem 20px;
}
.score-table input[type="text"] {
  width: 3rem;
  margin: 0;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: center;
}
.score-left input { margin-left: 0.4rem; }
.score-right input { margin-right: 0.4rem; }
.score-table .is-cover { color: var(--danger); font-weight: 700; }
.scores-sidebet { margin: 1.25rem 0 0.5rem; }
.scores-sidebet label { display: grid; gap: 0.35rem; font-weight: 600; max-width: 20rem; }
.scores-sidebet select {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.scores-form { overflow-x: auto; }
.scores-form .btn-primary { margin-top: 1rem; }

.top25-form .btn-primary { margin: 0.75rem 0 1rem; }
.top25-table {
  border-collapse: collapse;
  font-size: 0.95rem;
}
.top25-table th,
.top25-table td {
  padding: 0.3rem 1rem 0.3rem 0;
  text-align: left;
}
.top25-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-right: 0.85rem;
}
.top25-table tr.is-miss td { color: var(--danger); }

.poolweek-card { margin-top: 0; }
.poolweek-body {
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}
.poolweek-count { font-weight: 700; margin: 0 0 0.75rem; }
.conf-grid {
  display: grid;
  grid-template-columns: repeat(6, max-content);
  gap: 0.35rem 1rem;
  margin-bottom: 0.75rem;
}
.conf-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  white-space: nowrap;
}
.poolweek-filters { display: none; }
.poolweek-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}
.poolweek-tools .btn-link {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
html[data-theme="dark"] .poolweek-tools .btn-link { color: #fff; }
.bonus-swatch {
  display: inline-block;
  width: 1.1rem;
  height: 0.85rem;
  background: #fff3a0;
  border: 1px solid var(--border);
}
html[data-theme="dark"] .bonus-swatch { background: #6b5a12; }
.poolweek-scroll { overflow-x: auto; }
.poolweek-table {
  width: max-content;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.poolweek-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.35rem 0.45rem;
  text-align: left;
}
.poolweek-table th.num,
.poolweek-table td.num { text-align: right; }
.poolweek-table td {
  padding: 0.28rem 0.45rem;
  vertical-align: middle;
  white-space: nowrap;
}
.poolweek-table tr.is-new-date td { border-top: 1px solid var(--border); }
.poolweek-table .is-bonus {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  margin: 2px 0;
  border-radius: 4px;
  background: #fff3a0;
}
html[data-theme="dark"] .poolweek-table .is-bonus { background: #6b5a12; }
.poolweek-table input[type="text"] {
  width: 3.4rem;
  padding: 0.28rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: center;
}
.poolweek-table .weight-input { width: 2.2rem; text-align: right; }
.at-col { color: var(--muted); padding-left: 0.2rem; padding-right: 0.2rem; }
.dbc-cell { color: var(--danger); }
.dbc-cell.is-missing-spread { background: #fff8d5; }
html[data-theme="dark"] .dbc-cell.is-missing-spread { background: #4a4214; }
.dbc-copy {
  margin-right: 0.25rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.dbc-val { font-variant-numeric: tabular-nums; }
.poolweek-tb { margin-top: 1.1rem; display: grid; gap: 0.35rem; max-width: 40rem; }
.poolweek-tb label { font-weight: 700; }
.poolweek-tb textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.poolweek-form .btn-primary { margin-top: 1rem; }
.spread-warn {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--danger);
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
  font-weight: 700;
}
.poolweek-form .spread-warn:not([hidden]) {
  position: sticky;
  top: 4.75rem;
  z-index: 9;
  box-shadow: var(--shadow);
}
.spread-warn[hidden] { display: none; }
.spread-warn ul { margin: 0 0 0.6rem; padding-left: 1.2rem; }
.spread-input.is-unusual {
  border-color: var(--danger);
  outline: 1px solid var(--danger);
}

.h2h-week-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
  margin: 0 0 1rem;
}
.h2h-week-pick label { display: grid; gap: 0.25rem; font-weight: 700; }
.h2h-week-pick select {
  min-width: 5.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.h2h-scroll {
  overflow: auto;
  max-height: min(78vh, 56rem);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.h2h-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
}
.h2h-table th,
.h2h-table td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
  text-align: left;
}
.h2h-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg-accent);
  font-family: var(--font-heading);
}
.h2h-table .h2h-franchise {
  position: sticky;
  left: 0;
  z-index: 2;
  text-align: left;
  font-weight: 700;
  min-width: 8.5rem;
}
.h2h-table thead th.h2h-franchise { z-index: 4; }
.h2h-table tr.is-you .h2h-franchise,
.h2h-table tr.is-you td { background: #fff3a0; }
html[data-theme="dark"] .h2h-table tr.is-you .h2h-franchise,
html[data-theme="dark"] .h2h-table tr.is-you td { background: #5a4e10; }

@media (max-width: 700px) {
  .conf-grid { grid-template-columns: repeat(2, max-content); }
  .nav-sub-menu {
    position: static;
    grid-template-columns: repeat(5, 1.6rem);
    box-shadow: none;
    border: 0;
    padding: 0.2rem 0 0.2rem 0.5rem;
  }
}

.commentary-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
  margin: 0 0 0.75rem;
}
.commentary-filters label { display: grid; gap: 0.25rem; font-weight: 700; }
.commentary-filters select {
  min-width: 5.5rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.commentary-views {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.commentary-views span { font-weight: 700; }
.commentary-group {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}
.commentary-week-label { margin: 0.6rem 0 0.2rem; }
.commentary-card .results-pair { margin: 0 0 0.75rem; }

.standings-admin-form .btn-primary { margin-top: 1rem; }
.standings-admin-scroll { overflow-x: auto; }
.standings-admin-table {
  border-collapse: collapse;
  font-size: 0.95rem;
  width: 100%;
  min-width: 44rem;
}
.standings-admin-table th,
.standings-admin-table td {
  padding: 0.35rem 0.55rem 0.35rem 0;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.standings-admin-table th.num,
.standings-admin-table td.num {
  text-align: center;
  width: 1%;
}
.standings-admin-table td.num input {
  width: 3.2rem;
  text-align: center;
  padding: 0.25rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.standings-admin-table td:last-child input {
  width: 100%;
  min-width: 12rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.userlist-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin: 0 0 0.85rem;
}
.userlist-filter h1 { margin: 0; }
.userlist-filter label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
}
.userlist-filter select {
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.userlist-scroll { overflow-x: auto; }
.userlist-table {
  border-collapse: collapse;
  font-size: 0.9rem;
  width: 100%;
  min-width: 72rem;
}
.userlist-table th,
.userlist-table td {
  padding: 0.4rem 0.55rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.userlist-table th.num,
.userlist-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.userlist-table .center { text-align: center; }
.userlist-table .nowrap { white-space: nowrap; }
.userlist-name { text-transform: capitalize; }
.userlist-table .is-neg { color: var(--danger); font-weight: 700; }
.userlist-active {
  background: color-mix(in srgb, #f5e6a8 55%, var(--surface));
  white-space: nowrap;
}
.userlist-credit {
  background: color-mix(in srgb, #9fd9a8 45%, var(--surface));
}
html[data-theme="dark"] .userlist-active {
  background: color-mix(in srgb, #5a4e10 70%, var(--surface));
}
html[data-theme="dark"] .userlist-credit {
  background: color-mix(in srgb, #1d4a28 70%, var(--surface));
}
.userlist-active label { margin-right: 0.55rem; }
.userlist-active select,
.userlist-credit-form input[type="text"] {
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.userlist-table .btn-primary {
  margin: 0 0 0 0.35rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.85rem;
  border-radius: 6px;
}
.userlist-credit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.userlist-credit-form label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
}
.userlist-credit-form a { font-weight: 700; }

.credit-history-table {
  border-collapse: collapse;
  font-size: 0.95rem;
  width: 100%;
  max-width: 44rem;
}
.credit-history-table th,
.credit-history-table td {
  padding: 0.35rem 0.7rem 0.35rem 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.credit-history-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.credit-history-table .nowrap { white-space: nowrap; }
.credit-history-table .is-neg { color: var(--danger); font-weight: 700; }
.credit-history-table tr.year-break td {
  border-bottom: 1px solid var(--border);
  height: 0.85rem;
  padding: 0;
}

.divisions-admin-table {
  border-collapse: collapse;
  font-size: 0.95rem;
}
.divisions-admin-table td {
  padding: 0.4rem 0.65rem 0.4rem 0;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.divisions-admin-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding-right: 0.85rem;
}
.divisions-admin-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.divisions-admin-form input[type="text"] {
  width: 16rem;
  max-width: 100%;
  padding: 0.3rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.divisions-admin-form .btn-primary {
  margin: 0;
  padding: 0.3rem 0.7rem;
  font-size: 0.9rem;
  border-radius: 6px;
}



