:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #6b6964;
  --hairline: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --track: #cde2fb;
  --up: #006300;
  --down: #d03b3b;
  --live: #d03b3b;
  --wash: rgba(11, 11, 11, 0.05);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --s4: #eda100;
  --s5: #e87ba4;
  --brand-a: #1273d6;
  --brand-b: #6a3fe6;
  /* one fixed colour per category, in a colour-blind-safe order */
  --cat-sports: #2a78d6; --cat-crypto: #eb6834; --cat-politics: #1baf7a; --cat-tech: #eda100;
  --cat-economy: #e87ba4; --cat-culture: #008300; --cat-world: #6250d6; --cat-other: #898781;
  /* pace scale: quiet (blue) - usual (grey) - busy (red) */
  --div-lo: #2a78d6; --div-mid: #e4e3dd; --div-hi: #e34948;
  /* heatmap: one hue, light to dark */
  --seq-lo: #dfeafb; --seq-hi: #104281;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --hairline: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --track: #14304f;
    --up: #0ca30c;
    --down: #e66767;
    --live: #e66767;
    --wash: rgba(255, 255, 255, 0.06);
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --s4: #c98500;
    --s5: #d55181;
    --brand-a: #2bbcf5;
    --brand-b: #9a7bfa;
    --cat-sports: #3987e5; --cat-crypto: #d95926; --cat-politics: #199e70; --cat-tech: #c98500;
    --cat-economy: #d55181; --cat-culture: #0ca30c; --cat-world: #9085e9; --cat-other: #898781;
    --div-lo: #3987e5; --div-mid: #383835; --div-hi: #e66767;
    --seq-lo: #172c47; --seq-hi: #9ec5f4;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.up { color: var(--up); }
.down { color: var(--down); }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--page); border-bottom: 1px solid var(--hairline); }
.bar { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 7px; font-weight: 750; font-size: 18px; letter-spacing: -0.025em; text-decoration: none; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; flex: none; }
/* "Now" picks up the mark's blue-to-violet; darker stops on light backgrounds keep it readable. */
.brand .now { background: linear-gradient(90deg, var(--brand-a), var(--brand-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input {
  width: 100%; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
}
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.suggest a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 7px; text-decoration: none; }
.suggest a:hover, .suggest a.active { background: var(--wash); }
.suggest img { width: 24px; height: 24px; border-radius: 5px; object-fit: cover; flex: none; }
.suggest .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
/* language menu */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: "▾"; margin-left: 5px; color: var(--muted); font-size: 11px; }
.lang[open] summary, .lang summary:hover { border-color: var(--ink-2); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 132px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.lang-menu a { display: block; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--ink); }
.lang-menu a:hover { background: var(--wash); }
.lang-menu a[aria-current] { font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill[data-state="live"] .dot { background: var(--up); animation: pulse 1.6s ease-in-out infinite; }
.pill[data-state="down"] .dot { background: var(--down); }
.pill[data-state="poll"] .dot { background: var(--accent); }
@keyframes pulse { 50% { opacity: 0.35; } }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  padding: 8px 11px; text-decoration: none; color: var(--ink-2); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
/* The strip scrolls sideways when it does not fit, which also clips anything outside it,
   so the focus ring is drawn inside the tab rather than around it. */
.tabs a:focus-visible { outline-offset: -3px; border-radius: 8px; }

/* ---------- Markets page chooser ---------- */
.chooser { display: grid; gap: 10px; margin: 4px 0 16px; }
.lenses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lens {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--ink);
}
.lens small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.lens:hover { border-color: var(--ink-2); }
.lens[aria-current] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.picks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.picks-label { color: var(--muted); font-size: 12px; margin-right: 2px; min-width: 92px; }
.picks > * { flex: none; }
.picks.subs { padding-left: 98px; }
.pick {
  padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px;
  text-decoration: none; color: var(--ink-2); background: var(--surface); white-space: nowrap;
}
.pick:hover { color: var(--ink); border-color: var(--ink-2); }
.pick[aria-current] { color: var(--page); background: var(--ink); border-color: var(--ink); }
.differ { font-size: 13px; color: var(--ink-2); }
.differ summary { cursor: pointer; color: var(--muted); padding: 0 0 0 98px; width: fit-content; }
.differ summary:hover { color: var(--ink); }
.differ ul { margin: 6px 0 2px; padding-left: 18px; max-width: 760px; line-height: 1.5; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.filters input[type="search"], .filters select {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}
.filters .check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.suggest .kind { font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; flex: none; }

/* ---------- shared blocks ---------- */
main { padding-top: 22px; padding-bottom: 48px; min-height: 100vh; }
.page-head { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 16px; }
.page-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.015em; }
.sub { color: var(--ink-2); margin-top: 3px; max-width: 70ch; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--ink-2); font-size: 13px; }
.tools input { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; width: 200px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.sec-head:first-child { margin-top: 0; }
.sec-head h2 { font-size: 16px; font-weight: 650; }
.sec-head a { color: var(--ink-2); font-size: 13px; text-decoration: none; white-space: nowrap; }
.sec-head a:hover { color: var(--ink); text-decoration: underline; }
.notice { padding: 36px 16px; text-align: center; color: var(--ink-2); }
.banner { display: none; margin-bottom: 14px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); }
.banner.show { display: block; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.tile .k { color: var(--ink-2); font-size: 13px; }
.tile .v { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2px; }
.tile .n { color: var(--muted); font-size: 12px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
aside.rail { display: grid; gap: 12px; position: sticky; top: 108px; }

/* ---------- event card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card-head { display: flex; gap: 10px; align-items: flex-start; }
.rank { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; min-width: 20px; padding-top: 2px; }
.icon { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; background: var(--wash); }
.icon.sm { width: 28px; height: 28px; border-radius: 6px; }
.icon.lg { width: 56px; height: 56px; border-radius: 12px; }
.titles { min-width: 0; flex: 1; }
.title {
  font-weight: 600; text-decoration: none; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.title:hover { text-decoration: underline; }
.meta { color: var(--muted); font-size: 12px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 3px 8px; align-items: center; }
.livebadge { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 600; }
.livebadge i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.2s ease-in-out infinite; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink-2); font-size: 12px; white-space: nowrap; }
a.chip, .tag { text-decoration: none; }
a.chip:hover { background: var(--wash); color: var(--ink); border-color: var(--muted); }
.tag:hover { color: var(--ink); text-decoration: underline; }

.outcomes { display: grid; gap: 7px; }
.outcome { display: grid; grid-template-columns: minmax(0, 1fr) 62px 58px; gap: 4px 10px; align-items: center; }
.o-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.px { font-weight: 650; font-variant-numeric: tabular-nums; border-radius: 5px; padding: 0 4px; }
.outcome .px { text-align: right; margin-right: -4px; }
.delta { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; text-align: right; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.meter { height: 6px; border-radius: 4px; background: var(--track); overflow: hidden; }
.outcome .meter { grid-column: 1 / -1; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width 0.35s ease; }
.flash-up { animation: flashUp 0.9s ease-out; }
.flash-down { animation: flashDown 0.9s ease-out; }
@keyframes flashUp { from { background: color-mix(in srgb, var(--up) 34%, transparent); } to { background: transparent; } }
@keyframes flashDown { from { background: color-mix(in srgb, var(--down) 34%, transparent); } to { background: transparent; } }

.sparkrow { display: grid; gap: 3px; }
.sparkcap { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.sparkcap span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark { position: relative; height: 40px; margin-right: 5px; cursor: crosshair; }
.spark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.spark .area { fill: var(--accent); opacity: 0.12; }
.spark .end, .spark .probe {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface); transform: translate(-50%, -50%); pointer-events: none;
}
.spark .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted); pointer-events: none; }
.spark .probe, .spark .cross { display: none; }
.spark.hover .probe, .spark.hover .cross { display: block; }
.spark .empty { position: absolute; inset: 0; display: flex; align-items: center; color: var(--muted); font-size: 12px; }
#tip {
  position: fixed; z-index: 40; display: none; pointer-events: none; padding: 6px 10px; border-radius: 8px;
  background: var(--ink); color: var(--page); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.5;
}
#tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.metric { display: grid; gap: 4px; border-top: 1px solid var(--hairline); padding-top: 10px; margin-top: auto; }
.metric-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.metric-top .k { color: var(--ink-2); font-size: 12px; }
.metric-top .v { font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; }
.bar-track { height: 4px; border-radius: 4px; background: var(--wash); overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.stats { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.stats b { color: var(--ink-2); font-weight: 500; }

/* ---------- side panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; min-width: 0; }
.panel h2 { font-size: 14px; font-weight: 650; margin-bottom: 2px; }
.panel .hint { margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.panel .more { display: inline-block; margin-top: 8px; color: var(--ink-2); font-size: 13px; }
.embed-code { display: block; width: 100%; resize: vertical; padding: 8px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--page); color: var(--ink-2); font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; }
.embed-actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.embed-actions .linkbtn { margin-top: 0; }
.day-steps { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; gap: 0 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.list li:first-child { border-top: 0; }
.rows li { grid-template-columns: minmax(0, 1fr) auto auto; }
.tape li { grid-template-columns: auto auto minmax(0, 1fr) auto auto; }
.tape { max-height: 420px; overflow-y: auto; scrollbar-gutter: stable; padding-right: 6px; }
.what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.what a { text-decoration: none; }
.what a:hover { text-decoration: underline; }
.what small { color: var(--muted); font-size: 12px; }
.rows .what small { display: block; overflow: hidden; text-overflow: ellipsis; }
.tape time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.side { font-size: 12px; font-weight: 600; }
.side.buy { color: var(--up); }
.side.sell { color: var(--down); }
.emptyrow { color: var(--muted); font-size: 13px; padding: 6px 0; }

/* ---------- tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; vertical-align: middle; }
thead th {
  font-size: 12px; font-weight: 500; color: var(--ink-2); border-bottom: 1px solid var(--hairline);
  white-space: nowrap; position: sticky; top: 0; background: var(--surface);
}
th.num, td.num { text-align: right; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th[aria-sort] { color: var(--ink); font-weight: 650; }
th[aria-sort="descending"]::after { content: " ↓"; }
th[aria-sort="ascending"]::after { content: " ↑"; }
th.sortable:not([aria-sort]):hover::after { content: " ↕"; color: var(--muted); }
tbody tr { border-top: 1px solid var(--hairline); }
tbody tr:first-child { border-top: 0; }
tbody tr:hover { background: var(--wash); }
td.rk { color: var(--muted); font-variant-numeric: tabular-nums; width: 1%; white-space: nowrap; }
td.rk small { display: block; font-size: 11px; }
.ev-cell { display: flex; gap: 10px; align-items: center; min-width: 220px; }
.ev-cell .title { -webkit-line-clamp: 1; }
td.lead { color: var(--ink-2); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td .px { display: inline-block; }
td.meter-cell { width: 110px; }

/* ---------- event page ---------- */
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.ev-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.ev-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.ev-head .grow { flex: 1; min-width: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; text-decoration: none;
  background: var(--ink); color: var(--page); font-weight: 600; white-space: nowrap; border: 0; cursor: pointer;
}
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); font-weight: 500; }
.btn:hover { opacity: 0.9; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: -6px 0 18px; }
.chart-card { padding: 14px 14px 10px; }
.chart-top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ranges { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.ranges button { background: transparent; border: 0; padding: 5px 11px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.ranges button + button { border-left: 1px solid var(--border); }
.ranges button[aria-pressed="true"] { background: var(--ink); color: var(--page); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.legend em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.chart { position: relative; height: 300px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart .grid-line { stroke: var(--hairline); stroke-width: 1; }
.chart .base-line { stroke: var(--axis); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart text.endlabel { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ring { stroke: var(--surface); stroke-width: 2; }
.chart .crossline { stroke: var(--muted); stroke-width: 1; }
.chart .msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
/* Event page: our own activity record, and the top holders of each side */
.chart-top h2 + .hint { margin: 2px 0 0; }
.act-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.act-chart { height: 220px; }
.act-chart .bar { fill: var(--s1); }
.act-chart .series { stroke: var(--s1); }
.act-chart .pt { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.act-chart .band { fill: var(--wash); }
.act-story { margin: 12px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 78ch; }
.act-note { margin-top: 6px; color: var(--muted); font-size: 12px; }
.hold-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); max-width: 100%; }
.hold-pick select { max-width: 260px; min-width: 0; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
.holders { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 24px; }
.hold-side { min-width: 0; }
.hold-side h3 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; margin: 2px 0 4px; }
.hold-side h3 i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.hold-side h3 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hold-side h3 b { margin-left: auto; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.hold-side ol { list-style: none; margin: 0; padding: 0; }
.hold-side li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 3px 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.hold-side li.emptyrow { display: block; color: var(--muted); }
.hold-side .rk { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.hold-side li a, .hold-side li > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.hold-side li a:hover { text-decoration: underline; }
.hold-side .num { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hold-side .hbar { grid-column: 2 / -1; height: 6px; border-radius: 4px; background: var(--wash); overflow: hidden; }
.hold-side .hbar i { display: block; height: 100%; border-radius: 4px; }
/* Markets lists: a 7-day line of the leading outcome in each row */
th.spark-col { font-weight: 500; }
td.spark-cell { width: 116px; padding-top: 4px; padding-bottom: 4px; }
.spark.mini { width: 104px; height: 26px; margin: 0; }
.prose { color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.prose.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.linkbtn { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--accent); cursor: pointer; }
.stack { display: grid; gap: 14px; min-width: 0; }

/* ---------- about ---------- */
.doc { max-width: 72ch; }
.doc h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.015em; margin-bottom: 10px; }
.doc h2 { font-size: 17px; font-weight: 650; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc dt { font-weight: 600; margin-top: 12px; }
.doc dd { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--hairline); padding-top: 18px; padding-bottom: 32px; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-foot a { color: var(--ink-2); }

@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  aside.rail { position: static; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .hide-md { display: none; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .lenses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .picks::-webkit-scrollbar { display: none; }
  .picks-label { min-width: 0; }
  .picks.subs { padding-left: 0; }
  .differ summary { padding-left: 0; }
  .differ ul { white-space: normal; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status .age { display: none; }
  .hide-sm { display: none; }
  th, td { padding: 8px 8px; }
  .ev-cell { min-width: 150px; }
  .ev-head { flex-wrap: wrap; }
  .ev-head .grow { flex: 1 1 60%; }
  .ev-head .btn { flex: 1 1 100%; justify-content: center; }
  .chart { height: 240px; }
  .page-head h1, .ev-head h1 { font-size: 20px; }
  .tile .v { font-size: 22px; }
}
@media (max-width: 480px) {
  .status .pilltext { display: none; }
  .pill { padding: 6px; }
  .status { gap: 6px; }
  .lang summary { padding: 4px 8px; font-size: 12px; }
  .lang summary::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .flash-up, .flash-down, .dot, .livebadge i { animation: none !important; }
  .meter i { transition: none; }
}

/* ---------- server-rendered content ----------
   Each page arrives with plain HTML content for crawlers and for browsers without
   scripts. When scripts run they draw the full interface, so this copy is hidden. */
.js-only { display: none; }
.js .js-only { display: block; }
.js .ssr { display: none; }
.ssr h1 { font-size: 24px; font-weight: 650; margin-bottom: 8px; }
.ssr h2 { font-size: 16px; font-weight: 650; margin: 22px 0 8px; }
.ssr p, .ssr li { color: var(--ink-2); margin-bottom: 8px; }
.ssr table { margin: 10px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.ev-summary { margin: -6px 0 14px; max-width: 90ch; }

/* ---------- visualisation page ---------- */
figure.viz { margin: 0 0 16px; padding: 16px; }
.viz-top { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.viz-top h2 { font-size: 16px; }
.viz-top .hint { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); max-width: 80ch; }
.viz figcaption { margin-top: 10px; color: var(--muted); font-size: 12px; }
.viz-msg { display: flex; align-items: center; justify-content: center; min-height: 160px; color: var(--muted); text-align: center; padding: 0 16px; }
.viz-scroll { overflow-x: auto; }
.viz-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 6px; color: var(--ink-2); font-size: 12px; }
.viz-scale > i { width: 150px; height: 8px; border-radius: 4px; }
.viz-key { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; color: var(--muted); }
.cat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }

.treemap { position: relative; height: clamp(380px, 46vw, 600px); overflow: hidden; border-radius: 8px; }
.tm-group { position: absolute; overflow: hidden; }
.tm-head { position: absolute; left: 0; right: 0; top: 0; height: 20px; padding: 2px 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface); }
.tm-head b { color: var(--ink); font-weight: 650; }
.tm-tile { position: absolute; overflow: hidden; padding: 4px 6px; font-size: 12px; line-height: 1.25; text-decoration: none; border: 1px solid var(--surface); border-radius: 4px; display: flex; flex-direction: column; gap: 2px; }
.tm-tile:hover { outline: 2px solid var(--ink); outline-offset: -2px; z-index: 1; }
.tm-tile.more { background: var(--wash); color: var(--muted); align-items: center; justify-content: center; }
.tm-title { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.tm-value { font-variant-numeric: tabular-nums; opacity: 0.9; }

.sk-link { fill-opacity: 0.42; transition: fill-opacity 0.12s; }
.sk-link:hover { fill-opacity: 0.8; }
.sk-link.dim { fill-opacity: 0.08; }
.sk-node.plain { fill: var(--muted); }
.sk-name { fill: var(--ink); font-size: 12px; font-weight: 600; }
.sk-val { fill: var(--ink-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }

.hm-cell { stroke: var(--surface); stroke-width: 1; }
.hm-cell.empty { fill: none; stroke: var(--hairline); stroke-dasharray: 3 3; }
.hm-empty-key { display: inline-block; width: 14px; height: 10px; border: 1px dashed var(--axis); border-radius: 3px; }
.hm-cell:hover { stroke: var(--ink); stroke-width: 2; }
.hm-row { fill: var(--ink-2); font-size: 12px; }
.hm-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .treemap { height: 440px; } figure.viz { padding: 12px; } }
#vTable td:first-child { white-space: nowrap; }
.viz-swipe { display: none; margin: 6px 0 0; color: var(--muted); font-size: 12px; }
@media (max-width: 760px) { .viz-swipe { display: block; } }
.viz-controls { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 2px 0 12px; font-size: 13px; color: var(--ink-2); }
.viz-controls label { display: inline-flex; align-items: center; gap: 6px; }
.viz-controls select { padding: 4px 8px; }
.viz-controls button.chip { background: var(--surface); cursor: pointer; padding: 3px 10px; color: var(--ink); }
.viz-controls button.chip:hover { background: var(--wash); }
.sk-node[data-cat], .sk-link { cursor: pointer; }
.chip.index { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--ink); font-weight: 600; }
.score { font-weight: 650; }
ol.index-list { counter-reset: none; }
.index-list li { grid-template-columns: minmax(0, 1fr) auto; }
.index-list .score { font-size: 15px; }
.static h1 { font-size: 24px; font-weight: 650; margin-bottom: 8px; }
.static h2 { font-size: 16px; font-weight: 650; margin: 22px 0 8px; }
.static p, .static li { color: var(--ink-2); margin-bottom: 8px; }
.static ul { padding-left: 20px; columns: 2 320px; }
.static table { margin: 10px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; display: block; overflow-x: auto; }
.static a { text-decoration: none; color: var(--ink); }
.static a:hover { text-decoration: underline; }

/* Reserve space while data loads, so nothing jumps when it arrives. */
.card.skeleton { min-height: 336px; }
.card.skeleton::before { content: ""; display: block; height: 38px; width: 70%; border-radius: 8px; background: var(--wash); }
.card { min-height: 336px; }
#indexTop { min-height: 470px; }
#heating, #movers { min-height: 282px; }
#tape { min-height: 120px; }
.tile .v { min-height: 32px; }
.tabs { min-height: 37px; }
#lBlurb:empty::before { content: "\00a0"; }

/* ---------- top traders ---------- */
.icon.round { border-radius: 50%; }
.ranges.scroll { max-width: 100%; overflow-x: auto; }
.ranges.scroll button { white-space: nowrap; flex: none; }
.bets .ev-cell .title { -webkit-line-clamp: 2; }
.tabbar { align-items: center; flex-wrap: wrap; margin-top: 4px; }
.tabbar .muted { font-size: 13px; }
.footnote { color: var(--muted); font-size: 12px; margin-top: 14px; max-width: 80ch; }
.linkbtn:disabled { color: var(--muted); cursor: default; }

/* ---------- home: top 10 trend ----------
   Heights are fixed so the page below does not move when the lines arrive. */
.trend { margin-bottom: 22px; padding: 14px 16px 12px; }
.trend-top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.trend-top > div:first-child { flex: 1 1 420px; min-width: 0; }
.trend-top h2 { font-size: 16px; }
.trend-top .hint { margin: 2px 0 0; min-height: 18px; }
.trend-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.trend-controls button:disabled { opacity: 0.4; cursor: default; }
.trend-body { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 6px 20px; align-items: start; }
.trend-chart { height: 330px; }
.trend-chart .tl { transition: opacity 0.12s; }
.trend-chart .tl .series { stroke: var(--c); }
.trend-chart .tl .series.dash { stroke-dasharray: 6 5; stroke-linecap: butt; }
.trend-chart .tl circle { fill: var(--c); }
.trend-chart.focus .tl { opacity: 0.28; }
.trend-chart.focus .tl.on { opacity: 1; }
.trend-chart .tl.on .series { stroke-width: 3; }
.trend-chart .halo { transform-box: fill-box; transform-origin: center; opacity: 0; animation: trendPulse 2.6s ease-out infinite; }
@keyframes trendPulse { 0% { transform: scale(1); opacity: 0.4; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.trend-chart .hit { cursor: crosshair; touch-action: pan-y; }
.trend-legend { min-height: 330px; }
.trend-legend li { grid-template-columns: 18px 22px minmax(0, 1fr) auto 62px; gap: 0 8px; align-items: center; height: 33px; padding: 0 6px; margin: 0 -6px; border-radius: 6px; }
.trend-legend li.on { background: var(--wash); }
.tr-rank { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.tr-key { width: 22px; height: 8px; }
.tr-key line { stroke-width: 2.5; }
.tr-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.tr-title:hover { text-decoration: underline; }
.trend-legend .num { color: var(--ink-2); }
.tiprow { display: flex; gap: 14px; justify-content: space-between; opacity: 0.72; }
.tiprow.on { opacity: 1; font-weight: 600; }
@media (max-width: 1100px) {
  .trend-body { grid-template-columns: minmax(0, 1fr); }
  .trend-legend { display: grid; grid-template-rows: repeat(5, auto); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0 28px; min-height: 165px; }
  .trend-legend li:nth-child(6) { border-top: 0; }
}
@media (max-width: 760px) {
  .trend-chart { height: 250px; }
  .trend-legend { display: block; min-height: 300px; }
  .trend-legend li { height: 30px; }
  .trend-legend li:nth-child(6) { border-top: 1px solid var(--hairline); }
  .trend-controls button { padding: 5px 8px; }
}
@media (prefers-reduced-motion: reduce) { .trend-chart .halo { animation: none; } .trend-chart .tl { transition: none; } }
