/*
 * JRPicks odds board.
 *
 * Committed dark palette -- a sportsbook board is always dark, so this is a
 * deliberate single-theme design rather than an omission; every color is
 * painted explicitly so the page holds on any host background.
 *
 * Colour discipline worth keeping: Racing Red means exactly one thing --
 * identity and active state. It is never used for data. Semantic colour is
 * separate: mint = a positive edge, grey = everything else (so bad prices
 * recede instead of competing), amber = a caveat (injury, correlation).
 * Before this, red was both the brand and "negative edge", which made a bad
 * bet look like the logo.
 */
:root{
  --ground:#0C0E13;
  --surface:#141822;
  --surface-2:#1A1F2B;
  --raise:#212837;
  --line:#262E3C;
  --line-soft:#1D2430;

  --ink:#EDF1F7;
  --ink-2:#9AA6B8;
  --ink-3:#68738A;

  --red:#E10600;
  --red-hot:#FF2A22;
  --red-glow:rgba(225,6,0,.30);

  --pos:#3DDC97;
  --pos-soft:rgba(61,220,151,.11);
  --pos-line:rgba(61,220,151,.34);
  --warn:#E8B24C;

  --sans:"IBM Plex Sans",-apple-system,"Segoe UI",Roboto,sans-serif;
  --cond:"Barlow Condensed","IBM Plex Sans",-apple-system,"Segoe UI",sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,"Cascadia Code",Consolas,monospace;

  --r:10px;
  --pad:clamp(14px,3vw,30px);
}

*{box-sizing:border-box}
[hidden]{display:none!important}

body{
  margin:0;
  background:var(--ground);
  color:var(--ink);
  font-family:var(--sans);
  font-size:14px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  padding-bottom:120px;
}

button{font-family:inherit;cursor:pointer;color:inherit}
:focus-visible{outline:2px solid var(--red-hot);outline-offset:2px;border-radius:4px}

/* ── Command bar ───────────────────────────────────────── */
.bar{
  position:sticky;top:0;z-index:40;
  background:linear-gradient(180deg,#0F131B 0%,rgba(15,19,27,.96) 100%);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(8px);
}
.bar-in{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:12px var(--pad)}
.brand{display:flex;align-items:baseline;gap:9px;margin-right:auto}
.mark{
  width:11px;height:11px;background:var(--red);
  transform:rotate(45deg);border-radius:2px;
  box-shadow:0 0 14px var(--red-glow);align-self:center;
}
.word{
  font-family:var(--cond);font-weight:700;font-size:24px;
  letter-spacing:.06em;text-transform:uppercase;line-height:1;
}
.word em{color:var(--red);font-style:normal}
.build{
  font-size:10px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--ink-3);border:1px solid var(--line);
  padding:3px 7px;border-radius:999px;align-self:center;
}

.readout{display:flex;gap:16px;font-size:11.5px;color:var(--ink-2);align-items:center}
.readout b{color:var(--ink);font-weight:600}
.dot{width:6px;height:6px;border-radius:50%;background:var(--pos);box-shadow:0 0 8px var(--pos);display:inline-block}

.acts{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.btn{
  border:1px solid var(--line);background:var(--surface-2);
  border-radius:8px;padding:8px 13px;font-size:12px;font-weight:600;
  transition:border-color .15s,background .15s,transform .1s;
}
.btn:hover{border-color:#39424F;background:var(--raise)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:default}
.btn-key{background:var(--red);border-color:var(--red);color:#fff;box-shadow:0 2px 16px var(--red-glow)}
.btn-key:hover:not(:disabled){background:var(--red-hot);border-color:var(--red-hot)}
.btn-slip .cnt{
  display:inline-block;min-width:17px;padding:0 4px;margin-left:6px;
  background:var(--red);color:#fff;border-radius:999px;
  font-size:10px;font-weight:700;text-align:center;
}

/* ── Filter rail ───────────────────────────────────────── */
.rail{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  padding:10px var(--pad);border-bottom:1px solid var(--line-soft);
  background:var(--ground);
}
.seg{display:flex;background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:3px;gap:2px}
.seg button{
  border:0;background:transparent;color:var(--ink-2);
  padding:6px 13px;border-radius:6px;font-weight:600;
  font-family:var(--cond);letter-spacing:.05em;text-transform:uppercase;font-size:13px;
  transition:color .15s,background .15s;
}
.seg button:hover{color:var(--ink)}
.seg button[aria-pressed="true"]{background:var(--red);color:#fff;box-shadow:0 1px 10px var(--red-glow)}
/* League switcher. Sits above the market tabs and is styled quieter than
   them: which league you are looking at changes rarely, which market you
   are looking at changes constantly, so the loud control should be the
   one that gets used. */
.rail-sport{padding-bottom:0;border-bottom:0}
.seg-sport{background:transparent;border-color:transparent;padding:0;gap:6px}
.seg-sport button{
  font-size:12px;padding:4px 12px;border:1px solid var(--line);
  border-radius:999px;color:var(--ink-3);background:var(--surface);
}
.seg-sport button:hover{color:var(--ink);border-color:#39424F}
.seg-sport button[aria-pressed="true"]{
  background:var(--surface-2);color:var(--ink);border-color:var(--red);
  box-shadow:none;
}
/* Says what a league does NOT have, so an absent Props tab reads as
   deliberate rather than broken. */
.sport-note{font-size:11px;color:var(--ink-3);margin-left:4px}
/* "soon" on a league that is priced but not yet playing. Small and quiet:
   it is an explanation for an empty-looking board, not an advertisement. */
.seg-sport button .soon{
  margin-left:6px;font-size:8.5px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--warn);border:1px solid rgba(232,178,76,.34);border-radius:999px;
  padding:1px 5px;vertical-align:middle;font-weight:600;
}
/* Which league a sharpest-edges card belongs to. The strip mixes leagues
   now, so the card has to say which one without the reader recognising
   team names. */
.edge-card .lg-tag{
  display:inline-block;margin-right:7px;font-family:var(--mono);font-size:9px;
  letter-spacing:.06em;color:var(--ink-3);border:1px solid var(--line);
  border-radius:4px;padding:0 4px;vertical-align:middle;
}

.rail-r{margin-left:auto;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.sel{
  background:var(--surface);color:var(--ink);border:1px solid var(--line);
  border-radius:8px;padding:7px 9px;font-size:12px;font-family:inherit;
}
.tog{
  display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--ink-2);
  border:1px solid var(--line);background:var(--surface);
  padding:6px 11px;border-radius:999px;user-select:none;
  transition:border-color .15s,color .15s,background .15s;
}
.tog:hover{color:var(--ink)}
.tog input{accent-color:var(--red);width:13px;height:13px;margin:0;cursor:pointer}
.tog:has(input:checked){border-color:var(--pos-line);color:var(--ink);background:var(--pos-soft)}

/* ── Book filter ───────────────────────────────────────── */
.bookmenu{position:relative}
.bookmenu>summary{
  list-style:none;cursor:pointer;user-select:none;
  display:flex;align-items:center;gap:7px;
  font-size:11.5px;color:var(--ink-2);
  border:1px solid var(--line);background:var(--surface);
  padding:6px 11px;border-radius:999px;
  transition:border-color .15s,color .15s;
}
.bookmenu>summary::-webkit-details-marker{display:none}
.bookmenu>summary::after{content:"▾";font-size:9px;color:var(--ink-3)}
.bookmenu>summary:hover{color:var(--ink);border-color:#39424F}
.bookmenu[open]>summary{color:var(--ink);border-color:var(--red)}

.bookmenu-panel{
  position:absolute;right:0;top:calc(100% + 6px);z-index:70;
  /* 275 rather than the original 230: the header carries two actions now,
     and "Show prices from" + "Select all" + "Clear" needs about 240px to
     stay on one line. The longer book keys sit better in it too. */
  width:275px;max-height:60vh;overflow-y:auto;
  background:var(--surface);border:1px solid #333C4A;border-radius:11px;
  box-shadow:0 14px 40px rgba(0,0,0,.55);padding:11px 12px;
}
.bookmenu-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3);
  padding-bottom:8px;border-bottom:1px solid var(--line-soft);
}
.bookmenu-link{
  background:none;border:0;padding:0;color:var(--red-hot);
  font-size:10px;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;
  /* Without this "Select all" breaks across two lines and drags the whole
     header taller than the label beside it. */
  white-space:nowrap;
}
.bookmenu-link:hover{text-decoration:underline}
/* Two links share the right-hand side of the header, separated by a hair
   line so they read as a pair of opposites rather than one wrapped label. */
.bookmenu-actions{display:flex;align-items:center;gap:9px}
.bookmenu-actions .bookmenu-link + .bookmenu-link{
  padding-left:9px;border-left:1px solid var(--line);
}
.bookmenu-list{display:flex;flex-direction:column;gap:2px;margin:8px 0}
.bookmenu-row{
  display:flex;align-items:center;gap:8px;
  font-size:12.5px;color:var(--ink);padding:5px 6px;border-radius:6px;cursor:pointer;
}
.bookmenu-row:hover{background:var(--surface-2)}
.bookmenu-row input{accent-color:var(--red);width:13px;height:13px;margin:0;cursor:pointer}
.bookmenu-row .n{margin-left:auto;font-family:var(--mono);font-size:10.5px;color:var(--ink-3)}
.bookmenu-empty{font-size:12px;color:var(--ink-3);padding:6px}
.bookmenu-note{
  margin:0;padding-top:8px;border-top:1px solid var(--line-soft);
  font-size:10.5px;line-height:1.45;color:var(--ink-3);
}

/* Marks a control whose output hasn't been validated, so the label itself
   carries the caveat instead of burying it in the footer. */
.tog-warn{
  font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--warn);
  border:1px solid rgba(232,178,76,.35);border-radius:999px;padding:1px 5px;margin-left:2px;
}

/* ── Sections ──────────────────────────────────────────── */
.wrap{padding:0 var(--pad)}
.sec-head{display:flex;align-items:center;gap:12px;margin:26px 0 12px}
.sec-head h2{
  font-family:var(--cond);font-size:15px;font-weight:700;margin:0;
  letter-spacing:.13em;text-transform:uppercase;
}
.sec-head .tick{width:22px;height:2px;background:var(--red);border-radius:2px}
.sec-head .note{font-size:11.5px;color:var(--ink-3);margin-left:auto;text-align:right}

/* ── Edge strip ────────────────────────────────────────── */
.strip{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}
.edge-card{
  flex:0 0 auto;min-width:236px;
  background:linear-gradient(160deg,var(--surface) 0%,#12161F 100%);
  border:1px solid var(--line);border-left:2px solid var(--pos);
  border-radius:var(--r);padding:12px 14px;
  transition:border-color .15s,transform .15s;
}
.edge-card:hover{transform:translateY(-2px);border-color:#333C4A;border-left-color:var(--pos)}
.edge-card .g{font-size:11px;color:var(--ink-3);margin-bottom:5px}
.edge-card .p{font-family:var(--cond);font-size:19px;font-weight:600;line-height:1.15;margin-bottom:8px}
.edge-card .r{display:flex;justify-content:space-between;align-items:center;font-size:11.5px;gap:10px}
.pct{color:var(--pos);font-weight:700;font-family:var(--mono);font-size:13px}
.tagm{color:var(--ink-3);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;text-align:right}

/* ── Day divider ───────────────────────────────────────── */
.day{
  display:flex;align-items:center;gap:12px;margin:22px 0 10px;
  font-family:var(--cond);font-size:13px;font-weight:600;
  letter-spacing:.16em;text-transform:uppercase;color:var(--ink-2);
}
.day::after{content:"";flex:1;height:1px;background:var(--line-soft)}
.day .n{color:var(--ink-3);letter-spacing:.04em;font-size:11px;font-family:var(--sans);text-transform:none}

/* ── Game accordion ────────────────────────────────────── */
.board{display:flex;flex-direction:column;gap:8px}
.game{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r);overflow:hidden;
  transition:border-color .18s,box-shadow .18s;
}
.game[data-open="true"]{border-color:#374050;box-shadow:0 6px 26px rgba(0,0,0,.42)}
.game:hover{border-color:#333C4A}

.ghead{
  width:100%;display:grid;
  grid-template-columns:64px minmax(0,1fr) auto 26px;
  align-items:center;gap:14px;
  background:transparent;border:0;text-align:left;padding:13px 15px;
}
.ghead:hover{background:var(--surface-2)}
.kick{font-family:var(--mono);font-size:11.5px;color:var(--ink-2);font-variant-numeric:tabular-nums}
.teams{display:flex;flex-direction:column;gap:1px;min-width:0}
.tm{
  font-family:var(--cond);font-size:17px;font-weight:600;line-height:1.22;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.tm .fav{color:var(--pos);font-size:10px;margin-left:6px;letter-spacing:.1em;font-family:var(--sans);font-weight:700}
.chips{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.chip{
  font-size:11px;color:var(--ink-2);background:var(--surface-2);
  border:1px solid var(--line);border-radius:999px;padding:4px 9px;white-space:nowrap;
}
.chip.hot{
  color:var(--pos);border-color:var(--pos-line);background:var(--pos-soft);
  font-weight:600;font-family:var(--mono);
}
.chip.flat{color:var(--ink-3)}

/* ── Projections (owner only) ──────────────────────────────
   Styled a shade apart from the rest of the board on purpose. These are
   this project's own numbers rather than a reading of the market, and the
   page should not let them blend in with figures that carry more weight. */
.proj-basis{
  margin:0 0 16px;padding:12px 14px;font-size:12px;line-height:1.55;
  color:var(--ink-2);background:rgba(232,178,76,.06);
  border:1px solid rgba(232,178,76,.26);border-radius:9px;
}
.proj-basis b{color:var(--warn)}
.pj-head{padding:12px 14px;border-top:1px solid var(--line-soft);display:flex;
  flex-direction:column;gap:7px}
.pj-line{display:flex;align-items:baseline;gap:10px;font-size:13px;flex-wrap:wrap}
.pj-k{font-family:var(--cond);text-transform:uppercase;letter-spacing:.07em;
  font-size:11px;color:var(--ink-3);min-width:54px}
.pj-v{font-family:var(--mono);font-size:15px;color:var(--ink);font-weight:600}
.pj-m{font-family:var(--mono);font-size:12px;color:var(--ink-3)}
/* The gap is the whole point of the tab, so it is the only thing that
   lights up -- and only when it is bigger than model noise. */
.pj-g{margin-left:auto;font-family:var(--mono);font-size:12.5px;color:var(--ink-3);
  border:1px solid var(--line);border-radius:999px;padding:2px 8px}
.pj-g.on{color:var(--warn);border-color:rgba(232,178,76,.34);background:rgba(232,178,76,.09);font-weight:600}
.pj-src{font-size:11px;color:var(--ink-3);font-family:var(--mono)}
.pj-lad{margin-top:10px}
.pj-lt{font-family:var(--cond);text-transform:uppercase;letter-spacing:.08em;
  font-size:11px;color:var(--ink-3);padding:8px 0 4px}
/* The line the market is actually offering, so the ladder can be read
   against it rather than in the abstract. */
.pj-at{background:rgba(255,255,255,.035)}
.pj-at .oc{color:var(--ink);font-weight:600}
/* Player yardage rows. Narrower than a game card -- one fixture carries
   many of them -- so the header is a single line with the two numbers and
   the gap between them. */
.game.pp .ghead{grid-template-columns:minmax(0,1fr) auto 20px;padding:11px 14px}
.pp-sub{display:block;font-family:var(--sans);font-size:11px;color:var(--ink-3);
  font-weight:400;letter-spacing:0;text-transform:none;margin-top:2px}
.game.pp .tm{font-size:15px}
/* Player rows nest two levels deep -- team, then position -- so they are
   stepped in and given a lighter ground than the position header above
   them, or the three levels read as one flat list. */
.pgroup .game.pp{border:0;border-radius:0;background:transparent;
  border-top:1px solid var(--line-soft)}
.pgroup .game.pp .ghead{padding-left:22px}
.pgroup .game.pp .gpad{padding-left:22px}
/* Marks a slip leg whose price came from our model rather than a book.
   The two are not interchangeable and the slip must not let them look it. */
.leg-proj{color:var(--warn);font-family:var(--cond);text-transform:uppercase;
  letter-spacing:.06em;font-size:10px;margin-right:5px}
/* Availability and depth-chart role, beside a player's projection. Muted
   by default because most of it is routine; amber only when the player is
   genuinely in doubt for Sunday. */
.pp-status{margin-left:7px;font-size:10.5px;color:var(--ink-3)}
.pp-status.warn{color:var(--warn)}
/* A price too long to be treated as an edge. Deliberately drab: the number
   is still shown so the price table is complete, but nothing about it
   should read as an opportunity. */
.ed.shot{color:var(--ink-3)}
.shot-tag{
  margin-left:6px;font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-3);border:1px solid var(--line);border-radius:999px;padding:1px 6px;
  font-family:var(--sans);vertical-align:middle;
}
/* The chance a strip pick actually happens, under its edge. An edge means
   very different things at 50% and at 7%, and the strip is where that is
   easiest to forget. */
.edge-card .hit{
  margin-top:6px;font-family:var(--mono);font-size:10.5px;color:var(--ink-3);
}
/* Conditions. Neutral by default because most games have unremarkable
   weather and a coloured chip on every card would train the eye to skip
   it. The warm colours are reserved for wind strong enough that
   src/analysis/weather.py writes a caveat about it. */
.chip.wx{font-family:var(--mono);color:var(--ink-3)}
.chip.wx-breezy{color:var(--ink-2);border-color:rgba(154,166,184,.30)}
.chip.wx-strong{
  color:var(--warn);background:rgba(232,178,76,.11);
  border-color:rgba(232,178,76,.32);font-weight:600;
}
/* Sits directly above the prices, edge to edge, matching .gpad/.pgroups. */
.wxline{
  padding:10px 14px;font-size:12px;line-height:1.45;
  color:var(--ink-3);border-top:1px solid var(--line-soft);
}
.wxline.strong{color:var(--warn);background:rgba(232,178,76,.07)}
.chev{color:var(--ink-3);font-size:11px;justify-self:end;transition:transform .22s ease,color .15s}
.game[data-open="true"]>.ghead .chev{transform:rotate(180deg);color:var(--ink-2)}

.gbody{display:grid;grid-template-rows:0fr;transition:grid-template-rows .26s ease}
.game[data-open="true"]>.gbody{grid-template-rows:1fr}
.gbody>div{overflow:hidden}
.gpad{border-top:1px solid var(--line-soft)}

/* ── Prop categories: a second accordion level inside a game ── */
.pgroups{display:flex;flex-direction:column;border-top:1px solid var(--line-soft)}
.pgroup{border-bottom:1px solid var(--line-soft)}
.pgroup:last-child{border-bottom:0}
.phead{
  width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto 22px;
  align-items:center;gap:12px;
  background:#11151E;border:0;text-align:left;padding:10px 15px 10px 26px;
  position:relative;
}
.phead::before{
  content:"";position:absolute;left:15px;top:50%;transform:translateY(-50%);
  width:3px;height:14px;border-radius:2px;background:var(--line);
}
.phead:hover{background:var(--surface-2)}
.pgroup[data-open="true"]>.phead::before{background:var(--pos)}
.pname{
  font-family:var(--cond);font-size:15px;font-weight:600;
  letter-spacing:.04em;text-transform:uppercase;
}
.pgroup[data-open="true"]>.phead .chev{transform:rotate(180deg);color:var(--ink-2)}
.pbody{display:grid;grid-template-rows:0fr;transition:grid-template-rows .24s ease}
.pgroup[data-open="true"]>.pbody{grid-template-rows:1fr}
.pbody>div{overflow:hidden}

/* ── Odds table ────────────────────────────────────────── */
.tw{overflow-x:auto}
table{width:100%;border-collapse:collapse;min-width:560px}
th{
  text-align:left;font-size:10px;font-weight:600;color:var(--ink-3);
  letter-spacing:.13em;text-transform:uppercase;
  padding:9px 14px;border-bottom:1px solid var(--line-soft);background:#11151E;
}
td{padding:9px 14px;border-bottom:1px solid var(--line-soft);font-size:13px}
tr:last-child td{border-bottom:0}
tbody tr:hover{background:var(--surface-2)}
tbody tr.grp-start td{border-top:1px solid var(--line)}

.oc{font-weight:600;font-family:var(--cond);font-size:16px}
.oc .sub{display:block;font-family:var(--sans);font-size:11px;color:var(--ink-3);font-weight:400}
.bk{font-size:11.5px;color:var(--ink-2)}
.price{font-family:var(--mono);font-size:13.5px;font-weight:500;font-variant-numeric:tabular-nums}
.best-price{color:var(--pos);background:var(--pos-soft);border:1px solid var(--pos-line);border-radius:5px;padding:2px 7px}
.fair{font-family:var(--mono);font-size:12.5px;color:var(--ink-2);font-variant-numeric:tabular-nums}
.ed{font-family:var(--mono);font-size:12.5px;font-variant-numeric:tabular-nums;color:var(--ink-3)}
.ed.up{color:var(--pos);font-weight:600}

.add{
  width:26px;height:26px;border-radius:7px;
  border:1px solid var(--line);background:var(--surface-2);
  color:var(--ink-2);font-size:15px;line-height:1;
  display:grid;place-items:center;transition:all .14s;
}
.add:hover{border-color:var(--pos-line);color:var(--pos)}
.add[data-on="true"]{background:var(--pos-soft);border-color:var(--pos-line);color:var(--pos)}

/* ── Elo view ──────────────────────────────────────────── */
.elo{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:15px 16px}
.elo-top{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:13px}
.elo-mu{font-family:var(--cond);font-size:17px;font-weight:600}
.elo-mu .at{color:var(--ink-3)}
.elo-k{font-family:var(--mono);font-size:11.5px;color:var(--ink-3)}
.elo-grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}
.side{border:1px solid var(--line);border-radius:9px;padding:11px 13px;background:#11151E}
.side.win{border-color:var(--pos-line);background:linear-gradient(160deg,var(--pos-soft) 0%,#11151E 70%)}
.side .nm{font-family:var(--cond);font-size:16px;font-weight:600;margin-bottom:2px}
.side .pb{font-family:var(--mono);font-size:26px;font-weight:600;line-height:1.1;letter-spacing:-.02em}
.side.win .pb{color:var(--pos)}
.side .mt{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--ink-3);margin-top:7px}
.side .hurt{color:var(--warn)}
.split{display:flex;height:5px;border-radius:99px;overflow:hidden;margin-top:12px;background:var(--line)}
.split i{display:block;height:100%}
.split .a{background:#4A5567}
.split .h{background:var(--pos)}
.elo-foot{
  display:flex;justify-content:space-between;gap:10px;font-size:10.5px;
  color:var(--ink-3);margin-top:7px;letter-spacing:.04em;text-transform:uppercase;
}

/* ── Bet slip ──────────────────────────────────────────── */
.slip{
  position:fixed;right:18px;bottom:18px;width:352px;max-height:76vh;
  background:linear-gradient(180deg,#161B25 0%,#11151E 100%);
  border:1px solid #333C4A;border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.62);
  display:flex;flex-direction:column;z-index:60;overflow:hidden;
}
.slip-h{
  display:flex;align-items:center;gap:10px;
  padding:13px 15px;border-bottom:1px solid var(--line);background:var(--surface);
}
.slip-h h3{
  margin:0;font-family:var(--cond);font-size:15px;font-weight:700;
  letter-spacing:.12em;text-transform:uppercase;
}
.slip-h .cx{margin-left:auto;display:flex;gap:6px}
.mini{
  font-size:11px;padding:5px 9px;border-radius:6px;
  border:1px solid var(--line);background:var(--surface-2);color:var(--ink-2);
}
.mini:hover{color:var(--ink);border-color:#39424F}
.legs{overflow-y:auto;padding:11px 13px;display:flex;flex-direction:column;gap:7px;flex:1}
.leg{
  display:flex;gap:9px;align-items:flex-start;
  background:var(--surface-2);border:1px solid var(--line);
  border-radius:8px;padding:9px 11px;
}
.leg .li{flex:1;min-width:0}
.leg .lg{font-size:10.5px;color:var(--ink-3);margin-bottom:2px}
.leg .lp{font-family:var(--cond);font-size:15px;font-weight:600}
.leg .lo{font-family:var(--mono);font-size:12px;color:var(--pos);margin-top:2px}
.leg .rm{background:none;border:0;color:var(--ink-3);font-size:16px;line-height:1;padding:0 2px}
.leg .rm:hover{color:var(--red-hot)}
.slip-empty{color:var(--ink-3);font-size:12px;text-align:center;padding:26px 10px}

.calc{border-top:1px solid var(--line);padding:12px 14px;background:#0F131B}
.stake{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.stake label{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-3)}
.stake .fld{
  display:flex;align-items:center;gap:5px;flex:1;
  background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:7px 11px;
}
.stake .fld span{color:var(--ink-3);font-family:var(--mono);font-size:13px}
.stake input{
  flex:1;width:100%;background:none;border:0;color:var(--ink);
  font-family:var(--mono);font-size:15px;font-weight:600;padding:0;
}
.stake input:focus{outline:none}
.quick{display:flex;gap:5px}
.quick button{
  border:1px solid var(--line);background:var(--surface-2);color:var(--ink-2);
  border-radius:6px;padding:5px 8px;font-size:11px;font-family:var(--mono);
}
.quick button:hover{border-color:var(--pos-line);color:var(--pos)}

.payout{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  background:var(--pos-soft);border:1px solid var(--pos-line);
  border-radius:9px;padding:11px 13px;margin-bottom:10px;
}
.payout .lb{font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-2)}
.payout .amt{font-family:var(--mono);font-size:24px;font-weight:600;color:var(--pos);letter-spacing:-.02em}
.payout .tot{font-family:var(--mono);font-size:11px;color:var(--ink-3)}
.rows{display:flex;flex-direction:column;gap:6px}
.row{display:flex;justify-content:space-between;gap:10px;font-size:12px}
.row span{color:var(--ink-3)}
.row b{font-family:var(--mono);font-weight:600;font-variant-numeric:tabular-nums}
.warn{
  margin-top:9px;font-size:10.5px;line-height:1.45;color:var(--warn);
  background:rgba(232,178,76,.09);border:1px solid rgba(232,178,76,.26);
  border-radius:7px;padding:8px 10px;
}

.loading,.empty{color:var(--ink-3);font-size:13px;padding:22px 2px}

.foot{
  padding:26px var(--pad) 10px;font-size:11.5px;color:var(--ink-3);
  line-height:1.65;max-width:78ch;
}

/* ── Login ─────────────────────────────────────────────── */
.login-body{
  padding:0;
  min-height:100vh;
  display:grid;
  place-items:center;
  /* A faint red bloom off-centre so the page isn't a flat black field. */
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(225,6,0,.13), transparent 70%),
    var(--ground);
}
.login-wrap{width:100%;max-width:380px;padding:24px;display:flex;flex-direction:column;gap:16px}
.login-card{
  background:linear-gradient(180deg,var(--surface) 0%,#11151E 100%);
  border:1px solid var(--line);border-radius:14px;
  padding:28px 26px 24px;
  display:flex;flex-direction:column;gap:14px;
  box-shadow:0 22px 60px rgba(0,0,0,.55);
}
.login-brand{display:flex;align-items:center;gap:9px}
.login-brand .word{font-size:30px}
.login-tag{
  margin:-6px 0 8px;font-size:11px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--ink-3);
}
.login-field{display:flex;flex-direction:column;gap:6px}
.login-field span{
  font-size:10.5px;letter-spacing:.13em;text-transform:uppercase;color:var(--ink-2);
}
.login-field input{
  background:var(--surface-2);border:1px solid var(--line);border-radius:9px;
  padding:11px 13px;color:var(--ink);font-family:var(--sans);font-size:15px;
  transition:border-color .15s,background .15s;
}
.login-field input:focus{outline:none;border-color:var(--red);background:#1E242F}
.login-submit{width:100%;padding:12px;font-size:14px;margin-top:6px}
.login-error{
  margin:0;font-size:12px;color:var(--neg);
  background:var(--neg-soft);border:1px solid rgba(248,113,113,.3);
  border-radius:8px;padding:9px 11px;
}
.login-foot{margin:0;text-align:center;font-size:11px;color:var(--ink-3);line-height:1.6}
.foot b{color:var(--ink-2);font-weight:600}

@media (max-width:820px){
  /* THE BOOK FILTER PANEL.

     It is positioned right:0 against its own trigger, which is correct
     while that trigger sits at the right-hand end of the rail -- which is
     where margin-left:auto puts it on a wide screen.

     On a phone the rail wraps, the trigger lands at the LEFT edge (x=14,
     86px wide), and right-aligning a 275px panel to it put its left edge
     at -175px. The whole panel, every checkbox in it, sat off the side of
     the screen: elementFromPoint on a checkbox returned nothing at all.
     Nothing looked broken, because the pill still opened.

     Neither left:0 nor right:0 is safe across this whole range -- the
     trigger can be at either end depending on how much the rail wraps --
     so the panel stops anchoring to the trigger and anchors to the rail,
     inset equally from both edges. Wherever the trigger ends up, the
     panel is on screen. */
  .rail{position:relative}
  .bookmenu{position:static}
  .bookmenu-panel{
    left:var(--pad);right:var(--pad);width:auto;
    max-height:min(60vh,420px);
  }
  /* Finger-sized. 13px checkboxes and 25px rows are comfortable with a
     mouse and well under what a thumb can reliably hit. */
  .bookmenu-row{padding:11px 8px;font-size:14px;gap:11px}
  .bookmenu-row input{width:19px;height:19px}
  .bookmenu-head{padding-bottom:11px}
  .bookmenu-link{font-size:11px;padding:4px 0}

  .ghead{grid-template-columns:54px minmax(0,1fr) 20px;row-gap:8px}
  /* chips wrap to their own row; pin the chevron to row 1 so it isn't pushed
     below them and give back the vertical space collapsing just saved */
  .ghead .chev{grid-row:1;grid-column:3}
  .chips{grid-row:2;grid-column:1/-1;justify-content:flex-start}
  .readout{display:none}
  .elo-grid{grid-template-columns:1fr}
  .slip{right:0;left:0;bottom:0;width:auto;border-radius:16px 16px 0 0;max-height:70vh}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}

/* --- How much the books agree on a row -------------------------------
   Edge size alone ranks opportunities badly, so every positive edge
   carries a note of whether the rest of the market had actually made up
   its mind. Deliberately quiet: this qualifies the number next to it, it
   is not a second headline competing with the edge itself. */
.ag{
  display:inline-block;margin-top:7px;padding:2px 7px;
  font:600 9.5px/1.5 var(--sans);letter-spacing:.05em;text-transform:uppercase;
  border-radius:999px;border:1px solid transparent;cursor:help;
}
.ag-firm{color:var(--pos);background:var(--pos-soft);border-color:var(--pos-line)}
.ag-mixed{color:var(--ink-2);background:rgba(154,166,184,.10);border-color:rgba(154,166,184,.26)}
.ag-split{color:var(--warn);background:rgba(232,178,76,.11);border-color:rgba(232,178,76,.32)}

/* Same signal inside the dense board, where a pill would not fit. */
.dotag{
  display:inline-block;width:5px;height:5px;border-radius:50%;
  margin-left:6px;vertical-align:middle;cursor:help;
}
.dotag.ag-firm{background:var(--pos)}
.dotag.ag-mixed{background:var(--ink-3)}
.dotag.ag-split{background:var(--warn)}

/* --- Explain ---------------------------------------------------------
   A plain-language reading of one row, opened on demand. Deliberately
   quiet: it sits under the numbers and supports them, and must never
   compete with the edge figure for attention. */
.rowacts{display:flex;gap:5px;align-items:center;justify-content:flex-end}
.why{
  width:22px;height:22px;flex:none;
  background:var(--surface-2);border:1px solid var(--line);color:var(--ink-3);
  border-radius:50%;font:600 11px/1 var(--sans);cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  transition:color .12s,border-color .12s,background .12s;
}
.why:hover{color:var(--ink);border-color:var(--red);background:var(--raise)}
.why[data-open="true"]{color:#fff;background:var(--red);border-color:var(--red)}

.why-row>td{padding:0 0 10px}
.why-box{
  margin:2px 0 0;padding:11px 13px;
  background:var(--surface-2);border:1px solid var(--line-soft);
  border-left:2px solid var(--red);border-radius:0 var(--r) var(--r) 0;
}
.why-box p{margin:0;font:400 12.5px/1.65 var(--sans);color:var(--ink-2)}
.why-box .why-off{color:var(--ink-3);font-style:italic}
.why-src{
  display:block;margin-top:7px;
  font:500 9.5px/1.4 var(--sans);letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-3);
}
.why-waiting{color:var(--ink-3);font-style:italic}

/* --- Jarvis ----------------------------------------------------------
   The conversational analyst, in a panel alongside the board. Shares the
   slip's shape so the two read as siblings rather than competing ideas. */
.btn-jarvis{border-color:var(--red);color:var(--red-hot)}
.btn-jarvis:hover:not(:disabled){background:var(--red);border-color:var(--red);color:#fff}

.jarvis{
  position:fixed;right:0;top:0;bottom:0;width:min(430px,100vw);z-index:60;
  display:flex;flex-direction:column;
  background:var(--surface);border-left:1px solid var(--line);
  box-shadow:-18px 0 46px rgba(0,0,0,.45);
}
.jarvis-h{
  display:flex;align-items:center;justify-content:space-between;
  padding:15px var(--pad) 10px;border-bottom:1px solid var(--line-soft);
}
.jarvis-h h3{margin:0;font:600 15px/1 var(--cond);letter-spacing:.06em;text-transform:uppercase}
.jarvis-sub{
  margin:0;padding:9px var(--pad);
  font:400 10.5px/1.55 var(--sans);color:var(--ink-3);
  border-bottom:1px solid var(--line-soft);
}
.jarvis-log{flex:1;overflow-y:auto;padding:14px var(--pad);display:flex;flex-direction:column;gap:11px}
.jarvis-empty{margin:auto 0;text-align:center;font:400 12px/1.6 var(--sans);color:var(--ink-3)}

.jmsg{display:flex}
.jmsg-you{justify-content:flex-end}
.jbody{
  max-width:88%;padding:9px 12px;border-radius:var(--r);
  font:400 12.5px/1.62 var(--sans);white-space:pre-wrap;
}
.jmsg-you .jbody{background:var(--raise);color:var(--ink)}
.jmsg-jarvis .jbody{
  background:var(--surface-2);color:var(--ink-2);
  border:1px solid var(--line-soft);border-left:2px solid var(--red);
}
.jbody.jthinking{color:var(--ink-3);font-style:italic}
.jbody.jerr{color:var(--warn);font-style:italic}

.jarvis-ask{display:flex;gap:8px;padding:11px var(--pad) 14px;border-top:1px solid var(--line-soft)}
.jarvis-ask textarea{
  flex:1;resize:none;padding:8px 10px;
  background:var(--surface-2);border:1px solid var(--line);border-radius:8px;
  color:var(--ink);font:400 12.5px/1.5 var(--sans);
}
.jarvis-ask textarea:focus{outline:none;border-color:var(--red)}
.jarvis-ask .btn{align-self:flex-end}

/* The row button is a labelled pill now, not a bare question mark. */
.why{width:auto;height:22px;padding:0 9px;border-radius:999px;font:600 10px/1 var(--sans);letter-spacing:.03em}
