/* ══════════════════════════════════════════════════════════════════════════
   trending.css — the Trending Markets decision tool

   Sibling of the Daily Edge tool, not a copy of it: same job (surface live
   markets with a number you can act on), different accent. Daily Edge uses
   green for "edge found"; this uses the site brand blue for "market surface",
   which keeps one visual language across poly-sim while giving this page its
   own identity.

   LOADED BY: /trending-markets.html and /trending/<cluster>.html
   Self-contained on purpose — these pages do not load wiki.css, so this file
   owns every rule it needs. Nothing here depends on content-system.css.

   HARD RULE (unchanged from the site's editorial contract): no boxed ad unit,
   no "SPONSORED" label, no filled marketing button. A card is a market, and
   the outbound link is the market's own name plus one muted text link.
   ══════════════════════════════════════════════════════════════════════════ */

:root{
  --tm-bg:#f8fafc;
  --tm-card:#ffffff;
  --tm-sunk:#f1f5f9;
  --tm-line:#e2e8f0;
  --tm-line2:#cbd5e1;
  --tm-ink:#0f172a;
  --tm-body:#475569;
  --tm-mute:#94a3b8;
  --tm-acc:#0284c7;
  --tm-acc-2:#0ea5e9;
  --tm-acc-bg:#f0f9ff;
  --tm-acc-line:#bae6fd;
  --tm-up:#15803d;
  --tm-down:#b91c1c;
  --tm-warn:#b45309;
}

*{box-sizing:border-box;margin:0;padding:0}

body{
  background:var(--tm-bg);
  color:var(--tm-ink);
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  font-size:15px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

.tm-wrap{max-width:1120px;width:100%;margin:0 auto;padding:16px 24px 64px}
@media(max-width:768px){ .tm-wrap{padding:14px 12px 56px} }

a{color:var(--tm-acc);text-decoration:none}
a:hover{text-decoration:underline}

/* ── hero ──────────────────────────────────────────────────────────────── */

/* 2027 line-up (2026-11-02) — same dark card language as the hall-of-whales
   hero and the shared .ps-hero: inset, rounded, left-aligned, per-tool hue.
   This was a light card; it is now the dark plate so every decision tool opens
   the same way. Purely presentational — no element, id or handler changed. */

.tm-hero{
  background:#fff;
  border:1px solid var(--tm-line);
  border-radius:14px;
  padding:18px 20px 14px;
  /* Width line-up: same rule as .ps-hero — fill the container, explicit width so
     a flex parent cannot shrink-wrap it, 1120px measure to match every column.
     .tm-hero is a child of .tm-wrap, so this resolves to that column's content
     width and the card edges line up with the market cards below. */
  width:100%;
  max-width:1120px;
  margin:8px auto 16px;
  position:relative;overflow:hidden;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.tm-hero::after{display:none}
.tm-hero > *{position:relative;z-index:1;}
@media(max-width:768px){ .tm-hero{padding:14px 14px 12px;border-radius:13px;width:100%;max-width:none;margin:6px 0 12px} }

.tm-eyebrow{
  display:inline-flex;align-items:center;gap:6px;
  font-family:'JetBrains Mono',monospace;
  font-size:9px;font-weight:700;letter-spacing:.09em;text-transform:uppercase;
  color:var(--tm-acc);margin-bottom:5px;
}
.tm-dot{
  width:5px;height:5px;border-radius:50%;background:var(--tm-acc-2);
  box-shadow:0 0 5px var(--tm-acc-2);
  flex-shrink:0;animation:tm-pulse 2s ease-in-out infinite;
}
@keyframes tm-pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.7)}}
@media(prefers-reduced-motion:reduce){ .tm-dot{animation:none} }

.tm-hero h1{
  font-size:clamp(21px,2.8vw,28px);
  font-weight:800;letter-spacing:-.025em;line-height:1.15;
  margin-bottom:5px;color:var(--tm-ink);
}
.tm-hero h1 em{font-style:normal;color:var(--tm-acc)}
.tm-hero p{font-size:12.5px;color:var(--tm-body);max-width:640px;line-height:1.55}
@media(max-width:768px){ .tm-hero p{font-size:12px} }

/* The hero is now a dark plate, but .tm-lede below carries the LIGHT-page ink:
   its market link is --tm-ink (#0f172a) and its delta is --tm-down (#b91c1c).
   Rendering that on navy put a near-black link and a dark-red "-49.7 pts" on a
   dark card — the single most useful sentence on the page became unreadable.
   These overrides are scoped to .tm-hero and need one extra class of specificity
   to beat .tm-lede b[data-dir] further down, so they win regardless of order. */
.tm-hero .tm-lede{font-size:12px;margin-top:8px;padding-top:8px}

.tm-stamp{
  display:flex;align-items:center;gap:5px;margin-top:10px;
  font-family:'JetBrains Mono',monospace;
  font-size:10px;font-weight:600;color:var(--tm-mute);
}
.tm-stamp .tm-dot{background:#22c55e;box-shadow:0 0 5px #22c55e}

/* ── stats ─────────────────────────────────────────────────────────────── */

.tm-stats{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:13px}
.tm-stat{
  border:1px solid var(--tm-line);border-radius:8px;
  padding:6px 11px;display:flex;align-items:baseline;gap:6px;
  min-width:0;background:var(--tm-card);
}
.tm-stat b{
  font-family:'JetBrains Mono',monospace;font-size:13px;font-weight:700;
  line-height:1;font-variant-numeric:tabular-nums;
}
.tm-stat span{font-size:10px;font-weight:500;color:var(--tm-mute);white-space:nowrap}
@media(max-width:560px){ .tm-stat{flex:1 1 calc(50% - 4px)} }

/* ── controls ──────────────────────────────────────────────────────────── */

.tm-controls{
  display:flex;gap:7px;flex-wrap:wrap;align-items:center;
  margin-bottom:6px;
}
.tm-tabs{display:flex;gap:5px;flex-wrap:wrap}
.tm-tab{
  padding:5px 12px;border-radius:20px;
  font-size:12px;font-weight:700;font-family:inherit;
  border:1.5px solid var(--tm-line);background:var(--tm-card);color:var(--tm-body);
  cursor:pointer;transition:background .14s,border-color .14s,color .14s;
  white-space:nowrap;
}
.tm-tab:hover{border-color:var(--tm-acc-line);color:var(--tm-acc)}
.tm-tab[aria-pressed="true"]{background:var(--tm-acc);border-color:var(--tm-acc);color:#fff}
.tm-tab:focus-visible{outline:2px solid var(--tm-acc);outline-offset:2px}

.tm-tools{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
@media(max-width:700px){ .tm-tools{margin-left:0;width:100%} }

.tm-input,.tm-select{
  font-family:inherit;font-size:12px;font-weight:600;color:var(--tm-ink);
  background:var(--tm-card);
  border:1.5px solid var(--tm-line);border-radius:8px;
  padding:6px 10px;min-width:0;
}
.tm-input{flex:1 1 150px}
.tm-select{cursor:pointer}
.tm-input:focus,.tm-select:focus{outline:2px solid var(--tm-acc);outline-offset:1px;border-color:var(--tm-acc)}

.tm-count{
  font-family:'JetBrains Mono',monospace;font-size:10.5px;font-weight:600;
  color:var(--tm-mute);margin:0 0 13px;
}

/* ── the headline sentence ─────────────────────────────────────────────── */
/* One sentence, above every chart: how many markets, how much volume, when it
   was read, and the single largest move. Answers "what happened" before the
   reader has to look anywhere. Deliberately not a panel — a rule and a line. */

.tm-lede{
  margin-top:9px;padding-top:9px;
  border-top:1px solid var(--tm-line);
  font-size:12.5px;line-height:1.6;color:var(--tm-body);max-width:680px;
}
.tm-lede b{color:var(--tm-ink);font-weight:800;font-variant-numeric:tabular-nums}
.tm-lede b[data-dir="up"]{color:var(--tm-up)}
.tm-lede b[data-dir="down"]{color:var(--tm-down)}
.tm-lede a{color:var(--tm-ink);font-weight:700;text-decoration:underline;text-decoration-color:var(--tm-line2);text-underline-offset:2px}
.tm-lede a:hover{color:var(--tm-acc);text-decoration-color:var(--tm-acc)}

/* ── biggest single fills ──────────────────────────────────────────────── */
/* Real executed trades from Polymarket's public Data API, not a market
   total. A tape: one row per fill, the money first. No frame, no badge —
   the number is the hook, so it gets the weight and nothing else competes. */

.tm-whale{margin:0 0 14px;background:#fff;border:1px solid var(--tm-line);border-radius:12px;padding:10px 14px 2px}

.tm-wh-l{
  font-family:'JetBrains Mono',monospace;
  font-size:8.5px;font-weight:800;letter-spacing:.11em;text-transform:uppercase;
  color:var(--tm-mute);margin:0 0 6px;
}

.tm-tape{list-style:none;margin:0;padding:0;border-top:1px solid var(--tm-line)}
.tm-tape li{
  display:flex;align-items:baseline;gap:12px;
  padding:8px 0;border-bottom:1px solid var(--tm-line);
}
.tm-tape li[data-n="0"] .tm-tp-c{color:#4338ca}

.tm-tp-c{
  font-family:'JetBrains Mono',monospace;
  font-size:16px;font-weight:800;line-height:1.1;letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;color:var(--tm-ink);
  flex-shrink:0;min-width:68px;
}
@media(max-width:600px){ .tm-tp-c{font-size:15px;min-width:60px} }

.tm-tp-b{flex:1;min-width:0}
.tm-tp-t{
  display:block;font-size:12.5px;font-weight:700;line-height:1.35;
  color:var(--tm-ink);overflow-wrap:break-word;
}
.tm-tp-t:hover{color:var(--tm-acc)}
.tm-tp-m{
  display:block;margin-top:2px;
  font-family:'JetBrains Mono',monospace;font-size:9.5px;font-weight:600;
  color:var(--tm-mute);font-variant-numeric:tabular-nums;
}
.tm-tp-m i{font-style:normal;font-weight:700;color:var(--tm-body)}

/* ── the day's story: three numbers ────────────────────────────────────── */
/* A rail, not a card grid: three columns divided by hairlines, sitting on the
   page with no fill and no frame. These are the three facts a trader repeats
   to somebody else, so they get space and a big number — not a box, not a
   badge, not a label. */

.tm-hooks{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  margin:0 0 14px;
  background:#fff;border:1px solid var(--tm-line);border-radius:12px;
}

/* `display:grid` above is an author rule and would beat the user-agent
   `[hidden]{display:none}`, leaving an empty grid box on the page before data
   arrives. Restore the hidden state explicitly. */
.tm-hooks[hidden]{display:none}

.tm-hook{
  padding:10px 16px 11px;
  border-left:1px solid var(--tm-line);
  min-width:0;
}
.tm-hook:first-child{border-left:0}

@media(max-width:860px){
  .tm-hooks{grid-template-columns:1fr}
  .tm-hook,.tm-hook:first-child{
    border-left:0;padding:9px 13px 10px;
    border-top:1px solid var(--tm-line);
  }
  .tm-hook:first-child{border-top:0}
}

.tm-hk{
  display:block;font-size:8.5px;font-weight:800;letter-spacing:.11em;
  text-transform:uppercase;color:var(--tm-mute);margin-bottom:5px;
}
.tm-hv{
  display:block;font-family:'JetBrains Mono',monospace;
  font-size:19px;font-weight:800;line-height:1;letter-spacing:-.03em;
  font-variant-numeric:tabular-nums;color:var(--tm-ink);margin-bottom:5px;
}
@media(max-width:860px){ .tm-hv{font-size:20px} }
.tm-hv[data-dir="up"]{color:var(--tm-up)}
.tm-hv[data-dir="down"]{color:var(--tm-down)}

.tm-hs{font-size:11.5px;line-height:1.5;color:var(--tm-body)}
.tm-hs a{
  color:var(--tm-ink);font-weight:700;
  text-decoration:underline;text-decoration-color:var(--tm-line2);text-underline-offset:2px;
}
.tm-hs a:hover{color:var(--tm-acc);text-decoration-color:var(--tm-acc)}
.tm-hs b{font-weight:800;color:var(--tm-ink);font-variant-numeric:tabular-nums}

/* ── where the volume sits: one colour per cluster ─────────────────────── */
/* Six clusters, six hues, none repeated. Width is volume share; the net
   direction of each cluster is printed as a signed number in the key, so
   colour carries identity only — which is why the bar no longer lies. */

.tm-viz{margin:0 0 14px;background:#fff;border:1px solid var(--tm-line);border-radius:12px;padding:12px 14px}

.tm-viz-h{margin-bottom:9px}
.tm-viz-t{
  font-size:13px;font-weight:800;letter-spacing:-.015em;
  color:var(--tm-ink);margin-bottom:3px;
}
.tm-viz-s{font-size:11.5px;line-height:1.55;color:var(--tm-mute);max-width:640px}

/* The day's shape in one sentence, generated from the bar beneath it. Sits
   above the bar so the reader gets the finding, then the evidence. */
.tm-viz-note{
  margin:0 0 10px;font-size:12.5px;line-height:1.55;color:var(--tm-body);max-width:660px;
}
.tm-viz-note[hidden]{display:none}
.tm-viz-note b{color:var(--tm-ink);font-weight:800;font-variant-numeric:tabular-nums}
.tm-viz-note b[data-dir="up"]{color:var(--tm-up)}
.tm-viz-note b[data-dir="down"]{color:var(--tm-down)}

.tm-share-bar{
  display:flex;height:24px;border-radius:8px;
  overflow:hidden;background:var(--tm-sunk);gap:2px;
}
@media(max-width:560px){ .tm-share-bar{height:26px;border-radius:7px} }

.tm-seg{
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  min-width:3px;background:var(--tm-acc);
  font-family:'JetBrains Mono',monospace;font-size:9.5px;font-weight:800;
  color:#fff;white-space:nowrap;letter-spacing:.02em;
  transition:opacity .15s;
}
.tm-seg[data-cluster="politics"]{background:#6366f1}
.tm-seg[data-cluster="crypto"]{background:#f59e0b}
.tm-seg[data-cluster="sports"]{background:#10b981}
.tm-seg[data-cluster="economy"]{background:#06b6d4}
.tm-seg[data-cluster="geopolitics"]{background:#ef4444}
.tm-seg[data-cluster="tech"]{background:#a855f7}
.tm-seg[data-dim="true"]{opacity:.2}

/* the key — doubles as the cluster filter, so the seven tab pills are gone */
.tm-key{
  list-style:none;margin:9px 0 0;padding:0;
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 16px;
}
@media(max-width:700px){ .tm-key{grid-template-columns:1fr 1fr;gap:0 10px} }
@media(max-width:400px){ .tm-key{grid-template-columns:1fr} }

.tm-key-row{
  display:flex;align-items:center;gap:7px;width:100%;
  font-family:inherit;font-size:11.5px;font-weight:600;color:var(--tm-body);
  background:none;border:0;border-radius:4px;
  padding:4px 5px;cursor:pointer;text-align:left;min-width:0;
  transition:background .12s,color .12s;
}
.tm-key-row:hover{background:var(--tm-sunk);color:var(--tm-ink)}
.tm-key-row[aria-pressed="true"]{background:var(--tm-acc-bg);color:#0c4a6e}
.tm-key-row:focus-visible{outline:2px solid var(--tm-acc);outline-offset:1px}

.tm-dotc{width:8px;height:8px;border-radius:2.5px;flex-shrink:0;background:var(--tm-acc)}
.tm-dotc[data-cluster="politics"]{background:#6366f1}
.tm-dotc[data-cluster="crypto"]{background:#f59e0b}
.tm-dotc[data-cluster="sports"]{background:#10b981}
.tm-dotc[data-cluster="economy"]{background:#06b6d4}
.tm-dotc[data-cluster="geopolitics"]{background:#ef4444}
.tm-dotc[data-cluster="tech"]{background:#a855f7}

.tm-kn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-kv{
  font-family:'JetBrains Mono',monospace;font-size:10.5px;font-weight:700;
  color:var(--tm-ink);font-variant-numeric:tabular-nums;white-space:nowrap;
}
.tm-kd{
  font-family:'JetBrains Mono',monospace;font-size:10px;font-weight:700;
  white-space:nowrap;font-variant-numeric:tabular-nums;min-width:34px;text-align:right;
}
.tm-kd[data-dir="up"]{color:var(--tm-up)}
.tm-kd[data-dir="down"]{color:var(--tm-down)}
.tm-kd[data-dir="flat"]{color:var(--tm-mute)}

/* ── today's biggest moves ─────────────────────────────────────────────── */

.tm-moves{margin:0 0 14px;background:#fff;border:1px solid var(--tm-line);border-radius:12px;padding:12px 14px 4px}

.tm-moves-list{
  list-style:none;margin:8px 0 0;padding:0;
  border-top:1px solid var(--tm-line);
}
.tm-moves-list li{
  display:flex;align-items:center;gap:10px;
  padding:9px 0;border-bottom:1px solid var(--tm-line);
}
.tm-mv-r{
  font-family:'JetBrains Mono',monospace;font-size:9.5px;font-weight:700;
  color:var(--tm-mute);flex-shrink:0;width:12px;font-variant-numeric:tabular-nums;
}
.tm-mv-b{flex:1;min-width:0}
.tm-mv-c{
  display:flex;align-items:center;gap:5px;
  font-size:8.5px;font-weight:800;letter-spacing:.08em;
  text-transform:uppercase;color:var(--tm-mute);margin-bottom:1px;
}
.tm-mv-c .tm-dotc{width:6px;height:6px;border-radius:2px}
.tm-mv-t{
  display:block;font-size:13px;font-weight:700;line-height:1.35;
  color:var(--tm-ink);overflow-wrap:break-word;
}
.tm-mv-t:hover{color:var(--tm-acc)}
.tm-mv-n{flex-shrink:0;text-align:right;white-space:nowrap}
.tm-mv-p{
  display:block;font-family:'JetBrains Mono',monospace;
  font-size:14px;font-weight:800;line-height:1.1;
  font-variant-numeric:tabular-nums;color:var(--tm-ink);
}
.tm-mv-d{
  display:block;font-family:'JetBrains Mono',monospace;
  font-size:9.5px;font-weight:700;font-style:normal;
  font-variant-numeric:tabular-nums;color:var(--tm-mute);
}
.tm-mv-d[data-dir="up"]{color:var(--tm-up)}
.tm-mv-d[data-dir="down"]{color:var(--tm-down)}

/* ── mini graph on each biggest-move row (2026-11-02) ───────────────────────
   The owner asked to SEE the jump, not just read "+14 pts". Drawn from the
   same real CLOB bars the card sparklines use. The slot keeps a fixed footprint
   whether or not a series arrives, so rows never jump height as charts land. */

.tm-mv-spark{
  position:relative;flex-shrink:0;
  width:96px;height:34px;display:block;
}
.tm-mv-spark svg{display:block;width:100%;height:100%;overflow:visible}
.tm-mv-spark .tm-mv-l{
  fill:none;stroke:var(--tm-acc);stroke-width:1.7;
  stroke-linejoin:round;stroke-linecap:round;
  vector-effect:non-scaling-stroke;
}
.tm-mv-spark .tm-mv-a{fill:rgba(2,132,199,.10);stroke:none}
.tm-mv-spark[data-dir="up"] .tm-mv-l{stroke:var(--tm-up)}
.tm-mv-spark[data-dir="up"] .tm-mv-a{fill:rgba(21,128,61,.12)}
.tm-mv-spark[data-dir="down"] .tm-mv-l{stroke:var(--tm-down)}
.tm-mv-spark[data-dir="down"] .tm-mv-a{fill:rgba(185,28,28,.12)}

/* The last real data point, marked so the eye lands on where the market is now. */
.tm-mv-spark .tm-mv-end{
  position:absolute;width:6px;height:6px;border-radius:50%;
  background:var(--tm-acc);border:1.5px solid #fff;
  box-shadow:0 0 0 1px rgba(2,132,199,.35);
  transform:translate(-50%,-50%);pointer-events:none;
}
.tm-mv-spark[data-dir="up"] .tm-mv-end{background:var(--tm-up);box-shadow:0 0 0 1px rgba(21,128,61,.35)}
.tm-mv-spark[data-dir="down"] .tm-mv-end{background:var(--tm-down);box-shadow:0 0 0 1px rgba(185,28,28,.35)}

/* Below 560px the row is too tight for title + chart + figure, so the graph
   drops out entirely rather than squeezing every column unreadable. */
@media(max-width:560px){
  .tm-mv-spark{display:none}
}

/* ── "since your last visit" ───────────────────────────────────────────── */
/* A rule and a sentence, not a card. It is a diff, not an advertisement. */

.tm-diff{
  margin:0 0 14px;padding:2px 0 2px 10px;
  border-left:2px solid var(--tm-acc-line);
  font-size:12px;line-height:1.6;color:var(--tm-body);max-width:720px;
}
.tm-diff b{color:var(--tm-ink);font-weight:800;font-variant-numeric:tabular-nums}
.tm-diff a{color:var(--tm-ink);font-weight:700;text-decoration:underline;text-decoration-color:var(--tm-line2);text-underline-offset:2px}
.tm-diff a:hover{color:var(--tm-acc);text-decoration-color:var(--tm-acc)}

/* ── loading / empty / error ───────────────────────────────────────────── */

.tm-loading{padding:44px 16px;text-align:center;color:var(--tm-body);font-size:13px;font-weight:600}
.tm-spin{
  width:28px;height:28px;margin:0 auto 11px;
  border:3px solid var(--tm-line);border-top-color:var(--tm-acc);
  border-radius:50%;animation:tm-spin .7s linear infinite;
}
@keyframes tm-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){ .tm-spin{animation-duration:2s} }

.tm-note{
  padding:16px 18px;border:1px solid var(--tm-line);border-left:3px solid var(--tm-warn);
  border-radius:0 8px 8px 0;background:var(--tm-card);
  font-size:12.5px;line-height:1.6;color:var(--tm-body);
}
.tm-note strong{color:var(--tm-ink)}

/* ── cards ─────────────────────────────────────────────────────────────── */

.tm-cards{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(322px,1fr));
  gap:10px;
  margin-bottom:20px;
}
@media(max-width:700px){ .tm-cards{grid-template-columns:1fr;gap:9px} }

.tm-card{
  background:#fff;
  border:1px solid var(--tm-line);
  border-left:3px solid var(--tm-acc);
  border-radius:12px;
  padding:11px 12px 10px;
  display:flex;flex-direction:column;gap:8px;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
  transition:border-color .15s,box-shadow .18s,transform .18s;
}
.tm-card:hover{
  border-color:var(--tm-acc-line);
  box-shadow:0 4px 14px rgba(15,23,42,.07);
  transform:none;
}
@media(prefers-reduced-motion:reduce){ .tm-card,.tm-card:hover{transform:none} }
.tm-card[data-dir="up"]{border-left-color:var(--tm-up)}
.tm-card[data-dir="down"]{border-left-color:var(--tm-down)}
.tm-card[hidden]{display:none}

/* ── card archetypes ────────────────────────────────────────────────────────
   Fifty-six cards leading with the same shape is a directory, not a read. Each
   card now leads with the figure that makes THAT market worth a look, and the
   kind only changes EMPHASIS — never the facts. Every card still prints the
   quote, 24h volume, liquidity, fee, spread and days left.

   mover   → the travel, because the change is the story
   deep    → the money, because size is the story
   closing → the clock, because time is the story
   plain   → the quote, as before                                    */

.tm-card[data-kind="mover"] .tm-pv{font-size:19px}
.tm-card[data-kind="deep"] .tm-m:first-child .tm-mv{
  color:#0c4a6e;font-size:12.5px;
}
.tm-card[data-kind="deep"] .tm-m:first-child .tm-ml{color:#0369a1}
.tm-card[data-kind="closing"] .tm-m:last-child .tm-mv[data-tone="soon"]{font-size:12.5px}

/* The one-line story. A sentence, not a badge — it carries the reasoning. */
.tm-story{
  font-size:11.5px;line-height:1.5;color:var(--tm-body);
  margin:0;padding-top:1px;
  font-variant-numeric:tabular-nums;
}

/* ── sparkline + live quote ─────────────────────────────────────────────────
   Drawn only from real CLOB bars, and only for markets whose token we actually
   hold. The block stays `hidden` until a series arrives, so an absent chart is
   absent rather than an empty trough that reads as missing data.

   MOTION RULE: nothing here animates on a timer. The stroke draws once when it
   arrives; the tick flashes once when a new quote differs. A page that moves
   without new information is a slot machine, not a data tool.            */

.tm-quote{
  display:flex;align-items:flex-end;gap:9px;
  padding:1px 0 2px;
}
.tm-quote[hidden]{display:none}

.tm-spark{flex:1;min-width:0;height:30px;position:relative}
.tm-spark[hidden]{display:none}
.tm-spark svg{display:block;width:100%;height:100%;overflow:visible}

.tm-spark-l{
  fill:none;stroke:var(--tm-acc);stroke-width:1.6;
  stroke-linejoin:round;stroke-linecap:round;
  vector-effect:non-scaling-stroke;
  stroke-dasharray:400;stroke-dashoffset:400;
  animation:tm-draw .55s ease-out forwards;
}
.tm-spark-a{fill:rgba(2,132,199,.10);stroke:none}

/* Direction tints the stroke only where the API reported a 24h move. */
.tm-spark[data-dir="up"] .tm-spark-l{stroke:var(--tm-up)}
.tm-spark[data-dir="up"] .tm-spark-a{fill:rgba(21,128,61,.10)}
.tm-spark[data-dir="down"] .tm-spark-l{stroke:var(--tm-down)}
.tm-spark[data-dir="down"] .tm-spark-a{fill:rgba(185,28,28,.10)}

@keyframes tm-draw{to{stroke-dashoffset:0}}
@media(prefers-reduced-motion:reduce){
  .tm-spark-l{animation:none;stroke-dashoffset:0}
}

/* The observed low–high band, printed as a range. Both ends are real quotes;
   which one is the bid is never claimed. */
.tm-spark-r{
  position:absolute;right:0;top:-1px;
  font-family:'JetBrains Mono',monospace;font-size:8.5px;font-weight:700;
  color:var(--tm-mute);font-variant-numeric:tabular-nums;
  background:var(--tm-card);padding:0 2px;
}

.tm-lq{
  flex-shrink:0;text-align:right;
  font-family:'JetBrains Mono',monospace;font-size:10.5px;font-weight:800;
  color:var(--tm-body);font-variant-numeric:tabular-nums;white-space:nowrap;
  border-radius:4px;padding:1px 3px;margin-right:-3px;
  transition:background .2s,color .2s;
}
.tm-lq[aria-label]:empty{display:none}

/* A tick, not a loop: 1.2 s, then gone. Colour alone carries the direction, so
   nothing moves under the reader's eye while they are reading. */
.tm-tick-up{background:rgba(21,128,61,.14);color:var(--tm-up)}
.tm-tick-down{background:rgba(185,28,28,.14);color:var(--tm-down)}
@media(prefers-reduced-motion:reduce){
  .tm-lq{transition:none}
}

/* Honest freshness tag in the hero: says "live" only while polling succeeds. */
.tm-live{
  margin-left:7px;font-family:'JetBrains Mono',monospace;
  font-size:9px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;
  color:var(--tm-mute);
}
.tm-live[data-state="on"]{color:var(--tm-up)}
.tm-dot[data-live="off"]{animation:none;background:var(--tm-line2)}

/* head: rank + cluster + big probability */
.tm-ch{display:flex;align-items:flex-start;gap:9px}
.tm-rank{
  font-family:'JetBrains Mono',monospace;font-size:10px;font-weight:700;
  color:var(--tm-mute);flex-shrink:0;padding-top:2px;min-width:15px;
}
.tm-chb{flex:1;min-width:0}
.tm-cat{
  font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:var(--tm-mute);margin-bottom:2px;
}
.tm-title{
  display:block;font-size:13px;font-weight:700;line-height:1.35;
  color:var(--tm-ink);overflow-wrap:break-word;
}
.tm-title:hover{color:var(--tm-acc)}
.tm-leg{
  display:block;margin-top:2px;
  font-size:11px;font-weight:500;color:var(--tm-mute);line-height:1.35;
}

/* probability block */
.tm-pb{flex-shrink:0;text-align:right}
.tm-pv{
  display:block;font-family:'JetBrains Mono',monospace;
  font-size:17px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;
}
.tm-pv[data-dir="up"]{color:var(--tm-up)}
.tm-pv[data-dir="down"]{color:var(--tm-down)}
.tm-pd{
  display:block;margin-top:2px;
  font-family:'JetBrains Mono',monospace;font-size:9.5px;font-weight:700;
  color:var(--tm-mute);font-variant-numeric:tabular-nums;
}
.tm-pd[data-dir="up"]{color:var(--tm-up)}
.tm-pd[data-dir="down"]{color:var(--tm-down)}

/* bar */
.tm-bar{height:5px;border-radius:99px;background:var(--tm-sunk);overflow:hidden}
.tm-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--tm-acc),var(--tm-acc-2))}
.tm-bar i[data-dir="up"]{background:linear-gradient(90deg,#15803d,#22c55e)}
.tm-bar i[data-dir="down"]{background:linear-gradient(90deg,#b91c1c,#ef4444)}

/* metric strip — the decision numbers */
.tm-ms{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;padding-top:7px;border-top:1px solid var(--tm-line);
}
.tm-m{min-width:0}
.tm-mv{
  display:block;font-family:'JetBrains Mono',monospace;
  font-size:12px;font-weight:700;line-height:1.2;
  font-variant-numeric:tabular-nums;color:var(--tm-ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.tm-ml{
  display:block;font-size:8.5px;font-weight:700;letter-spacing:.05em;
  text-transform:uppercase;color:var(--tm-mute);margin-top:1px;
}
.tm-mv[data-tone="free"]{color:var(--tm-up)}
.tm-mv[data-tone="cost"]{color:var(--tm-warn)}
.tm-mv[data-tone="soon"]{color:var(--tm-warn)}

/* foot */
.tm-cf{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tm-open{
  font-size:11px;font-weight:700;color:var(--tm-acc);
  text-decoration:none;white-space:nowrap;
}
.tm-open:hover{text-decoration:underline}
.tm-close{
  font-size:10.5px;color:var(--tm-mute);
  font-family:'JetBrains Mono',monospace;margin-left:auto;white-space:nowrap;
}

/* ── charts: the action map + the crowd ─────────────────────────────────────
   Two pictures, not paragraphs. Drawn as inline SVG at a fixed viewBox so they
   scale cleanly on a phone without any per-breakpoint coordinate maths.
   No frame, no fill, no shadow: these sit on the page like a diagram in a
   magazine spread rather than a widget in a dashboard. */

.tm-ig{
  display:grid;grid-template-columns:1fr 1fr;gap:14px;
  margin:0 0 14px;padding:0;
}
@media(max-width:860px){ .tm-ig{grid-template-columns:1fr;gap:10px} }

.tm-fig{margin:0;min-width:0;display:flex;flex-direction:column;background:#fff;border:1px solid var(--tm-line);border-radius:12px;padding:12px 14px}

.tm-fig-h{margin-bottom:8px}
.tm-fig-t{
  font-size:12.5px;font-weight:800;letter-spacing:-.01em;
  color:var(--tm-ink);margin-bottom:3px;
}
.tm-fig-s{font-size:11px;line-height:1.5;color:var(--tm-mute)}

.tm-fig-n{
  margin-top:8px;font-size:11.5px;line-height:1.5;color:var(--tm-body);
}
.tm-fig-n[hidden]{display:none}
.tm-fig-n b{color:var(--tm-ink);font-weight:800;font-variant-numeric:tabular-nums}
.tm-fig-n b[data-dir="up"]{color:var(--tm-up)}
.tm-fig-n b[data-dir="down"]{color:var(--tm-down)}

.tm-scatter,.tm-hist{width:100%;min-width:0}
.tm-scatter svg,.tm-hist svg{display:block;width:100%;height:auto}

/* scatter internals */
.tm-sc-dot{fill-opacity:.62;stroke:#fff;stroke-width:1;transition:fill-opacity .12s}
.tm-sc-dot:hover{fill-opacity:.95}
.tm-sc-zero{stroke:var(--tm-line2);stroke-width:1}
.tm-sc-grid{stroke:var(--tm-line);stroke-width:1;stroke-dasharray:2 3}
.tm-sc-gridx{stroke:var(--tm-line);stroke-width:1}
.tm-sc-ty,.tm-sc-tx,.tm-sc-t0,.tm-sc-ax{
  font-family:'JetBrains Mono',monospace;font-size:8px;font-weight:700;
  fill:var(--tm-mute);font-variant-numeric:tabular-nums;
}
.tm-sc-ax{fill:var(--tm-line2)}

/* histogram internals */
.tm-hi-bar{fill:var(--tm-acc);fill-opacity:.5;transition:fill-opacity .12s}
.tm-hi-bar:hover{fill-opacity:.8}
.tm-hi-fee{
  fill:none;stroke:#f59e0b;stroke-width:1.4;stroke-dasharray:3 2;
  opacity:.85;vector-effect:non-scaling-stroke;
}
.tm-hi-n{
  font-family:'JetBrains Mono',monospace;font-size:7.5px;font-weight:800;
  fill:var(--tm-body);font-variant-numeric:tabular-nums;
}
.tm-hi-x,.tm-hi-ax{
  font-family:'JetBrains Mono',monospace;font-size:8px;font-weight:700;
  fill:var(--tm-mute);font-variant-numeric:tabular-nums;
}
.tm-hi-ax{fill:var(--tm-line2)}

/* ── page copy blocks (pSEO body, kept below the tool) ─────────────────── */

.tm-sec{margin:26px 0 0;max-width:760px}
.tm-sec h2{font-size:16px;font-weight:800;letter-spacing:-.02em;margin-bottom:8px}
.tm-sec h3{font-size:14.5px;font-weight:700;margin:16px 0 6px}
.tm-sec p{font-size:13.5px;line-height:1.72;color:var(--tm-body);margin-bottom:10px}
.tm-sec ul{margin:0 0 12px 17px}
.tm-sec li{font-size:13px;line-height:1.7;color:var(--tm-body);margin-bottom:4px}

.tm-links{
  display:flex;gap:6px;flex-wrap:wrap;margin:18px 0 0;
  padding-top:14px;border-top:1px solid var(--tm-line);
}
.tm-links a{
  font-size:11.5px;font-weight:700;color:var(--tm-body);
  border:1px solid var(--tm-line);border-radius:20px;
  padding:5px 11px;background:var(--tm-card);
  white-space:nowrap;
}
.tm-links a:hover{color:var(--tm-acc);border-color:var(--tm-acc-line);text-decoration:none}
.tm-links a[aria-current="page"]{background:var(--tm-acc);border-color:var(--tm-acc);color:#fff}

.tm-foot{
  margin-top:22px;padding-top:14px;border-top:1px solid var(--tm-line);
  font-size:11px;line-height:1.7;color:var(--tm-mute);max-width:760px;
}

/* Preset cluster mode: /trending/<cluster>.html sets data-cluster on <body>.
   The page is already scoped to one cluster, so the filter tabs are noise. */
body[data-cluster] .tm-tabs{display:none}
body[data-cluster] .tm-controls{margin-bottom:6px}

/* skip link for keyboard users */
.tm-skip{
  position:absolute;left:-9999px;top:0;z-index:100;
  background:var(--tm-acc);color:#fff;padding:9px 14px;
  font-size:12px;font-weight:700;border-radius:0 0 8px 0;
}
.tm-skip:focus{left:0}
