/* Newsland: Exact Mockup Fidelity with Live Ticker Bar, Hero Carousel, and 3-Column Feed */

:root {
  --font-serif: "Charter", "Iowan Old Style", "Palatino", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  --max-width: 1340px;
  --accent-red: #d9441f;      /* Mockup signature terracotta / red-orange */
  --green-ticker: #00875a;    /* Green ticker delta */
  --red-ticker: #de350b;      /* Red ticker delta */
}

/* ========================================================
   THEMES: Paper (Default Mockup), Sepia, Slate, Night
   ======================================================== */

/* 1. Mockup Crisp Paper Ground (Default) */
html[data-theme="paper"] {
  --bg: #ffffff;
  --bg-subtle: #faf8f5;
  --ink: #111315;
  --ink-secondary: #484f54;
  --ink-muted: #727a80;
  --border: #e8e4db;
  --border-light: rgba(0, 0, 0, 0.04);
  --border-whisper: rgba(0, 0, 0, 0.045);
  --accent: #d9441f;
  --card-bg: #ffffff;
  --tag-bg: #f5f2ea;
  --drawer-bg: #ffffff;
}

/* 2. Kindle Sepia */
html[data-theme="sepia"] {
  --bg: #f5eedc;
  --bg-subtle: #eae0c8;
  --ink: #262019;
  --ink-secondary: #564b3e;
  --ink-muted: #807364;
  --border: #ded2ba;
  --border-light: #e8ddc7;
  --accent: #9e4320;
  --card-bg: #fcf6e8;
  --tag-bg: #e8dcc4;
  --drawer-bg: #f5eedc;
}

/* 3. reMarkable Slate */
html[data-theme="slate"] {
  --bg: #edf0f2;
  --bg-subtle: #e2e6ea;
  --ink: #0e1113;
  --ink-secondary: #3b4247;
  --ink-muted: #677077;
  --border: #d4d9de;
  --border-light: #e0e4e8;
  --accent: #1e3a57;
  --card-bg: #f8fafc;
  --tag-bg: #dfe4e8;
  --drawer-bg: #edf0f2;
}

/* 4. Kindle Night Ink */
html[data-theme="night"] {
  --bg: #121415;
  --bg-subtle: #1c1f21;
  --ink: #eae7e2;
  --ink-secondary: #a3a8ac;
  --ink-muted: #72797e;
  --border: #282c2f;
  --border-light: #1f2225;
  --accent: #e26a45;
  --card-bg: #191b1d;
  --tag-bg: #26292c;
  --drawer-bg: #16181a;
}

/* ========================================================
   GLOBAL RESETS
   ======================================================== */

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

svg {
  flex-shrink: 0;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.12s ease, color 0.12s ease;
}

html[data-font="sans"] body {
  font-family: var(--font-sans);
}

/* ========================================================
   TEXT SIZE SCALING: Small (A-), Default, Large (A+)
   ======================================================== */
html[data-size="sm"] body {
  font-size: 13px;
}
html[data-size="sm"] .hero-headline {
  font-size: 42px;
}
html[data-size="sm"] .hero-dek {
  font-size: 14.5px;
}
html[data-size="sm"] .card-title {
  font-size: 18px;
}
html[data-size="sm"] .card-snippet {
  font-size: 13.5px;
}

html[data-size="md"] body {
  font-size: 14px;
}
html[data-size="md"] .hero-headline {
  font-size: 50px;
}
html[data-size="md"] .card-title {
  font-size: 20.5px;
}
html[data-size="md"] .card-snippet {
  font-size: 15px;
}

html[data-size="lg"] body {
  font-size: 16px;
}
html[data-size="lg"] .hero-headline {
  font-size: 58px;
}
html[data-size="lg"] .hero-dek {
  font-size: 18.5px;
}
html[data-size="lg"] .card-title {
  font-size: 24px;
  line-height: 1.3;
}
html[data-size="lg"] .card-snippet {
  font-size: 17px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input {
  font: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ========================================================
   1. TOP NAVIGATION HEADER
   ======================================================== */

.header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  gap: 16px;
}

.brand-block {
  display: flex;
  align-items: center;
}

.wordmark {
  font-family: var(--font-sans);
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.8px;
  color: var(--ink);
  line-height: 1;
}

.ink-dot {
  color: var(--accent-red);
}

/* Centered Rounded Pill Search Box */
.search-pill-wrap {
  position: relative;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.search-pill-wrap input {
  width: 100%;
  padding: 7px 36px 7px 18px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.search-pill-wrap input:focus {
  border-color: var(--ink);
  background: var(--bg);
  outline: none;
}

.search-pill-ico {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
  display: block;
}

.search-clear {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--ink-muted);
}

/* Header Right: Date & Hamburger */
.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  font-family: var(--font-sans);
}

.header-date {
  font-size: 12px;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--ink);
  border-radius: 4px;
  transition: color 0.12s ease;
}

.hamburger-btn:hover {
  color: var(--accent-red);
}

/* ========================================================
   2. LIVE MARKET TICKER STRIP
   ======================================================== */

.ticker-strip {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 0;
  font-family: var(--font-sans);
}

.ticker-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 36px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ticker-inner::-webkit-scrollbar { display: none; }

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.ticker-val {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.ticker-pct {
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ticker-pct.up   { color: var(--green-ticker); }
.ticker-pct.down { color: var(--red-ticker); }

.ticker-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 16px;
}

/* Tipsheet-style Micro Range Ruler in Top Ticker Strip */
.ticker-ruler-wrap {
  display: inline-flex;
  align-items: center;
  margin-left: 5px;
  vertical-align: middle;
}

.ticker-ruler-track {
  display: inline-block;
  position: relative;
  width: 28px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
}

.ticker-ruler-band {
  position: absolute;
  left: 20%;
  width: 60%;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.08);
}

html[data-theme="slate"] .ticker-ruler-band,
html[data-theme="night"] .ticker-ruler-band {
  background: rgba(255, 255, 255, 0.14);
}

.ticker-ruler-dot {
  position: absolute;
  top: -2.5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-red);
  margin-left: -3.5px;
  box-shadow: 0 0 0 1px var(--bg);
}

.ticker-loading {
  display: block;
  padding: 2px 0;
  color: var(--ink-muted);
  font-size: 11px;
}

/* ========================================================
   3. SUBNAV: TRENDING + SECTION TABS
   ======================================================== */

.subnav-strip {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.subnav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-sans);
}

/* Trending Keywords */
.trending-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.trending-label {
  font-size: 12px;
  font-weight: 750;
  color: var(--accent-red);
  letter-spacing: -0.1px;
  border-bottom: 2px solid var(--accent-red);
  padding-bottom: 2px;
}

.trending-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.trend-pill {
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.12s ease;
  user-select: none;
}

.trend-pill:hover, .trend-pill.active {
  color: var(--accent-red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Section Tabs */
.tabs-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.sec-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tab-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 3px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.12s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  color: var(--ink);
  font-weight: 750;
  border-bottom-color: var(--ink);
}

.tab-badge {
  font-size: 9.5px;
  font-weight: 750;
  color: var(--accent-red);
  margin-left: 3px;
  vertical-align: top;
}

.subnav-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 4px;
}

/* Sector Filter Pills */
.sector-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.sector-pill {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 550;
  color: var(--ink-secondary);
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.sector-pill:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.sector-pill.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  font-weight: 650;
}

/* Market Movers Only Filter Button */
.movers-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.movers-filter-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.movers-filter-btn.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ========================================================
   3B. PRE-MARKET TRADING DESK BRIEF
   ======================================================== */

.premarket-brief {
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-subtle);
  padding: 10px 16px;
  margin-bottom: 18px;
  font-family: var(--font-sans);
}

.premarket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.premarket-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.premarket-tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.premarket-sep {
  color: var(--ink-muted);
}

.premarket-bias-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  padding: 2px 7px;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.premarket-bias-badge.up {
  color: var(--green-ticker);
  border-color: rgba(0, 135, 90, 0.4);
  background: rgba(0, 135, 90, 0.08);
}

.premarket-bias-badge.down {
  color: var(--red-ticker);
  border-color: rgba(222, 53, 11, 0.4);
  background: rgba(222, 53, 11, 0.08);
}

.premarket-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-memo-btn {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 2px 8px;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.copy-memo-btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.premarket-toggle {
  background: none;
  border: none;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.12s ease;
}

.premarket-toggle:hover {
  color: var(--ink);
}

.premarket-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.premarket-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.premarket-col-label {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.premarket-big-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.pm-val {
  font-size: 18px;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.pm-chg {
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.pm-chg.up   { color: var(--green-ticker); }
.pm-chg.down { color: var(--red-ticker); }

/* Tipsheet-style 52-Week Range Ruler in Indicated Open */
.pm-ruler-wrap {
  margin: 3px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-ruler-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 9px;
  color: var(--ink-muted);
}

.ruler-bound {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.ruler-pos {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--ink-secondary);
}

.pm-ruler-track {
  position: relative;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 1px 0;
}

.pm-ruler-band {
  position: absolute;
  left: 20%;
  width: 60%;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
}

html[data-theme="slate"] .pm-ruler-band,
html[data-theme="night"] .pm-ruler-band {
  background: rgba(255, 255, 255, 0.14);
}

.pm-ruler-dot {
  position: absolute;
  top: -2.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-red);
  margin-left: -4px;
  box-shadow: 0 0 0 1.5px var(--card-bg);
}

.pm-dma-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.dma-lbl {
  font-size: 9px;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dma-val {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.dma-pct {
  font-weight: 650;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.dma-pct.up   { color: var(--green-ticker); }
.dma-pct.down { color: var(--red-ticker); }

.dma-sep {
  color: var(--border);
}

.pm-sub {
  font-size: 10.5px;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.35;
}

.pm-flows-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.25;
}

.pm-breadth-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 3px 0 2px;
  font-size: 10.5px;
  flex-wrap: wrap;
}

.breadth-lbl {
  font-size: 9px;
  font-weight: 750;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.breadth-ratio {
  font-weight: 750;
  font-size: 10px;
  color: var(--ink);
}

.pm-sector-chips-compact {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.flow-name {
  font-weight: 700;
  color: var(--ink-secondary);
}

.flow-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.flow-val.up   { color: var(--green-ticker); }
.flow-val.down { color: var(--red-ticker); }

.flow-sep {
  color: var(--border);
}

.pm-overnight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px 10px;
  font-size: 11px;
  line-height: 1.3;
}

.cue-item {
  white-space: nowrap;
}

.cue-k {
  color: var(--ink-muted);
  font-weight: 500;
}

.cue-v {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

.cue-v.up   { color: var(--green-ticker); }
.cue-v.down { color: var(--red-ticker); }

.premarket-takeaway {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  line-height: 1.45;
  max-width: 980px;
}

.takeaway-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-red);
  flex-shrink: 0;
}

.takeaway-text {
  color: var(--ink-secondary);
}

@media (max-width: 680px) {
  .premarket-cols {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ========================================================
   4. LEAD STORY HERO CAROUSEL
   ======================================================== */

.content-body {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.hero-carousel {
  padding: 6px 0 20px;
  max-width: 980px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 26px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.hero-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  margin-bottom: 10px;
}

.hero-cat {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-dot {
  color: var(--ink-muted);
}

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

.hero-headline {
  font-family: var(--font-serif);
  font-size: 50px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--ink);
  margin-bottom: 12px;
  max-width: 960px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-font="sans"] .hero-headline {
  font-family: var(--font-sans);
  font-weight: 750;
  letter-spacing: -1px;
}

.hero-headline a:hover {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero-cluster-badge {
  font-size: 11px;
  font-weight: 750;
  color: var(--accent-red);
  letter-spacing: 0.04em;
}

.hero-intel {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.hero-intel-label {
  font-weight: 650;
  color: var(--ink-secondary);
}

.hero-impact {
  color: var(--ink);
  font-weight: 500;
}

.hero-sources {
  color: var(--ink-muted);
}

.hero-src-link {
  color: var(--ink-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-src-link:hover {
  color: var(--accent-red);
}

/* Typographic Carousel Counter: ←  1 / 5  → */
.hero-nav {
  margin-top: auto;
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-muted);
  user-select: none;
}

.hero-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--ink-secondary);
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.12s ease;
}

.hero-nav-arrow:hover {
  color: var(--ink);
}

.hero-counter {
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  font-size: 11.5px;
  color: var(--ink-muted);
  letter-spacing: 0.06em;
}

/* ========================================================
   5. 3-COLUMN FEED GRID (EXACT MOCKUP)
   ======================================================== */

.feed-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  align-items: start;
}

.feed-col {
  display: flex;
  flex-direction: column;
}

/* Feed Card Item */
.feed-card {
  display: flex;
  flex-direction: column;
  padding: 13px 0 15px;
  border-bottom: 1px solid var(--border-whisper);
  transition: opacity 0.12s ease;
}

.card-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  margin-bottom: 5px;
}

.card-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-tier {
  margin-left: 3px;
  font-size: 9px;
  font-weight: 750;
  color: var(--ink-muted);
  letter-spacing: 0.07em;
}

.card-tier.tier-driver {
  color: var(--accent-red);
}

.ranking-note {
  margin: 0 0 8px;
  color: var(--ink-muted);
  font: 11px/1.4 var(--font-sans);
}

.feedback-guide {
  margin: 0 0 10px;
  color: var(--ink-muted);
  font: 11px/1.5 var(--font-sans);
}

.feedback-guide strong {
  color: var(--ink-secondary);
  font-weight: 650;
}

.more-stories {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.more-stories > summary {
  width: fit-content;
  color: var(--ink-muted);
  font: 12px/1.4 var(--font-sans);
  cursor: pointer;
  user-select: none;
}

.more-stories > summary:hover {
  color: var(--ink);
}

.more-stories .feed-columns {
  margin-top: 8px;
}

.card-dot {
  color: var(--ink-muted);
}

.card-time {
  font-size: 11.5px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 20.5px;
  font-weight: 650;
  line-height: 1.32;
  color: var(--ink);
  letter-spacing: -0.15px;
  display: block;
  transition: color 0.12s ease;
}

html[data-font="sans"] .card-title {
  font-family: var(--font-sans);
  font-weight: 650;
  letter-spacing: -0.2px;
}

.card-title:hover {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-chevron {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--ink-muted);
  flex-shrink: 0;
  margin-top: 1px;
}

.card-snippet {
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-secondary);
  opacity: 0.82;
  font-weight: 400;
  margin-top: 5px;
}

.card-cluster-badge {
  font-size: 10px;
  font-weight: 750;
  color: var(--accent-red);
  letter-spacing: 0.04em;
}

.card-impact-row {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 5px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.impact-label {
  font-weight: 650;
  color: var(--ink-muted);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.impact-val {
  color: var(--ink-secondary);
  font-weight: 500;
}

.card-source-bar {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--ink-muted);
  margin-top: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-source-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.cluster-sources {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.source-link {
  font-size: 10px;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.12s ease;
}

.source-link:hover {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.source-sep {
  color: var(--border);
  font-size: 8px;
  user-select: none;
}

.related-toggle-btn {
  font-family: var(--font-sans);
  font-size: 9.5px;
  color: var(--accent-red);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.related-toggle-btn:hover {
  color: var(--ink);
}

.related-tray {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-whisper);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.related-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 11.5px;
}

.related-title {
  color: var(--ink-secondary);
  text-decoration: none;
  line-height: 1.35;
}

.related-title:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

.related-src {
  font-size: 9.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.card-source {
  min-width: 0;
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.feed-card:hover .card-actions,
.feed-card:focus-within .card-actions,
.card-actions:has(.is-useful) {
  opacity: 1;
}

@media (hover: none) {
  .card-actions {
    opacity: 0.65;
  }
}

.card-btn {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--ink-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: color 0.12s ease;
}

.card-btn:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.card-btn.is-useful {
  color: var(--accent-red);
  font-weight: 600;
}

.empty-feed {
  text-align: center;
  padding: 60px 0;
  color: var(--ink-muted);
  font-size: 15px;
}

/* Quiet Minimal Notice (No filled beige box) */
.notice-strip {
  padding: 0 0 16px;
  margin: 0;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.notice-dot {
  color: var(--accent-red);
  font-size: 8px;
  line-height: 1;
}

/* ========================================================
   6. CALENDAR & CATALYSTS VIEW
   ======================================================== */

.calendar-view {
  max-width: 980px;
  margin: 0;
}

.calendar-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.calendar-title-wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.calendar-heading {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--ink);
}

.calendar-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.45;
  margin-bottom: 14px;
  max-width: 720px;
}

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

/* Catalyst Filter Buttons */
.catalyst-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cat-filter-btn {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 550;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.cat-filter-btn:hover {
  color: var(--ink);
  border-color: var(--ink-muted);
}

.cat-filter-btn.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* Catalyst Cards Stream */
.events-stream {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.catalyst-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s ease;
}

.catalyst-card.is-today {
  border-left: 2px solid var(--accent-red);
  padding-left: 14px;
}

.catalyst-time-col {
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
}

.catalyst-time {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

.catalyst-date {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.today-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--accent-red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalyst-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catalyst-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-sans);
}

.catalyst-pill {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

.catalyst-pill.impact-high {
  color: var(--accent-red);
  background: rgba(184, 51, 42, 0.08);
}

.catalyst-pill.impact-med {
  color: var(--ink-muted);
  background: rgba(0, 0, 0, 0.04);
}

.catalyst-pill.cat-type {
  color: var(--ink-secondary);
  font-weight: 600;
}

.catalyst-geo {
  font-size: 10.5px;
  color: var(--ink-muted);
}

.catalyst-title {
  font-family: var(--font-serif);
  font-size: 18.5px;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: -0.15px;
  color: var(--ink);
  margin: 2px 0 0;
}

.catalyst-title a {
  color: inherit;
  text-decoration: none;
}

.catalyst-title a:hover {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalyst-watch {
  font-family: var(--font-sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
  background: var(--bg-hover);
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 2px solid var(--border);
  margin-top: 4px;
}

.watch-label {
  font-weight: 650;
  color: var(--ink);
  margin-right: 4px;
}

.catalyst-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-family: var(--font-sans);
}

.catalyst-assets {
  font-size: 11px;
  color: var(--ink-muted);
}

.assets-label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 9.5px;
  margin-right: 4px;
}

.asset-chip {
  color: var(--ink-secondary);
  font-weight: 500;
}

.catalyst-source-link {
  font-size: 11px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.catalyst-source-link:hover {
  color: var(--accent-red);
}

.calendar-footer {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.ext-link {
  color: var(--accent-red);
  text-decoration: underline;
}

/* ========================================================
   7. OFF-CANVAS SETTINGS DRAWER
   ======================================================== */

.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}

.drawer-panel {
  position: relative;
  width: min(380px, 90vw);
  height: 100%;
  background: var(--drawer-bg);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-family: var(--font-sans);
  z-index: 2;
}

.drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.drawer-close {
  font-size: 15px;
  color: var(--ink-muted);
  padding: 4px;
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.drawer-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.watch-badge {
  font-size: 11px;
  background: var(--tag-bg);
  color: var(--ink);
  padding: 1px 6px;
  border-radius: 10px;
}

.pill-group {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  background: var(--bg-subtle);
}

.pill-btn {
  flex: 1;
  text-align: center;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 550;
  color: var(--ink-muted);
  border-radius: 3px;
  transition: all 0.12s ease;
}

.pill-btn:hover {
  color: var(--ink);
}

.pill-btn.active {
  background: var(--card-bg);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 650;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-secondary);
}

.check-item input {
  accent-color: var(--ink);
}

.drawer-form {
  display: flex;
  gap: 6px;
}

.drawer-form input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  background: var(--bg);
  color: var(--ink);
}

.drawer-form input:focus {
  border-color: var(--ink);
  outline: none;
}

.drawer-btn {
  padding: 6px 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.drawer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 11px;
  color: var(--ink);
}

.chip button {
  color: var(--ink-muted);
}

.chip button:hover {
  color: var(--accent-red);
}

.quiet-action-link {
  font-size: 11px;
  color: var(--accent-red);
  text-decoration: underline;
  text-align: left;
  margin-top: 4px;
}

.drawer-hint {
  font-size: 11px;
  color: var(--ink-muted);
  line-height: 1.45;
  margin-top: 8px;
}

.refresh-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.refresh-action-btn:hover {
  color: var(--ink);
}

.sources-panel-btn {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  transition: all 0.12s ease;
}

.sources-panel-btn:hover {
  background: var(--bg);
  color: var(--ink);
}

/* ========================================================
   8. SOURCE HEALTH MODAL
   ======================================================== */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
}

.modal-box {
  position: relative;
  width: min(520px, 94vw);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 2;
  font-family: var(--font-sans);
}

.modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.modal-top h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.close-btn {
  font-size: 14px;
  color: var(--ink-muted);
}

.close-btn:hover {
  color: var(--ink);
}

.source-table {
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
}

.source-row {
  display: grid;
  grid-template-columns: 160px 80px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
}

.source-row a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
}

.source-ok { color: var(--green-ticker); font-weight: 600; }
.source-err { color: var(--accent-red); font-weight: 600; }
.source-time { color: var(--ink-muted); font-size: 10.5px; }

[hidden] {
  display: none !important;
}

/* ========================================================
   RESPONSIVE DESIGN
   ======================================================== */

@media (max-width: 960px) {
  .header-inner {
    grid-template-columns: 140px 1fr 140px;
  }
  .feed-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }
  .hero-carousel {
    min-height: auto;
  }
  .hero-headline {
    font-size: 30px;
  }
}

@media (max-width: 680px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .search-pill-wrap {
    grid-column: 1 / -1;
    max-width: 100%;
    order: 3;
  }
  .subnav-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .feed-columns {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
  .hero-headline {
    font-size: 26px;
  }
}

/* ========================================================
   8. INTELLIGENCE SUITE: IMPACT CHAIN, PIVOTS, AUTOPSY, X-RAY
   ======================================================== */

/* 8A. Impact Chain Transmission Row */
.card-impact-chain, .hero-impact-chain {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-secondary);
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
}

.hero-impact-chain {
  margin: 10px 0 4px;
  font-size: 12px;
}

.chain-catalyst {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.chain-group {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  flex-wrap: wrap;
}

.chain-arrow {
  font-weight: 700;
  font-size: 11px;
}

.chain-group.up .chain-arrow {
  color: var(--green-ticker);
}

.chain-group.down .chain-arrow {
  color: var(--red-ticker);
}

.chain-sep {
  color: var(--border);
  margin: 0 2px;
}

.company-tag {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px dotted var(--border);
  transition: all 0.12s ease;
  white-space: nowrap;
}

.hero-impact-chain .company-tag {
  font-size: 12px;
}

.company-tag:hover {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

/* Named Corporate Entities Row */
.card-companies-row, .hero-companies-row {
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-secondary);
  margin-top: 5px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.hero-companies-row {
  margin: 8px 0 2px;
  font-size: 12px;
}

.companies-label {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* 8B. Key Floor Pivots Strip in Desk Memo */
.pm-pivots-strip {
  margin-top: 8px;
  padding: 6px 0;
  background: transparent;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-sans);
}

.pivots-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.pivots-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pivots-title {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-red);
}

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

.pivots-grid {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pivot-index-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pvt-idx-name {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: var(--ink);
  min-width: 75px;
}

.pvt-cell {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  color: var(--ink-secondary);
}

.pvt-lbl {
  font-size: 9px;
  font-weight: 650;
  color: var(--ink-muted);
}

.pvt-num {
  font-weight: 600;
  color: var(--ink);
}

.pivot-mid .pvt-num {
  font-weight: 800;
  color: var(--accent-red);
}

.pvt-sep {
  color: var(--border);
}

.breadth-badge {
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--border-light);
}

.breadth-badge.up {
  color: var(--green-ticker);
  border-color: rgba(0, 135, 90, 0.35);
  background: rgba(0, 135, 90, 0.08);
}

.breadth-badge.down {
  color: var(--red-ticker);
  border-color: rgba(222, 53, 11, 0.35);
  background: rgba(222, 53, 11, 0.08);
}

.sector-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  padding: 0 4px;
  border-radius: 2px;
  border: 1px solid var(--border-light);
  background: var(--card-bg);
}

.sector-chip .chip-name {
  font-weight: 600;
  color: var(--ink-secondary);
}

.sector-chip .chip-pct {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sector-chip.up .chip-pct   { color: var(--green-ticker); }
.sector-chip.down .chip-pct { color: var(--red-ticker); }

/* 8D. Company Financial X-Ray Drawer */
.company-drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  justify-content: flex-end;
}

.company-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(2px);
}

.company-drawer-panel {
  position: relative;
  width: min(440px, 92vw);
  height: 100%;
  background: var(--drawer-bg);
  box-shadow: -6px 0 28px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-family: var(--font-sans);
  z-index: 2;
}

.company-drawer-header {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.company-head-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.xray-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

html[data-font="sans"] .xray-name {
  font-family: var(--font-sans);
}

.xray-subhead {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.xray-symbol {
  font-family: var(--font-mono);
  font-weight: 650;
  color: var(--accent-red);
}

.xray-sep {
  color: var(--border);
}

.company-close {
  font-size: 16px;
  color: var(--ink-muted);
  padding: 4px;
  cursor: pointer;
  transition: color 0.12s ease;
}

.company-close:hover {
  color: var(--ink);
}

.company-price-strip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.xray-price-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.xray-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.xray-chg {
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.xray-chg.up { color: var(--green-ticker); }
.xray-chg.down { color: var(--red-ticker); }

.xray-exchange-badge {
  font-size: 9.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  background: var(--tag-bg);
  padding: 2px 6px;
  border-radius: 3px;
}

.company-drawer-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* 52-Week Range Bar */
.xray-range-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.xray-range-labels {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--ink-muted);
}

.range-title {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

.range-sub strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.xray-range-track {
  position: relative;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: visible;
}

.xray-range-needle {
  position: absolute;
  top: -3px;
  width: 12px;
  height: 12px;
  background: var(--accent-red);
  border: 2px solid var(--drawer-bg);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: left 0.25s ease;
}

/* Financial Metrics Grid */
.xray-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.xray-metric-cell {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.metric-val {
  font-size: 14px;
  font-weight: 750;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* Coverage Wire */
.xray-news-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.xray-news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.xray-news-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.xray-news-count {
  font-size: 10.5px;
  color: var(--ink-muted);
}

.xray-stories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.xray-story-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-whisper);
}

.xray-story-link {
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.12s ease;
}

html[data-font="sans"] .xray-story-link {
  font-family: var(--font-sans);
}

.xray-story-link:hover {
  color: var(--accent-red);
  text-decoration: underline;
}

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

.xray-loading-text {
  font-size: 12px;
  color: var(--ink-muted);
  font-style: italic;
  padding: 8px 0;
}
