:root {
  color-scheme: light;
  --page: #f9f9f7; --surface: #fcfcfb; --surface-2: #f2f2ee; --line: #e1e0d9; --axis: #c3c2b7;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
  --accent: #0d8f62; --accent-ink: #ffffff; --accent-soft: #dcf1e8;
  --up: #006300; --down: #b42318; --warn-bg: #fff4d6; --warn-ink: #7a5300;
  --crit-bg: #fde4e1; --crit-ink: #9f1d1d;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --band: rgba(42, 120, 214, .14);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --line: #2c2c2a; --axis: #383835;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
    --accent: #34c58f; --accent-ink: #0b0b0b; --accent-soft: #143628;
    --up: #0ca30c; --down: #f08a5d; --warn-bg: #3a2e10; --warn-ink: #fab219;
    --crit-bg: #3a1a18; --crit-ink: #f19a9a;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --band: rgba(57, 135, 229, .20);
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #232321; --line: #2c2c2a; --axis: #383835;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
  --accent: #34c58f; --accent-ink: #0b0b0b; --accent-soft: #143628;
  --up: #0ca30c; --down: #f08a5d; --warn-bg: #3a2e10; --warn-ink: #fab219;
  --crit-bg: #3a1a18; --crit-ink: #f19a9a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --band: rgba(57, 135, 229, .20);
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, select, input { font: inherit; color: inherit; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* header */
/* white header with a thin brand-green strip along the bottom; the menu tabs rise up out of that strip */
.top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px 16px; background: var(--surface); border-bottom: 2px solid var(--accent); }
.brand { font-weight: 700; font-size: 17px; letter-spacing: .2px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 4px; align-self: stretch; align-items: flex-end; margin-bottom: -10px; }
.nav a { padding: 7px 14px 6px; border-radius: 8px 8px 0 0; background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 600; line-height: 1.2; white-space: nowrap; transition: filter .12s, padding .12s; }
.nav a:hover { filter: brightness(1.08); }
.nav a.on { padding-top: 10px; filter: brightness(.82); font-weight: 700; }
.flag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; margin: 3px 4px 0 0; white-space: nowrap;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; text-decoration: none; }
.page { max-width: 1500px; margin: 0 auto; padding: 16px; }
/* pre-game picks: games that have kicked off keep their last pre-game model picks, clearly marked as not live */
.pre-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; padding: 0 7px;
  border-radius: 999px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); vertical-align: 1px; margin-left: 6px; }
.flag.pre { background: transparent; color: var(--muted); border: 1px dashed var(--line); font-weight: 500; }
.flag.pre b { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; margin-right: 3px; }
.pre-picks { margin-top: 22px; }
.pre-picks h3 { margin: 0 0 4px; font-size: 15px; }
.pre-picks .data-table tbody tr { opacity: .8; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 12px; }
.controls label { font-size: 12px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.controls select, .controls input[type=number] { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; }
.scorebar { position: relative; width: 92px; height: 18px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.scorebar i { position: absolute; inset: 0 auto 0 0; background: var(--s1); border-radius: 5px; opacity: .85; }
.scorebar span { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 6px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.up { color: var(--up); font-weight: 600; } .down { color: var(--down); font-weight: 600; }
.spark { display: block; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600;
  padding: 8px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: var(--surface-2); }
.tag { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 999px; margin: 1px 3px 1px 0; white-space: nowrap; background: var(--accent-soft); color: var(--accent); }
.tag.neg { background: var(--crit-bg); color: var(--crit-ink); }
.disclaimer { font-size: 12px; color: var(--ink-2); background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; margin: 0 0 12px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 12px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.seg.small button { padding: 3px 9px; font-size: 12px; }
.weeknav { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.icon { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; }
.icon:disabled { opacity: .35; cursor: default; }
.spacer { flex: 1; }
.admin-link { position: absolute; top: 4px; right: 8px; font-size: 11px; color: var(--muted); text-decoration: none; }
.admin-link:hover { color: var(--accent); text-decoration: underline; }

/* layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; padding: 16px; max-width: 1500px; margin: 0 auto; }
@media (max-width: 1100px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.legend-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; font-size: 12px; color: var(--ink-2); margin-bottom: 8px; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }

/* slate table */
.slate-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.slate-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  font-weight: 600; padding: 8px 10px 4px; white-space: nowrap; }
.slate-table th.grp { text-align: center; border-bottom: 1px solid var(--line); }
.slate-table tr.sub th { padding-top: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; }
.slate-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.slate-table tr.game { cursor: pointer; }
.slate-table tr.game:hover td { background: var(--surface-2); }
.slate-table tr.game.open td { background: var(--surface-2); }
.slate-table tr.final td { color: var(--ink-2); }
.slate-table td.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.matchup { min-width: 190px; }
.team { display: flex; align-items: center; gap: 6px; line-height: 1.35; }
.team img { width: 18px; height: 18px; object-fit: contain; }
.team .rank { font-size: 11px; color: var(--muted); min-width: 16px; }
.team .score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.team.home { font-weight: 600; }
.cell-main { font-weight: 600; font-variant-numeric: tabular-nums; }
.cell-sub { display: block; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ko { color: var(--muted); font-style: normal; }
.cell-sub.ko::before { content: ""; }
.gap-chip { display: inline-block; font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px;
  background: var(--warn-bg); color: var(--warn-ink); margin-left: 4px; vertical-align: 1px; white-space: nowrap; }
.live-tag { font-size: 11px; font-weight: 700; color: var(--crit-ink); background: var(--crit-bg); padding: 1px 6px; border-radius: 4px; }
.move-up { color: var(--up); } .move-down { color: var(--down); }
.chip { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; margin: 1px 3px 1px 0; white-space: nowrap; border: 1px solid var(--line); color: var(--ink-2); }
.chip.out { background: var(--crit-bg); color: var(--crit-ink); border-color: transparent; }
.chip.q { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }

/* detail panel */
tr.detail td { background: var(--surface-2); padding: 0; }
.detail-inner { padding: 12px 14px 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.subtable { width: 100%; border-collapse: collapse; font-size: 12.5px; background: var(--surface); border-radius: 8px; overflow: hidden; }
.subtable th { font-size: 11px; color: var(--muted); font-weight: 600; text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.subtable td { padding: 6px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.subtable tr.exch td { background: var(--accent-soft); }
.subtable td.best { font-weight: 700; box-shadow: inset 0 -2px 0 var(--accent); }
.subtable tr.mark td { background: var(--warn-bg); }
.note { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.chart-card h3 { margin: 0 0 6px; font-size: 13px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.chart-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: 3px; }
.chart-legend i.band { height: 10px; vertical-align: -1px; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); white-space: nowrap; z-index: 2; }
.chart .tip b { font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* news */
.news h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 0 0 8px; }
.news-list { display: flex; flex-direction: column; gap: 8px; }
/* slate page: the news column matches the slate's height and scrolls inside
   (height 0 + min-height 100% = take the row height the slate sets, without adding to it) */
.layout > aside.news { display: flex; flex-direction: column; }
.layout > aside.news .news-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding-right: 4px; scrollbar-width: thin; }
@media (min-width: 1101px) { .layout > aside.news { height: 0; min-height: max(100%, 420px); } }
@media (max-width: 1100px) { .layout > aside.news .news-list { max-height: 70vh; } }
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.news-head h2 { margin: 0; }
.news-item.x { border-left: 3px solid var(--accent); }
.src-x { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 4px; background: var(--ink); color: var(--surface); letter-spacing: .3px; }
.news-item { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; box-shadow: var(--shadow); }
.news-item .meta { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); margin-bottom: 4px; flex-wrap: wrap; }
.news-item .text { font-size: 13px; overflow-wrap: anywhere; }
.news-item .players { margin-top: 5px; }
.status { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; letter-spacing: .3px; }
.status.OUT, .status.IR, .status.SUSPENDED { background: var(--crit-bg); color: var(--crit-ink); }
.status.DOUBTFUL, .status.QUESTIONABLE, .status.DNP, .status.LIMITED, .status.INJURED { background: var(--warn-bg); color: var(--warn-ink); }
.status.RETURN { background: var(--accent-soft); color: var(--accent); }
.foot { padding: 8px 16px 24px; text-align: center; }
@media (max-width: 640px) {
  .top { padding: 10px 16px 10px; }
  /* phones: the menu tabs take their own bottom row and scroll sideways instead of widening the page */
  .nav { order: 9; flex: 1 1 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .layout { padding: 12px 16px; }
}

/* slate layout switch + card view */
.view-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.slate-pickers { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.viewseg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.viewseg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink-2);
  padding: 6px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; }
.viewseg button:hover { color: var(--ink); }
.viewseg button.on { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(16,24,40,.10); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow);
  cursor: pointer; display: flex; flex-direction: column; gap: 10px; }
.gcard:hover { border-color: var(--axis); }
.gcard.open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.gcard.final { opacity: .8; }
.gcard .ghead { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.gcard .teams .team { font-size: 14px; }
.gcard .mets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gcard .met { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; }
.gcard .met .k { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.gcard .met .v { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.gcard .met .s { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.gcard .gfoot { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.gcard .gfoot .small { display: inline-flex; gap: 3px; align-items: center; }
.card-detail { grid-column: 1 / -1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }

/* quick look: a small pill so it reads as clickable (row / card clicks open the full game page) */
.quick { display: inline-flex; align-items: center; gap: 3px; margin-top: 5px; padding: 2px 9px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.4; }
td.when .quick { display: flex; width: fit-content; }
.ghead .quick { margin: 0 0 0 6px; }
.quick:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.quick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* links to team / player pages (every page) */
a.plink, a.tlink { color: inherit; text-decoration: none; }
a.plink:hover, a.tlink:hover { color: var(--accent); text-decoration: underline; }
a.tlink { display: inline-flex; align-items: center; gap: 6px; }
a.tlink img { width: 18px; height: 18px; object-fit: contain; }
.team a.tlink { gap: 6px; }

/* header account area: Sign in / Subscribe, or the signed-in email (+ Admin lab for the admin) */
.acct-links { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; }
.acct-links a { color: var(--ink-2); text-decoration: none; }
.acct-links a:hover { color: var(--accent); text-decoration: underline; }
.acct-links a.sub { color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 3px 11px; font-weight: 600; }
.acct-links a.sub:hover { background: var(--accent-soft); text-decoration: none; }
.acct-links .who { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }

/* paywall locks and notes */
a.lock { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 650; color: #5b3fc4; background: #efeaff;
  border-radius: 999px; padding: 1px 8px; text-decoration: none; white-space: nowrap; }
a.lock:hover { background: #e2d9ff; }
.upsell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: #4a3699; background: #f3efff;
  border: 1px solid #ded5ff; border-radius: 10px; padding: 8px 12px; margin: 0 0 12px; }
.upsell a { font-weight: 650; color: #5b3fc4; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) a.lock { color: #c4b5ff; background: #2a2147; }
  :root:where(:not([data-theme="light"])) .upsell { color: #d6ccff; background: #211a3a; border-color: #3a2f66; }
  :root:where(:not([data-theme="light"])) .upsell a { color: #c4b5ff; }
}

/* copyright row under the disclaimers (matches consult.screenmidas.com) */
.foot-note { margin-bottom: 10px; }
.foot-legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: left; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: var(--accent); }
