/* ComboCheck: tokens and layout. Desktop first; phone layout at the end. One typeface (IBM Plex Sans), inline SVG
   icons (public/js/icons.js), 12px cards, 6-8px buttons, fully round only for filter chips. No glows, no gradients. */
html{-webkit-text-size-adjust:100%;color-scheme:dark;scrollbar-color:#2f363e transparent}
html[data-theme=light]{color-scheme:light;scrollbar-color:#c3c9d1 transparent}
*{scrollbar-width:thin}
body{margin:0;background:var(--bg);color:var(--text);font-family:'IBM Plex Sans',system-ui,sans-serif;-webkit-font-smoothing:antialiased;font-size:13px;line-height:1.4}
body{--bg:#0e1113;--surface:#15191c;--surface2:#1b2024;--surface3:#232930;--border:rgba(255,255,255,.08);--border2:rgba(255,255,255,.16);--text:#e7eaed;--muted:#8e979f;--faint:#5c656d;--accent:#a06bff;--accent-bg:rgba(160,107,255,.18);--accent-ink:#14082b;--pos:#3ddc97;--pos-bg:rgba(61,220,151,.14);--warn:#ffb347;--warn-bg:rgba(255,179,71,.14);--bad:#ff6b8a;--bad-bg:rgba(255,107,138,.14);--skel:rgba(255,255,255,.06);--scrim:rgba(0,0,0,.6)}
body[data-theme=light]{--bg:#f4f5f6;--surface:#ffffff;--surface2:#eef0f2;--surface3:#e3e6ea;--border:rgba(0,0,0,.08);--border2:rgba(0,0,0,.18);--text:#15191c;--muted:#5c656d;--faint:#9aa3ab;--accent:#7a3cff;--accent-bg:rgba(122,60,255,.12);--accent-ink:#ffffff;--pos:#12a06a;--pos-bg:rgba(18,160,106,.12);--warn:#c07800;--warn-bg:rgba(192,120,0,.12);--bad:#e0365e;--bad-bg:rgba(224,54,94,.12);--skel:rgba(0,0,0,.06);--scrim:rgba(20,24,28,.4)}
*{box-sizing:border-box}
a{color:var(--accent)}
input,button{font-family:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.num{font-variant-numeric:tabular-nums}
.r{text-align:right}
.muted{color:var(--muted)}
.faint{color:var(--faint)}
.pretty{text-wrap:pretty}
.ic{flex:none;display:inline-block;vertical-align:-.18em}
.ic.arrow{margin-right:3px;vertical-align:.02em}
.label{font-size:12px;font-weight:500;color:var(--muted)}
@keyframes cc-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@keyframes cc-shimmer{0%{opacity:.6}50%{opacity:1}100%{opacity:.6}}

.shell{min-height:100vh;display:flex;flex-direction:column}
.spacer{flex:1}
.page{flex:1;max-width:1440px;min-width:1280px;width:100%;margin:0 auto;padding:24px 24px 40px}
.footer{border-top:1px solid var(--border);color:var(--faint);font-size:12px;padding:16px 24px;text-align:center}

/* top bar */
.topbar{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:1px solid var(--border)}
.topbar-in{max-width:1440px;min-width:1280px;margin:0 auto;height:52px;padding:0 24px;display:flex;align-items:center;gap:28px}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--text);font-weight:600;font-size:15px;letter-spacing:-.01em}
.brand-mark{position:relative;width:20px;height:20px;display:inline-block}
.brand-mark i:first-child{position:absolute;left:0;top:0;width:12px;height:12px;border-radius:3px;background:var(--accent)}
.brand-mark i:last-child{position:absolute;right:0;bottom:0;width:12px;height:12px;border-radius:3px;border:2px solid var(--text);background:var(--bg)}
.nav{display:flex;gap:4px;height:100%}
.nav button{all:unset;cursor:pointer;display:flex;align-items:center;padding:0 12px;height:52px;font-size:13.5px;font-weight:500;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px}
.nav button:hover{color:var(--text)}
.nav button[aria-current=page]{color:var(--text);border-bottom-color:var(--accent)}
.nav-count{display:inline-flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 5px;
  margin-left:5px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:11px;font-weight:600}
.ghost-btn{all:unset;cursor:pointer;font-size:12.5px;color:var(--muted);padding:6px 8px;border-radius:6px}
.ghost-btn:hover{color:var(--text);background:var(--surface2)}
.icon-btn{all:unset;cursor:pointer;flex:none;width:30px;height:30px;display:inline-flex;align-items:center;
  justify-content:center;border-radius:7px;border:1px solid var(--border2);color:var(--muted)}
.icon-btn:hover{color:var(--text);background:var(--surface2)}
.icon-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.status{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--muted);white-space:nowrap}
.status .dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--faint);animation:cc-pulse 1.2s ease-in-out infinite}
.status.live .dot{background:var(--pos);animation:none}
.status.stale{color:var(--warn)}
.status.stale .dot{background:var(--warn);animation:none}

/* shared surfaces */
.card{border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.card.clip{overflow:hidden}
.sec-title{margin:0;font-size:14px;font-weight:600}
h1.page-title{margin:0;font-size:20px;font-weight:600;letter-spacing:-.01em}
.page-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.skel{background:var(--skel);border-radius:6px}
.shimmer{animation:cc-shimmer 1.4s ease-in-out infinite}
.empty-box{padding:18px 12px;border:1px dashed var(--border2);border-radius:8px;text-align:center;color:var(--muted)}
.note{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border-radius:6px;font-size:12.5px}
.note.warn{background:var(--warn-bg)}
.note.plain{background:var(--surface2);border:1px solid var(--border);color:var(--muted)}
.note .note-ic{margin-top:1px;color:var(--warn)}
.note.plain .note-ic{color:var(--muted)}
.live-badge{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:600;letter-spacing:.06em;color:var(--bad);border:1px solid var(--bad);border-radius:4px;padding:1px 5px}
.live-badge i{width:5px;height:5px;border-radius:50%;background:var(--bad);animation:cc-pulse 1.6s ease-in-out infinite}
.side-tag{flex:none;display:inline-flex;justify-content:center;align-items:center;height:22px;padding:0 6px;border-radius:5px;font-size:11.5px;font-weight:600;background:var(--surface3);color:var(--text);white-space:nowrap}
.side-tag.yes{background:var(--pos-bg);color:var(--pos)}
.side-tag.win{background:var(--accent-bg);color:var(--accent)}

/* build & check */
.build{flex:1;max-width:1440px;min-width:1280px;width:100%;margin:0 auto;padding:20px 24px 40px;display:grid;grid-template-columns:200px minmax(0,1fr) 380px;gap:24px;align-items:start}
.rail{display:flex;flex-direction:column;gap:18px;position:sticky;top:72px}
.search-wrap{position:relative}
.search-wrap input{width:100%;height:34px;padding:0 34px 0 10px;border-radius:7px;border:1px solid var(--border2);background:var(--surface);color:var(--text);font-size:13px;outline:none}
.search-wrap input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.search-wrap kbd{position:absolute;right:8px;top:8px;height:18px;min-width:18px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;border-radius:4px;border:1px solid var(--border2);color:var(--muted);font-family:inherit;font-size:11px}
.rail-group{display:flex;flex-direction:column;gap:6px}
.sport-btn{all:unset;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:8px;height:30px;padding:0 8px;border-radius:6px;color:var(--muted)}
.sport-btn:hover{background:var(--surface2)}
.sport-btn[aria-pressed=true]{background:var(--surface2);color:var(--text);font-weight:600}
.rail-more{display:contents}
/* sports, then esports under their own divider */
.rail-divider{display:flex;align-items:center;gap:8px;margin:8px 8px 2px;font-size:12px;font-weight:500;color:var(--muted)}
.rail-divider::after{content:"";flex:1;height:1px;background:var(--border)}
.chip-divider{flex:none;display:inline-flex;align-items:center;height:28px;margin-left:6px;padding-left:12px;
  border-left:1px solid var(--border2);font-size:12px;font-weight:500;color:var(--muted)}
.filters-btn{display:none}
.seg{display:flex;gap:4px;padding:0 4px}
.seg button{all:unset;cursor:pointer;flex:1;text-align:center;height:28px;line-height:28px;border-radius:6px;font-size:12px;border:1px solid var(--border);color:var(--muted)}
.seg button:hover{border-color:var(--border2)}
.seg button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-bg);color:var(--text)}
.spread-custom{display:flex;align-items:center;gap:6px;padding:0 4px;font-size:12px}
.spread-custom input{width:100%;min-width:0;height:28px;padding:0 8px;border-radius:6px;border:1px solid var(--border);
  background:var(--surface);color:var(--text);font-size:12px;font-variant-numeric:tabular-nums;outline:none}
.spread-custom input::placeholder{color:var(--faint)}
.spread-custom input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.spread-custom.on input{border-color:var(--accent);background:var(--accent-bg)}
.spread-custom span{color:var(--muted);font-size:12px;flex:none}
/* show-all: a real switch, not the words "on" and "off" */
.switch-row{all:unset;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:8px;height:30px;
  padding:0 8px;border-radius:6px;color:var(--muted)}
.switch-row:hover{background:var(--surface2);color:var(--text)}
.switch{position:relative;flex:none;width:28px;height:16px;border-radius:8px;background:var(--surface3);transition:background .15s ease}
.switch i{position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:var(--muted);transition:transform .15s ease,background .15s ease}
.switch-row[aria-checked=true]{color:var(--text)}
.switch-row[aria-checked=true] .switch{background:var(--accent)}
.switch-row[aria-checked=true] .switch i{transform:translateX(12px);background:var(--accent-ink)}
.linkish{all:unset;cursor:pointer;color:var(--accent);text-decoration:underline;text-underline-offset:3px}
/* first visit: what the page is for */
.intro{display:flex;gap:12px;align-items:flex-start;padding:12px 12px 12px 16px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.intro p{margin:0;flex:1;min-width:0;font-size:13.5px;line-height:1.5;color:var(--muted)}
.intro strong{color:var(--text);font-weight:600}

.markets{min-width:0;display:flex;flex-direction:column;gap:14px}
.markets-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:0 2px}
.markets-head h1{margin:0;font-size:16px;font-weight:600;letter-spacing:-.01em}
.mrow{display:grid;grid-template-columns:minmax(0,1fr) 168px 84px 84px;gap:12px;padding:0 14px;align-items:center;border-bottom:1px solid var(--border)}
.mrow .c{text-align:center}
.mrow.head{height:34px;font-size:12px;font-weight:500;color:var(--muted)}
.mrow.body{min-height:44px;padding-top:6px;padding-bottom:6px}
.mrow.body:hover{background:var(--surface2)}
.mrow > span.ellip{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mrow .q{all:unset;cursor:pointer;min-width:0;display:flex;flex-direction:column;gap:1px}
.mrow .q-main{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.mrow .q-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11.5px;color:var(--muted)}
.mrow .q:hover .q-main{color:var(--accent)}
/* the market cell: what it is on one line, how thin its book is underneath, so neither truncates the other */
.mkt{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.mkt-type{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mkt-book{font-size:11px;color:var(--warn);white-space:nowrap}
.game-head{display:flex;align-items:center;gap:10px;padding:0 14px;height:34px;background:var(--surface2);border-bottom:1px solid var(--border);font-weight:600;font-size:12.5px}
.game-head .muted{font-weight:400;font-size:12px}
.price-btn{all:unset;cursor:pointer;height:28px;border-radius:6px;text-align:center;padding:0 8px;font-variant-numeric:tabular-nums;font-weight:500;border:1px solid var(--border2);color:var(--text)}
.price-btn:hover{border-color:var(--accent)}
.price-btn[aria-pressed=true]{border-color:var(--accent);background:var(--accent);color:var(--accent-ink)}
.price-btn:disabled{cursor:default;border-color:transparent;color:var(--faint)}

.cat-row{all:unset;cursor:pointer;display:flex;align-items:center;gap:8px;height:34px;padding:0 14px;width:100%;
  box-sizing:border-box;border-bottom:1px solid var(--border);font-size:12.5px;color:var(--muted)}
.cat-row:hover{background:var(--surface2);color:var(--text)}
.cat-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.cat-row .chev{transition:transform .15s ease}
.cat-row[aria-expanded=true]{color:var(--text)}
.cat-row[aria-expanded=true] .chev{transform:rotate(90deg)}
.cat-row .cat-label{font-weight:500}
.cat-row .cat-count{font-variant-numeric:tabular-nums;font-size:11px;padding:1px 7px;border-radius:999px;background:var(--surface3)}
.cat-row .cat-hint{color:var(--faint);font-size:11.5px}
.cat-row .cat-picked{margin-left:auto;color:var(--accent);font-size:11.5px;font-weight:500}
.cat-body{border-left:2px solid var(--accent-bg)}
.cat-body .mrow.body{padding-left:26px}
@media (prefers-reduced-motion: reduce){.cat-row .chev{transition:none}}
.popular{display:flex;align-items:center;gap:12px;min-width:0}
/* the strip's label explains itself on hover or tap, like the result card's rows */
.popular-label{position:relative;flex:none}
.tip-label{all:unset;cursor:help;display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;color:var(--muted)}
.tip-label:hover,.tip-label[aria-describedby^=tip]{color:var(--text)}
.tip-label:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.popular-label .tip{top:calc(100% + 6px);bottom:auto;width:280px}
.popular-scroll{display:flex;gap:6px;overflow-x:auto;min-width:0;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(to right,#000 90%,transparent);mask-image:linear-gradient(to right,#000 90%,transparent)}
.popular-scroll::-webkit-scrollbar{display:none}          /* it scrolls sideways by drag or wheel; the bar was noise */
.rail-group.sports,.chip-group{scrollbar-width:none}   /* same for the chip rows that scroll sideways on narrow screens */
.rail-group.sports::-webkit-scrollbar,.chip-group::-webkit-scrollbar{display:none}
.popleg{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 9px 0 5px;border-radius:7px;
  background:var(--surface);border:1px solid var(--border);font-size:12px;white-space:nowrap;max-width:300px;flex:none}
.popleg .side-tag{height:20px;font-size:10.5px}
.popleg:hover{border-color:var(--accent)}
.popleg[aria-pressed=true]{border-color:var(--accent);background:var(--accent-bg)}
.popleg .ellip{min-width:0;overflow:hidden;text-overflow:ellipsis}

/* most placed combos */
.combos{display:flex;flex-direction:column}
.combos-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;padding:12px 14px 10px}
.combo-row{all:unset;cursor:pointer;display:flex;align-items:center;gap:12px;min-width:0;padding:8px 14px;
  border-top:1px solid var(--border)}
.combo-row:hover{background:var(--surface2)}
.combo-row:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.combo-legs{flex:1;min-width:0;display:flex;align-items:center;gap:6px;overflow:hidden}
.cleg{display:inline-flex;align-items:center;gap:5px;min-width:0;font-size:12.5px}
.cleg .side-tag{height:18px;font-size:10.5px;flex:none}
.combo-legs .plus{font-style:normal;color:var(--faint);flex:none}
.combo-meta{flex:none;display:flex;align-items:center;gap:10px;font-size:12px;font-variant-numeric:tabular-nums}
.combo-n{font-weight:600}
.combo-load{color:var(--accent);font-weight:600}
.combo-row[aria-pressed=true] .combo-load{color:var(--pos)}
.combos-list{max-height:calc(5 * 35px + 14px);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}   /* five in view, scroll to ten */
/* a <button> sizes to its content unless told otherwise, and all:unset drops border-box: without these a long
   combo pushed its own price and Load button off the card */
.combos-list .combo-row{box-sizing:border-box;width:100%}
.combos-list:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.combo-rank{flex:none;width:18px;color:var(--faint);font-size:12px;text-align:right}

/* slip + quote */
.slip-col{position:sticky;top:72px;display:flex;flex-direction:column;gap:14px;max-height:calc(100vh - 92px);overflow:auto;padding-right:2px}
.slip{padding:14px 16px 16px;display:flex;flex-direction:column;gap:12px}
.slip-head{display:flex;justify-content:space-between;align-items:center}
.leg{display:grid;grid-template-columns:minmax(40px,auto) minmax(0,1fr) auto 24px;gap:10px;align-items:center;padding:8px 10px;border-radius:7px;background:var(--surface2);border:1px solid transparent}
.leg.same-game{border-color:var(--warn)}
.leg .q{all:unset;cursor:pointer;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.leg .q:hover{color:var(--accent)}
.leg .sub{font-size:11.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.leg .x{all:unset;cursor:pointer;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border-radius:5px;color:var(--muted);font-size:15px}
.leg .x:hover{background:var(--surface3);color:var(--text)}
.kv{display:flex;justify-content:space-between;align-items:baseline;padding:0 2px;font-variant-numeric:tabular-nums}
.quote-box{border-top:1px solid var(--border);padding-top:12px;display:flex;flex-direction:column;gap:8px}
.quote-row{display:flex;gap:8px}
.quote-input{position:relative;flex:1}
.quote-input input{width:100%;height:38px;padding:0 28px 0 12px;border-radius:7px;border:1px solid var(--border2);background:var(--bg);color:var(--text);font-size:16px;font-weight:600;font-variant-numeric:tabular-nums;text-align:right;outline:none}
.quote-input input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-bg)}
.quote-input span{position:absolute;right:11px;top:9px;font-size:15px;color:var(--muted)}
.fetch-btn{all:unset;height:38px;padding:0 14px;border-radius:7px;font-weight:600;font-size:13px;white-space:nowrap;background:var(--surface2);color:var(--muted);border:1px solid var(--border);display:inline-flex;align-items:center;gap:8px;cursor:not-allowed}
.soon{font-size:11px;font-weight:500;padding:1px 6px;border-radius:4px;border:1px solid var(--border2);color:var(--muted)}
/* On a phone the slip is a bottom sheet; these three only exist there (see the phone block at the end). */
.slip-bar,.sheet-x,.sheet-scrim{display:none}

/* result card */
.result{padding:18px 18px 16px;display:flex;flex-direction:column;gap:14px}
.result-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.badge{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:6px;font-weight:600;font-size:13px;border:1px solid transparent;white-space:nowrap}
.badge.great,.badge.good{background:var(--pos-bg);color:var(--pos)}
.badge.typical{border-color:var(--border2);color:var(--text)}
.badge.below_average{background:var(--warn-bg);color:var(--warn)}
.badge.poor{background:var(--bad-bg);color:var(--bad)}
.badge.unknown{border-color:var(--border2);color:var(--muted)}
.headline{font-size:16px;line-height:1.4;font-weight:400;font-variant-numeric:tabular-nums}
.headline strong{font-weight:600}
.margin-line{display:flex;align-items:center;font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.rows .row .val{display:inline-flex;align-items:center}
.rows{display:flex;flex-direction:column;border-top:1px solid var(--border)}
.rows .row{position:relative;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:7px 0;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums}
.rows .row button{all:unset;cursor:help;color:var(--muted);text-decoration:underline dotted var(--faint);text-underline-offset:3px}
.tip{position:absolute;left:0;bottom:calc(100% + 6px);z-index:5;max-width:280px;padding:8px 10px;border-radius:6px;background:var(--text);color:var(--bg);font-size:12px;line-height:1.4;box-shadow:0 6px 20px rgba(0,0,0,.25)}
.strip{display:flex;flex-direction:column;gap:8px}
.strip .track{position:relative;height:30px}
.strip .base{position:absolute;left:0;right:0;top:13px;height:4px;border-radius:2px;background:var(--border2)}
.strip .band{position:absolute;top:9px;height:12px;border-radius:3px;background:var(--accent);opacity:.35}
.strip .median{position:absolute;top:5px;width:2px;height:20px;background:var(--accent)}
.strip .marker{position:absolute;top:2px;width:12px;height:26px;margin-left:-6px;border-radius:3px;background:var(--surface);border:2px solid var(--warn)}
.strip .legend{display:flex;justify-content:space-between;gap:10px;font-size:11.5px;color:var(--muted)}
.strip .legend .sw{display:inline-block;width:8px;height:8px;border-radius:2px;background:var(--accent);opacity:.5;margin-right:5px;vertical-align:middle}
.strip .legend .tick{display:inline-block;width:2px;height:10px;background:var(--accent);margin:0 5px;vertical-align:middle}
.strip .legend .box{display:inline-block;width:8px;height:12px;border-radius:2px;border:2px solid currentColor}
.assume{margin:0;font-size:11.5px;line-height:1.45;color:var(--muted);padding-left:10px;border-left:2px solid var(--border2)}
.tips{display:flex;flex-direction:column;gap:6px;padding-top:2px}
.tips .tip-line{display:flex;gap:8px;align-items:flex-start;font-size:12.5px}
.tips .tip-line .ic{color:var(--accent);margin-top:1px}

/* drawer */
.scrim{position:fixed;inset:0;z-index:40;background:var(--scrim)}   /* above the phone's slip sheet (32) */
.drawer{position:fixed;top:0;right:0;bottom:0;z-index:41;width:520px;background:var(--surface);border-left:1px solid var(--border);box-shadow:-20px 0 60px rgba(0,0,0,.3);display:flex;flex-direction:column;overflow:auto}
.drawer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 24px 0}
.drawer-head h2{margin:0;font-size:20px;font-weight:600;letter-spacing:-.01em}
.drawer-head .x{all:unset;cursor:pointer;width:30px;height:30px;flex:none;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;color:var(--muted)}
.drawer-head .x:hover{background:var(--surface2);color:var(--text)}
.tiles3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;padding:18px 24px 0}
.tile{min-width:0;padding:12px 14px;border-radius:8px;background:var(--surface2);display:flex;flex-direction:column;gap:2px}
.tile .v{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}
.drawer-sec{padding:22px 24px 0;display:flex;flex-direction:column;gap:8px}
.drawer-sec:last-child{padding-bottom:24px}
.drawer:focus{outline:none}
.chart{display:block;width:100%;height:auto;cursor:crosshair;overflow:visible}
.dtrow{display:grid;grid-template-columns:minmax(0,1fr) 40px 60px 60px 72px 60px;gap:10px;padding:0 12px;align-items:center;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums}
.dtrow.head{height:30px;font-size:12px;font-weight:500;color:var(--muted)}
.dtrow.body{min-height:40px;padding-top:6px;padding-bottom:6px}
.dtrow .others{min-width:0;font-size:12px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dtrow.body:hover{background:var(--surface2)}
.ellip{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* add one leg to the slip from its detail */
.slip-action{display:flex;flex-direction:column;gap:6px}
.add-leg{all:unset;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;height:36px;border-radius:8px;font-weight:600;
  font-size:13.5px;background:var(--accent);color:var(--accent-ink)}
.add-leg:hover{filter:brightness(1.08)}
.add-leg:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.add-leg.on{background:var(--pos-bg);color:var(--pos)}
.add-leg:disabled{cursor:default;background:var(--surface2);color:var(--faint)}

/* market heatmap */
.stack{display:flex;flex-direction:column;gap:24px}
.lead{margin:0;max-width:980px;font-size:16px;line-height:1.6;color:var(--muted)}
.lead strong{font-weight:600;font-variant-numeric:tabular-nums}
.pulse-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:24px;align-items:start}
.panel{border:1px solid var(--border);border-radius:12px;background:var(--surface);padding:16px 18px 18px;display:flex;flex-direction:column;gap:14px}
.toggle{display:flex;gap:2px;padding:2px;border-radius:7px;background:var(--surface2)}
.toggle button{all:unset;cursor:pointer;height:26px;padding:0 12px;border-radius:5px;font-size:12px;font-weight:500;color:var(--muted)}
.toggle button[aria-pressed=true]{background:var(--surface);color:var(--text)}
.heat{display:grid;grid-template-columns:96px repeat(5,minmax(0,1fr));gap:4px}
.heat .cell{height:52px;border-radius:6px;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;padding:0 10px;font-variant-numeric:tabular-nums;border:1px solid transparent}
.heat .cell .v{font-weight:600;font-size:14px}
.heat .cell .n{font-size:11px;opacity:.75}
.heat .rowlab{display:flex;align-items:center;font-weight:500}
.heat-legend{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--muted)}
.heat-legend .ramp{flex:1;max-width:220px;height:8px;border-radius:4px;background:linear-gradient(90deg,var(--pos-bg),var(--surface2) 25%,var(--warn) 60%,var(--bad))}
.btrow{display:grid;grid-template-columns:minmax(0,1fr) 40px 62px 62px 80px 58px;gap:10px;padding:0 18px;align-items:center;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums}
.btrow.head{height:32px;border-top:1px solid var(--border)}
.btrow.body{min-height:48px;padding-top:8px;padding-bottom:8px}
.best-legs{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;min-width:0}
.best-legs .cleg{max-width:100%}
.best-legs .plus{font-style:normal;color:var(--faint)}
.btrow.body:hover{background:var(--surface2)}
.sort-btn{all:unset;cursor:pointer;display:flex;align-items:center;gap:4px;font-size:12px;font-weight:500;color:var(--muted);height:100%}
.sort-btn:hover{color:var(--text)}
.sort-btn.on{color:var(--text)}


/* recent combos */
.chips{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.chip-group{display:flex;align-items:center;gap:6px}
.chip{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border-radius:999px;font-size:12px;border:1px solid var(--border);color:var(--muted)}
.chip:hover{border-color:var(--border2);color:var(--text)}
.chip[aria-pressed=true]{border-color:var(--accent);background:var(--accent-bg);color:var(--text)}
.legchips{min-width:0;display:flex;flex-wrap:wrap;gap:4px}
.legchip{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 8px 0 3px;border-radius:5px;background:var(--surface2);border:1px solid var(--border);font-size:12px;max-width:300px}
.legchip:hover{border-color:var(--accent)}
.legchip .side-tag{height:17px;padding:0 5px;border-radius:3px;font-size:10.5px}
.legchip .q{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.center-msg{padding:40px 20px;text-align:center;color:var(--muted)}

/* live tape */
.tape{display:flex;flex-direction:column;gap:18px}
.tape-body{font-size:12.5px}
.tprow{display:grid;grid-template-columns:62px 78px minmax(0,1fr) 58px 58px 70px 30px;gap:10px;
  padding:0 18px;align-items:center;border-bottom:1px solid var(--border);font-variant-numeric:tabular-nums}
.tprow.body{height:34px}
.tprow.body:hover{background:var(--surface2)}
.tprow.fresh{animation:cc-print 1.6s ease-out}
@keyframes cc-print{0%{background:var(--accent-bg)}100%{background:transparent}}

.tprow .px{font-weight:600}
.tprow .mg{font-weight:600}
.tprow .ph{color:var(--muted);font-size:11.5px;line-height:1.25}
.tprow .ph .sg{display:block}
.tprow.body.legs{height:auto;padding-top:7px;padding-bottom:7px}
.tprow .legchips{min-width:0}
.tcopy{all:unset;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;
  border-radius:6px;color:var(--muted)}
.tcopy:hover{background:var(--surface3);color:var(--accent)}
.tcopy:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.tcopy:disabled{cursor:default;opacity:.25}
.tape-controls{margin-top:-8px}
.tape-foot{display:flex;justify-content:center}
.ghost-btn.more{border:1px solid var(--border2);border-radius:7px;padding:7px 16px;font-size:12.5px}
.tape-legend{font-size:11.5px}
.chip.pause{font-variant-numeric:tabular-nums}
.tprow.fresh{animation-duration:2.2s}

/* deal score + share */
.score-headline{display:flex;gap:16px;align-items:center}
.score-dial{position:relative;flex:none;width:104px;display:flex;flex-direction:column;align-items:center}
.score-dial .gauge{display:block}
.gauge-fill{transition:stroke-dasharray .5s ease}
.score-num{position:absolute;left:0;right:0;top:20px;text-align:center;font-size:30px;font-weight:600;
  font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.score-cap{margin-top:-2px;font-size:11.5px;color:var(--muted)}
.share-row{display:flex;align-items:center;gap:8px;border-top:1px solid var(--border);padding-top:12px}
.share-btn{all:unset;cursor:pointer;height:30px;padding:0 12px;border-radius:7px;font-size:12.5px;font-weight:600;
  background:var(--accent);color:var(--accent-ink);border:1px solid var(--accent)}
.share-btn.ghost{background:transparent;color:var(--muted);border-color:var(--border2);font-weight:500}
.share-btn:hover{filter:brightness(1.08)}
.share-btn.ghost:hover{color:var(--text)}

/* ---------- a little motion, nothing decorative ---------- */
.price-btn:active{transform:scale(.96)}
@media (prefers-reduced-motion: reduce){
  .gauge-fill,.switch,.switch i{transition:none}
  .live-badge i,.status .dot,.shimmer{animation:none}
}

/* ---------- narrow desktop and tablet: drop the fixed minimum, fold the filter rail into a strip ---------- */
@media (max-width:1279px){
  .page,.build,.topbar-in{min-width:0}
  .build{grid-template-columns:minmax(0,1fr) 340px;gap:18px;padding:16px 20px 32px}
  .rail{grid-column:1 / -1;position:static;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 12px}
  .rail .search-wrap{flex:1 1 220px;max-width:380px}
  .rail .label{padding:0 !important;flex:none}
  .rail-group{flex-direction:row;align-items:center;gap:6px;min-width:0}
  .rail-group.sports{flex:1 1 100%;order:2;overflow-x:auto;padding-bottom:2px}
  .rail-group.sports .label{display:none}
  .rail-divider{flex:none;margin:0 0 0 4px;padding-left:12px;height:28px;border-left:1px solid var(--border2)}
  .rail-divider::after{display:none}
  .sport-btn{flex:none;height:28px;padding:0 10px;gap:6px;white-space:nowrap;border:1px solid var(--border);border-radius:999px}
  .rail > .faint{order:3;margin-left:auto}
  .seg{padding:0}
  /* the filters share one wrapping row here: buttons keep their text width instead of squeezing "Pre-game" onto two lines */
  .seg button{flex:none;padding:0 10px;white-space:nowrap}
  .spread-custom input{width:70px;flex:none}
  .slip-col{top:64px;max-height:calc(100vh - 84px)}
}

/* ---------- phone: one column, tabs that scroll, the slip as a bottom sheet ---------- */
@media (max-width:900px){
  /* top bar: brand and controls on one line, screen tabs scrolling underneath */
  .topbar-in{flex-wrap:wrap;height:auto;padding:8px 16px;gap:8px}
  .spacer{display:none}
  .brand{order:1}
  #fresh{order:2;margin-left:auto;min-width:0}
  #fresh .status-text{overflow:hidden;text-overflow:ellipsis}
  #theme-btn{order:3}
  .nav{order:5;width:100%;height:auto;overflow-x:auto;overflow-y:hidden;gap:2px}   /* y: the tabs' -1px underline margin overflowed by 1px and drew a scrollbar */
  .nav button{flex:none;height:38px;padding:0 10px}

  /* one column everywhere, with room at the bottom for the slip bar */
  /* align-items:start from the desktop rule would size each column to its content, not the screen */
  .build{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:12px 16px 86px}
  .rail,.markets{min-width:0;width:100%}
  .page{padding:16px 16px 40px}
  .footer{padding:16px 16px 76px}
  .markets{gap:10px}
  .markets-head h1{font-size:15px}
  .page-head{flex-direction:column;align-items:flex-start;gap:3px}
  .page-head .page-title{font-size:18px}
  .rail .search-wrap input{font-size:16px}       /* under 16px iOS zooms the page on focus */
  .seg{flex:none}
  /* the secondary filters are a disclosure here: they were taking half the screen above the markets */
  .filters-btn{all:unset;cursor:pointer;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;
    border:1px solid var(--border2);border-radius:999px;font-size:12.5px;color:var(--muted);white-space:nowrap}
  .filters-btn[aria-expanded=true]{color:var(--text);border-color:var(--accent)}
  .filters-btn .chev{transition:transform .15s ease;margin-left:-2px}
  .filters-btn[aria-expanded=true] .chev{transform:rotate(90deg)}
  .rail-more{display:none;flex:1 0 100%;flex-wrap:wrap;align-items:center;gap:8px 12px}
  body[data-filters=open] .rail-more{display:flex}
  .seg button{flex:none;padding:0 10px}          /* content width, so "Pre-game" is not clipped */
  .search-wrap kbd{display:none}

  /* a market becomes two lines: what it is, then its type and both prices */
  .mrow.head{display:none}
  .mrow.body{height:auto;grid-template-columns:minmax(0,1fr) 64px 64px;gap:5px 8px;padding:9px 12px}
  .mrow.body > .q{grid-column:1 / -1}
  .mrow .q-main,.mrow .q-sub{white-space:normal;text-overflow:clip;line-height:1.35}
  .cat-body .mrow.body{padding-left:18px}
  .price-btn{height:32px;padding:0 6px}
  .game-head{height:auto;min-height:36px;padding:7px 12px;flex-wrap:wrap;gap:4px 8px;line-height:1.3}
  .cat-row{height:38px;padding:0 12px}
  .popular{flex-wrap:wrap;gap:6px}
  .popular > .popular-label{flex:1 0 100%}
  .popleg{max-width:78vw}
  .combos-head{flex-direction:column;align-items:flex-start;gap:2px;padding:10px 12px 8px}
  /* one line per leg so five combos fit without taking the whole screen */
  .combo-row{flex-direction:column;align-items:stretch;gap:4px;padding:8px 12px 8px 10px}
  .combo-rank{display:none}
  .combo-legs{flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:3px;overflow:visible}
  .combo-legs .plus{display:none}
  .cleg{min-width:0;max-width:100%;font-size:12px}
  .cleg .ellip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .combo-load{margin-left:auto}
  .combos-list{max-height:calc(5 * 82px + 18px)}

  /* the slip: a bar that is always visible, opening into a sheet */
  .slip-bar{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;position:fixed;left:0;right:0;bottom:0;
    z-index:30;height:calc(56px + env(safe-area-inset-bottom));padding:0 16px env(safe-area-inset-bottom);
    background:var(--surface);border-top:1px solid var(--border2);color:var(--text);font-size:13.5px;cursor:pointer}
  .slip-bar .slip-bar-n{font-weight:600;flex:none}
  .slip-bar .slip-bar-fair{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .slip-bar .slip-bar-cta{margin-left:auto;flex:none;font-weight:600}
  body[data-slip=open] .slip-bar{display:none}
  body[data-slip=open]{overflow:hidden}
  .sheet-scrim{display:block;position:fixed;inset:0;z-index:31;background:var(--scrim)}
  .slip-col{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:32;max-height:84vh;overflow:auto;gap:10px;
    background:var(--bg);border-top:1px solid var(--border2);border-radius:16px 16px 0 0;
    padding:10px 12px calc(14px + env(safe-area-inset-bottom));box-shadow:0 -16px 40px rgba(0,0,0,.35);
    overscroll-behavior:contain;transform:translateY(101%);transition:transform .22s ease}
  body[data-slip=open] .slip-col{transform:none}
  .sheet-x{all:unset;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:none;
    border-radius:6px;color:var(--muted);font-size:20px;cursor:pointer}
  .slip{padding:12px}
  .leg .x{width:30px;height:30px}

  /* result card */
  .result{padding:14px}
  .headline{font-size:15px}
  .score-dial{width:88px}
  .score-dial .gauge{width:100%;height:auto}
  .score-num{top:16px;font-size:26px}
  .tip{max-width:min(280px,72vw)}

  /* wide tables collapse to two lines: what it is, then what it cost */
  .btrow.head,.dtrow.head{display:none}
  .btrow.body,.dtrow.body{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;height:auto;padding:10px 12px}
  .btrow.body > div:first-child,.dtrow.body > .others{flex:1 0 100%;min-width:0}
  .btrow.body > *:nth-child(2),.btrow.body > *:nth-child(4),
  .dtrow.body > *:nth-child(2),.dtrow.body > *:nth-child(4){display:none}
  .btrow.body > *:nth-child(6),.dtrow.body > *:nth-child(6){order:-1;margin-right:auto}
  .legchip{max-width:100%}

  /* market heatmap */
  .lead{font-size:14.5px}
  .pulse-grid{grid-template-columns:minmax(0,1fr);gap:16px}
  .panel{padding:14px;overflow-x:auto}
  .heat{grid-template-columns:62px repeat(5,minmax(46px,1fr));min-width:330px;gap:3px}
  .heat .cell{height:46px;padding:0 6px}
  .heat .cell .v{font-size:12.5px}
  .heat .cell .n{font-size:10px}
  .heat .rowlab{font-size:12px}
  .heat-legend{flex-wrap:wrap;gap:6px;font-size:10.5px}
  .chips{gap:8px}
  .chip-group{flex-wrap:nowrap;overflow-x:auto;max-width:100%}   /* one scrolling line each, not four wrapped rows */
  .chip-group > *{flex:none}
  /* the tape keeps time, price and margin on a phone; the legs take their own line */
  .tape-body{font-size:12px}
  .tape-body .tprow .ph .sg{display:inline}
  .tape-body .tprow .ph .sg::before{content:", "}
  .tape-body .tprow.body{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 8px;height:auto;padding:8px 12px}
  .tape-body .tprow .sport{display:none}
  .tape-body .tprow .legchips{flex:1 0 100%;order:2}
  .tape-body .tprow .px{order:3}
  .tape-body .tprow .mg{order:4}
  .tape-body .tprow .ph{order:5}
  .tape-body .tprow .tcopy{order:6;margin-left:auto}
  .chip.pause{margin-left:0}

  /* leg drawer: full width */
  .drawer{width:100%;border-left:0;box-shadow:none}
  .drawer-head{padding:16px 16px 0}
  .drawer-head h2{font-size:17px}
  .tiles3{padding:14px 16px 0;gap:8px}
  .tile{padding:10px 12px}
  .tile .v{font-size:18px}
  .drawer-sec{padding:18px 16px 0}
  .drawer-sec:last-child{padding-bottom:20px}
  .dtrow{padding:0 12px}
}

/* narrow phones: the three tab names plus the slip count are wider than 360px at the tablet padding */
@media (max-width:400px){
  .nav{gap:0}
  .nav button{padding:0 7px;font-size:12.5px}
  .nav-count{margin-left:3px}
}
@media (max-width:340px){
  .nav button{padding:0 5px;font-size:12px}
}
