:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #dfe3e8;
  --text: #11161d;
  --text-2: #4a5360;
  --muted: #6b7480;
  --brand: #0f62ae;
  --brand-ink: #ffffff;
  --win: #156b39;
  --loss: #e07070;
  --push: #8a929c;
  --grid: #e6e9ed;
  --good-ink: #187a42;
  --bad-ink: #c23b3b;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1116; --surface: #161a21; --surface-2: #1d222b; --border: #2a303a;
    --text: #eef1f5; --text-2: #b7bec8; --muted: #8b93a0; --brand: #3987e5; --brand-ink: #0e1116;
    --win: #24924f; --loss: #d46464; --push: #7d8590; --grid: #262c35;
    --good-ink: #5fcf8c; --bad-ink: #f19a9a; --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1116; --surface: #161a21; --surface-2: #1d222b; --border: #2a303a;
  --text: #eef1f5; --text-2: #b7bec8; --muted: #8b93a0; --brand: #3987e5; --brand-ink: #0e1116;
  --win: #24924f; --loss: #d46464; --push: #7d8590; --grid: #262c35;
  --good-ink: #5fcf8c; --bad-ink: #f19a9a; --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--brand); }
h1, h2, h3 { font-family: "Barlow Semi Condensed", "Barlow", sans-serif; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
header.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; gap: 16px; height: 56px; }
.logo { font: 700 20px "Barlow Semi Condensed", sans-serif; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.logo b { color: var(--brand); }
nav.tabs { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; }
nav.tabs a { padding: 6px 12px; border-radius: 6px; color: var(--text-2); text-decoration: none; font-weight: 600; white-space: nowrap; font-size: 14px; }
nav.tabs a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; border-radius: 6px; font-weight: 700; text-decoration: none; white-space: nowrap; }

.hero { padding: 36px 0 20px; }
.hero p { color: var(--text-2); max-width: 640px; margin: 8px 0 0; }
.meta { color: var(--muted); font-size: 13px; margin-top: 10px; }

section.block { margin: 20px 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card > header .sub { color: var(--muted); font-size: 13px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .g2 { grid-template-columns: 1fr; } }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.kpi .v { font: 700 26px/1.1 "Barlow Semi Condensed", sans-serif; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .d { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pos { color: var(--good-ink); }
.neg { color: var(--bad-ink); }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 8px 0 16px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.filters select, .filters input { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; min-width: 120px; text-transform: none; letter-spacing: 0; }
.filters input[type=number] { width: 110px; min-width: 0; }
.filters .reset { font: inherit; font-size: 13px; background: none; border: 0; color: var(--brand); cursor: pointer; padding: 8px 0; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Keep columns close to their content instead of stretching every column across the card. */
.tbl-wrap table { width: max-content; max-width: 100%; min-width: 0; border-collapse: collapse; font-size: 14px; }
table { border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.tbl-wrap th.pick-col, .tbl-wrap td.pick-col { width: 130px; max-width: 130px; white-space: normal; overflow-wrap: anywhere; }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--push)); }
.pill.win { --dot: var(--win); }
.pill.loss { --dot: var(--loss); }
.pill.high { --dot: var(--brand); }
.empty { color: var(--text-2); padding: 18px; background: var(--surface-2); border-radius: 8px; }
.more { margin-top: 10px; font: inherit; font-size: 13px; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 6px 12px; cursor: pointer; }

.legend { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); display: inline-block; }

.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis text { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .zero { stroke: var(--muted); stroke-width: 1; }
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; font-size: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.14); white-space: nowrap; opacity: 0; transition: opacity .08s; z-index: 5; color: var(--text); }
.tip b { font-weight: 700; }

.method { color: var(--text-2); font-size: 14px; }
.method p { margin: 0 0 10px; max-width: 760px; }
.cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: 10px; padding: 16px 18px; }
.empty-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.empty-cta > span { flex: 1 1 320px; }
.empty-cta .btn { flex: none; }
.locked-body { position: relative; min-height: 290px; }
#upcoming.locked-body { min-height: 290px; }
.locked-rows { filter: blur(6px); opacity: .55; user-select: none; pointer-events: none; }
.locked-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; color: var(--text); }
.locked-overlay svg { color: var(--brand); }
.locked-msg { color: var(--text-2); max-width: 420px; font-size: 14px; }
.locked-msg b { color: var(--text); font-size: 16px; }
.btn-lg { padding: 11px 28px; font-size: 16px; }
.locked-signin { font-size: 13px; }
footer { color: var(--muted); font-size: 12px; padding: 28px 0 40px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.btn-sm { padding: 6px 12px; font-size: 14px; }
#account { margin-left: 8px; flex: none; }
.locked-body .locked-rows { min-height: 260px; }
.section-title { margin: 28px 0 12px; }
.kpis-inner .kpi { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.live { border-top: 4px solid var(--win); }
.grid > * { min-width: 0; }

.logo { display: flex; align-items: center; flex: none; } .logo img { height: 44px; width: auto; display: block; }
@media (max-width: 520px) { .logo img { height: 40px; } }

/* ---- filter sliders & multi-select ---- */
.filters { gap: 16px 24px; align-items: flex-end; }
.fctl { display: flex; flex-direction: column; gap: 6px; min-width: 170px; flex: 1 1 170px; max-width: 240px; }
.flabel { font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; display: flex; justify-content: space-between; gap: 8px; }
.flabel output { text-transform: none; letter-spacing: 0; color: var(--text); font-weight: 700; font-size: 13px; }
.fctl input[type=range] { width: 100%; accent-color: var(--brand); margin: 0; height: 22px; }
.dual { position: relative; height: 22px; }
.dual::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--grid); }
.dual .fill { position: absolute; top: 9px; height: 4px; border-radius: 2px; background: var(--brand); }
.dual input[type=range] { position: absolute; inset: 0; pointer-events: none; -webkit-appearance: none; appearance: none; background: none; }
.dual input[type=range]::-webkit-slider-runnable-track { background: none; height: 22px; }
.dual input[type=range]::-moz-range-track { background: none; }
.dual input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); margin-top: 2px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.dual input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); cursor: pointer; }
.dual input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--brand); outline-offset: 2px; }
.msel { position: relative; }
.msel summary { list-style: none; cursor: pointer; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 30px 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.msel summary::-webkit-details-marker { display: none; }
.msel summary::after { content: ""; position: absolute; right: 11px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); }
.msel[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.msel-pop { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 6px; }
.msel-pop label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 14px; color: var(--text); cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400; }
.msel-pop label:hover { background: var(--surface-2); }
.msel-pop label.tier { font-weight: 700; }
.msel-pop label.angle { padding-left: 30px; }
.msel-pop input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.msel-pop .msel-actions { display: flex; justify-content: space-between; border-top: 1px solid var(--grid); margin-top: 4px; padding: 6px 8px 2px; }
.msel-pop .msel-actions button { font: inherit; font-size: 13px; background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; }
@media (max-width: 520px) { .fctl { max-width: none; flex-basis: 100%; } }
.filters input[type=range] { border: 0; background: transparent; padding: 0; min-width: 0; width: 100%; box-shadow: none; }
.filters .msel-pop label { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; font-size: 14px; color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 400; }
.filters .msel-pop label.tier { font-weight: 700; }
.filters .msel-pop input[type=checkbox] { min-width: 0; width: 16px; height: 16px; padding: 0; border: 0; flex: none; }
.model { border-top: 4px solid var(--brand); }
.subhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.subhead .sub { color: var(--muted); font-size: 13px; }
.live > header, .model > header { margin-bottom: 14px; }

/* ---- site nav + view toggle ---- */
nav.site { margin-left: auto; overflow: visible; }
nav.site + #account { margin-left: 8px; }
nav.site .nav-menu { position: relative; display: inline-flex; align-items: center; flex: none; }
nav.site .nav-menu > a { border-radius: 6px 0 0 6px; }
nav.site .nav-menu-toggle { border: 0; background: transparent; color: var(--text-2); cursor: pointer; font: inherit; font-size: 12px; padding: 6px 8px 6px 2px; border-radius: 0 6px 6px 0; }
nav.site .nav-menu-toggle:hover, nav.site .nav-menu.open .nav-menu-toggle { background: var(--surface-2); color: var(--text); }
nav.site .nav-submenu { display: none; position: absolute; z-index: 30; top: calc(100% + 7px); left: 0; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
nav.site .nav-menu.open .nav-submenu { display: flex; flex-direction: column; }
nav.site .nav-submenu a { display: block; padding: 9px 10px; border-radius: 5px; color: var(--text-2); text-decoration: none; font-size: 13px; white-space: nowrap; }
nav.site .nav-submenu a:hover, nav.site .nav-submenu a:focus-visible { background: var(--surface-2); color: var(--text); }
.seg { display: inline-flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 3px; margin-top: 12px; max-width: 100%; overflow-x: auto; }
.seg a { padding: 6px 12px; border-radius: 6px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.seg a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
@media (max-width: 520px) {
  header.top .wrap { gap: 8px; }
  nav.site a { padding: 6px 8px; font-size: 13px; }
  .logo img { height: 34px; }
  #account .btn-sm { padding: 5px 9px; font-size: 13px; }
}

nav.site .sm { display: none; }
@media (max-width: 520px) { nav.site .lg { display: none; } nav.site .sm { display: inline; } }
.kpi-note { margin: 10px 2px 0; max-width: 820px; font-size: 13px; }
[hidden] { display: none !important; }
.signup { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 6px; }
.signup-row { display: flex; gap: 8px; }
.signup input[type=email] { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); }
.signup input[type=email]:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.signup .btn { border: 0; cursor: pointer; font: inherit; font-weight: 700; flex: none; }
.signup .btn-lg { padding: 10px 18px; font-size: 15px; }
.signup .btn:disabled { opacity: .7; cursor: default; }
.signup-note { font-size: 13px; color: var(--text-2); min-height: 1em; }
.signup-note.err { color: var(--loss, #c0392b); }
.signup-done { font-size: 15px; color: var(--text); padding: 8px 0; }
.signup-compact { max-width: 380px; flex: 0 1 380px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
/* Compact, content-sized tables on phones: avoid distributing spare width between columns. */
@media (max-width: 600px) {
  .card { padding: 8px; }
  .tbl-wrap { overflow-x: auto; }
  .tbl-wrap table { width: max-content; min-width: 0; max-width: none; table-layout: auto; font-size: 11px; }
  .tbl-wrap th { padding: 4px 4px; font-size: 9px; line-height: 1.2; letter-spacing: 0; white-space: normal; }
  .tbl-wrap td { padding: 4px 4px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
  .tbl-wrap td.num, .tbl-wrap th.num { white-space: nowrap; }
  .tbl-wrap th.pick-col, .tbl-wrap td.pick-col { width: 92px; min-width: 76px; max-width: 92px; white-space: normal; overflow-wrap: anywhere; }
  .tbl-wrap .pill { font-size: 9px; padding: 0 4px; gap: 3px; }
  .tbl-wrap .pill::before { width: 5px; height: 5px; }
}
@media (max-width: 420px) {
  .tbl-wrap table { font-size: 10px; }
  .tbl-wrap th { padding: 3px; font-size: 8px; }
  .tbl-wrap td { padding: 3px; }
  .tbl-wrap th.pick-col, .tbl-wrap td.pick-col { width: 82px; min-width: 66px; max-width: 82px; }
}
@media (max-width: 420px) { .signup-row { flex-direction: column; } }
@media (max-width: 420px) { .locked-body, #upcoming.locked-body { min-height: 360px; } .locked-body .locked-rows { min-height: 330px; } }
.unlocked { padding: 8px 0 4px; }
.unlocked p { margin: 0 0 12px; color: var(--text-2); }
.unlocked p b { color: var(--text); }
.unlocked-links { display: flex; gap: 10px; flex-wrap: wrap; }
