/* ==========================================================================
   TÀI CHÍNH PHỐ WALL — Modern Luxury Editorial + Live Terminal System
   Obsidian Cover + Warm Archival Paper + 1-Click Dark Trading Mode
   ========================================================================== */

:root {
  --bg-page: #f7f5f0;
  --bg-surface: #ffffff;
  --bg-muted: #eeebe3;
  --obsidian: #0e100f;
  --obsidian-card: #161918;
  --obsidian-border: rgba(255, 255, 255, 0.11);

  --ink: #141413;
  --ink-2: #3a3834;
  --ink-muted: #6c6860;
  --rule: #dedad0;
  --rule-soft: #eae6dd;

  --gold: #c8a253;
  --gold-hover: #b38c3d;
  --accent-blue: #0b5c8a;
  --accent-red: #b51d1d;
  --up: #0b7a4b;
  --up-bright: #10b981;
  --down: #c92525;
  --down-bright: #f87171;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --max-w: 1320px;
}

/* DARK TRADING MODE */
[data-theme="dark"] {
  --bg-page: #0c0e0d;
  --bg-surface: #141716;
  --bg-muted: #1b1f1d;
  --ink: #f3f1ec;
  --ink-2: #c9c5bc;
  --ink-muted: #8f8b82;
  --rule: #282d2b;
  --rule-soft: #202422;
  --accent-blue: #58a6d8;
  --up: #34d399;
  --down: #f87171;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
}

/* ==========================================================================
   TOP OBSIDIAN SHELL (TAPE + MASTHEAD + NAV)
   ========================================================================== */
.top-shell {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--obsidian);
  color: #f3f1ec;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tape-bar {
  background: #080909;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
}

.tape-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
}

.tape-tabs {
  display: flex;
  gap: 2px;
  padding-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.market-tab {
  background: transparent;
  border: none;
  color: #8f9491;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 2px;
}

.market-tab.active, .market-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.ticker-track::-webkit-scrollbar { display: none; }

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
}

.ticker-name { font-family: var(--font-sans); font-weight: 600; color: #d5d8d6; }
.ticker-val { color: #ffffff; font-weight: 600; }
.ticker-chg.up { color: #34d399; font-weight: 600; }
.ticker-chg.down { color: #f87171; font-weight: 600; }

.tape-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #a9b0ac;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

/* Masthead Bar */
.masthead-bar {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 44px;
  width: auto;
  border-radius: 4px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
  line-height: 1.05;
}

.brand-meta {
  font-size: 10px;
  letter-spacing: 0.11em;
  color: #9da3a0;
  text-transform: uppercase;
  margin-top: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e6e5;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 3px;
  transition: background 0.15s, border-color 0.15s;
}

.hdr-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-gold {
  background: var(--gold);
  color: #111110;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  transition: background 0.15s, transform 0.12s;
}

.btn-gold:hover {
  background: var(--gold-hover);
  transform: translateY(-1px);
}

.full-width { width: 100%; }

/* Category Nav */
.cat-nav-bar {
  background: #131615;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-item {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #a9b0ac;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 13px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.nav-item:hover { color: #ffffff; }
.nav-item.active {
  color: #ffffff;
  border-bottom-color: var(--gold);
}

/* ==========================================================================
   HERO COVER (DRAMATIC OBSIDIAN COVER + LIVE TERMINAL PANEL)
   ========================================================================== */
.hero-cover {
  background: linear-gradient(180deg, #0e100f 0%, #141816 100%);
  color: #f4f2ec;
  padding: 24px 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) 390px;
  gap: 22px;
  align-items: stretch;
}

/* Cover Feature Card */
.cover-feature {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--obsidian-border);
  background: var(--obsidian-card);
  cursor: pointer;
}

.cover-media {
  position: relative;
  min-height: 410px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.cover-feature:hover .cover-img {
  transform: scale(1.025);
}

.cover-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 11, 0.45) 0%,
    rgba(10, 12, 11, 0.18) 38%,
    rgba(10, 12, 11, 0.86) 76%,
    rgba(10, 12, 11, 0.97) 100%
  );
}

.cover-top-tags {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 24px 0;
}

.badge-live-red {
  background: #b91c1c;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 2px;
}

.badge-glass {
  background: rgba(14, 16, 15, 0.68);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e5e3dc;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  padding: 4px 9px;
  border-radius: 2px;
}

.cover-overlay-content {
  position: relative;
  z-index: 2;
  padding: 20px 26px 22px;
}

.cover-headline {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(25px, 2.7vw, 36px);
  font-weight: 700;
  line-height: 1.18;
  color: #ffffff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.cover-feature:hover .cover-headline {
  color: #f3dfb0;
}

.cover-deck {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 16.5px;
  line-height: 1.48;
  color: #d6d3cb;
  max-width: 700px;
}

.cover-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #a6a39b;
}

.cover-byline strong { color: #f3f1ec; }

/* Bull vs Bear Signature Strip */
.bull-bear-strip {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  background: #121514;
  border-top: 1px solid var(--obsidian-border);
}

.bb-col {
  padding: 13px 20px;
}

.bb-divider {
  background: var(--obsidian-border);
}

.bb-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #c8c6be;
  margin-bottom: 5px;
}

.bb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.bb-dot.up { background: #10b981; }
.bb-dot.down { background: #f87171; }

.bb-col p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: #b4b2aa;
}

/* Right Obsidian Terminal Panel */
.terminal-panel {
  background: var(--obsidian-card);
  border: 1px solid var(--obsidian-border);
  border-radius: 6px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
}

.terminal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.kicker-gold {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3px;
}

.kicker-red {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.terminal-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  color: #ffffff;
}

.chart-tabs-dark {
  display: flex;
  gap: 3px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px;
  border-radius: 3px;
}

.chart-tab {
  background: transparent;
  border: none;
  color: #a1a6a3;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 2px;
  white-space: nowrap;
}

.chart-tab.active {
  background: var(--gold);
  color: #111110;
}

.terminal-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.chart-price {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.chart-delta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}
.chart-delta.up { color: #34d399; }
.chart-delta.down { color: #f87171; }

.terminal-chart-box {
  position: relative;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 8px 6px 4px;
  margin-bottom: 12px;
}

#intradayChart {
  width: 100%;
  height: 112px;
  display: block;
}

.chart-tooltip {
  position: absolute;
  top: 6px;
  left: 8px;
  background: var(--gold);
  color: #111110;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  pointer-events: none;
}

/* Sentiment + Breadth Duo */
.terminal-duo {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.sentiment-card,
.breadth-dark-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 9px 10px;
}

.mini-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: #9da3a0;
  margin-bottom: 5px;
}

.sentiment-gauge {
  width: 100%;
  height: 54px;
  display: block;
}

.breadth-nums-dark {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.breadth-nums-dark .up { color: #34d399; }
.breadth-nums-dark .down { color: #f87171; }
.ceil-tag { font-style: normal; color: #c084fc; font-size: 9.5px; }

.breadth-bar-dark {
  display: flex;
  height: 5px;
  border-radius: 2px;
  overflow: hidden;
  gap: 1px;
  margin-bottom: 8px;
}

.flow-dark-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
  color: #b5bab7;
}
.flow-dark-row strong.up { color: #34d399; font-family: var(--font-mono); }

/* Compact Clickable Movers Grid */
.terminal-movers-head {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9da3a0;
  margin-bottom: 8px;
}

.movers-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.mover-pill {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 4px;
  padding: 7px 9px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.12s;
}

.mover-pill:hover {
  background: rgba(200, 162, 83, 0.14);
  border-color: rgba(200, 162, 83, 0.45);
  transform: translateY(-1px);
}

.mover-sym {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.mover-name {
  font-size: 10px;
  color: #9aa09d;
}

.mover-right {
  text-align: right;
  font-family: var(--font-mono);
}

.mover-price {
  font-size: 11.5px;
  font-weight: 600;
  color: #f3f1ec;
  display: block;
}

.mover-chg {
  font-size: 10.5px;
  font-weight: 600;
}
.mover-chg.up { color: #34d399; }
.mover-chg.down { color: #f87171; }

/* ==========================================================================
   MAIN EDITORIAL BODY
   ========================================================================== */
.main-body {
  padding-top: 34px;
  padding-bottom: 64px;
}

.editorial-band {
  margin-bottom: 44px;
}

.band-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 20px;
  gap: 12px;
}

.band-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.band-sub {
  font-size: 12px;
  color: var(--ink-muted);
}

.band-link {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0;
}
.band-link:hover { text-decoration: underline; }

.band-head-small {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--ink);
  padding-top: 8px;
  margin-bottom: 14px;
}

/* Bento News + 24/7 Wire */
.bento-news-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.wire-column {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 16px 18px;
}

.left-col-tabs {
  display: flex;
  gap: 14px;
}

.left-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.left-tab.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.live-pill-mini {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: #ffffff;
  background: #b91c1c;
  padding: 2px 6px;
  border-radius: 2px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
}
.timeline-item:last-child { border-bottom: none; padding-bottom: 0; }

.timeline-time {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  padding-top: 2px;
}
.timeline-item.hot .timeline-time { color: var(--accent-red); }

.timeline-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-blue);
  margin-bottom: 2px;
}

.timeline-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.36;
  color: var(--ink);
}
.timeline-item:hover .timeline-title { color: var(--accent-blue); }

.left-story {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}
.left-story:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* Story Card Base */
.kicker {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 5px;
}

.story-card { cursor: pointer; }
.story-card:hover .story-headline { color: var(--accent-blue); }

.story-headline {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  transition: color 0.15s;
}

.story-deck {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

/* Bento Macro Grid */
.bento-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.bento-photo-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s;
}

.bento-photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.07);
}

.bento-thumb {
  width: 100%;
  aspect-ratio: 16 / 9.5;
  object-fit: cover;
}

.bento-body {
  padding: 16px 18px 18px;
}

.bento-body .story-headline { font-size: 20px; }

.bento-sub-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bento-mini-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 14px 16px;
}
.bento-mini-card .story-headline { font-size: 16.5px; }

/* ==========================================================================
   INTERACTIVE WOW LAB: TREEMAP + 100 TRIỆU SIMULATOR
   ========================================================================== */
.lab-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
}

.lab-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
}

.lab-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.lab-card-title {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--ink);
}

.lab-card-sub {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.lab-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  background: var(--bg-muted);
  color: var(--ink);
  border: 1px solid var(--rule);
}

/* Proportional Treemap Grid */
.treemap-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 74px;
  gap: 6px;
  flex: 1;
}

.heat-tile {
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s, filter 0.14s;
}

.heat-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.heat-tile.span-lg { grid-column: span 3; grid-row: span 2; }
.heat-tile.span-md { grid-column: span 3; grid-row: span 1; }
.heat-tile.span-sm { grid-column: span 2; grid-row: span 1; }

.heat-tile.up-strong { background: linear-gradient(135deg, #0d5c3d, #137951); color: #ffffff; }
.heat-tile.up-mid { background: linear-gradient(135deg, #1c6e4b, #288a60); color: #ffffff; }
.heat-tile.up-light { background: #dcefe6; color: #0e4a31; border-color: #b7decb; }
.heat-tile.down-light { background: #f8e0e0; color: #8f1d1d; border-color: #ebc0c0; }

[data-theme="dark"] .heat-tile.up-light { background: #133528; color: #6ee7b7; border-color: #1f533f; }
[data-theme="dark"] .heat-tile.down-light { background: #3b1818; color: #fca5a5; border-color: #5c2525; }

.heat-name { font-size: 13px; font-weight: 700; line-height: 1.2; }
.heat-bottom { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-mono); }
.heat-pct { font-size: 14px; font-weight: 700; }
.heat-leader { font-size: 10.5px; opacity: 0.85; }

/* Asset Return Simulator */
.amount-pills {
  display: flex;
  gap: 4px;
  background: var(--bg-muted);
  padding: 3px;
  border-radius: 4px;
  flex-shrink: 0;
}

.amt-btn {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 3px;
}

.amt-btn.active {
  background: var(--obsidian);
  color: #ffffff;
}
[data-theme="dark"] .amt-btn.active {
  background: var(--gold);
  color: #111110;
}

.simulator-bars {
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1;
  justify-content: center;
}

.sim-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
  font-size: 13px;
}

.sim-name { font-weight: 700; color: var(--ink); }
.sim-tag { font-size: 11px; color: var(--ink-muted); margin-left: 6px; font-weight: 400; }

.sim-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
}
.sim-pct {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--up);
  margin-left: 6px;
}

.sim-track {
  height: 9px;
  background: var(--bg-muted);
  border-radius: 3px;
  overflow: hidden;
}

.sim-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.simulator-note {
  margin: 14px 0 0;
  font-size: 11px;
  color: var(--ink-muted);
}

/* ==========================================================================
   CHART OF THE DAY SHOWCASE
   ========================================================================== */
.cotd-showcase {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 28px;
  align-items: center;
}

.cotd-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cotd-tabs { display: flex; gap: 4px; }
.cotd-tab {
  background: var(--bg-muted);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
}
.cotd-tab.active {
  background: var(--obsidian);
  color: #ffffff;
  border-color: var(--obsidian);
}
[data-theme="dark"] .cotd-tab.active {
  background: var(--gold);
  color: #111110;
  border-color: var(--gold);
}

.cotd-big-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.22;
}

.cotd-subtitle {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.cotd-takeaway {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.52;
  color: var(--ink-2);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 8px 15px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 3px;
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--bg-page);
}

.cotd-right {
  background: var(--bg-page);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 14px 12px 8px;
}

#cotdSvg { width: 100%; height: 210px; display: block; }

/* ==========================================================================
   4-COL MARKETS + DARK OPINION BAND + PROPERTY/RATES + FOOTER
   ========================================================================== */
.four-col-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.four-col-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 18px;
  transition: transform 0.15s;
}
.four-col-card:hover { transform: translateY(-2px); }
.four-col-card .story-headline { font-size: 18px; }

/* Dark Opinion Signature Band */
.opinion-dark-band {
  background: var(--obsidian);
  color: #f3f1ec;
  border-radius: 6px;
  padding: 28px 30px;
  margin-bottom: 44px;
  border: 1px solid var(--obsidian-border);
}

.opinion-dark-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.opinion-dark-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  color: #ffffff;
}

.band-link-light {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 600;
}
.band-link-light:hover { text-decoration: underline; }

.opinion-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.opinion-dark-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.opinion-dark-card:hover {
  border-color: var(--gold);
  background: rgba(200, 162, 83, 0.08);
}

.opinion-author {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.opinion-headline {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.3;
  color: #ffffff;
}

.opinion-excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #b4b2aa;
}

/* Property + FX Rates */
.property-fx-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
  align-items: start;
}

.property-stories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.property-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 18px;
}
.property-card .story-headline { font-size: 18px; }

.rates-panel {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  border-radius: 5px;
  padding: 18px 20px;
}

.rates-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.rates-title { margin: 0 0 2px; font-family: var(--font-display); font-size: 18px; }
.rates-sub { margin: 0; font-size: 11.5px; color: var(--ink-muted); }

.rates-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rates-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding: 6px 0;
}
.rates-table td { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.rates-table .num { text-align: right; font-family: var(--font-mono); font-weight: 600; }
.rates-table .unit { font-size: 10.5px; color: var(--ink-muted); font-weight: 400; }
.rates-footnote { margin-top: 12px; font-size: 11.5px; color: var(--ink-muted); }

/* Bottom Strip: Popular + Newsletter */
.bottom-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.most-popular-box {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 24px;
}

.popular-list { margin: 0; padding: 0; list-style: none; counter-reset: pop; }
.popular-item {
  counter-increment: pop;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  cursor: pointer;
}
.popular-item:last-child { border-bottom: none; padding-bottom: 0; }
.popular-item::before {
  content: "0" counter(pop);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
}
.popular-title { font-family: var(--font-serif); font-size: 16px; font-weight: 600; line-height: 1.32; color: var(--ink); }
.popular-item:hover .popular-title { color: var(--accent-blue); }

.newsletter-box {
  background: var(--obsidian);
  color: #f3f1ec;
  border-radius: 6px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--obsidian-border);
}

.newsletter-title { margin: 4px 0 10px; font-family: var(--font-display); font-size: 26px; color: #ffffff; }
.newsletter-desc { margin: 0 0 18px; font-family: var(--font-serif); font-size: 16px; color: #c8c5bc; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 3px;
  font-size: 14px;
}
.newsletter-form input::placeholder { color: #9ea3a0; }
.newsletter-note { margin: 12px 0 0; font-size: 11.5px; color: #969b98; }

/* ==========================================================================
   V2 CATEGORY PAGES — 3 DISTINCT LAYOUT ARCHETYPES
   (1) Terminal Vertical  (2) Editorial Magazine  (3) Classic Opinion Journal
   ========================================================================== */

/* --- ARCHETYPE A: COMPACT OBSIDIAN TERMINAL VERTICAL --- */
.v2-term-ribbon {
  background: #0f1211;
  color: #f3f1ec;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  padding: 16px 0;
}

.v2-term-ribbon-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.v2-term-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.v2-term-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
}

.v2-term-kpis {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.v2-kpi-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 4px;
  padding: 6px 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.v2-kpi-pill .lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ba19e;
}
.v2-kpi-pill .val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}
.v2-kpi-pill .chg {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.v2-kpi-pill .chg.up { color: #34d399; }
.v2-kpi-pill .chg.down { color: #f87171; }

.v2-term-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 22px;
  margin-bottom: 34px;
  align-items: stretch;
}

.v2-photo-cover-card {
  position: relative;
  min-height: 410px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  border: 1px solid var(--rule);
}

.v2-photo-cover-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.v2-photo-cover-card:hover img { transform: scale(1.03); }

.v2-photo-cover-content {
  position: relative;
  z-index: 2;
  padding: 26px 28px;
}

.v2-photo-cover-content h2 {
  margin: 8px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 31px);
  line-height: 1.2;
  color: #ffffff;
}
.v2-photo-cover-card:hover .v2-photo-cover-content h2 { color: #f3dfb0; }

.v2-photo-cover-content p {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 15.5px;
  line-height: 1.48;
  color: #d7d4cc;
}

/* Filter Pills inside Stock Board */
.stock-filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.sf-pill {
  background: var(--bg-muted);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 3px;
}
.sf-pill.active {
  background: var(--obsidian);
  color: #ffffff;
  border-color: var(--obsidian);
}
[data-theme="dark"] .sf-pill.active {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
}

.spark-svg {
  width: 58px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

/* SJC 6M Mini Chart inside Gold/FX Panel */
.sjc-mini-chart-box {
  background: var(--bg-page);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 10px 10px 4px;
  margin-bottom: 14px;
}
.sjc-mini-chart-box svg {
  width: 100%;
  height: 92px;
  display: block;
}

/* --- ARCHETYPE B: SPLIT EDITORIAL MAGAZINE VERTICAL --- */
.v2-mag-cover {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 22px;
  cursor: pointer;
}

.v2-mag-photo {
  min-height: 360px;
  overflow: hidden;
}

.v2-mag-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.v2-mag-cover:hover .v2-mag-photo img { transform: scale(1.03); }

.v2-mag-editorial {
  padding: 30px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.v2-mag-editorial h1 {
  margin: 6px 0 12px;
  font-family: var(--font-display);
  font-size: clamp(23px, 2.4vw, 31px);
  line-height: 1.2;
  color: var(--ink);
}
.v2-mag-cover:hover .v2-mag-editorial h1 { color: var(--accent-blue); }

.v2-mag-editorial .story-deck {
  font-size: 16px;
  margin-bottom: 16px;
}

.v2-mag-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.v2-mag-kpi {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  border-radius: 4px;
  padding: 13px 16px;
}
.v2-mag-kpi .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); margin-bottom: 4px; }
.v2-mag-kpi .val { font-family: var(--font-mono); font-size: 21px; font-weight: 700; color: var(--ink); }
.v2-mag-kpi .chg { font-family: var(--font-mono); font-size: 11px; font-weight: 600; margin-top: 3px; }
.v2-mag-kpi .chg.up { color: var(--up); }
.v2-mag-kpi .chg.down { color: var(--down); }

.v2-full-data-band {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px 26px;
  margin-bottom: 34px;
}

.v2-macro-5grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.v2-macro-card {
  background: var(--bg-page);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: 14px;
}

/* Interactive Bank Rate Comparison Bars */
.bank-rate-bars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}

/* --- ARCHETYPE C: FLAGSHIP PRINT OPINION JOURNAL --- */
.v2-op-masthead {
  text-align: center;
  padding: 32px 0 24px;
  border-bottom: 3px double var(--ink);
  margin-bottom: 30px;
}

.v2-op-masthead h1 {
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(32px, 4vw, 48px);
  color: var(--ink);
  line-height: 1.1;
}

.v2-op-masthead p {
  margin: 0 auto;
  max-width: 660px;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink-2);
}

.v2-debate-spread {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  padding: 26px 30px;
  margin-bottom: 36px;
}

.v2-debate-spread-head {
  text-align: center;
  margin-bottom: 22px;
}

.v2-debate-spread-head h2 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.25;
}

.v2-debate-cols {
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  gap: 20px;
  align-items: center;
}

.v2-debate-vs {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--obsidian);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.v2-debate-card {
  background: var(--bg-page);
  border: 1px solid var(--rule-soft);
  border-radius: 5px;
  padding: 20px 22px;
}

.v2-author-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
}

.v2-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--obsidian);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.v2-essays-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.v2-essay-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 24px 26px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.16s, border-color 0.16s;
}

.v2-essay-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.v2-essay-headline {
  margin: 10px 0 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.v2-essay-card:hover .v2-essay-headline { color: var(--accent-blue); }

@media (max-width: 1120px) {
  .v2-term-hero-grid,
  .v2-mag-cover,
  .v2-debate-cols { grid-template-columns: 1fr; }
  .v2-macro-5grid { grid-template-columns: repeat(2, 1fr); }
  .v2-mag-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .bank-rate-bars,
  .v2-essays-grid,
  .v2-macro-5grid,
  .v2-mag-kpis { grid-template-columns: 1fr; }
}

/* ==========================================================================
   DEDICATED CATEGORY VERTICAL PAGES (8 BESPOKE SECTIONS)
   ========================================================================== */
.cat-hero {
  background: linear-gradient(180deg, #0e100f 0%, #161a18 100%);
  color: #f3f1ec;
  padding: 28px 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.cat-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.cat-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #9ca29f;
  margin-bottom: 8px;
}

.cat-breadcrumb button {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  padding: 0;
}
.cat-breadcrumb button:hover { text-decoration: underline; }

.cat-hero-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.cat-hero-sub {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 17px;
  color: #c7c4bc;
  max-width: 720px;
}

.btn-back-dark {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f3f1ec;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  white-space: nowrap;
}
.btn-back-dark:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #111110;
}

.cat-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat-kpi-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  padding: 13px 16px;
}

.cat-kpi-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a1a7a4;
  margin-bottom: 5px;
}

.cat-kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.15;
}

.cat-kpi-chg {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 4px;
}
.cat-kpi-chg.up { color: #34d399; }
.cat-kpi-chg.down { color: #f87171; }

/* Category Body Layout */
.cat-body {
  padding-top: 32px;
  padding-bottom: 64px;
}

.cat-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 26px;
  margin-bottom: 36px;
  align-items: start;
}

/* Category Lead Article Card */
.cat-lead-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.cat-lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.cat-lead-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cat-lead-body {
  padding: 22px 26px 24px;
}

.cat-lead-body .story-headline {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.3vw, 29px);
  line-height: 1.22;
}

.cat-lead-body .story-deck {
  font-size: 16px;
}

/* Bespoke Vertical Widget Panel */
.cat-widget-panel {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: 6px;
  padding: 20px 22px;
}

.cat-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.cat-widget-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--ink);
}

/* Data Tables inside Vertical Widgets */
.v-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.v-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding: 7px 6px;
}

.v-table td {
  padding: 9px 6px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
}

.v-table tr.clickable-row {
  cursor: pointer;
  transition: background 0.12s;
}
.v-table tr.clickable-row:hover {
  background: var(--bg-muted);
}

.v-table .num {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
}

.v-table .up { color: var(--up); }
.v-table .down { color: var(--down); }

/* Macro Progress Bars */
.macro-ind-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.macro-ind-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  margin-bottom: 4px;
}

.macro-ind-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
}

.macro-ind-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* FX & Gold Live Converter */
.fx-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.fx-field label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.fx-field input,
.fx-field select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  border-radius: 3px;
}

.fx-result-box {
  background: var(--obsidian);
  color: #ffffff;
  border-radius: 4px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.fx-result-label {
  font-size: 11px;
  color: #a5aba8;
}

.fx-result-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

/* Opinion Debate Widget */
.debate-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.debate-topic {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}

.debate-side {
  background: var(--bg-muted);
  border-left: 3px solid var(--up);
  padding: 12px 14px;
  border-radius: 3px;
}

.debate-side.side-b {
  border-left-color: var(--gold);
}

.debate-stance {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--up);
  margin-bottom: 3px;
}
.debate-side.side-b .debate-stance { color: var(--gold); }

.debate-author {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.debate-text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.48;
  color: var(--ink-2);
}

/* Category Articles Grid */
.cat-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.cat-article-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s;
}
.cat-article-card:hover { transform: translateY(-2px); }
.cat-article-card .story-headline { font-size: 19px; }

@media (max-width: 1120px) {
  .cat-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-main-grid { grid-template-columns: 1fr; }
  .cat-articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .cat-kpi-grid,
  .cat-articles-grid,
  .fx-calc-grid { grid-template-columns: 1fr; }
  .cat-hero-top { flex-direction: column; align-items: flex-start; }
}

/* Category Banner & Filtered View */
.category-banner {
  background: var(--bg-muted);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
}
.category-banner-inner { display: flex; justify-content: space-between; align-items: center; }
.category-banner h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 28px; }

.filtered-section {
  padding-top: 28px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.filtered-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 18px;
}
.filtered-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 3px; margin-bottom: 12px; }
.filtered-card .story-headline { font-size: 20px; }

/* Footer */
.site-footer {
  background: #0a0c0b;
  color: #b4b2aa;
  border-top: 2px solid var(--gold);
  padding: 42px 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-logo { height: 42px; border-radius: 4px; }
.footer-brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: #ffffff; }
.footer-tagline { margin: 4px 0 0; font-size: 12.5px; color: #909491; }

.footer-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { margin: 0 0 10px; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-link { background: none; border: none; padding: 0; font-size: 13px; color: #c4c2ba; text-align: left; }
.footer-link:hover:not(.muted) { color: #ffffff; text-decoration: underline; }
.footer-link.muted { color: #7f8380; cursor: default; }

.footer-bottom {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: #7d817e;
}
.footer-bottom p { margin: 0; }

/* ==========================================================================
   MODALS (ARTICLE READER, STOCK QUICK-VIEW, SEARCH, SUBSCRIBE)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 9, 0.72);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.article-modal {
  background: var(--bg-surface);
  color: var(--ink);
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.reading-progress-track { height: 3px; background: var(--rule-soft); width: 100%; }
.reading-progress-bar { height: 100%; width: 0%; background: var(--gold); transition: width 0.1s linear; }

.article-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-muted);
}

.modal-bar-left { display: flex; align-items: center; gap: 10px; }
.modal-mini-logo { height: 24px; border-radius: 2px; }
.modal-bar-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-blue); text-transform: uppercase; }
.modal-bar-actions { display: flex; align-items: center; gap: 8px; }

.modal-tool-btn {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
}
.modal-tool-btn.saved { border-color: var(--gold); color: var(--gold); }

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--ink-muted);
  padding: 0 6px;
}
.modal-close-btn:hover { color: var(--ink); }

.article-modal-body { overflow-y: auto; padding: 32px 44px 44px; }
.reader-title { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.reader-deck { margin: 0 0 18px; font-family: var(--font-serif); font-size: 19px; line-height: 1.48; color: var(--ink-2); }
.reader-byline { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-muted); margin-bottom: 22px; }
.reader-hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; margin-bottom: 8px; }
.photo-caption { font-size: 12px; color: var(--ink-muted); margin: 0 0 18px; }
.reader-content { font-family: var(--font-serif); font-size: 18px; line-height: 1.72; color: var(--ink); }
.reader-content p { margin: 0 0 18px; }
.reader-quote { margin: 24px 0; padding: 16px 22px; border-left: 3px solid var(--gold); background: var(--bg-muted); font-style: italic; font-size: 19px; }
.reader-key-facts { background: var(--bg-muted); border-left: 3px solid var(--accent-blue); padding: 16px 20px; margin: 20px 0; font-family: var(--font-sans); font-size: 13.5px; }
.reader-key-facts h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-blue); }
.reader-key-facts ul { margin: 0; padding-left: 18px; }

/* Stock Modal */
.stock-modal {
  background: var(--bg-surface);
  color: var(--ink);
  width: 100%;
  max-width: 580px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--gold);
  border-radius: 5px;
  overflow: hidden;
}
.stock-modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 18px 24px 14px; border-bottom: 1px solid var(--rule); background: var(--bg-muted); }
.stock-modal-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.stock-exchange-badge { background: var(--obsidian); color: var(--gold); font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 2px; }
.stock-sector-label { font-size: 11.5px; font-weight: 600; color: var(--ink-muted); }
.stock-modal-title { margin: 0; font-family: var(--font-display); font-size: 22px; }
.stock-modal-body { padding: 20px 24px 26px; overflow-y: auto; }
.stock-price-hero { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
.stock-big-price { font-family: var(--font-mono); font-size: 32px; font-weight: 700; }
.stock-big-unit { font-size: 12px; color: var(--ink-muted); margin-left: 4px; }
.stock-big-delta { font-family: var(--font-mono); font-size: 15px; font-weight: 700; }
.stock-big-delta.up { color: var(--up); }
.stock-big-delta.down { color: var(--down); }
.stock-metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stock-metric-cell { background: var(--bg-muted); border: 1px solid var(--rule-soft); padding: 9px 11px; border-radius: 3px; }
.stock-metric-label { font-size: 10px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.stock-metric-val { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.stock-metric-val.up { color: var(--up); }
.stock-metric-val.down { color: var(--down); }
.stock-related-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-top: 2px solid var(--ink); padding-top: 8px; margin: 0 0 10px; }
.stock-related-item { padding: 9px 0; border-bottom: 1px solid var(--rule-soft); cursor: pointer; }
.stock-related-item:last-child { border-bottom: none; }
.stock-related-hl { font-family: var(--font-serif); font-size: 15.5px; font-weight: 600; }
.stock-related-item:hover .stock-related-hl { color: var(--accent-blue); }

/* Search & Subscribe Modals */
.search-modal { background: var(--bg-surface); color: var(--ink); width: 100%; max-width: 680px; max-height: 80vh; display: flex; flex-direction: column; border-radius: 5px; overflow: hidden; }
.search-header { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rule); gap: 10px; }
.search-header input { flex: 1; border: none; background: transparent; color: var(--ink); font-size: 16px; outline: none; }
.search-results { overflow-y: auto; padding: 12px 18px 20px; }
.search-result-item { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); cursor: pointer; }
.search-result-item .story-headline { font-size: 17px; margin-bottom: 4px; }

.sub-modal { position: relative; background: var(--bg-surface); color: var(--ink); width: 100%; max-width: 520px; padding: 30px; border-top: 4px solid var(--gold); border-radius: 5px; }
.sub-close { position: absolute; top: 12px; right: 14px; }
.sub-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sub-logo { height: 38px; border-radius: 4px; }
.sub-brand h3 { margin: 0; font-family: var(--font-display); font-size: 21px; }
.sub-desc { font-size: 14px; color: var(--ink-2); margin: 0 0 18px; }
.sub-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.sub-plan { position: relative; border: 1px solid var(--rule); border-radius: 4px; padding: 14px; cursor: pointer; }
.sub-plan.active { border: 2px solid var(--gold); background: var(--bg-muted); }
.plan-badge { position: absolute; top: -9px; left: 10px; background: var(--gold); color: #111; font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 2px; text-transform: uppercase; }
.plan-name { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.plan-price { font-family: var(--font-mono); font-size: 17px; font-weight: 700; }
.plan-price span { font-size: 11px; font-weight: 400; color: var(--ink-muted); }
.plan-note { margin: 6px 0 0; font-size: 11.5px; color: var(--ink-muted); }
.sub-form { display: flex; flex-direction: column; gap: 10px; }
.sub-form input { padding: 10px 12px; border: 1px solid var(--rule); background: var(--bg-page); color: var(--ink); border-radius: 3px; font-size: 14px; }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--obsidian);
  color: #ffffff;
  border: 1px solid var(--gold);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  z-index: 1200;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1120px) {
  .hero-cover-grid,
  .bento-news-grid,
  .lab-grid,
  .cotd-showcase {
    grid-template-columns: 1fr;
  }
  .four-col-grid { grid-template-columns: repeat(2, 1fr); }
  .opinion-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .bento-cards-grid,
  .bento-sub-strip,
  .property-fx-grid,
  .property-stories,
  .bottom-strip,
  .footer-top,
  .footer-columns,
  .filtered-section,
  .bull-bear-strip {
    grid-template-columns: 1fr;
  }
  .bb-divider { display: none; }
  .hide-sm, .tape-status { display: none; }
  .article-modal-body { padding: 22px 20px 32px; }
  .newsletter-form { flex-direction: column; }
}

@media (max-width: 560px) {
  .four-col-grid,
  .stock-metrics-grid,
  .sub-plans { grid-template-columns: 1fr; }
  .treemap-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 70px; }
  .heat-tile.span-lg, .heat-tile.span-md, .heat-tile.span-sm { grid-column: span 1; grid-row: span 1; }
}
