/* Prop Labz theme for the data pages: Projections (EV Tool), Best Value and Historical Match Data.
   Applies to any page whose content is wrapped in .lab-page. Palette and rules: design/projections-redesign/README.md
   Loaded after the older page stylesheets, so it overrides them; !important only where markup or scripts set inline styles. */

:root {
  --lab-bg: #07090a;
  --lab-raised: #0b1012;
  --lab-surface: #0e1416;
  --lab-surface-2: #141c1f;
  --lab-border: #1b2629;
  --lab-border-strong: #253538;
  --lab-text: #f3f6f6;
  --lab-soft: #c7d4d5;
  --lab-muted: #97a8aa;
  --lab-faint: #889b9d;
  --lab-teal: #1fc2b5;
  --lab-teal-glow: #5ff0e2;
  --lab-teal-ink: #031413;
  --lab-orange: #f26a1b;
  --lab-volt: #d4f26a;
  --lab-display: 'Saira Condensed', Inter, system-ui, sans-serif;
  --lab-body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Page shell (navbar, ticker, footer) ---------- */
body:has(.lab-page) {
  background: var(--lab-bg) !important;
  color: var(--lab-text);
  font-family: var(--lab-body);
  font-variant-numeric: tabular-nums;
}
body:has(.lab-page)::before { display: none; }
/* Short pages (Community, Privacy...) keep the footer at the bottom of the screen */
body:has(.lab-page) > .content { min-height: calc(100vh - 230px); }
body:has(.lab-page) .w3-bar {
  background: var(--lab-raised) !important;
  border-bottom: 1px solid var(--lab-border);
  font-family: var(--lab-body);
}
/* login.css sets links to the never-loaded Poppins font, so nav text fell back to serif */
body:has(.lab-page) .w3-bar a, body:has(.lab-page) .w3-bar button, body:has(.lab-page) .w3-bar span,
body:has(.lab-page) .ticker, body:has(.lab-page) .custom-footer *:not(.fa) { font-family: var(--lab-body) !important; }
body:has(.lab-page) .w3-bar .w3-bar-item,
body:has(.lab-page) .w3-bar .w3-button {
  color: var(--lab-muted) !important;
  font-weight: 500;
  border-radius: 8px;
}
body:has(.lab-page) .w3-bar .w3-button:hover { color: var(--lab-text) !important; background: var(--lab-surface) !important; }
body:has(.lab-page) .w3-bar a[href="/logout"] { background: transparent !important; border: 1px solid var(--lab-border-strong); color: var(--lab-soft) !important; padding: 8px 18px !important; }
body:has(.lab-page) .w3-dropdown-content {
  background: var(--lab-surface) !important;
  border: 1px solid var(--lab-border-strong);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5) !important;
  /* Must stay visible: nested submenus (E-Sports, Basketball...) open beside their parent at left: 100% */
  overflow: visible;
  padding: 6px !important;
  z-index: 1000 !important;
}
/* w3.css makes .w3-bar dropdowns position: static, so menus were placed against the page instead of their
   button (off-screen once scrolled). Anchor each menu to its trigger; nested menus open beside their item. */
body:has(.lab-page) .w3-dropdown-click { position: relative !important; }
body:has(.lab-page) .w3-dropdown-click > .w3-dropdown-content { position: absolute; top: 100% !important; left: 0; min-width: 220px; margin-top: 4px; }
body:has(.lab-page) .w3-dropdown-content .w3-dropdown-click { display: block; width: 100%; }
body:has(.lab-page) .w3-dropdown-content .w3-dropdown-click > .w3-dropdown-content { top: -7px !important; left: 100% !important; margin: 0 0 0 6px; }
/* Phones: nested menus open inline under their item instead of off the right edge */
@media (max-width: 700px) {
  body:has(.lab-page) .w3-dropdown-content .w3-dropdown-click > .w3-dropdown-content {
    position: static !important; margin: 4px 0 0; box-shadow: none !important; border-color: var(--lab-border);
  }
}
body:has(.lab-page) .w3-dropdown-content .w3-bar-item { color: var(--lab-soft) !important; border-radius: 8px; }
body:has(.lab-page) .w3-dropdown-content .w3-bar-item:hover { background: var(--lab-surface-2) !important; color: var(--lab-text) !important; }
body:has(.lab-page) .ticker-wrap { background: #0f2321; color: var(--lab-teal-glow); border-bottom: 1px solid var(--lab-border); }
body:has(.lab-page) .custom-footer { background: var(--lab-raised); border-top: 1px solid var(--lab-border); color: var(--lab-faint); max-height: none; padding: 20px; }
body:has(.lab-page) .custom-footer h5, body:has(.lab-page) .custom-footer h2 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--lab-faint); }
body:has(.lab-page) .custom-footer .w3-button { background: transparent !important; border: 1px solid var(--lab-border-strong); color: var(--lab-soft) !important; border-radius: 8px; }

/* login.css sets p (and other text) to Poppins, which is never loaded, so it fell back to a serif font */
.lab-page { font-family: var(--lab-body); }
.lab-page p, .lab-page li, .lab-page label, .lab-page small, .lab-page td, .lab-page th,
.lab-page input, .lab-page select, .lab-page button, .lab-page textarea, .lab-page h4, .lab-page h6, .lab-page a { font-family: inherit; }

/* ---------- Page header ---------- */
.lab-page { max-width: 1440px; margin: 0 auto; padding: 24px 16px 48px; color: var(--lab-text); }
@media (min-width: 720px) { .lab-page { padding: 32px 24px 64px; } }
.lab-head { margin: 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
.lab-page .lab-kicker { color: var(--lab-teal); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.lab-head h1 {
  margin: 0; color: var(--lab-text);
  font-family: var(--lab-display); font-weight: 800; font-style: italic; text-transform: uppercase;
  font-size: clamp(36px, 5vw, 52px); line-height: 1; letter-spacing: .01em;
}
.lab-head h1 .accent { color: var(--lab-teal); }
.lab-head p { margin: 0; color: var(--lab-muted); }
.lab-head .lab-rule { display: flex; gap: 6px; margin-top: 6px; }
.lab-head .lab-rule span { height: 3px; border-radius: 2px; background: var(--lab-teal); width: 64px; }
.lab-head .lab-rule span + span { background: var(--lab-orange); width: 16px; }

/* Sport switcher (the per-page sports bar) */
.lab-page .navbar-container { margin: 0 0 20px; }
.lab-page .navbar-container .w3-bar {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 6px;
  background: var(--lab-surface) !important; border: 1px solid var(--lab-border); border-radius: 12px; overflow: visible;
}
.lab-page .navbar-container .w3-bar > .w3-bar-item,
.lab-page .navbar-container .w3-dropdown-click > .w3-bar-item {
  min-height: 40px; display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px !important; border-radius: 999px !important;
  border: 1px solid var(--lab-border-strong); color: var(--lab-soft) !important; font-weight: 600;
}
.lab-page .navbar-container .w3-bar-item:hover { border-color: var(--lab-teal); }

/* ---------- Filters ---------- */
.lab-page .container-filter { background: transparent !important; padding: 0 !important; max-width: none; }
.lab-page .filters {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; align-items: end;
  background: var(--lab-surface) !important; border: 1px solid var(--lab-border); border-radius: 14px;
  padding: 16px !important; margin: 0 0 20px;
}
.lab-page .filters > br { display: none; }
.lab-page .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lab-page .field.wide { grid-column: span 2; }
/* Scripts hide some filters per sport (e.g. map name); drop the whole field so no gap is left */
.lab-page .field:has(> select[style*="display: none"]) { display: none; }
@media (max-width: 520px) { .lab-page .field.wide { grid-column: auto; } }
.lab-page .field .pair { display: flex; gap: 8px; }
.lab-page .filters label {
  margin: 0 !important; display: block;
  color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.lab-page .filters select,
.lab-page .filters input,
.lab-page .chart-left select,
.lab-page .chart-left input,
.lab-page .multi-select-toggle,
.lab-page .multi-select-lines-toggle {
  width: 100%; min-height: 44px; margin: 0 !important; padding: 0 12px !important;
  background: var(--lab-bg) !important; color: var(--lab-text) !important;
  border: 1px solid var(--lab-border-strong) !important; border-radius: 10px !important;
  font: inherit; font-size: 14px !important; text-align: left;
  color-scheme: dark;
}
.lab-page .filters select:focus,
.lab-page .filters input:focus,
.lab-page .chart-left select:focus,
.lab-page .chart-left input:focus { outline: 2px solid var(--lab-teal); outline-offset: 1px; border-color: var(--lab-teal) !important; }
.lab-page .multi-select-options,
.lab-page .multi-select-lines-options {
  top: calc(100% + 6px); width: 100% !important; max-height: 260px !important;
  background: var(--lab-surface) !important; border: 1px solid var(--lab-border-strong) !important; border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5); padding: 4px;
}
.lab-page .multi-select-options label,
.lab-page .multi-select-lines-options label {
  color: var(--lab-soft) !important; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500;
  padding: 8px 10px 8px 34px !important; border-radius: 8px; position: relative;
}
.lab-page .multi-select-options input,
.lab-page .multi-select-lines-options input { left: 10px; width: 16px !important; min-height: 0 !important; accent-color: var(--lab-teal); }
.lab-page .multi-select-options label:hover,
.lab-page .multi-select-lines-options label:hover { background: var(--lab-surface-2) !important; }

/* ---------- Standings (team rankings) ---------- */
.lab-page .standingsright { margin: 0 0 20px; text-align: left; }
.lab-page .dropbtn {
  min-height: 44px; padding: 0 16px; border-radius: 10px !important;
  background: transparent !important; color: var(--lab-text) !important; border: 1px solid var(--lab-border-strong) !important; font-weight: 600;
}
.lab-page .dropbtn:hover { border-color: var(--lab-teal) !important; }
.lab-page .dropdownstandings-content {
  margin-top: 10px; padding: 16px; text-align: left;
  background: var(--lab-surface) !important; border: 1px solid var(--lab-border) !important; border-radius: 14px; box-shadow: none;
}
.lab-page .sport-btn {
  min-height: 40px; padding: 0 16px; border-radius: 999px !important;
  background: transparent; color: var(--lab-soft); border: 1px solid var(--lab-border-strong); font-weight: 600;
}
.lab-page .sport-btn.active,
.lab-page .sport-btn:hover { background: var(--lab-teal); border-color: var(--lab-teal); color: var(--lab-teal-ink); }
.lab-page .sport-buttons-container h6 { color: var(--lab-faint); margin: 0; align-self: center; font-size: 13px; }
.lab-page .group1 td { background-color: var(--lab-surface) !important; }
.lab-page .group2 td { background-color: var(--lab-surface-2) !important; }

/* ---------- Tables ---------- */
.lab-page .table-container {
  background: var(--lab-surface) !important; border: 1px solid var(--lab-border); border-radius: 14px;
  padding: 0 !important; overflow-x: auto;
}
.lab-page .table-container > h3, .lab-page .table-container > h2 {
  margin: 0; padding: 16px 20px 2px;
  font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; letter-spacing: .02em;
}
.lab-page .table-container > p { margin: 0; padding: 0 20px 12px; color: var(--lab-faint); font-size: 12px; }
.lab-page table { width: 100%; border-collapse: collapse !important; margin: 0 !important; border: 0 !important; }
.lab-page table th,
.lab-page table td { border: 0 !important; border-bottom: 1px solid #162023 !important; padding: 12px !important; }
.lab-page table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--lab-raised) !important; color: var(--lab-faint) !important;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; cursor: pointer;
}
.lab-page table th:hover { color: var(--lab-text) !important; }
.lab-page table td { background: transparent; color: var(--lab-text); font-size: 14px; }
.lab-page table tbody tr { transition: background .12s ease; }
.lab-page table tbody tr:hover td { background-color: #111a1c; }
.lab-page table tbody tr:hover { cursor: pointer; }
.lab-page .sort-arrow { color: var(--lab-border-strong) !important; font-size: 12px !important; margin-right: 4px !important; }
.lab-page th.is-sorted, .lab-page th.is-sorted .sort-arrow { color: var(--lab-teal) !important; }
.lab-page td.highlight { background: transparent !important; color: var(--lab-teal) !important; font-weight: 800; }
.lab-page td.trending-cell .flame {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px; border-radius: 999px;
  border: 1px solid #4a5a1f; background: #181f0b; color: var(--lab-volt); font-size: 11px; font-weight: 700; white-space: nowrap;
}

.lab-page .pagination-controls { padding: 14px 16px; margin: 0 !important; gap: 8px; }
.lab-page .pagination-button {
  min-width: 40px; min-height: 40px; padding: 0 12px !important; border-radius: 8px !important;
  background: transparent !important; color: var(--lab-soft) !important; border: 1px solid var(--lab-border-strong) !important;
  font-size: 14px !important; font-weight: 700;
}
.lab-page .pagination-button:hover { border-color: var(--lab-teal) !important; color: var(--lab-text) !important; }
.lab-page .page-info { color: var(--lab-muted) !important; font-size: 13px !important; }
.lab-page .page-size { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; color: var(--lab-faint); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lab-page .page-size select {
  min-height: 40px; padding: 0 8px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0; color-scheme: dark;
  background: transparent; color: var(--lab-soft); border: 1px solid var(--lab-border-strong); cursor: pointer;
}
.lab-page .page-size select:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 1px; }
/* EV Tool: when the lines were last refreshed (amber once they're older than the 10-minute refresh should allow) */
.lab-page .lines-updated { margin-left: 8px; color: var(--lab-muted); }
.lab-page .lines-updated::before { content: "·"; margin-right: 8px; color: var(--lab-faint); }
.lab-page .lines-updated:empty { display: none; }
.lab-page .lines-updated.stale { color: #ffab73; }
/* EV Tool: game starts within 30 minutes */
.pp-soon { display: block; width: fit-content; margin-top: 4px; /* under the time, so the Start column stays narrow */ padding: 1px 7px; border-radius: 5px; font-size: 11.5px; font-weight: 700; color: var(--lab-volt); background: #181f0b; border: 1px solid #4a5a1f; white-space: nowrap; }
/* Player panel: Median / WHIP lines (were inline yellow) */
.lab-page .modal-stat-label { color: var(--lab-teal); font-size: 16px; }
.lab-page .modal-stat-value { color: var(--lab-text); font-size: 16px; }

/* ---------- Historical page chart rows ---------- */
.lab-page .chart-body {
  gap: 20px; margin: 16px; padding: 16px;
  background: var(--lab-raised); border: 1px solid var(--lab-border); border-radius: 14px;
}
.lab-page .chart-left { display: flex; flex-direction: column; gap: 8px; color: var(--lab-soft); }
.lab-page .chart-left label { color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 0; }
.lab-page .chart-container { background: #121a1d; border-radius: 10px; } /* matches CHART_BG in lab-charts.js */
.lab-page .prop-panel #modalChart,
.lab-page .prop-panel #modalChart2 { background: #121a1d; border-radius: 10px; overflow: hidden; }

/* ---------- Player detail pop-ups ---------- */
/* Centered pop-ups (Best Value details, Wins/Loss charts): modal.css gives them a fixed 50vw x 60vh box with
   overflow hidden and centered content, which cut the charts off. Size them to the content and let them scroll. */
.lab-page .modal:not(.prop-panel) {
  width: min(760px, calc(100vw - 32px)) !important; max-width: none !important;
  height: auto !important; max-height: calc(100vh - 48px) !important;
  overflow-y: auto !important; padding: 0 !important;
  justify-content: flex-start !important; align-items: stretch !important;
}
.lab-page .modal:not(.prop-panel) > br { display: none; }
.lab-page .modal:not(.prop-panel) .modal-content { max-width: none !important; max-height: none; overflow: visible; padding: 56px 24px 24px !important; }
.lab-page .modal:not(.prop-panel) .close { position: absolute; top: 12px; right: 12px; }
.lab-page .modal-body { display: flex; flex-direction: column; gap: 12px; }
.lab-page .modal {
  background: rgba(3, 5, 6, .72) !important;
  backdrop-filter: blur(4px);
  border-radius: 18px;
}
.lab-page .modal-content {
  background: var(--lab-surface) !important; border: 1px solid var(--lab-border-strong);
  border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); color: var(--lab-text);
}
.lab-page .modal-content h5, .lab-page .modal-content > h2 {
  font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; letter-spacing: .02em; color: var(--lab-text);
}
.lab-page .modal-content p { color: var(--lab-soft) !important; }
.lab-page .modal-content strong { color: var(--lab-teal) !important; }
.lab-page .close {
  width: 44px; height: 44px; padding: 0 !important; display: grid; place-items: center;
  font-size: 26px !important; line-height: 1; color: var(--lab-text) !important;
  background: var(--lab-surface-2) !important; border: 1px solid var(--lab-border-strong) !important; box-shadow: none !important;
}
.lab-page .close:hover { border-color: var(--lab-teal) !important; }
.lab-page .last-10-btn,
.lab-page .last-10-btn-bv {
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: transparent !important; color: var(--lab-soft) !important; border: 1px solid var(--lab-border-strong) !important; font-weight: 600;
}
.lab-page .last-10-btn:hover,
.lab-page .last-10-btn-bv:hover { border-color: var(--lab-teal) !important; color: var(--lab-text) !important; }
/* "Why Over 64%" in the EV Tool panel (projections-v36.js: renderWhy) */
.pp-why { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--lab-border); display: flex; flex-direction: column; gap: 6px; }
.pp-why-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.pp-why-list li { position: relative; padding-left: 22px; color: var(--lab-soft); font-size: 13.5px; line-height: 1.45; }
.pp-why-list li::before { position: absolute; left: 0; top: 0; width: 16px; text-align: center; font-weight: 900; }
.pp-why-list li.pro::before { content: "✓"; color: var(--lab-teal); }
.pp-why-list li.con::before { content: "✗"; color: #ff7a7a; }
.pp-why-list li.con { color: var(--lab-muted); }
/* ☆ Watch in the player panel (watchlist.js) */
.lab-page .watch-btn {
  min-height: 40px; padding: 0 14px; margin: 0 8px 8px 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--lab-soft); border: 1px solid var(--lab-border-strong); font: inherit; font-size: 14px; font-weight: 700;
}
.lab-page .watch-btn:hover { border-color: var(--lab-volt); color: var(--lab-text); }
.lab-page .watch-btn[aria-pressed="true"] { border-color: var(--lab-volt); color: var(--lab-volt); background: rgba(212, 242, 106, .08); }
.lab-page .watch-btn:disabled { opacity: .6; cursor: default; }

/* ---------- Loading spinners ---------- */
.lab-page .spinner {
  width: 44px !important; height: 44px !important; margin: -22px 0 0 -22px !important;
  border: 4px solid var(--lab-border-strong) !important; border-top-color: var(--lab-teal) !important;
}

/* ---------- Filter bar (Projections; layout from the mockup) ---------- */
.lab-head-row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.fb-source[hidden] { display: none !important; }
.fb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lab-filterbar {
  display: flex; flex-direction: column; gap: 14px; margin: 0 0 16px; padding: 16px;
  background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: 14px;
}
.fb-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.fb-chips:empty { display: none; }
.fb-chip {
  flex: none; height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap; cursor: pointer;
  font: inherit; font-weight: 600; background: transparent; color: var(--lab-soft); border: 1px solid var(--lab-border-strong);
}
.fb-chip:hover { border-color: var(--lab-teal); color: var(--lab-text); }
.fb-chip[aria-pressed="true"] { background: var(--lab-teal); border-color: var(--lab-teal); color: var(--lab-teal-ink); }
/* EV Tool sport chips: compact pills. Tap the name to hide / show a sport; "only" (joined to the right of the pill)
   shows just that sport. */
#fb-sports { gap: 6px; }
#fb-sports .fb-chip { height: 32px; padding: 0 12px; font-size: 13px; }
.fb-sport { flex: none; display: inline-flex; align-items: stretch; }
#fb-sports .fb-sport .fb-chip { border-radius: 999px 0 0 999px; padding: 0 10px 0 12px; }
.fb-only {
  height: 32px; padding: 0 9px 0 7px; cursor: pointer;
  background: transparent; border: 1px solid var(--lab-border-strong); border-left: 0; border-radius: 0 999px 999px 0;
  color: var(--lab-faint); font: inherit; font-size: 11px; font-weight: 600;
}
.fb-only[hidden] { display: none; }
.fb-sport:has(.fb-only[hidden]) .fb-chip { border-radius: 999px; }
.fb-only:hover { color: var(--lab-teal); border-color: var(--lab-teal); }
.fb-only:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
.fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.fb-search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 240px; max-width: 340px; height: 44px; margin: 0; padding: 0 12px;
  background: var(--lab-bg); border: 1px solid var(--lab-border-strong); border-radius: 10px; color: var(--lab-faint);
}
.fb-search:focus-within { border-color: var(--lab-teal); }
.fb-search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; color: var(--lab-text); font: inherit; font-size: 14px; outline: none; }
.fb-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-label { color: var(--lab-faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.fb-seg { display: flex; padding: 3px; gap: 3px; background: var(--lab-bg); border: 1px solid var(--lab-border-strong); border-radius: 10px; }
.fb-seg button {
  height: 38px; padding: 0 14px; border-radius: 8px; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; background: transparent; color: var(--lab-muted);
}
.fb-seg button[aria-pressed="true"] { background: var(--lab-border-strong); color: var(--lab-text); }
.fb-books { background: var(--lab-surface); padding: 4px; gap: 4px; }
.fb-books button { height: 40px; padding: 0 16px; }
.fb-books button[aria-pressed="true"] { background: var(--lab-teal); color: var(--lab-teal-ink); }
.fb-lines { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-line {
  height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600;
  background: transparent; color: #5f7174; border: 1px solid var(--lab-border); text-decoration: line-through;
}
.fb-line[aria-pressed="true"] { background: #14201f; color: var(--lab-text); border-color: #2c3f42; text-decoration: none; }
.fb-toggle {
  height: 36px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-radius: 8px; cursor: pointer;
  font: inherit; font-weight: 600; background: transparent; color: var(--lab-muted); border: 1px solid var(--lab-border-strong);
}
.fb-dot { width: 8px; height: 8px; border-radius: 50%; background: #2c3f42; }
.fb-toggle[aria-pressed="true"] { color: var(--lab-text); border-color: var(--lab-teal); }
.fb-toggle[aria-pressed="true"] .fb-dot { background: var(--lab-teal); }
.fb-reset {
  margin-left: auto; height: 44px; padding: 0 14px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--lab-muted); text-decoration: underline; text-underline-offset: 3px;
}
.fb-reset:hover { color: var(--lab-text); }
.lab-filterbar button:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
/* "Show: All props / Top N" in the filter row */
.fb-select {
  height: 44px; padding: 0 10px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; color-scheme: dark;
  background: var(--lab-bg); color: var(--lab-text); border: 1px solid var(--lab-border-strong); cursor: pointer;
}
.fb-select:focus { outline: none; border-color: var(--lab-teal); box-shadow: 0 0 0 3px rgba(31, 194, 181, .18); }

.fb-group[hidden] { display: none; }
.fb-dates input[type="date"] {
  height: 44px; padding: 0 10px; border-radius: 10px; font: inherit; font-size: 14px; color-scheme: dark;
  background: var(--lab-bg); color: var(--lab-text); border: 1px solid var(--lab-border-strong);
}
.fb-dates input[type="date"]:focus { outline: none; border-color: var(--lab-teal); box-shadow: 0 0 0 3px rgba(31, 194, 181, .18); }
.fb-dash { color: var(--lab-faint); }
.lab-filterbar > .fb-label { margin-bottom: -6px; }

/* Visible selects inside the filter bar (Historical: team, map name) */
.lab-filterbar .field { display: flex; flex-direction: column; gap: 6px; }
.lab-filterbar .field label { margin: 0; color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.lab-filterbar .fb-team { flex: 1 1 240px; max-width: 340px; }
.lab-filterbar .fb-mapname { flex: 0 1 200px; }
.lab-filterbar .field select {
  width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; font: inherit; font-size: 14px;
  background: var(--lab-bg); color: var(--lab-text); border: 1px solid var(--lab-border-strong); color-scheme: dark;
}
/* select2 (searchable team box) */
.lab-page .select2-container { width: 100% !important; }
.lab-page .select2-container--default .select2-selection--single {
  height: 44px; display: flex; align-items: center; border-radius: 10px;
  background: var(--lab-bg); border: 1px solid var(--lab-border-strong);
}
.lab-page .select2-container--default.select2-container--open .select2-selection--single,
.lab-page .select2-container--default.select2-container--focus .select2-selection--single { border-color: var(--lab-teal); }
.lab-page .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--lab-text); line-height: 44px; padding-left: 12px; }
.lab-page .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--lab-faint); }
.lab-page .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
/* The clear (×) button: pinned at the right, before the arrow, instead of hugging the team name */
.lab-page .select2-container--default .select2-selection--single .select2-selection__rendered { position: relative; padding-right: 64px; }
.lab-page .select2-container--default .select2-selection--single .select2-selection__clear {
  position: absolute; top: 50%; right: 30px; transform: translateY(-50%); float: none; margin: 0;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  color: var(--lab-muted); font-size: 16px; line-height: 1; }
.lab-page .select2-container--default .select2-selection--single .select2-selection__clear:hover { background: rgba(242, 106, 27, .15); color: var(--lab-orange); }
.lab-page .select2-container--default .select2-selection--single .select2-selection__arrow b { border-top-color: var(--lab-muted); }
/* The dropdown is appended to <body>, outside .lab-page */
body:has(.lab-page) .select2-dropdown { background: var(--lab-surface); border-color: var(--lab-border-strong); color: var(--lab-soft); border-radius: 10px; overflow: hidden; }
body:has(.lab-page) .select2-search--dropdown .select2-search__field { background: var(--lab-bg); color: var(--lab-text); border: 1px solid var(--lab-border-strong); border-radius: 8px; height: 38px; }
body:has(.lab-page) .select2-results__option--highlighted[aria-selected] { background: #14201f !important; color: var(--lab-text) !important; }
body:has(.lab-page) .select2-container--default .select2-results__option[aria-selected=true] { background: var(--lab-surface-2); color: var(--lab-teal); }

.lab-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 16px; }
.lab-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: 12px; }
.lab-tile span { color: var(--lab-faint); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.lab-tile b { font-size: 24px; font-weight: 700; color: var(--lab-text); }
/* Tiles that filter the table */
.lab-tile-btn { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.lab-tile-btn small { color: var(--lab-faint); font-size: 11px; }
.lab-tile-btn:hover { border-color: rgba(31, 194, 181, .5); }
.lab-tile-btn:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
.lab-tile-btn[aria-pressed="true"] { border-color: var(--lab-teal); box-shadow: 0 0 0 1px var(--lab-teal), 0 0 18px rgba(31, 194, 181, .25); background: rgba(31, 194, 181, .06); }
.lab-tile-btn[aria-pressed="true"] small { color: var(--lab-teal); }
.lab-tile b.t-over { color: var(--lab-teal); }
/* Grade tiles (EV Tool): same colors as the Model pick grades (.pp-pick-strength) */
.lab-tile b.t-strong { color: var(--lab-volt); }
.lab-tile b.t-lean { color: #7fcfe0; }
.lab-tile .tile-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
.lab-tile .tile-dot.strong { background: var(--lab-volt); }
.lab-tile .tile-dot.lean { background: #7fcfe0; }

/* ---------- Prop table (Projections; layout from the mockup) ---------- */
.lab-page.lab-wide { max-width: 1880px; } /* Projections: use wide screens so the table doesn't scroll sideways */
.lab-page .prop-table { min-width: 960px; }
.lab-page .prop-table th,
.lab-page .prop-table td { padding: 10px 10px !important; }
.lab-page .prop-table td { text-align: left; vertical-align: middle; white-space: nowrap; }
/* "Team · Ranked #3 vs Opp · Ranked #9" is the widest text in the row; let it wrap instead of widening the table */
.lab-page .prop-table .pp-player .pp-sub { white-space: normal; max-width: 240px; line-height: 1.35; }
.lab-page .prop-table th.pp-num,
.lab-page .prop-table td.pp-num { text-align: right; }
.lab-page .prop-table td:first-child,
.lab-page .prop-table th:first-child { padding-left: 20px !important; }
.pp-player { display: flex; align-items: center; gap: 12px; }
.pp-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 24px; padding: 0 8px;
  border-radius: 6px; background: #14201f; color: var(--lab-soft); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.pp-stack { display: flex; flex-direction: column; gap: 4px; }
.pp-stack.end { align-items: flex-end; }
.pp-name { font-weight: 600; font-size: 15px; color: var(--lab-text); }
.pp-sub { color: var(--lab-faint); font-size: 12px; }
.pp-big { font-size: 15px; font-weight: 800; color: #f3e3a0; } /* projection: soft yellow, apart from teal (over) / orange (under) */
/* Track record line (projections-v36.js buildPropRow) */
.pp-track { cursor: help; }
.pp-league { color: var(--lab-muted); }

/* Player profile (spider chart) in the player panel */
.panel-profile[hidden] { display: none; }
.profile-sub { margin: 4px 0 6px; color: var(--lab-faint); font-size: 12px; }
.profile-chart { min-height: 320px; border-radius: 12px; overflow: hidden; background: #121a1d; }
.profile-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 8px 0 4px; }
.profile-facts[hidden] { display: none; }
.pf-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 10px; background: var(--lab-surface-2); border: 1px solid var(--lab-border); }
.pf-tile span { color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.pf-tile b { color: var(--lab-text); font-size: 18px; line-height: 1.2; }
.pf-tile small { color: var(--lab-faint); font-size: 11px; line-height: 1.3; }
.profile-notes { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.profile-notes li { position: relative; padding-left: 16px; color: var(--lab-soft); font-size: 13px; line-height: 1.45; }
.profile-notes li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--lab-teal); }
.profile-notes li:first-child::before { background: var(--lab-volt); }
.pp-track b { font-weight: 700; color: var(--lab-soft); }
.pp-track b.t-over { color: var(--lab-teal); }
.pp-track b.t-under { color: #ff9a5c; }
.pp-tag { align-self: flex-start; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; border: 1px solid currentColor; }
.pp-tag.demon { color: #ff5a4e; }
.pp-tag.goblin { color: #8fd694; }
.pp-tag.alt { color: var(--lab-teal-glow); }
.pp-trend {
  display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border-radius: 999px;
  border: 1px solid #4a5a1f; background: #181f0b; color: var(--lab-volt); font-size: 10px; font-weight: 700;
}
.pp-edge { display: flex; align-items: center; gap: 10px; }
.pp-pill { min-width: 56px; text-align: center; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #050708; }
.pp-pill.over { background: var(--lab-teal); }
.pp-pill.under { background: var(--lab-orange); }
.pp-bar { position: relative; width: 72px; height: 4px; border-radius: 4px; background: var(--lab-border); }
.pp-bar::before { content: ""; position: absolute; left: 50%; top: -2px; width: 1px; height: 8px; background: #2c3f42; }
.pp-bar i { position: absolute; top: 0; height: 4px; border-radius: 4px; }
.pp-bar i.over { background: var(--lab-teal); }
.pp-bar i.under { background: var(--lab-orange); }
.pp-split { display: flex; width: 104px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--lab-border); }
.pp-split i { display: block; height: 100%; }
.pp-split i.over { background: var(--lab-teal); }
.pp-split i.push { background: #5f7174; }
.pp-push::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 1px; background: #5f7174; vertical-align: 1px; }
.pp-split i.under { background: var(--lab-orange); }
.t-over { color: var(--lab-teal); }
.t-under { color: var(--lab-orange); }
.t-muted { color: var(--lab-muted); }
.t-low { color: #f0605a; }
/* Model pick: the cell to read first on each row */
.lab-page .prop-table td.pp-model-cell { background: rgba(31, 194, 181, .035); }
.lab-page .prop-table th.pp-model-head { color: var(--lab-teal) !important; }
.pp-pick {
  display: inline-flex; align-items: baseline; gap: 6px; align-self: flex-start;
  padding: 4px 10px; border-radius: 8px; border: 1px solid transparent; line-height: 1.15;
}
.pp-pick-side { font-size: 13px; font-weight: 600; }
.pp-pick-pct { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pp-pick.over { color: #5fd8cd; background: rgba(31, 194, 181, .08); }
.pp-pick.under { color: #ffab73; background: rgba(255, 138, 61, .08); }
.pp-pick.strong.over { background: rgba(31, 194, 181, .14); border-color: rgba(31, 194, 181, .35); }
.pp-pick.strong.under { background: rgba(255, 138, 61, .14); border-color: rgba(255, 138, 61, .35); }
.pp-pick.toss { background: transparent; border-color: var(--lab-border-strong); }
.pp-pick-strength { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; }
.pp-pick-strength::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pp-pick-strength.strong { color: var(--lab-volt); }
.pp-pick-strength.lean { color: #7fcfe0; }
.pp-pick-strength.toss { color: #e0b46a; }
/* Low confidence (model chance under PICK_LEAN, projections-v36.js): kept on the board at full strength for reference;
   the pick keeps its Over/Under color without the tinted fill, and the amber "not recommended" tag marks it */
.pp-model-facts .pp-pick-strength.toss { padding: 2px 8px; border: 1px solid rgba(224, 180, 106, .4); border-radius: 999px; }
.pp-edge-num { color: var(--lab-soft); font-weight: 700; }
/* Model pick cell: side + chance and the grade on one line; notes only when they apply */
.pp-pick-row { display: flex; align-items: center; gap: 10px; }
.pp-pick-row .pp-pick { align-self: auto; }
/* Supporting facts under the pick: one per line, small and muted so the pick reads first */
.pp-model { gap: 6px; }
.pp-model-facts { display: flex; flex-direction: column; gap: 2px; color: var(--lab-faint); font-size: 12px; line-height: 1.35; }
.pp-model-facts .pp-track { cursor: default; }
/* EV Tool: the pill alone carries the pick's strength. Strong = solid, Slight edge = tinted, No edge = grey */
.pp-model .pp-pick { align-self: flex-start; padding: 5px 12px; }
.pp-model .pp-pick .pp-pick-pct { font-size: 17px; }
.pp-model .pp-pick.strong.over { background: var(--lab-teal); border-color: var(--lab-teal); color: var(--lab-teal-ink); }
.pp-model .pp-pick.strong.under { background: var(--lab-orange); border-color: var(--lab-orange); color: #1a0a02; }
.pp-model .pp-pick.toss { background: transparent; border-color: var(--lab-border-strong); }
.pp-model-facts .pp-pick-strength { font-size: 12px; }
.pp-note { align-self: flex-start; padding: 2px 7px; border-radius: 5px; font-size: 11.5px; font-weight: 600; color: #ffab73; background: rgba(255, 138, 61, .08); }
.pp-mu { display: flex; align-items: center; gap: 8px; }
.pp-rating { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--lab-soft); }
.pp-rating.over { background: color-mix(in srgb, var(--lab-teal) 10%, transparent); color: color-mix(in srgb, var(--lab-teal) 65%, var(--lab-soft)); }
.pp-rating.under { background: color-mix(in srgb, var(--lab-orange) 10%, transparent); color: color-mix(in srgb, var(--lab-orange) 65%, var(--lab-soft)); }
.pp-rating.neutral { background: color-mix(in srgb, var(--lab-soft) 8%, transparent); }
.lab-page .pp-footnote { margin: 0; padding: 0 20px 16px !important; color: var(--lab-faint); font-size: 12px; }

/* ---------- Player detail panel (Projections): docked beside the table ---------- */
.lab-page .prop-layout { display: flex; gap: 20px; align-items: flex-start; }
.lab-page .prop-layout > .table-container { flex: 999 1 640px; min-width: 0; }
.lab-page .prop-panel {
  /* modal.css makes .modal a centered overlay; here it is a sticky column next to the table */
  position: sticky !important; top: 16px; left: auto; transform: none !important;
  flex: 0 0 420px; width: 420px !important; height: auto !important; max-height: calc(100vh - 32px);
  padding: 0 !important; overflow-y: auto; flex-direction: column; z-index: 5;
  /* modal.css centers .modal's content; when it is taller than the panel that pushes the top
     (player name, details) above the panel's edge where it can't be scrolled to */
  justify-content: flex-start !important; align-items: stretch !important;
  background: var(--lab-surface) !important; border: 1px solid var(--lab-border-strong); border-radius: 16px; backdrop-filter: none;
}
.lab-page .prop-panel .modal-content {
  background: transparent !important; border: 0; box-shadow: none; border-radius: 0;
  max-width: none !important; max-height: none; overflow: visible; padding: 20px !important; gap: 12px;
}
.lab-page .prop-panel .close { position: absolute; top: 14px; right: 14px; }
.lab-page .prop-panel h5, .lab-page .prop-panel .modal-content > h2 { margin: 0; padding-right: 52px; }
.lab-page .prop-panel p { margin: 0; }
/* modal.css sizes every span/strong in pop-ups at 24-48px; the page scripts set sizes inline where they want them */
.lab-page .modal span,
.lab-page .modal strong { font-size: inherit; }
.lab-page .panel-facts { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.lab-page .panel-section { background: var(--lab-raised); border: 1px solid var(--lab-border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lab-page .prop-panel #modalChart,
.lab-page .prop-panel #modalChart2 { width: 100%; } /* no fixed height: Plotly sizes the chart like the original pop-up */
.lab-page #player-stats tr.is-selected td { background: #0f2321; }
.lab-page #player-stats tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--lab-teal); }

/* Map wins & losses section (esports) */
.lab-page .panel-maps { position: relative; flex-direction: column; }
.lab-page .panel-maps #modalChart-2,
.lab-page .panel-maps #modalChart2-2 { width: 100%; background: #121a1d; border-radius: 10px; overflow: hidden; }
.lab-page .panel-maps p { margin: 0; color: var(--lab-soft); }
.lab-page .panel-maps .map-key { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.lab-page .map-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 6px; }
.lab-page .map-swatch:first-child { margin-left: 0; }
.lab-page .map-win { background: #8fe3da; }  /* keep in sync with MAP_WIN in projections-v36.js */
.lab-page .map-loss { background: #f7a774; } /* MAP_LOSS */
.lab-page .map-dash { width: 14px; border-top: 1px dashed #c7d4d5; display: inline-block; margin-left: 6px; }
.lab-page .map-outlook { border: 1px solid #243236; border-radius: 10px; padding: 10px 12px; }
.lab-page .map-outlook[hidden] { display: none; }
.lab-page .map-outlook .mo-head { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.lab-page .map-outlook ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lab-page .map-outlook li { display: grid; grid-template-columns: 1fr auto 3.5em 3.5em; gap: 10px; align-items: baseline; font-size: 14px; }
.lab-page .map-outlook .mo-math { color: var(--lab-soft); font-variant-numeric: tabular-nums; }
.lab-page .map-outlook b { text-align: right; font-variant-numeric: tabular-nums; }
.lab-page .map-outlook .mo-lean { font-weight: 700; text-align: right; }
.lab-page .panel-hide {
  height: 32px; padding: 0 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700;
  background: transparent; color: var(--lab-muted); border: 1px solid var(--lab-border-strong);
}
.lab-page .panel-hide:hover { color: var(--lab-text); border-color: var(--lab-teal); }

/* Empty / failed chart state */
.lab-page .chart-message { min-height: 200px; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--lab-muted); font-size: 14px; }

/* Model probability box in the panel */
.lab-page .panel-section[hidden] { display: none; }
.lab-page .prop-panel .pp-sub { font-size: 12px; }
.lab-page .prop-panel .pp-prob-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lab-page .prop-panel .pp-prob-title { color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.lab-page .prop-panel .pp-prob-nums { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lab-page .prop-panel .pp-prob-nums b { font-size: 22px; font-weight: 800; }
.lab-page .prop-panel .pp-prob-bar { position: relative; padding: 4px 0; }
.pp-split.big { width: 100%; height: 10px; border-radius: 5px; }
.lab-page .prop-panel .pp-compare { color: var(--lab-soft); font-size: 13px; }

/* Narrower screens: the panel slides over from the right instead of squeezing the table */
@media (max-width: 1099px) {
  .lab-page .prop-panel {
    position: fixed !important; top: 0; right: 0; bottom: 0;
    width: min(440px, 100vw) !important; height: 100vh !important; max-height: none;
    border-radius: 0; z-index: 2000; box-shadow: -20px 0 60px rgba(0, 0, 0, .6);
  }
}

/* ---------- Dashboard ---------- */
.lab-dash { display: flex; flex-direction: column; gap: 20px; }
.lab-dash h2 { margin: 0; color: var(--lab-text); }
.dash-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px;
  border-radius: 10px; font-weight: 700; text-decoration: none; border: 1px solid transparent; white-space: nowrap;
}
.dash-btn.primary { background: var(--lab-teal); color: var(--lab-teal-ink); }
.dash-btn.primary:hover { background: #2ad3c6; color: var(--lab-teal-ink); text-decoration: none; }
.dash-btn.ghost { border-color: var(--lab-border-strong); color: var(--lab-text); }
.dash-btn.ghost:hover { border-color: var(--lab-teal); color: var(--lab-text); text-decoration: none; }
.dash-panel { background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-panel h2 { font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 26px; letter-spacing: .02em; line-height: 1.05; }

/* Hero */
.d-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 28px; border-radius: 20px; border: 1px solid var(--lab-border-strong);
  background:
    linear-gradient(rgba(95, 240, 226, .045) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(95, 240, 226, .045) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(ellipse 60% 120% at 85% 50%, rgba(31, 194, 181, .16), transparent 60%),
    var(--lab-raised);
}
@media (min-width: 720px) { .d-hero { padding: 36px 40px; } }
.d-hero-text { position: relative; display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.d-hero h1 { margin: 0; font-family: var(--lab-display); font-weight: 800; font-style: italic; text-transform: uppercase; font-size: clamp(38px, 5vw, 60px); line-height: .95; }
.d-hero h1 .accent { color: var(--lab-teal); display: block; }
.d-hero p { margin: 4px 0 0; color: var(--lab-muted); font-size: 16px; }
.d-hero p strong { color: var(--lab-teal); }
.d-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.d-hero-art { position: relative; flex: none; width: 210px; margin: -18px -8px -26px 0; display: none; }
@media (min-width: 760px) { .d-hero-art { display: block; } }
.d-glow { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(31, 194, 181, .32), rgba(31, 194, 181, 0) 70%); filter: blur(8px); animation: d-breathe 6s ease-in-out infinite; }
.d-hero-art img { position: relative; width: 100%; height: auto; mix-blend-mode: lighten; }
@keyframes d-breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }

/* Board stats */
.d-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.d-stats .lab-tile small { color: var(--lab-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Main row: sport launcher + top plays */
.d-main { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .d-main { grid-template-columns: minmax(0, 1fr) 380px; } }
.d-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.d-panel-head .fb-seg button { display: inline-flex; align-items: center; gap: 6px; }
.d-panel-head .fb-seg button[aria-selected="true"] { background: var(--lab-teal); color: var(--lab-teal-ink); }
.d-note { margin: 0; color: var(--lab-muted); font-size: 14px; }
.d-group { margin: 6px 0 0; color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.d-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.d-tile {
  display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 12px 14px; border-radius: 12px; text-decoration: none;
  background: var(--lab-raised); border: 1px solid var(--lab-border); color: var(--lab-text);
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.d-tile:hover { border-color: var(--lab-teal); background: #0f1b1c; color: var(--lab-text); text-decoration: none; transform: translateY(-1px); }
.d-tile-name { font-weight: 700; font-size: 15px; }
.d-tile-count { color: var(--lab-teal); font-size: 12px; font-weight: 700; }
.d-tile.is-quiet .d-tile-count { color: var(--lab-faint); font-weight: 500; }

/* Historical tab: a lookup tool, so steps + what each sport covers instead of prop counts */
.d-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.d-steps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--lab-raised); border: 1px solid var(--lab-border); color: var(--lab-soft); font-size: 13px; font-weight: 600; }
.d-steps span { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 194, 181, .12); color: var(--lab-teal); font-size: 12px; font-weight: 800; }
.d-tile-lookup { min-height: 84px; gap: 4px; }
.d-tile-detail { color: var(--lab-faint); font-size: 12px; }
.d-tile-go { margin-top: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--lab-teal); font-size: 12px; font-weight: 700; opacity: .75; transition: opacity .15s; }
.d-tile-lookup:hover .d-tile-go { opacity: 1; }
@media (max-width: 600px) {
  .d-launch .d-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-tile-lookup { min-height: 64px; }
  .d-tile-go { display: none; }
}
.d-tile.is-quiet .d-tile-name { color: var(--lab-soft); }

.d-locked { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; border-radius: 12px; background: var(--lab-raised); border: 1px dashed var(--lab-border-strong); }
.d-locked p { margin: 0; color: var(--lab-muted); }
.d-lock { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(242, 106, 27, .45); color: #ff9a5c; font-size: 12px; font-weight: 700; }

.d-plays { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.d-play { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #162023; }
.d-play:last-child { border-bottom: 0; }
.d-rank { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--lab-surface-2); color: var(--lab-soft); font-size: 12px; font-weight: 800; }
.d-play-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.d-play-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-play-main small { color: var(--lab-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-pick { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #050708; }
.d-pick.over { background: var(--lab-teal); }
.d-pick.under { background: var(--lab-orange); }
.d-play-empty { padding: 14px 0; color: var(--lab-muted); font-size: 14px; }
.d-skel span { display: block; height: 12px; border-radius: 6px; background: var(--lab-border); animation: d-pulse 1.4s ease-in-out infinite; }
.d-skel span:first-child { flex: 1; }
.d-skel span:last-child { width: 72px; height: 22px; border-radius: 999px; }
@keyframes d-pulse { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
.d-full { width: 100%; }

/* Bottom row */
/* Dashboard watchlist */
.d-watch { margin-bottom: 16px; }
.d-watch-count { color: var(--lab-faint); font-size: 13px; }
.d-watch-players { list-style: none; margin: 10px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.d-watch-players:empty { display: none; }
.d-watch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 12px; border: 1px solid var(--lab-border-strong); border-radius: 999px; color: var(--lab-soft); font-size: 13px; font-weight: 700; }
.d-watch-chip small { color: var(--lab-faint); font-size: 11px; }
.d-watch-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--lab-faint); font-size: 18px; line-height: 1; cursor: pointer; }
.d-watch-x:hover { color: var(--lab-text); background: var(--lab-raised); }
.d-watch-list .d-play-empty { margin: 0; padding: 12px 0; color: var(--lab-muted); font-size: 14px; }
.d-watch-list { margin-top: 8px; }
.d-watch-row { border-bottom: 1px solid #162023; }
.d-watch-row summary { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; cursor: pointer; list-style: none; }
.d-watch-row summary::-webkit-details-marker { display: none; }
.d-watch-row summary::before { content: "›"; flex: none; width: 14px; color: var(--lab-faint); font-size: 18px; transition: transform .15s; }
.d-watch-row[open] summary::before { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .d-watch-row summary::before { transition: none; } }
.d-watch-row summary:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; border-radius: 8px; }
.d-watch-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.d-watch-who strong { color: var(--lab-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-watch-who small { color: var(--lab-faint); font-size: 12px; }
.d-watch-props { margin: 0 0 6px 24px; padding: 0; }
.d-watch-props .d-play { padding: 8px 0; }
.d-watch-more { display: block; margin: 4px 0 10px 24px; padding: 6px 0; border: 0; background: none; color: var(--lab-teal); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.d-watch-list > .d-watch-more { margin-left: 0; }
.d-watch-idle { margin-top: 12px; }
.d-watch-idle-label { color: var(--lab-faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.d-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.dash-updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dash-updates li { position: relative; padding: 10px 0 10px 18px; border-bottom: 1px solid #162023; color: var(--lab-muted); font-size: 14px; }
.dash-updates li:last-child { border-bottom: 0; }
.dash-updates li::before { content: ""; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--lab-teal); }
.dash-updates time { display: block; color: var(--lab-faint); font-size: 12px; font-weight: 600; }
.dash-updates strong { color: var(--lab-text); margin-right: 4px; }
.dash-more summary { cursor: pointer; color: var(--lab-teal); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.dash-more summary:hover { color: var(--lab-teal-glow); }

.d-player {  /* the Learn videos are phone recordings (9:16) */
  position: relative; aspect-ratio: 9 / 16; width: min(100%, 300px); margin: 0 auto; border-radius: 22px; overflow: hidden; display: grid; place-items: center;
  border: 1px solid var(--lab-border-strong);
  background: radial-gradient(circle at 30% 20%, rgba(31, 194, 181, .14), transparent 55%), var(--lab-raised);
}
.d-player-empty { color: var(--lab-faint); font-size: 14px; }
.d-player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.d-videos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.d-video {
  width: 100%; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--lab-text); font: inherit; text-align: left; cursor: pointer;
}
.d-video:hover { background: var(--lab-raised); }
.d-video[aria-current="true"] { background: #0f1b1c; border-color: rgba(31, 194, 181, .45); }
.d-video strong { display: block; font-size: 14px; }
.d-video small { display: block; color: var(--lab-faint); font-size: 12px; }
.d-video-play { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lab-teal); color: var(--lab-teal-ink); }

.d-links { display: flex; flex-direction: column; }
.d-links a { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid #162023; color: var(--lab-text); text-decoration: none; }
.d-links a:last-child { border-bottom: 0; }
.d-links a:hover strong { color: var(--lab-teal); }
.d-links small { color: var(--lab-faint); font-size: 13px; }
.lab-dash a:focus-visible, .lab-dash button:focus-visible, .lab-dash summary:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }

/* ---------- Content pages (Today's Picks, Subscription, Community, Privacy, Terms, admin tools) ---------- */
.lab-narrow { max-width: 1120px; }
.lab-page a:focus-visible, .lab-page button:focus-visible, .lab-page select:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
.lab-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--lab-border-strong); color: var(--lab-soft); }
.lab-chip.volt { border-color: #4a5a1f; background: #181f0b; color: var(--lab-volt); }
.lab-section-title { margin: 8px 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.lab-section-title h2 { margin: 0; font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 28px; letter-spacing: .02em; line-height: 1; color: var(--lab-text); }
.lab-section-title p { margin: 0; color: var(--lab-muted); font-size: 14px; }
.lab-link { color: var(--lab-teal); font-weight: 700; }
.lab-link:hover { color: var(--lab-teal-glow); }

/* Today's Picks */
.pk-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pk-head .lab-head { margin: 0; }
.pk-timer { min-width: 220px; }
.pk-timer b { font-size: 30px; letter-spacing: .02em; color: var(--lab-teal); }
.pk-timer small { color: var(--lab-faint); font-size: 12px; }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.pk-card { background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: 14px; overflow: hidden; min-width: 0; }
.pk-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--lab-border); }
.pk-card-head h3 { margin: 0; font-family: var(--lab-body); font-size: 16px; font-weight: 800; color: var(--lab-text); }
.pk-card-head span { color: var(--lab-faint); font-size: 12px; }
/* All today: each book folds up (picks.html); open cards don't stretch the closed ones beside them */
.pk-grid-fold { align-items: start; }
.pk-fold > summary { cursor: pointer; list-style: none; user-select: none; }
.pk-fold > summary::-webkit-details-marker { display: none; }
.pk-fold:not([open]) > summary { border-bottom: 0; }
.pk-fold > summary:hover h3 { color: var(--lab-teal); }
.pk-fold > summary:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: -2px; }
.pk-fold-icon { display: inline-block; width: 8px; height: 8px; margin-left: 10px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .15s; }
.pk-fold[open] .pk-fold-icon { transform: translateY(1px) rotate(225deg); }
.pk-list { list-style: none; margin: 0; padding: 0; }
.pk-pick { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #162023; }
.pk-pick:last-child { border-bottom: 0; }
.pk-sport { flex: none; min-width: 56px; padding: 3px 6px; border-radius: 6px; background: var(--lab-surface-2); color: var(--lab-soft); font-size: 11px; font-weight: 800; text-align: center; letter-spacing: .04em; }
.pk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-main strong { color: var(--lab-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-pays { color: var(--lab-soft); font-size: 11px; white-space: nowrap; }
.pk-pays b { color: var(--lab-text); }
.pp-pays { white-space: nowrap; }
.pk-team { margin-left: 4px; color: var(--lab-soft); font-size: .8em; font-weight: 700; letter-spacing: .03em; }
/* The book's position for the player (PG, WR, D...), small by the name */
.pk-pos, .pp-pos { margin-left: 3px; color: var(--lab-soft); font-size: .72em; font-weight: 600; letter-spacing: .03em; }
.pk-main small { color: var(--lab-faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-why { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--lab-muted); font-size: 12px; }
.pk-why b { color: var(--lab-soft); }
.pk-line { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pk-bet { display: flex; align-items: center; gap: 8px; }
.pk-chance { color: var(--lab-teal); font-size: 12px; font-weight: 700; }
.pk-board { color: var(--lab-faint); font-weight: 600; }
@media (max-width: 600px) {
    /* Countdown and record tiles share a row under the title; matchup and start time wrap instead of truncating */
    .pk-head .lab-head { flex-basis: 100%; }
    .pk-timer { flex: 1 1 0; min-width: 0; }
    .pk-timer b { font-size: 26px; }
    .pk-main small { white-space: normal; }
    /* The pick card on phones: the name gets the full width (it was cut to 'Thoma...' beside the line column);
       the bet, chance and grade go on their own row underneath */
    .pk-pick { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "sport main" ". line"; align-items: start; gap: 6px 12px; }
    .pk-sport { grid-area: sport; margin-top: 2px; }
    .pk-main { grid-area: main; }
    .pk-main strong { white-space: normal; }
    .pk-line { grid-area: line; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 12px; }
}
.pk-line b { font-size: 16px; color: var(--lab-text); }
.pk-side { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #050708; background: var(--lab-soft); }
.pk-side.over { background: var(--lab-teal); }
.pk-side.under { background: var(--lab-orange); }
.pk-empty { padding: 18px 16px; color: var(--lab-muted); font-size: 14px; margin: 0; }
.pk-none { padding: 40px 24px; text-align: center; border: 1px dashed var(--lab-border-strong); border-radius: 14px; background: var(--lab-raised); }
.pk-none h2 { margin: 0 0 6px; font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 30px; color: var(--lab-text); }
.pk-none p { margin: 0; color: var(--lab-muted); }
/* This hour / All today tabs */
.pk-tabs { display: flex; gap: 6px; padding: 4px; width: fit-content; max-width: 100%; border: 1px solid var(--lab-border); border-radius: 12px; background: var(--lab-surface); }
.pk-tab { min-height: 38px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--lab-muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pk-tab:hover { color: var(--lab-text); }
.pk-tab[aria-selected="true"] { background: var(--lab-teal); color: var(--lab-teal-ink); }
.pk-tab-count { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--lab-surface-2); color: var(--lab-soft); font-size: 12px; }
.pk-tab[aria-selected="true"] .pk-tab-count { background: rgba(0, 0, 0, .18); color: inherit; }
.pk-panel { display: flex; flex-direction: column; gap: inherit; }
.pk-panel[hidden] { display: none; }
.pk-status { padding: 0 7px; border-radius: 999px; font-weight: 700; border: 1px solid var(--lab-border-strong); }
.pk-status.live { border-color: rgba(31, 194, 181, .5); color: var(--lab-teal); }
.pk-status.dropped { color: var(--lab-faint); }
.pk-status.started { color: var(--lab-soft); }
.pk-pick-dropped .pk-main strong, .pk-pick-started .pk-main strong { color: var(--lab-soft); }
.pk-pick[hidden] { display: none; }
/* All today: still on the board / started / all */
.pk-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-filter-btn { min-height: 34px; padding: 0 14px; border: 1px solid var(--lab-border-strong); border-radius: 999px; background: transparent;
  color: var(--lab-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pk-filter-btn:hover { color: var(--lab-text); }
.pk-filter-btn[aria-pressed="true"] { border-color: var(--lab-teal); background: rgba(31, 194, 181, .12); color: var(--lab-teal); }
.pk-filter-btn:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
/* A pick opens its last 10 games */
.pk-open { cursor: pointer; transition: background .12s; }
.pk-open:hover { background: var(--lab-surface-2); }
.pk-open:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: -2px; }
.pk-games-who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pk-games-who small { color: var(--lab-muted); font-size: 13px; }
.pk-games-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 6px 16px 4px; }
.pk-games-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--lab-border); border-radius: 10px; background: var(--lab-raised); }
.pk-games-stat span { color: var(--lab-faint); font-size: 11px; font-weight: 700; }
.pk-games-stat b { color: var(--lab-text); font-size: 17px; }
.pk-bars { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 220px; margin: 14px 16px 0; padding-bottom: 34px; }
.pk-bars:empty { display: none; }
.pk-bars-line { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--lab-soft); opacity: .7; pointer-events: none; z-index: 1; }
.pk-bar { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; position: relative; }
.pk-bar-track { flex: 1; display: flex; align-items: flex-end; }
.pk-bar-fill { position: relative; width: 100%; border-radius: 5px 5px 0 0; background: var(--lab-soft); }
.pk-bar.hit .pk-bar-fill { background: var(--lab-teal); }
.pk-bar.miss .pk-bar-fill { background: var(--lab-orange); }
.pk-bar-fill b { position: absolute; bottom: 100%; left: 0; right: 0; padding-bottom: 2px; text-align: center; font-size: 11px; color: var(--lab-text); }
.pk-bar small { position: absolute; left: -2px; right: -2px; text-align: center; font-size: 10px; color: var(--lab-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-bar-opp { bottom: -16px; font-weight: 700; color: var(--lab-soft) !important; }
.pk-bar-date { bottom: -30px; }
.pk-games-n { padding: 4px 16px 6px; }
#pk-games-h2h { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }  /* long opponent names (soccer, tennis) */
.pk-bars-many { gap: 3px; }
.pk-bars-many .pk-bar-fill b { font-size: 9px; }
.pk-bars-many .pk-bar small { font-size: 8.5px; }
@media (max-width: 600px) { .pk-bars-many { gap: 2px; } .pk-bars-many .pk-bar-date { display: none; } .pk-bars-many .pk-bar-fill b { font-size: 8px; } }
.pk-games-note { margin: 0; padding: 12px 16px 18px; color: var(--lab-faint); font-size: 12px; }
@media (max-width: 600px) { .pk-games-stats { grid-template-columns: repeat(2, 1fr); } .pk-bars { gap: 3px; } }

/* Record tile opens the hit/miss checklist in a bottom sheet */
.pk-record { position: relative; }
.pk-record-pct { margin-left: 8px; font-size: 13px; font-style: normal; font-weight: 600; letter-spacing: normal; color: var(--lab-faint); }
.pk-record > span:first-child { padding-right: 88px; }  /* room for the button, so the label never runs under it */
.pk-record-more {
  position: absolute; top: 6px; right: 6px; min-height: 22px; padding: 0 7px; border-radius: 999px;
  border: 1px solid rgba(31, 194, 181, .5); background: rgba(31, 194, 181, .1); color: var(--lab-teal);
  font: inherit; font-size: 11px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer;
}
.pk-record-more span { font: inherit; color: inherit; text-transform: none; letter-spacing: normal; }  /* not the tile label style */
.pk-record-more:hover { background: var(--lab-teal); color: var(--lab-teal-ink); }
.pk-record-more::after { content: " ›"; }
@media (max-width: 600px) {
    /* The tile is half the row here: the button drops below the numbers instead of crowding the label */
    .pk-record > span:first-child { padding-right: 0; }
    .pk-record-more { position: static; align-self: flex-start; margin-top: 8px; min-height: 30px; padding: 0 12px; font-size: 12.5px; }
    .pk-record-more::before { content: "✓ "; }
}
.pk-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0 auto; width: min(100%, 720px); max-width: 100%; max-height: 80vh;
  padding: 0; display: none; flex-direction: column; border: 1px solid var(--lab-border-strong); border-bottom: 0;
  border-radius: 18px 18px 0 0; background: var(--lab-surface); color: var(--lab-text); box-shadow: 0 -20px 60px rgba(0, 0, 0, .5);
}
.pk-sheet[open] { display: flex; animation: pk-sheet-up .22s ease-out; }
.pk-sheet::backdrop { background: rgba(0, 0, 0, .6); }
@keyframes pk-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .pk-sheet[open] { animation: none; } }
.pk-sheet-head { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 10px; }
.pk-sheet-grip { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--lab-border-strong); }
.pk-sheet-head h2 { margin: 0; font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; line-height: 1; color: var(--lab-text); }
.pk-sheet-close { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--lab-muted); font-size: 26px; cursor: pointer; }
.pk-sheet-close:hover { background: var(--lab-surface-2); color: var(--lab-text); }
/* Results calendar: graded days shaded by hit rate (--h: 0 red .. 135 green, set per day in picks.html) */
.pk-cal { padding: 0 16px 12px; border-bottom: 1px solid var(--lab-border); }
.pk-cal-nav, .pk-cal-grid, .pk-cal-legend { max-width: 380px; margin-left: auto; margin-right: auto; }  /* compact on wide screens */
.pk-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pk-cal-nav h3 { margin: 0; font-size: 14px; font-weight: 800; color: var(--lab-text); }
.pk-cal-step { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--lab-border-strong); background: transparent; color: var(--lab-text); font-size: 20px; line-height: 1; cursor: pointer; }
.pk-cal-step:disabled { opacity: .3; cursor: default; }
.pk-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pk-cal-wd { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--lab-faint); padding-bottom: 2px; }
.pk-cal-day {
  min-height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  border-radius: 7px; border: 1px solid transparent; color: var(--lab-faint); font: inherit; font-size: 12px; font-weight: 700;
}
.pk-cal-day small { font-size: 9.5px; font-weight: 700; opacity: .9; }
.pk-cal-day.graded { cursor: pointer; color: #fff; background: hsl(var(--h) 60% 27%); border-color: hsl(var(--h) 65% 40%); }
.pk-cal-day.graded:hover { background: hsl(var(--h) 60% 33%); }
.pk-cal-day[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--lab-surface), 0 0 0 4px var(--lab-text); }
.pk-cal-legend { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; font-size: 10.5px; color: var(--lab-faint); }
.pk-cal-scale { width: 96px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, hsl(0 60% 35%), hsl(45 60% 35%), hsl(135 60% 35%)); }
.pk-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; }
.pk-day-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--lab-text); }
.pk-day-head b { font-size: 14px; color: var(--lab-soft); white-space: nowrap; }
.pk-day-msg { margin: 0; padding: 8px 16px 16px; color: var(--lab-muted); font-size: 14px; }
.pk-sheet button:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
.pk-sheet-body { overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
.pk-results { list-style: none; margin: 0; padding: 0; }
.pk-result { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #162023; }
.pk-result:last-child { border-bottom: 0; }
.pk-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 900; }
.pk-result.hit .pk-mark { background: rgba(31, 194, 181, .16); color: var(--lab-teal); }
.pk-result.miss .pk-mark { background: rgba(255, 93, 93, .14); color: #ff7a7a; }
.pk-result.miss .pk-main strong { color: var(--lab-soft); }
.pk-final { color: var(--lab-faint); font-size: 12px; }
.pk-result.hit .pk-final b { color: var(--lab-teal); }
.pk-result.miss .pk-final b { color: #ff7a7a; }

/* EV tool Picks Builder: + column in the table, slip in a bottom sheet */
.fb-builder { border-color: rgba(31, 194, 181, .5); color: var(--lab-teal); }
.fb-builder:hover { background: rgba(31, 194, 181, .1); }
.pb-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--lab-teal); color: var(--lab-teal-ink); font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.pb-count[hidden] { display: none; }
.lab-page .prop-table th.pb-col { cursor: default; text-align: center; width: 52px; padding-right: 0 !important; }
.lab-page .prop-table td.pb-cell { text-align: center; padding-right: 0 !important; }
#player-stats-bv th.pb-col { cursor: default; text-align: center; }
#player-stats-bv td.pb-cell { text-align: center; }
.pb-add {
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 18px; font-weight: 800; line-height: 1;
  border: 1px solid var(--lab-border-strong); background: transparent; color: var(--lab-teal);
}
.pb-add:hover:not(:disabled) { border-color: var(--lab-teal); }
.pb-add[aria-pressed="true"] { background: var(--lab-teal); border-color: var(--lab-teal); color: var(--lab-teal-ink); font-size: 15px; }
.pb-add:disabled { opacity: .35; cursor: not-allowed; }
.pb-add:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
.pb-sheet .pk-sheet-body { flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--lab-border); }
.pb-empty, .pb-removed { margin: 0; padding: 16px; color: var(--lab-muted); font-size: 14px; }
.pb-empty b { color: var(--lab-teal); }
.pb-removed { padding-bottom: 0; color: var(--lab-orange); font-size: 13px; }
.pb-legs { list-style: none; margin: 0; padding: 0; }
.pb-leg { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px 36px; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #162023; }
.pb-leg:last-child { border-bottom: 0; }
.pb-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pb-main strong { color: var(--lab-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-main span { color: var(--lab-soft); font-size: 13px; }
.pb-main small { color: var(--lab-faint); font-size: 12px; }
.pb-side button { height: 32px; padding: 0 10px; font-size: 13px; }
.pb-side button:disabled { opacity: .35; cursor: not-allowed; }
.pb-odds { display: flex; flex-direction: column; align-items: flex-end; }
.pb-odds b { color: var(--lab-teal); font-size: 16px; }
.pb-odds small { color: var(--lab-faint); font-size: 11px; }
.pb-remove { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--lab-muted); font-size: 22px; cursor: pointer; }
.pb-remove:hover { background: var(--lab-surface-2); color: var(--lab-text); }
.pb-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--lab-border-strong); background: var(--lab-raised); }
.pb-total { display: flex; flex-direction: column; min-width: 0; }
.pb-total > span:first-child { color: var(--lab-faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pb-total b { font-family: var(--lab-display); font-style: italic; font-weight: 800; font-size: 34px; line-height: 1.05; color: var(--lab-teal); }
.pb-total small { color: var(--lab-faint); font-size: 12px; }
.pb-chance-row { display: flex; align-items: center; gap: 10px; }
.pb-grade { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border: 1px solid currentColor; }
.pb-grade[hidden] { display: none; }
.pb-grade.strong { color: var(--lab-teal-ink); background: var(--lab-teal); border-color: var(--lab-teal); }
.pb-grade.good { color: var(--lab-teal); }
.pb-grade.thin { color: var(--lab-muted); }
.pb-grade.weak { color: var(--lab-orange); }
.pb-foot .fb-reset { flex: none; margin-left: 0; }
.pb-foot .fb-reset:disabled { opacity: .4; cursor: default; text-decoration: none; }
@media (max-width: 600px) {
    /* Player details take the full row; side, odds and remove sit underneath */
    .pb-leg { grid-template-columns: auto 1fr 36px; row-gap: 8px; }
    .pb-main { grid-column: 1 / -1; }
    .pb-odds { align-items: flex-start; }
}

/* Manage subscription */
.sub-current { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.sub-current p { margin: 0; color: var(--lab-muted); }
.sub-current strong { color: var(--lab-teal); }
.sub-billing { display: inline-flex; align-self: center; padding: 4px; gap: 4px; border-radius: 12px; background: var(--lab-surface); border: 1px solid var(--lab-border); }
.sub-billing button { min-height: 40px; padding: 0 18px; border-radius: 9px; border: 0; background: transparent; color: var(--lab-muted); font: inherit; font-weight: 700; cursor: pointer; }
.sub-billing button[aria-pressed="true"] { background: var(--lab-teal); color: var(--lab-teal-ink); }
.sub-billing .save { margin-left: 6px; font-size: 12px; opacity: .85; }
.sub-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.sub-plan { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 28px; background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: 18px; }
.sub-plan.featured { border-color: rgba(31, 194, 181, .6); background: linear-gradient(180deg, rgba(31, 194, 181, .08), rgba(31, 194, 181, 0) 40%), var(--lab-surface); box-shadow: 0 0 0 1px rgba(31, 194, 181, .15), 0 24px 60px rgba(0, 0, 0, .4); }
.sub-plan .badge { position: absolute; top: -12px; right: 20px; padding: 4px 12px; border-radius: 999px; background: var(--lab-orange); color: #160700; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.sub-plan h3 { margin: 0; font-family: var(--lab-display); font-style: italic; font-weight: 800; font-size: 32px; text-transform: uppercase; line-height: 1; color: var(--lab-text); }
.sub-plan .tagline { margin: 4px 0 0; color: var(--lab-muted); font-size: 15px; }
.sub-price { display: flex; align-items: baseline; gap: 6px; }
.sub-price .amount { font-size: 48px; font-weight: 800; letter-spacing: -.02em; line-height: 1; color: var(--lab-text); }
.sub-price .per { color: var(--lab-muted); }
.sub-price-note { margin: -10px 0 0; color: var(--lab-volt); font-size: 13px; font-weight: 600; min-height: 20px; }
.sub-checks { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.sub-checks li { display: flex; gap: 10px; align-items: flex-start; color: var(--lab-soft); font-size: 15px; }
.sub-checks svg { flex: none; color: var(--lab-teal); margin-top: 2px; }
.sub-plan .dash-btn { width: 100%; }
.sub-week { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; margin: 8px 0 4px; padding: 6px 14px; border: 1px solid rgba(31, 194, 181, .45); border-radius: 999px; background: rgba(31, 194, 181, .1); color: var(--lab-text); font-size: 15px; font-weight: 600; text-decoration: none; } /* Lab Assistant weekly ($6), under the price */
.sub-week b { color: var(--lab-teal); font-weight: 800; font-size: 17px; }
.sub-week:hover { background: rgba(31, 194, 181, .18); }
.sub-plan .is-current { text-align: center; padding: 12px; border-radius: 10px; border: 1px dashed var(--lab-border-strong); color: var(--lab-muted); font-weight: 700; }
.sub-note { margin: 0; padding: 12px 14px; border-radius: 10px; background: rgba(242, 106, 27, .08); border: 1px solid rgba(242, 106, 27, .35); color: #ffb48a; font-size: 14px; }

/* Community */
.cm-card { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media (min-width: 860px) { .cm-card { grid-template-columns: 1.2fr .8fr; } }
.cm-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cm-perks li { display: flex; gap: 12px; align-items: flex-start; color: var(--lab-muted); font-size: 15px; }
.cm-perks strong { display: block; color: var(--lab-text); }
.cm-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(31, 194, 181, .1); color: var(--lab-teal); }
.cm-connect { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px; border-radius: 14px; background: var(--lab-raised); border: 1px solid var(--lab-border); text-align: center; }
.cm-connect p { margin: 0; color: var(--lab-muted); font-size: 14px; }
.cm-connect small { color: var(--lab-faint); font-size: 12px; }
.cm-done { max-width: 520px; width: 100%; margin: 0 auto; text-align: center; align-items: center; }
.cm-done p { margin: 0; color: var(--lab-muted); }
.cm-check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(31, 194, 181, .12); border: 1px solid rgba(31, 194, 181, .5); color: var(--lab-teal); }

/* Privacy / Terms */
.doc-body { max-width: 780px; }
.doc-body h2 { margin: 22px 0 6px; font-family: var(--lab-body); font-style: normal; text-transform: none; font-size: 18px; font-weight: 800; color: var(--lab-text); }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--lab-soft); font-size: 15px; line-height: 1.7; }
.doc-body p { margin: 0 0 12px; }
.doc-body ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
/* login.css strips list bullets site-wide; the policy pages' lists read better with them */
.doc-body ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.doc-body ul > li { list-style-type: disc; }
.doc-body ul > li::marker { color: var(--lab-teal); }
.doc-body strong { color: var(--lab-text); }

/* Admin tools */
.adm-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.adm-form select, .adm-search {
  min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--lab-border-strong);
  background: var(--lab-bg); color: var(--lab-text); font: inherit;
}
.adm-form select { min-width: 260px; }
.adm-form button { cursor: pointer; }
.adm-search { width: 100%; max-width: 420px; }
.adm-search:focus, .adm-form select:focus { outline: none; border-color: var(--lab-teal); box-shadow: 0 0 0 3px rgba(31, 194, 181, .18); }
.adm-banner { display: grid; gap: 10px; }
.adm-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--lab-text); font-weight: 700; cursor: pointer; }
.adm-check input { width: 20px; height: 20px; accent-color: var(--lab-teal); }
.adm-label { margin: 0; color: var(--lab-soft); font-size: 13px; font-weight: 700; }
.adm-search.adm-wide { max-width: 720px; }
body:has(.lab-page) .ticker-wrap[hidden] { display: none; }
.adm-msg { margin: 0; font-weight: 700; color: var(--lab-soft); min-height: 24px; }
.adm-msg.ok { color: var(--lab-teal); }
.adm-msg.err { color: #ff9a5c; }
.lab-page .adm-table tbody tr:hover { cursor: default; }
.lab-page .adm-table-wrap { max-height: 60vh; overflow-y: auto; }
.adm-pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; }
.adm-pager button { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--lab-border-strong); background: transparent; color: var(--lab-soft); font: inherit; font-weight: 700; cursor: pointer; }
.adm-pager button:disabled { opacity: .4; cursor: not-allowed; }
.adm-pager span { color: var(--lab-muted); font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .lab-page table tbody tr, .d-tile { transition: none; }
  .d-glow, .d-skel span { animation: none; }
}

/* ---------- Lab Chat ---------- */
.chat {
  position: relative; display: flex; flex-direction: column; min-height: 0;
  height: calc(100vh - 330px); min-height: 460px;
  background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: 16px; overflow: hidden;
}
.chat.dragging { border-color: var(--lab-teal); box-shadow: 0 0 0 3px rgba(31, 194, 181, .18); }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--lab-border); background: var(--lab-raised); }
.chat-live { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; color: var(--lab-faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lab-teal); box-shadow: 0 0 8px var(--lab-teal); }
.chat-name { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--lab-border-strong); background: transparent; color: var(--lab-muted); font: inherit; font-size: 13px; cursor: pointer; }
.chat-name b { color: var(--lab-text); }
.chat-name:hover { border-color: var(--lab-teal); }
.chat-name[hidden], .chat-name-form[hidden] { display: none; }
.chat-name-form { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-name-form input {
  width: 190px; max-width: 46vw; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--lab-teal); background: var(--lab-bg); color: var(--lab-text); font: inherit; font-size: 14px;
}
.chat-name-form input:focus { outline: none; box-shadow: 0 0 0 3px rgba(31, 194, 181, .18); }
.chat-name-form .chat-tool { min-height: 36px; }
.chat-name-form .chat-name-save { border-color: var(--lab-teal); color: var(--lab-teal); }
/* Notification bell: sits after the name, the "Members only" tag takes the leftover space */
.chat-top .chat-live { margin-right: auto; }
.chat-bell {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; min-width: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--lab-border-strong); background: transparent; color: var(--lab-muted);
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; justify-content: center;
}
.chat-bell:hover { border-color: var(--lab-teal); color: var(--lab-text); }
.chat-name-form:not([hidden]) ~ .chat-bell { display: none; } /* the name editor needs the whole row */
.chat-bell[aria-pressed="true"] { border-color: var(--lab-teal); color: var(--lab-teal); background: rgba(31, 194, 181, .08); }
@media (max-width: 640px) {
  .chat-bell { padding: 0; width: 36px; }
  .chat-bell-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 8px; overscroll-behavior: contain; scrollbar-color: var(--lab-border-strong) transparent; }
.chat-older { display: flex; justify-content: center; padding: 4px 0 12px; }
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-empty { margin: 40px 0; text-align: center; color: var(--lab-muted); }
.chat-msg { position: relative; display: flex; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.chat-msg:hover { background: var(--lab-raised); }
.chat-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--lab-surface-2); border: 1px solid var(--lab-border-strong); color: var(--lab-soft); font-weight: 800; }
.chat-msg.mine .chat-avatar { background: rgba(31, 194, 181, .12); border-color: rgba(31, 194, 181, .5); color: var(--lab-teal); }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chat-meta { display: flex; align-items: baseline; gap: 8px; }
.chat-meta strong { color: var(--lab-text); font-size: 14px; }
.chat-msg.mine .chat-meta strong { color: var(--lab-teal); }
.chat-meta time { color: var(--lab-faint); font-size: 12px; }
.chat-body p { margin: 0; color: var(--lab-soft); font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bot-tag { font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 4px; background: var(--lab-faint); color: var(--lab-bg, #0b0d10); opacity: .9; }
.chat-msg.bot .chat-avatar { background: var(--lab-faint); }
.chat-body .chat-gone { color: var(--lab-faint); font-style: italic; font-size: 13px; }
.chat-image {
  display: inline-block; margin-top: 6px; padding: 0 !important; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--lab-border-strong); background: none !important; cursor: zoom-in; max-width: 100%;
}
.chat-image:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
/* Full-size image viewer (lab-chat.js openViewer) */
.chat-viewer {
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; padding: 24px; border: 0;
  background: transparent; display: none; align-items: center; justify-content: center; cursor: zoom-out;
}
.chat-viewer[open] { display: flex; }
.chat-viewer::backdrop { background: rgba(3, 6, 7, .88); }
.chat-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.chat-viewer-close {
  position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--lab-border-strong);
  background: var(--lab-surface); color: var(--lab-text); font-size: 18px; cursor: pointer;
}
.chat-image img { display: block; max-width: min(100%, 420px); max-height: 320px; width: auto; height: auto; }
.chat-reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-reactions:empty { display: none; }
.chat-reaction { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--lab-border-strong); background: var(--lab-raised); color: var(--lab-soft); font: inherit; font-size: 13px; cursor: pointer; }
.chat-reaction b { font-weight: 700; }
.chat-reaction:hover { border-color: rgba(31, 194, 181, .5); }
.chat-reaction.mine { border-color: var(--lab-teal); background: rgba(31, 194, 181, .1); color: var(--lab-text); }
/* Floats under the react button (top-right of the message); .up puts it above the button when there's no room below */
.chat-picker {
  position: absolute; z-index: 5; top: 40px; right: 8px; max-width: calc(100% - 16px);
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; width: max-content; border-radius: 12px;
  background: var(--lab-surface-2); border: 1px solid var(--lab-border-strong); box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.chat-picker.up { top: auto; bottom: calc(100% - 4px); }
.chat-msg:has(.chat-picker:not([hidden])) { z-index: 4; }
.chat-delete.confirm { border-color: var(--lab-orange); color: #ff9a5c; }
.chat-picker[hidden] { display: none; }
.chat-picker button { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.chat-picker button:hover { background: var(--lab-raised); }
.chat-tools { position: absolute; top: 6px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.chat-msg:hover .chat-tools, .chat-tools:focus-within, .chat-msg:has(.chat-picker:not([hidden])) .chat-tools { opacity: 1; }
@media (hover: none) { .chat-tools { opacity: 1; position: static; align-self: flex-start; } }
.chat-tool { min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--lab-border-strong); background: var(--lab-surface); color: var(--lab-muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.chat-tool:hover { color: var(--lab-text); border-color: var(--lab-teal); }
.chat-delete:hover { border-color: var(--lab-orange); color: #ff9a5c; }
.chat-jump { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; border: 0; background: var(--lab-teal); color: var(--lab-teal-ink); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.chat-jump[hidden] { display: none; }
.chat-compose { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-top: 1px solid var(--lab-border); background: var(--lab-raised); }
.chat-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-row textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: 160px; resize: none; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--lab-border-strong); background: var(--lab-bg); color: var(--lab-text); font: inherit; font-size: 15px; line-height: 1.4;
}
.chat-row textarea:focus { outline: none; border-color: var(--lab-teal); box-shadow: 0 0 0 3px rgba(31, 194, 181, .18); }
.chat-attach { flex: none; width: 46px; height: 46px; margin: 0; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--lab-border-strong); color: var(--lab-soft); cursor: pointer; }
.chat-attach:hover, .chat-attach:focus-within { border-color: var(--lab-teal); color: var(--lab-teal); }
.chat-send { flex: none; }
.chat-send:disabled { opacity: .7; cursor: progress; }
.chat-hint { color: var(--lab-faint); font-size: 11px; }
@media (max-width: 600px) { .chat-hint, .chat-name-label { display: none; } .chat { height: calc(100vh - 240px); } }
/* Desktop: slimmer page header so the chat window gets most of the screen (images and slips fit without extra scrolling) */
@media (min-width: 601px) {
  .lab-chat-page { padding-top: 20px; gap: 12px; }
  .lab-chat-page .lab-head { margin: 0; }
  .lab-chat-page .lab-head p, .lab-chat-page .lab-head .lab-rule { display: none; }
  .lab-chat-page .chat { height: calc(100vh - 190px); height: calc(100dvh - 190px); min-height: 640px; }
  .lab-chat-page .chat-image img { max-height: 440px; max-width: min(100%, 520px); }
}
/* Replies: quote of the original above a reply (click jumps to it), and the "Replying to" bar over the composer */
.chat-quote {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; max-width: min(100%, 460px); margin: 2px 0;
  padding: 5px 10px; border: 0; border-left: 3px solid var(--lab-border-strong); border-radius: 0 8px 8px 0;
  background: var(--lab-surface); color: var(--lab-muted); font: inherit; text-align: left; cursor: pointer;
}
.chat-quote:hover { background: var(--lab-surface-2); border-left-color: var(--lab-teal); }
.chat-quote strong { font-size: 12px; color: var(--lab-soft); }
.chat-quote.to-me { border-left-color: var(--lab-teal); }
.chat-quote.to-me strong { color: var(--lab-teal); }
.chat-quote-text {
  font-size: 13px; line-height: 1.4; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.chat-quote-text.gone { font-style: italic; color: var(--lab-faint); }
.chat-msg.reply-to-me { background: rgba(31, 194, 181, .06); box-shadow: inset 3px 0 0 var(--lab-teal); }
@keyframes chat-flash { from { background: rgba(31, 194, 181, .25); } to { background: transparent; } }
.chat-msg.flash { animation: chat-flash 1.6s ease-out; }
.chat-replying {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-left: 3px solid var(--lab-teal);
  border-radius: 0 8px 8px 0; background: var(--lab-surface);
}
.chat-replying[hidden] { display: none; }
.chat-replying-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.chat-replying-text span { font-size: 12px; color: var(--lab-muted); }
.chat-replying-text b { color: var(--lab-teal); }
.chat-replying-text p { margin: 0; font-size: 13px; color: var(--lab-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-replying button {
  flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--lab-border-strong);
  background: transparent; color: var(--lab-muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.chat-replying button:hover { color: var(--lab-text); border-color: var(--lab-teal); }
.chat-preview { position: relative; width: fit-content; }
.chat-preview[hidden] { display: none; }
.chat-preview img { display: block; max-height: 120px; max-width: 200px; border-radius: 10px; border: 1px solid var(--lab-border-strong); }
.chat-preview button { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--lab-border-strong); background: var(--lab-surface-2); color: var(--lab-text); font-size: 16px; line-height: 1; cursor: pointer; }

/* ---------- Best Value (tier2_layout.html, bestvalue-v36.js) ---------- */
/* Sport switcher: one scrollable row of chips, grouped by type */
.lab-page .bv-sports { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; min-width: 0; }
.bv-sports-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; min-width: 0; }
.bv-sport-group { display: flex; align-items: center; gap: 6px; flex: none; }
.bv-sport-group + .bv-sport-group { padding-left: 16px; border-left: 1px solid var(--lab-border); }
.bv-sport-group-name { color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-right: 2px; }
.bv-sports a.fb-chip { text-decoration: none; white-space: nowrap; }
.bv-sports a.fb-chip:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }

/* "New here?" guide */
.bv-guide { margin: 0 0 16px; padding: 4px 16px; background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: 14px; }
.bv-guide[open] { padding-bottom: 14px; border-color: rgba(31, 194, 181, .35); }
.bv-guide summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.bv-guide summary::-webkit-details-marker { display: none; }
.bv-guide-title { font-weight: 700; color: var(--lab-text); }
.bv-guide-toggle::after { content: "Show"; color: var(--lab-teal); font-size: 13px; font-weight: 700; }
.bv-guide[open] .bv-guide-toggle::after { content: "Hide"; }
.bv-guide summary:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; border-radius: 8px; }
.bv-steps li { align-items: flex-start; }
.bv-steps li div { display: flex; flex-direction: column; gap: 2px; }
.bv-steps li b { color: var(--lab-text); }
.bv-steps li small { color: var(--lab-muted); font-size: 12.5px; font-weight: 500; line-height: 1.4; }
.bv-guide-note { margin: 10px 0 0; color: var(--lab-faint); font-size: 12.5px; }
.lab-page button.lab-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }

/* Table */
.bv-table-head { padding: 16px 20px 12px; }
.bv-table-head h3, .bv-table-head h2 {
  margin: 0; font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; letter-spacing: .02em;
}
.bv-table-head p { margin: 2px 0 0; color: var(--lab-faint); font-size: 12px; }
.lab-page .bv-table { min-width: 880px; }
.lab-page #player-stats-bv tr.is-selected td { background: #0f2321; }
.lab-page #player-stats-bv tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--lab-teal); }
.bv-meter { display: block; width: 88px; height: 5px; border-radius: 3px; background: var(--lab-border); overflow: hidden; }
.bv-meter i { display: block; height: 100%; border-radius: 3px; }
.bv-meter i.over { background: var(--lab-teal); }
.bv-meter i.under { background: var(--lab-orange); }
.lab-page .bv-empty-row td { cursor: default; }
.lab-page .bv-empty-row:hover td { background: transparent !important; }
.bv-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; text-align: center; white-space: normal; }
.bv-empty b { font-size: 16px; }
.bv-empty p { margin: 0; color: var(--lab-muted); max-width: 440px; }

/* Glossary under the table */
.bv-glossary { margin: 0 20px 16px; border-top: 1px solid var(--lab-border); padding-top: 10px; }
.bv-glossary summary { cursor: pointer; color: var(--lab-teal); font-weight: 700; font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.bv-glossary dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 8px 0; font-size: 13px; }
.bv-glossary dt { color: var(--lab-text); font-weight: 700; }
.bv-glossary dd { margin: 0; color: var(--lab-muted); }
.bv-glossary > p { margin: 8px 0 0; color: var(--lab-faint); font-size: 12px; }
@media (max-width: 600px) {
  .bv-glossary dl { grid-template-columns: 1fr; }
  .bv-glossary dd { margin-bottom: 6px; }
}

/* Player panel */
.lab-page .prop-panel #modalChart-bv,
.lab-page .prop-panel #modalChart2-bv { width: 100%; }
.lab-page .prop-panel #modalChart2-bv { background: #121a1d; border-radius: 10px; overflow: hidden; }
.lab-page .panel-maps #modalChart-2-bv,
.lab-page .panel-maps #modalChart2-2-bv { width: 100%; background: #121a1d; border-radius: 10px; overflow: hidden; }
.lab-page .panel-maps .modal-strong, .lab-page .panel-maps .modal-span { font-size: 14px !important; }
.lab-page .bv-panel-name { display: block; font-size: 20px !important; font-weight: 800; color: var(--lab-text); }
.bv-summary-side { font-size: 22px; font-weight: 800; }
.bv-summary { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.bv-summary li { position: relative; padding-left: 16px; color: var(--lab-soft); font-size: 14px; line-height: 1.45; }
.bv-summary li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--lab-teal); }
.bv-summary li b { color: var(--lab-text); }
.lab-page #top-left-button-container-bv:empty { display: none; }
.lab-page #top-left-button-container-bv .last-10-btn-bv { width: 100%; }

/* Phones: each prop becomes a card instead of a 9-column row */
@media (max-width: 760px) {
  .lab-page .bv-table { min-width: 0; }
  .lab-page .bv-table thead { display: none; }
  .lab-page .bv-table, .lab-page .bv-table tbody { display: block; }
  .lab-page .bv-table tbody tr.prop-row {
    display: grid; grid-template-columns: 44px 1fr 1fr 1fr; column-gap: 10px; row-gap: 8px;
    grid-template-areas:
      "slip player player pick"
      "slip stat   stat   pick"
      "slip line   avg    hit"
      "slip start  start  hs";
    padding: 14px 12px; border-bottom: 1px solid #162023;
  }
  .lab-page .bv-table tbody tr.prop-row td { display: block; padding: 0 !important; border: 0 !important; white-space: normal; text-align: left; }
  .lab-page .bv-table td.pb-cell { grid-area: slip; align-self: start; }
  .lab-page .bv-table td.bv-c-player { grid-area: player; }
  .lab-page .bv-table td.bv-c-stat { grid-area: stat; }
  .lab-page .bv-table td.bv-c-line { grid-area: line; }
  .lab-page .bv-table td.bv-c-avg { grid-area: avg; }
  .lab-page .bv-table td.bv-c-hit { grid-area: hit; }
  .lab-page .bv-table td.bv-c-pick { grid-area: pick; justify-self: end; background: transparent; }
  .lab-page .bv-table td.bv-c-hs { grid-area: hs; }
  .lab-page .bv-table td.bv-c-start { grid-area: start; }
  .lab-page .bv-table td.bv-c-start .pp-stack { flex-direction: row; gap: 6px; color: var(--lab-faint); font-size: 12px; }
  .lab-page .bv-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    color: var(--lab-faint); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  }
  .lab-page .bv-table td.bv-c-line .pp-stack.end { align-items: flex-start; }
  .lab-page .bv-table .pp-bar, .lab-page .bv-table .bv-meter { width: 100%; max-width: 88px; }
  .lab-page .bv-table tr.is-selected td:first-child { box-shadow: none; }
  .lab-page .bv-table tr.is-selected { box-shadow: inset 3px 0 0 var(--lab-teal); background: #0f2321; }
  .lab-page .bv-table tbody tr.bv-empty-row, .lab-page .bv-table tbody tr.bv-empty-row td { display: block; }
  .lab-page .bv-sports { flex-direction: column; align-items: stretch; gap: 6px; }
}

/* ---------- EV Tool column tips: (i) next to each header, shown on hover or tap (focus) ---------- */
.lab-page .th-help { position: relative; display: inline-flex; vertical-align: 1px; margin-left: 3px; }
/* Kept compact: each (i) widens its header, and the headers stay on one line */
.lab-page .ev-table th .sort-arrow { margin-right: 2px !important; }
.lab-page .ev-table th:not(:first-child) { padding-left: 5px !important; padding-right: 5px !important; }
.lab-page .th-info {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; padding: 0;
  border-radius: 50%; border: 1px solid var(--lab-border-strong); background: transparent; color: var(--lab-faint);
  font: italic 700 10px/1 Georgia, serif; text-transform: none; cursor: help;
}
/* A bigger tap area than the 16px circle, without moving the header text */
.lab-page .th-info::before { content: ""; position: absolute; inset: -8px; } /* stays inside the header's 10px padding, so the last column doesn't widen the table */
.lab-page .th-info:hover, .lab-page .th-info:focus-visible { color: var(--lab-teal); border-color: var(--lab-teal); outline: none; }
.lab-page .th-tip {
  display: none; position: absolute; top: calc(100% + 8px); left: -10px; z-index: 30; width: 260px; padding: 10px 12px;
  background: var(--lab-surface-2); border: 1px solid var(--lab-border-strong); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  color: var(--lab-soft); font-size: 12.5px; font-weight: 500; line-height: 1.45; letter-spacing: 0; text-transform: none; text-align: left; white-space: normal; cursor: default;
}
.lab-page .th-tip.end { left: auto; right: -10px; }
.lab-page .th-help:hover .th-tip, .lab-page .th-help:focus-within .th-tip { display: block; }
.lab-page table th:has(.th-help:hover), .lab-page table th:has(.th-help:focus-within) { z-index: 5; }

/* ---------- EV Tool (Projections) on phones: each prop row as a card ----------
   Player and stat on top, the model pick full width, then Line / Proj / Hit rate / Matchup in a row, start time last. */
.lab-page .ev-glossary, .lab-page .ev-phone-only { display: none; }

/* ---------- Multi-level "Sort by" bar above the EV Tool and Best Value tables (lab-sortbar.js) ---------- */
.lab-page .lab-sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 8px; }
.lab-page .lab-sort-label { color: var(--lab-faint); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; margin-right: 2px; }
.lab-page .lab-sort-then { color: var(--lab-faint); font-size: 11px; }
.lab-page .lab-sort-chip {
  display: inline-flex; align-items: stretch; height: 26px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--lab-teal) 14%, transparent);
}
.lab-page .lab-sort-chip button {
  background: transparent; border: 0; color: var(--lab-text); font: inherit; font-size: 12px; cursor: pointer;
}
.lab-page .lab-sort-dir { padding: 0 4px 0 10px; display: inline-flex; align-items: center; gap: 4px; }
.lab-page .lab-sort-dir b { font-weight: 600; }
.lab-page .lab-sort-dir span { color: var(--lab-teal); font-weight: 600; white-space: nowrap; }
.lab-page .lab-sort-x { padding: 0 8px 0 4px; color: var(--lab-faint); font-size: 14px; line-height: 1; }
.lab-page .lab-sort-chip button:hover { color: var(--lab-teal); }
.lab-page .lab-sort-chip button:focus-visible, .lab-page .lab-sort-add:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: -2px; }
.lab-page .lab-sort-add {
  height: 26px; padding: 0 6px; background: transparent; border: 0; border-radius: 6px;
  color: var(--lab-faint); font: inherit; font-size: 12px; cursor: pointer; color-scheme: dark;
}
.lab-page .lab-sort-add:hover { color: var(--lab-teal); }
@media (max-width: 760px) {
  .lab-page .lab-sortbar { margin: 0 12px 8px; }
  .lab-page .lab-sort-chip, .lab-page .lab-sort-add { height: 32px; }
  .lab-page .lab-sort-chip button, .lab-page .lab-sort-add { font-size: 13px; }
}
@media (max-width: 760px) {
  .lab-page .ev-wide-only { display: none; }
  .lab-page .ev-phone-only { display: inline; }
  .lab-page .ev-glossary {
    display: block; margin: 0 12px 10px; background: var(--lab-bg); border: 1px solid var(--lab-border-strong); border-radius: 10px;
  }
  .lab-page .ev-glossary summary {
    display: flex; align-items: center; min-height: 44px; padding: 0 12px; cursor: pointer;
    color: var(--lab-teal); font-size: 14px; font-weight: 600;
  }
  .lab-page .ev-glossary summary:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; border-radius: 10px; }
  .lab-page .ev-glossary dl { margin: 0; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 4px; }
  .lab-page .ev-glossary dt { margin-top: 8px; color: var(--lab-text); font-size: 13px; font-weight: 700; }
  .lab-page .ev-glossary dd { margin: 0; color: var(--lab-soft); font-size: 13px; line-height: 1.45; }
  .lab-page .ev-table { min-width: 0; }
  .lab-page .ev-table thead { display: none; }
  .lab-page .ev-table, .lab-page .ev-table tbody { display: block; width: 100%; }
  .lab-page .ev-table tbody tr.prop-row {
    display: grid; grid-template-columns: 40px repeat(4, minmax(0, 1fr)); column-gap: 10px; row-gap: 10px;
    grid-template-areas:
      "slip player player player player"
      "slip stat   stat   stat   stat"
      "slip pick   pick   pick   pick"
      "slip line   proj   hit    mu"
      "slip start  start  start  start";
    padding: 14px 12px; border-bottom: 1px solid #162023;
  }
  .lab-page .ev-table tbody tr.prop-row td { display: block; min-width: 0; padding: 0 !important; border: 0 !important; white-space: normal; text-align: left; }
  .lab-page .ev-table td.pb-cell { grid-area: slip; align-self: start; }
  .lab-page .ev-table td.ev-c-player { grid-area: player; }
  .lab-page .ev-table td.ev-c-stat { grid-area: stat; }
  .lab-page .ev-table td.ev-c-stat .pp-stack { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .lab-page .ev-table tbody tr.prop-row td.ev-c-pick { grid-area: pick; padding: 10px 12px !important; border-radius: 10px; }
  .lab-page .ev-table td.ev-c-line { grid-area: line; }
  .lab-page .ev-table td.ev-c-proj { grid-area: proj; }
  .lab-page .ev-table td.ev-c-hit { grid-area: hit; }
  .lab-page .ev-table td.ev-c-mu { grid-area: mu; }
  .lab-page .ev-table td.ev-c-start { grid-area: start; color: var(--lab-faint); font-size: 12px; }
  .lab-page .ev-table td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 3px;
    color: var(--lab-faint); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  }
  .lab-page .ev-table td.ev-c-line .pp-stack.end,
  .lab-page .ev-table td.ev-c-proj .pp-stack.end { align-items: flex-start; }
  .lab-page .ev-table .pp-player .pp-sub { max-width: none; }
  .lab-page .ev-table .pp-split { width: 100%; max-width: 220px; }
  .lab-page .ev-table .bv-meter { width: 100%; max-width: 88px; }
  .lab-page .ev-table td.ev-c-mu .pp-sub { display: none; } /* the "allowed" text is too long for a quarter width; it's in the panel */
  .lab-page .ev-table tr.is-selected td:first-child { box-shadow: none; }
  .lab-page .ev-table tr.is-selected { box-shadow: inset 3px 0 0 var(--lab-teal); background: #0f2321; }
}

/* Best Value: hit rate from too few games to mean much */
.bv-thin { font-style: italic; color: var(--warn, #b7791f); }

/* ---------- Onboarding: dashboard "Start here" checklist (logged_home.html, onboarding.py) ---------- */
/* a <details>: not a flex container (browsers lay out its body inconsistently); .ob-body holds the spacing */
.ob-card { border-color: var(--lab-teal); box-shadow: 0 0 0 4px rgba(31, 194, 181, .08); display: block; margin-bottom: 16px; }
.ob-body { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.ob-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ob-title { margin: 0; font-family: var(--lab-display); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1; }
.ob-sub { color: var(--lab-muted); font-size: 13px; }
.ob-count { flex: none; color: var(--lab-teal); font-size: 13px; font-weight: 800; white-space: nowrap; }
.ob-bar { height: 6px; border-radius: 999px; background: var(--lab-surface); overflow: hidden; }
.ob-bar span { display: block; height: 100%; border-radius: 999px; background: var(--lab-teal); transition: width .3s; }
.ob-steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
/* number | text, with the step's buttons on their own line under the text */
.ob-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; row-gap: 8px; align-items: start;
           padding: 12px; border-radius: 10px; background: var(--lab-bg); border: 1px solid transparent; min-width: 0; }
.ob-step.is-next { background: var(--lab-surface); border-color: var(--lab-border-strong); }
.ob-links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ob-links:empty { display: none; }
.ob-mark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--lab-border-strong); color: var(--lab-faint); font-size: 12px; font-weight: 800; }
.ob-step.is-next .ob-mark { border-color: var(--lab-teal); color: var(--lab-teal); }
.ob-step.is-done .ob-mark { border: 0; background: var(--lab-teal); color: var(--lab-teal-ink); }
.ob-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.ob-text strong { font-size: 14px; color: var(--lab-text); }
.ob-text small { color: var(--lab-muted); font-size: 12px; line-height: 1.4; }
.ob-step.is-done .ob-text strong { color: var(--lab-faint); text-decoration: line-through; }
.ob-step.is-done .ob-text small { color: var(--lab-faint); }
.ob-go { min-height: 40px; padding: 0 14px; font-size: 13px; }
.ob-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ob-hide { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: var(--lab-faint); font: inherit; font-size: 13px; cursor: pointer; }
.ob-hide:hover, .ob-hide:focus-visible { color: var(--lab-text); }
@media (max-width: 860px) {
  .ob-steps { grid-template-columns: minmax(0, 1fr); }
}
.ob-card, .ob-card > summary, .ob-body { min-width: 0; }
/* The checklist collapses to a slim bar in the same place (details/summary) */
.ob-card > summary { list-style: none; cursor: pointer; }
.ob-card > summary::-webkit-details-marker { display: none; }
.ob-card > summary > span:first-child { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.ob-card > summary:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 4px; border-radius: 8px; }
.ob-toggle { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
             border: 1px solid var(--lab-border-strong); color: var(--lab-muted); transition: transform .2s; }
.ob-card[open] .ob-toggle { transform: rotate(180deg); }
.ob-card.is-collapsed:not([open]) { border-color: var(--lab-border); box-shadow: none; }  /* quiet only while closed */
/* A done step's link back: small and muted, so the row still reads as completed */
.ob-again { min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--lab-faint);
            font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ob-again:hover, .ob-again:focus-visible { color: var(--lab-teal); }

/* ---------- Sport switcher on Best Value / Historical (partials/sport_switch.html) ---------- */
.lab-page .ss { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; position: relative; z-index: 20; }
.ss-menu { position: relative; }
.ss-current { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
              border: 1px solid var(--lab-border-strong); background: var(--lab-surface); color: var(--lab-text);
              font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; }
.ss-current::-webkit-details-marker { display: none; }
.ss-current:hover, .ss-menu[open] > .ss-current { border-color: var(--lab-teal); }
.ss-current:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }
.ss-menu[open] > .ss-current svg { transform: rotate(180deg); }
.ss-panel { position: absolute; top: calc(100% + 8px); left: 0; width: min(480px, calc(100vw - 32px)); padding: 12px;
            border-radius: 14px; background: var(--lab-surface); border: 1px solid var(--lab-border-strong);
            box-shadow: 0 16px 40px rgba(0, 0, 0, .5); columns: 2; column-gap: 16px; }
.ss-group { break-inside: avoid; display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.ss-group-name { padding: 6px 8px 4px; color: var(--lab-teal); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ss-panel a { display: flex; align-items: center; min-height: 36px; padding: 0 8px; border-radius: 8px; color: var(--lab-soft); text-decoration: none; font-size: 14px; }
.ss-panel a:hover { background: var(--lab-raised); color: var(--lab-text); text-decoration: none; }
.ss-panel a[aria-current="page"] { color: var(--lab-teal); background: var(--lab-raised); font-weight: 700; }

/* ---------- Stat chips: wrap instead of one long scrolling row; long lists fold to two rows (lab-filterbar.js) ---------- */
.lab-page #fb-stats { flex-wrap: wrap; overflow: visible; }
.lab-page #fb-stats.is-folded { max-height: var(--fold-h, 96px); overflow: hidden; }
.fb-more-stats { align-self: flex-start; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent;
                 color: var(--lab-teal); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fb-more-stats:hover { text-decoration: underline; }
.fb-more-stats:focus-visible { outline: 2px solid var(--lab-teal); outline-offset: 2px; }


/* ---------- Team picker as a multi-select ("Select teams to compare", his-v36.js) ---------- */
.lab-page .select2-container--default .select2-selection--multiple {
  min-height: 44px; padding: 4px 36px 4px 6px; border: 1px solid var(--lab-border-strong); border-radius: 10px; background: var(--lab-bg); cursor: text; }
.lab-page .select2-container--default.select2-container--focus .select2-selection--multiple,
.lab-page .select2-container--default.select2-container--open .select2-selection--multiple { border-color: var(--lab-teal); }
.lab-page .select2-container--default .select2-selection--multiple .select2-selection__rendered { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; }
/* each chosen team: a pill with room between the × and the name */
.lab-page .select2-container--default .select2-selection--multiple .select2-selection__choice {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 10px 4px 6px;
  border: 1px solid var(--lab-border-strong); border-radius: 999px; background: var(--lab-raised); color: var(--lab-text); font-size: 13px; }
.lab-page .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  display: inline-grid; place-items: center; width: 20px; height: 20px; margin: 0; border-radius: 50%;
  color: var(--lab-muted); font-size: 15px; line-height: 1; }
.lab-page .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { background: rgba(242, 106, 27, .15); color: var(--lab-orange); }
/* clear-all ×: pinned at the right edge, away from the pills */
.lab-page .select2-container--default .select2-selection--multiple .select2-selection__clear {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%); float: none; margin: 0; width: 24px; height: 24px;
  border-radius: 50%; display: grid; place-items: center; color: var(--lab-muted); font-size: 16px; line-height: 1; }
.lab-page .select2-container--default .select2-selection--multiple .select2-selection__clear:hover { background: rgba(242, 106, 27, .15); color: var(--lab-orange); }
.lab-page .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
  margin: 0; min-height: 30px; color: var(--lab-text); font: inherit; font-size: 14px; }
.lab-page .select2-container--default .select2-selection--multiple .select2-search__field::placeholder { color: var(--lab-faint); }

/* ---------- Shared slips (slips.js): card in Lab Chat, "Most tailed today" strip, sharing from the Picks Builder ---------- */
.slip-card { margin-top: 6px; max-width: 460px; border: 1px solid var(--lab-border-strong); border-radius: 14px; background: var(--lab-surface); overflow: hidden; }
.chat-msg.mine .slip-card { border-color: rgba(31, 194, 181, .45); }
.slip-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.slip-title { margin-right: auto; white-space: nowrap; color: var(--lab-text); font-weight: 800; font-size: 14px; }
.slip-book { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--lab-teal); border: 1px solid rgba(31, 194, 181, .45); border-radius: 999px; padding: 2px 8px; white-space: nowrap; } /* the book its lines are on (slips.js) */
.slip-icon { font-size: 15px; }
.slip-chance { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.slip-chance b { font-family: var(--lab-display); font-style: italic; font-weight: 800; font-size: 24px; color: var(--lab-teal); }
.slip-chance small { color: var(--lab-faint); font-size: 11px; margin-top: 2px; }
.slip-origin { margin: -4px 14px 8px !important; color: var(--lab-muted) !important; font-size: 12px !important; }
.slip-legs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--lab-border); }
.slip-legs li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid #162023; }
.slip-leg-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.slip-leg-main strong { color: var(--lab-text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slip-leg-main span { color: var(--lab-soft); font-size: 13px; }
.slip-leg-main small { color: var(--lab-faint); font-size: 12px; }
.slip-legs li.started .slip-leg-main { opacity: .85; } /* dimmer fails text contrast (WCAG 1.4.3) */
/* Graded legs and slips (hit teal, miss red, as on the picks results) */
.slip-mark { flex: none; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slip-legs li.res-hit .slip-mark { background: rgba(31, 194, 181, .16); color: var(--lab-teal); }
.slip-legs li.res-miss .slip-mark { background: rgba(255, 93, 93, .14); color: #ff7a7a; }
.slip-legs li.res-void .slip-mark { border: 1px solid var(--lab-border-strong); color: var(--lab-faint); }
.slip-legs li.res-void .slip-leg-main { opacity: .55; }
.slip-result { flex: none; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.slip-result.hit { background: var(--lab-teal); color: var(--lab-teal-ink); }
.slip-result.miss { background: rgba(255, 93, 93, .16); color: #ff7a7a; }
.slip-result.void { border: 1px solid var(--lab-border-strong); color: var(--lab-faint); }
.slip-started { flex: none; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--lab-border-strong); color: var(--lab-faint); font-size: 11px; font-weight: 700; }
.slip-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; background: var(--lab-raised); }
.slip-tails { margin-right: auto; color: var(--lab-muted); font-size: 13px; }
.slip-actions { display: flex; gap: 8px; }
.slip-actions .dash-btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.slip-actions .dash-btn.ghost { background: transparent; }
.slip-tail[aria-pressed="true"] { background: transparent; color: var(--lab-teal); border: 1px solid var(--lab-teal); }
.slip-upgrade { font-size: 13px; }

.slip-top { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--lab-border); border-radius: 14px; background: var(--lab-raised); min-width: 0; }
.slip-top[hidden] { display: none; }
.slip-top.in-chat { margin: 0; border: 0; border-bottom: 1px solid var(--lab-border); border-radius: 0; }
.slip-top-label { flex: none; color: var(--lab-faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.slip-top-list { display: flex; gap: 8px; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.slip-top-list::-webkit-scrollbar { display: none; }
.slip-top-item { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--lab-border-strong); background: var(--lab-surface); color: var(--lab-soft); font: inherit; font-size: 13px; cursor: pointer; }
.slip-top-item:hover { border-color: var(--lab-teal); }
.slip-top-item strong { color: var(--lab-text); }
.slip-top-tails { color: var(--lab-teal); font-weight: 800; }
@media (max-width: 640px) {
  .slip-top { flex-direction: column; align-items: stretch; gap: 6px; }
}
/* Slip leaderboard (Lab Chat) */
.board-tabs { flex: none; display: flex; gap: 6px; padding: 0 16px 10px; }
.board-tabs button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--lab-border-strong); background: transparent; color: var(--lab-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.board-tabs button[aria-selected="true"] { border-color: var(--lab-teal); color: var(--lab-teal); background: rgba(31, 194, 181, .08); }
.board-cols, .board-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 52px 44px 56px; align-items: center; gap: 8px; padding: 0 16px; }
.board-cols { padding-top: 8px; padding-bottom: 6px; border-top: 1px solid var(--lab-border); color: var(--lab-faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.board-cols span:nth-child(n+3), .board-row > span:nth-child(n+3) { text-align: right; }
.board-list { list-style: none; margin: 0; padding: 0; }
.board-row { min-height: 48px; border-bottom: 1px solid #162023; font-size: 14px; color: var(--lab-soft); font-variant-numeric: tabular-nums; }
.board-row.mine { background: rgba(31, 194, 181, .06); }
.board-rank { color: var(--lab-faint); font-weight: 800; }
.board-list .board-row:nth-child(-n+3) .board-rank { color: var(--lab-volt); }
.board-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.board-name strong { color: var(--lab-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-streak { flex: none; color: var(--lab-orange); font-size: 12px; font-weight: 800; }
.board-rec { color: var(--lab-text); font-weight: 700; }
.board-vs.up { color: var(--lab-teal); }
.board-vs.down { color: #ff7a7a; }
.board-msg { margin: 0; padding: 16px; color: var(--lab-muted); font-size: 14px; }
.board-me { border-top: 1px solid var(--lab-border-strong); }
.board-me-label { margin: 0; padding: 10px 16px 0; color: var(--lab-faint); font-size: 12px; font-weight: 700; }
.board-note { margin: 0; padding: 12px 16px 16px; color: var(--lab-faint); font-size: 12px; line-height: 1.5; }
.board-note b { color: var(--lab-muted); }
/* Slip ranks: chip color climbs from grey through teal and volt to orange */
.xp-chip { flex: none; display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--lab-border-strong); color: var(--lab-faint); font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; line-height: 1.5; }
.xp-chip.r1 { border-color: #3a5257; color: var(--lab-soft); }
.xp-chip.r2 { border-color: rgba(31, 194, 181, .5); color: var(--lab-teal); }
.xp-chip.r3 { border-color: var(--lab-teal); color: var(--lab-teal); background: rgba(31, 194, 181, .1); }
.xp-chip.r4 { border-color: rgba(212, 242, 106, .55); color: var(--lab-volt); }
.xp-chip.r5 { border-color: var(--lab-volt); color: var(--lab-volt); background: rgba(212, 242, 106, .1); }
.xp-chip.r6 { border-color: var(--lab-orange); color: var(--lab-orange); background: rgba(242, 106, 27, .1); }
.xp-chip.r7 { border-color: transparent; color: #1a0a02; background: linear-gradient(90deg, var(--lab-orange), var(--lab-volt)); }
.chat-meta .xp-chip { margin-left: 2px; }
.xp-chip.big { padding: 0; width: 52px; height: 52px; justify-content: center; border-radius: 14px; border-width: 2px; font-size: 14px; }
.board-cols.xp, .board-row.xp { grid-template-columns: 26px minmax(0, 1fr) 64px 44px; }
/* My slips: rank card and XP rules */
.ms-rank { display: flex; flex-direction: column; gap: 10px; padding: 16px; margin-bottom: 16px; }
.ms-rank[hidden] { display: none; }
.ms-rank-top { display: flex; align-items: center; gap: 12px; }
.ms-rank-text { flex: 1; min-width: 0; }
.ms-rank-text h2 { margin: 0; font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: 1; color: var(--lab-text); }
.ms-rank-text small { color: var(--lab-muted); font-size: 12px; }
.ms-rank-xp { color: var(--lab-teal); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-rank-bar { height: 10px; border-radius: 5px; background: var(--lab-border); overflow: hidden; }
.ms-rank-bar span { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, var(--lab-teal), var(--lab-volt)); transition: width .4s ease-out; }
@media (prefers-reduced-motion: reduce) { .ms-rank-bar span { transition: none; } }
.ms-rank-next { color: var(--lab-faint); font-size: 12px; }
.ms-xp { color: var(--lab-volt); font-size: 12px; font-weight: 800; }
.ms-xp.capped { color: var(--lab-faint); }
.ms-rules { margin-top: 22px; padding: 12px 16px; border: 1px solid var(--lab-border); border-radius: 14px; background: var(--lab-surface); color: var(--lab-muted); font-size: 13px; line-height: 1.55; }
.ms-rules summary { cursor: pointer; color: var(--lab-text); font-weight: 800; min-height: 32px; display: flex; align-items: center; }
.ms-rules ul { margin: 8px 0 12px; padding-left: 18px; }
.ms-rules b { color: var(--lab-soft); }
.ms-rank-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; }
.ms-rank-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-variant-numeric: tabular-nums; }
/* Responsible play page and footer line */
.rp-help { margin-bottom: 16px; border-color: rgba(31, 194, 181, .45); background: rgba(31, 194, 181, .06); }
.rp-help h2 { margin: 0 0 6px; font-size: 18px; color: var(--lab-text); }
.rp-help p { margin: 4px 0; color: var(--lab-soft); font-size: 14px; line-height: 1.5; }
.rp-fine { font-size: 12px; opacity: .8; }
/* Public share page (/s/<token>) */
.share-actions { display: flex; gap: 8px; margin: 12px 0 20px; }
.share-actions .dash-btn { flex: 1 1 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.share-cta { padding: 18px; }
.share-cta h2 { margin: 0 0 6px; font-family: var(--lab-display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 24px; color: var(--lab-text); }
.share-cta p { margin: 0 0 14px; color: var(--lab-muted); font-size: 14px; line-height: 1.5; }
.share-cta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-cta-row .dash-btn { min-height: 44px; display: inline-flex; align-items: center; padding: 0 20px; }
.share-page .slip-card { margin: 0; max-width: none; }
/* My slips (bet tracker) */
.ms-page .board-tabs { padding: 0; margin: 0 0 14px; flex-wrap: wrap; }
.board-tabs button[aria-pressed="true"] { border-color: var(--lab-teal); color: var(--lab-teal); background: rgba(31, 194, 181, .08); }
.ms-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.ms-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; min-width: 0; }
.ms-tile span { color: var(--lab-faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ms-tile b { font-family: var(--lab-display); font-style: italic; font-weight: 800; font-size: 30px; line-height: 1.05; color: var(--lab-text); font-variant-numeric: tabular-nums; }
.ms-tile small { color: var(--lab-muted); font-size: 12px; }
.ms-tile b.up { color: var(--lab-teal); }
.ms-tile b.down { color: #ff7a7a; }
@media (max-width: 560px) {
  .ms-tiles { grid-template-columns: 1fr 1fr; }
  .ms-tiles .ms-tile:last-child { grid-column: 1 / -1; }
}
.ms-sports { margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--lab-border); border-radius: 14px; background: var(--lab-surface); }
.ms-sports h2 { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--lab-faint); text-transform: uppercase; letter-spacing: .04em; }
.ms-sport-list { list-style: none; margin: 0; padding: 0; }
.ms-sport { display: grid; grid-template-columns: 56px 72px minmax(0, 1fr) 40px; align-items: center; gap: 10px; min-height: 32px; font-size: 13px; color: var(--lab-muted); font-variant-numeric: tabular-nums; }
.ms-sport strong { color: var(--lab-text); }
.ms-sport b { color: var(--lab-soft); text-align: right; }
.ms-bar { height: 6px; border-radius: 3px; background: var(--lab-border); overflow: hidden; }
.ms-bar span { display: block; height: 100%; background: var(--lab-teal); }
.ms-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ms-slip .slip-card { margin: 0; max-width: none; }
.ms-tag { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; color: var(--lab-muted); font-size: 13px; }
.ms-tag .lab-link { margin-left: auto; }
.ms-kind { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--lab-border-strong); color: var(--lab-faint); }
.ms-kind.shared { border-color: var(--lab-teal); color: var(--lab-teal); }
.ms-delete { border: 0; background: none; padding: 0; color: #ff7a7a; font: inherit; font-size: 13px; cursor: pointer; }
.ms-tag .ms-delete { margin-left: auto; }
.slip-dialog .pk-sheet-body { padding: 12px 16px 16px; }
.slip-dialog .slip-card { margin: 0; max-width: none; }
.slip-chat-link { display: inline-block; margin-top: 12px; font-size: 13px; }

.pb-origin { margin: 0; padding: 12px 16px 0; color: var(--lab-teal); font-size: 13px; font-weight: 700; }
.pb-origin[hidden] { display: none; }
/* Picks Builder correlation warnings (picks-builder.js: correlations) */
.pb-corr { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; vertical-align: 2px; }
.pb-corr.warn { border: 1px solid rgba(212, 242, 106, .5); color: var(--lab-volt); }
.pb-corr.bad { border: 1px solid rgba(255, 122, 122, .55); color: #ff7a7a; }
.pb-warn { list-style: none; margin: 0; padding: 4px 16px 10px; display: flex; flex-direction: column; gap: 6px; }
.pb-warn[hidden] { display: none; }
.pb-warn li { position: relative; padding: 8px 10px 8px 30px; border-radius: 10px; font-size: 13px; line-height: 1.45; color: var(--lab-soft); }
.pb-warn li::before { position: absolute; left: 10px; top: 8px; font-weight: 900; }
.pb-warn li.warn { background: rgba(212, 242, 106, .07); border: 1px solid rgba(212, 242, 106, .25); }
.pb-warn li.warn::before { content: "!"; color: var(--lab-volt); }
.pb-warn li.bad { background: rgba(255, 93, 93, .08); border: 1px solid rgba(255, 122, 122, .3); }
.pb-warn li.bad::before { content: "×"; color: #ff7a7a; }
.pb-share { flex: none; padding: 0 16px calc(14px + env(safe-area-inset-bottom)); background: var(--lab-raised); }
.pb-share[hidden] { display: none; }
.pb-foot:has(+ .pb-share:not([hidden])) { padding-bottom: 12px; }
.pb-share-btn { width: 100%; min-height: 44px; }
.pb-share-actions { display: flex; gap: 8px; }
.pb-share-actions .dash-btn { flex: 1 1 0; min-height: 44px; }
.pb-share-btn[hidden], .pb-share-form[hidden], .pb-shared[hidden], .pb-share-actions[hidden], .pb-save-btn[hidden] { display: none; }
.pb-share-form { display: flex; flex-direction: column; gap: 8px; }
.pb-share-form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--lab-border-strong); background: var(--lab-bg); color: var(--lab-text); font: inherit; font-size: 14px; resize: vertical; }
.pb-share-form textarea:focus { outline: none; border-color: var(--lab-teal); }
.pb-share-row { display: flex; gap: 8px; }
.pb-share-row .dash-btn { min-height: 44px; }
.pb-shared { margin: 0; color: var(--lab-muted); font-size: 13px; }
/* Touch screens show the message tools beside each message; under a slip card instead, so the card gets the full width */
@media (hover: none) {
  .chat-msg.has-slip { flex-wrap: wrap; }
  .chat-msg.has-slip .chat-tools { flex-basis: 100%; padding-left: 48px; }
}

/* Phones: filters folded behind "More filters" on the EV Tool and Best Value (fb-mobile.js) */
.fb-folded { display: none !important; }
.fb-more[aria-expanded="true"] { border-color: var(--lab-teal); color: var(--lab-teal); }

/* Player panel charts (modal1.html / modal1_bestvalue.html): a header line with the player, stat and line, so a
   screenshot of the charts explains itself; on phones both charts fit one screen (lab-charts.js sizes them) */
.lab-page .panel-player-name { font-size: 20px; font-weight: 800; color: var(--lab-text); }
.lab-page .panel-chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0; font-size: 13px; color: var(--lab-soft); }
.lab-page .panel-chart-head:empty { display: none; }
.lab-page .panel-chart-head b { color: var(--lab-text); }
.lab-page .panel-chart-brand { color: var(--lab-teal); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
/* Low confidence in the panel: a quiet note, not a badge (it sat on top of the charts in shared screenshots) */
.lab-page .prop-panel .pp-pick-strength.toss { color: var(--lab-faint); font-weight: 500; padding: 0; border: 0; }
.lab-page .prop-panel .pp-pick-strength.toss::before { display: none; }
@media (max-width: 760px) {
  .lab-page .prop-panel .panel-charts { padding: 8px; gap: 4px; }
  .lab-page .prop-panel .panel-charts + .panel-charts { margin-top: -4px; }
  /* the head-to-head chart's title already names the opponent and the average */
  .lab-page .prop-panel #modal-text2, .lab-page .prop-panel #modal-text3,
  .lab-page .prop-panel #modal-text2-bv, .lab-page .prop-panel #modal-text3-bv { display: none; }
}

/* Historical page on phones (tier1_layout.html): the player and opponent controls compact and both charts short
   (lab-charts.js), so the two charts fit one screenshot */
@media (max-width: 760px) {
  .lab-page .chart-body { width: auto; margin: 10px 0; padding: 10px; gap: 6px; box-sizing: border-box; }
  .lab-page .chart-body .chart-right { min-width: 0; max-width: 100%; }
  .lab-page .chart-body + br { display: none; }
  .lab-page .chart-body .chart-left { flex: 1 1 100%; max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 2px 10px; align-items: end; }
  .lab-page .chart-left label { margin: 0; }
  .lab-page .chart-left label[for="player-filter"] { grid-column: 1; grid-row: 1; }
  .lab-page .chart-left #player-filter, .lab-page .chart-left #player-filter + .select2-container { grid-column: 1; grid-row: 2; }
  .lab-page .chart-left label[for="player-line"] { grid-column: 2; grid-row: 1; }
  .lab-page .chart-left #player-line { grid-column: 2; grid-row: 2; width: 100%; }
  .lab-page .chart-left label[for="opponent-filter"], .lab-page .chart-left #opponent-filter,
  .lab-page .chart-left #opponent-filter + .select2-container { grid-column: 1 / -1; }
  .lab-page #modal-text-his, .lab-page #modal-text-his-median, .lab-page #modal-text-his-whip-pitch { grid-column: 1 / -1; font-size: 13px; }
  .lab-page #modal-text-his br, .lab-page #modal-text-his-median br { display: none; }
  .lab-page #modal-text-his span { display: inline !important; margin-left: 6px; }
  .lab-page #modal-text-his-median strong, .lab-page #modal-text-his-median span { font-size: 13px !important; }
  .lab-page #modal-text2-his { display: none; } /* the head-to-head chart's title has the opponent and average */
  .lab-page .chart-body .chart-container { padding: 4px; }
  .lab-page #map-section .chart-left { display: flex; align-items: stretch; } /* the map view picker stacks as before */
  .lab-page #modalChart-his, .lab-page #modalChart2-his { min-height: 0; } /* sized by lab-charts.js; the map chart keeps its height */
}
