:root {
  --bg: #f6f7f9; --panel: #ffffff; --ink: #1b1f24; --muted: #5d6673; --line: #e2e5ea;
  --accent: #2f6fde; --accent-ink: #ffffff; --row-hover: #f0f4fb;
  --buy: #127a45; --sell: #b3362c; --live: #d4372c;
  --tag-mm-bg: #ece9f8; --tag-mm: #5b47b0;
  --tag-whale-bg: #e5eef9; --tag-whale: #2559a8;
  --tag-infra-bg: #eceff2; --tag-infra: #4f5966;
  --tag-warn-bg: #fff2d6; --tag-warn: #8a5a00;
  --dim: 0.45;
  --fresh-bg: #e6f6ea; --fresh: #17713a;
  --spec-bg: #fff1c7; --spec: #7a5600; --spec-line: #e0a800;
  --big-bg: #ffe4d6; --big: #a33d0b; --big-line: #e8642a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --panel: #191d23; --ink: #e5e8ec; --muted: #9aa3ae; --line: #2a3038;
    --accent: #5a92f0; --accent-ink: #0b0e12; --row-hover: #1f252d;
    --buy: #4cc283; --sell: #ef7a70; --live: #ff6b5f;
    --tag-mm-bg: #2c2645; --tag-mm: #b8a9f5;
    --tag-whale-bg: #1d2c42; --tag-whale: #8cb7f2;
    --tag-infra-bg: #262b31; --tag-infra: #aab3bd;
    --tag-warn-bg: #3a2e12; --tag-warn: #f0c060;
    --fresh-bg: #15301f; --fresh: #7fdc9f;
    --spec-bg: #3a3010; --spec: #f5cf5a; --spec-line: #d9a90f;
    --big-bg: #3d2114; --big: #ffa070; --big-line: #e8642a;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 20px; background: var(--panel);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; color: var(--ink); }
.top nav { display: flex; gap: 16px; }
.clock { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
main { padding: 18px 20px 60px; max-width: 1500px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 18px 0 8px; }
.sub { color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 12px; }
.toolbar label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.toolbar input[type=number] { width: 90px; }
input, select, button { font: inherit; color: inherit; }
input[type=number], input[type=text], select { background: var(--bg); border: 1px solid var(--line);
  border-radius: 5px; padding: 4px 6px; }
button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 5px; padding: 6px 12px;
  cursor: pointer; font-weight: 600; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
button:disabled { opacity: 0.5; cursor: default; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600;
  position: sticky; top: 46px; background: var(--panel); z-index: 1; }
th.sortable { cursor: pointer; }
tbody tr:hover { background: var(--row-hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap { white-space: nowrap; }
.wallet { white-space: nowrap; }
.dotted { border-bottom: 1px dotted var(--muted); cursor: help; }
table.compact td.time { white-space: normal; min-width: 110px; }
.rel { color: var(--ink); opacity: .8; }
td.time { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.buy { color: var(--buy); font-weight: 600; }
.sell { color: var(--sell); font-weight: 600; }
.live { color: var(--live); font-weight: 700; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 10px;
  margin: 0 4px 2px 0; white-space: nowrap; }
.tag.mm { background: var(--tag-mm-bg); color: var(--tag-mm); }
.tag.whale { background: var(--tag-whale-bg); color: var(--tag-whale); }
.tag.infra { background: var(--tag-infra-bg); color: var(--tag-infra); }
.tag.warn { background: var(--tag-warn-bg); color: var(--tag-warn); }
tr.dim td { opacity: var(--dim); }
.tag.fresh { background: var(--fresh-bg); color: var(--fresh); }
.tag.spec { background: var(--spec-bg); color: var(--spec); border: 1px solid var(--spec-line); }
.tag.spec-dim { background: transparent; color: var(--spec); border: 1px dashed var(--spec-line); }
.tag.big { background: var(--big-bg); color: var(--big); }
.tag.flip { background: transparent; color: var(--muted); border: 1px dashed var(--muted); }
.tag.combo { background: var(--tag-mm-bg); color: var(--tag-mm); border: 1px solid var(--tag-mm); }
.tag.filler { background: var(--live); color: #fff; }
tr.r-filler td:first-child { box-shadow: inset 4px 0 0 var(--live); }
tr.r-fresh td { background: var(--fresh-bg); }
tr.r-spec td:first-child { box-shadow: inset 4px 0 0 var(--spec-line); }
tr.r-big td:first-child { box-shadow: inset 4px 0 0 var(--big-line); }
tr.r-spec.r-big td:first-child { box-shadow: inset 4px 0 0 var(--spec-line), inset 8px 0 0 var(--big-line); }
@keyframes newrow { from { background: var(--tag-whale-bg); } to { background: transparent; } }
tr.r-new td { animation: newrow 4s ease-out; }
/* Order picked from the odds chart: outlined, with a brief flash when it's scrolled to. */
@keyframes focusrow { from { background: var(--tag-whale-bg); } to { background: transparent; } }
tr.r-flash td { animation: focusrow 2.5s ease-out; }
tr.r-focus td { border-top: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
tr.r-focus td:first-child { border-left: 2px solid var(--accent); }
tr.r-focus td:last-child { border-right: 2px solid var(--accent); }
.ctip .tip-hint { margin-top: 4px; color: var(--accent); }

/* Top positions: "where the money is" per-match bars */
.tb { padding: 10px 12px 6px; }
.tb-head { font-weight: 600; margin-bottom: 8px; }
.tb-row { display: grid; grid-template-columns: minmax(180px, 2fr) 3fr minmax(150px, auto); gap: 12px; align-items: center; padding: 4px 0; }
.tb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-bar { height: 10px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.tb-bar span { display: block; height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.tb-val { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .tb-row { grid-template-columns: 1fr auto; } .tb-bar { grid-column: 1 / -1; order: 3; } }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--live); color: #fff;
  font-size: 11px; font-weight: 700; text-align: center; line-height: 17px; margin-left: 3px; }
.badge[hidden] { display: none; }
tr.r-unseen td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
tr.r-unseen td { font-weight: 500; }
/* ---- odds chart: two categorical series (validated reference palette slots 1-2) ---- */
:root { --series-1: #2a78d6; --series-2: #eb6834; --chart-surface: var(--panel); }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --series-2: #d95926; } }
.odds { margin: 12px 0 0; padding: 10px 14px 8px; }
.odds-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.segs { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg { background: transparent; color: var(--muted); border: 0; border-radius: 0; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.seg.on { background: var(--accent); color: var(--accent-ink); }
.heroes { display: flex; gap: 28px; flex-wrap: wrap; margin: 8px 0 2px; }
.hero { display: flex; align-items: baseline; gap: 8px; }
.hero b { font-size: 26px; font-variant-numeric: tabular-nums; }
.hname { font-weight: 600; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.sw.s1 { background: var(--series-1); } .sw.s2 { background: var(--series-2); }
.chart-wrap { position: relative; }
.oddsvg { width: 100%; height: auto; display: block; overflow: visible; }
.oddsvg .grid { stroke: var(--line); stroke-width: 1; }
.oddsvg .axis { fill: var(--muted); font-size: 11px; }
.oddsvg .endlbl { fill: var(--ink); font-size: 12px; font-weight: 600; }
.oddsvg .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.oddsvg .ln.s1, .oddsvg .dot.s1, .oddsvg .xdot.s1 { stroke: var(--series-1); }
.oddsvg .ln.s2, .oddsvg .dot.s2, .oddsvg .xdot.s2 { stroke: var(--series-2); }
.oddsvg .dot.s1, .oddsvg .xdot.s1 { fill: var(--series-1); } .oddsvg .dot.s2, .oddsvg .xdot.s2 { fill: var(--series-2); }
.oddsvg .xhair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.oddsvg .xdot { stroke: var(--chart-surface); stroke-width: 2; }
.oddsvg .hit { fill: transparent; }
.oddsvg .mk { stroke-width: 2; cursor: pointer; }
.oddsvg .mk.alert.s1 { fill: var(--series-1); stroke: var(--chart-surface); }
.oddsvg .mk.alert.s2 { fill: var(--series-2); stroke: var(--chart-surface); }
.oddsvg .mk.big { fill: var(--chart-surface); }
.oddsvg .mk.big.s1 { stroke: var(--series-1); } .oddsvg .mk.big.s2 { stroke: var(--series-2); }
.oddsvg .mk.muted { opacity: .35; }
.ctip { position: absolute; pointer-events: none; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 6px 9px; font-size: 12.5px; box-shadow: 0 4px 14px rgba(0,0,0,.25); max-width: 320px; z-index: 3; }
.ctip[hidden] { display: none; }
.chart-legend { padding: 4px 0 0; }
.mk-key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 10px; }
.mk-key:first-child { margin-left: 0; }
.mk-key.alert { background: var(--muted); }
.mk-key.big { border: 2px solid var(--muted); }
.mk-key.muted { background: var(--muted); opacity: .35; }
/* ---- Pinnacle ---- */
.tag.pin { background: #1f6f5c; color: #fff; letter-spacing: .03em; }
.tag.pin-sig { background: transparent; color: #2a9d80; border: 1px solid #2a9d80; }
.tag.early { background: #2a9d80; color: #fff; }
tr.r-pin td:first-child { box-shadow: inset 4px 0 0 #2a9d80; }
.suggest { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.suggest b { color: var(--ink); }
.pin-strip { margin: 10px 0 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.pin-strip summary { cursor: pointer; list-style: none; }
.pin-strip summary::-webkit-details-marker { display: none; }
.pin-move { padding: 8px 0 2px; border-top: 1px solid var(--line); margin-top: 8px; }
/* Linked accounts (same person, several wallets) */
.tag.linked { background: #fde8ef; color: #a3134a; border: 1px solid #d6336c; }
.tag.linked-dim { background: transparent; color: #c2255c; border: 1px dashed #d6336c; }
@media (prefers-color-scheme: dark) { .tag.linked { background: #3d1424; color: #f783ac; border-color: #e64980; } .tag.linked-dim { color: #f783ac; } }
.tag.linked[data-linked] { cursor: help; }
/* Rows of a wallet and its linked accounts while a 🔗 tag is hovered */
tr.r-linkglow td { background: rgba(214, 51, 108, .16) !important; transition: background .15s; }
tr.r-linkglow td:first-child { box-shadow: inset 4px 0 0 #d6336c; }
tr.r-linkglow { outline: 1px solid rgba(214, 51, 108, .55); outline-offset: -1px; }
.tag.linked[data-pick] { cursor: pointer; }
/* A linked account picked from its 🔗 tag: stronger, with a flash when it's scrolled to */
@keyframes linkpick { from { background: rgba(214, 51, 108, .45); } to { background: rgba(214, 51, 108, .22); } }
tr.r-linkpick td { background: rgba(214, 51, 108, .22) !important; animation: linkpick 1.2s ease-out; }
tr.r-linkpick td:first-child { box-shadow: inset 5px 0 0 #d6336c; }
tr.r-linkpick { outline: 2px solid #d6336c; outline-offset: -2px; }
.linkmenu { position: fixed; z-index: 50; min-width: 240px; max-width: 360px; padding: 8px; background: var(--panel);
            border: 1px solid #d6336c; border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.linkmenu .sub { display: block; font-size: 12px; margin: 0 4px 6px; }
.linkmenu button { display: block; width: 100%; text-align: left; background: transparent; color: var(--ink);
                   border: 0; border-radius: 6px; padding: 6px 8px; cursor: pointer; }
.linkmenu button:hover { background: rgba(214, 51, 108, .14); }
.linkmenu button span { display: block; font-size: 12.5px; }
.linkmenu button span.sub { margin: 2px 0 0; }

/* Kalshi: anonymous exchange data, styled apart from Pinnacle */
.tag.kalshi { background: #3b5bdb; color: #fff; letter-spacing: .03em; }
.tag.kalshi-sig { background: transparent; color: #4c6ef5; border: 1px solid #4c6ef5; }
tr.r-kal td:first-child { box-shadow: inset 4px 0 0 #4c6ef5; }
.pin-strip.kal { margin-top: 6px; }
/* Alerts page: Kalshi big-order direction boxes */
.kflow { margin-top: 12px; padding: 10px 12px 12px; }
.kflow-head { font-weight: 600; margin-bottom: 10px; }
.kflow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.kcard { display: block; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
         color: inherit; text-decoration: none; min-width: 0; }
a.kcard:hover { border-color: #4c6ef5; }
.kc-match { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-big { font-size: 22px; font-weight: 700; margin: 6px 0 4px; font-variant-numeric: tabular-nums;
          white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-big span { font-size: 15px; font-weight: 600; }
.kc-bar { display: flex; gap: 2px; height: 8px; margin-bottom: 6px; }
.kc-bar span { display: block; height: 100%; background: var(--line); border-radius: 4px; min-width: 2px; }
.kc-bar span.lead { background: #4c6ef5; }
table.mini { width: auto; margin-top: 4px; }
table.mini td { padding: 3px 14px 3px 0; border: 0; }
.tag.sharp { background: #7a3cc2; color: #fff; }
.tag.bigdir { background: transparent; color: var(--tag-whale); border: 1px solid var(--tag-whale); }
.tag.watch { background: var(--live); color: #fff; }
tr.r-watch td:first-child { box-shadow: inset 4px 0 0 var(--live); }
tr.r-watch td { background: color-mix(in srgb, var(--live) 7%, transparent); }
.tag.stack { background: var(--accent); color: var(--accent-ink); }
.tag.stack-after { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.wdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
th.bm, td.bm { width: 26px; padding-left: 6px; padding-right: 0; }
.star { background: transparent; border: 0; padding: 2px; color: var(--muted); cursor: pointer; line-height: 0; }
.star svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.star:hover { color: var(--spec-line); }
.star.on { color: var(--spec-line); }
.star.on svg { fill: currentColor; }
button.note { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
button.small { padding: 3px 10px; font-size: 13px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.pulse.on { background: var(--live); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212, 55, 44, .5); } 70% { box-shadow: 0 0 0 7px rgba(212, 55, 44, 0); } 100% { box-shadow: 0 0 0 0 rgba(212, 55, 44, 0); } }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 0 12px 10px;
  color: var(--muted); font-size: 12.5px; }
.legend .sw { display: inline-block; width: 14px; height: 12px; border-radius: 3px; margin-left: 10px; }
.legend .sw:first-child { margin-left: 0; }
.legend .sw.r-fresh { background: var(--fresh-bg); border: 1px solid var(--fresh); }
.legend .sw.r-spec { background: var(--spec-line); }
.legend .sw.r-big { background: var(--big-line); }
.wallet { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.wname { display: block; font-size: 12px; color: var(--muted); max-width: 190px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 14px;
  padding: 3px 10px; font-weight: 500; font-size: 13px; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip small { opacity: .75; margin-left: 4px; }
.tabs { display: flex; gap: 4px; margin: 14px 0 0; }
.tab { background: transparent; color: var(--muted); border: 1px solid transparent; border-bottom: 0;
  border-radius: 6px 6px 0 0; padding: 8px 16px; }
.tab.on { background: var(--panel); color: var(--ink); border-color: var(--line); margin-bottom: -1px; }
.stats { display: flex; flex-wrap: wrap; gap: 26px; margin: 10px 0 4px; }
.stat b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.progress { color: var(--muted); font-size: 13px; }
.note { color: var(--muted); font-size: 12.5px; padding: 8px 12px; }
.pos-line { white-space: nowrap; }
.pos-line .o { color: var(--muted); font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 10px 18px; padding: 16px;
  align-items: center; }
.settings-grid input { width: 100%; max-width: 520px; }
.settings-grid .d { color: var(--muted); font-size: 12.5px; grid-column: 2; margin-top: -6px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.scroll { overflow-x: visible; }
@media (max-width: 760px) {
  main { padding: 12px 16px 40px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .d { grid-column: 1; }
  th { position: static; }
  .scroll { overflow-x: auto; }
}
