/* ==========================================================================
   VolFlash V2 visual layer
   ASCII only: a single mojibake byte inside a comment can swallow the rules
   that follow it, so this file never carries non-ASCII text.
   Reference language: TradingView (structure), Koyfin (panels), FinancialJuice
   (stream density), Finviz (tables), TradingEconomics (calendar).
   ========================================================================== */

/* ---- 1. Type scale and numerals ---------------------------------------- */
:root {
  --fs-micro: 10.5px;
  --fs-meta: 11.5px;
  --fs-body: 13px;
  --fs-title: 15px;
  --fs-block: 16px;
  --fs-h1: 24px;
  --fs-hero: 19px;
  --ln-tight: 1.28;
  --ln-body: 1.55;
  --rail: 3px;
}

html { font-variant-numeric: tabular-nums; }
body {
  font-size: var(--fs-body);
  line-height: var(--ln-body);
  -webkit-font-smoothing: antialiased;
  letter-spacing: .002em;
}
.stat-v, .stat-k, .stat-s, .card-time, .card-src, .top-meta, .sev, .mono,
.dp-table td, .dp-table th, .senti-row b, .tape, .cal-list, .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ---- 2. Chrome: header, nav, wrap ------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #0b0f14; padding: 8px 12px;
  border-radius: 0 0 6px 0; font-size: 12px; font-weight: 650; text-decoration: none;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:focus-visible, .chip:focus-visible, .nav-link:focus-visible,
.asset-chip:focus-visible, .watch-x:focus-visible, .lang-select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.hd {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, #000 12%);
  backdrop-filter: blur(7px);
}
.hd-in { height: 52px; gap: 18px; }
.brand-txt { font-size: 14px; letter-spacing: .2px; }
.brand-mark { border-radius: 6px; }
.nav { gap: 2px; }
.nav-link {
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--dim);
  position: relative;
  transition: color .12s ease, background .12s ease;
}
.nav-link:hover { color: var(--txt); background: rgba(255,255,255,.045); }
.nav-link.active { color: var(--txt); font-weight: 600; background: rgba(255,255,255,.06); }
.nav-link.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -13px;
  height: 2px; background: var(--accent); border-radius: 2px 2px 0 0;
}
.wrap { margin: 0 auto; }

/* ---- 3. Tape: macro strip --------------------------------------------- */
.tape {
  font-size: 11.5px;
  letter-spacing: .01em;
  border-bottom: 1px solid var(--line);
}
.tape-item { gap: 6px; }
.tape-item .num { font-weight: 600; }

/* ---- 4. Layout rhythm -------------------------------------------------- */
.grid { gap: 18px; }
.col-side { gap: 14px; }
.panel { border-radius: 8px; }
.panel + .panel { margin-top: 14px; }
.panel-h {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.panel-h b {
  font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  color: var(--txt);
}
.panel-h .dim, .panel-h a { font-size: var(--fs-meta); }
.panel-h a { margin-left: auto; color: var(--accent); text-decoration: none; }
.panel-h a:hover { text-decoration: underline; }

/* ---- 5. Stat rail: numbers read like a terminal ------------------------ */
.status-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; margin: 0 0 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  font-size: 12.5px;
}
.status-bar b { font-size: 15px; font-weight: 650; }
.status-bar .sb-sep { color: var(--line2); }
.status-bar .sb-right { margin-left: auto; font-size: var(--fs-meta); color: var(--dim2); }

.stats { gap: 12px; }
.stat {
  border-radius: 8px; padding: 13px 15px;
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008));
  border: 1px solid var(--line);
}
.stat-k {
  font-size: var(--fs-micro); letter-spacing: .09em; text-transform: uppercase;
  color: var(--dim2); font-weight: 600;
}
.stat-v {
  font-family: var(--mono); font-size: 27px; font-weight: 650;
  letter-spacing: -.02em; line-height: 1.15; margin-top: 2px;
}
.stat-v.sm { font-size: 23px; }
.stat-s { font-size: var(--fs-meta); color: var(--dim2); margin-top: 3px; }

/* ---- 6. Sentiment block ------------------------------------------------ */
.senti-rows { display: flex; gap: 28px; flex-wrap: wrap; margin: 12px 0 10px; }
.senti-row { display: flex; flex-direction: column; gap: 3px; }
.senti-row b {
  display: block; font-family: var(--mono); font-size: 21px; font-weight: 650;
  line-height: 1.05; letter-spacing: -.01em;
}
.senti-row span { display: block; font-size: var(--fs-meta); color: var(--dim2); }
.senti-row.off b { color: var(--crit); }
.senti-row.on b { color: var(--up); }
.senti-note { font-size: var(--fs-meta); color: var(--dim2); max-width: 760px; line-height: 1.6; }

/* ---- 7. Top lists: hero first, rest supporting ------------------------- */
.top-list { margin: 0; }
.top-item { padding: 11px 14px; border-left: 2px solid transparent; }
.top-item + .top-item { border-top: 1px solid var(--line); }
.top-item:first-child {
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(245,182,66,.055), transparent 60%);
  padding-bottom: 13px;
}
.top-item:first-child .top-title {
  font-size: var(--fs-hero); line-height: 1.3; font-weight: 650; letter-spacing: -.01em;
}
.top-item + .top-item .top-title { font-size: 14px; font-weight: 550; line-height: 1.35; }
.top-title a { color: var(--txt); text-decoration: none; }
.top-title a:hover { color: var(--accent); }
.top-meta { font-size: var(--fs-micro); letter-spacing: .04em; text-transform: uppercase; color: var(--dim2); }

/* ---- 8. Event cards: dense rows, severity rail ------------------------- */
.feed { gap: 0; }
.card {
  position: relative; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px 11px 15px; margin-bottom: 9px;
  background: var(--panel);
  transition: border-color .12s ease, background .12s ease;
}
.card:hover { border-color: var(--line2); background: var(--panel2); }
.card .card-bar {
  position: absolute; left: 0; top: 9px; bottom: 9px; width: var(--rail);
  height: auto; border-radius: 0 2px 2px 0;
}
.card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.card-title { font-size: var(--fs-title); line-height: var(--ln-tight); margin: 0 0 5px; }
.card-title a { color: var(--txt); text-decoration: none; font-weight: 600; }
.card-title a:hover { color: var(--accent); }
.card-sum { font-size: 12.5px; color: var(--dim); line-height: 1.5; margin: 0 0 7px; }
.card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-time, .card-src, .card-reports {
  font-size: var(--fs-micro); color: var(--dim2); letter-spacing: .03em;
}
.card-src { text-transform: uppercase; }

/* ---- 9. Badges: severity reads as a data label, not decoration --------- */
.sev {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-micro); font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 4px;
  border: 1px solid transparent;
}
.sev-critical { color: #ff6b6b; background: rgba(240,82,82,.12); border-color: rgba(240,82,82,.3); }
.sev-high { color: #ffa94d; background: rgba(245,167,66,.11); border-color: rgba(245,167,66,.28); }
.sev-mid { color: #6ba6ff; background: rgba(75,155,250,.1); border-color: rgba(75,155,250,.25); }
.sev-low { color: var(--dim2); background: rgba(255,255,255,.04); border-color: var(--line); }
.tag, .chip {
  font-size: var(--fs-micro); letter-spacing: .05em; text-transform: uppercase;
  color: var(--dim2); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px;
}
.chip { text-transform: none; letter-spacing: .01em; font-size: 12px; cursor: pointer; }
.chip.active { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 600; }
.pill {
  font-size: var(--fs-micro); letter-spacing: .04em; color: var(--dim);
  background: rgba(255,255,255,.05); border-radius: 4px; padding: 2px 6px;
}

/* ---- 10. Data tables: Finviz density ----------------------------------- */
.dp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dp-table th {
  text-align: left; font-size: var(--fs-micro); letter-spacing: .08em;
  text-transform: uppercase; color: var(--dim2); font-weight: 600;
  padding: 8px 12px; border-bottom: 1px solid var(--line2); background: rgba(255,255,255,.02);
  position: sticky; top: 0;
}
.dp-table td { padding: 7px 12px; border-bottom: 1px solid var(--line); }
.dp-table tbody tr:hover { background: rgba(255,255,255,.028); }
.dp-table td:not(:first-child) { font-family: var(--mono); }
.dp-table a { color: var(--txt); text-decoration: none; font-weight: 600; }
.dp-table a:hover { color: var(--accent); }

/* Dark pool market-wide trend (V2 5.5): daily volume bars + short share */
.dp-trend { padding: 8px 14px 2px; }
.dp-trend-row {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) 78px 58px;
  gap: 10px; align-items: center; padding: 3px 0; font-size: 11.5px;
}
.dp-trend-row > span:first-child { color: var(--dim); }
.dp-trend-row i {
  display: block; height: 6px; background: var(--line);
  border-radius: 2px; overflow: hidden;
}
.dp-trend-row i em {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
}
.dp-trend-row b { font-family: var(--mono); font-weight: 600; color: var(--txt2); text-align: right; }
.dp-trend-row > span:last-child { font-family: var(--mono); color: var(--dim); text-align: right; }
@media (max-width: 560px) {
  .dp-trend-row { grid-template-columns: 68px minmax(0, 1fr) 64px 48px; gap: 7px; font-size: 10.5px; }
}

/* ---- 11. Calendar: TradingEconomics reading order ---------------------- */
.cal-list { list-style: none; margin: 0; padding: 0; }
.cal-row {
  display: grid; grid-template-columns: 78px 92px 1fr auto; gap: 10px;
  align-items: baseline; padding: 7px 14px; font-size: 12.5px;
  border-bottom: 1px solid var(--line);
}
.cal-row:hover { background: rgba(255,255,255,.025); }
.cal-row .mono { font-family: var(--mono); color: var(--dim); }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.cal-dot.hi { background: var(--crit); }
.cal-dot.md { background: var(--accent); }
.cal-dot.lo { background: var(--dim2); }
.cal-pending { color: var(--dim2); font-style: italic; }
.cal-ev { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }

/* Calendar controls (V2 5.3): day/week tabs, filters, status pills */
.cal-bar { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; }
.cal-tabs { display: flex; gap: 6px; }
.cal-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cal-filter-k {
  font-size: 9.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); margin-left: 6px;
}
.cal-filter-k:first-child { margin-left: 0; }
.cal-status {
  display: inline-block; font-size: 9px; font-weight: 650; letter-spacing: .06em;
  text-transform: uppercase; padding: 1px 5px; border-radius: 3px;
  border: 1px solid var(--line2); color: var(--dim);
  vertical-align: 1px; white-space: nowrap;
}
.cal-status.ok { color: #16C784; border-color: rgba(22,199,132,.4); }
.cal-status.info { color: var(--dim); border-color: var(--line2); }
.cal-status.warn { color: var(--high); border-color: color-mix(in srgb, var(--high) 45%, transparent); }
.cal-status.crit { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.cal-status.muted { color: var(--dim2); }
.cal-daynav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.cal-daynav b { font-family: var(--mono); font-size: 13px; }
.cal-daynav .tiny { margin-left: auto; }
.cal-window { margin: 0 0 12px; }
.cal-mobile td:nth-child(3) { flex-wrap: wrap; }

/* ---- 12. Assets: Koyfin-style index ----------------------------------- */
.asset-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.asset-grid a {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 7px; border-radius: 4px; border: 1px solid var(--line);
  background: rgba(255,255,255,.02); color: var(--txt);
  font-size: 12px; text-decoration: none;
}
.asset-grid a:hover { border-color: var(--accent); color: var(--accent); }
.asset-grid a b { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.panel .tiny { font-size: var(--fs-meta); }

/* ---- 13. Buttons ------------------------------------------------------- */
.btn {
  font-size: 12.5px; font-weight: 600; border-radius: 6px; padding: 7px 12px;
  border: 1px solid var(--line2); background: rgba(255,255,255,.04); color: var(--txt);
  transition: background .12s ease, border-color .12s ease;
}
.btn:hover { background: rgba(255,255,255,.08); border-color: var(--dim2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b0f14; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.sm { padding: 5px 10px; font-size: 12px; }

/* ---- 14. Responsive ---------------------------------------------------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-v { font-size: 22px; }
  .cal-row { grid-template-columns: 64px 1fr auto; }
  .cal-row .dim { display: none; }
  .top-item:first-child .top-title { font-size: 16px; }
}

/* ---- 15. Homepage intro: static product definition below the live modules */
.intro-block { margin-top: 16px; }
.intro-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 26px; padding: 14px;
}
.intro-item b {
  display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 5px;
}
.intro-item p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--dim); }
.intro-tail { padding: 0 14px 14px; margin: 0; color: var(--dim2); }
@media (max-width: 720px) { .intro-grid { grid-template-columns: 1fr; gap: 12px; } }

/* ==========================================================================
   THEME LAYER (V2 spec 4.2)
   Dark is default. Light overrides only tokens, so every component adapts
   without duplicating rules. Toggle persists in localStorage; the <html>
   element gets data-theme before first paint to avoid a flash.
   ========================================================================== */
[data-theme="light"] {
  --bg: #F5F7FB;
  --bg2: #EEF2F8;
  --panel: #FFFFFF;
  --panel2: #EEF2F8;
  --line: #DCE3ED;
  --line2: #C9D3E0;
  --txt: #172338;
  --txt2: #334155;
  --dim: #5E6E84;
  --dim2: #7C8BA1;
  --accent: #2563EB;
  --accent2: #1D4ED8;
  --crit: #DC4655;
  --high: #C98212;
  --mid: #2563EB;
  --up: #0F9F6E;
  --down: #DC4655;
}
[data-theme="light"] body { background: var(--bg); color: var(--txt); }
[data-theme="light"] .hd { background: rgba(255,255,255,.92); }
[data-theme="light"] .card,
[data-theme="light"] .panel,
[data-theme="light"] .stat { background: var(--panel); }
[data-theme="light"] .card:hover { background: var(--panel2); }
[data-theme="light"] .dp-table th { background: #F1F5F9; }

/* Theme toggle button */
.theme-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 6px;
  border: 1px solid var(--line2); background: transparent; color: var(--dim);
  cursor: pointer; font-size: 14px; line-height: 1;
}
.theme-btn:hover { color: var(--txt); border-color: var(--dim2); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Source confidence chip (V2 spec 6.2): describes the source TYPE, not a truth score */
.src-conf {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; border: 1px solid var(--line2);
  color: var(--dim2);
}
.src-conf.primary { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.src-conf.wire { color: var(--dim); }
.src-conf.feed { color: var(--dim2); opacity: .75; }

/* ==========================================================================
   EVENT DETAIL (V2 spec 5.2): eight modules, fact and inference separated.
   Layout: header data block, then numbered sections separated by hairlines.
   No decorative cards here on purpose: this page should read like a terminal.
   ========================================================================== */
.v2-ev { max-width: 1000px; margin: 0 auto; }
.v2-ev .ev-head { border-bottom: 0; padding-bottom: 4px; }
.ev.v2-ev .ev-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ev.v2-ev .ev-title { font-size: 28px; line-height: 1.28; letter-spacing: -.4px; margin: 2px 0 0; }
.band-tag {
  font-size: 9.5px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim2); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px;
}
.band-tag.critical { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 45%, transparent); }
.band-tag.high { color: var(--high); border-color: color-mix(in srgb, var(--high) 45%, transparent); }
.band-tag.medium, .band-tag.mid { color: var(--mid); border-color: color-mix(in srgb, var(--mid) 45%, transparent); }
.band-tag.low { color: var(--dim2); }

/* Header data block: label above value, four to five cells, wraps on mobile */
.ev-facts {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 18px; margin: 14px 0 4px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
}
.ev-fact span {
  display: block; font-size: 9.5px; font-weight: 650; letter-spacing: .09em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 2px;
}
.ev-fact b {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; font-weight: 600; color: var(--txt2);
}
.ev-fact b em { font-style: normal; font-size: 10px; color: var(--dim2); font-family: var(--mono); }
.dotstat { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: var(--dim2); }
.dotstat.ok { background: #16C784; }
.dotstat.wait { background: var(--high); }
.dotstat.none { background: var(--dim2); }

/* Event metrics (V2 6.2): four independent indicators, never folded into Relevance */
.metrics {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin: 12px 0 6px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel);
}
.metric span {
  display: block; font-size: 9.5px; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; color: var(--dim);
}
.metric b {
  display: block; font-family: var(--mono); font-size: 20px; font-weight: 650;
  color: var(--txt); line-height: 1.15;
}
.metric i { display: block; height: 3px; margin-top: 5px; background: var(--line); border-radius: 2px; overflow: hidden; }
.metric i em { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.metric > em { display: block; font-style: normal; font-size: 9px; color: var(--dim2); margin-top: 3px; }
.metric.na b { color: var(--dim2); }
.metric-note { grid-column: 1 / -1; margin: 0; font-size: 10px; color: var(--dim); }
.metric-note a { color: var(--accent); text-decoration: none; }
@media (max-width: 560px) {
  .metrics { grid-template-columns: 1fr 1fr; }
}

/* Section chrome: 01 WHAT HAPPENED ......... sub label */
.ev-sec { border-top: 1px solid var(--line); padding: 17px 0 3px; }
.sec-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin: 0 0 10px; }
.sec-n { font-family: var(--mono); font-size: 9.5px; color: var(--dim2); letter-spacing: .06em; }
.sec-h h2 {
  margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.01em;
  color: var(--txt);
}
.sec-sub { font-size: 10.5px; color: var(--dim); letter-spacing: .01em; }
.sec-side { margin-left: auto; font-size: 10.5px; color: var(--dim); font-family: var(--mono); }
.sec-meta { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }

.v2-ev .ev-summary { font-size: 14.5px; line-height: 1.62; color: var(--txt2); margin: 0 0 10px; }
/* Asset table can be wider than a phone: scroll the table, never the page */
.an-assets { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.an-assets table { min-width: 100%; }
.note { font-size: 11px; color: var(--dim); line-height: 1.55; margin: 9px 0 0; }
.muted { font-size: 12.5px; color: var(--dim); margin: 0; }

/* Source reports: one row per outlet, source time at the right edge */
.rep-list {
  list-style: none; margin: 10px 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel);
}
.rep-list li {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 12px;
  font-size: 12.5px; border-bottom: 1px solid var(--line);
}
.rep-list li:last-child { border-bottom: 0; }
.rep-list li:hover { background: var(--panel2); }
.rep-src {
  font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  color: var(--dim); min-width: 68px; letter-spacing: .03em;
}
.rep-list a { color: var(--txt2); text-decoration: none; flex: 1; min-width: 0; }
.rep-list a:hover { color: var(--accent); }
.rep-title { color: var(--txt2); flex: 1; min-width: 0; }
.rep-time { color: var(--dim); font-size: 10.5px; font-family: var(--mono); white-space: nowrap; }

/* Why it matters: one strong sentence, then the mechanism */
.why-lead {
  font-size: 17px; line-height: 1.45; font-weight: 600; color: var(--txt);
  margin: 2px 0 7px; letter-spacing: -.01em;
}
.why-body { font-size: 13.5px; color: var(--txt2); line-height: 1.66; margin: 0; }

/* Transmission paths: vertical chain, no arrows needed */
.path {
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 13px;
  background: rgba(255,255,255,.015); margin-bottom: 8px;
}
.path-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.link-type {
  font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; border: 1px solid var(--line2); color: var(--dim2);
  white-space: nowrap;
}
.link-type.direct { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.link-type.indirect { color: var(--high); border-color: color-mix(in srgb, var(--high) 45%, transparent); }
.link-type.speculative { color: var(--dim); border-color: var(--line2); border-style: dashed; }
.link-type.unconfirmed { color: var(--dim2); border-color: var(--line2); border-style: dotted; }
.link-type.narrative { color: var(--dim2); border-style: dashed; }
.path-note { font-size: 10.5px; color: var(--dim); }
.path-chain {
  list-style: none; margin: 0; padding: 1px 0 1px 14px;
  border-left: 1px solid var(--line2); display: flex; flex-direction: column; gap: 5px;
}
.path-chain li { position: relative; font-size: 12.5px; line-height: 1.45; color: var(--txt2); }
.path-chain li::before {
  content: ""; position: absolute; left: -18px; top: .52em;
  width: 5px; height: 5px; border-radius: 50%;
  border: 1px solid var(--dim2); background: var(--bg);
}
.path-chain li:last-child { color: var(--txt); font-weight: 600; }
.path-chain li:last-child::before { border-color: var(--accent); background: var(--accent); }
.path.legacy .path-narrative { margin: 0; font-size: 13px; line-height: 1.62; color: var(--txt2); }

/* Watch next: indicators in two columns, calendar below */
.watch-group + .watch-group { margin-top: 13px; }
.watch-k {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px;
  font-size: 9.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--dim);
}
.watch-all {
  margin-left: auto; text-transform: none; letter-spacing: 0;
  font-size: 10.5px; color: var(--accent); text-decoration: none;
}
.watch-all:hover { text-decoration: underline; }
.watch-list { margin: 0; padding-left: 16px; columns: 2; column-gap: 24px; font-size: 12.5px; color: var(--txt2); }
.watch-list li { margin: 2px 0; break-inside: avoid; }
.cal-next { list-style: none; margin: 0; padding: 0; }
.cal-next li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.cal-next li:last-child { border-bottom: 0; }
.cal-next a { color: var(--txt2); text-decoration: none; flex: 1; min-width: 0; }
.cal-next a:hover { color: var(--accent); }
.cal-meta { font-size: 10px; color: var(--dim); font-family: var(--mono); white-space: nowrap; }

/* Invalidation: reads as a checklist */
.inv-list { margin: 6px 0 0; padding-left: 16px; font-size: 13px; color: var(--txt2); line-height: 1.62; }
.inv-list li { margin: 4px 0; }

/* Market reaction: unavailable state must not look like an empty box */
.reaction-empty {
  border: 1px dashed var(--line2); border-radius: 8px; padding: 12px 14px;
  background: rgba(255,255,255,.012);
}
.reaction-state { margin: 0 0 6px; font-size: 12.5px; font-weight: 650; color: var(--high); }
.reaction-link { margin: 9px 0 0; font-size: 11.5px; }
.reaction-link a { color: var(--accent); text-decoration: none; }

.mini-lock {
  font-size: 11.5px; color: var(--dim2); margin: 8px 0 0;
  padding: 7px 10px; border: 1px dashed var(--line2); border-radius: 6px;
}
.mini-lock a { color: var(--accent); text-decoration: none; }
.v2-lock { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.v2-lock b { font-size: 12px; }
.v2-lock span { font-size: 11.5px; color: var(--dim2); flex: 1; min-width: 220px; }
.v2-lock a { margin-left: auto; }
.rel-item .rel-src {
  font-size: 9.5px; color: var(--dim); font-family: var(--mono);
  text-transform: uppercase; white-space: nowrap;
}
/* Event page related rows carry a source column in addition to time/title/pill */
.v2-rel { grid-template-columns: 92px minmax(0, 1fr) auto auto; }

@media (max-width: 720px) {
  /* Header: at 390px the brand + theme + language + account + CTA group
     overflowed the viewport. Tighten gaps and drop the secondary taglines. */
  .hd-in { gap: 8px; padding: 0 12px; }
  .brand-txt b { font-size: 14px; }
  .brand-txt em { display: none; }
  .hd-right { gap: 6px; }
  .hd-right .who { display: none; }
  .hd-right .nav-link { white-space: nowrap; font-size: 12px; padding: 5px 6px; }
  .nav-cta { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
  .lang-select { max-width: 92px; padding: 4px 6px; font-size: 12px; }
  .theme-btn { width: 26px; height: 26px; }
  .ev.v2-ev .ev-title { font-size: 22px; }
  .ev-facts { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .watch-list { columns: 1; }
  .cal-next li { flex-wrap: wrap; gap: 3px 8px; }
  .sec-side { width: 100%; margin-left: 0; }
  .v2-lock span { min-width: 0; }
  .v2-rel { grid-template-columns: 74px minmax(0, 1fr) auto; }
  .v2-rel .rel-src { display: none; }
}

/* ==========================================================================
   MY MARKET BRIEF (V2 7): watchlist chips + five daily sections.
   ========================================================================== */
.watch-form { display: inline; margin: 0; }
.watch-form button { vertical-align: middle; }
.brief-head h1 { font-size: 30px; }
.brief-watch {
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  padding: 0 0 12px; margin: 0 0 16px;
}
.brief-watch .panel-h { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.watch-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; }
.watch-chip {
  display: inline-flex; align-items: center; border: 1px solid var(--line);
  border-radius: 5px; background: rgba(255,255,255,.03);
}
.watch-chip a { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 7px; text-decoration: none; }
.watch-chip a b { font-family: var(--mono); font-size: 12px; color: var(--txt); }
.watch-chip a span { font-size: 10.5px; color: var(--dim); }
.watch-x { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 3px 7px; font-size: 12px; }
.watch-x:hover { color: var(--crit); }
.brief-add { padding: 8px 14px 0; }
.brief-add .watch-form { display: inline-block; margin: 0 4px 4px 0; }
.brief-sec { border-top: 1px solid var(--line); padding: 16px 0 4px; }
.brief-item {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
}
.brief-item:last-child { border-bottom: 0; }
.brief-item:hover h3 { color: var(--accent); }
.brief-side { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.brief-time { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.brief-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 3px; }
.brief-src { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; color: var(--dim); }
.brief-upd { font-size: 9.5px; color: var(--dim2); }
.brief-main h3 { margin: 0 0 3px; font-size: 14.5px; line-height: 1.35; font-weight: 600; color: var(--txt); }
.brief-an { margin: 0 0 4px; font-size: 12px; line-height: 1.5; color: var(--dim); }
.brief-assets { display: flex; gap: 4px; flex-wrap: wrap; }
.brief-cal {
  display: flex; align-items: baseline; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; font-size: 12.5px;
}
.brief-cal:last-child { border-bottom: 0; }
.brief-cal b { font-weight: 600; color: var(--txt2); }
.brief-cal:hover b { color: var(--accent); }
.brief-cal-meta { margin-left: auto; font-size: 10px; color: var(--dim); font-family: var(--mono); white-space: nowrap; }
.brief-nothing {
  padding: 10px 12px; border: 1px dashed var(--line2); border-radius: 6px;
  color: var(--dim); font-size: 12.5px;
}
.brief-mail { padding: 0 14px; margin: 8px 0 0; }
.brief-mail-ok { padding: 0 14px; margin: 8px 0 0; font-size: 11.5px; color: #16C784; }
.brief-mail-err { padding: 0 14px; margin: 8px 0 0; font-size: 11.5px; color: var(--high); }
.asset-actions { margin: 0 0 10px; }

/* Account preferences (V2 5.6) */
.prefs-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; padding: 12px 14px; }
.prefs-form label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 9.5px; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; color: var(--dim);
}
.prefs-form select {
  padding: 6px 9px; border-radius: 6px; border: 1px solid var(--line2);
  background: var(--panel2); color: var(--txt); font-size: 12.5px;
}
.prefs-form button { margin-bottom: 1px; }
.prefs-form .prefs-check {
  flex-direction: row; align-items: center; gap: 8px; max-width: 330px;
  text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 500;
  color: var(--txt2);
}
.prefs-form .prefs-check input { accent-color: var(--accent); width: 14px; height: 14px; }
@media (max-width: 560px) {
  .brief-head h1 { font-size: 24px; }
  .brief-item { grid-template-columns: 70px minmax(0, 1fr); gap: 9px; }
  .brief-cal { flex-wrap: wrap; }
  .brief-cal-meta { margin-left: 0; white-space: normal; }
}
[data-theme="light"] .watch-chip { background: #fff; }

/* ---- 16. Responsive data tables --------------------------------------- */
/* Dark pool: on a phone keep the four decision columns (ticker, volume,
   z-score, short ratio) and drop the secondary trend columns. The page must
   not scroll sideways; the symbol links lead to the full per-ticker detail. */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 560px) {
  .tbl-scroll { overflow-x: visible; }
  .tbl-scroll .dp-table th:nth-child(3), .tbl-scroll .dp-table td:nth-child(3),
  .tbl-scroll .dp-table th:nth-child(5), .tbl-scroll .dp-table td:nth-child(5),
  .tbl-scroll .dp-table th:nth-child(7), .tbl-scroll .dp-table td:nth-child(7) {
    display: none;
  }
  .tbl-scroll .dp-table { min-width: 0; }
  .tbl-scroll .dp-table th { padding: 7px 8px; }
  .tbl-scroll .dp-table td { padding: 7px 8px; }
}

/* Calendar: on a phone the six-column table becomes a per-event card with
   a label in front of every value (labels come from data-label, so they are
   already localised by the server). */
@media (max-width: 560px) {
  .cal-table.cal-mobile { display: block; width: 100%; }
  .cal-mobile thead { display: none; }
  .cal-mobile tbody, .cal-mobile tr, .cal-mobile td { display: block; width: 100%; }
  .cal-mobile tr { padding: 9px 12px; border-bottom: 1px solid var(--line); }
  .cal-mobile tr:last-child { border-bottom: 0; }
  .cal-mobile td { border: 0; padding: 1px 0; display: flex; gap: 10px; align-items: baseline; }
  .cal-mobile td::before {
    content: attr(data-label); flex: 0 0 62px;
    font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim);
  }
  .cal-mobile td:nth-child(3) { font-size: 13.5px; font-weight: 600; }
  .cal-mobile td:nth-child(3)::before { font-weight: 400; }
  .cal-filter-k { flex-basis: 100%; margin: 4px 0 0; }
}

/* Asset table on a phone: stack each row into labelled lines instead of
   scrolling a 4-column table sideways. */
@media (max-width: 560px) {
  .an-assets { overflow-x: visible; }
  .an-assets table, .an-assets thead, .an-assets tbody,
  .an-assets tr, .an-assets td { display: block; width: 100%; }
  .an-assets thead { display: none; }
  .an-assets tr { padding: 9px 0; border-bottom: 1px solid var(--line); }
  .an-assets tr:last-child { border-bottom: 0; }
  .an-assets td { border: 0; padding: 2px 0; display: flex; gap: 10px; }
  .an-assets td::before {
    content: attr(data-label); flex: 0 0 74px;
    font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase;
    color: var(--dim); padding-top: 2px;
  }
}

[data-theme="light"] .ev-facts,
[data-theme="light"] .rep-list { background: var(--panel); }
[data-theme="light"] .path { background: #fff; }
[data-theme="light"] .rep-list li:hover { background: var(--panel2); }


/* ==========================================================================
   V2 DESIGN SYSTEM (spec 4.2 / 4.3 / 4.4)
   This block implements the documented tokens and component rules over the
   legacy base layer. Keep it ASCII-only and bump v2.css?v=N on every change.
   ========================================================================== */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/static/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/inter-700.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/jbmono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/static/fonts/jbmono-500.woff2") format("woff2");
}

:root {
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Consolas,
          "Liberation Mono", monospace;
  --bg: #080F1B;
  --bg2: #0B1422;
  --panel: #101A2A;
  --panel2: #162338;
  --line: #26364D;
  --line2: #334764;
  --txt: #E8EEF7;
  --txt2: #C7D4E4;
  --dim: #94A3B8;
  --dim2: #6B7C93;
  --accent: #3B82F6;
  --accent2: #60A5FA;
  --crit: #F05B67;
  --high: #F5A524;
  --mid: #F5C542;
  --low: #64748B;
  --up: #16C784;
  --down: #F05B67;
  --fs-h1: 34px;
  --fs-h1-mobile: 28px;
  /* documented aliases, mapped onto the legacy names */
  --surface: var(--panel);
  --surface-2: var(--panel2);
  --border: var(--line);
  --text: var(--txt);
  --muted: var(--dim);
  --primary: var(--accent);
  --positive: var(--up);
  --negative: var(--down);
  --warning: var(--high);
}

body {
  background:
    radial-gradient(1100px 560px at 78% -220px, rgba(59,130,246,.14), transparent 62%),
    radial-gradient(900px 480px at 0% 0%, rgba(37,99,235,.10), transparent 58%),
    var(--bg);
  color: var(--txt);
}
[data-theme="light"] body {
  background:
    radial-gradient(1000px 520px at 80% -220px, rgba(37,99,235,.08), transparent 62%),
    var(--bg);
}
.hd { background: rgba(8,15,27,.88); }
.hd-in { height: 60px; gap: 20px; }
.brand-mark {
  background: linear-gradient(135deg, #60A5FA, #2563EB);
  box-shadow: 0 0 18px rgba(59,130,246,.35);
}
.brand-mark::after { border-color: #06101F; }
.nav-link { font-size: 13px; padding: 8px 12px; }
.nav-link.active::after { bottom: -17px; }

/* --- buttons: primary / secondary / ghost / danger, 36-40px --- */
.btn {
  min-height: 36px; padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
}
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.btn.primary, .nav-cta {
  background: var(--accent); color: #fff; border: 1px solid transparent;
}
.btn.primary:hover, .nav-cta:hover { background: #2563EB; color: #fff; filter: none; }
.btn.secondary {
  background: var(--panel2); border: 1px solid var(--line2); color: var(--txt);
}
.btn.secondary:hover { border-color: var(--accent); color: var(--txt); }
.btn.danger {
  background: rgba(240,91,103,.12); border: 1px solid rgba(240,91,103,.5);
  color: #FCA5A5;
}
.btn.danger:hover { border-color: var(--down); color: #fff; }

/* --- header search (spec 3) --- */
.hd-search {
  flex: 1 1 260px; max-width: 380px; height: 36px;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; padding: 0 10px;
}
.hd-search input {
  flex: 1; min-width: 0; height: 100%; background: transparent;
  border: 0; outline: none; color: var(--txt); font: inherit; font-size: 12.5px;
}
.hd-search input::placeholder { color: var(--dim2); }
.hd-search kbd {
  font-family: var(--mono); font-size: 10px; color: var(--dim2);
  border: 1px solid var(--line2); border-radius: 4px; padding: 1px 4px;
}
@media (max-width: 1180px) { .hd-search { max-width: 220px; } }
@media (max-width: 760px) { .hd-search { display: none; } }

/* --- hero / type scale (spec 4.3) --- */
.home-hero { margin: 4px 0 18px; }
.home-h1 {
  font-size: var(--fs-h1); line-height: 1.14; letter-spacing: -.7px;
  font-weight: 700; margin: 4px 0 10px;
}
.home-h1 em { font-style: normal; color: var(--accent); }
.home-sub { margin: 0 0 14px; color: var(--dim); font-size: 14px; }
.home-hero .status-bar {
  background: transparent; border: 0; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
}
.home-hero .status-bar b { font-size: 14px; }
.page-head h1 { font-size: 32px; letter-spacing: -.5px; }
.ev.v2-ev .ev-title { font-size: 32px; letter-spacing: -.5px; }
.sec-h h2 { font-size: 17px; }
.feed-head h2, .feed-head h1 { font-size: 18px; }

/* --- cards / panels: 8px spacing system, restrained borders --- */
.card { border-radius: 10px; }
.card-body { padding: 16px 18px; }
.card-meta { gap: 8px; margin-bottom: 8px; }
.card-title { font-size: 15px; line-height: 1.45; }
.card-sum { margin: 0 0 10px; }
.card-foot { gap: 8px; }
.panel { border-radius: 10px; }
.panel-h { margin-bottom: 12px; }
.panel-h b { font-size: 14px; }
.panel-h .dim, .panel-h a { font-size: 11.5px; }

/* --- skeleton: only for real async loading (spec 4.4) --- */
.skeleton {
  position: relative; overflow: hidden; background: var(--panel2);
  border-radius: 6px; min-height: 12px;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  animation: skeleton-sweep 1.4s ease-in-out infinite;
}
@keyframes skeleton-sweep {
  from { transform: translateX(-100%); } to { transform: translateX(100%); }
}
.skeleton-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; }
.skeleton-card .skeleton + .skeleton { margin-top: 10px; }

@media (max-width: 720px) {
  .home-h1 { font-size: var(--fs-h1-mobile); }
  .page-head h1 { font-size: 28px; }
  .ev.v2-ev .ev-title { font-size: 28px; }
  .card-body { padding: 14px; }
  .home-sub { font-size: 13px; }
}
/* Mobile navigation: the desktop row collapses into a details panel. */
.nav { flex: 0 1 auto; }
.nav-mobile { display: none; position: relative; }
.nav-mobile summary {
  list-style: none; cursor: pointer; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2); border-radius: 8px; color: var(--txt);
  font-size: 16px; line-height: 1;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile-panel {
  position: absolute; left: 0; top: 44px; z-index: 60; min-width: 220px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}
.nav-mobile-panel a {
  padding: 9px 10px; border-radius: 6px; color: var(--dim); font-size: 13px;
}
.nav-mobile-panel a:hover, .nav-mobile-panel a.active {
  background: var(--panel2); color: var(--txt);
}
@media (max-width: 1000px) { .nav-mobile { display: block; } }
@media (min-width: 1001px) { .nav-mobile { display: none; } }
/* --- search page --- */
.search-page { display: flex; gap: 8px; max-width: 660px; margin: 0 0 20px; }
.search-page input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  background: var(--panel2); border: 1px solid var(--line);
  border-radius: 8px; color: var(--txt); font: inherit; font-size: 13px;
}
.search-page input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-page .btn { min-height: 40px; }
/* LIVE and status dots are positive state, not a price move. */
.live-dot, .dot.ok { background: var(--up); box-shadow: 0 0 0 0 rgba(22,199,132,.6); }
.live-txt { color: var(--up); }
/* Card-level source confidence + relevance (spec 4.4 Event Row). */
.card-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px; margin: 10px 0 8px;
}
.card-stat {
  display: grid; grid-template-columns: auto minmax(40px, 1fr) auto;
  align-items: center; gap: 8px;
  font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim2);
}
.card-stat i { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.card-stat i em { display: block; height: 100%; background: var(--accent); }
.card-stat:nth-child(2) i em { background: var(--up); }
.card-stat b { font-family: var(--mono); font-size: 10.5px; color: var(--txt2); }
@media (max-width: 720px) { .card-stats { display: none; } }
/* Light theme must come after the dark token block: same specificity, later wins. */
[data-theme="light"] {
  --bg: #F5F7FB;
  --bg2: #EEF2F8;
  --panel: #FFFFFF;
  --panel2: #EEF2F8;
  --line: #DCE3ED;
  --line2: #C9D3E0;
  --txt: #172338;
  --txt2: #334155;
  --dim: #5E6E84;
  --dim2: #7C8BA1;
  --accent: #2563EB;
  --accent2: #1D4ED8;
  --crit: #DC4655;
  --high: #C98212;
  --mid: #2563EB;
  --up: #0F9F6E;
  --down: #DC4655;
}
[data-theme="light"] .brand-mark::after { border-color: #F5F7FB; }
[data-theme="light"] .hd { background: rgba(255,255,255,.92); }
[data-theme="light"] .nav-link.active { background: rgba(37,99,235,.08); }
[data-theme="light"] .nav-link:hover { background: rgba(37,99,235,.06); }
/* Phone header: keep brand, menu, theme, language and Upgrade on one row. */
@media (max-width: 560px) {
  .hd-in { padding: 0 12px; gap: 8px; }
  .brand-txt em { display: none; }
  .brand-txt b { font-size: 14px; }
  .hd-right { gap: 8px; }
  .hd-right .nav-link { display: none; }
  .hd-right .who { display: none; }
  .nav-cta { padding: 6px 10px; font-size: 12px; }
  .lang-select { max-width: 74px; }
}
/* Dark pool trend axis: labels align with the bar column. */
.dp-trend-axis {
  display: flex; justify-content: space-between;
  padding: 2px 14px 0 102px; font-size: 9.5px; color: var(--dim2);
  font-family: var(--mono);
}
@media (max-width: 560px) { .dp-trend-axis { padding-left: 77px; } }
/* Desktop header: never wrap nav labels or the account CTA. */
.nav, .nav-link, .nav-cta, .hd-right .nav-link { white-space: nowrap; }
.nav { flex-wrap: nowrap; }
.who { display: none; }
@media (min-width: 1600px) { .who { display: inline; } }
/* Phone: source + time on one line, headline full width below. */
@media (max-width: 560px) {
  .rep-list li { flex-wrap: wrap; gap: 4px 8px; padding: 9px 12px; }
  .rep-src { flex: 0 0 auto; }
  .rep-list a { flex: 1 1 100%; order: 3; }
  .rep-time { margin-left: auto; }
}
/* ==========================================================================
   HOME DASHBOARD (V2 reference layout): hero + market strip + event rows +
   next-24h timeline + brief + watchlist. This is the dark reference layout.
   ========================================================================== */
.page-home .tape { display: none; }
.page-home .wrap { padding-top: 8px; }

.home-hero {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; padding: 30px 0 26px; overflow: hidden;
}
.hero-copy { position: relative; z-index: 1; max-width: 760px; }
.home-hero .home-h1 { font-size: 36px; margin: 0 0 10px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; }
.hero-facts > span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--dim);
}
.hero-facts svg { color: var(--accent); flex: 0 0 auto; }
.hero-facts b { font-family: var(--mono); font-size: 15px; color: var(--txt); }
.hero-art {
  position: absolute; right: -40px; top: -30px; width: 46%; height: 150%;
  pointer-events: none; opacity: .55;
  background-image: radial-gradient(rgba(96,165,250,.38) 1px, transparent 1.2px);
  background-size: 13px 13px;
  -webkit-mask-image: radial-gradient(ellipse at 66% 42%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 66% 42%, #000 0%, transparent 70%);
}

.market-overview {
  display: grid; grid-template-columns: 170px repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel); margin: 0 0 18px;
}
.mkt-date {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 12px 16px; border-right: 1px solid var(--line);
}
.mkt-date span { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.mkt-date b { font-size: 12px; color: var(--txt2); }
.mkt-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline;
  gap: 2px 8px; padding: 10px 14px; border-right: 1px solid var(--line); min-width: 0;
}
.mkt-item:last-child { border-right: 0; }
.mkt-name { grid-column: 1 / -1; font-size: 10.5px; color: var(--dim); }
.mkt-price { font-family: var(--mono); font-size: 15px; color: var(--txt); font-weight: 600; }
.mkt-chg { font-family: var(--mono); font-size: 10.5px; justify-self: end; }
.mkt-item .spark { grid-column: 1 / -1; margin-top: 4px; }

.home-2col {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 16px; margin-bottom: 16px; align-items: stretch;
}
.home-panel {
  padding: 0; overflow: hidden; border-radius: 10px;
  background: linear-gradient(180deg, rgba(59,130,246,.035), transparent 140px), var(--panel);
}
.home-panel .panel-h {
  margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.home-panel .panel-h b { font-size: 13px; }
.home-panel .panel-h a { font-size: 11px; color: var(--accent2); }

/* top market events */
.ev-list { display: flex; flex-direction: column; }
.ev-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 186px 16px;
  gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: background .12s ease;
}
.ev-row:last-child { border-bottom: 0; }
.ev-row:hover { background: var(--panel2); }
.ev-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.impact {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  font-size: 9px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid transparent;
}
.impact.critical, .impact.high {
  color: #FCA5A5; background: rgba(240,91,103,.14);
  border-color: rgba(240,91,103,.35);
}
.impact.medium, .impact.mid {
  color: #FCD34D; background: rgba(245,165,36,.12);
  border-color: rgba(245,165,36,.3);
}
.impact.low {
  color: #93C5FD; background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.3);
}
.ev-ago { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--dim2); }
.ev-row h3 { margin: 6px 0 4px; font-size: 15.5px; line-height: 1.35; font-weight: 600; }
.ev-row p { margin: 0 0 7px; font-size: 12px; line-height: 1.5; color: var(--dim); }
.ev-assets { display: flex; gap: 5px; flex-wrap: wrap; }
.asset-chip {
  padding: 2px 7px; border-radius: 4px; border: 1px solid var(--line2);
  font-family: var(--mono); font-size: 9.5px; color: var(--txt2);
  background: var(--panel2);
}
.ev-metrics { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.ev-metric {
  display: grid; grid-template-columns: 1fr auto; gap: 3px 8px;
  font-size: 9px; letter-spacing: .05em; text-transform: uppercase; color: var(--dim2);
}
.ev-metric b { font-family: var(--mono); font-size: 10.5px; color: var(--txt2); }
.ev-metric i {
  grid-column: 1 / -1; height: 4px; border-radius: 2px;
  background: var(--line); overflow: hidden;
}
.ev-metric i em { display: block; height: 100%; background: var(--up); }
.ev-metric:first-child i em { background: var(--accent); }
.ev-chev { align-self: center; color: var(--dim2); font-size: 22px; line-height: 1; }

/* next 24 hours */
.n24-list { list-style: none; margin: 0; padding: 6px 16px 2px; }
.n24-list li {
  display: grid; grid-template-columns: 44px 9px minmax(0, 1fr) 34px auto;
  gap: 8px; align-items: center; padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.n24-list li:last-child { border-bottom: 0; }
.n24-time { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.n24-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.14); }
.n24-title { font-size: 12px; color: var(--txt2); }
.n24-country { font-size: 9.5px; color: var(--dim2); text-align: right; }
.n24-list .impact { font-size: 8.5px; padding: 1px 5px; }
.n24-tz { margin: 0; padding: 9px 16px 12px; font-size: 10px; color: var(--dim); background: rgba(59,130,246,.05); }
.n24-tz a { color: var(--accent2); text-decoration: none; }

/* brief */
.brief-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 12px 16px 0; }
.watch-chip {
  padding: 2px 8px; border: 1px solid var(--line2); border-radius: 5px;
  font-family: var(--mono); font-size: 10px; color: var(--txt2);
}
.brief-take { display: block; padding: 12px 16px 10px; color: inherit; text-decoration: none; }
.brief-take:hover b { color: var(--accent2); }
.brief-kicker { font-size: 9px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.brief-take b { display: block; margin: 4px 0 3px; font-size: 13.5px; line-height: 1.4; }
.brief-take p { margin: 0; font-size: 11.5px; color: var(--dim); line-height: 1.5; }
.brief-counts { display: flex; gap: 18px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--dim); }
.brief-counts b { font-family: var(--mono); font-size: 13px; color: var(--txt); margin-right: 2px; }
.home-empty { margin: 12px 16px; font-size: 11.5px; color: var(--dim); }

/* watchlist */
.watch-table { padding: 2px 0; }
.watch-row {
  display: grid; grid-template-columns: minmax(0,1fr) 74px 58px 94px;
  gap: 8px; align-items: center; padding: 8px 16px;
  border-bottom: 1px solid var(--line); color: inherit; text-decoration: none;
}
.watch-row:last-child { border-bottom: 0; }
.watch-row:hover { background: var(--panel2); }
.watch-sym b { display: block; font-family: var(--mono); font-size: 11.5px; color: var(--txt); }
.watch-sym em { display: block; font-style: normal; font-size: 9.5px; color: var(--dim2); }
.watch-price { font-family: var(--mono); font-size: 11px; text-align: right; color: var(--txt2); }
.watch-chg { font-family: var(--mono); font-size: 10px; text-align: right; }
.watch-row .spark { justify-self: end; }
.watch-note { margin: 0; padding: 8px 16px 10px; font-size: 9.5px; color: var(--dim2); }

.spark { display: block; color: var(--up); }
.spark.up { color: var(--up); }
.spark.down { color: var(--down); }
.spark-na { font-family: var(--mono); font-size: 10px; color: var(--dim2); }

.home-feed { margin-top: 4px; }
.dp-preview {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px;
  padding: 2px 14px 12px; font-size: 10.5px; color: var(--dim);
}
.dp-preview b { font-family: var(--mono); font-size: 13px; color: var(--txt2); text-align: right; }

@media (max-width: 1080px) {
  .home-2col { grid-template-columns: 1fr; }
  .market-overview { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .mkt-date { display: none; }
}
@media (max-width: 720px) {
  .home-hero { padding: 18px 0 14px; }
  .home-hero .home-h1 { font-size: 28px; }
  .hero-art { display: none; }
  .hero-facts { gap: 8px 14px; }
  .market-overview { display: flex; overflow-x: auto; scrollbar-width: none; }
  .market-overview::-webkit-scrollbar { display: none; }
  .mkt-item { flex: 0 0 148px; }
  .ev-row { grid-template-columns: 1fr; gap: 8px; padding: 12px 14px; }
  .ev-metrics { flex-direction: row; gap: 14px; }
  .ev-metric { flex: 1; }
  .ev-chev { display: none; }
  .ev-ago { margin-left: 0; }
  .watch-row { grid-template-columns: minmax(0,1fr) 68px 54px 80px; padding: 8px 14px; }
}
/* Home dashboard: auto-height panels so the right column does not stretch. */
.home-2col { align-items: start; }
/* Watchlist header + next-24h timeline spine */
.watch-head {
  display: grid; grid-template-columns: minmax(0,1fr) 74px 58px 94px;
  gap: 8px; padding: 8px 16px 4px;
  font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim2);
}
.watch-head span:nth-child(2), .watch-head span:nth-child(3) { text-align: right; }
.watch-head span:last-child { text-align: right; }
.n24-list { position: relative; }
.n24-list::before {
  content: ""; position: absolute; left: 71px; top: 16px; bottom: 18px;
  width: 1px; background: var(--line);
}
.n24-dot { position: relative; z-index: 1; }
@media (max-width: 720px) {
  .watch-head { grid-template-columns: minmax(0,1fr) 68px 54px 80px; padding: 7px 14px 3px; }
  .n24-list::before { left: 69px; }
}
/* Reference polish: world map, avatar menu, stretched calendar, brief card */
.hero-art { background-image: none; opacity: .9; width: 52%; right: -30px; top: -10px; }
.hero-art img {
  width: 100%; height: auto; display: block;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
}
.user-menu { position: relative; }
.user-menu summary { list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line2); color: var(--dim); background: var(--panel2);
}
.avatar:hover { color: var(--txt); border-color: var(--accent); }
.user-pop {
  position: absolute; right: 0; top: 42px; min-width: 164px; z-index: 80;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px; display: flex; flex-direction: column;
  box-shadow: 0 16px 36px rgba(0,0,0,.4);
}
.user-pop a { padding: 8px 10px; border-radius: 5px; color: var(--dim); font-size: 12px; }
.user-pop a:hover { background: var(--panel2); color: var(--txt); }

.home-2col { align-items: stretch; }
.next24 { display: flex; flex-direction: column; }
.next24 .n24-list { flex: 1; }

.brief-body { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px 16px 2px; }
.brief-thumb {
  min-height: 62px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel2); display: flex; align-items: center; justify-content: center;
  color: var(--accent); padding: 4px;
}
.brief-thumb .spark { width: 88px; height: 48px; }
.brief-content { min-width: 0; }
.brief-content .brief-take { padding: 0; }
.brief-content .brief-take b { font-size: 12.5px; }
.brief-content .brief-take p { font-size: 11px; }
.brief-badge {
  margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.35);
  color: var(--accent2); font-size: 9px; letter-spacing: .04em;
}
.brief-chip {
  display: inline-flex; align-items: center; gap: 3px; margin: 0;
  padding: 2px 4px 2px 8px; border: 1px solid var(--line2); border-radius: 5px;
  font-family: var(--mono); font-size: 10px; color: var(--txt2);
}
.brief-chip .watch-x { font-size: 12px; line-height: 1; color: var(--dim); padding: 0 3px; }
.brief-chip .watch-x:hover { color: var(--down); }
.brief-add {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border: 1px dashed var(--line2); border-radius: 5px;
  font-size: 10px; color: var(--dim);
}
.brief-add:hover { color: var(--accent2); border-color: var(--accent); }
@media (max-width: 720px) {
  .hero-art { display: none; }
  .brief-body { grid-template-columns: 1fr; }
  .brief-thumb { display: none; }
}
/* Phone header: shorten the CTA instead of clipping it. */
@media (max-width: 560px) {
  .nav-cta { font-size: 0; padding: 6px 10px; }
  .nav-cta::after { content: attr(data-short); font-size: 12px; }
}
/* ==========================================================================
   LOGGED-IN APP SHELL (reference image 1): left sidebar + top search bar.
   ========================================================================== */
.app-shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px 14px; background: var(--bg2);
  border-right: 1px solid var(--line); z-index: 60;
}
.side-brand {
  display: flex; align-items: center; gap: 9px; padding: 4px 8px 16px;
  color: var(--txt); text-decoration: none;
}
.side-brand .brand-mark { width: 24px; height: 24px; }
.side-brand span:last-child { display: flex; flex-direction: column; line-height: 1.08; }
.side-brand b { font-size: 14px; letter-spacing: .2px; }
.side-brand em {
  font-style: normal; font-family: var(--mono); font-size: 8px;
  letter-spacing: 2px; color: var(--dim2);
}
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px; border: 1px solid transparent;
  color: var(--dim); font-size: 13px; text-decoration: none;
}
.side-link svg { flex: 0 0 auto; opacity: .9; }
.side-link:hover { background: var(--panel2); color: var(--txt); }
.side-link.active {
  color: var(--txt); background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.28);
}
.side-link.active svg { color: var(--accent); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.side-foot .nav-cta { text-align: center; justify-content: center; }
.side-user {
  display: flex; align-items: center; gap: 9px; padding: 8px 6px;
  color: var(--dim); font-size: 12px; text-decoration: none;
  border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px;
}
.side-user:hover { color: var(--txt); }
.side-user .avatar { width: 30px; height: 30px; }

.topbar {
  position: sticky; top: 0; z-index: 40; height: 64px;
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  background: color-mix(in srgb, var(--bg) 90%, #000 10%);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
.top-search { flex: 1; max-width: 560px; height: 38px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px; color: var(--dim);
  border: 1px solid transparent; text-decoration: none;
}
.top-icon:hover { background: var(--panel2); color: var(--txt); border-color: var(--line2); }
.side-toggle {
  display: none; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--line2); background: transparent; color: var(--txt);
  font-size: 17px; cursor: pointer;
}
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-content { max-width: 1360px; width: 100%; padding: 18px 28px 64px; }
.side-scrim { display: none; }

@media (max-width: 1000px) {
  .app-shell { display: block; }
  .side {
    position: fixed; left: 0; top: 0; width: 244px;
    transform: translateX(-100%); transition: transform .18s ease;
  }
  body.side-open .side { transform: translateX(0); }
  .side-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .app-content { padding: 14px 16px 56px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .top-right { gap: 8px; }
  .top-right .nav-cta { display: none; }
  .side-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,.5); opacity: 0; pointer-events: none;
    transition: opacity .18s ease;
  }
  body.side-open .side-scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .top-search { display: flex; max-width: none; flex: 1; }
  .topbar { height: 58px; }
  .top-right .lang-select { display: none; }
}
/* Logged-in hero snapshot card (reference image 1) */
.snapshot-card {
  flex: 0 0 372px; align-self: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
}
.snap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.snap-head b { font-size: 13px; }
.snap-live { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--up); }
.snap-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); }
.snap-rows { display: flex; flex-direction: column; }
.snap-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto 62px;
  gap: 10px; align-items: baseline; padding: 7px 0;
  border-bottom: 1px solid var(--line); font-size: 11.5px;
}
.snap-row:last-child { border-bottom: 0; }
.snap-sym { color: var(--dim); }
.snap-row b { font-family: var(--mono); font-size: 12px; color: var(--txt2); }
.snap-row span:last-child { font-family: var(--mono); font-size: 10.5px; text-align: right; }

.n24-week { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.n24-day {
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  padding: 8px 4px; border-right: 1px solid var(--line);
}
.n24-day:last-child { border-right: 0; }
.n24-day span { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim2); }
.n24-day b { font-family: var(--mono); font-size: 13px; color: var(--txt2); }

@media (max-width: 1000px) {
  .snapshot-card { flex: 0 0 340px; }
}
@media (max-width: 760px) {
  .snapshot-card { display: none; }
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero-actions .btn { min-width: 130px; justify-content: center; }
@media (max-width: 560px) {
  .topbar { padding: 0 10px; gap: 8px; }
  .top-right { gap: 4px; }
  .top-icon, .topbar .theme-btn, .topbar .avatar { width: 30px; height: 30px; }
}
/* ==========================================================================
   US MARKET PLAYBOOK
   ========================================================================== */
.pb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 6px 0 10px; }
.pb-eyebrow { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent2); }
.pb-head h1 { margin: 4px 0 6px; font-size: 32px; letter-spacing: -.5px; }
.pb-sub { margin: 0; color: var(--dim); font-size: 13px; }
.pb-head-r { display: flex; align-items: flex-end; gap: 10px; }
.pb-date { display: flex; flex-direction: column; gap: 4px; }
.pb-date label { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim2); }
.pb-date select {
  height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--panel); color: var(--txt); font-family: var(--mono); font-size: 12px;
}
.pb-meta-line { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 10.5px; color: var(--dim); margin-bottom: 16px; }
.pb-session { color: var(--accent2); border: 1px solid rgba(59,130,246,.35); background: rgba(59,130,246,.09); border-radius: 4px; padding: 1px 7px; }

.pb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pb-card {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--panel); display: flex; flex-direction: column;
}
.pb-pre { border-top: 2px solid var(--accent); }
.pb-post { border-top: 2px solid #8B5CF6; }
.pb-card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pb-card-title { display: flex; gap: 10px; align-items: flex-start; }
.pb-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; font-size: 16px;
}
.pb-icon.sun { color: #F5B642; background: rgba(59,130,246,.12); }
.pb-icon.moon { color: #A78BFA; background: rgba(139,92,246,.14); }
.pb-card-title h2 { margin: 0; font-size: 16px; letter-spacing: .04em; }
.pb-card-title p { margin: 2px 0 0; font-size: 10.5px; color: var(--dim); }
.pb-pub { font-size: 9.5px; color: var(--dim2); white-space: nowrap; }
.pb-empty { padding: 40px 20px; text-align: center; color: var(--dim); }
.pb-empty b { display: block; margin-bottom: 8px; font-size: 15px; letter-spacing: .05em; }

.pb-setup { display: grid; grid-template-columns: 1fr 0.8fr 1.6fr 1.4fr; gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.pb-setup-cell { background: var(--panel); padding: 10px 12px; min-width: 0; }
.pb-setup-cell > span { display: block; font-size: 8.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--dim2); margin-bottom: 4px; }
.pb-setup-cell b { font-family: var(--mono); font-size: 16px; color: var(--txt); }
.pb-setup-cell p { margin: 3px 0 0; font-size: 10px; color: var(--dim); line-height: 1.45; }
.pb-bias.bullish { color: var(--up); }
.pb-bias.bearish { color: var(--down); }
.pb-bias.mixed { color: var(--high); }

.pb-body { padding: 14px 16px; flex: 1; }
.pb-body h3 { margin: 14px 0 7px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pb-body h3:first-child { margin-top: 0; }
.pb-body > p { margin: 0 0 8px; font-size: 12px; color: var(--txt2); line-height: 1.5; }
.pb-sectors { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.pb-sector { border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); padding: 8px; min-width: 0; }
.pb-sector-h { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 6px; }
.pb-sector-h b { font-size: 11px; }
.pb-sector-h span { font-size: 8px; color: var(--up); border: 1px solid rgba(22,199,132,.35); border-radius: 3px; padding: 0 4px; }
.pb-name { padding: 6px 0; border-top: 1px dashed var(--line); }
.pb-name:first-of-type { border-top: 0; }
.pb-name-h { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.pb-name-h b { font-family: var(--mono); font-size: 10.5px; color: var(--accent2); }
.pb-name-h span { font-size: 8.5px; color: var(--dim2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-thesis { margin: 2px 0; font-size: 9.5px; line-height: 1.4; color: var(--dim); }
.pb-risk { margin: 2px 0; font-size: 9px; line-height: 1.35; color: var(--dim2); }
.pb-risk b, .pb-cand-extra b { color: var(--down); margin-right: 4px; font-size: 8px; text-transform: uppercase; }
.pb-cand-extra p { margin: 3px 0; font-size: 9.5px; color: var(--dim); line-height: 1.4; }
.pb-cand-extra b { color: var(--accent2); }
.pb-locked { margin: 3px 0 0; font-size: 9px; color: var(--dim2); }
.pb-locked a { color: var(--accent2); }

.pb-scenarios { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.pb-scenario { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel2); }
.pb-scenario b { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.pb-scenario p { margin: 4px 0 0; font-size: 10px; line-height: 1.45; color: var(--dim); }
.pb-scenario.bull b { color: var(--up); }
.pb-scenario.base b { color: var(--accent2); }
.pb-scenario.bear b { color: var(--down); }

.pb-card-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 9.5px; color: var(--dim2); }
.pb-card-f a { color: var(--accent2); }

.pb-indices { display: flex; flex-direction: column; gap: 6px; }
.pb-idx { display: grid; grid-template-columns: 1fr auto auto 86px; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 11px; }
.pb-idx b { font-family: var(--mono); font-size: 11px; }
.pb-unavailable { border: 1px dashed var(--line2); border-radius: 6px; padding: 8px 10px; font-size: 10.5px; color: var(--dim2); margin: 0; }
.pb-list { margin: 0; padding-left: 16px; }
.pb-list li { font-size: 10.5px; line-height: 1.6; color: var(--dim); }
.pb-list a { color: var(--txt2); }
.pb-disclaimer { margin: 18px 0 0; font-size: 9.5px; color: var(--dim2); line-height: 1.6; }

/* detail + archive */
.pb-detail-head { margin: 4px 0 16px; }
.pb-detail-head h1 { margin: 4px 0; font-size: 32px; }
.pb-detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pb-detail-main { padding: 18px; }
.pb-detail-main h2 { font-size: 16px; margin: 18px 0 8px; }
.pb-detail-main h2:first-child { margin-top: 0; }
.pb-side { display: flex; flex-direction: column; gap: 12px; }
.pb-metric-table { display: flex; flex-direction: column; gap: 4px; }
.pb-metric-table div { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; font-size: 11px; border-bottom: 1px dashed var(--line); padding: 4px 0; }
.pb-metric-table em { grid-column: 1 / -1; font-style: normal; font-size: 9px; color: var(--dim2); }
.pb-metric-row { display: flex; flex-direction: column; gap: 1px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pb-metric-row span { font-size: 9px; text-transform: uppercase; color: var(--dim2); }
.pb-metric-row b { font-size: 11px; color: var(--txt2); }
.pb-metric-row em { font-style: normal; font-size: 9px; color: var(--dim2); }
.pb-sources p { margin: 3px 0; font-size: 11px; }
.pb-social { border-top: 1px solid var(--line); padding: 8px 0; }
.pb-social:first-of-type { border-top: 0; }
.pb-social b { font-size: 10px; text-transform: uppercase; color: var(--accent2); }
.pb-social pre { white-space: pre-wrap; font-family: var(--sans); font-size: 10px; color: var(--dim); margin: 4px 0 0; }
.pb-tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.pb-tabs a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--dim); font-size: 11px; }
.pb-tabs a.active { color: var(--txt); border-color: var(--accent); background: rgba(59,130,246,.1); }

/* home entry cards */
.pb-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.pb-entry { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); color: inherit; text-decoration: none; }
.pb-entry.pre { border-left: 2px solid var(--accent); }
.pb-entry.post { border-left: 2px solid #8B5CF6; }
.pb-entry:hover { border-color: var(--accent); }
.pb-entry-h { display: flex; align-items: center; gap: 8px; }
.pb-entry-h b { font-size: 11px; letter-spacing: .05em; }
.pb-entry-meta { margin-left: auto; font-size: 9px; color: var(--dim2); }
.pb-entry p { margin: 6px 0 4px; font-size: 11px; color: var(--dim); line-height: 1.45; }
.pb-entry-cta { font-size: 10px; color: var(--accent2); }

@media (max-width: 1100px) {
  .pb-grid { grid-template-columns: 1fr; }
  .pb-detail-grid { grid-template-columns: 1fr; }
  .pb-setup { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .pb-head { flex-direction: column; align-items: flex-start; }
  .pb-head h1 { font-size: 28px; }
  .pb-head-r { width: 100%; flex-wrap: wrap; }
  .pb-sectors, .pb-scenarios, .pb-entry-grid { grid-template-columns: 1fr; }
  .pb-setup { grid-template-columns: 1fr; }
  .pb-detail-head h1 { font-size: 28px; }
  .pb-card-f { flex-direction: column; align-items: flex-start; }
  .pb-idx { grid-template-columns: 1fr auto auto; }
  .pb-idx .spark { display: none; }
}.pb-corrected { margin: 8px 0 0; padding: 8px 10px; border: 1px solid rgba(245,165,36,.4); background: rgba(245,165,36,.08); border-radius: 6px; font-size: 11px; color: #FCD34D; }
/* Post-market data blocks */
.pb-breadth { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; background: var(--panel2); }
.pb-breadth p { margin: 4px 0 0; font-size: 10.5px; color: var(--dim); }
.pb-breadth p b { font-family: var(--mono); }
.pb-breadth-bar { display: flex; height: 7px; border-radius: 4px; overflow: hidden; background: var(--line); }
.pb-breadth-bar i { display: block; height: 100%; }
.pb-breadth-bar .up { background: var(--up); }
.pb-breadth-bar .down { background: var(--down); }
.pb-rot { display: flex; flex-direction: column; gap: 3px; }
.pb-rot-row { display: grid; grid-template-columns: 118px minmax(0,1fr) 54px 44px; gap: 7px; align-items: center; font-size: 9.5px; }
.pb-rot-row > span { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-rot-row > b { font-family: var(--mono); text-align: right; font-size: 10px; }
.pb-rot-row > em { font-style: normal; font-family: var(--mono); font-size: 9px; color: var(--dim2); text-align: right; }
.pb-rot-bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.pb-rot-bar i { display: block; height: 100%; border-radius: 3px; }
.pb-rot-bar i.up { background: var(--up); }
.pb-rot-bar i.down { background: var(--down); }
.pb-unusual-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-unusual { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border: 1px solid var(--line2); border-radius: 4px; font-family: var(--mono); font-size: 9.5px; color: var(--dim); }
.pb-unusual b { color: var(--high); font-size: 10px; }
.pb-rot .up, .pb-breadth .up { color: var(--up); }
.pb-rot .down, .pb-breadth .down { color: var(--down); }