/* trendy · navy & gold research desk.
   Design system (ui-ux-pro-max, "Financial Trust" + banking navy/gold): dark navy by default, gold as
   the single action color (CTA, active setup, focus), green/red only for price direction.
   Frank Ruhl Libre for headlines, IBM Plex Sans Hebrew for text, IBM Plex Mono for every number. */
:root {
  /* "Black & gold": a black trading floor, gold for money and action, green/red only for direction. */
  --bg: #09090b; --surface: #131316; --surface-2: #1b1b20; --line: #27272d; --line-2: #34343b;
  --ink: #f3f1ec; --ink-2: #c4c1ba; --ink-3: #94918a;
  --teal: #e8b84a; --paper: #f3f1ec;
  --gold: #e8b84a; --gold-ink: #15100a; --logo-gold: #e8b84a;
  --violet: #e8b84a; --violet-soft: rgba(232, 184, 74, .10);
  --brand: #e8b84a; --brand-ink: #15100a;
  --field: #0f0f12; --field-ink: #f3f1ec;
  --link: #e8b84a; --focus: #e8b84a;
  --up: #34d399; --down: #f87171;
  --warn-bg: #2a2212; --warn-line: #5e4b1d; --warn-ink: #f2d38a;
  --s-ready: #e8b84a; --s-strong: #34d399; --s-turning: #b9a5ff; --s-emerging: #7ab8ff; --s-watch: #7a7a83;
  --chart-price: #f3f1ec; --chart-ema20: #7ab8ff; --chart-ema50: #e8b84a; --chart-grid: #1c1c21;
  --font-display: "Rubik", "IBM Plex Sans Hebrew", "Segoe UI", Arial, sans-serif;
  --font-body: "Rubik", "IBM Plex Sans Hebrew", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: 12px; --r-sm: 6px; --r-md: 12px; --r-lg: 20px;
  --maxw: 1180px;
  --shadow: none;
  color-scheme: dark;
}
:root[data-theme="light"] {
  /* Daylight: neutral paper, black ink, a deeper gold for action. */
  --bg: #f5f5f3; --surface: #ffffff; --surface-2: #ecebe8; --line: #dddbd5; --line-2: #cbc8c0;
  --ink: #121212; --ink-2: #3d3b37; --ink-3: #66625b;
  --teal: #121212; --paper: #f5f5f3;
  --gold: #9a6400; --gold-ink: #ffffff; --logo-gold: #b07a10;
  --violet: #9a6400; --violet-soft: rgba(154, 100, 0, .08);
  --brand: #121212; --brand-ink: #ffffff;
  --field: #121212; --field-ink: #f5f5f3;
  --link: #7a4f00; --focus: #9a6400;
  --up: #0e7c4a; --down: #c53041;
  --warn-bg: #fff4dc; --warn-line: #ecd08a; --warn-ink: #6b4a00;
  --s-ready: #9a6400; --s-strong: #0e7c4a; --s-turning: #6d4bd1; --s-emerging: #1f62b8; --s-watch: #6f6f78;
  --chart-price: #121212; --chart-ema20: #1f62b8; --chart-ema50: #9a6400; --chart-grid: #ebeae6;
  --shadow: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font-body); direction: rtl; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font: 900 clamp(2rem, 4vw, 2.9rem)/1.1 var(--font-display); letter-spacing: -.01em; }
h2 { font: 700 1.5rem/1.2 var(--font-display); }
h1 em { font-style: normal; color: var(--gold); }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 1rem; }
.xs { font-size: .8125rem; }
.up { color: var(--up); }
.down { color: var(--down); }
.label { font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
.section { padding-block: 40px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head p { margin-top: 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Header & market strip ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header > .wrap { display: flex; align-items: center; gap: 20px; min-height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 1.0625rem/1 var(--font-body); }
.brand svg { flex: none; }
.brand .logo { height: 30px; width: auto; display: block; }
.hero-brand .logo { height: 1.5em; width: auto; display: block; margin-inline-start: -.06em; }
.nav { display: flex; gap: 2px; margin-inline-start: auto; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm); font-size: .9375rem; font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--brand); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { color: var(--ink); }
@media (max-width: 760px) {
  .site-header > .wrap { flex-wrap: wrap; gap: 8px; padding-block: 8px; min-height: 0; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .header-actions { margin-inline-start: auto; }
}
.header-actions { display: flex; gap: 8px; align-items: center; }

.strip { background: var(--surface); border-bottom: 1px solid var(--line); font-size: .875rem; }
.strip .wrap { display: flex; gap: 22px; align-items: center; min-height: 40px; overflow-x: auto; white-space: nowrap; }
.strip-item { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); }
.strip-item b { color: var(--ink); font-weight: 600; }

/* ---------- Buttons, chips, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink-3); }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-sm { padding: 6px 12px; font-size: .875rem; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.status.boxed { padding: 3px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.st-ready { --c: var(--s-ready); }
.st-strong { --c: var(--s-strong); }
.st-turning { --c: var(--s-turning); }
.st-emerging { --c: var(--s-emerging); }
.st-watch { --c: var(--s-watch); }

.tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--r-sm); font-size: .8125rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .875rem; cursor: pointer; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.chip[aria-pressed="true"] .faint { color: inherit; opacity: .75; }

.input { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: var(--r-md); padding: 9px 12px; font: inherit; font-size: .9375rem; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: .875rem; color: var(--ink-2); cursor: pointer; }

/* ---------- Day header ---------- */
.day { padding-block: 36px 8px; }
.day .label { margin-bottom: 8px; }
.verdict { font-size: 1.125rem; color: var(--ink-2); max-width: 760px; margin-top: 12px; }
.verdict b { color: var(--ink); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); font-size: .9375rem; }
.notice svg { flex: none; margin-top: 3px; }
.notice.info { border-color: var(--line); background: var(--surface-2); color: var(--ink-2); }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.kpi { padding: 14px 18px; border-inline-start: 1px solid var(--line); }
.kpi:first-child { border-inline-start: 0; }
.kpi .v { font: 600 1.6rem/1.1 var(--font-mono); }
.kpi .l { margin-top: 6px; }
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(4) { border-inline-start: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--line); }
}

/* ---------- Setup cards ---------- */
.setup { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
/* The ticker link stretches over the whole card; the star sits above it. */
.setup .stretch { color: inherit; text-decoration: none; display: inline-block; }
.setup .stretch::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.setup .stretch:focus-visible { outline: none; }
.setup:has(.stretch:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.setup .star { position: relative; z-index: 1; }
.setup:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.setup-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ticker { font: 600 1.125rem/1.1 var(--font-mono); letter-spacing: .01em; direction: ltr; unicode-bidi: isolate; }
.coname { color: var(--ink-3); font-size: .8125rem; margin-top: 3px; }
.scorebox { text-align: center; min-width: 52px; }
.scorebox .n { font: 600 1.5rem/1 var(--font-mono); }
.scorebox .xs { color: var(--ink-3); }
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.levels div { background: var(--surface); padding: 8px 10px; }
.levels .v { font: 500 .9375rem/1.2 var(--font-mono); margin-top: 2px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.home-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 24px; }
@media (max-width: 960px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Changes ---------- */
.change-list { list-style: none; margin: 0; padding: 0; display: grid; }
.change-list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: .9375rem; flex-wrap: wrap; }
.change-list li:first-child { border-top: 0; }
.change-list a { text-decoration: none; color: var(--ink); }
.arrow { color: var(--ink-3); }

/* ---------- Theme bars (stacked by status) ---------- */
.theme-bars { display: grid; gap: 10px; }
.theme-bar { display: grid; grid-template-columns: minmax(110px, 160px) 1fr 36px; gap: 12px; align-items: center; font-size: .875rem; }
.stackbar { display: flex; gap: 2px; height: 12px; }
.stackbar span { background: var(--c); border-radius: 3px; min-width: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-2); }

/* ---------- Table ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--surface); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th { text-align: right; font-weight: 600; font-size: .8125rem; letter-spacing: .03em; color: var(--ink-3); background: var(--surface-2); padding: 10px 12px; white-space: nowrap; position: sticky; top: 0; }
table.data th button:not(.term-q) { all: unset; cursor: pointer; }
table.data th button:not(.term-q):hover, table.data th[aria-sort="ascending"] button:not(.term-q), table.data th[aria-sort="descending"] button:not(.term-q) { color: var(--ink); }
table.data th[aria-sort="descending"] button:not(.term-q)::after { content: " ↓"; }
table.data th[aria-sort="ascending"] button:not(.term-q)::after { content: " ↑"; }
table.data th .term-q { margin-inline-start: 6px; vertical-align: 1px; }
table.data td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr.link { cursor: pointer; }
table.data tbody tr.link:hover { background: var(--surface-2); }
table.data .group-row td { background: var(--surface-2); font-weight: 600; cursor: default; }
table.data td.wrap-cell { min-width: 220px; max-width: 360px; color: var(--ink-2); font-size: .875rem; }
.t-num { text-align: left; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-num .he { font-family: var(--font-body); }
@media (max-width: 760px) {
  .radar-table thead { display: none; }
  .radar-table, .radar-table tbody, .radar-table tr, .radar-table td { display: block; width: 100%; }
  .radar-table tr { display: grid !important; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
  table.data.radar-table td { border: 0; padding: 0; }
  .radar-table td[data-col="spark"], .radar-table td[data-col="theme"] { display: none; }
  .radar-table td[data-col="meta"], .radar-table td[data-col="note"] { grid-column: 1 / -1; max-width: none; }
  .radar-table td[data-m]::before { content: attr(data-m) " "; color: var(--ink-3); font-family: var(--font-body); font-size: .8125rem; }
  .radar-table td.t-num { text-align: right; }
  .radar-table .group-row { display: block !important; padding: 0; }
  .radar-table .group-row td { padding: 10px 16px; }
}

/* ---------- Stock page ---------- */
.dossier-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: end; }
.dossier-head .price { font: 600 2rem/1 var(--font-mono); text-align: left; }
.thesis { font-size: 1.0625rem; color: var(--ink-2); max-width: 820px; }
.thesis b { color: var(--ink); }
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; font-size: .8125rem; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); white-space: nowrap; transform: translate(-50%, -110%); }
.chart-tip[hidden] { display: none; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kv > div { background: var(--surface); padding: 12px 14px; }
.kv dt { font-size: .8125rem; color: var(--ink-3); }
.kv dd { margin: 4px 0 0; font: 500 1.0625rem/1.25 var(--font-mono); }
.kv dd small { font-family: var(--font-body); color: var(--ink-3); font-size: .8125rem; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 56px; gap: 12px; align-items: center; font-size: .875rem; }
.track { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.track.research i { background: var(--s-strong); }
@media (max-width: 600px) { .bar-row { grid-template-columns: 110px 1fr 48px; } .dossier-head { grid-template-columns: 1fr; } .dossier-head .price { text-align: right; } }
.sources { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sources a { font-size: .8125rem; }

/* ---------- Spark ---------- */
svg.spark { display: block; overflow: visible; }

/* ---------- Visitor sections ---------- */
.steps { counter-reset: step; }
.step-n { font: 600 .875rem/1 var(--font-mono); color: var(--ink-3); margin-bottom: 10px; }
.waitlist { display: flex; gap: 10px; flex-wrap: wrap; }
.waitlist .input { flex: 1 1 220px; padding: 12px 14px; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--ink-2); margin-top: 8px; }
.prose { max-width: 760px; }
.prose p, .prose ul { margin-bottom: 14px; color: var(--ink-2); }
.prose h2 { margin: 36px 0 12px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding-block: 28px 44px; color: var(--ink-3); font-size: .8125rem; }
.site-footer .wrap { display: grid; gap: 12px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }

.skeleton { color: var(--ink-3); padding: 28px; text-align: center; }
.hidden { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Watchlist star ---------- */
.star { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink-3); cursor: pointer; }
.star svg path { fill: transparent; transition: fill .15s; }
.star:hover { color: var(--ink); background: var(--surface-2); }
.star[aria-pressed="true"], .watch-btn[aria-pressed="true"], .chip-mine svg { color: var(--s-emerging); }
.star[aria-pressed="true"] svg path, .watch-btn[aria-pressed="true"] svg path { fill: currentColor; }
.watch-btn svg path { fill: transparent; }
.watch-btn[aria-pressed="true"] { border-color: color-mix(in srgb, var(--s-emerging) 50%, var(--line)); background: color-mix(in srgb, var(--s-emerging) 10%, var(--surface)); }
.watch-btn[aria-pressed="true"] span { color: var(--ink); }
.chip-mine svg { width: 15px; height: 15px; }
.chip-mine svg path { fill: currentColor; }
.chip-mine[aria-pressed="true"] svg { color: inherit; }
.sym-cell { display: flex; align-items: center; gap: 6px; margin-inline-start: -8px; }

.my-list { list-style: none; margin: 0; padding: 0 8px; }
.my-row { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1.6fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--line); }
.my-row:first-child { border-top: 0; }
.my-row .ticker { font-size: 1rem; color: var(--ink); text-decoration: none; }
.my-row .ticker:hover { text-decoration: underline; }
.my-status { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.my-score, .my-price { text-align: left; white-space: nowrap; }
.my-row.gone { grid-template-columns: auto auto 1fr; }
@media (max-width: 600px) {
  .my-row { grid-template-columns: auto 1fr auto; gap: 4px 10px; }
  .my-status { grid-column: 2 / -1; grid-row: 2; }
  .my-price { display: none; }
}

/* ---------- Glossary terms ---------- */
.term { all: unset; cursor: help; border-bottom: 1px dotted var(--ink-3); border-radius: 0; }
.term:hover, .term[aria-expanded="true"] { border-bottom-style: solid; border-bottom-color: var(--ink); color: var(--ink); }
.term:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.legend .term, .row .term, .strip .term { border-bottom-color: transparent; }
.legend .term:hover, .row .term:hover, .strip .term:hover { border-bottom-color: var(--ink-3); }
.strip .term { border-bottom: 1px dotted var(--ink-3); }
.term-q { display: inline-grid; place-items: center; width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font: 600 .8125rem/1 var(--font-body); cursor: help; letter-spacing: 0; }
.term-q:hover, .term-q[aria-expanded="true"] { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.term-pop { position: absolute; z-index: 50; width: min(320px, calc(100vw - 24px)); display: grid; gap: 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 32px rgba(0, 0, 0, .16); font-size: .875rem; animation: pop-in .12s ease-out; }
.term-pop[hidden] { display: none; }
.term-pop p { color: var(--ink-2); }
.term-pop .icon-btn { width: 28px; height: 28px; font-size: 1.125rem; line-height: 1; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 600px) {
  .term-pop { position: fixed; inset: auto 0 0 0; width: auto; border-radius: var(--r-md) 16px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 32px rgba(0, 0, 0, .2); animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
}
@media (max-width: 600px) { .dossier-head > .stack:last-child { align-items: flex-start !important; } }

/* ---------- Live prices ---------- */
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); }
.live-dot.off { background: var(--ink-3); animation: none; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
[data-lp] { border-radius: 4px; transition: background-color .8s; }
.flash-up { animation: flash-up 1.2s ease-out; }
.flash-down { animation: flash-down 1.2s ease-out; }
@keyframes flash-up { from { background: color-mix(in srgb, var(--up) 28%, transparent); } }
@keyframes flash-down { from { background: color-mix(in srgb, var(--down) 28%, transparent); } }

/* =====================================================================
   Markets layer: ticker tape, market board, heatmap, polish.
   The tape is a deliberate always-dark band (an exchange tape reads as one
   object in both themes); everything else follows the theme tokens.
   ===================================================================== */
:root {
  --tape-bg: #050506;
  --tape-line: #1f1f24;
  --tape-ink: #f3f1ec;
  --tape-dim: #94918a;
  --tape-up: #34d399;
  --tape-down: #f87171;
  --tape-raise: #111114;
  --heat-ink: #09090b;
  --board-bg: var(--surface);
}
:root[data-theme="light"] { --heat-ink: #ffffff; --board-bg: var(--surface); }

/* ---------- Ticker tape ---------- */
.tape { display: flex; align-items: stretch; background: var(--tape-bg); color: var(--tape-ink); border-bottom: 1px solid var(--tape-line); height: 38px; font: 500 .8125rem/1 var(--font-mono); overflow: hidden; }
.tape-badge { flex: none; display: flex; align-items: center; gap: 8px; padding-inline: 14px; background: var(--tape-raise); border-inline-end: 1px solid var(--tape-line); font: 700 .8125rem/1 var(--font-body); letter-spacing: .06em; color: var(--tape-dim); white-space: nowrap; z-index: 1; }
.tape-badge .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tape-dim); }
.tape-badge.is-live { color: var(--tape-up); }
.tape-badge.is-live .live-dot { background: var(--tape-up); box-shadow: 0 0 0 0 rgba(61, 220, 132, .6); animation: tape-pulse 1.8s infinite; }
@keyframes tape-pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 132, .55); } 70% { box-shadow: 0 0 0 7px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }
.tape-viewport { position: relative; flex: 1; overflow: hidden; direction: ltr; mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%); }
.tape-track { display: flex; width: max-content; height: 100%; animation: tape-scroll var(--tape-duration, 90s) linear infinite; }
.tape-viewport:hover .tape-track, .tape-viewport:focus-within .tape-track { animation-play-state: paused; }
@keyframes tape-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tape-item { display: inline-flex; align-items: center; gap: 8px; padding-inline: 16px; height: 100%; color: inherit; text-decoration: none; white-space: nowrap; border-inline-end: 1px solid var(--tape-line); }
.tape-item:hover { background: var(--tape-raise); text-decoration: none; }
.tape-item .sym { font-weight: 600; color: var(--tape-ink); letter-spacing: .02em; }
.tape-item .px { color: var(--tape-ink); }
.tape-item .chg { font-weight: 600; }
.tape-item .chg.up { color: var(--tape-up); }
.tape-item .chg.down { color: var(--tape-down); }
.tape-item .chg.up::before { content: "▲ "; font-size: .7em; }
.tape-item .chg.down::before { content: "▼ "; font-size: .7em; }
.tape-item .st { width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--tape-dim)); }
.tape-item.bench .sym { color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .tape-track { animation: none; }
  .tape-viewport { overflow-x: auto; mask-image: none; }
}

/* ---------- Header polish ---------- */
.site-header { background: color-mix(in srgb, var(--surface) 92%, transparent); }
.brand { letter-spacing: -.01em; }
.nav a { position: relative; }
.nav a[aria-current="page"] { background: transparent; box-shadow: none; color: var(--ink); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; inset-inline: 12px; bottom: -11px; height: 2px; background: var(--brand); border-radius: 2px; }
@media (max-width: 760px) { .nav a[aria-current="page"]::after { bottom: 2px; } }

/* ---------- Market board (home hero) ---------- */
.board { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-areas: "main scope" "qqq scope"; gap: 20px 40px; align-items: center; }
.board-main { grid-area: main; }
.board .qqq-card { grid-area: qqq; }
.board .scope { grid-area: scope; }
@media (max-width: 960px) { .board { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "scope" "qqq"; gap: 24px; } }
.board-main { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.board-main .day-title { font: 900 clamp(2rem, 3.6vw, 2.8rem)/1.1 var(--font-display); letter-spacing: -.02em; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .8125rem; font-weight: 600; letter-spacing: .05em; color: var(--ink-3); }
.eyebrow .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); opacity: .6; }
.chips-kpi { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.kpi-chip { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); }
.kpi-chip b { font: 600 1.25rem/1 var(--font-mono); }
.kpi-chip .status { font-size: .8125rem; }

.qqq-card { background: var(--board-bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.qqq-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.qqq-sym { font: 700 1rem/1 var(--font-mono); letter-spacing: .03em; }
.qqq-name { color: var(--ink-3); font-size: .8125rem; margin-top: 4px; }
.qqq-px { font: 600 1.9rem/1 var(--font-mono); text-align: left; direction: ltr; }
.qqq-chg { font: 600 .9375rem/1 var(--font-mono); text-align: left; margin-top: 6px; }
.regime-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 700; border: 1px solid var(--line); }
.regime-pill.risk_on { color: var(--up); background: color-mix(in srgb, var(--up) 10%, var(--surface)); border-color: color-mix(in srgb, var(--up) 35%, var(--line)); }
.regime-pill.risk_off { color: var(--down); background: color-mix(in srgb, var(--down) 10%, var(--surface)); border-color: color-mix(in srgb, var(--down) 35%, var(--line)); }
.regime-pill.neutral { color: var(--s-emerging); background: color-mix(in srgb, var(--s-emerging) 10%, var(--surface)); }
.qqq-chart svg { display: block; width: 100%; height: 92px; }
.qqq-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.qqq-stats dt { font-size: .8125rem; color: var(--ink-3); }
.qqq-stats dd { margin: 3px 0 0; font: 600 .9375rem/1.2 var(--font-mono); }
.meter { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------- Heatmap ---------- */
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ink-3); }
.heat-scale { width: 160px; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--down), var(--surface-2) 50%, var(--up)); }
.heat-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.heat-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow); }
.heat-group h3 { font-size: .875rem; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 8px; }
.heat-group h3 span { font: 500 .8125rem/1.4 var(--font-mono); color: var(--ink-3); }
.heat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 4px; }
.heat-tile { --mix: 0%; --hue: var(--up); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; min-height: 58px; padding: 6px 4px; border-radius: var(--r-sm); text-decoration: none;
  background: color-mix(in srgb, var(--hue) var(--mix), var(--surface-2)); color: var(--ink); transition: background-color .6s ease; }
.heat-tile.strong { color: var(--heat-ink); }
.heat-tile:hover { outline: 2px solid var(--ink); outline-offset: -2px; text-decoration: none; }
.heat-tile .sym { font: 700 .875rem/1 var(--font-mono); letter-spacing: .02em; }
.heat-tile .chg { font: 600 .8125rem/1 var(--font-mono); direction: ltr; }
.heat-tile .chg.up, .heat-tile .chg.down { color: inherit; }

/* ---------- Card & section polish ---------- */
.section-head h2 { letter-spacing: -.01em; }
.setup { border-radius: var(--r-md); }
.setup .ticker { font-size: 1.25rem; }
.kpis { border-radius: var(--r-md); }
.panel { border-radius: var(--r-md); }
.site-footer { background: var(--surface); }

/* ---------- Stock page: quote bar & candle chart ---------- */
.quote-bar { margin-top: 18px; }
.qb { display: grid; grid-template-columns: 1fr 1fr 1.45fr 1.6fr 1.1fr .9fr .9fr .9fr; margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.qb-cell { padding: 12px 14px; border-inline-start: 1px solid var(--line); min-width: 0; }
.qb-cell:first-child { border-inline-start: 0; }
.qb-cell dt { font-size: .8125rem; color: var(--ink-3); white-space: nowrap; }
.qb-cell dd { margin: 4px 0 0; font: 600 .9375rem/1.3 var(--font-mono); overflow-wrap: anywhere; }
.qb-cell:nth-child(4) { grid-column: span 1; }
.range52 { position: relative; height: 4px; margin-top: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--down), var(--s-emerging), var(--up)); opacity: .85; }
.range52 i { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); transform: translate(-50%, -50%); }
@media (max-width: 1100px) { .qb { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } .qb-cell:nth-child(5) { border-inline-start: 0; } .qb-cell:nth-child(n+5) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .qb { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .qb-cell:nth-child(odd) { border-inline-start: 0; } .qb-cell:nth-child(5) { border-inline-start: 1px solid var(--line); } .qb-cell:nth-child(n+3) { border-top: 1px solid var(--line); } }

.chart-panel { padding: 14px 16px 12px; }
.chart-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ohlc-legend { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font: 500 .8125rem/1.4 var(--font-mono); min-height: 1.4em; }
.ohlc-legend i { font-style: normal; color: var(--ink-3); margin-inline: 6px 3px; }
.ohlc-legend b.up { color: var(--up); }
.ohlc-legend b.down { color: var(--down); }
.range-tabs { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.range-tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: var(--r-sm); font: 600 .8125rem/1 var(--font-mono); color: var(--ink-2); cursor: pointer; }
.range-tabs button:hover { color: var(--ink); }
.range-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.candle-box svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-key { margin-top: 8px; }

/* ---------------- News desk: bell, drawer, toasts, inline lists ---------------- */
.link-btn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.news-btn { position: relative; }
.news-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--down); color: #fff; font: 700 .8125rem/18px var(--font-body); text-align: center; display: none; box-shadow: 0 0 0 2px var(--bg); }
.news-btn.has-unread .news-count { display: block; }
.news-btn.has-unread svg { animation: bell 2.4s ease-in-out 1; transform-origin: 50% 10%; }
@keyframes bell { 0%, 20%, 100% { transform: rotate(0); } 5% { transform: rotate(14deg); } 10% { transform: rotate(-12deg); } 15% { transform: rotate(6deg); } }

.live-pip { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--down); margin-inline-end: 8px; vertical-align: middle; box-shadow: 0 0 0 0 color-mix(in srgb, var(--down) 60%, transparent); animation: pip 2s infinite; }
@keyframes pip { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-item { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.news-list > .news-item:first-child { border-top: 0; }
.news-list.compact .news-item { padding: 10px 0; }
.news-list.compact .news-src { display: none; }
.news-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .8125rem; color: var(--ink-3); }
.news-meta time { margin-inline-start: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nk { display: inline-flex; align-items: center; gap: 5px; padding: 1px 7px; border-radius: var(--r-sm); font-weight: 600; font-size: .8125rem; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.nk-macro { color: var(--warn-ink); background: var(--warn-bg); border-color: var(--warn-line); }
.nk-stock { color: var(--s-strong); background: color-mix(in srgb, var(--s-strong) 10%, transparent); border-color: color-mix(in srgb, var(--s-strong) 30%, transparent); }
.nk.major i { width: 6px; height: 6px; border-radius: 50%; background: var(--down); }
.nsym { font: 600 .8125rem/1 var(--font-mono); padding: 3px 6px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.nsym:hover { border-color: var(--s-strong); }
.news-hl { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9375rem; line-height: 1.45; text-align: left; }
.news-hl:hover { color: var(--link); }
.news-list.compact .news-hl { font-size: .875rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-sum { margin: 0; color: var(--ink-2); font-size: .8125rem; line-height: 1.5; text-align: left; }
.news-src { font-size: .8125rem; color: var(--ink-3); display: flex; gap: 4px; align-items: center; justify-content: flex-end; direction: ltr; text-transform: capitalize; }
.news-empty { padding: 24px 0; color: var(--ink-3); text-align: center; font-size: .875rem; }

.news-drawer { position: fixed; inset: 0; z-index: 60; }
.news-scrim { position: absolute; inset: 0; background: rgba(5, 10, 18, .45); opacity: 0; transition: opacity .2s; }
.news-panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(460px, 100vw); background: var(--bg); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .22s ease-out; box-shadow: 0 0 40px rgba(0, 0, 0, .18); }
.news-drawer.open .news-scrim { opacity: 1; }
.news-drawer.open .news-panel { transform: none; }
body.drawer-open { overflow: hidden; }
.news-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.news-head h2 { font-size: 1.25rem; }
.news-head p { margin: 2px 0 0; color: var(--ink-3); font-size: .8125rem; }
.news-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.news-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.news-filters .chip { padding: 4px 10px; font-size: .8125rem; }
.news-filters .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.news-scroll { overflow-y: auto; padding: 4px 20px 24px; flex: 1; overscroll-behavior: contain; }
.news-credit { font-size: .8125rem; color: var(--ink-3); margin-top: 14px; }

.cal { margin: 14px 0 6px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.cal h3 { margin-bottom: 6px; }
.cal-brief { margin: 0 0 10px; font-size: .875rem; color: var(--ink-2); }
.cal-day { padding-top: 8px; }
.cal-date { font-size: .8125rem; font-weight: 700; color: var(--ink-3); letter-spacing: .03em; padding-bottom: 4px; border-bottom: 1px dashed var(--line); }
.cal-ev { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 7px 0; font-size: .875rem; }
.cal-time { font: 500 .8125rem/1.5 var(--font-mono); color: var(--ink-3); text-align: right; }
.cal-title { display: flex; gap: 7px; align-items: baseline; font-weight: 500; }
.cal-title i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); transform: translateY(-1px); }
.imp-high .cal-title { font-weight: 700; }
.imp-high .cal-title i { background: var(--down); }
.imp-medium .cal-title i { background: var(--s-emerging); }
.cal-figs { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 3px; font-size: .8125rem; color: var(--ink-3); line-height: 1.5; }
.cal-fig { min-width: 0; overflow-wrap: anywhere; }
.cal-figs b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.cal-figs bdi { font-family: var(--font-mono); }
.cal-note { font-size: .8125rem; color: var(--ink-3); margin-top: 2px; }
.cal-foot { font-size: .8125rem; color: var(--ink-3); margin: 10px 0 0; }

.toasts { position: fixed; bottom: 16px; inset-inline-start: 16px; z-index: 70; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--ink-3); border-radius: var(--r-md); padding: 10px 12px 12px; box-shadow: 0 10px 30px rgba(10, 16, 26, .18); display: grid; gap: 6px; animation: toast-in .28s ease-out; }
.toast-macro { border-inline-start-color: var(--down); }
.toast-stock { border-inline-start-color: var(--s-strong); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .22s; }
.toast-x { background: none; border: 0; padding: 2px; color: var(--ink-3); cursor: pointer; display: grid; }
.toast-x:hover { color: var(--ink); }
.toast .news-meta time { margin-inline-start: auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) {
  .news-panel, .news-scrim, .toast, .toast.out { transition: none; animation: none; }
  .live-pip, .news-btn.has-unread svg { animation: none; }
}
@media (max-width: 560px) {
  .toasts { inset-inline: 12px; bottom: 12px; width: auto; }
}

/* ---------------------------------------------------------------- Technical read + position calculator */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tpl.tpl-hi { color: var(--up); border-color: color-mix(in srgb, var(--up) 35%, var(--line)); background: color-mix(in srgb, var(--up) 9%, var(--surface)); }
.tpl.tpl-mid { color: var(--warn-ink); border-color: var(--warn-line); background: var(--warn-bg); }
.tpl.tpl-lo { color: var(--down); border-color: color-mix(in srgb, var(--down) 30%, var(--line)); background: color-mix(in srgb, var(--down) 7%, var(--surface)); }
.tpl-score { flex: none; text-align: center; min-width: 108px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); }
.tpl-score .n { font-size: 2rem; font-weight: 600; line-height: 1.1; }
.tpl-score .n small { font-size: .5em; color: var(--ink-3); }
.tpl-score.tpl-hi .n, .tpl-score.tpl-hi b { color: var(--up); }
.tpl-score.tpl-mid .n, .tpl-score.tpl-mid b { color: var(--s-emerging); }
.tpl-score.tpl-lo .n, .tpl-score.tpl-lo b { color: var(--down); }
.tech-grid { gap: 22px; align-items: start; }
.checklist, .signals, .ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .875rem; }
.checklist li { display: flex; gap: 9px; align-items: baseline; }
.checklist .ck { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8125rem; font-weight: 700; transform: translateY(3px); }
.checklist .ok .ck { background: color-mix(in srgb, var(--up) 16%, transparent); color: var(--up); }
.checklist .no .ck { background: color-mix(in srgb, var(--down) 13%, transparent); color: var(--down); }
.checklist .no { color: var(--ink-3); }
.signals li { display: flex; gap: 9px; align-items: baseline; line-height: 1.45; }
.sg-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); transform: translateY(-1px); }
.sg-pos .sg-dot { background: var(--up); }
.sg-neg .sg-dot { background: var(--down); }
.ladder { gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: .8125rem; }
.lv { display: grid; grid-template-columns: 10px 1fr auto 58px; gap: 8px; align-items: center; padding: 6px 10px; border-top: 1px solid var(--line); }
.lv:first-child { border-top: 0; }
.lv-dot { width: 8px; height: 8px; border-radius: 2px; background: var(--ink-3); }
.lv-res .lv-dot { background: var(--down); }
.lv-sup .lv-dot { background: var(--up); }
.lv-ma .lv-dot { background: var(--chart-ema50); border-radius: 50%; }
.lv-piv .lv-dot { background: var(--s-strong); }
.lv-inv .lv-dot { background: var(--s-turning); }
.lv-now { background: var(--brand); color: var(--brand-ink); font-weight: 600; }
.lv-now .lv-dot { background: var(--brand-ink); }
.lv-now .lv-price bdi { color: inherit; }
.lv-dist { text-align: left; font-size: .8125rem; }
.small-dd { font-family: var(--font-body) !important; font-size: .9375rem !important; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: start; }
.calc-in { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; flex: 1; min-width: 0; }
.field .input { width: 100%; }
.seg { display: flex; gap: 4px; }
.seg .chip { padding: 6px 12px; font-weight: 600; }
.calc input[type="range"] { width: 100%; accent-color: var(--brand); }
.calc-out { display: grid; gap: 12px; }
.calc-hero { padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.calc-n { font-size: 2.2rem; font-weight: 600; line-height: 1.15; }
.calc-n small { display: block; font-size: .9375rem; font-weight: 500; }
.kv-tight dd small { display: block; margin-top: 2px; }
.kv-tight.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv-tight.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv-tight > div { padding: 10px 12px; }
.kv-tight dd { font-size: 1rem; }
@media (max-width: 860px) {
  .calc-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Calculator page: search + my trades */
.search-box { position: relative; max-width: 620px; }
.search-box .input { width: 100%; font-size: 1.0625rem; padding: 13px 16px; }
.search-list { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(16, 24, 40, .14); max-height: 360px; overflow: auto; }
.search-list li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; }
.search-list li[aria-selected="true"], .search-list li:hover { background: var(--surface-2); }
.search-list .opt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trades-table .stop-in { width: 104px; padding: 5px 8px; text-align: left; }
.trades-table td { vertical-align: middle; }
#trades-panel { scroll-margin-top: 90px; }
@media (max-width: 600px) {
  .search-list li { grid-template-columns: 56px minmax(0, 1fr); }
  .search-list li > :nth-child(n+3) { grid-column: 2; }
}

/* ---------------------------------------------------------------- Live relative volume */
.rv-hi { font-weight: 600; }
.qb-cell .lv-x { line-height: 1.5; }
/* The relative-volume column needs the room; the sparkline returns on wide screens and on cards. */
@media (min-width: 761px) and (max-width: 1440px) {
  .radar-table thead th:nth-child(4), .radar-table td[data-col="spark"] { display: none; }
}

/* Daily competition panel (radar page) */
.rot-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.rot-stat { background: var(--surface-2); border-radius: 999px; padding: 4px 12px; font-size: .8125rem; color: var(--ink-2); }
.rot-stat b { color: var(--ink); margin-inline-start: 2px; }
.rot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.rot-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s; }
.rot-card:hover { border-color: var(--brand); }
.rot-card .ticker { font-size: 1.0625rem; }
.rot-name { min-height: 1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rot-foot { border-top: 1px dashed var(--line); padding-top: 6px; }
.rot-swap b { color: var(--ink); }
@media (max-width: 600px) {
  .rot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rot-card { padding: 10px 12px; gap: 4px; }
  .rot-card .status { font-size: .8125rem; }
}

/* Daily Short (home): one episode card. The vertical video on the start side; beside it the day's
   headline, three numbers from the same close and what happened, in points. */
.daily { display: grid; grid-template-columns: 320px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.daily-video { width: 100%; aspect-ratio: 9 / 16; border: 0; background: #09090b; display: block; }
.daily-ep { display: flex; flex-direction: column; gap: 22px; padding: 28px 32px; min-width: 0; }
.daily-title { margin: 8px 0 0; font: 700 1.5rem/1.3 var(--font-body); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.daily-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.daily-stats > div { background: var(--surface-2); padding: 12px 16px; display: grid; gap: 4px; align-content: start; }
.daily-stats dt { font-size: .8125rem; color: var(--ink-3); }
.daily-stats dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.daily-stats dd b { font-size: 1.25rem; color: var(--ink); }
.daily-stats dd b.up { color: var(--up); } .daily-stats dd b.down { color: var(--down); }
.daily-stats dd span { font-size: .875rem; color: var(--ink-2); }
.daily-sum-head { margin: 0 0 10px; font-size: .9375rem; font-weight: 700; color: var(--ink); }
.daily-sum { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.daily-sum li { position: relative; padding-inline-start: 18px; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); max-width: 75ch; }
.daily-sum li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.daily-sum b { color: var(--ink); font-weight: 700; }
@media (max-width: 900px) {
  .daily { grid-template-columns: 300px minmax(0, 1fr); }
  .daily-ep { padding: 20px; gap: 16px; }
  .daily-sum li { font-size: .875rem; }
}
@media (max-width: 640px) {
  .daily { grid-template-columns: minmax(0, 1fr); }
  .daily-video { width: min(100%, 360px); justify-self: center; }
  .daily-stats { grid-template-columns: minmax(0, 1fr); }
  .daily-stats > div { padding: 10px 14px; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 12px; }
  .daily-stats dd { justify-content: flex-end; }
  .daily-stats dd b { font-size: 1.0625rem; }
  .daily-title { font-size: 1.25rem; }
}

/* "Why now" (home) */
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.why { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.why-head { display: flex; align-items: center; gap: 10px; }
.why-head .ticker { font-size: 1.125rem; color: var(--ink); text-decoration: none; }
.why-rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font: 700 .875rem var(--font-mono); flex: none; }
.why-score { margin-inline-start: auto; text-align: center; }
.why-score b { font: 700 1.25rem/1 var(--font-mono); display: block; }
.why-title { font-size: 1rem; font-weight: 700; line-height: 1.4; margin: 0; }
.why-rows { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.why-row { display: grid; grid-template-columns: 74px 1fr; gap: 8px; font-size: .875rem; line-height: 1.55; }
.why-row dt { font-weight: 600; color: var(--ink-3); font-size: .8125rem; padding-top: 2px; }
.why-row dd { margin: 0; color: var(--ink-2); }
.why-ladder { position: relative; height: 76px; margin: 2px 22px 0; margin-top: auto; }
.why-ladder .track { position: absolute; inset-inline: 0; top: 30px; height: 6px; border-radius: 3px; background: linear-gradient(to right, color-mix(in srgb, #e5534b 55%, transparent), color-mix(in srgb, #2fb67c 55%, transparent)); }
.why-ladder .pt { position: absolute; top: 24px; transform: translateX(-50%); text-align: center; font-size: .8125rem; color: var(--ink-3); white-space: nowrap; }
.why-ladder .pt i { display: block; width: 2px; height: 14px; margin: 0 auto; background: var(--ink-3); }
.why-ladder .pt span { display: block; margin-top: 8px; }
.why-ladder .now { top: 7px; display: flex; flex-direction: column; align-items: center; }
.why-ladder .now i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); margin-top: 2px; }
.why-ladder .now span { margin: 0; color: var(--ink); font-weight: 600; }
.why-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; font-size: .8125rem; }
.why-src a { color: var(--ink-3); margin-inline-end: 8px; }
@media (max-width: 960px) {
  .why-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .why { scroll-snap-align: start; }
}

/* Radar table: the theme rides under the company name instead of its own column. */
.radar-table .sym-text { min-width: 0; }
:root[dir="rtl"] .radar-table .sym-text, :root[dir="rtl"] .radar-table .sym-text .ticker { text-align: right; }
.radar-table .sym-sub { max-width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radar-table .sym-theme { color: var(--ink-3); }
@media (min-width: 761px) and (max-width: 1440px) {
  .radar-table th, table.data.radar-table td { padding-inline: 8px; }
}
/* The radar table is the page: give it more width, and drop the two least-used columns on medium screens. */
body[data-page="radar"] main > .section > .wrap, body[data-page="radar"] main .wrap.stack { max-width: 1400px; }
@media (min-width: 761px) and (max-width: 1180px) {
  .radar-table thead th[data-sort="rs"], .radar-table td[data-col="rs"],
  .radar-table thead th[data-sort="high"], .radar-table td[data-col="high"] { display: none; }
  .radar-table .sym-sub { max-width: 150px; }
  .radar-table thead th[data-sort="rvol"], .radar-table td[data-col="rvol"] { display: none; }
}
@media (max-width: 760px) {
  /* Card rows are a 2-column grid; full-width cells pushed the second column past the edge. */
  .radar-table td { width: auto; min-width: 0; }
  .radar-table .sym-sub { max-width: 200px; }
}

/* Candle chart: 1D intraday range */
.range-tabs { direction: ltr; }
.chart-key .k-intra { display: none; }
.is-intra .chart-key .k-intra { display: inline-flex; }
.is-intra .chart-key .k-daily { display: none; }
.chart-msg { min-height: 320px; display: grid; place-items: center; text-align: center; padding: 24px; }
.candles { direction: ltr; }

/* ---------------- Polish (ui-ux-pro-max pass): depth, focus of attention, touch targets ---------------- */
/* Panels: a hairline highlight on the top edge gives navy surfaces depth without shadows. */
:root:not([data-theme="light"]) .panel, :root:not([data-theme="light"]) .table-wrap, :root:not([data-theme="light"]) .why, :root:not([data-theme="light"]) .rot-card {
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0) 120px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
/* Section titles carry a short gold rule, the one brand mark repeated down the page. */
.section-head h2::before { content: ""; display: block; width: 16px; height: 16px; margin-bottom: 10px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--gold) 55%, transparent);
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--gold) 70%, transparent) 0 70deg, transparent 70deg); }
/* Radar rows: gold edge on hover/focus so the row being read stands out. */
table.data tbody tr.link { transition: background-color .15s ease, box-shadow .15s ease; }
table.data tbody tr.link:hover, table.data tbody tr.link:focus-within { box-shadow: inset -3px 0 0 var(--gold); }
/* Active setup: the only status with a filled gold badge. */
.status.st-ready.boxed { background: color-mix(in srgb, var(--gold) 16%, transparent); border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
/* Primary button: gold with a subtle lift on hover; transitions 150-200ms. */
.btn, .chip, .icon-btn, .range-tabs button { transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active, .chip:active { transform: translateY(1px); }
/* Touch targets: range tabs and chips reach 40px+ on phones. */
@media (max-width: 760px) {
  .range-tabs button { min-height: 40px; min-width: 44px; padding-inline: 10px; }
  .chip { min-height: 40px; }
}

/* ---------------- Candle chart, TradingView style ---------------- */
:root { --candle-up: var(--up); --candle-down: var(--down); --chart-sma150: #c792ea; }
:root[data-theme="light"] { --chart-sma150: #7b4fd6; }
.tv { position: relative; direction: ltr; }
.tv-legend { position: absolute; top: 4px; left: 8px; right: 80px; z-index: 2; pointer-events: none; display: grid; gap: 2px;
  font: 500 .8125rem/1.45 var(--font-mono); text-align: left; }
.tv-l1, .tv-l2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tv-sym { font: 700 .9375rem var(--font-body); color: var(--ink); letter-spacing: .02em; }
.tv-meta { color: var(--ink-3); font-family: var(--font-body); }
.tv-ohlc i, .tv-ind i { font-style: normal; color: var(--ink-3); margin-right: 3px; }
.tv-ohlc.up { color: var(--candle-up); } .tv-ohlc.down { color: var(--candle-down); }
.tv-ohlc i { margin-left: 4px; }
.tv-ind b { font-weight: 500; }
.tv-ind b.up { color: var(--candle-up); } .tv-ind b.down { color: var(--candle-down); }
.tv-watermark { fill: var(--ink); opacity: .045; letter-spacing: .04em; }
.tv-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 2px; }
.tv-bottom .range-tabs { border: 0; background: transparent; padding: 0; gap: 2px; }
.tv-bottom .range-tabs button { font: 600 .8125rem/1 var(--font-body); padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink-3); }
.tv-bottom .range-tabs button:hover { color: var(--ink); background: var(--surface-2); }
.tv-bottom .range-tabs button[aria-selected="true"] { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); box-shadow: none; }
.chart-key { margin-top: 10px; }
@media (max-width: 600px) {
  .tv-legend { font-size: .8125rem; right: 64px; }
  .tv-l2 { display: none; }
}

/* =====================================================================
   Radar scope (home hero). An instrument panel: it keeps its own dark
   palette in both themes, and is the one place the page spends motion.
   ===================================================================== */
:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
}
.day { position: relative; isolation: isolate; }
.scope { margin: 0; position: relative; display: grid; gap: 12px; justify-items: center;
  --sc-bg: #08111f; --sc-line: #1d2c47; --sc-ink: #7d8aa5; --sc-sweep: 230, 180, 80;
  --s-ready: #e6b450; --s-strong: #4fd18b; --s-turning: #b99cff; --s-emerging: #7fa8e8; --s-watch: #56607a; }
.scope figcaption { font-size: .8125rem; color: var(--ink-3); text-align: center; max-width: 42ch; }
.scope-face { position: relative; width: min(100%, 520px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--sc-glow, #0d1a30) 0%, var(--sc-bg) 70%);
  box-shadow: inset 0 0 0 1px var(--sc-line), inset 0 0 60px rgba(0, 0, 0, .55), 0 30px 80px -30px rgba(0, 0, 0, .7); }
.scope-face.skeleton { display: grid; place-items: center; color: var(--sc-ink); }
.scope-face svg { direction: ltr; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.scope-grid circle { fill: none; stroke: var(--sc-line); stroke-width: 1; }
.scope-grid circle.edge { stroke: #2a3c5e; stroke-width: 1.5; }
.scope-grid line { stroke: var(--sc-line); stroke-width: 1; stroke-dasharray: 2 4; }
.scope-grid line.tick { stroke: #2a3c5e; stroke-dasharray: none; }
.scope-grid text { fill: var(--sc-ink); font: 500 10px var(--font-mono); }
.scope-hub { fill: rgb(var(--sc-sweep)); }

/* The sweep: a conic wedge whose leading edge sits at 12 o'clock before rotation. */
.scope-sweep { position: absolute; inset: 4.4%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0deg 285deg, rgba(var(--sc-sweep), .02) 300deg, rgba(var(--sc-sweep), .26) 359deg, transparent 360deg);
  animation: sweep var(--sweep) linear infinite; }
.scope-sweep::after { content: ""; position: absolute; left: calc(50% - .5px); top: 0; width: 1px; height: 50%;
  background: linear-gradient(to top, rgba(var(--sc-sweep), .1), rgba(var(--sc-sweep), .9)); }
@keyframes sweep { to { transform: rotate(1turn); } }

/* Blips glow as the sweep passes (delay = their angle), then settle to a dim afterglow. */
.blip { cursor: pointer; color: var(--c); transition: opacity .2s var(--ease-out); }
.blip .core { fill: currentColor; opacity: .6; }
.blip.st-ready .core { opacity: .95; }
.blip .halo { fill: currentColor; opacity: 0; transform-box: fill-box; transform-origin: center; animation: blip-halo 8s var(--delay) linear infinite; }
.blip .lock { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .55; }
.blip text { fill: currentColor; font: 600 11px var(--font-mono); letter-spacing: .02em; }
.blip:hover .core, .blip.peer .core { animation-play-state: paused; opacity: 1; }
.blip:hover .halo { opacity: .25; animation: none; transform: scale(1.3); }
@keyframes blip-core { 0% { opacity: 1; } 35% { opacity: .55; } 100% { opacity: .42; } }
@keyframes blip-halo { 0% { opacity: .55; transform: scale(.6); } 18% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; transform: scale(1.6); } }

@keyframes blip-core-hi { 0% { opacity: 1; } 100% { opacity: .82; } }
/* Focus modes: a hovered count (status) or a hovered blip (its theme) dims everything else. */
.scope[data-focus] .blip, .scope[data-theme] .blip:not(.peer) { opacity: .12; }
.scope[data-focus="ready"] .blip.st-ready, .scope[data-focus="strong"] .blip.st-strong,
.scope[data-focus="turning"] .blip.st-turning, .scope[data-focus="emerging"] .blip.st-emerging { opacity: 1; }
.scope-tip { transform: translate(-50%, calc(-100% - 12px)); z-index: 2; }
.kpi-chip { transition: border-color .18s var(--ease-out), transform .12s var(--ease-out); }
.kpi-chip:hover { border-color: var(--ink-3); }
.kpi-chip:active { transform: scale(.97); }

@media (max-width: 960px) {
  .scope-face { width: min(100%, 340px); }
}
@media (prefers-reduced-motion: reduce) {
  .scope-sweep { display: none; }
  .blip .core { opacity: .9; }
}

/* =====================================================================
   Stock cards: data draws in once on reveal; the card answers touch.
   ===================================================================== */
.setup { transition: border-color .2s var(--ease-out), transform .16s var(--ease-out), box-shadow .2s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .setup:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .6); } }
.setup:active { transform: translateY(0) scale(.985); transition-duration: .08s; }

.gauge { position: relative; width: 50px; height: 50px; flex: none; display: grid; place-items: center; }
.gauge svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 4; }
.gauge .g-track { stroke: var(--line); }
.gauge .g-arc { stroke: var(--c); stroke-linecap: round; stroke-dasharray: var(--v) 100; transition: stroke-dasharray .9s var(--ease-out) calc(var(--stagger, 0ms) + 120ms); }
.gauge b { font: 600 1.0625rem/1 var(--font-mono); }

.rail { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font: 600 .8125rem/1 var(--font-body); }
.rail-end.down { color: var(--down); }
.rail-end.up { color: var(--up); }
.rail-track { position: relative; height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--down) 70%, transparent), color-mix(in srgb, var(--s-emerging) 40%, transparent) 50%, color-mix(in srgb, var(--up) 70%, transparent)); }
.rail-pivot { position: absolute; top: -4px; width: 2px; height: 12px; background: var(--ink-3); transform: translateX(-50%); border-radius: 1px; }
.rail-pos { position: absolute; inset: 0; transform: translateX(var(--p)); transition: transform .8s var(--ease-out) calc(var(--stagger, 0ms) + 200ms); }
.rail-now { position: absolute; top: 50%; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--ink);
  border: 2px solid var(--surface); transform: translate(-50%, -50%); }

.spark-line { transition: stroke-dashoffset .9s var(--ease-out) var(--stagger, 0ms); }
.spark-area, .spark-dot { transition: opacity .4s var(--ease-out) calc(var(--stagger, 0ms) + 600ms); }

/* Before reveal (only set by JS, never without it): empty gauge, undrawn line, marker at the stop. */
.setup.await:not(.in) .g-arc { stroke-dasharray: 0 100; }
.setup.await:not(.in) .spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.setup.await .spark-line { stroke-dasharray: 1; }
.setup.await:not(.in) .spark-area, .setup.await:not(.in) .spark-dot { opacity: 0; }
.setup.await:not(.in) .rail-pos { transform: none; }

/* Watchlist star: a quick pop with a ring burst, only when it turns on. */
.star { transition: color .15s var(--ease-out), background-color .15s var(--ease-out), transform .1s var(--ease-out); }
.star:active { transform: scale(.88); }
.star.pop svg { animation: star-pop .38s var(--ease-out); }
.star.pop::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 2px solid currentColor; animation: star-burst .45s var(--ease-out) forwards; pointer-events: none; }
.star { position: relative; }
@keyframes star-pop { 0% { transform: scale(.7); } 55% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes star-burst { from { opacity: .7; transform: scale(.6); } to { opacity: 0; transform: scale(1.5); } }

/* =====================================================================
   Hero atmosphere: drifting aurora + the live chart backdrop.
   ===================================================================== */
.day { overflow: hidden; }
.day::after { content: ""; position: absolute; inset: -20% -10%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 50% at 25% 45%, var(--violet-soft), transparent 70%),
    radial-gradient(30% 40% at 80% 20%, color-mix(in srgb, var(--gold) 9%, transparent), transparent 70%);
}
@keyframes aurora { to { transform: translate3d(4%, 3%, 0) scale(1.08); } }
.day-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Active setups carry a slow light running around their border: the signal is live. */
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.setup.is-ready { border-color: color-mix(in srgb, var(--s-ready) 35%, var(--line)); }
.setup.is-ready::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin), transparent 0deg 300deg, var(--s-ready) 340deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite; }
@keyframes spin { to { --spin: 360deg; } }

/* Heatmap: tiles come on one after another the first time the board is seen. */
.heat-group.await .heat-tile { transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); transition-delay: calc(var(--i, 0) * 28ms); }
.heat-group.await:not(.in) .heat-tile { opacity: 0; transform: scale(.94); }

/* The hero counts and QQQ card sit on a translucent surface so the backdrop reads through. */
.kpi-chip, .day .qqq-card { backdrop-filter: blur(6px); }
.kpi-chip { background: color-mix(in srgb, var(--surface) 82%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .day::after, .setup.is-ready::before { animation: none; }
}

.rot-card.gone { opacity: .6; cursor: default; }


/* Reading measure: no paragraph runs past ~70 characters. */
.verdict { max-width: 62ch; }
.section-head p, details p, .prose p { max-width: 70ch; }

/* Light heatmap: keep fills light enough for dark ink to read (4.5:1). */
:root[data-theme="light"] .heat-tile { background: color-mix(in srgb, var(--hue) calc(var(--mix) * .53), var(--surface-2)); }
:root[data-theme="light"] .heat-tile, :root[data-theme="light"] .heat-tile.strong { color: var(--ink); }

/* The radar face: flat fills, no glow. */
.scope-face { background: var(--sc-face, #0b1a30) !important; box-shadow: inset 0 0 0 1px var(--sc-line) !important; }
.kpi-chip, .day .qqq-card { backdrop-filter: none; }
.kpi-chip { background: var(--surface); }

/* The day's scan line sits under its headline as a plain note, not a label above it. */
.board-main .eyebrow { order: 2; font-size: 1rem; font-weight: 400; letter-spacing: 0; color: var(--ink-2); }
.board-main .day-title { order: 1; } .board-main .verdict { order: 3; } .board-main .chips-kpi { order: 4; }


/* Section entrances: heading, then text, then the content, once, as each section arrives. */
.rv-wait > .wrap > * { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.rv-wait > .wrap > *:nth-child(2) { transition-delay: .08s; } .rv-wait > .wrap > *:nth-child(3) { transition-delay: .16s; } .rv-wait > .wrap > *:nth-child(n+4) { transition-delay: .24s; }
.rv-wait.in > .wrap > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv-wait > .wrap > * { opacity: 1; transform: none; } }

.site-footer p { max-width: 75ch; }
/* FAQ: answers sit on tone steps, not between rules. */
details { border: 0 !important; background: var(--surface); padding: 16px 20px; margin-bottom: 8px; border-radius: 0; }
details summary { font-size: 1.0625rem; }


/* =====================================================================
   Landing hero: editorial split. The name and what the site does on one
   side; on the other, today's bulls-vs-bears reading in a framed card.
   ===================================================================== */
.hero { padding-block: clamp(40px, 7vh, 88px) clamp(32px, 5vh, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-title { margin: 0; display: grid; gap: 14px; }
.hero-brand { font: 800 clamp(2.4rem, 1.5rem + 3vw, 3.75rem)/1 var(--font-display); letter-spacing: -.035em; color: var(--ink); justify-self: start; }
.hero-lead { font: 500 clamp(1.25rem, 1rem + .9vw, 1.75rem)/1.3 var(--font-body); color: var(--ink); letter-spacing: -.01em; }
.hero-sub { margin: 18px 0 0; max-width: 48ch; font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 28px; }
.pill-cta { display: inline-flex; align-items: center; gap: 14px; padding: 8px 8px 8px 22px; padding-inline: 22px 8px; min-height: 52px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 1.0625rem; text-decoration: none;
  transition: transform .16s var(--ease-out), background-color .2s var(--ease-out); }
.pill-cta i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--brand-ink) 16%, transparent);
  transition: transform .3s var(--ease-out); }
.pill-cta:hover { text-decoration: none; background: color-mix(in srgb, var(--brand) 88%, #000); }
.pill-cta:hover i { transform: translateX(-3px); }
.pill-cta:active { transform: scale(.98); }
.hero-link { color: var(--ink); font-weight: 500; text-underline-offset: 5px; }
.hero-facts { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.hero-facts li { display: grid; gap: 2px; }
.hero-facts b { font: 700 1.5rem/1.1 var(--font-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: .9375rem; color: var(--ink-2); }

/* Double bezel: a tinted tray with a white plate inside it, concentric radii. */
.bezel { margin: 0; padding: 8px; border-radius: calc(var(--r-lg) + 8px); background: color-mix(in srgb, var(--brand) 6%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 9%, transparent), 0 30px 60px -30px rgba(0, 0, 0, .35); }
.bezel-core { border-radius: var(--r-lg); background: var(--surface); padding: 22px 24px 20px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); display: grid; gap: 14px; }
:root:not([data-theme="light"]) .bezel { background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 60px -30px rgba(0, 0, 0, .6); }
:root:not([data-theme="light"]) .bezel-core { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.hc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hc-head b { font-size: 1.125rem; font-weight: 700; color: var(--ink); }
.hc-date { font-size: .875rem; color: var(--ink-3); }
.hc-stage { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 400 / 220; background: var(--stage); }
.hm-labels { display: flex; justify-content: space-between; font-size: .9375rem; color: var(--ink-2); margin-bottom: 8px; }
.hm-labels b { font-size: 1.125rem; font-variant-numeric: tabular-nums; margin-inline-start: 4px; }
.hm-bull b { color: var(--up); } .hm-bear b { color: var(--down); }
/* The bar fills from the bulls' side (right, in RTL) to the day's breadth. */
/* Same sides as the arena above it: bulls on the left, bears on the right. */
.hm-bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--down) 75%, var(--surface)); overflow: hidden; display: flex; direction: ltr; }
.hm-fill { width: var(--p); height: 100%; background: var(--up); border-radius: 99px 0 0 99px; transform-origin: 0 50%; }
.hc-explain { margin: 0; font-size: .9375rem; line-height: 1.6; color: var(--ink-2); }
.hc-explain b { color: var(--ink); }

/* Entrance, once: copy rises in order, the card settles, the animals charge in and meet. */
.hero .hero-title, .hero .hero-sub, .hero .hero-actions, .hero .hero-facts, .hero .hero-card { opacity: 0; transform: translateY(18px); }
.hero.on .hero-title, .hero.on .hero-sub, .hero.on .hero-actions, .hero.on .hero-facts, .hero.on .hero-card { animation: rise .7s var(--ease-out) forwards; }
.hero.on .hero-sub { animation-delay: .08s; } .hero.on .hero-actions { animation-delay: .16s; } .hero.on .hero-facts { animation-delay: .24s; }
.hero.on .hero-card { animation-delay: .12s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero .hm-fill { transform: scaleX(0); }
.hero.on .hm-fill { transition: transform 1.1s var(--ease-out) .7s; transform: none; }
.bull-in { transform: translateX(-120px); } .bear-in { transform: translateX(120px); }
.hero.on .bull-in, .hero.on .bear-in { animation: charge .6s cubic-bezier(.5, 0, .75, 0) .5s forwards; }
.hero.on .clash .ring { animation: ring 3.2s var(--ease-out) var(--t0) infinite; }
.bull, .bear { transform-box: view-box; }
.hero.on .bull { animation: push-bull 3.2s cubic-bezier(.45, 0, .55, 1) 1.1s infinite; }
.hero.on .bear { animation: push-bear 3.2s cubic-bezier(.45, 0, .55, 1) 1.1s infinite; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-facts { margin-top: 28px; gap: 12px 28px; }
  .bezel-core { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .hero-title, .hero .hero-sub, .hero .hero-actions, .hero .hero-facts, .hero .hero-card, .bull-in, .bear-in { opacity: 1; transform: none; animation: none !important; }
  .hero .hm-fill { transform: none; }
}

/* Bulls vs bears stage (shared by the hero card). */
.arena { display: block; width: 100%; height: 100%; }
:root { --stage-top: #1c1c22; --stage: #111114; --stage-ground: #1c1c21; }
:root[data-theme="light"] { --stage-top: #dfe6f0; --stage: #f4f2ed; --stage-ground: #dcd8cf; }
.sky-top { stop-color: var(--stage-top); } .sky-low { stop-color: var(--stage); }
.arena-ground { fill: var(--stage-ground); }
/* A bears' day warms the sky toward red. */
.bears-win .sky-top { stop-color: color-mix(in srgb, var(--stage-top) 80%, var(--down)); }
/* The floor as a slab: a lit top face, the front below in the ground color, and the crack. */
.ground-top { fill: color-mix(in srgb, var(--stage-ground) 72%, #a8916b); }
.ground-edge { fill: color-mix(in srgb, var(--stage-ground) 60%, #000); opacity: .6; }
.crack { fill: color-mix(in srgb, var(--stage-ground) 30%, #000); }
.crack-heave { fill: color-mix(in srgb, var(--stage-ground) 62%, #b49c74); }
.crack-vein { fill: none; stroke: color-mix(in srgb, var(--stage-ground) 35%, #000); stroke-width: .7; stroke-linecap: round; opacity: .85; }
.chip { fill: color-mix(in srgb, var(--stage-ground) 55%, #8f7a58); }
.pebble { fill: color-mix(in srgb, var(--stage-ground) 60%, #000); opacity: .7; }
.tuft { stroke: color-mix(in srgb, var(--stage-ground) 50%, #6f8f4e); stroke-width: 1.1; stroke-linecap: round; fill: none; }
.bull .body, .bull .tail { fill: #22a365; } .bull .tail { fill: #1f9a5d; } .bull .far { fill: #14703f; } .bull .hl { fill: #35c485; } .bull .shade { fill: #1b8a52; }
.bull .horn { fill: #efe6c2; } .bull .far-horn { fill: #cfc5a0; } .bull .hoof { fill: #2b2b2b; } .bull .eye { fill: #0a2416; }
.bear .body { fill: #e0525e; } .bear .far { fill: #a33340; } .bear .hl { fill: #f27681; } .bear .shade { fill: #c03f4b; } .bear .eye { fill: #2a0a0e; }
.bear .muzzle { fill: #f39aa1; } .bear .claw { fill: #ece0bf; stroke: #b9a77d; stroke-width: .35; } .bear .far-shade { fill: #8f2a36; } .bear .nose { fill: #3a0d12; } .bear .eye-glint { fill: #fff; opacity: .8; }
.bear .ear { fill: #c94350; } .bear .ear-in { fill: #f39aa1; }
.bear .mouth, .bear .brow { fill: none; stroke: #7a2731; stroke-width: 1.4; stroke-linecap: round; }
.bear .toe { fill: none; stroke: #b13a47; stroke-width: 1; stroke-linecap: round; }
/* The raised far arm swipes from the shoulder. */
.bear .arm { transform-box: fill-box; transform-origin: 82% 96%; }
.hero.on .bear .arm { animation: swipe 3.2s ease-in-out 1.1s infinite; }
.clash .ring { fill: none; stroke: #e0a21a; stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
@keyframes charge { to { transform: none; } }
@keyframes ring { 0% { opacity: .9; transform: scale(.3); } 22% { opacity: 0; transform: scale(2.4); } 100% { opacity: 0; } }
/* The bull gathers (a step back), drives in at 12%, holds, then eases off: anticipation, strike, follow-through. */
@keyframes push-bull { 0%, 100% { translate: 0 0; } 7% { translate: -5px 0; } 12% { translate: 8px 1px; } 20% { translate: 5px 0; } 58% { translate: -2px 0; } }
/* The bear takes the hit at 12%: shoved back, then digs in and leans forward again. */
@keyframes push-bear { 0%, 11%, 100% { translate: 0 0; } 15% { translate: 7px -1px; } 28% { translate: 4px 0; } 60% { translate: -1px 0; } }
@keyframes swipe { 0%, 100% { rotate: 0deg; } 10% { rotate: -14deg; } 30% { rotate: 4deg; } }

/* The bears' round (an index down day): the grizzly winds up and rams, the bull reels back on its
   hind hooves, and red coins are knocked off it and fall to the ground. The hit lands 15% into
   the same 3.2s loop, so the ring, the burst and the coins start .48s after the bulls' version. */
.arena-slide { fill: none; stroke: var(--down); stroke-width: 2.5; stroke-linejoin: round; opacity: .35; stroke-dasharray: 1; stroke-dashoffset: 1; }
.arena-slide.rise { stroke: var(--up); opacity: .3; }
.hero.on .arena-slide { animation: slide-draw 1.4s var(--ease-out) .6s forwards; }
.hero.on .bears-win .bull, .hero.on .bears-win .bear { animation: none; }
.hero.on .bears-win .bull-in { animation: charge .6s cubic-bezier(.5, 0, .75, 0) .5s forwards, reel 3.2s cubic-bezier(.45, 0, .55, 1) 1.1s infinite; }
.hero.on .bears-win .bear-in { animation: charge .6s cubic-bezier(.5, 0, .75, 0) .5s forwards, ram 3.2s cubic-bezier(.45, 0, .55, 1) 1.1s infinite; }
.hero.on .bears-win .bear .arm { animation-delay: 1.26s; }
@keyframes slide-draw { to { stroke-dashoffset: 0; } }
/* The bear rocks back on its heels, then drives its head and shoulders into the bull from the feet. */
@keyframes ram { 0%, 100% { translate: 0 0; rotate: 0deg; } 8% { translate: 8px 0; rotate: 6deg; } 15% { translate: -20px 0; rotate: -14deg; } 26% { translate: -12px 0; rotate: -8deg; } 62% { translate: 0 0; rotate: 0deg; } }
@keyframes reel { 0%, 14%, 100% { translate: 0 0; rotate: 0deg; } 19% { translate: -26px -3px; rotate: -10deg; } 34% { translate: -18px 0; rotate: -3deg; } 72% { translate: 0 0; rotate: 0deg; } }

@media (prefers-reduced-motion: reduce) {
  .arena-slide { stroke-dashoffset: 0; }
  .bears-win .bull-in { translate: -10px 0; rotate: -5deg; }
}

/* The day's section title sits one step under the hero's name. */
.day-title em { font-style: normal; color: inherit; }
.board-main .day-title { font: 800 clamp(1.75rem, 1.25rem + 1.6vw, 2.4rem)/1.15 var(--font-display) !important; letter-spacing: -.02em; }

/* The ticker wall sits behind the hero; a scrim on the copy side keeps the words readable. */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-wall { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 75% at 72% 50%, var(--bg) 30%, color-mix(in srgb, var(--bg) 55%, transparent) 75%, transparent 100%); }
@media (max-width: 900px) { .hero::before { background: color-mix(in srgb, var(--bg) 62%, transparent); } }

/* Score bars key: swatches in the bars' own colours, so it stays right in every theme. */
.bars-key { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.bars-key span { display: inline-flex; align-items: center; gap: 6px; }
.bars-key .sw { width: 14px; height: 6px; border-radius: 99px; background: var(--brand); }
.bars-key .sw.research { background: var(--s-strong); }

/* How it works: a compact timeline. The line draws from the first step, the dots light in order. */
.steps-line { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; position: relative; }
.steps-line::before { content: ""; position: absolute; top: 6px; inset-inline: 0; height: 2px; background: color-mix(in srgb, var(--gold) 45%, var(--line)); transform-origin: 100% 50%; }
.steps-line li { position: relative; display: grid; gap: 8px; padding-top: 30px; }
.step-dot { position: absolute; top: 0; inset-inline-start: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--bg); }
.steps-line b { font: 700 1.125rem/1.3 var(--font-body); color: var(--ink); }
.steps-line span { font-size: .9375rem; line-height: 1.55; color: var(--ink-2); max-width: 30ch; }
.rv-wait .steps-line::before { transform: scaleX(0); transition: transform .9s var(--ease-in-out) .2s; }
.rv-wait .step-dot { opacity: 0; transform: scale(.6); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); transition-delay: calc(.3s + var(--i) * 80ms * 2.6); }
.rv-wait.in .steps-line::before { transform: none; }
.rv-wait.in .step-dot { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .steps-line { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .steps-line::before { top: 6px; bottom: 6px; inset-inline: 6px auto; width: 2px; height: auto; transform-origin: 50% 0; }
  .rv-wait .steps-line::before { transform: scaleY(0); }
  .steps-line li { padding-top: 0; padding-inline-start: 30px; }
  .steps-line span { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .rv-wait .steps-line::before, .rv-wait .step-dot { transform: none; opacity: 1; } }
/* The marker's positioning box travels with it; clip it to the bar (with room for the dot) so it can never widen the page. */
.rail-track { overflow: clip; overflow-clip-margin: 8px; }

/* Performance: off-screen animations pause; the tape scrolls on its own compositor layer. */
.anim-off, .anim-off *, .anim-off::before, .anim-off *::before, .anim-off::after, .anim-off *::after { animation-play-state: paused !important; }
.tape-track { will-change: transform; }

/* ---------------- language ---------------- */
.lang-btn { height: 36px; min-width: 40px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 600 .8125rem/1 var(--font-body); letter-spacing: .04em; cursor: pointer; transition: color .18s ease, border-color .18s ease, transform .12s ease; }
.lang-btn:hover { color: var(--ink); border-color: var(--gold); }
.lang-btn:active { transform: scale(.96); }
.lang-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* English pages wait for their translation (at most 1.5s) instead of flashing Hebrew. */
html.i18n-wait body { visibility: hidden; }
/* Research text the scans write in Hebrew keeps its own direction inside the English interface. */
.he-src { unicode-bidi: isolate; }
p > .he-src:only-child, dd > .he-src:only-child { display: block; text-align: right; }

/* The English interface runs left to right: mirror what the stylesheet pins for right-to-left. */
html[dir="ltr"] body { direction: ltr; }
html[dir="ltr"] table.data th { text-align: left; }
html[dir="ltr"] :is(.t-num, .dossier-head .price, .my-score, .my-price, .qqq-px, .qqq-chg, .lv-dist) { text-align: right; }
html[dir="ltr"] [style*="text-align:left"] { text-align: right !important; }
html[dir="ltr"] .cal-time { text-align: left; }
html[dir="ltr"] .news-panel { transform: translateX(100%); }
html[dir="ltr"] .news-drawer.open .news-panel { transform: none; }
html[dir="ltr"] .pill-cta i svg { transform: scaleX(-1); }
html[dir="ltr"] .pill-cta:hover i { transform: translateX(3px); }
html[dir="ltr"] .hm-labels { flex-direction: row-reverse; }
@media (max-width: 760px) { html[dir="ltr"] .radar-table td.t-num { text-align: left; } }
@media (max-width: 600px) { html[dir="ltr"] .dossier-head .price { text-align: left; } }

/* ---------------- earnings season ---------------- */
.er-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: end; }
/* The season as the radar: one square per stock. */
.er-season { display: grid; gap: 14px; }
.er-lede { margin: 0; font-size: 1.125rem; line-height: 1.55; color: var(--ink-2); }
.er-lede b { color: var(--ink); font-weight: 600; }
.er-lede > b:first-child { font-size: 1.6em; line-height: 1; }
.er-units { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; }
.er-units i, .er-key i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.er-units i { transform-origin: center; }
.u-beat { background: var(--up) !important; } .u-miss { background: var(--down) !important; }
.u-week { background: var(--gold) !important; } .u-later { background: var(--surface-2); }
.er-key { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .8125rem; color: var(--ink-2); }
.er-key span { display: inline-flex; align-items: center; gap: 6px; }
.er-key i { width: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .er-units i { animation: er-unit .5s var(--ease-out) both; animation-delay: calc(var(--k, 0) * 12ms); }
  @keyframes er-unit { from { opacity: 0; transform: scale(.4); } }
}

/* The week: five days, each split before the open / after the close. */
.er-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.er-day { display: grid; grid-template-rows: auto 1fr 1fr; gap: 6px; padding: 12px; border-radius: var(--radius); background: var(--surface); min-height: 210px; }
.er-day.is-today { background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.er-today { margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-size: .6875rem; font-weight: 700; vertical-align: 2px; }
.er-day.is-past { opacity: .55; }
.er-dh { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 4px; }
.er-dh span { color: var(--ink-3); font-size: .875rem; }
.er-lane { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; padding: 8px; border-radius: var(--r-md); background: var(--surface-2); }
.er-lt { width: 100%; display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--ink-3); }
.er-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; background: var(--bg); color: var(--ink); text-decoration: none; font-size: .875rem;
  transition: transform .15s var(--ease-out), background-color .15s ease; }
@media (hover: hover) and (pointer: fine) { .er-chip:hover { background: color-mix(in srgb, var(--gold) 14%, var(--bg)); } }
.er-chip:active { transform: scale(.97); }
.er-chip b { font: 600 .875rem/1 var(--font-mono); }
.er-chip .st { width: 7px; height: 7px; border-radius: 50%; background: var(--s-watch); }
.er-chip .st-ready { background: var(--s-ready); } .er-chip .st-strong { background: var(--s-strong); } .er-chip .st-turning { background: var(--s-turning); } .er-chip .st-emerging { background: var(--s-emerging); }
.er-mv { color: var(--ink-3); font: 500 .75rem/1 var(--font-mono); }
.er-star { display: inline-flex; color: var(--gold); } .er-star svg { width: 12px; height: 12px; fill: currentColor; }
.er-none { color: var(--ink-3); font-size: .875rem; }
.er-later { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.er-later .er-chip { background: var(--surface); }
.er-empty { margin: 0; padding: 22px; border-radius: var(--radius); background: var(--surface); }

/* Typical earnings-day move against the stop. */
.er-moves { padding: 8px 20px 14px; }
.er-axis, .er-mrow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 290px; gap: 22px; align-items: center; }
.er-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-axis { padding: 8px 0 4px; font-size: .75rem; color: var(--ink-3); }
.er-scale { display: flex; justify-content: space-between; }
.er-mrow { padding: 12px 0; border-top: 1px solid var(--line); }
.er-who { display: grid; gap: 2px; }
.er-plot { position: relative; height: 34px; border-radius: var(--r-sm); background: var(--surface-2); }
.er-plot .band { position: absolute; top: 7px; bottom: 7px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--gold) 30%, transparent); }
.er-plot .mid { position: absolute; left: 50%; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.er-plot .hist { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 2px var(--surface-2); }
.er-plot .hist.up { background: var(--up); } .er-plot .hist.down { background: var(--down); }
.er-plot .stop { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--down); border-radius: 1px; }
.er-plot .stop em { position: absolute; bottom: 100%; transform: translateX(-50%); font: 500 .75rem/1.6 var(--font-body); font-style: normal; color: var(--ink-2); white-space: nowrap; }
.er-verdict { display: grid; gap: 5px; }
/* Planned loss (1R) against the loss a typical gap down would bring, on one scale. */
.er-r { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 8px; }
.er-r .trk { display: flex; align-items: center; gap: 8px; min-width: 0; }
.er-r .lbl { font-size: .75rem; color: var(--ink-3); text-align: right; }
.er-r i { display: block; flex: none; height: 10px; border-radius: 0 5px 5px 0; max-width: calc(100% - 52px); }
.er-r .plan { background: var(--ink-3); }
.er-r .gap { background: var(--gold); } .er-r .gap.over { background: var(--down); }
.er-r b { font-size: .9375rem; font-weight: 600; }

/* Recent reports. */
.er-rhead, .er-rrow { display: grid; grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; align-items: center; }
.er-rhead { padding: 0 18px 8px; }
.er-results { display: grid; gap: 8px; }
.er-rrow { padding: 16px 18px; border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; transition: background-color .15s ease; }
@media (hover: hover) and (pointer: fine) { .er-rrow:hover { background: var(--surface-2); } }
.er-guide { justify-self: start; margin-top: 6px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.er-guide.up { background: color-mix(in srgb, var(--up) 16%, transparent); color: var(--up); }
.er-guide.down { background: color-mix(in srgb, var(--down) 16%, transparent); color: var(--down); }
.er-metric { display: grid; gap: 8px; }
.er-div { position: relative; display: block; height: 10px; border-radius: var(--r-sm); background: var(--surface-2); direction: ltr; }
.er-div .zero { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--ink-3); border-radius: 1px; }
.er-div b { position: absolute; top: 0; bottom: 0; border-radius: var(--r-sm); background: var(--ink-3); }
.er-div b.up { background: var(--up); } .er-div b.down { background: var(--down); }
.er-react { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.er-react dd { margin: 4px 0 0; display: grid; gap: 6px; }

.er-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.er-trow { display: grid; grid-template-columns: 200px minmax(0, 1fr) 44px; gap: 14px; align-items: center; padding: 7px 0; }
.er-trow .meter { height: 8px; }
.er-note { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); display: grid; gap: 8px; }
.er-note p { margin: 0; }

@media (max-width: 960px) {
  .er-top, .er-split { grid-template-columns: minmax(0, 1fr); }
  .er-week { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(210px, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .er-day { scroll-snap-align: start; min-height: 0; }
  .er-rhead { display: none; }
  .er-rrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .er-rrow .er-who, .er-rrow .er-react { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .er-stats { grid-template-columns: minmax(0, 1fr); }
  .er-axis, .er-mrow { grid-template-columns: 82px minmax(0, 1fr); }
  .er-verdict { grid-column: 1 / -1; }
  .er-axis > span:last-child { display: none; }
  .er-rrow { grid-template-columns: minmax(0, 1fr); }
  .er-trow { grid-template-columns: 130px minmax(0, 1fr) 40px; }
}
/* market health row under the QQQ stats (distribution days, follow-through, exposure ceiling) */
.qqq-stats.health { margin-top: 10px; }
.qqq-stats dd small { font-family: var(--font-body); font-weight: 500; color: var(--ink-3); font-size: .8125rem; }
.qqq-stats dd.warn { color: var(--warn-ink); }
.qqq-stats dd.down small, .qqq-stats dd.up small { color: inherit; }
/* research thesis (stock page) */
.th-badge { font-size: .8125rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.th-badge.sm { padding: 1px 8px; font-size: .75rem; }
.th-badge.pos { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, transparent); }
.th-badge.neg { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, transparent); }
.th-badge.warn { color: var(--warn-ink); border-color: var(--warn-line); background: var(--warn-bg); }
.th-claim { font-size: 1.0625rem; line-height: 1.55; margin: 0; padding-inline-start: 12px; border-inline-start: 3px solid var(--gold); }
.th-pillars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.th-pillar { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.th-ev { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; line-height: 1.5; }
.th-ev li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; }
.th-ev li.stale { opacity: .7; }
.th-sig { font-size: .75rem; line-height: 1.9; color: var(--ink-3); }
.th-sig.up { color: var(--up); } .th-sig.down { color: var(--down); }
.th-overdue { color: var(--warn-ink); font-weight: 600; }
/* earnings page: off-radar reporters after the selloff */
.er-watch { display: grid; }
.er-wrow { display: grid; grid-template-columns: minmax(150px, 1.4fr) minmax(130px, 1fr) minmax(140px, 1.2fr) 70px 90px auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.er-wrow:last-child { border-bottom: 0; }
.er-wwhen { display: flex; align-items: center; gap: 6px; color: var(--ink-2); }
.er-wdrop { display: flex; align-items: center; gap: 8px; }
.er-wdrop .track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; display: flex; justify-content: flex-start; }
.er-wdrop .track i { display: block; height: 100%; background: var(--down); opacity: .75; border-radius: 3px; }
.er-wstat { white-space: nowrap; }
@media (max-width: 760px) {
  .er-wrow { grid-template-columns: 1fr auto; row-gap: 6px; }
  .er-wdrop { grid-column: 1 / -1; }
  .er-wsrc { justify-self: end; }
}
@media (max-width: 760px) { .er-wrow .er-who { grid-column: 1 / -1; } .er-wrow .er-name { white-space: normal; } }

/* earnings page: key reporters for the thesis (Mag 7, hot AI names) */
.kr-days { display: grid; gap: 14px; }
.kr-day { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: start; }
.kr-dh { position: sticky; top: 110px; display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border-inline-start: 3px solid var(--gold); }
.kr-dh b { font-size: 1rem; }
.kr-dh .num { color: var(--ink-2); font-size: .9375rem; }
.kr-when { font-size: .75rem; color: var(--gold); font-weight: 600; }
.kr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.kr-card { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .15s; }
.kr-card:hover { border-color: var(--line-2); }
.kr-card header { display: flex; align-items: center; gap: 8px; }
.kr-sym { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 600; letter-spacing: .01em; color: var(--ink); }
.kr-mag { font-size: .625rem; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; color: var(--gold-ink); background: var(--gold); text-transform: uppercase; }
.kr-sess { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--ink-2); padding: 2px 8px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.kr-name { margin-top: -4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kr-why { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kr-move { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.kr-mrow { display: flex; align-items: center; gap: 10px; }
.kr-mrow b { font-size: 1rem; white-space: nowrap; }
.kr-spread { position: relative; flex: 1; height: 8px; border-radius: 4px; background: var(--surface-2); }
.kr-spread::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.kr-spread i { position: absolute; top: 0; bottom: 0; left: calc(50% - var(--w)); width: calc(2 * var(--w)); border-radius: 4px; background: color-mix(in srgb, var(--gold) 70%, transparent); }
.kr-na { font-size: .8125rem; color: var(--ink-3); }
.kr-card footer { display: flex; align-items: center; gap: 14px; color: var(--ink-3); }
.kr-src { margin-inline-start: auto; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .8125rem; }
.kr-src:hover { border-color: var(--gold); color: var(--gold); }
.kr-donebox { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); display: grid; gap: 4px; }
.kr-donebox h3 { margin: 0; }
.kr-done { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(160px, 1.3fr) minmax(220px, 1.6fr) 26px; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.kr-dwho { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.kr-dbar { position: relative; height: 12px; border-radius: 6px; background: var(--surface-2); }
.kr-dbar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-2); }
.kr-dbar .kr-typ { position: absolute; top: -2px; bottom: -2px; left: calc(50% - var(--w)); width: calc(2 * var(--w)); border: 1px dashed var(--ink-3); border-radius: 6px; }
.kr-dbar i { position: absolute; top: 2px; bottom: 2px; width: var(--w); border-radius: 4px; }
.kr-dbar i.up { left: 50%; background: var(--up); }
.kr-dbar i.down { right: 50%; background: var(--down); }
.kr-dnums { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
@media (max-width: 760px) {
  .kr-day { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kr-dh { position: static; display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; }
  .kr-cards { grid-template-columns: minmax(0, 1fr); }
  .kr-done { grid-template-columns: minmax(0, 1fr) 26px; gap: 8px; }
  .kr-dbar, .kr-dnums { grid-column: 1 / -1; }
  .kr-done .kr-src { grid-row: 1; grid-column: 2; }
}

/* earnings page v2: one picture of the season (KPIs, Mag 7, the next two days, unified week, results, areas) */
.er-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.er-kpi { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); }
.er-kpi b { font-size: 1.75rem; line-height: 1.1; }
.er-kpi b small { font-size: .9375rem; color: var(--ink-3); font-weight: 500; margin-inline-start: 2px; }
.er-mag7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.m7 { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); min-height: 104px; }
.m7.soon { border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); background: color-mix(in srgb, var(--gold) 7%, var(--surface)); }
.m7.done { background: var(--surface-2); }
.m7 .kr-sym { font-size: 1.0625rem; }
.m7-state { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .8125rem; }
.m7-v { color: var(--ink-3); white-space: nowrap; }
.m7-v.up { color: var(--up); } .m7-v.down { color: var(--down); }
.m7-when { display: grid; gap: 2px; }
.m7-when b { font-size: .9375rem; }
.kr-mag { font-size: .625rem; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 4px; color: var(--gold-ink); background: var(--gold); text-transform: uppercase; white-space: nowrap; }
.kr-sym { font-family: var(--font-mono); font-size: 1.125rem; font-weight: 600; color: var(--ink); text-decoration: none; }
a.kr-sym:hover { color: var(--gold); }
.er-gtag { font-size: .6875rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.er-gtag.g-key { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.er-gtag.g-watch { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, var(--line)); }
.er-soon { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.er-sday { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--surface); }
.er-sdh { display: flex; align-items: baseline; gap: 10px; }
.er-sdh b { font-size: 1.125rem; }
.er-sdh .xs { margin-inline-start: auto; }
.er-slane { display: grid; gap: 6px; }
.er-slt { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--ink-2); font-weight: 600; padding-bottom: 2px; }
.er-srow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); color: var(--ink); text-decoration: none; }
a.er-srow:hover { background: var(--surface-2); }
.er-swho { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.er-sname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.er-swhy { grid-column: 1; margin: 0; color: var(--ink-2); line-height: 1.45; }
.er-smove { grid-column: 2; grid-row: 1 / span 2; display: grid; justify-items: end; align-content: center; gap: 2px; white-space: nowrap; }
.er-smove b { font-size: 1rem; }
.er-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.er-chip .gdot { width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); background: var(--ink-3); }
.er-chip.g-key .gdot { background: var(--gold); }
.er-chip.g-watch .gdot { background: var(--down); }
.er-chip.is-mag { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 60%, transparent); }
.er-rrow { grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
.er-rhead { grid-template-columns: 230px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); }
.er-rrow .er-who > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.er-rnote { color: var(--warn-ink); line-height: 1.4; margin-top: 2px; }
.er-m { display: grid; gap: 3px; }
.er-mv1 { display: flex; align-items: baseline; gap: 8px; }
.er-vd { font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.er-vd.up { color: var(--up); } .er-vd.down { color: var(--down); }
.er-re { display: grid; gap: 6px; }
.er-rn { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-3); }
.er-themes { padding: 10px 18px 14px; display: grid; }
.er-thead, .er-trow { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(200px, 2fr) 110px 110px; gap: 16px; align-items: center; }
.er-thead { padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
.er-trow { padding: 10px 0; border-bottom: 1px solid var(--line); }
.er-tname { display: flex; align-items: center; gap: 6px; }
.er-ai { font-size: .625rem; font-weight: 700; padding: 1px 5px; border-radius: 4px; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); }
.er-tprog { display: grid; gap: 4px; }
.er-track { display: flex; gap: 2px; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.er-track i, .er-tkey i { display: block; height: 100%; border-radius: 4px; }
.er-track .d, .er-tkey .d { background: var(--gold); }
.er-track .s, .er-tkey .s { background: color-mix(in srgb, var(--gold) 35%, transparent); }
.er-tquiet { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 0 4px; line-height: 1.6; }
.er-tquiet b { color: var(--gold); font-weight: 600; }
.er-tkey { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 10px; }
.er-tkey span { display: inline-flex; align-items: center; gap: 6px; }
.er-tkey i { width: 14px; height: 8px; }
@media (max-width: 960px) {
  .er-mag7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .er-soon { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .er-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .er-kpi b { font-size: 1.375rem; }
  .er-mag7 { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(120px, 42%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .m7 { scroll-snap-align: start; }
  .er-thead { display: none; }
  .er-trow { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; }
  .er-tprog { grid-column: 1 / -1; grid-row: 2; }
  .er-week .er-day.is-past { display: none; }   /* on a phone the week starts today; past reports are in the results */
  .er-rhead { display: none; }
  .er-rrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; }
  .er-rrow .er-who, .er-rrow .er-re { grid-column: 1 / -1; }
  .er-mv1 { flex-wrap: wrap; gap: 2px 8px; }
  .er-plot .stop em { white-space: nowrap; transform: translateX(0); }
}

/* ---------- MVP: briefing, market map, academy, coach, screener, bottom bar ---------- */
.brief { padding-block: 28px 8px; }
.brief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .brief-grid { grid-template-columns: minmax(0, 1fr); } }
.brief-card { display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.brief-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .55; }
.brief-card > div:last-child { display: flex; flex-direction: column; gap: 10px; }
.brief-h { display: flex; align-items: center; gap: 10px; }
.brief-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-size: .8125rem; font-weight: 600; }
.brief-h h3 { font-size: 1.0625rem; }

.idx-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.idx { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--surface); }
.idx-name { font-size: .8125rem; color: var(--ink-3); font-weight: 600; }
.idx-px { font-size: 1.125rem; font-weight: 600; direction: ltr; text-align: start; }
.idx-chg { font-size: .9375rem; font-weight: 600; }
.idx-strip.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--r-md); }
.idx-strip.compact .idx { padding: 8px 10px; flex-direction: row; justify-content: space-between; align-items: baseline; gap: 6px; }
.idx-strip.compact .idx-px { display: none; }
.week-panel .idx-strip.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .week-panel .idx-strip.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.flow-list, .week-list, .watch-list, .alert-list, .coach-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.flow-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto 64px; gap: 8px; align-items: center; font-size: .9375rem; }
.flow-list li b { text-align: left; }
.flow-list.lag { padding-top: 6px; border-top: 1px dashed var(--line); opacity: .85; }
.watch-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; font-size: .9375rem; align-items: start; }
.watch-list .ticker, .alert-list .ticker { font-size: .9375rem; text-decoration: none; }
.w-ico, .alert-ico { line-height: 1.5; }
.alert-list li { display: grid; grid-template-columns: 24px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.alert-list li:first-child { border-top: 0; padding-top: 0; }

.rs-tag { font-size: .75rem; padding: 1px 7px; }
.rs-leading, .rs-turning_up { color: var(--up); border-color: color-mix(in srgb, var(--up) 40%, var(--line)); background: color-mix(in srgb, var(--up) 10%, var(--surface)); }
.rs-lagging, .rs-turning_down { color: var(--down); border-color: color-mix(in srgb, var(--down) 40%, var(--line)); background: color-mix(in srgb, var(--down) 10%, var(--surface)); }
.rs-turning_up, .rs-turning_down { border-style: dashed; }

.week-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .week-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; } }
.week-grid h3 { font-size: .875rem; color: var(--ink-3); margin-bottom: 8px; }
.week-list li { display: flex; justify-content: space-between; gap: 10px; font-size: .9375rem; }
.sym-chips { display: flex; flex-wrap: wrap; gap: 8px 7px; padding: 2px 0 4px; }
/* Balloons: a puffy pill tinted by where the stock now stands (gold for a new entrant), lit from the top,
   floating on a soft shadow of its own colour. Hover lifts it a little, like a balloon on a string. */
.sym-chip { --c: var(--gold); position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 7px;
  border-radius: 999px; font-size: .875rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .01em;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: radial-gradient(120% 140% at 30% 0%, color-mix(in srgb, var(--c) 34%, var(--surface)) 0%, color-mix(in srgb, var(--c) 12%, var(--surface)) 55%, color-mix(in srgb, var(--c) 6%, var(--surface-2)) 100%);
  box-shadow: inset 0 1.5px 0 color-mix(in srgb, #fff 28%, transparent), inset 0 -3px 6px color-mix(in srgb, var(--c) 16%, transparent),
    0 4px 10px -4px color-mix(in srgb, var(--c) 55%, transparent);
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .18s ease; }
.sym-chip.st-ready { --c: var(--s-ready); } .sym-chip.st-strong { --c: var(--s-strong); } .sym-chip.st-turning { --c: var(--s-turning); }
.sym-chip.st-emerging { --c: var(--s-emerging); } .sym-chip.st-watch { --c: var(--s-watch); }
.sym-chip:hover, .sym-chip:focus-visible { transform: translateY(-2px) scale(1.04);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 26%, transparent), inset 0 -2px 4px color-mix(in srgb, var(--c) 20%, transparent),
    0 8px 16px -6px color-mix(in srgb, var(--c) 70%, transparent); }
.sym-chip .st { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 25%, transparent); }
@media (prefers-reduced-motion: reduce) { .sym-chip { transition: none; } .sym-chip:hover { transform: none; } }
.sym-chip.gone { color: var(--ink-3); text-decoration: line-through; }

.sector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.sector-tile { --mix: 0%; --hue: var(--up); display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line);
  background: color-mix(in srgb, var(--hue) var(--mix), var(--surface)); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.sector-tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.sector-tile.strong { color: #fff; }
.sector-tile.strong .sector-etf, .sector-tile.strong .sector-foot .xs { color: rgba(255, 255, 255, .8); }
.sector-tile.strong .spark-line { stroke: #fff; }
.sector-tile.strong .spark-area, .sector-tile.strong .spark-dot { fill: #fff; }
.sector-name { font-weight: 700; font-size: 1rem; }
.sector-etf { color: var(--ink-3); }
.sector-ret { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.sector-spark svg.spark { width: 100%; height: 30px; }
.sector-foot { align-items: center; }

.market-split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .market-split { grid-template-columns: minmax(0, 1fr); } }
.rrg-box { margin: 0; }
.rrg { width: 100%; height: auto; display: block; font-family: var(--font-body); overflow: visible; }
.rrg-lead { fill: color-mix(in srgb, var(--up) 7%, transparent); }
.rrg-lag { fill: color-mix(in srgb, var(--down) 7%, transparent); }
.rrg-turn { fill: color-mix(in srgb, var(--up) 3%, transparent); }
.rrg-fade { fill: color-mix(in srgb, var(--down) 3%, transparent); }
.rrg-lead-line { stroke: var(--line-2); stroke-width: 1; }
.rrg-axis { stroke: var(--line-2); stroke-width: 1; }
.rrg-q { font-size: 13px; font-weight: 700; fill: var(--ink-3); }
.rrg-q.up { fill: var(--up); } .rrg-q.down { fill: var(--down); }
.rrg-ax { font-size: 12px; fill: var(--ink-2); }
.rrg-pt circle, .rrg-pt rect { fill: var(--ink-2); stroke: var(--bg); stroke-width: 2; }
.rrg-pt.up circle, .rrg-pt.up rect { fill: var(--up); }
.rrg-pt.down circle, .rrg-pt.down rect { fill: var(--down); }
.rrg-pt.ai rect { fill: var(--gold); }
.rrg-pt text { font-family: var(--font-body); font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.rrg-pt.ai text { font-family: var(--font-body); fill: var(--gold); }
.k-dot, .k-dia { display: inline-block; width: 9px; height: 9px; margin-inline-end: 6px; background: var(--ink-2); border-radius: 50%; }
.k-dia { background: var(--gold); border-radius: 1px; transform: rotate(45deg); }
.read-box p b { font-weight: 700; }

.ai-chain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: layer; }
@media (max-width: 1000px) { .ai-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ai-chain { grid-template-columns: minmax(0, 1fr); } }
.ai-layer { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.ai-layer::after { content: ""; position: absolute; top: 50%; inset-inline-end: -9px; width: 14px; height: 14px; border-top: 1px solid var(--line-2); border-inline-end: 1px solid var(--line-2); background: var(--bg); transform: translateY(-50%) rotate(45deg); z-index: 1; }
[dir="rtl"] .ai-layer::after { transform: translateY(-50%) rotate(-135deg); }
.ai-layer:nth-child(4n)::after, .ai-layer:last-child::after { display: none; }
@media (max-width: 1000px) { .ai-layer::after { display: none; } }
.ai-layer.empty { opacity: .62; }
.ai-step { position: absolute; top: 10px; inset-inline-end: 12px; font-size: .75rem; color: var(--ink-3); }
.ai-layer h3 { font-size: 1rem; }
.ai-layer .spread { padding-inline-end: 20px; align-items: center; }
.ai-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .8125rem; color: var(--ink-3); }

.plain-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plain-lines li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: baseline; }
.pl-k { font-size: .8125rem; font-weight: 700; color: var(--gold); }
@media (max-width: 600px) { .plain-lines li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .scenarios { grid-template-columns: minmax(0, 1fr); } }
.scn { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); display: grid; gap: 4px; }
.scn.bull { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); background: color-mix(in srgb, var(--up) 7%, var(--surface)); }
.scn.bear { border-color: color-mix(in srgb, var(--down) 45%, var(--line)); background: color-mix(in srgb, var(--down) 7%, var(--surface)); }
.scn.bull b { color: var(--up); } .scn.bear b { color: var(--down); }

.toc .chip { text-decoration: none; }
.lesson { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; scroll-margin-top: 120px; }
.lesson-n { font-size: 2.2rem; font-weight: 600; color: var(--gold); opacity: .8; line-height: 1; }
@media (max-width: 600px) { .lesson { grid-template-columns: minmax(0, 1fr); gap: 6px; } .lesson-n { font-size: 1.4rem; } }
.lesson h2 { font-size: 1.3rem; }
.live-ex { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-md); border: 1px dashed color-mix(in srgb, var(--gold) 50%, var(--line)); background: var(--violet-soft); }
.live-ex .ticker { font-size: .9375rem; text-decoration: none; }
.vcp-steps { display: flex; align-items: flex-end; gap: 10px; height: 90px; }
.vcp-step { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; width: 56px; height: 100%; }
.vcp-step i { display: block; width: 100%; height: var(--h); min-height: 6px; border-radius: var(--r-sm) 6px 2px 2px; background: linear-gradient(var(--down), color-mix(in srgb, var(--down) 30%, transparent)); }
.vcp-step b { font-size: .8125rem; } .vcp-step small { font-size: .6875rem; color: var(--ink-3); }
.size-calc { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .size-calc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.size-calc label, .screener label { display: grid; gap: 4px; font-size: .8125rem; color: var(--ink-3); font-weight: 600; }
.size-calc .input { width: 100%; }
.size-out { font-size: 1rem; }

.coach-list li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.coach-list li:first-child { border-top: 0; }
.coach > i { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--up); }
.coach-warn > i { background: var(--gold); }
.coach-bad > i { background: var(--down); box-shadow: 0 0 0 4px color-mix(in srgb, var(--down) 18%, transparent); }

.screener { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: end; padding: 14px 16px; }
.screener[hidden] { display: none; }
@media (max-width: 960px) { .screener { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.screener input[type="range"] { accent-color: var(--gold); width: 100%; }
#more-filters[aria-expanded="true"] { border-color: var(--gold); color: var(--ink); }

.bottom-nav { display: none; }
@media (max-width: 760px) {
  .bottom-nav { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottom-nav > a, .bottom-nav > button { display: flex; border: 0; background: none; font-family: inherit; cursor: pointer; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; color: var(--ink-3); text-decoration: none; font-size: .6875rem; font-weight: 600; }
  .bottom-nav > a[aria-current="page"], .bottom-nav > button[aria-expanded="true"] { color: var(--gold); }
  .more-sheet { position: absolute; inset-inline: 10px; bottom: calc(100% + 8px); display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); }
  .more-sheet[hidden] { display: none; }
  .more-sheet a { padding: 12px 14px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-size: 1rem; }
  .more-sheet a[aria-current="page"] { background: var(--surface-2); color: var(--gold); }
  .has-bottom-nav .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .has-bottom-nav .nav { display: none; }
}
@media (max-width: 760px) {
  .has-bottom-nav .site-header > .wrap { flex-wrap: nowrap; }
  .has-bottom-nav .header-actions .btn-primary { display: none; }
  .sector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sector-tile { padding: 12px; }
  .sector-ret { font-size: 1.25rem; }
  .sector-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* sector page (sector.html) */
.back-link { color: var(--ink-3); text-decoration: none; align-self: flex-start; }
.back-link:hover { color: var(--gold); }
.sector-big-spark svg { width: 100%; height: 90px; display: block; }
.kv-tight.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .kv-tight.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sector-table td { white-space: nowrap; }
.sector-table td[data-col="sym"] { text-align: start; }
.sector-table td[data-col="sym"] .xs { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.sector-table tbody tr { cursor: pointer; }
.sector-table tbody tr:hover { background: var(--surface-2); }
.tag-radar { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.tag-cand { color: var(--up); border-color: color-mix(in srgb, var(--up) 45%, var(--line)); background: color-mix(in srgb, var(--up) 10%, var(--surface)); }
.tag-trend { color: var(--ink-2); }
.tag-weak { color: var(--down); border-color: color-mix(in srgb, var(--down) 35%, var(--line)); background: color-mix(in srgb, var(--down) 8%, var(--surface)); }
.legend .tag { font-size: .75rem; }
@media (max-width: 720px) {
  .sector-table thead { display: none; }
  .sector-table, .sector-table tbody, .sector-table tr, .sector-table td { display: block; width: 100%; }
  .sector-table tr { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
  table.data.sector-table td { border: 0; padding: 0; text-align: start; white-space: nowrap; }
  .sector-table td[data-col="sym"] { grid-column: 1 / 3; }
  .sector-table td[data-col="sym"] + td { justify-self: end; }
  .sector-table td[data-m]::before { content: attr(data-m); display: block; color: var(--ink-3); font-family: var(--font-body); font-size: .75rem; }
}

.rrg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 4px; }
@media (max-width: 600px) { .rrg-list { grid-template-columns: minmax(0, 1fr); } }
.rrg-group { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; }
.rrg-group > b.up { color: var(--up); } .rrg-group > b.down { color: var(--down); }
.rrg-group > span { display: flex; flex-wrap: wrap; gap: 6px; }
.rrg-item { padding: 2px 8px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: .8125rem; }
.rrg-item.ai { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); color: var(--gold); }


/* =====================================================================
   Refinements: gold kept for action and "today", the browser's own
   surfaces themed, one hover language for cards, flatter briefing.
   ===================================================================== */
a { text-decoration-color: color-mix(in srgb, var(--gold) 60%, transparent); }
::selection { background: color-mix(in srgb, var(--gold) 38%, transparent); color: var(--ink); }
html { scrollbar-color: var(--line-2) var(--bg); caret-color: var(--gold); }
:focus-visible { outline-color: var(--focus); }

/* Cards answer the pointer the same way: a lift, a gold hairline and a warm shadow. */
@media (hover: hover) and (pointer: fine) {
  .setup, .why, .rot-card { transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out); }
  .setup:hover, .why:hover, .rot-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--gold) 45%, var(--line));
    box-shadow: 0 18px 32px -22px color-mix(in srgb, var(--gold) 40%, #000); }
}
.setup:active, .rot-card:active { transform: translateY(0) scale(.99); }

/* The briefing: one frame per card, rules inside instead of a box in a box. */
.brief-card .idx-strip { border: 0; border-radius: 0; background: none; gap: 0; }
.brief-card .idx-strip .idx { background: none; border-bottom: 1px solid var(--line); padding-inline: 2px; }
.brief-card .idx-strip .idx:nth-child(odd) { padding-inline-end: 14px; border-inline-end: 1px solid var(--line); }
.brief-card .idx-strip .idx:nth-child(even) { padding-inline-start: 14px; }

/* Icons in the watch list and alerts: drawn, in the muted gold. */
.w-ico, .alert-ico { display: inline-grid; place-items: center; width: 24px; height: 24px; color: color-mix(in srgb, var(--gold) 80%, var(--ink-2)); }
.w-ico svg, .alert-ico svg { width: 16px; height: 16px; }
.alert-invalidation .alert-ico { color: var(--down); }

/* "Why now": the top stock leads across the row, the next two sit under it. */
@media (min-width: 961px) {
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 32px; align-items: start; }
  .why:first-child > .why-head, .why:first-child > div:nth-child(2), .why:first-child > .why-title { grid-column: 1; }
  .why:first-child > .why-title { font-size: 1.25rem; }
  .why:first-child > .why-rows { grid-column: 2; grid-row: 1 / span 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .why:first-child > .why-rows .why-row { display: block; }
  .why:first-child > .why-rows dt { margin-bottom: 4px; }
  .why:first-child > .why-ladder { grid-column: 1; margin-top: 12px; }
  .why:first-child > .why-foot { grid-column: 1 / -1; }
}
/* Ladder labels that sit close step apart. */
.why-ladder .pt.to-start span { transform: translateX(-34%); }
.why-ladder .pt.to-end span { transform: translateX(34%); }

/* The three facts stay on one line. */
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); justify-content: start; column-gap: 32px; }

/* Phones: the hero gets to the bulls and bears sooner. */
@media (max-width: 600px) {
  .hero-sub { display: none; }
  .hero-actions { margin-top: 20px; }
  .hero-facts { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .hero-facts b { font-size: 1.25rem; }
  .hero-facts span { font-size: .8125rem; line-height: 1.35; }
}

/* Tablets: eight sections and the actions do not fit one row; the nav scrolls instead of the page. */
@media (min-width: 761px) and (max-width: 1100px) {
  .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav a { padding: 8px 9px; white-space: nowrap; }
  .header-actions { flex: none; }
}

/* Loading: the radar sweeps until the data lands (still under reduced motion). */
.skeleton::before { content: ""; display: block; width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--ink-3) 55%, transparent);
  background: conic-gradient(from 0deg, color-mix(in srgb, var(--gold) 60%, transparent), transparent 90deg);
  animation: radar-sweep 1.6s linear infinite; }
td.skeleton::before { margin-bottom: 8px; }
@keyframes radar-sweep { to { transform: rotate(1turn); } }

/* =====================================================================
   Color themes. "dark" (black & gold) and "light" (daylight) are the
   base; each palette below sits on one of them (data-theme) and swaps
   the tokens. Direction stays green/red in every palette, and the
   accent is never a red, so a loss is never mistaken for an action.
   ===================================================================== */

/* Pastels. Text stays deep ink; the pastel lives in fills (buttons, chips, the background wash), never
   in the text itself. Each page body carries a still wash of three soft color pools, fixed behind the
   content, so the color drifts as you scroll without anything moving. */

/* Lavender & sage: lilac paper, sage and blush in the wash, a deep violet accent. */
:root[data-palette="lavender"] {
  --bg: #f1eff6; --surface: #fcfbff; --surface-2: #ece8f4; --line: #ddd8e8; --line-2: #cbc4dc;
  --ink: #24213a; --ink-2: #4c4865; --ink-3: #68637f;
  --teal: #24213a; --paper: #f1eff6;
  --gold: #6a4fb3; --gold-ink: #ffffff; --logo-gold: #b07a10;
  --violet: #6a4fb3; --violet-soft: rgba(106, 79, 179, .08);
  --brand: #b9dcc4; --brand-ink: #1f3a2c;   /* sage: buttons and fills, so lavender keeps the text and accents */
  --field: #24213a; --field-ink: #f1eff6;
  --link: #5a42a3; --focus: #6a4fb3;
  --up: #2b7553; --down: #b0395f;
  --warn-bg: #f6ecd8; --warn-line: #e6d2a8; --warn-ink: #5e4512;
  --s-ready: #6a4fb3; --s-strong: #2b7553; --s-turning: #9b4a8c; --s-emerging: #3d6aa8; --s-watch: #7a768c;
  --chart-price: #24213a; --chart-ema20: #3d6aa8; --chart-ema50: #6a4fb3; --chart-grid: #e8e4f0; --chart-sma150: #b47ab0;
  --tape-bg: #e6e1f1; --tape-line: #d6cfe6; --tape-ink: #24213a; --tape-dim: #68637f; --tape-up: #2b7553; --tape-down: #b0395f; --tape-raise: #ddd6ee;
  --heat-ink: #ffffff; --stage-top: #d6c9f2; --stage: #f1ecfa; --stage-ground: #d3c9e9;
  --wash: radial-gradient(60% 50% at 8% 0%, #e2d9f6 0, transparent 70%), radial-gradient(50% 45% at 95% 18%, #d6eadc 0, transparent 70%), radial-gradient(70% 50% at 50% 100%, #f4e3ee 0, transparent 70%);
}
:root[data-palette="lavender"] .scope { --sc-face: #2a2540; --sc-bg: #221e36; --sc-glow: #352e52; --sc-line: #463e66; --sc-ink: #b3abcf; --sc-sweep: 203, 186, 242; --s-ready: #cbbaf2; --s-strong: #8fd9b4; --s-emerging: #9cc2ff; --s-turning: #f0b3e0; --s-watch: #8a85a6; }

/* Apricot & mist: warm cream, apricot and a misty blue in the wash, a burnt-apricot accent. */
:root[data-palette="apricot"] {
  --bg: #f8f2ed; --surface: #fffbf8; --surface-2: #f3ebe3; --line: #e8dcd2; --line-2: #d9c9bb;
  --ink: #2a2320; --ink-2: #55493f; --ink-3: #72645a;
  --teal: #2a2320; --paper: #f8f2ed;
  --gold: #a9512b; --gold-ink: #ffffff; --logo-gold: #b07a10;
  --violet: #a9512b; --violet-soft: rgba(169, 81, 43, .08);
  --brand: #f6bc9e; --brand-ink: #2a2320;
  --field: #2a2320; --field-ink: #f8f2ed;
  --link: #98461f; --focus: #a9512b;
  --up: #2c7448; --down: #a3366b;
  --warn-bg: #f8e9cf; --warn-line: #e8cf9f; --warn-ink: #5f4310;
  --s-ready: #a9512b; --s-strong: #2c7448; --s-turning: #7d4fa8; --s-emerging: #3f6d97; --s-watch: #857669;
  --chart-price: #2a2320; --chart-ema20: #3f6d97; --chart-ema50: #a9512b; --chart-grid: #efe5dc; --chart-sma150: #9a6fc0;
  --tape-bg: #f3e3d8; --tape-line: #e8d2c3; --tape-ink: #2a2320; --tape-dim: #72645a; --tape-up: #2c7448; --tape-down: #a3366b; --tape-raise: #efd6c6;
  --heat-ink: #ffffff; --stage-top: #f8c9ae; --stage: #fcf0e7; --stage-ground: #ebd6c6;
  --wash: radial-gradient(55% 50% at 92% 0%, #fbd9c6 0, transparent 70%), radial-gradient(55% 50% at 5% 35%, #dbe6f1 0, transparent 70%), radial-gradient(70% 50% at 50% 100%, #f6ebcd 0, transparent 70%);
}
:root[data-palette="apricot"] .scope { --sc-face: #2e2a33; --sc-bg: #25222a; --sc-glow: #3a3440; --sc-line: #4a434f; --sc-ink: #bdb2a8; --sc-sweep: 246, 188, 158; --s-ready: #f6bc9e; --s-strong: #8fd9b4; --s-emerging: #a9c8ec; --s-turning: #d6b6f2; --s-watch: #8f857d; }

/* Dusk: the evening one. Deep indigo with pastel lilac, mint and rose doing the talking. */
:root[data-palette="dusk"] {
  --bg: #17162a; --surface: #1f1d36; --surface-2: #27243f; --line: #34304f; --line-2: #423d61;
  --ink: #f0eef8; --ink-2: #c3bfd8; --ink-3: #9a96b5;
  --teal: #c8b6ff; --paper: #f0eef8;
  --gold: #c8b6ff; --gold-ink: #1b1830; --logo-gold: #e8b84a;
  --violet: #c8b6ff; --violet-soft: rgba(200, 182, 255, .10);
  --brand: #c8b6ff; --brand-ink: #1b1830;
  --field: #141326; --field-ink: #f0eef8;
  --link: #d4c6ff; --focus: #c8b6ff;
  --up: #8fe3bf; --down: #ffa3b8;
  --warn-bg: #2d2740; --warn-line: #574a6e; --warn-ink: #f3dca8;
  --s-ready: #c8b6ff; --s-strong: #8fe3bf; --s-turning: #ffc6e6; --s-emerging: #9cc8ff; --s-watch: #8a87a3;
  --chart-price: #f0eef8; --chart-ema20: #9cc8ff; --chart-ema50: #c8b6ff; --chart-grid: #232038; --chart-sma150: #ffc6e6;
  --tape-bg: #121122; --tape-line: #2a2742; --tape-ink: #f0eef8; --tape-dim: #9a96b5; --tape-up: #8fe3bf; --tape-down: #ffa3b8; --tape-raise: #1b1930;
  --heat-ink: #17162a; --stage-top: #322a5c; --stage: #17162a; --stage-ground: #25223f;
  --wash: radial-gradient(60% 50% at 10% 0%, #2c2550 0, transparent 70%), radial-gradient(50% 45% at 95% 30%, #15303a 0, transparent 70%), radial-gradient(70% 50% at 50% 100%, #2e1f3a 0, transparent 70%);
}
:root[data-palette="dusk"] .scope { --sc-face: #1b1930; --sc-bg: #141326; --sc-glow: #262245; --sc-line: #36315a; --sc-ink: #9a96b5; --sc-sweep: 200, 182, 255; --s-ready: #c8b6ff; }

/* The wash, shared by the pastels. */
:root[data-palette] body { background: var(--wash), var(--bg); background-attachment: fixed; }
:root[data-palette] .site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); }

/* The picker: a swatch button in the header and a small menu of palettes. */
.theme-pick { position: relative; }
.theme-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 40; min-width: 220px; padding: 6px; display: grid; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45);
  transform-origin: top left; animation: menu-in .16s var(--ease-out, ease-out); }
:root[dir="ltr"] .theme-menu { transform-origin: top right; }
.theme-menu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.theme-menu h4 { margin: 4px 10px 6px; font-size: .8125rem; font-weight: 600; color: var(--ink-3); }
.theme-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: 500 .9375rem var(--font-body); text-align: start; cursor: pointer; }
.theme-opt:hover, .theme-opt:focus-visible { background: var(--surface-2); }
.theme-opt[aria-checked="true"] { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.theme-opt[aria-checked="true"]::after { content: ""; margin-inline-start: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.theme-opt small { display: block; font-size: .75rem; font-weight: 400; color: var(--ink-3); }
.swatch { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35);
  background: conic-gradient(var(--sw-a) 0 50%, var(--sw-b) 0 75%, var(--sw-c) 0); }
.icon-btn .swatch { width: 18px; height: 18px; }

/* Subscribers: what the free version holds back (app.js paywall) */
.paywall { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 16px 18px; border-radius: var(--r-md);
  border: 1px dashed color-mix(in srgb, var(--gold) 55%, var(--line)); background: color-mix(in srgb, var(--gold) 6%, var(--surface)); }
.pw-lock { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.pw-body { flex: 1 1 240px; min-width: 0; }
.pw-body p { margin: 4px 0 0; }
.pw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.paywall.pw-compact { padding: 12px 14px; margin-top: 12px; }
.paywall.pw-compact .pw-lock { width: 32px; height: 32px; }
.teaser-bar { margin-top: 16px; }
.pw-row td { padding: 12px 0; }
.pw-row:hover { background: none; }
#setups .paywall, #heat .paywall, #why .paywall, #themes .paywall { grid-column: 1 / -1; }

/* =====================================================================
   Login (site/login.html, login.js). The form on the
   start side; on the other, the radar of the last close turning behind
   glass, with tonight's numbers. Built only from the theme tokens, so
   every color theme carries it.
   ===================================================================== */
.login-page { background: var(--wash, none), var(--bg); background-attachment: fixed; }
.login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100dvh; }
.login-form-side { display: flex; flex-direction: column; gap: 32px; padding: clamp(24px, 4vw, 56px); }
.login-brand { font-size: 1.125rem; align-self: flex-start; }
.login-card { width: min(100%, 400px); margin-block: auto; align-self: center; display: grid; gap: 22px; }
.login-title { font: 800 clamp(2rem, 1.4rem + 1.8vw, 2.6rem)/1.1 var(--font-display); letter-spacing: -.02em; }
.login-sub { margin-top: -10px; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.55; text-wrap: pretty; }
.login-fields { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .9375rem; font-weight: 600; color: var(--ink); }
.field-top { display: flex; justify-content: space-between; align-items: baseline; }
.field input[type="text"], .field input[type="password"] { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: 500 1rem var(--font-body); transition: border-color .15s, box-shadow .15s; text-align: left; }
.field input:hover { border-color: var(--ink-3); }
.field input:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.field input[aria-invalid] { border-color: var(--down); }
.field input[aria-invalid]:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 22%, transparent); }
.field-err { font-size: .875rem; color: var(--down); }
.field-hint { font-size: .8125rem; color: var(--ink-3); }
.pass-wrap { position: relative; }
/* The field is left-to-right in both languages, so the eye sits on its right, physically. */
.pass-wrap input { padding-right: 48px !important; }
.pass-eye { position: absolute; inset-block: 0; right: 4px; width: 42px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: var(--r-sm); }
.pass-eye:hover, .pass-eye[aria-pressed="true"] { color: var(--ink); }
.remember { display: flex; align-items: center; gap: 10px; font-size: .9375rem; color: var(--ink-2); cursor: pointer; }
.remember input { width: 18px; height: 18px; accent-color: var(--gold); }
.login-submit { min-height: 50px; width: 100%; font-size: 1.0625rem; font-weight: 700; border-radius: var(--r-md); position: relative; }
.login-submit.busy span { opacity: 0; }
.login-submit.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--brand-ink) 30%, transparent); border-top-color: var(--brand-ink); animation: radar-sweep .8s linear infinite; }
.login-alert { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); font-size: .9375rem; line-height: 1.5; }
.login-alt { font-size: .9375rem; color: var(--ink-2); padding-top: 18px; border-top: 1px solid var(--line); }
.login-legal { font-size: .8125rem; color: var(--ink-3); }

/* The page: a glow of the theme's accent and gain colors over a faint field of rising candles,
   fading out before it reaches the form. Decoration stays under 10% so it never competes. */
.login-page { position: relative; }
.login-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(42% 46% at 22% 30%, color-mix(in srgb, var(--gold) 22%, transparent) 0, transparent 70%),
    radial-gradient(38% 42% at 34% 78%, color-mix(in srgb, var(--up) 14%, transparent) 0, transparent 70%),
    radial-gradient(30% 30% at 88% 8%, color-mix(in srgb, var(--s-emerging) 10%, transparent) 0, transparent 70%); }
:root[dir="ltr"] .login-bg { transform: scaleX(-1); }
.login-candles { position: absolute; inset: auto 0 0 0; width: 100%; height: 62%; opacity: .14;
  mask-image: linear-gradient(to right, #000 0, #000 35%, transparent 70%), linear-gradient(to top, #000 40%, transparent);
  mask-composite: intersect; -webkit-mask-composite: source-in; }
.login-candles .cu { color: var(--up); } .login-candles .cd { color: var(--down); }
.login-candles line { stroke: currentColor; stroke-width: 1.5; }
.login-candles rect { fill: currentColor; }

/* The form sits on frosted glass over the same background. */
.login-card { padding: clamp(24px, 3vw, 36px); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .45), inset 0 1px 0 color-mix(in srgb, #fff 8%, transparent); width: min(100%, 440px); }

/* The visual side: a short promise, then three glass cards that float in and keep a slow drift. */
.login-visual { display: grid; align-content: center; justify-items: center; gap: 40px; padding: 40px clamp(24px, 4vw, 64px); }
.login-brand-m { display: none; }
.lv-head { font: 800 clamp(2.2rem, 1.2rem + 2.6vw, 3.6rem)/1.05 var(--font-display); letter-spacing: -.03em; color: var(--ink); text-align: center; text-wrap: balance; }
.lv-stack { position: relative; width: min(100%, 460px); aspect-ratio: 460 / 320; }
.glass { position: absolute; border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 62%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .5), inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent); color: var(--ink);
  opacity: 0; animation: glass-in .8s var(--ease-out) forwards, drift 9s ease-in-out 1.2s infinite alternate; }
.g-chart { inset: 17% 5% auto 5%; padding: 18px 20px 14px; display: grid; gap: 10px; }
.g-chart header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.g-chart header div:first-child { display: grid; }
.g-chart header b { font-size: 1.125rem; letter-spacing: .02em; }
.g-chart header span { font-size: .8125rem; color: var(--ink-3); }
.g-px { display: grid; justify-items: end; }
.g-px b { font-size: 1.375rem; }
.g-px .up { color: var(--up); font-size: .875rem; } .g-px .down { color: var(--down); font-size: .875rem; }
.g-spark { width: 100%; height: 110px; overflow: visible; }
.gf-a { stop-color: color-mix(in srgb, var(--gold) 38%, transparent); } .gf-b { stop-color: transparent; }
.g-line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: g-draw 1.4s var(--ease-out) .5s forwards; }
.g-pivot { stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 4 5; }
.g-dot { fill: var(--gold); stroke: var(--surface); stroke-width: 2; opacity: 0; animation: glass-in .3s ease-out 1.8s forwards; }
.g-chart footer { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--ink-3); direction: ltr; } /* time runs left to right, like the chart */
.g-chart header b { font-family: var(--font-body); letter-spacing: 0; }
.g-badge { padding: 3px 10px; border-radius: 99px; font-size: .8125rem; font-weight: 700; color: var(--up);
  background: color-mix(in srgb, var(--up) 14%, transparent); border: 1px solid color-mix(in srgb, var(--up) 35%, transparent); }
.g-burst { fill: color-mix(in srgb, var(--gold) 22%, transparent); stroke: var(--gold); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: burst 1s var(--ease-out) 1.5s forwards; }
@keyframes burst { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .g-burst { opacity: 1; } }
.g-chart footer b { color: var(--ink); }
.g-score { inset: 0 auto auto 0; padding: 12px 18px 12px 12px; display: flex; align-items: center; gap: 12px; animation-delay: .15s, 1.4s; }
.g-score b { display: block; font-size: 1.5rem; line-height: 1; }
.g-score span { font-size: .8125rem; color: var(--ink-2); }
.gs-track { fill: none; stroke: color-mix(in srgb, var(--ink) 12%, transparent); stroke-width: 6; }
.gs-arc { fill: none; stroke: var(--up); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 32px 32px;
  stroke-dasharray: 0 var(--ring); animation: ring-fill 1.2s var(--ease-out) .6s forwards; }
.g-target { inset: auto 0 2% auto; padding: 12px 18px 12px 14px; display: flex; align-items: center; gap: 12px; animation-delay: .3s, 1.6s; }
.g-target div span { display: block; font-size: .8125rem; color: var(--ink-2); }
.g-target b { font-size: 1.25rem; }
.g-coin { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 800 1.125rem var(--font-body);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--gold) 70%, #fff), var(--gold)); color: var(--gold-ink);
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--gold) 70%, #000); }
@keyframes glass-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes drift { to { translate: 0 -6px; } }
@keyframes g-draw { to { stroke-dashoffset: 0; } }
@keyframes ring-fill { to { stroke-dasharray: var(--dash) var(--ring); } }
@media (prefers-reduced-motion: reduce) {
  .glass, .g-dot { opacity: 1; }
  .g-line { stroke-dashoffset: 0; }
  .gs-arc { stroke-dasharray: var(--dash) var(--ring); }
}

@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .login-visual { order: -1; padding: 24px 16px 8px; gap: 20px; }
  .login-brand-m { display: inline-flex; color: var(--ink); justify-self: start; }
  .lv-head { font-size: 1.75rem; }
  .lv-stack { width: min(100%, 380px); aspect-ratio: 380 / 300; }
  .g-chart { inset: 20% 0 auto 0; }
  .g-target { inset: auto auto 0 0; }
  .login-form-side { padding: 8px 16px 32px; gap: 20px; }
  .login-brand { display: none; }
  .login-card { margin: 0 auto; }
  .login-candles { height: 45%; }
}

/* Login cards, wordless: volume bars, the gauge's arrow, the coin stack. */
.g-chart { padding: 16px 18px; }
.g-chart .g-spark { height: 150px; }
.g-vol { fill: color-mix(in srgb, var(--ink) 16%, transparent); transform-box: fill-box; transform-origin: bottom; animation: vol-in .5s var(--ease-out) calc(.6s + var(--i) * 25ms) both; }
.g-vol.hot { fill: color-mix(in srgb, var(--up) 70%, transparent); }
@keyframes vol-in { from { transform: scaleY(0); } }
.g-score { padding: 12px; }
.gs-up { fill: none; stroke: var(--up); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.g-target { padding: 10px 14px; }
.g-coins .c-side { fill: color-mix(in srgb, var(--gold) 70%, #000); }
.g-coins .c-top { fill: var(--gold); stroke: color-mix(in srgb, var(--gold) 60%, #fff); stroke-width: 1; }
.g-coins .c-sign { fill: var(--gold-ink); font: 800 9px var(--font-body); }
@media (prefers-reduced-motion: reduce) { .g-vol { animation: none; } }

/* Login icons: three rising candles in the gain color with a soft glow, and a gold coin that
   catches the light and turns over now and then. The coin is gold in every theme: money reads as gold. */
.login-page { --coin: #e9b949; }
:root[data-theme="light"] .login-page { --spark: var(--gold); }
.g-score, .g-target { padding: 10px; }
.cd-a { stop-color: color-mix(in srgb, var(--up) 55%, #fff); } .cd-b { stop-color: var(--up); }
.cd line { stroke: color-mix(in srgb, var(--up) 70%, var(--ink)); stroke-width: 2; stroke-linecap: round; }
.cd rect { fill: url(#cdl); }
.cd { transform-box: fill-box; transform-origin: bottom; animation: cd-grow .6s cubic-bezier(.34, 1.56, .64, 1) calc(.5s + var(--k) * .14s) both; }
.cd-glow rect { fill: var(--up); opacity: .55; }
.cd-glow { animation: cd-pulse 2.6s ease-in-out 1.2s infinite; }
.cd-spark, .cf-spark { fill: var(--spark, #fff); transform-box: fill-box; transform-origin: center; animation: twinkle 2.8s ease-in-out 1s infinite; }
.cf-a { stop-color: color-mix(in srgb, var(--coin) 35%, #fff); } .cf-b { stop-color: var(--coin); } .cf-c { stop-color: color-mix(in srgb, var(--coin) 65%, #000); }
.cf-edge { fill: color-mix(in srgb, var(--coin) 55%, #000); }
.cf-rim { fill: none; stroke: color-mix(in srgb, var(--coin) 60%, #000); stroke-width: 1.6; opacity: .55; }
.cf-sign { font: 900 26px var(--font-body); fill: color-mix(in srgb, var(--coin) 45%, #000); }
.cf-sign-sh { font: 900 26px var(--font-body); fill: color-mix(in srgb, var(--coin) 30%, #fff); opacity: .6; }
.cf-shine { fill: #fff; opacity: .28; }
.coin-spin { transform-box: fill-box; transform-origin: center; animation: coin-turn 6s ease-in-out 1.6s infinite; }
.g-coin3d { overflow: visible; filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--coin) 45%, transparent)); }
.g-candles { overflow: visible; filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--up) 35%, transparent)); }
@keyframes cd-grow { from { transform: scaleY(0); opacity: 0; } }
@keyframes cd-pulse { 50% { opacity: .35; } }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0deg); opacity: .3; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes coin-turn { 0%, 70%, 100% { transform: scaleX(1); } 78% { transform: scaleX(.08); } 86% { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .cd, .cd-glow, .cd-spark, .cf-spark, .coin-spin { animation: none; } }

/* the academy: today's lesson and tips */
.learn-today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 14px; }
@media (max-width: 760px) { .learn-today { grid-template-columns: minmax(0, 1fr); } }
.today-lesson { display: grid; gap: 6px; align-content: start; text-decoration: none; color: inherit; border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.today-lesson b { font-size: 1.25rem; }
.today-lesson:hover { border-color: var(--gold); }
.tips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .tips { grid-template-columns: minmax(0, 1fr); } }
.tips li { display: grid; gap: 6px; align-content: start; padding-inline-start: 12px; border-inline-start: 2px solid color-mix(in srgb, var(--gold) 55%, var(--line)); }
.tips .tag { justify-self: start; }
.tag.gold { justify-self: start; align-self: flex-start; width: fit-content; color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); background: color-mix(in srgb, var(--gold) 10%, var(--surface)); }
.lesson.is-today { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.learn-today h2 { font-size: 1.1rem; }

/* =====================================================================
   The clash: coins and clods as projectiles. One loop of 3.2s; the hit
   lands at its start on the bulls' day and .48s in on the bears' day.
   x moves at a constant speed while y rises (ease-out) and falls
   (ease-in) under gravity, so every path is a true parabola; the landing
   squashes, one small bounce, then rest and a fade. Coins spin in flight.
   ===================================================================== */
.arena { --t0: 1.48s; } .arena.bears-win { --t0: 1.58s; }
/* --t0 is the moment of contact: the bull's push peaks 12% into its loop (1.1s + .38s), the bear's ram 15% in. */
.proj { opacity: 0; }
.p-x, .p-y, .p-s, .p-shadow { transform-box: fill-box; }
.p-y { transform-origin: center bottom; } .p-s, .p-shadow { transform-origin: center; }
.hero.on .proj { animation: p-fade 3.2s linear calc(var(--t0) + var(--k)) infinite; }
.hero.on .p-x { animation: p-x 3.2s linear calc(var(--t0) + var(--k)) infinite; }
.hero.on .p-y { animation: p-y 3.2s linear calc(var(--t0) + var(--k)) infinite; }
.hero.on .coin-p .p-s { animation: p-spin 3.2s linear calc(var(--t0) + var(--k)) infinite; }
.hero.on .clod-p .p-s { animation: p-tumble 3.2s linear calc(var(--t0) + var(--k)) infinite; }
.hero.on .p-shadow { animation: p-shadow 3.2s linear calc(var(--t0) + var(--k)) infinite; }
@keyframes p-fade { 0% { opacity: 0; } 2% { opacity: 1; } 70% { opacity: 1; } 82%, 100% { opacity: 0; } }
@keyframes p-x { 0% { transform: none; } 30% { transform: translateX(var(--dx)); } 36%, 100% { transform: translateX(calc(var(--dx) * 1.06)); } }
@keyframes p-y {
  0% { transform: none; animation-timing-function: cubic-bezier(.25, .6, .45, 1); }
  10% { transform: translateY(var(--apex)); animation-timing-function: cubic-bezier(.55, 0, .85, .45); }
  24% { transform: translateY(var(--dy)) scale(1.16, .8); animation-timing-function: cubic-bezier(.25, .6, .45, 1); }
  28% { transform: translateY(calc(var(--dy) - 7px)) scale(.96, 1.04); animation-timing-function: cubic-bezier(.55, 0, .85, .45); }
  32% { transform: translateY(var(--dy)) scale(1.05, .94); }
  35%, 100% { transform: translateY(var(--dy)); }
}
/* A coin turning in flight (face, edge, back, edge, face), landing face-on and rocking to rest. */
@keyframes p-spin {
  0% { transform: none; } 5% { transform: scaleX(.12); } 10% { transform: scaleX(-1); } 15% { transform: scaleX(.12); } 20% { transform: scaleX(1); }
  24% { transform: rotate(-12deg); } 30% { transform: rotate(6deg); } 35%, 100% { transform: none; }
}
@keyframes p-tumble { 0% { transform: none; } 24% { transform: rotate(220deg); } 35%, 100% { transform: rotate(250deg); } }
@keyframes p-shadow { 0% { opacity: 0; transform: scale(.4); } 10% { opacity: .12; transform: scale(.5); } 24%, 32% { opacity: .42; transform: none; } 70% { opacity: .42; } 82%, 100% { opacity: 0; transform: none; } }
.p-shadow { fill: #000; opacity: 0; }
.clod-p .p-shadow { display: none; }

/* The coin: gold on the bulls' day, the loss color on the bears' day. */
.cg-a { stop-color: #fff1c4; } .cg-b { stop-color: #e8b84a; } .cg-c { stop-color: #9c6f14; }
.cr-a { stop-color: color-mix(in srgb, var(--down) 40%, #fff); } .cr-b { stop-color: var(--down); } .cr-c { stop-color: color-mix(in srgb, var(--down) 55%, #000); }
.ca-edge.gold { fill: #8a6114; } .ca-edge.red { fill: color-mix(in srgb, var(--down) 45%, #000); }
.ca-ring { fill: none; stroke-width: 1; } .ca-ring.gold { stroke: #b8861e; } .ca-ring.red { stroke: color-mix(in srgb, var(--down) 60%, #000); }
.ca-sign { font: 900 10.5px var(--font-body); } .ca-sign.gold { fill: #7a5410; } .ca-sign.red { fill: color-mix(in srgb, var(--down) 38%, #000); }
.ca-spec { fill: #fff; opacity: .55; }

/* Clods: a pebble with a lit edge, in the stage's earth. */
.pebble-fly { fill: color-mix(in srgb, var(--stage-ground) 55%, #8c7656); }
.pebble-lit { fill: none; stroke: color-mix(in srgb, var(--stage-ground) 40%, #e4d4b2); stroke-width: .7; stroke-linecap: round; }

/* Dust: two soft puffs from the crack, the second a beat later. */
.dust-a { stop-color: color-mix(in srgb, var(--stage-ground) 40%, #cdbb98); stop-opacity: .7; }
.dust-b { stop-color: color-mix(in srgb, var(--stage-ground) 40%, #cdbb98); stop-opacity: 0; }
.dust-cloud { opacity: 0; transform-box: fill-box; transform-origin: center bottom; }
.hero.on .dust-cloud { animation: dust-cloud 3.2s var(--ease-out) var(--t0) infinite; }
.hero.on .dust-cloud.late { animation-delay: calc(var(--t0) + .08s); }
@keyframes dust-cloud { 0% { opacity: 0; transform: scale(.4, .3); } 8% { opacity: .9; } 50% { opacity: 0; transform: scale(1.5, 1.7) translateY(-3px); } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .proj, .dust-cloud { display: none; } }

/* The theme button: a quartered swatch, never the page's own background. Clockwise from the top: gold,
   cream, emerald, lilac; every neighbor differs in hue and lightness, and none is orange or black. */
.swatch.quad { background: conic-gradient(#e8b84a 0 25%, #f3eee4 0 50%, #1fae7a 0 75%, #a98bf0 0); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent); }

/* =====================================================================
   The fight's acting. Each hit has a wind-up, a strike and a follow-
   through; the one who takes it recoils; at contact a flash ring and
   short impact lines fan out of the contact point, and nothing shakes. Between hits the
   bull's tail keeps swishing, a beat behind the body (overlap).
   ===================================================================== */
.bear .head { transform-box: fill-box; transform-origin: 78% 72%; }
.bear .paw-arm { transform-box: fill-box; transform-origin: 92% 30%; }
.bull .tail { transform-box: fill-box; transform-origin: 100% 0%; }
/* Bulls' day: the horn drives in, the bear's paw gives and its head snaps back, then settles. */
.hero.on .bear .head { animation: head-recoil 3.2s var(--ease-out) var(--t0) infinite; }
.hero.on .bear .paw-arm { animation: paw-give 3.2s var(--ease-out) var(--t0) infinite; }
@keyframes head-recoil { 0% { rotate: 0deg; } 5% { rotate: 7deg; translate: 2px -1px; } 16% { rotate: -2deg; translate: 0 0; } 28%, 100% { rotate: 0deg; translate: 0 0; } }
@keyframes paw-give { 0% { rotate: 0deg; translate: 0 0; } 4% { rotate: 6deg; translate: 5px -2px; } 18% { rotate: -2deg; translate: -1px 0; } 30%, 100% { rotate: 0deg; translate: 0 0; } }
/* Bears' day: the paw draws back (anticipation), strikes through, and follows through. */
.hero.on .bears-win .bear .paw-arm { animation: paw-strike 3.2s cubic-bezier(.45, 0, .2, 1) 1.1s infinite; }
.hero.on .bears-win .bear .head { animation: head-lunge 3.2s cubic-bezier(.45, 0, .2, 1) 1.1s infinite; }
@keyframes paw-strike { 0% { rotate: 0deg; translate: 0 0; } 9% { rotate: 10deg; translate: 7px -3px; } 15% { rotate: -9deg; translate: -9px 2px; } 24% { rotate: -3deg; translate: -3px 1px; } 45%, 100% { rotate: 0deg; translate: 0 0; } }
@keyframes head-lunge { 0% { rotate: 0deg; } 9% { rotate: 4deg; } 15% { rotate: -6deg; } 30% { rotate: -1deg; } 50%, 100% { rotate: 0deg; } }
.hero.on .bull .tail { animation: tail-swish 3.2s ease-in-out calc(var(--t0) + .12s) infinite; }
@keyframes tail-swish { 0%, 100% { rotate: 0deg; } 18% { rotate: 14deg; } 42% { rotate: -6deg; } 66% { rotate: 5deg; } }
/* Impact lines fan out of the contact point and vanish. */
.impact line { stroke: color-mix(in srgb, var(--gold) 70%, #fff); stroke-width: 2.2; stroke-linecap: round; }
.impact { opacity: 0; transform-box: fill-box; transform-origin: center; }
.hero.on .impact { animation: impact 3.2s var(--ease-out) var(--t0) infinite; }
@keyframes impact { 0% { opacity: 0; scale: .5; } 2% { opacity: 1; } 14% { opacity: 0; scale: 1.5; } 100% { opacity: 0; scale: 1.5; } }
@media (prefers-reduced-motion: reduce) { .bear .head, .bear .paw-arm, .bull .tail, .impact { animation: none !important; } .impact { display: none; } }
/* On the bears' day the bear leans through the clash point: the flash goes where the blow lands, on the bull. */
.bears-win .clash { translate: -18px 6px; }

/* a stock that left the radar: a quiet page that says when and why, never the old numbers */
.gone-page { gap: 12px; max-width: 640px; }
.gone-mark { width: 44px; height: 44px; border-radius: 50%; border: 2px dashed var(--line-2); position: relative; }
.gone-mark::after { content: ""; position: absolute; inset: 50% 9px auto; height: 2px; background: var(--ink-3); transform: rotate(-35deg); }
.my-gone { margin: 4px 0 0; }

/* data that is due but not in yet: named, never blank */
.er-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-md); }
.er-wchip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.er-wchip .kr-sym { font-size: .875rem; }
.cal-wait b, .m7-wait { color: var(--ink-3); font-weight: 500; font-style: italic; }

/* ---------- first-visit tour ---------- */
.tour { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.tour-scrim { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); animation: tour-fade .25s ease both; }
.tour-card { position: relative; width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px;
  padding: 18px 20px 20px; display: grid; gap: 12px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); outline: none; }
.tour-card.in .tour-vis, .tour-card.in h2, .tour-card.in .tour-b { animation: tour-up .35s cubic-bezier(.2, .7, .2, 1) both; }
.tour-card.in h2 { animation-delay: .04s; } .tour-card.in .tour-b { animation-delay: .08s; }
.tour.out { opacity: 0; transition: opacity .2s ease; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-dots { display: flex; gap: 6px; flex: 1; max-width: 160px; }
.tour-dots i { flex: 1; height: 4px; border-radius: 4px; background: var(--line-2); transition: background .25s ease; }
.tour-dots i.on { background: var(--gold); }
.tour-skip { background: none; border: 0; color: var(--ink-3); font: inherit; font-size: .875rem; cursor: pointer; padding: 6px 4px; }
.tour-skip:hover { color: var(--ink); }
.tour-card h2 { font-size: 1.375rem; line-height: 1.25; margin: 2px 0 0; }
.tour-b { margin: 0; color: var(--ink-2); line-height: 1.65; min-height: 6.6em; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.tour-nav [data-next] { min-width: 120px; }
.tour-nav [data-prev][hidden] { visibility: hidden; display: inline-flex; }
.tour-vis { min-height: 150px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; padding: 16px; overflow: hidden;
  background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 30px; background-position: 0 14px; }
@media (max-width: 600px) {
  .tour { place-items: end stretch; padding: 0; }
  .tour-card { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); animation: tour-sheet .32s cubic-bezier(.2, .7, .2, 1) both; }
}
/* step 1: candles under a resistance line, the last one breaks out in gold */
.tv-break { position: relative; width: 240px; height: 118px; display: flex; align-items: flex-end; gap: 10px; direction: ltr; }
.tv-res { position: absolute; inset-inline: -6px; top: 34%; border-top: 2px dashed color-mix(in srgb, var(--ink) 45%, transparent); }
.tv-c { flex: 1; height: var(--h); border-radius: 5px; background: color-mix(in srgb, var(--ink) 22%, transparent); transform-origin: bottom; animation: tv-grow .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 60ms); }
.tv-c.gold { background: var(--gold); box-shadow: 0 0 24px color-mix(in srgb, var(--gold) 45%, transparent); }
/* step 2: the score ring and its two halves */
.tv-score { display: flex; align-items: center; gap: 22px; direction: ltr; }
.tv-ring { --p: 0; width: 108px; height: 108px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface-2) 78%, transparent 79%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--line-2) 0); }
.tv-ring b { font-size: 2rem; line-height: 1; } .tv-ring .ticker { font-size: .8125rem; }
.tv-split { display: grid; grid-template-columns: 110px auto; align-items: center; gap: 8px 10px; }
.tv-bar { height: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.tv-bar i { display: block; height: 100%; width: var(--w); background: var(--gold); border-radius: inherit; animation: tv-fill .6s .1s cubic-bezier(.2, .7, .2, 1) both; }
.tv-bar.res i { background: color-mix(in srgb, var(--gold) 55%, var(--ink-3)); }
/* step 3: the status ladder, the top rung is the entry */
.tv-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: min(280px, 100%); }
.tv-ladder li { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--surface);
  margin-inline-start: calc(var(--i) * 14px); animation: tour-up .35s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 70ms); }
.tv-ladder li.top { border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); }
/* step 4: a real stock's levels */
.tv-levels { width: 100%; display: grid; gap: 10px; }
.tv-lv { display: flex; justify-content: space-between; direction: ltr; }
.tv-lv span { display: grid; gap: 2px; } .tv-lv small { color: var(--ink-3); font-size: .75rem; }
@keyframes tour-fade { from { opacity: 0; } }
@keyframes tour-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes tour-sheet { from { transform: translateY(40px); opacity: 0; } }
@keyframes tv-grow { from { transform: scaleY(.2); opacity: 0; } }
@keyframes tv-fill { from { width: 0; } }
@media (prefers-reduced-motion: reduce) {
  .tour *, .tour-scrim, .tour-card { animation: none !important; transition: none !important; }
}

/* Explanations under modules: close to the body text in brightness, so they read at a glance. */
:root { --caption: color-mix(in srgb, var(--ink) 92%, var(--ink-2)); }
figcaption, .scope figcaption, .section-head p, p.muted, p.faint, .lead { color: var(--caption); }
.scope figcaption { font-size: .875rem; }
.warn-ink { color: var(--warn-ink); }
.meth-list { padding-inline-start: 1.1em; display: grid; gap: 8px; } .meth-list li::marker { color: var(--gold); }

/* the real map comes alive: dots pop in one after another, the orbit drifts clockwise */
.rrg-orbit { fill: none; stroke: color-mix(in srgb, var(--gold) 35%, transparent); stroke-width: 1.5; stroke-dasharray: 4 8; animation: mc-spin 8s linear infinite reverse; }
.rrg-pt { animation: rrg-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d, 0ms); }
.rrg-week { stroke-width: 2; stroke-linecap: round; } .rrg-week.up { stroke: var(--up); } .rrg-week.down { stroke: var(--down); }
.rrg-tip { fill: var(--ink-2); }
.k-arrow { display: inline-block; width: 2px; height: 12px; background: var(--up); position: relative; vertical-align: middle; margin-inline-end: 6px; }
.k-arrow::after { content: ""; position: absolute; top: -4px; left: -3px; border: 4px solid transparent; border-bottom-color: var(--up); border-top: 0; }
@keyframes rrg-pop { from { transform: scale(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mc-ring, .rrg-orbit, .rrg-pt { animation: none; } .mc-coin { transition: none; } }
.market-split.solo { grid-template-columns: minmax(0, 1fr); }
.mc-lbl { font: 700 11px var(--font-body); } .mc-lbl.up { fill: var(--up); } .mc-lbl.down { fill: var(--down); }
.rrg-tip { fill: context-stroke; }

/* ---------- the big wheel ---------- */
.rc-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .rc-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rc-key { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.rc-key b { font-size: .875rem; } .rc-key .xs { color: var(--caption, var(--ink-2)); line-height: 1.4; }
/* the four states as a numbered cycle: step, a mini wheel with its quarter lit, and how many ride there today */
.wk { position: relative; min-width: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.wk::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; }
.wk.up::before { background: linear-gradient(90deg, transparent, var(--up)); } .wk.down::before { background: linear-gradient(90deg, transparent, var(--down)); }
.wk.up { background: linear-gradient(180deg, color-mix(in srgb, var(--up) 9%, var(--surface-2)), var(--surface-2) 70%); }
.wk.down { background: linear-gradient(180deg, color-mix(in srgb, var(--down) 9%, var(--surface-2)), var(--surface-2) 70%); }
.wk-top { display: flex; align-items: center; gap: 8px; }
.wk-top b { font-size: .9375rem; white-space: nowrap; }
@media (max-width: 420px) { .wk { padding: 10px 11px; } .wk-mini { display: none; } .wk-top b { font-size: .875rem; } } .wk.up b { color: var(--up); } .wk.down b { color: var(--down); }
.wk-n { display: inline-block; width: 12px; height: 12px; border-radius: 50%; font-size: .75rem; font-weight: 800; color: var(--bg); flex: none; }
.wk.up .wk-n { background: var(--up); box-shadow: 0 0 10px color-mix(in srgb, var(--up) 55%, transparent); } .wk.down .wk-n { background: var(--down); box-shadow: 0 0 10px color-mix(in srgb, var(--down) 55%, transparent); }
.wk-mini { width: 22px; height: 22px; flex: none; } .wk-mini circle { fill: none; stroke: color-mix(in srgb, var(--ink) 25%, transparent); stroke-width: 1.5; }
.wk.up .wk-mini path { fill: var(--up); } .wk.down .wk-mini path { fill: var(--down); }
.wk-c { justify-self: start; margin-top: auto; font-size: .75rem; font-weight: 700; color: var(--ink-2); background: color-mix(in srgb, var(--ink) 8%, transparent); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.wk .xs { color: var(--caption, var(--ink-2)); line-height: 1.45; }
.wheel { display: grid; justify-items: center; }
.bw { display: block; max-width: 100%; height: auto; font-family: var(--font-body); overflow: visible; }
.bw-leg { stroke: color-mix(in srgb, var(--ink) 20%, transparent); stroke-width: 6; stroke-linecap: round; fill: none; }
.bw-base { fill: color-mix(in srgb, var(--ink) 22%, transparent); }
.bw-frame line { stroke: color-mix(in srgb, var(--ink) 16%, transparent); stroke-width: 1.4; }
.bw-rim { fill: none; stroke: url(#bw-rim); stroke-width: 4; opacity: .85; }
.bw-rim2 { fill: none; stroke: color-mix(in srgb, var(--ink) 14%, transparent); stroke-width: 1.5; }
.bw-lights circle { fill: var(--gold); opacity: .35; animation: bw-chase 2.4s linear infinite; animation-delay: calc(var(--i) * 50ms); }
.bw-hub { fill: var(--gold); } .bw-hub-in { fill: color-mix(in srgb, var(--bg) 88%, var(--gold)); }
.bw-hub-halo { fill: none; stroke: var(--gold); stroke-width: 1.5; opacity: .45; stroke-dasharray: 3 4; }
.bw-hub-k { font-size: 9px; font-weight: 600; fill: var(--ink-2); direction: ltr; }
.bw-hub-t { font-size: 12px; font-weight: 800; fill: var(--gold); direction: ltr; }
.bw-dir { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; }
.bw-cap { font-size: 12px; fill: var(--ink-2); }
.bw-q { font-size: 13px; font-weight: 800; }
.bw-qg rect { stroke-width: 1; } .bw-qg.up rect { fill: color-mix(in srgb, var(--up) 16%, var(--bg)); stroke: color-mix(in srgb, var(--up) 45%, transparent); } .bw-qg.down rect { fill: color-mix(in srgb, var(--down) 16%, var(--bg)); stroke: color-mix(in srgb, var(--down) 45%, transparent); }
.bw-qg.up .bw-q { fill: var(--up); } .bw-qg.down .bw-q { fill: var(--down); }
.bw-wedge { stroke: none; } .bw-wedge.up { fill: color-mix(in srgb, var(--up) 7%, transparent); } .bw-wedge.down { fill: color-mix(in srgb, var(--down) 7%, transparent); }
.bw-hang { stroke: color-mix(in srgb, var(--ink) 55%, transparent); stroke-width: 1.5; }
.bw-cabin { animation: bw-swing 2.8s ease-in-out infinite alternate; animation-delay: var(--d, 0ms); }
.bw-cabin.up .bw-car { fill: var(--up); } .bw-cabin.down .bw-car { fill: var(--down); }
.bw-cabin.ai .bw-car { stroke: var(--gold); stroke-width: 2.5; }
.bw-win { fill: color-mix(in srgb, #fff 55%, transparent); }
.bw-num { font: 800 10px var(--font-body); fill: var(--bg); }
.bw-lead { fill: none; stroke-width: 1.2; opacity: .7; } .bw-lead.up { stroke: var(--up); } .bw-lead.down { stroke: var(--down); }
.bw-name { font-size: 13px; font-weight: 700; } .bw-name.up { fill: color-mix(in srgb, var(--up) 70%, var(--ink)); } .bw-name.down { fill: color-mix(in srgb, var(--down) 70%, var(--ink)); }
.bw-name.ai { fill: var(--gold); }
.bw-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; width: 100%; }
.bw-list li { display: flex; gap: 8px; align-items: center; font-size: .8125rem; }
.bw-list .num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; font-size: .6875rem; font-weight: 800; color: var(--bg); }
.bw-list li.up .num { background: var(--up); box-shadow: 0 0 10px color-mix(in srgb, var(--up) 60%, transparent); }
.bw-list li.down .num { background: var(--down); box-shadow: 0 0 10px color-mix(in srgb, var(--down) 60%, transparent); }
.bw-list li.ai { color: var(--gold); }
@keyframes bw-chase { 0%, 70% { opacity: .2; } 80% { opacity: 1; } 100% { opacity: .2; } }
@keyframes bw-swing { from { transform: rotate(-5deg); } to { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .bw-lights circle, .bw-cabin { animation: none; } }
/* the wheel in four shades: bright green leads, soft green is only turning up; soft red is turning down, bright red at the bottom */
.wheel-panel { --up-soft: color-mix(in srgb, var(--up) 45%, #9aa4ae); --down-soft: color-mix(in srgb, var(--down) 50%, #f0b27a); }
.bw-cabin.q-turning_up .bw-car { fill: var(--up-soft); } .bw-cabin.q-turning_down .bw-car { fill: var(--down-soft); }
.bw-cabin.q-turning_up, .bw-cabin.q-turning_down { opacity: .9; }
.bw-cabin.q-leading .bw-car, .bw-cabin.q-lagging .bw-car { stroke: #fff; stroke-opacity: .35; stroke-width: 1; }
.bw-cabin.ai.q-leading .bw-car, .bw-cabin.ai.q-lagging .bw-car { stroke: var(--gold); stroke-opacity: 1; stroke-width: 2.5; }
.bw-lead.q-turning_up { stroke: var(--up-soft); } .bw-lead.q-turning_down { stroke: var(--down-soft); }
.bw-name.q-turning_up:not(.ai) { fill: var(--up-soft); } .bw-name.q-turning_down:not(.ai) { fill: var(--down-soft); }
.bw-name.q-leading:not(.ai) { fill: var(--up); } .bw-name.q-lagging:not(.ai) { fill: var(--down); }
.bw-wedge.q-leading { fill: color-mix(in srgb, var(--up) 11%, transparent); } .bw-wedge.q-turning_up { fill: color-mix(in srgb, var(--up-soft) 6%, transparent); }
.bw-wedge.q-lagging { fill: color-mix(in srgb, var(--down) 11%, transparent); } .bw-wedge.q-turning_down { fill: color-mix(in srgb, var(--down-soft) 6%, transparent); }
.bw-qg.q-turning_up .bw-q { fill: var(--up-soft); } .bw-qg.q-turning_down .bw-q { fill: var(--down-soft); }
.bw-qg.q-turning_up rect { fill: color-mix(in srgb, var(--up-soft) 14%, var(--bg)); stroke: color-mix(in srgb, var(--up-soft) 45%, transparent); }
.bw-qg.q-turning_down rect { fill: color-mix(in srgb, var(--down-soft) 14%, var(--bg)); stroke: color-mix(in srgb, var(--down-soft) 45%, transparent); }
.bw-qg.q-leading rect, .bw-qg.q-lagging rect { stroke-width: 1.5; }
.bw-list li.q-turning_up .num { background: var(--up-soft); box-shadow: none; } .bw-list li.q-turning_down .num { background: var(--down-soft); box-shadow: none; }
.bw-list li.q-turning_up:not(.ai) { color: var(--up-soft); } .bw-list li.q-turning_down:not(.ai) { color: var(--down-soft); }
.wk.q-turning_up b { color: var(--up-soft); } .wk.q-turning_down b { color: var(--down-soft); }
.wk.q-turning_up .wk-n { background: var(--up-soft); box-shadow: none; } .wk.q-turning_down .wk-n { background: var(--down-soft); box-shadow: none; }
.wk.q-turning_up .wk-mini path { fill: var(--up-soft); } .wk.q-turning_down .wk-mini path { fill: var(--down-soft); }
.wk.q-turning_up::before { background: linear-gradient(90deg, transparent, var(--up-soft)); } .wk.q-turning_down::before { background: linear-gradient(90deg, transparent, var(--down-soft)); }
.wk.q-turning_up { background: var(--surface-2); } .wk.q-turning_down { background: var(--surface-2); }
.wk.q-leading { background: linear-gradient(180deg, color-mix(in srgb, var(--up) 14%, var(--surface-2)), var(--surface-2) 75%); border-color: color-mix(in srgb, var(--up) 30%, var(--line)); }
.wk.q-lagging { background: linear-gradient(180deg, color-mix(in srgb, var(--down) 14%, var(--surface-2)), var(--surface-2) 75%); border-color: color-mix(in srgb, var(--down) 30%, var(--line)); }
/* the full map in the wheel's four shades, glowing marks, the market at the centre */
.rrg-more { --up-soft: color-mix(in srgb, var(--up) 45%, #9aa4ae); --down-soft: color-mix(in srgb, var(--down) 50%, #f0b27a); }
.rrg-bg.q-leading { fill: color-mix(in srgb, var(--up) 12%, transparent); } .rrg-bg.q-turning_up { fill: color-mix(in srgb, var(--up-soft) 6%, transparent); }
.rrg-bg.q-lagging { fill: color-mix(in srgb, var(--down) 12%, transparent); } .rrg-bg.q-turning_down { fill: color-mix(in srgb, var(--down-soft) 6%, transparent); }
.rrg-qg rect { stroke-width: 1; }
.rrg-qg.q-leading rect { fill: color-mix(in srgb, var(--up) 16%, var(--bg)); stroke: color-mix(in srgb, var(--up) 50%, transparent); } .rrg-qg.q-leading text { fill: var(--up); }
.rrg-qg.q-turning_up rect { fill: color-mix(in srgb, var(--up-soft) 14%, var(--bg)); stroke: color-mix(in srgb, var(--up-soft) 45%, transparent); } .rrg-qg.q-turning_up text { fill: var(--up-soft); }
.rrg-qg.q-turning_down rect { fill: color-mix(in srgb, var(--down-soft) 14%, var(--bg)); stroke: color-mix(in srgb, var(--down-soft) 45%, transparent); } .rrg-qg.q-turning_down text { fill: var(--down-soft); }
.rrg-qg.q-lagging rect { fill: color-mix(in srgb, var(--down) 16%, var(--bg)); stroke: color-mix(in srgb, var(--down) 50%, transparent); } .rrg-qg.q-lagging text { fill: var(--down); }
.rrg-qg .rrg-q { font-weight: 800; direction: ltr; }
.rrg-pt .rrg-mark circle, .rrg-pt .rrg-mark rect { stroke: none; }
.rrg-pt.q-leading .rrg-mark > * { fill: var(--up); } .rrg-pt.q-turning_up .rrg-mark > * { fill: var(--up-soft); }
.rrg-pt.q-turning_down .rrg-mark > * { fill: var(--down-soft); } .rrg-pt.q-lagging .rrg-mark > * { fill: var(--down); }
.rrg-pt.ai .rrg-mark rect { stroke: var(--gold); stroke-width: 2.2; }
.rrg-pt.q-turning_up .rrg-week.up, .rrg-pt.q-turning_up .rrg-week.down { opacity: .85; }
.rrg-orbit-dir { stroke: none; } .rrg-odir { fill: var(--gold); opacity: .8; }
.rrg-origin { fill: var(--gold); filter: drop-shadow(0 0 5px var(--gold)); } .rrg-origin-ring { fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 2 3; opacity: .7; }
.k-origin { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent), 0 0 8px var(--gold); margin-inline-end: 8px; vertical-align: middle; }
.rrg-more .k-dot { background: var(--up); box-shadow: 0 0 8px color-mix(in srgb, var(--up) 60%, transparent); }
.rrg-more .k-dia { background: var(--up); outline: 2px solid var(--gold); outline-offset: -1px; }
.rrg-more { border-top: 1px solid var(--line); padding-top: 10px; }
.rrg-more summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.rrg-more[open] summary { margin-bottom: 8px; }
.bw-name, .bw-q, .bw-cap { direction: ltr; }

/* ---------------- the swing advisor launcher ----------------
   A separate product, so it wears its own colours (a blue-to-green speech bubble with a rising line, on deep navy)
   in every trendy theme, and sits apart from the menu: floating at the bottom corner on desktop,
   raised at the centre of the mobile bar. */
.advisor-launch, .advisor-m { --adv-bg: #0A0E15; --adv-bull: #25D695; --adv-blue: #4C8DFF; --adv-ink: #E9EEF4; }
.advisor-launch {
  position: fixed; z-index: 45; bottom: 24px; inset-inline-end: 24px;
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 18px;
  border-radius: 999px; text-decoration: none; color: var(--adv-ink);
  background: var(--adv-bg);
  border: 1px solid transparent;
  background-image: linear-gradient(var(--adv-bg), var(--adv-bg)), conic-gradient(from var(--adv-a, 0deg), var(--adv-bull), var(--adv-blue), #8B5CF6, var(--adv-bull));
  background-origin: border-box; background-clip: padding-box, border-box;
  box-shadow: 0 18px 40px -12px rgba(37, 214, 149, .45), 0 8px 24px rgba(0, 0, 0, .45);
  transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s;
  animation: adv-spin 6s linear infinite;
}
@property --adv-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes adv-spin { to { --adv-a: 360deg; } }
.advisor-launch:hover, .advisor-launch:focus-visible { transform: translateY(-3px); box-shadow: 0 24px 48px -12px rgba(37, 214, 149, .6), 0 10px 28px rgba(0, 0, 0, .5); }
.advisor-launch:focus-visible { outline: 2px solid var(--adv-blue); outline-offset: 4px; }
.al-orb { order: 0; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 50% 30%, #1B2A3D, #0E141D 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 22px -4px rgba(37, 214, 149, .6); }
.al-orb svg { width: 30px; height: 30px; }
.al-txt { display: grid; line-height: 1.2; }
.al-txt b { font-size: 1.0625rem; font-weight: 800; letter-spacing: -.01em; justify-self: start; }
.al-txt small { font-size: .78rem; color: #9AA7B8; font-weight: 500; }
.al-go { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(76, 141, 255, .16); }
.al-go svg { width: 16px; height: 16px; fill: none; stroke: var(--adv-blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.advisor-launch:hover .al-go { background: rgba(76, 141, 255, .28); }
[dir="ltr"] .al-go svg { transform: scaleX(-1); }

/* Mobile: the centre slot of the bottom bar, raised above it */
.advisor-m { display: none; }
@media (max-width: 760px) {
  .advisor-launch { display: none; }
  .bottom-nav > a.advisor-m { display: flex; position: relative; color: var(--ink); font-weight: 700; gap: 4px; padding-top: 0; }
  .advisor-m-orb { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle at 50% 30%, #1B2A3D, var(--adv-bg) 70%);
    border: 2px solid transparent;
    background-image: radial-gradient(circle at 50% 30%, #1B2A3D, var(--adv-bg) 70%), conic-gradient(from var(--adv-a, 0deg), var(--adv-bull), var(--adv-blue), #8B5CF6, var(--adv-bull));
    background-origin: border-box; background-clip: padding-box, border-box;
    box-shadow: 0 0 0 5px var(--surface), 0 10px 26px -6px rgba(37, 214, 149, .6);
    animation: adv-spin 6s linear infinite; }
  .advisor-m-orb svg { width: 34px; height: 34px; }
  .advisor-m:active .advisor-m-orb { transform: scale(.95); }
}
/* the twinkle: three small gold stars light up around the Super Stocker button, each on its own beat, all the time.
   Premium and alive, never a flash: each star grows, turns and fades in under a second, then rests. */
.adv-tw { position: absolute; z-index: 3; width: 16px; height: 16px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, #FFF8DC 0 16%, transparent 20%), conic-gradient(from 0deg, transparent 0 10%, #FFE9A8 12% 13%, transparent 15% 35%, #FFE9A8 37% 38%, transparent 40% 60%, #FFE9A8 62% 63%, transparent 65% 85%, #FFE9A8 87% 88%, transparent 90%);
  filter: drop-shadow(0 0 4px rgba(255, 220, 120, .95)); transform: scale(0); opacity: 0; animation: adv-tw 2.4s ease-in-out infinite; }
@keyframes adv-tw { 0%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 40% { transform: scale(1.1) rotate(45deg); opacity: 1; } 70% { transform: scale(.2) rotate(90deg); opacity: .3; } }
.adv-tw.t2 { width: 11px; height: 11px; animation-delay: .8s; } .adv-tw.t3 { width: 10px; height: 10px; animation-delay: 1.6s; }
/* phone: around the raised orb */
.advisor-m .adv-tw.t1 { top: -36px; left: calc(50% + 16px); } .advisor-m .adv-tw.t2 { top: -12px; left: calc(50% - 42px); } .advisor-m .adv-tw.t3 { top: 8px; left: calc(50% + 26px); }
/* desktop: around the orb inside the pill */
.advisor-launch .adv-tw.t1 { top: 2px; inset-inline-start: 46px; } .advisor-launch .adv-tw.t2 { bottom: 4px; inset-inline-start: 10px; } .advisor-launch .adv-tw.t3 { top: 8px; inset-inline-start: 6px; }
.advisor-launch .adv-tw { display: block; } .advisor-m .adv-tw { display: none; }
@media (max-width: 760px) { .advisor-m .adv-tw { display: block; } }
/* light themes: cream stars vanish on a pale page, so they turn deep gold with a dark rim and a warm glow */
[data-theme="light"] .adv-tw {
  background: radial-gradient(circle, #FFF4CF 0 14%, #9A6400 15% 20%, transparent 22%), conic-gradient(from 0deg, transparent 0 9%, #A86F08 11% 14%, transparent 16% 34%, #A86F08 36% 39%, transparent 41% 59%, #A86F08 61% 64%, transparent 66% 84%, #A86F08 86% 89%, transparent 91%);
  filter: drop-shadow(0 0 1px rgba(60, 35, 0, .55)) drop-shadow(0 0 5px rgba(232, 160, 30, .75)); }
[data-theme="light"] .advisor-m .adv-tw.t1 { width: 19px; height: 19px; }
/* the logo shines now and then: a short brightening with a gold glow on the hero, every 6s */
.al-orb svg, .advisor-m-orb svg { animation: adv-shine 6s ease-in-out infinite 2s; }
@keyframes adv-shine {
  0%, 82%, 100% { filter: none; transform: none; }
  88% { filter: brightness(1.45) saturate(1.15) drop-shadow(0 0 6px rgba(255, 214, 110, .95)); transform: scale(1.06); }
  94% { filter: brightness(1.1) drop-shadow(0 0 2px rgba(255, 214, 110, .5)); transform: none; }
}
@media (prefers-reduced-motion: reduce) { .advisor-launch, .advisor-m-orb { animation: none; } .adv-tw { display: none !important; } .al-orb svg, .advisor-m-orb svg { animation: none; } }
@media print { .advisor-launch { display: none; } }

/* The way from a stock page into Super Stocker */
.btn.ss-check { display: inline-flex; align-items: center; gap: 6px; border-color: color-mix(in srgb, #E8B84A 55%, transparent); }
.btn.ss-check:hover { border-color: #E8B84A; }
/* the Super Stocker hero on the launcher floats while its cape flutters (the SVG carries the cape motion) */
.hero-live .h-all { animation: h-float 2.8s ease-in-out infinite; }
@keyframes h-float { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-1.8px); } }
@media (prefers-reduced-motion: reduce) { .hero-live .h-all { animation: none; } }

/* the subscribers' Telegram alerts channel, on the signed-in account screen */
.tg-join { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, #2aabee 12%, var(--surface-2)); border: 1px solid color-mix(in srgb, #2aabee 45%, var(--line)); }
.tg-join:hover { background: color-mix(in srgb, #2aabee 20%, var(--surface-2)); }
.tg-join svg { width: 28px; height: 28px; flex: none; fill: #2aabee; }
.tg-join > span { display: grid; gap: 2px; text-align: start; }
.tg-join b { font-size: .9375rem; } .tg-join .xs { color: var(--ink-2); }

/* Admin: the visitor-view bar (app.js) and the panel (admin.html, admin.js) */
.admin-view-bar { position: sticky; top: 0; z-index: 60; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 8px 16px; background: var(--gold); color: var(--gold-ink); font-size: .875rem; font-weight: 500; }
.admin-view-bar .btn { background: var(--gold-ink); color: var(--gold); border-color: transparent; }
.admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 760px) { .admin-grid { grid-template-columns: minmax(0, 1fr); } }
.admin-card { display: flex; flex-direction: column; gap: 12px; }
.admin-card h2 { font-size: 1.125rem; margin: 0; }
.admin-card .row { gap: 8px; }
.admin-msg { min-height: 1.4em; margin: 0; font-size: .875rem; }
.admin-msg.ok { color: var(--up); } .admin-msg.err { color: var(--down); }
.admin-days { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-days th, .admin-days td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: start; }
.admin-days td.num, .admin-days th.num { text-align: end; }
.admin-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.admin-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.admin-state.ok i { background: var(--up); } .admin-state.warn i { background: var(--down); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { width: 18px; height: 18px; accent-color: var(--gold); }
