/* ═══════════════════════════════════════════════════════════════════
   THE MERIDIAN — Financial Intelligence Terminal
   Complete CSS redesign — terminal-inspired, data-dense, unique identity
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  /* Core palette — old-school terminal */
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-raised: #121212;
  --surface-hover: #1a1a1a;
  --border: #1f1f1f;
  --border-bright: #2a2a2a;
  --text-muted: #5c6370;
  --text: #b0b4bc;
  --text-strong: #e0e2e8;

  /* Accent — amber terminal */
  --accent: #e5c07b;
  --accent-dim: #b8995f;
  --accent-glow: rgba(229, 192, 123, 0.1);

  /* Market colors */
  --green: #4ec9b0;
  --green-dim: #3a9c87;
  --red: #f44747;
  --red-dim: #c03838;
  --amber: #e5c07b;
  --amber-dim: #b8995f;
  --purple: #a78bfa;

  /* Typography — ALL MONO */
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", monospace;
  --sans: "JetBrains Mono", "SF Mono", "Cascadia Code", monospace;
  --serif: "JetBrains Mono", "SF Mono", "Cascadia Code", monospace;

  /* Layout */
  --ticker-height: 38px;
  --max-width: 100%;
  --content-width: 920px;
  --side-padding: 16px;
  --radius: 0;

  /* Legacy aliases */
  --blue: var(--accent);
  --ink: var(--text-strong);
  --muted: var(--text-muted);
  --rule: var(--border);
  --faint: var(--surface);
  --reading: var(--text);
  --paper: var(--bg);
  --shadow: none;
}

/* ─── Extreme Flat Design: kill ALL depth ─── */
*, *::before, *::after {
  text-shadow: none !important;
  filter: none !important;
  transform: none !important;
  z-index: auto !important;
  transition: background-color 80ms linear, color 80ms linear, border-color 80ms linear !important;
}

/* Ticker scroll animation needs transform - override the override */
@keyframes tkr-scroll {
  from { transform: translateX(0) !important; }
  to { transform: translateX(-50%) !important; }
}
.tkr-track {
  animation: tkr-scroll 40s linear infinite !important;
}

/* Reading progress needs scaleX transform */
.reading-progress span {
  transform-origin: left !important;
}

/* Hover: just background change, nothing else */
*:hover {
  transform: none !important;
  scale: 1 !important;
}

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

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  padding-top: var(--ticker-height);
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ─── Global Terminal Overrides ─── */
* {
  font-family: var(--mono) !important;
}

* {
  background-image: none !important;
}

/* Kill all shadows/gradients/effects */
*, *::before, *::after {
  text-shadow: none !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 120ms ease;
}

a:hover {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-strong);
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════════════
   TICKER BAR — Bloomberg Terminal-style market ticker
   ═══════════════════════════════════════════════════════════════════ */

.market-ticker {
  position: fixed;
  z-index: auto;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: stretch;
  height: var(--ticker-height);
  border-bottom: 1px solid var(--accent-dim);
  background: var(--bg);
}

.tkr-label {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: 120px;
  height: 100%;
  padding: 0 14px;
  border-right: 1px solid var(--border-bright);
  background: var(--bg);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tkr-label::before {
  width: 6px;
  height: 6px;
  margin-right: 8px;
  background: var(--green);
  content: "";
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.tkr-scroll {
  display: flex;
  align-items: center;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.tkr-scroll::after {
  position: absolute;
  z-index: auto;
  top: 0;
  right: 0;
  width: 56px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--bg));
  content: "";
  pointer-events: none;
}

.tkr-track {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}

.tkr-scroll:hover .tkr-track {
  animation-play-state: paused;
}

.tkr-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 16px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tkr-sep {
  flex: 0 0 auto;
  color: var(--border-bright);
  font-weight: 400;
  user-select: none;
}

.tkr-sym {
  color: var(--text-strong);
  font-weight: 700;
  font-size: 12px;
}

.tkr-price {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.tkr-up, .dash-up, .pw-up {
  color: var(--green);
}

.tkr-down, .dash-down, .pw-down {
  color: var(--red);
}

.tkr-updated {
  color: var(--text-muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════════════
   MASTHEAD / NAV — compact header
   ═══════════════════════════════════════════════════════════════════ */

.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  padding: 10px 0 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.masthead > * {
  max-width: none;
  margin: 0;
  padding: 0 var(--side-padding);
}

.masthead-tagline {
  margin-left: auto;
  padding-right: var(--side-padding);
}

.logo, .footer-logo {
  display: inline-block;
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.06em;
  text-decoration: none;
  line-height: 1;
}

.logo::first-letter, .footer-logo::first-letter {
  color: var(--accent);
}

.tagline {
  display: inline-block;
  margin-left: 12px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: middle;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 120ms ease, border-color 120ms ease;
}

.nav a:hover, .nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text-strong);
}

/* ═══════════════════════════════════════════════════════════════════
   LAYOUT CONTAINER
   ═══════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  margin: 0;
  padding: 0 var(--side-padding);
}

/* ═══════════════════════════════════════════════════════════════════
   MARKET BAND — compact unified data strip (replaces old dashboard)
   ═══════════════════════════════════════════════════════════════════ */

.market-band {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 0;
  min-height: 48px;
}

.market-band::-webkit-scrollbar { display: none; }

.mb-section {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
}

.mb-divider {
  flex: 0 0 auto;
  width: 1px;
  background: var(--border-bright);
  align-self: stretch;
}

.mb-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  flex: 0 0 auto;
  min-width: 72px;
  padding: 7px 12px;
  border-right: 1px solid var(--border);
  text-decoration: none;
  transition: background 120ms ease;
}

.mb-item:hover {
  background: var(--surface-raised);
  color: inherit;
}

.mb-item:last-child { border-right: 0; }

.mb-sym {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.mb-price {
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  margin-top: 1px;
}

.mb-change {
  font-family: var(--mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.mb-change.up { color: var(--green); }
.mb-change.down { color: var(--red); }
.mb-na { color: var(--text-muted); }

.mb-empty {
  display: flex;
  align-items: center;
  padding: 14px var(--side-padding);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
}

/* Section label prefix for first item */
.mb-section::before {
  display: flex;
  align-items: center;
  padding: 0 8px 0 12px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mb-section:first-child::before { content: "MACROS"; }
.mb-section.mb-indices::before { content: "INDICES"; }
.mb-section.mb-mag7::before { content: "MAG 7"; }
.mb-section.mb-crypto::before { content: "CRYPTO"; }

/* Hide section labels on mobile */
@media (max-width: 700px) {
  .mb-section::before { display: none; }
  .mb-item { min-width: 64px; padding: 5px 8px; }
  .mb-price { font-size: 11px; }
}/* ═══════════════════════════════════════════════════════════════════
   HOMEPAGE HERO — full-bleed image with overlay text
   ═══════════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 380px;
  max-height: 500px;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 1px;
}

.hero-media {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,11,13,0.3) 0%, rgba(10,11,13,0.5) 40%, rgba(10,11,13,0.92) 100%);
  content: "";
  z-index: auto;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.hero-overlay {
  position: relative;
  z-index: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  max-height: 500px;
  padding: clamp(20px, 4vw, 48px) var(--side-padding) clamp(16px, 3vw, 28px);
}

.hero-cat,
.card-cat,
.art-cat {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  margin: 8px 0 6px;
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.08;
  max-width: 800px;
}

.hero-title a {
  color: var(--text-strong);
  text-shadow: none;
}

.hero-title a:hover {
  color: var(--accent);
}

.hero-deck,
.card-deck,
.art-deck,
.cat-item-deck {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}

.hero-deck {
  font-size: 15px;
  max-width: 680px;
  color: #b8bcc4;
  text-shadow: none;
}

.hero-meta,
.card-meta,
.art-meta,
.cat-item-meta {
  margin-top: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Make byline author name more prominent */
.hero-meta,
.card-meta,
.cat-item-meta {
  font-size: 10px;
}

.hero-meta .byline-author,
.card-meta .byline-author,
.cat-item-meta .byline-author,
.art-meta .byline-author {
  color: var(--accent);
  font-weight: 600;
}

/* Secondary featured row — 2 cards below hero */
.secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  margin-bottom: 16px;
}

.secondary-row .card-secondary {
  background: var(--surface);
  border: 0;
}

.secondary-row .card-secondary .card-media {
  aspect-ratio: 16 / 9;
}

.secondary-row .card-secondary .card-title {
  font-size: 17px;
}
}

/* ═══════════════════════════════════════════════════════════════════
   ARTICLE CARDS GRID — compact, data-dense
   ═══════════════════════════════════════════════════════════════════ */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  margin-bottom: 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  transition: background 140ms ease;
}

.card:hover {
  background: var(--surface-raised);
}

.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-raised);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transition: filter 200ms ease;
}

.card:hover .card-media img {
  filter: none;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 12px;
}

.card-title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.18;
}

.card-deck {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.card-meta {
  margin-top: auto;
  padding-top: 10px;
}

/* ═══════════════════════════════════════════════════════════════════
   READING PROGRESS BAR
   ═══════════════════════════════════════════════════════════════════ */

.reading-progress {
  position: fixed;
  z-index: auto;
  top: var(--ticker-height);
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left;
  transform: scaleX(var(--reading-progress, 0));
  background: var(--accent);
  transition: none;
}

/* ─── Topbar (logo) ─── */
.topbar {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.topbar-logo {
  padding: 8px 16px;
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-decoration: none;
}

/* ─── Breadcrumb ─── */
.breadcrumb-bar {
  padding: 4px 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.breadcrumb-bar a {
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════
   TERMINAL GRID — new homepage (full-page asset grid)
   ═══════════════════════════════════════════════════════════════════ */

.terminal-grid-page {
  padding: 0 0 48px;
}

.tg-stats-bar {
  display: flex;
  gap: 20px;
  padding: 6px var(--side-padding);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.tg-stat {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.tg-stat-label {
  font-weight: 700;
  opacity: 0.6;
}

.tg-stat-val {
  font-weight: 800;
  color: var(--text-strong);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.tg-stat-val.tg-up { color: var(--green); }
.tg-stat-val.tg-down { color: var(--red); }

.terminal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

/* Square grid tile: ticker/meta top, huge price bottom-right */
.tg-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  padding: 16px;
  background: var(--surface);
  text-decoration: none;
  border-left: none;
}

.tg-box.tg-box-bull {
  background: rgba(78, 201, 176, 0.06);
}

.tg-box.tg-box-bear {
  background: rgba(244, 71, 71, 0.06);
}

.tg-box:hover {
  background: var(--surface-hover);
}

.tg-box.tg-box-bull:hover {
  background: rgba(78, 201, 176, 0.12);
}

.tg-box.tg-box-bear:hover {
  background: rgba(244, 71, 71, 0.12);
}

.tg-box-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tg-box-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.tg-box:hover {
  background: var(--surface-hover);
  border-left-color: var(--accent);
}


.tg-box-sym {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-box-vol {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.tg-box-name {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tg-box-price {
  font-family: var(--mono);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tg-box-change {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tg-box-change.tg-up { color: var(--green); }
.tg-box-change.tg-down { color: var(--red); }
.tg-box-change.tg-na { color: var(--text-muted); }

.tg-box-badges {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.tg-box-sent {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border: 1px solid transparent;
}

.tg-box-sent.tg-sent-bull {
  color: var(--green);
  border-color: var(--green);
  background: rgba(0, 212, 170, 0.08);
}

.tg-box-sent.tg-sent-bear {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 75, 75, 0.08);
}

.tg-box-sent.tg-sent-neutral {
  color: var(--text-muted);
  border-color: var(--border);
}

.tg-box-news {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1px 4px;
  background: var(--surface-hover);
}

/* News card OG image + credibility badges */
.news-card {
  flex-direction: row;
}

/* OG image on RIGHT side */
.news-card-og {
  order: 2;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  overflow: hidden;
}

.news-card-og img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-content {
  order: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.news-cred {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  letter-spacing: 0.04em;
}

.news-cred-1 {
  background: var(--accent-glow);
  color: var(--accent);
}

.news-cred-2 {
  background: var(--surface-hover);
  color: var(--text-strong);
}

.news-cred-3, .news-cred-4, .news-cred-5 {
  background: var(--surface);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .terminal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tg-box { padding: 8px 10px; }
  .tg-box-sym { font-size: 12px; }
  .tg-box-price { font-size: 20px; }
  .tg-box-vol, .tg-box-name { display: none; }
  .tg-stats-bar { overflow-x: auto; gap: 12px; }
  .news-card-og { width: 60px; height: 60px; }
}

@media (min-width: 1200px) {
  .terminal-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ASSET GRID — homepage market monitor
   ═══════════════════════════════════════════════════════════════════ */

.asset-grid-section {
  padding: 0 var(--side-padding);
  margin-bottom: 24px;
}

.ag-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--accent-dim);
  margin-bottom: 0;
}

.ag-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ag-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.ag-view-all {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.ag-view-all:hover {
  color: var(--accent);
}

.ag-stats {
  display: flex;
  gap: 16px;
}

.ag-stat {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.ag-stat-label {
  font-weight: 700;
  opacity: 0.6;
}

.ag-stat-val {
  font-weight: 800;
  color: var(--text-strong);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.ag-chips {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.ag-chips::-webkit-scrollbar {
  display: none;
}

.ag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.ag-chip:hover {
  border-color: var(--accent-dim);
  color: var(--text-strong);
}

.ag-chip-active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

.ag-chip-count {
  opacity: 0.5;
  font-weight: 400;
}

.ag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-top: none;
}

.ag-grid-hidden {
  display: none;
}

.ag-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: var(--surface);
  text-decoration: none;
  transition: background 0.1s;
}

.ag-cell:hover {
  background: var(--surface-hover);
}

.ag-cell-sym {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ag-cell-price {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.ag-cell-change {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ag-cell-change.ag-up { color: var(--green); }
.ag-cell-change.ag-down { color: var(--red); }
.ag-cell-change.ag-na { color: var(--text-muted); }

.ag-cell-vol {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .ag-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .ag-cell {
    padding: 6px 8px;
  }
  .ag-cell-sym { font-size: 10px; }
  .ag-cell-price { font-size: 12px; }
  .ag-cell-change { font-size: 9px; }
  .ag-cell-vol { display: none; }
  .ag-stats { display: none; }
}

/* Sentiment & news badges on grid cells */
.ag-cell-badges {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.ag-sent-badge {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 4px;
  border: 1px solid transparent;
}

.ag-sent-badge.ag-sent-bull {
  color: var(--green);
  border-color: var(--green);
  background: rgba(0, 212, 170, 0.08);
}

.ag-sent-badge.ag-sent-bear {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 75, 75, 0.08);
}

.ag-sent-badge.ag-sent-neutral {
  color: var(--text-muted);
  border-color: var(--border);
}

.ag-news-badge {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 1px 4px;
  background: var(--surface-hover);
}

/* ═══════════════════════════════════════════════════════════════════
   ASSET DETAIL PAGE (/asset/:symbol)
   ═══════════════════════════════════════════════════════════════════ */

.asset-detail-page {
  padding: 20px 0 48px;
}

.asset-detail-header {
  padding: 0 var(--side-padding);
  margin-bottom: 24px;
}

.asset-detail-header-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.asset-detail-ticker {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--accent-dim);
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.asset-detail-name {
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 30px);
}

.asset-detail-sentiment {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1px solid transparent;
}

.asset-detail-sentiment.sent-bull {
  color: var(--green);
  border-color: var(--green);
  background: rgba(0, 212, 170, 0.08);
}

.asset-detail-sentiment.sent-bear {
  color: var(--red);
  border-color: var(--red);
  background: rgba(255, 75, 75, 0.08);
}

.asset-detail-sentiment.sent-neutral {
  color: var(--text-muted);
  border-color: var(--border);
}

/* Flat horizontal stat banner (label over value), spans full width */
.asset-detail-price-panel {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
}

.adp-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 130px;
  padding: 16px 20px;
  border-right: 1px solid var(--border);
}

.adp-row:last-child { border-right: none; }

.adp-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.adp-value {
  color: var(--text-strong);
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.adp-valrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.adp-change {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.adp-change.up { color: var(--green); }
.adp-change.down { color: var(--red); }

.asset-detail-news {
  padding: 0 var(--side-padding);
  margin-bottom: 24px;
}

.asset-detail-hl-link {
  display: inline-block;
  margin: 0 var(--side-padding) 48px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--accent-dim);
}

.asset-detail-hl-link:hover {
  background: var(--accent-glow);
}

/* News cards grid — square tiles */
.asset-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.news-card {
  display: flex;
  flex-direction: row;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  background: var(--surface);
}

.news-card.news-bull { background: rgba(78, 201, 176, 0.04); }
.news-card.news-bear { background: rgba(244, 71, 71, 0.04); }
.news-card.news-neutral { background: var(--surface); }
.news-card:hover { background: var(--surface-hover); }

/* De-emphasized listing/thin pages, ranked last */
.news-card-listing { opacity: 0.5; }
.news-card-listing:hover { opacity: 1; }

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

.news-card-sentiment {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.news-card.news-bull .news-card-sentiment { color: var(--green); }
.news-card.news-bear .news-card-sentiment { color: var(--red); }
.news-card.news-neutral .news-card-sentiment { color: var(--text-muted); }

.news-tier {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  background: var(--surface-hover);
  color: var(--text-muted);
}

.news-card-time {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
  white-space: nowrap;
}

.news-card-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: var(--text-strong);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title a {
  color: var(--text-strong);
  text-decoration: none;
}

.news-card-title a:hover {
  color: var(--accent);
}

.news-card-summary {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  margin-top: auto;
  padding-top: 8px;
}

.news-card-source {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .asset-news-grid {
    grid-template-columns: 1fr 1fr;
  }
  .news-card {
    padding: 12px;
    gap: 8px;
  }
  .news-card-og { width: 60px; height: 60px; }
  .asset-detail-price-panel { width: 100%; }
  .adp-row { flex: 1 1 40%; min-width: 40%; border-bottom: 1px solid var(--border); }
  .adp-value { font-size: 22px; }
}

@media (max-width: 460px) {
  .asset-news-grid { grid-template-columns: 1fr; }
  .news-card { aspect-ratio: auto; }
}

/* ═══════════════════════════════════════════════════════════════════
   ARTICLE PAGE — analyst report / terminal readout feel
   ═══════════════════════════════════════════════════════════════════ */

/* Cross-reference links in article body */
.art-body a.xref {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-dim);
  transition: color 0.15s, border-color 0.15s;
}

.art-body a.xref:hover {
  color: var(--text-strong);
  border-bottom-color: var(--text-strong);
}


.article-page {
  padding: 20px 0 48px;
}

.article-hero {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border: 0;
  background: var(--surface);
}

.article-hero__image,
.article-hero__shade {
  position: absolute;
  inset: 0;
}

.article-hero__image img,
.article-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-hero__image {
  filter: none;
}

.article-hero__shade {
  background:
    linear-gradient(180deg, rgba(10,11,13,0.1) 0%, rgba(10,11,13,0.92) 85%),
    linear-gradient(90deg, rgba(10,11,13,0.6), transparent 60%);
}

.article-hero__content {
  position: relative;
  z-index: auto;
  display: flex;
  min-height: 380px;
  max-width: none;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 4vw, 48px) var(--side-padding);
}

.article-hero__content h1 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.08;
}

.art-deck {
  max-width: none;
  color: #c2c5ca;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.35;
}

.art-meta {
  color: #a8acb4;
}

/* Article body — terminal readout */
.art-body {
  width: 100%;
  max-width: var(--content-width);
  margin: 28px var(--side-padding) 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.55;
}

.art-body > * {
  margin-top: 0;
  margin-bottom: 0.85em;
}

.art-body p {
  margin-bottom: 0.85em;
}

.art-body h2,
.art-body h3,
.art-body h4 {
  margin-top: 1.6em;
  margin-bottom: 0.5em;
  padding-left: 10px;
  border-left: 2px solid var(--accent);
  color: var(--text-strong);
  font-family: var(--mono);
  font-weight: 700;
}

.art-body h2 {
  font-size: 22px;
}

.art-body h3 {
  font-size: 18px;
  border-left-color: var(--amber);
}

.art-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 0.14em;
}

.art-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.art-body blockquote {
  margin: 1.2em 0;
  padding: 6px 0 6px 16px;
  border-left: 3px solid var(--accent);
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.art-body code {
  padding: 0.1em 0.3em;
  border: 1px solid var(--border-bright);
  background: var(--surface-raised);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.82em;
}

.art-body ul, .art-body ol {
  padding-left: 1.4em;
  margin-bottom: 0.85em;
}

.art-body li {
  margin-bottom: 0.3em;
}

/* Drop cap — keeps serif for visual flourish */
.drop-cap::first-letter {
  float: left;
  margin: 0.04em 0.08em 0 0;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 3.8em;
  font-weight: 700;
  line-height: 0.72;
}

/* ═══════════════════════════════════════════════════════════════════
   ARTICLE PRICE WIDGETS — inline data in articles
   ═══════════════════════════════════════════════════════════════════ */

.art-price-widgets {
  max-width: none;
  margin: 0;
  padding: 0 var(--side-padding);
}

.pw-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto 80px;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-family: var(--mono);
}

.pw-symbol {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.pw-info {
  min-width: 0;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.pw-price {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pw-change {
  margin-top: 1px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pw-spark {
  width: 80px;
  height: 28px;
}

.pw-unavailable {
  margin: 16px 0;
  padding: 10px 12px;
  border: 1px dashed var(--border-bright);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Sparkline */
.sparkline {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sparkline path,
.sparkline polyline {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

/* ═══════════════════════════════════════════════════════════════════
   ARTICLE SOURCES — compact source cards
   ═══════════════════════════════════════════════════════════════════ */

.art-sources {
  width: 100%;
  max-width: none;
  margin: 32px 0 0;
  padding: 16px var(--side-padding) 0;
  border-top: 1px solid var(--border);
}

.art-sources > h2 {
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.source-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.source-card {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 140ms ease;
}

.source-card:hover {
  border-color: var(--accent-dim);
}

.source-card__image {
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--surface-raised);
  position: relative;
}

.source-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.source-card__content {
  padding: 10px 12px;
}

.source-card__name,
.source-card__date {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.source-card__name {
  color: var(--accent);
}

.source-card__title {
  margin: 5px 0;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.source-card__desc {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.source-card--tone-0 { border-top: 2px solid var(--accent); }
.source-card--tone-1 { border-top: 2px solid var(--green); }
.source-card--tone-2 { border-top: 2px solid var(--amber); }
.source-card--tone-3 { border-top: 2px solid var(--red); }
.source-card--tone-4 { border-top: 2px solid var(--purple); }
.source-card--tone-5 { border-top: 2px solid #39c5cf; }

/* OG image / document icon */
.source-card__og-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-card--has-og .source-card__image::after {
  z-index: auto;
}

.source-card__document {
  width: 2.6rem;
  height: 2.6rem;
  opacity: 0.75;
}

.source-card__monogram {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  display: grid;
  width: 1.4rem;
  height: 1.4rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(20, 20, 18, 0.2);
  color: #fff;
  font: 600 0.62rem/1 var(--mono);
}

/* ═══════════════════════════════════════════════════════════════════
   CATEGORY PAGE — compact list view
   ═══════════════════════════════════════════════════════════════════ */

.category-page {
  padding: 20px 0 48px;
}

.category-page > h1 {
  margin-bottom: 16px;
  padding: 0 var(--side-padding);
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
}

.cat-list {
  border-top: 1px solid var(--border);
  list-style: none;
}

.cat-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  padding: 14px var(--side-padding);
  border-bottom: 1px solid var(--border);
  transition: background 120ms ease;
}

.cat-item:hover {
  background: var(--surface);
}

.cat-item-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}

.cat-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.cat-item-title {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.15;
}

.cat-item-deck {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.cat-item-meta {
  margin-top: 8px;
}

.cat-empty {
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════
   404 PAGE
   ═══════════════════════════════════════════════════════════════════ */

.not-found {
  display: grid;
  min-height: 50vh;
  place-items: center;
  padding: 40px 24px;
  text-align: center;
}

.not-found h1 {
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(60px, 12vw, 140px);
  letter-spacing: -0.08em;
  font-weight: 800;
}

.not-found p {
  color: var(--text-muted);
  font-size: 16px;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER — minimal, terminal-style
   ═══════════════════════════════════════════════════════════════════ */

.footer {
  padding: 20px var(--side-padding);
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 12px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer > * {
  max-width: none;
  margin: 0;
}

.footer-logo {
  font-size: 18px;
  margin-bottom: 6px;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

body.light .theme-toggle {
  background: #e8ecf0;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--accent);
}

.footer p {
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════
   LIGHT MODE — secondary theme
   ═══════════════════════════════════════════════════════════════════ */

body.light {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-raised: #eef1f5;
  --border: #d4d9e0;
  --border-bright: #c4c9d0;
  --text-muted: #5a6270;
  --text: #2a3038;
  --text-strong: #0e1116;
  --accent: #00a585;
  --accent-dim: #008870;
  --accent-glow: rgba(0, 165, 133, 0.12);
  --green: #1a9c5a;
  --red: #d63548;
  --amber: #c08e1f;
  /* Legacy aliases */
  --ink: var(--text-strong);
  --muted: var(--text-muted);
  --rule: var(--border);
  --faint: var(--surface);
  --reading: var(--text);
  --blue: var(--accent);
  --paper: var(--bg);
  --shadow: none;
  background: var(--bg);
  color: var(--text);
  color-scheme: light;
}

body.light .market-ticker,
body.light .tkr-label,
body.light .footer {
  background: #e8ecf0;
}

body.light .tkr-scroll::after {
  background: linear-gradient(90deg, transparent, #e8ecf0);
}

body.light .article-hero__shade {
  background:
    linear-gradient(180deg, rgba(10,11,13,0.05) 0%, rgba(10,11,13,0.82) 85%),
    linear-gradient(90deg, rgba(10,11,13,0.4), transparent 60%);
}

body.light .article-hero__content h1,
body.light .article-hero__content .art-cat,
body.light .article-hero__content .art-meta {
  color: #fff;
}

body.light .art-deck {
  color: #e8ebf0;
}

body.light .hero-media::after {
  background: linear-gradient(180deg, rgba(244,246,249,0.2) 0%, rgba(244,246,249,0.5) 40%, rgba(244,246,249,0.95) 100%);
}

body.light .hero-media img,
body.light .card-media img,
body.light .cat-item-media img {
  filter: none;
}

/* ═══════════════════════════════════════════════════════════════════
   LEGACY COMPATIBILITY — market-pulse, market-dashboard, etc.
   ═══════════════════════════════════════════════════════════════════ */

.market-pulse {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--ticker-height);
  padding: 6px var(--side-padding);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
}

.market-pulse__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: none;
  min-height: 2rem;
  margin: 0;
  padding: 0.35rem 0;
  font: 500 0.62rem/1 var(--mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}

.market-pulse__label {
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.ticker-label {
  color: var(--text-muted);
  font-weight: 500;
}

.ticker-item b {
  color: var(--text-strong);
  font-weight: 500;
}

.ticker-item i {
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

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

/* Home layout */
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.home-main {
  min-width: 0;
}

.market-sidebar {
  position: sticky;
  top: 2.5rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 0.75rem;
}

.market-dashboard,
.crypto-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.9rem 0.85rem;
}

.dash-title {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-strong);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
}

.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid var(--surface-raised);
}

.dash-row:last-of-type {
  border-bottom: none;
}

.dash-label {
  color: var(--text-muted);
  font: 500 0.62rem/1.2 var(--mono);
  letter-spacing: 0.02em;
}

.dash-value {
  font: 500 0.76rem/1.2 var(--mono);
  color: var(--text-strong);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dash-change {
  font: 500 0.58rem/1.2 var(--mono);
  min-width: 3.2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dash-change.up { color: var(--green); }
.dash-change.down { color: var(--red); }

.dash-updated {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font: 400 0.52rem/1.3 var(--mono);
  letter-spacing: 0.02em;
}

.crypto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.crypto-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0;
}

.crypto-label {
  color: var(--text-muted);
  font: 500 0.56rem/1.2 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.crypto-price {
  font: 600 0.82rem/1.2 var(--mono);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

/* Legacy article price widget */
.art-price-widget {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.8rem 0;
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
}

.art-price-widget .apw-label {
  font: 600 0.58rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.art-price-widget .apw-price {
  font: 600 0.92rem/1 var(--mono);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.art-price-widget .apw-change {
  font: 500 0.62rem/1 var(--mono);
  font-variant-numeric: tabular-nums;
}

.art-price-widget .apw-change.up { color: var(--green); }
.art-price-widget .apw-change.down { color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════
   MAG 7 STRIP — homepage Magnificent 7 movers
   ═══════════════════════════════════════════════════════════════════ */

.mag7-strip {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-left: 0;
  border-right: 0;
  background: var(--surface);
  margin-bottom: 12px;
}

.mag7-label {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 12px;
  border-right: 1px solid var(--border-bright);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mag7-cells {
  display: flex;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.mag7-cells::-webkit-scrollbar { display: none; }

.mag7-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  flex: 1 1 0;
  min-width: 80px;
  padding: 6px 12px;
  border-right: 1px solid var(--border);
  text-align: left;
}

.mag7-cell:last-child { border-right: 0; }

.mag7-sym {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mag7-price {
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.mag7-change {
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.mag7-change.up { color: var(--green); }
.mag7-change.down { color: var(--red); }
.mag7-na { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════
   COMPANY PAGES
   ═══════════════════════════════════════════════════════════════════ */

.company-page {
  padding: 20px 0 48px;
}

.company-header {
  padding: 0 var(--side-padding);
  margin-bottom: 24px;
}

.company-header-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.company-ticker {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--accent-dim);
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.company-name {
  font-family: var(--serif);
  font-size: clamp(24px, 3.5vw, 36px);
}

.company-price {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
}

.company-price-label {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.company-price-value {
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.company-price-change {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.company-price-change.up { color: var(--green); }
.company-price-change.down { color: var(--red); }
.company-price-na { color: var(--text-muted); font-size: 13px; font-weight: 400; }

.company-article-count {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 8px;
}

.company-articles {
  padding: 0 var(--side-padding);
}

/* ═══════════════════════════════════════════════════════════════════
   MAG 7 TRACKER PAGE
   ═══════════════════════════════════════════════════════════════════ */

.mag7-companies {
  padding: 0 var(--side-padding);
  margin-top: 32px;
}

.mag7-company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.mag7-company-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  text-decoration: none;
  transition: background 0.15s;
}

.mag7-company-card:hover {
  background: var(--surface-hover);
}

.mag7-company-ticker {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.mag7-company-name {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}


.mag7-page {
  padding: 20px var(--side-padding) 48px;
  max-width: var(--content-width);
  margin: 0 auto;
}

.mag7-page-header {
  margin-bottom: 20px;
}

.mag7-page-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 6px;
}

.mag7-page-deck {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.4;
}

.mag7-table {
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
}

.mag7-table-head,
.mag7-row {
  display: grid;
  grid-template-columns: 70px minmax(80px,1fr) 90px 90px 90px 90px 80px;
  gap: 4px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.mag7-row:last-child { border-bottom: 0; }
.mag7-row:hover { background: var(--surface-raised); }

.mag7-table-head {
  border-bottom: 2px solid var(--border-bright);
  background: #0e0f12;
}

.mag7-th-sym, .mag7-th-name, .mag7-th-price,
.mag7-th-change, .mag7-th-pct, .mag7-th-prev, .mag7-th-vol {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mag7-th-price, .mag7-th-change, .mag7-th-pct,
.mag7-th-prev, .mag7-th-vol {
  text-align: right;
}

.mag7-td-sym a {
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.mag7-td-sym a:hover {
  color: var(--accent-dim);
}

.mag7-td-name {
  color: var(--text);
  font-size: 12px;
}

.mag7-td-price,
.mag7-td-change,
.mag7-td-pct,
.mag7-td-prev,
.mag7-td-vol {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: right;
}

.mag7-td-price { color: var(--text-strong); font-weight: 700; }
.mag7-td-change.up, .mag7-td-pct.up { color: var(--green); }
.mag7-td-change.down, .mag7-td-pct.down { color: var(--red); }
.mag7-td-prev, .mag7-td-vol { color: var(--text-muted); }

.mag7-updated {
  margin-top: 8px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTOR PAGES
   ═══════════════════════════════════════════════════════════════════ */

.sector-page {
  padding: 20px 0 48px;
}

.sector-header {
  padding: 0 var(--side-padding);
  margin-bottom: 20px;
}

.sector-breadcrumb {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sector-breadcrumb a:hover { color: var(--accent); }

.sector-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 6px;
}

.sector-deck {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.4;
  max-width: 600px;
}

/* Sector stock strip */
.sector-stocks {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 var(--side-padding) 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.sector-stock-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 120px;
  min-width: 100px;
  padding: 8px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sector-stock-sym {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sector-stock-price {
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sector-stock-change {
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.sector-stock-change.up { color: var(--green); }
.sector-stock-change.down { color: var(--red); }

/* Sector crypto dashboard */
.sector-crypto-dash {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 var(--side-padding) 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.sector-crypto-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 120px;
  min-width: 100px;
  padding: 8px 12px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sector-crypto-sym {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sector-crypto-price {
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sector-crypto-change {
  font-family: var(--mono);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.sector-crypto-change.up { color: var(--green); }
.sector-crypto-change.down { color: var(--red); }

.sector-crypto-mcap {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.sector-articles {
  border-top: 1px solid var(--border);
}

.sector-section-title {
  padding: 14px var(--side-padding) 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   HYPERLIQUID ECOSYSTEM HUB
   ═══════════════════════════════════════════════════════════════════ */

.hl-page {
  padding: 20px 0 48px;
}

.hl-header {
  padding: 0 var(--side-padding);
  margin-bottom: 16px;
}

.hl-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 6px;
}

.hl-deck {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  max-width: 700px;
}

/* Ecosystem grid: main content + sidebar */
.hl-eco-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  padding: 0 var(--side-padding);
}

@media (max-width: 900px) {
  .hl-eco-grid {
    grid-template-columns: 1fr;
  }
}

/* Ecosystem stats bar */
.hl-eco-stats {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 14px;
}

.hl-stat {
  flex: 1;
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  text-align: center;
}

.hl-stat:last-child { border-right: 0; }

.hl-stat-label {
  display: block;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.hl-stat-value {
  display: block;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Tech specs row */
.hl-eco-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 14px;
}

.hl-eco-tech-item {
  padding: 8px 12px;
  border-right: 1px solid var(--border);
}

.hl-eco-tech-item:last-child { border-right: 0; }

.hl-eco-tech-label {
  display: block;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hl-eco-tech-value {
  display: block;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

/* Layer badges */
.hl-eco-layers {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.hl-eco-layer {
  padding: 4px 10px;
  border: 1px solid var(--accent-dim);
  background: var(--accent-glow);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

/* Category sidebar */
.hl-eco-sidebar {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 14px;
  align-self: start;
}

.hl-sidebar-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.hl-cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
  transition: color 120ms ease;
}

.hl-cat-link:last-child { border-bottom: 0; }
.hl-cat-link:hover { color: var(--accent); }

.hl-cat-link-name {
  font-weight: 600;
}

.hl-cat-link-count {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 11px;
  background: var(--surface-raised);
  padding: 1px 6px;
  border: 1px solid var(--border);
}

/* Category filter chips */
.hl-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.hl-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border-bright);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.hl-cat-chip:hover {
  border-color: var(--accent-dim);
  color: var(--text);
}

.hl-cat-chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.hl-cat-count {
  color: var(--text-muted);
  font-size: 9px;
  opacity: 0.7;
}

/* Asset table */
.hl-table {
  border: 1px solid var(--border);
  border-left: 0;
  border-right: 0;
  background: var(--surface);
  font-family: var(--mono);
  overflow-x: auto;
}

.hl-table-head,
.hl-row {
  display: grid;
  grid-template-columns: 80px minmax(100px,1fr) 120px 60px 90px 90px 80px;
  gap: 4px;
  align-items: center;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  min-width: 700px;
}

.hl-row:last-child { border-bottom: 0; }
.hl-row:hover { background: var(--surface-raised); }
.hl-row-featured { border-left: 2px solid var(--accent); }

.hl-table-head {
  border-bottom: 2px solid var(--border-bright);
  background: #0e0f12;
  position: sticky;
  top: 0;
}

.hl-th-sym, .hl-th-name, .hl-th-cat,
.hl-th-dex, .hl-th-price, .hl-th-change, .hl-th-vol {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hl-th-price, .hl-th-change, .hl-th-vol {
  text-align: right;
}

.hl-td-sym a {
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.hl-td-sym a:hover {
  color: var(--accent-dim);
}

.hl-td-name {
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hl-td-cat a {
  color: var(--text-muted);
  font-size: 10px;
}

.hl-td-cat a:hover { color: var(--accent); }

.hl-td-dex {
  color: var(--text-muted);
  font-size: 10px;
}

.hl-td-price,
.hl-td-change,
.hl-td-vol {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: right;
}

.hl-td-price { color: var(--text-strong); font-weight: 700; }
.hl-td-change.up { color: var(--green); }
.hl-td-change.down { color: var(--red); }
.hl-td-vol { color: var(--text-muted); }

/* Individual asset page */
.hl-asset-page {
  padding: 20px 0 48px;
}

.hl-asset-header {
  padding: 0 var(--side-padding);
  margin-bottom: 20px;
}

.hl-asset-title {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  margin-bottom: 4px;
}

.hl-asset-symbol {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hl-asset-grid {
  display: grid;
  grid-template-columns: minmax(280px, 320px) 1fr;
  gap: 24px;
  padding: 0 var(--side-padding);
  margin-bottom: 28px;
}

.hl-asset-info {
  border: 1px solid var(--border);
  background: var(--surface);
  align-self: start;
}

.hl-asset-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
}

.hl-asset-row:last-child { border-bottom: 0; }

.hl-asset-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hl-asset-value {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hl-asset-value a { color: var(--accent); }
.hl-asset-value.up { color: var(--green); }
.hl-asset-value.down { color: var(--red); }

.hl-asset-price {
  font-size: 18px !important;
}

/* Profile content (rendered markdown) */
.hl-asset-profile {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  max-width: 700px;
}

.hl-asset-profile h1 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 20px 0 10px;
}

.hl-asset-profile h1:first-child { margin-top: 0; }

.hl-asset-profile h2 {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  margin: 20px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text-strong);
}

.hl-asset-profile h3 {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--accent);
}

.hl-asset-profile p { margin-bottom: 12px; }

.hl-asset-profile strong { color: var(--text-strong); }

.hl-asset-profile ul {
  margin: 8px 0 14px 0;
  padding-left: 20px;
}

.hl-asset-profile li {
  margin-bottom: 4px;
  list-style: disc;
}

.hl-md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 14px;
  font-family: var(--mono);
  font-size: 12px;
}

.hl-md-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  color: var(--text);
}

.hl-md-table tr:first-child td {
  background: var(--surface-raised);
  font-weight: 700;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 700px) {
  .hl-asset-grid {
    grid-template-columns: 1fr;
  }

  .hl-table-head,
  .hl-row {
    grid-template-columns: 70px 1fr 80px 70px;
  }

  .hl-th-cat, .hl-th-dex,
  .hl-td-cat, .hl-td-dex {
    display: none;
  }

  .hl-eco-stats {
    flex-wrap: wrap;
  }

  .hl-stat {
    flex: 1 1 50%;
    border-bottom: 1px solid var(--border);
  }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — desktop first, graceful mobile
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 960px) {
  .hero {
    min-height: 320px;
  }

  .hero-overlay {
    min-height: 320px;
  }

  .secondary-row {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .source-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .market-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .market-sidebar > * {
    flex: 1 1 14rem;
  }

  .mag7-table-head,
  .mag7-row {
    grid-template-columns: 60px 1fr 80px 80px;
  }

  .mag7-th-prev, .mag7-th-vol,
  .mag7-td-prev, .mag7-td-vol {
    display: none;
  }
}

@media (max-width: 700px) {
  :root {
    --ticker-height: 32px;
    --side-padding: 12px;
  }

  body {
    font-size: 13px;
  }

  .tkr-label {
    width: 90px;
    padding: 0 10px;
    font-size: 10px;
  }

  .tkr-item {
    gap: 4px;
    padding: 0 10px;
    font-size: 11px;
  }

  .tkr-sym {
    font-size: 11px;
  }

  .container {
    width: 100%;
    padding: 0 12px;
  }

  .masthead > * {
    padding: 0 12px;
  }

  .tagline {
    display: none;
  }

  .hero {
    min-height: 280px;
  }

  .hero-overlay {
    min-height: 280px;
    padding: 16px 12px 18px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-deck {
    font-size: 14px;
  }

  .grid,
  .source-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-page {
    padding-top: 12px;
  }

  .article-hero {
    min-height: 320px;
  }

  .article-hero__content {
    min-height: 320px;
    padding: 20px 16px;
  }

  .article-hero__content h1 {
    font-size: 30px;
  }

  .art-body {
    margin-top: 20px;
    font-size: 15px;
  }

  .art-body h2 { font-size: 19px; }
  .art-body h3 { font-size: 16px; }

  .art-body blockquote {
    padding-left: 12px;
    font-size: 15px;
  }

  .art-sources {
    padding: 12px 12px 0;
  }

  .source-card-grid {
    grid-template-columns: 1fr;
  }

  .pw-inner {
    grid-template-columns: auto 1fr auto;
    gap: 6px 10px;
    padding: 8px 10px;
  }

  .pw-info {
    grid-column: 2 / -1;
  }

  .pw-spark {
    display: none;
  }

  .cat-item {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
  }

  .cat-item-title {
    font-size: 19px;
  }

  .cat-item-deck {
    display: none;
  }

  .market-sidebar {
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .tkr-label::before {
    display: none;
  }

  .tkr-label {
    width: 56px;
    justify-content: center;
    padding: 0;
    font-size: 0;
  }

  .tkr-label::after {
    color: var(--accent);
    content: "M";
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 800;
  }

  .hero {
    min-height: 220px;
  }

  .hero-overlay {
    min-height: 220px;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-deck {
    display: none;
  }

  .card-body {
    padding: 10px;
  }

  .card-title {
    font-size: 16px;
  }

  .article-hero,
  .article-hero__content {
    min-height: 280px;
  }

  .article-hero__content h1 {
    font-size: 26px;
  }

  .art-deck {
    font-size: 14px;
  }

  .pw-inner {
    grid-template-columns: 1fr auto;
    padding: 8px;
  }

  .pw-symbol {
    font-size: 12px;
  }

  .pw-info {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .cat-item {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
  }

  .cat-item-title {
    margin-top: 0;
    font-size: 16px;
  }

  .cat-item-meta {
    margin-top: 6px;
    font-size: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   ARTICLE TAGS — ticker & asset chips
   ═══════════════════════════════════════════════════════════════════ */

.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 16px var(--side-padding);
  max-width: var(--content-width);
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.article-tags-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 4px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border-bright);
  text-decoration: none;
  transition: all 0.15s;
}

.tag-chip:hover {
  color: var(--text-strong);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.tag-chip--hl {
  color: var(--purple);
}

.tag-chip--hl:hover {
  border-color: var(--purple);
  background: rgba(167, 139, 250, 0.1);
}
