/* =============================================================================
 * site.css — design system + the news/markets site.
 *
 * TYPOGRAPHY
 * ----------
 * The reference design uses two licensed families that cannot be redistributed:
 *   · a heavy, slightly condensed grotesque for display (Bw Haas Grotesk /
 *     Neue Haas Grotesk Display) — headlines, wordmark, big numbers
 *   · a geometric sans for UI and body (AvenirNext for BBG)
 * The @font-face blocks below declare them under their real family names and
 * point at ./fonts/. Drop the licensed .woff2 files in with those names and the
 * whole site switches over with no other change. Until then the stacks fall
 * back to the closest widely-available faces, in order.
 *
 * COLOUR
 * ------
 * Brand spine is black / white / Sunshade amber (#FFA028). Market up/down,
 * hairlines and the terminal palette are derived from that.
 * ========================================================================== */

/* --------------------------------------------------- licensed originals ---
 * The reference design's own faces are proprietary, so no files ship here.
 * They are still FIRST in the --display / --ui stacks below, which means:
 *   · anyone with them installed locally already gets them, and
 *   · dropping the .woff2 files into ./fonts/ and uncommenting this block
 *     switches every headline, label and number over with no other change.
 * (Left commented so the browser never requests files that do not exist.)
 *
 * @font-face { font-family:'BW Haas Grotesk Display'; font-weight:700;
 *   src:url('../fonts/BWHaasGrotesk-Bold.woff2') format('woff2'); font-display:swap; }
 * @font-face { font-family:'BW Haas Grotesk Display'; font-weight:900;
 *   src:url('../fonts/BWHaasGrotesk-Black.woff2') format('woff2'); font-display:swap; }
 * @font-face { font-family:'AvenirNext for BBG'; font-weight:400;
 *   src:url('../fonts/AvenirNextForBBG-Regular.woff2') format('woff2'); font-display:swap; }
 * @font-face { font-family:'AvenirNext for BBG'; font-weight:600;
 *   src:url('../fonts/AvenirNextForBBG-Demi.woff2') format('woff2'); font-display:swap; }
 * @font-face { font-family:'AvenirNext for BBG'; font-weight:700;
 *   src:url('../fonts/AvenirNextForBBG-Bold.woff2') format('woff2'); font-display:swap; }
 * ------------------------------------------------------------------------ */

/* ------------------------------------------------------ bundled fallbacks ---
 * Self-hosted, SIL OFL, no external requests. Archivo is the closest open
 * grotesque to the display face; Nunito Sans stands in for the geometric UI
 * face; Roboto Mono carries every number. Licenses in ./fonts/.
 * ------------------------------------------------------------------------ */
@font-face { font-family: 'Archivo'; src: url('../fonts/Archivo-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/Archivo-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/Archivo-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/Archivo-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/Archivo-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('../fonts/NunitoSans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('../fonts/NunitoSans-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Nunito Sans'; src: url('../fonts/NunitoSans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Roboto Mono'; src: url('../fonts/RobotoMono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Roboto Mono'; src: url('../fonts/RobotoMono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Roboto Mono'; src: url('../fonts/RobotoMono-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* --- type --- */
  --display: 'BW Haas Grotesk Display', 'Neue Haas Grotesk Display Pro',
             'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ui: 'AvenirNext for BBG', 'Avenir Next', Avenir, 'Nunito Sans',
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  /* aliases kept so existing inline styles keep resolving */
  --serif: var(--display);          /* nothing is serif any more — display grotesque */
  --sans: var(--ui);

  /* --- brand --- */
  --black: #000000;
  --white: #ffffff;
  --amber: #ffa028;                 /* Sunshade — the brand accent */
  --amber-deep: #ff7a00;
  --brand-blue: #0068ff;

  /* --- surfaces --- */
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --bg-sunken: #ededed;
  --ink: #000000;
  --ink-2: #333333;
  --ink-3: #767676;
  --rule: #e0e0e0;
  --rule-2: #c8c8c8;
  --rule-strong: #000000;
  --chip: #f0f0f0;
  --link: #000000;
  --link-hover: #ff7a00;

  /* --- market --- */
  --up: #00a15a;
  --down: #ee1b22;
  --flat: #767676;
  --up-wash: rgba(0, 161, 90, .16);
  --down-wash: rgba(238, 27, 34, .16);

  --brandbar: #ffffff;
  --brandbar-ink: #000000;
  --shadow: 0 12px 34px rgba(0, 0, 0, .16);

  /* --- charts (read by charts.js) --- */
  --chart-line: #000000;
  --chart-grid: rgba(0, 0, 0, .07);
  --chart-axis: rgba(0, 0, 0, .38);
  --chart-text: #767676;
  --chart-cross: rgba(0, 0, 0, .5);
  --hm-flat: #58606a;

  --maxw: 1330px;
  --gutter: 24px;

  /* --- motion --- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --fast: 140ms;
  --med: 260ms;
  --slow: 620ms;
}

html[data-theme='dark'] {
  --bg: #0a0a0a;
  --bg-alt: #141414;
  --bg-sunken: #1c1c1c;
  --ink: #ffffff;
  --ink-2: #d6d6d6;
  --ink-3: #949494;
  --rule: #2b2b2b;
  --rule-2: #3a3a3a;
  --rule-strong: #ffffff;
  --chip: #1c1c1c;
  --link: #ffffff;
  --link-hover: var(--amber);
  --brandbar: #000000;
  --brandbar-ink: #ffffff;
  --chart-line: #ffffff;
  --chart-grid: rgba(255, 255, 255, .09);
  --chart-axis: rgba(255, 255, 255, .38);
  --chart-text: #949494;
  --chart-cross: rgba(255, 255, 255, .55);
  --shadow: 0 12px 34px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
/* A canvas sizes itself from its parent at draw time; if it is drawn before
   layout settles it can end up wider than its box. This clamps it either way. */
canvas { max-width: 100%; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.028em; line-height: 1.04; }
h1, h2, h3, h4, p, li, a, td, th { overflow-wrap: break-word; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* =============================================================== masthead ==
 * White bar, black wordmark, hairline rules, condenses on scroll.
 * ========================================================================== */
.topbar {
  background: var(--brandbar);
  color: var(--brandbar-ink);
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid var(--rule);
  transition: box-shadow var(--med) var(--ease);
}
.topbar.pinned { box-shadow: 0 1px 12px rgba(0, 0, 0, .14); }
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: 58px; display: flex; align-items: center; gap: 22px;
  transition: height var(--med) var(--ease);
}
.topbar.pinned .topbar-inner { height: 48px; }

.brand {
  font-family: var(--display);
  font-weight: 900; font-size: 28px; letter-spacing: -.035em;
  display: flex; align-items: center; gap: 9px; color: var(--brandbar-ink);
  line-height: 1; flex: 0 0 auto;
  transition: font-size var(--med) var(--ease);
}
.topbar.pinned .brand { font-size: 23px; }
.brand:hover { text-decoration: none; color: var(--brandbar-ink); }
.brand-mark {
  width: 27px; height: 27px; display: grid; place-items: center;
  background: var(--brandbar-ink); color: var(--brandbar); font-size: 18px;
  font-weight: 900; border-radius: 0; flex: 0 0 auto;
}

.topnav { display: flex; gap: 20px; align-items: center; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.topnav a {
  position: relative; color: var(--brandbar-ink); font-family: var(--ui);
  font-size: 13px; font-weight: 600; white-space: nowrap; padding: 18px 0;
  letter-spacing: .005em;
}
/* nav underline wipes in from the left */
.topnav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 12px; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform var(--med) var(--ease);
}
.topnav a:hover { text-decoration: none; }
.topnav a:hover::after, .topnav a.active::after { transform: scaleX(1); }
.topnav a.active::after { background: var(--ink); }

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.icon-btn {
  background: transparent; border: 0; color: var(--brandbar-ink); padding: 7px;
  border-radius: 0; display: grid; place-items: center;
  transition: color var(--fast) linear, transform var(--fast) var(--ease);
}
.icon-btn:hover { color: var(--amber-deep); transform: translateY(-1px); }

/* Data-source badge: states what the numbers on screen actually are. */
.src-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
  font-family: var(--ui); font-size: 10px; font-weight: 700; letter-spacing: .12em;
  border: 1px solid var(--rule-2); color: var(--ink-3); white-space: nowrap; cursor: help;
}
.src-badge .live-dot { background: var(--flat); }
.src-badge .live-dot::after { border-color: var(--flat); }
.src-badge.live { color: var(--up); border-color: var(--up); }
.src-badge.live .live-dot { background: var(--up); }
.src-badge.live .live-dot::after { border-color: var(--up); }
.src-badge.sim { color: var(--amber-deep); border-color: var(--amber-deep); }
.src-badge.sim .live-dot { background: var(--amber-deep); animation: none; }
.src-badge.sim .live-dot::after { display: none; }
.src-badge.booting { opacity: .7; }
@media (max-width: 860px) { .src-badge { display: none; } }

.btn {
  position: relative; overflow: hidden;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font-family: var(--ui); padding: 9px 18px; font-size: 13px; font-weight: 700;
  letter-spacing: .01em; border-radius: 0;
  transition: background var(--fast) linear, color var(--fast) linear, border-color var(--fast) linear;
}
.btn:hover { background: var(--amber-deep); border-color: var(--amber-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-sub { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.menu-btn { display: none; }
.only-mobile { display: none !important; }

/* mega menu */
.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: var(--bg);
  border-top: 1px solid var(--rule); border-bottom: 3px solid var(--ink);
  box-shadow: var(--shadow); z-index: 59;
  display: block; opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--med) var(--ease), transform var(--med) var(--ease), visibility var(--med);
}
.mega.open { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 26px var(--gutter) 30px;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px;
}
.mega h4 {
  font-family: var(--ui); font-size: 11px; text-transform: uppercase;
  letter-spacing: .12em; color: var(--amber-deep); margin-bottom: 10px;
}
.mega a {
  display: block; font-family: var(--display); font-weight: 700; font-size: 14px;
  line-height: 1.22; padding: 5px 0; letter-spacing: -.01em;
}
.mega a:hover { color: var(--amber-deep); }

/* ============================================================ ticker tape ==
 * Black strip, continuous marquee, arrow glyphs, per-cell flash on tick.
 * ========================================================================== */
.tape {
  background: var(--black); border-bottom: 1px solid var(--black);
  overflow: hidden; position: relative; height: 36px;
}
.tape-track { display: flex; gap: 0; align-items: center; height: 36px; white-space: nowrap; will-change: transform; }
.tape.paused .tape-track { animation-play-state: paused; }
@keyframes tape-scroll { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

.tape-item {
  display: inline-flex; gap: 8px; align-items: baseline; font-size: 12px;
  padding: 0 16px; border-right: 1px solid #242424; height: 36px; line-height: 36px;
  color: #fff; transition: background var(--fast) linear;
}
.tape-item:hover { background: #1a1a1a; text-decoration: none; }
.tape-item .t-sym { font-family: var(--ui); font-weight: 700; letter-spacing: .04em; font-size: 11px; }
.tape-item .t-px { font-family: var(--mono); color: #e6e6e6; font-size: 12px; }
.tape-item .t-chg { font-family: var(--mono); font-size: 11.5px; font-weight: 500; }
.tape-item .t-chg.up::before { content: '▲'; font-size: 8px; margin-right: 3px; }
.tape-item .t-chg.down::before { content: '▼'; font-size: 8px; margin-right: 3px; }

/* price flash — background pulse, the way a live blotter behaves */
.flash-up { animation: fl-up 620ms var(--ease); }
.flash-down { animation: fl-dn 620ms var(--ease); }
@keyframes fl-up {
  0% { background: var(--up); color: #fff; }
  35% { background: var(--up-wash); color: inherit; }
  100% { background: transparent; }
}
@keyframes fl-dn {
  0% { background: var(--down); color: #fff; }
  35% { background: var(--down-wash); color: inherit; }
  100% { background: transparent; }
}
/* the big quote number gets a slide instead of a wash */
@keyframes px-in { from { transform: translateY(-24%); opacity: .25; } to { transform: translateY(0); opacity: 1; } }
.px-roll { animation: px-in 240ms var(--ease); }

/* ============================================================== breaking == */
.breaking {
  background: var(--down); color: #fff; font-family: var(--ui); font-size: 13px;
  font-weight: 700; display: flex; align-items: center; gap: 14px;
  padding: 9px var(--gutter); overflow: hidden;
  animation: slide-down 420ms var(--ease);
}
@keyframes slide-down { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.breaking .lbl {
  text-transform: uppercase; letter-spacing: .14em; font-size: 10px;
  background: #fff; color: var(--down); padding: 3px 7px; flex: 0 0 auto;
}
.breaking a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .55); }
.breaking a:hover { border-bottom-color: #fff; }
.breaking button { margin-left: auto; background: none; border: 0; color: #fff; font-size: 17px; line-height: 1; }

/* ================================================================= layout == */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 28px 0 52px; }
.layout-wide { grid-template-columns: minmax(0, 1fr); }
.rail { border-left: 1px solid var(--rule); padding-left: 26px; }
.rail section + section { margin-top: 30px; }

.lead {
  display: grid; grid-template-columns: 1.62fr 1fr; gap: 30px;
  padding-bottom: 26px; border-bottom: 3px solid var(--rule-strong);
}
.lead .stack { display: flex; flex-direction: column; gap: 20px; }
/* the lead photo is cropped wider so the headline stays above the fold */
.lead > .card:first-child .thumb { aspect-ratio: 16 / 9; }

/* ---------------------------------------------------------- typography --- */
.eyebrow {
  font-family: var(--ui); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em; color: var(--amber-deep);
}
.eyebrow.sec { color: var(--sec, var(--amber-deep)); }

.hl-xl, .hl-l, .hl-m, .hl-s {
  font-family: var(--display); letter-spacing: -.028em; text-wrap: balance;
}
.hl-xl { font-size: clamp(30px, 3.4vw, 45px); line-height: 1; font-weight: 900; letter-spacing: -.032em; margin-top: 8px; }
.hl-l  { font-size: clamp(23px, 2vw, 30px); line-height: 1.04; font-weight: 700; margin-top: 6px; }
.hl-m  { font-size: 20px; line-height: 1.1; font-weight: 700; margin-top: 5px; }
.hl-s  { font-size: 15.5px; line-height: 1.16; font-weight: 700; letter-spacing: -.018em; margin-top: 4px; }

.dek {
  font-family: var(--ui); color: var(--ink-2); font-size: 15px; line-height: 1.45;
  margin-top: 10px; font-weight: 400;
}
.byline {
  font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); margin-top: 10px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; letter-spacing: .01em;
}
.byline .dot::before { content: '·'; margin-right: 8px; }
/* Story sentiment, shown only when the score is decisive. */
.sent { font-weight: 700; font-size: 10.5px; letter-spacing: .04em; }
.sent.pos { color: var(--up); }
.sent.neg { color: var(--down); }

/* ------------------------------------------------------------------ cards -- */
.card { display: grid; gap: 12px; }
.card .thumb {
  aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg-sunken);
  transition: transform var(--slow) var(--ease), filter var(--slow) var(--ease);
}
.card > div { min-width: 0; }
.card:hover .thumb { transform: scale(1.035); filter: brightness(1.04); }
.card > div, .card > a { overflow: hidden; }
.card.row { grid-template-columns: minmax(0, 1fr) 128px; align-items: start; gap: 18px; }
.card.row .thumb { aspect-ratio: 1 / 1; }
/* Text-only cards (no publisher photo): collapse the empty image column. */
.card.row.noimg { grid-template-columns: minmax(0, 1fr); }
.card.noimg > div { border-top: 2px solid var(--rule-strong); padding-top: 10px; }
.lead > .card.noimg:first-child > div { border-top: 3px solid var(--rule-strong); padding-top: 12px; }
/* headline underline fades in on hover, like the reference */
.card .hl-xl, .card .hl-l, .card .hl-m, .card .hl-s {
  text-decoration: underline 1px transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--fast) linear, color var(--fast) linear;
}
.card:hover .hl-xl, .card:hover .hl-l, .card:hover .hl-m, .card:hover .hl-s {
  text-decoration-color: currentColor;
}
.card:hover .thumb { will-change: transform; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.layout > *, .lead > *, .stack > *, .grid-2 > *, .grid-3 > *, .grid-4 > *,
.mkt-hero > *, .stat-grid > *, .plans > *, .footer-grid > *, .card > * { min-width: 0; }

.strip { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.strip:last-child { border-bottom: 0; }
.strip-head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px;
  border-bottom: 3px solid var(--rule-strong); padding-bottom: 7px;
}
.strip-head h2 {
  font-family: var(--ui); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
}
.strip-head a.more {
  margin-left: auto; font-family: var(--ui); font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink);
}
.strip-head a.more:hover { color: var(--amber-deep); }

.premium::after {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 6px;
  background: var(--amber); vertical-align: baseline;
  clip-path: polygon(50% 0, 62% 38%, 100% 38%, 69% 62%, 81% 100%, 50% 76%, 19% 100%, 31% 62%, 0 38%, 38% 38%);
}
.tag {
  display: inline-block; font-family: var(--ui); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; padding: 4px 7px;
  background: var(--ink); color: var(--bg);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--down);
  display: inline-block; position: relative;
}
.live-dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid var(--down); animation: ring 1.8s var(--ease) infinite;
}
@keyframes ring {
  0% { transform: scale(.6); opacity: .9; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ================================================================= tables == */
.tbl { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 13px; }
.tbl th {
  text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .13em;
  color: var(--ink-3); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--ink);
  position: sticky; top: 0; background: var(--bg); cursor: pointer; white-space: nowrap;
  transition: color var(--fast) linear;
}
.tbl th:hover { color: var(--amber-deep); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th.sorted { color: var(--ink); }
.tbl th.sorted::after { content: ' ▾'; }
.tbl th.sorted.asc::after { content: ' ▴'; }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.tbl td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.tbl tbody tr { cursor: pointer; transition: background var(--fast) linear; }
.tbl tbody tr:hover { background: var(--bg-alt); }
.tbl .sym { font-weight: 700; letter-spacing: .01em; }
.tbl .nm { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.tbl-wrap { overflow-x: auto; max-width: 100%; }

/* rail widgets */
.widget-title {
  font-family: var(--ui); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .16em; font-weight: 700; border-bottom: 3px solid var(--rule-strong);
  padding-bottom: 6px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank-list li {
  counter-increment: r; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-weight: 700; font-size: 14.5px; line-height: 1.18;
  letter-spacing: -.018em;
}
.rank-list li::before {
  content: counter(r); font-family: var(--mono); color: var(--amber-deep);
  font-weight: 700; font-size: 15px;
}
.rank-list a:hover { color: var(--amber-deep); }
.mini-quote {
  display: flex; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--rule); font-size: 13px; align-items: baseline;
  transition: padding-left var(--fast) var(--ease);
}
a.mini-quote:hover { padding-left: 4px; text-decoration: none; }
.mini-quote .l { font-weight: 700; }
.mini-quote .r { font-family: var(--mono); font-size: 12.5px; text-align: right; }

.wire-list { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 11.5px; }
.wire-list li {
  padding: 7px 0; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 10px;
  animation: wire-in 420ms var(--ease) both;
}
@keyframes wire-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.wire-list .w-t { color: var(--ink-3); }
.wire-list .w-h { color: var(--ink); line-height: 1.32; }
.wire-list li.pr1 .w-h { color: var(--down); font-weight: 700; }
.wire-list li.pr2 .w-h { color: var(--amber-deep); }

/* ================================================================== quote == */
.quote-head { padding: 26px 0 16px; border-bottom: 1px solid var(--rule); }
.quote-px { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.quote-px .px {
  font-family: var(--mono); font-size: 46px; font-weight: 700; letter-spacing: -.035em;
  line-height: 1; display: inline-block;
}
.quote-px .chg { font-family: var(--mono); font-size: 19px; font-weight: 600; }
.quote-meta { font-family: var(--ui); font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.chart-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 0; }
.seg { display: inline-flex; border: 1px solid var(--ink); overflow: hidden; }
.seg button {
  background: transparent; border: 0; padding: 6px 12px; font-family: var(--ui);
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); border-right: 1px solid var(--rule);
  transition: background var(--fast) linear, color var(--fast) linear;
}
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--bg-alt); }
.seg button.on { background: var(--ink); color: var(--bg); }
.chart-box { height: 420px; position: relative; }
.chart-box canvas { display: block; }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule);
}
.stat {
  background: var(--bg); padding: 11px 13px;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.stat .k {
  font-family: var(--ui); font-size: 10px; text-transform: uppercase;
  letter-spacing: .13em; color: var(--ink-3); font-weight: 700;
}
.stat .v { font-family: var(--mono); font-size: 16px; font-weight: 700; margin-top: 4px; letter-spacing: -.02em; }

.range-bar { height: 3px; background: var(--bg-sunken); position: relative; margin: 12px 0 4px; }
.range-bar i {
  position: absolute; top: -4px; width: 3px; height: 11px; background: var(--ink);
  transition: left var(--slow) var(--ease);
}

/* ================================================================ article == */
.article { max-width: 700px; margin: 0 auto; padding: 34px 0 64px; }
.article h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: .98; font-weight: 900; letter-spacing: -.03em; }
.article .dek { font-size: 19px; line-height: 1.42; margin-top: 16px; color: var(--ink-2); }
.article .hero { margin: 26px 0 8px; }
.article .cap { font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); }
.article .body p {
  font-family: var(--ui); font-size: 18px; line-height: 1.62; margin: 24px 0;
  color: var(--ink); letter-spacing: -.003em;
}
.article .body p:first-child { font-size: 19.5px; }
.article .related { border-top: 3px solid var(--rule-strong); margin-top: 34px; padding-top: 18px; }
.paywall {
  position: relative; margin-top: -170px; padding-top: 170px;
  background: linear-gradient(to bottom, transparent, var(--bg) 42%);
}
.paywall-inner { border: 3px solid var(--ink); padding: 30px; text-align: center; }
.paywall-inner h3 { font-size: 30px; line-height: 1.04; font-weight: 900; letter-spacing: -.03em; }
.meter { font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }
.symbol-chip {
  display: inline-flex; gap: 7px; align-items: baseline; border: 1px solid var(--rule-2);
  padding: 4px 9px; font-family: var(--mono); font-size: 12px; margin: 0 6px 6px 0;
  transition: border-color var(--fast) linear, background var(--fast) linear;
}
.symbol-chip:hover { border-color: var(--ink); background: var(--bg-alt); text-decoration: none; }

/* ================================================================= modals == */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .62); z-index: 90;
  display: none; align-items: flex-start; justify-content: center; padding: 8vh 16px;
}
.overlay.open { display: flex; animation: fade-in var(--med) var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  background: var(--bg); width: min(640px, 100%); border: 0; border-top: 4px solid var(--amber);
  box-shadow: var(--shadow); padding: 30px;
  animation: sheet-in var(--med) var(--ease);
}
@keyframes sheet-in { from { transform: translateY(-14px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 28px; line-height: 1.04; font-weight: 900; letter-spacing: -.028em; margin-bottom: 8px; }
.sheet .close {
  position: absolute; top: 14px; right: 16px; background: none; border: 0;
  font-size: 24px; line-height: 1; color: var(--ink-3);
}
.sheet .close:hover { color: var(--ink); }
.field { display: block; margin: 16px 0; }
.field span {
  display: block; font-family: var(--ui); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .13em; color: var(--ink-3); font-weight: 700; margin-bottom: 6px;
}
.field input, .field select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--rule-2); background: var(--bg);
  color: var(--ink); font-family: var(--ui); font-size: 15px; border-radius: 0;
  transition: border-color var(--fast) linear;
}
.field input:focus { outline: none; border-color: var(--ink); border-width: 2px; }

.search-sheet { width: min(780px, 100%); padding: 0; }
.search-input {
  width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 22px 24px;
  font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.03em;
  background: transparent; color: var(--ink);
}
.search-input::placeholder { color: var(--ink-3); }
.search-input:focus { outline: none; }
.search-results { max-height: 62vh; overflow: auto; }
.search-group h5 {
  font-family: var(--ui); font-size: 10px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--amber-deep); padding: 14px 24px 5px; margin: 0; font-weight: 700;
}
.search-item { display: flex; gap: 14px; padding: 10px 24px; align-items: baseline; }
.search-item:hover, .search-item.on { background: var(--bg-alt); text-decoration: none; }
.search-item .s { font-family: var(--mono); font-weight: 700; min-width: 80px; }
.search-item .n { font-family: var(--display); font-weight: 700; font-size: 14.5px; letter-spacing: -.018em; color: var(--ink); }
.search-item .p { margin-left: auto; font-family: var(--mono); font-size: 13px; }

/* toasts */
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 95; }
.toast {
  background: var(--ink); color: var(--bg); padding: 12px 18px; font-family: var(--ui);
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow);
  border-left: 4px solid var(--amber); animation: toast-in 280ms var(--ease);
}
@keyframes toast-in { from { transform: translateX(18px); opacity: 0; } to { transform: none; opacity: 1; } }

/* live TV dock */
.tv-dock {
  position: fixed; right: 20px; bottom: 20px; width: 330px; background: #000; color: #fff;
  z-index: 80; box-shadow: var(--shadow); display: none;
}
.tv-dock.open { display: block; animation: dock-in 320ms var(--ease); }
@keyframes dock-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.tv-screen { aspect-ratio: 16 / 9; position: relative; overflow: hidden; background: #050505; }
.tv-screen .bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 3px; padding: 14px; opacity: .72; }
.tv-screen .bars i { flex: 1; background: linear-gradient(var(--amber), var(--amber-deep)); animation: eq 1.15s var(--ease) infinite alternate; }
@keyframes eq { from { height: 10%; } to { height: 92%; } }
.tv-meta { padding: 10px 13px; font-family: var(--ui); font-size: 12px; display: flex; align-items: center; gap: 9px; }
.tv-meta .live { background: var(--down); padding: 2px 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; }
.tv-dock .x { margin-left: auto; background: none; border: 0; color: #fff; font-size: 16px; line-height: 1; }
.tv-ticker {
  border-top: 1px solid #1e1e1e; padding: 7px 13px; font-family: var(--mono);
  font-size: 11px; color: var(--amber); overflow: hidden; white-space: nowrap;
}

/* ================================================================= footer == */
.site-footer { border-top: 3px solid var(--rule-strong); margin-top: 34px; padding: 38px 0 64px; background: var(--bg-alt); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 30px; }
.footer-grid h5 {
  font-family: var(--ui); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .16em; color: var(--ink-3); margin: 0 0 12px; font-weight: 700;
}
.footer-grid a { display: block; font-family: var(--ui); font-size: 13px; padding: 4px 0; color: var(--ink-2); }
.footer-grid a:hover { color: var(--amber-deep); text-decoration: none; }
.footer-note { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); }
.disclaimer { font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }

/* ========================================================== markets bits == */
.mkt-hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); background: var(--bg);
}
.mkt-cell {
  background: var(--bg); padding: 13px 15px; display: grid; gap: 4px;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  transition: background var(--fast) linear;
}
a.mkt-cell:hover { background: var(--bg-alt); text-decoration: none; }
.mkt-cell .nm {
  font-family: var(--ui); font-size: 10px; text-transform: uppercase;
  letter-spacing: .13em; color: var(--ink-3); font-weight: 700;
}
.mkt-cell .px { font-family: var(--mono); font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.mkt-cell .ch { font-family: var(--mono); font-size: 12px; }
.mkt-cell canvas { margin-top: 5px; }

.heatmap { height: 440px; position: relative; border: 1px solid var(--rule); background: var(--bg-sunken); }
.hm-cell {
  position: absolute; color: #fff; display: flex; flex-direction: column; align-items: center;
  justify-content: center; font-size: 11px; overflow: hidden; cursor: pointer;
  transition: outline-color var(--fast) linear;
  outline: 0 solid transparent;
}
.hm-cell:hover { outline: 2px solid var(--amber); outline-offset: -2px; z-index: 2; }
.hm-sym { font-family: var(--ui); font-weight: 700; letter-spacing: .06em; }
.hm-pct { font-family: var(--mono); font-size: 10.5px; opacity: .92; }
.legend { display: flex; gap: 10px; align-items: center; font-family: var(--ui); font-size: 11px; color: var(--ink-3); margin-top: 10px; }
.legend i { width: 24px; height: 10px; display: inline-block; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ink); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  background: none; border: 0; padding: 10px 16px; font-family: var(--ui); font-size: 12px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
  position: relative;
}
.tabs button::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform var(--med) var(--ease);
}
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); }
.tabs button.on::after { transform: scaleX(1); }

.watch-empty { padding: 30px; border: 1px dashed var(--rule-2); text-align: center; color: var(--ink-3); font-family: var(--ui); }
.pill {
  border: 1px solid var(--rule-2); background: var(--bg); padding: 5px 13px;
  font-family: var(--ui); font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ink-2); border-radius: 0;
  transition: all var(--fast) linear;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan {
  border: 1px solid var(--rule); padding: 26px; display: grid; gap: 12px; align-content: start;
  transition: border-color var(--med) var(--ease), transform var(--med) var(--ease);
}
.plan:hover { border-color: var(--ink); transform: translateY(-3px); }
.plan.featured { border: 3px solid var(--ink); }
.plan .price { font-family: var(--mono); font-size: 38px; font-weight: 700; letter-spacing: -.04em; }
.plan ul { margin: 0; padding-left: 18px; font-family: var(--ui); font-size: 14px; color: var(--ink-2); display: grid; gap: 7px; }

/* ------------------------------------------------- entrance / skeletons --- */
.reveal { animation: reveal 560ms var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.skeleton {
  background: linear-gradient(90deg, var(--bg-sunken) 25%, var(--bg-alt) 37%, var(--bg-sunken) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s linear infinite; color: transparent !important;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ============================================================ responsive == */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .rail { border-left: 0; padding-left: 0; border-top: 3px solid var(--rule-strong); padding-top: 20px; }
  .mega-inner { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .lead { grid-template-columns: minmax(0, 1fr); }
  .grid-3, .grid-4, .grid-2, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topnav { display: none; }
  .topnav.open {
    display: flex; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg);
    flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px;
    gap: 0; z-index: 61; border-bottom: 3px solid var(--ink); box-shadow: var(--shadow);
    overflow: visible;
  }
  .topnav.open a { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
  .topnav.open a::after { display: none; }
  .menu-btn { display: grid; }
  .topnav.open .only-mobile { display: block !important; }
  .chart-box { height: 320px; }
  .tv-dock { width: min(330px, calc(100vw - 40px)); }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2, .plans, .mega-inner, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .quote-px .px { font-size: 34px; }
  .brand { font-size: 22px; }
  .topbar-inner { gap: 8px; overflow: hidden; height: 52px; }
  .topbar-actions { gap: 2px; }
  #signBtn, #tvBtn { display: none; }
  .topbar-actions .icon-btn { padding: 5px; }
  .strip-head { flex-wrap: wrap; }
  .card.row { grid-template-columns: minmax(0, 1fr) 96px; gap: 14px; }
  .article .body p { font-size: 17px; }
}
@media (max-width: 430px) {
  #wlTopBtn { display: none; }
  .brand-mark { display: none; }
  #subBtn { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .tape-track { animation: none !important; }
}

@media print {
  .topbar, .tape, .rail, .site-footer, .tv-dock, .breaking, .share { display: none !important; }
  .article { max-width: none; }
}

/* ====================================================== front page v7 ===== */
/* Dense numbered headline board under the lead. */
.brief-list {
  columns: 2; column-gap: 34px; column-rule: 1px solid var(--rule);
  counter-reset: bl;
}
.brief-list a {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px;
  counter-increment: bl; break-inside: avoid;
  padding: 9px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--display); font-weight: 700; font-size: 15px;
  line-height: 1.2; letter-spacing: -.018em; color: var(--ink);
}
.brief-list a::before {
  content: counter(bl, decimal-leading-zero); font-family: var(--mono);
  font-size: 12px; color: var(--amber-deep); font-weight: 700; padding-top: 2px;
  grid-row: 1 / span 2;
}
.brief-list .bl-h { grid-column: 2; }
.brief-list a:hover { color: var(--amber-deep); text-decoration: none; }
.brief-list .bl-meta { grid-column: 2; display: block; font-family: var(--ui); font-weight: 400; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }
@media (max-width: 640px) { .brief-list { columns: 1; } }

/* Chronological headline river with a load-more control. */
.river { list-style: none; margin: 0; padding: 0; }
.river li { border-bottom: 1px solid var(--rule); }
.river a {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px;
  align-items: baseline; padding: 10px 0; color: var(--ink);
}
.river a:hover { text-decoration: none; }
.river a:hover .r-h { color: var(--amber-deep); }
.river .r-t { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.river .r-h { font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.22; letter-spacing: -.02em; transition: color var(--fast) linear; }
.river .r-src { font-family: var(--ui); font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.river .r-sec { font-family: var(--ui); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sec, var(--amber-deep)); margin-right: 8px; }
@media (max-width: 640px) { .river a { grid-template-columns: 44px minmax(0,1fr); } .river .r-src { display: none; } }

.load-btn {
  display: block; width: 100%; margin-top: 14px; padding: 11px;
  background: transparent; border: 1px solid var(--ink); color: var(--ink);
  font-family: var(--ui); font-size: 11.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; cursor: pointer;
  transition: background var(--fast) linear, color var(--fast) linear;
}
.load-btn:hover { background: var(--ink); color: var(--bg); }

/* Wire rail upgrades: clickable rows + NEW flash for fresh hits. */
.wire-list li a { color: inherit; display: contents; }
.wire-list .w-h:hover { color: var(--amber-deep); }
.w-new {
  display: inline-block; margin-left: 6px; padding: 1px 4px;
  background: var(--down); color: #fff; font-size: 8.5px; font-weight: 700;
  letter-spacing: .08em; vertical-align: 1px;
}
.updated-chip {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  padding: 8px 0 0; display: flex; align-items: center; gap: 7px;
}
.updated-chip .live-dot { width: 6px; height: 6px; }

/* Two-story feature band used by Technology / larger section blocks. */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.duo .card .thumb { aspect-ratio: 16 / 9; }
@media (max-width: 860px) { .duo { grid-template-columns: minmax(0, 1fr); } }

/* Compact text stack that sits beside a grid inside a section. */
.side-links { display: flex; flex-direction: column; }
.side-links a {
  font-family: var(--display); font-weight: 700; font-size: 14.5px; line-height: 1.22;
  letter-spacing: -.016em; color: var(--ink); padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.side-links a:hover { color: var(--amber-deep); text-decoration: none; }
.side-links .sl-meta { display: block; font-family: var(--ui); font-weight: 400; font-size: 10.5px; color: var(--ink-3); margin-top: 3px; }

/* Section block: grid of cards + side column of extra headlines. */
.sec-split { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); gap: 30px; }
@media (max-width: 860px) { .sec-split { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------- terminal flagship band -- */
.term-promo {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px; align-items: center;
  background: var(--black); color: var(--white);
  padding: 30px 34px; border: 1px solid var(--black);
  position: relative; overflow: hidden;
}
.term-promo::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 55%, rgba(255, 160, 40, .14));
}
.term-promo:hover { text-decoration: none; }
.tp-kicker {
  font-family: var(--ui); font-size: 10.5px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--amber);
}
.tp-title {
  font-family: var(--display); font-weight: 900; letter-spacing: -.03em;
  font-size: clamp(26px, 3vw, 38px); line-height: 1; margin-top: 8px; color: #fff;
}
.tp-title span { color: var(--amber); }
.tp-dek { font-family: var(--ui); font-size: 14px; line-height: 1.5; color: #c9c9c9; margin-top: 10px; max-width: 480px; }
.tp-cta {
  display: inline-block; margin-top: 16px; padding: 10px 18px;
  background: var(--amber); color: #000; font-family: var(--ui);
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  transition: background var(--fast) linear;
}
.term-promo:hover .tp-cta { background: #fff; }
.tp-right { display: grid; gap: 8px; font-family: var(--mono); font-size: 13px; color: #7dff9a; }
.tp-cmd { border: 1px solid #262626; background: #0d0d0d; padding: 9px 13px; white-space: nowrap; }
.tp-cmd span { color: var(--amber); }
@media (max-width: 860px) { .term-promo { grid-template-columns: minmax(0, 1fr); } .tp-right { display: none; } }

/* ========================================================== v8 additions == */
/* Trending topic chips under the market strip. */
.trend-strip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 0 2px;
}
.trend-lbl {
  font-family: var(--ui); font-size: 10px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--down);
  margin-right: 2px;
}
.trend-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border: 1px solid var(--rule-2);
  font-family: var(--ui); font-size: 12px; font-weight: 700; color: var(--ink);
  transition: border-color var(--fast) linear, background var(--fast) linear;
}
.trend-chip b {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--amber-deep);
}
.trend-chip:hover { border-color: var(--ink); background: var(--bg-alt); text-decoration: none; }
.trend-chip.alt { border-style: dashed; }

/* Top Stories: ranked photo rows in two columns. */
.ts-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 34px;
}
.ts-row {
  display: grid; grid-template-columns: 26px 76px minmax(0, 1fr); gap: 12px;
  align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.ts-row:hover { text-decoration: none; }
.ts-row:hover .ts-h { color: var(--amber-deep); }
.ts-n {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--amber-deep); align-self: start; padding-top: 4px;
}
.ts-img {
  width: 76px; height: 60px; object-fit: cover; background: var(--bg-sunken);
}
.ts-row:not(:has(.ts-img)) { grid-template-columns: 26px minmax(0, 1fr); }
.ts-body { min-width: 0; }
.ts-h {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: 15.5px; line-height: 1.2; letter-spacing: -.018em;
  transition: color var(--fast) linear;
}
.ts-meta {
  display: block; font-family: var(--ui); font-size: 10.5px;
  color: var(--ink-3); margin-top: 4px;
}
.ts-meta b { font-weight: 700; }
@media (max-width: 860px) { .ts-grid { grid-template-columns: minmax(0, 1fr); } }

/* =============================================== NIFTY 50 live heat map === */
.hm-top {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 20px; flex-wrap: wrap; padding: 22px 0 14px;
  border-bottom: 3px solid var(--rule-strong);
}
.hm-idx { display: flex; align-items: flex-end; gap: 34px; flex-wrap: wrap; }
.hm-px {
  font-family: var(--mono); font-size: clamp(30px, 4vw, 46px); font-weight: 700;
  letter-spacing: -.035em; line-height: 1; margin-top: 6px;
}
.hm-chg { font-family: var(--mono); font-size: 16px; font-weight: 600; margin-top: 6px; color: var(--ink-3); }
.hm-chg.up { color: var(--up); }
.hm-chg.down { color: var(--down); }
.hm-stats { display: flex; gap: 26px; flex-wrap: wrap; padding-bottom: 4px; }
.hm-stat { display: flex; flex-direction: column; gap: 3px; }
.hm-stat .k {
  font-family: var(--ui); font-size: 9.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
}
.hm-stat .v { font-family: var(--mono); font-size: 15px; font-weight: 700; }
.hm-stat .v.up { color: var(--up); }
.hm-stat .v.down { color: var(--down); }

.hm-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-bottom: 4px; }
.hm-clock {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
}
.hm-clock.stale { color: var(--down); }
.hm-clock.stale .live-dot { background: var(--ink-3); }

.hm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; padding: 20px 0 50px; }
.hm-map {
  position: relative; width: 100%; height: min(74vh, 760px);
  background: var(--bg-sunken); overflow: hidden;
}
.hm-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--ui); font-size: 13px; color: var(--ink-3);
}
.hm-tile {
  position: absolute; overflow: hidden; color: #fff; text-decoration: none;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 3px; line-height: 1.05; text-align: center;
  transition: background 380ms var(--ease), outline-color 120ms linear;
  outline: 0 solid transparent;
}
.hm-tile:hover { outline: 2px solid #fff; outline-offset: -2px; text-decoration: none; z-index: 3; }
.hm-tile.na { background: repeating-linear-gradient(45deg, #3a3e44, #3a3e44 6px, #33373c 6px, #33373c 12px) !important; }
.hm-sym { font-family: var(--ui); font-weight: 700; letter-spacing: -.01em; }
.hm-pct { font-family: var(--mono); font-weight: 700; margin-top: 2px; opacity: .97; }
.hm-last { font-family: var(--mono); font-size: 10px; opacity: .72; margin-top: 1px; }
@keyframes hm-tick-up { 0% { box-shadow: inset 0 0 0 2px #7dffb0; } 100% { box-shadow: inset 0 0 0 2px transparent; } }
@keyframes hm-tick-dn { 0% { box-shadow: inset 0 0 0 2px #ff9ba0; } 100% { box-shadow: inset 0 0 0 2px transparent; } }
.hm-tile.tick-up { animation: hm-tick-up 900ms var(--ease); }
.hm-tile.tick-dn { animation: hm-tick-dn 900ms var(--ease); }

.hm-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 10px; }
.hm-scale { display: flex; align-items: center; gap: 0; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.hm-scale i { width: 30px; height: 9px; display: inline-block; }
.hm-scale span { padding: 0 6px; }
.hm-note { font-family: var(--ui); font-size: 11px; color: var(--ink-3); }

/* sector rows */
.hm-sect { display: grid; gap: 2px; }
.sc-row {
  display: grid; grid-template-columns: 110px 62px minmax(60px, 1fr) 74px 60px;
  gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--rule);
  font-family: var(--ui); font-size: 12.5px;
}
.sc-n { font-weight: 700; }
.sc-p, .sc-c { font-family: var(--mono); font-size: 12px; text-align: right; }
.sc-b { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); text-align: right; }
.sc-bar { height: 9px; background: var(--bg-sunken); position: relative; }
.sc-bar i { position: absolute; top: 0; bottom: 0; left: 0; }
.sc-bar i.up { background: var(--up); }
.sc-bar i.dn { background: var(--down); }
@media (max-width: 640px) { .sc-row { grid-template-columns: 88px 56px 1fr 62px; } .sc-b { display: none; } }

/* rail */
.hm-rail { border-left: 1px solid var(--rule); padding-left: 24px; }
.hm-rail section + section { margin-top: 26px; }
.br-bar { display: flex; height: 12px; background: var(--bg-sunken); overflow: hidden; }
.br-bar i.up { background: var(--up); }
.br-bar i.dn { background: var(--down); }
.br-nums {
  display: flex; justify-content: space-between; margin-top: 7px;
  font-family: var(--ui); font-size: 12px; font-weight: 700;
}
.br-w {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--ui); font-size: 11px; color: var(--ink-3);
}
.br-w b { font-family: var(--mono); }

.cb-row {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) 52px; gap: 9px;
  align-items: center; padding: 7px 0; border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.cb-row:hover { text-decoration: none; color: var(--amber-deep); }
.cb-s { font-family: var(--ui); font-size: 12px; font-weight: 700; }
.cb-bar { height: 8px; background: var(--bg-sunken); position: relative; }
.cb-bar i { position: absolute; inset: 0 auto 0 0; }
.cb-bar i.up { background: var(--up); }
.cb-bar i.dn { background: var(--down); }
.cb-v { font-family: var(--mono); font-size: 11.5px; text-align: right; }

.in-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px;
  padding: 8px 0; border-bottom: 1px solid var(--rule);
}
.in-k { font-family: var(--ui); font-size: 12px; font-weight: 700; }
.in-v { font-family: var(--mono); font-size: 12.5px; font-weight: 700; text-align: right; }
.in-n { grid-column: 1 / -1; font-family: var(--ui); font-size: 10.5px; color: var(--ink-3); }

/* tooltip */
.hm-tip {
  position: fixed; z-index: 90; pointer-events: none;
  background: var(--bg); border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow); padding: 11px 13px; min-width: 220px;
  font-family: var(--ui); font-size: 12px;
}
.hm-tip b { font-size: 13px; }
.hm-tip .t-nm { color: var(--ink-3); font-size: 11px; }
.hm-tip .t-row {
  display: flex; justify-content: space-between; gap: 16px; margin-top: 5px;
  border-top: 1px solid var(--rule); padding-top: 5px;
}
.hm-tip .t-row span { color: var(--ink-3); }
.hm-tip .t-row b { font-family: var(--mono); font-size: 11.5px; }

@media (max-width: 1080px) {
  .hm-layout { grid-template-columns: minmax(0, 1fr); }
  .hm-rail { border-left: 0; padding-left: 0; border-top: 3px solid var(--rule-strong); padding-top: 18px; }
  .hm-map { height: 62vh; }
}
@media (max-width: 640px) {
  .hm-map { height: 74vh; }
  .hm-idx { gap: 18px; }
  .hm-stats { gap: 16px; }
}
