/* ==========================================================================
   WORLD STOCK NEWS - FINANCIAL INTELLIGENCE & STOCK MARKET TERMINAL
   State-of-the-Art Obsidian/Polar Institutional Design System
   Optimized for Desktop Financial Terminals & Mobile Native-App Experience
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Dark Obsidian Mode (Default) */
  --bg-primary: #070a12;
  --bg-secondary: #0d121f;
  --bg-surface: rgba(17, 24, 39, 0.78);
  --bg-surface-elevated: rgba(26, 36, 56, 0.92);
  --bg-glass: rgba(15, 23, 42, 0.72);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: #38bdf8;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #070a12;

  --accent-cyan: #0284c7;
  --accent-blue: #38bdf8;
  --accent-indigo: #6366f1;
  --bullish: #10b981;
  --bullish-bg: rgba(16, 185, 129, 0.14);
  --bearish: #f43f5e;
  --bearish-bg: rgba(244, 63, 94, 0.14);
  --neutral: #eab308;
  --neutral-bg: rgba(234, 179, 8, 0.14);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

  /* Standard Spacing Scale */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius Tokens */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(56, 189, 248, 0.22);
  --shadow-bullish: 0 0 20px rgba(16, 185, 129, 0.25);

  /* Animation Timings */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.14);
  --border-focus: #0284c7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(2, 132, 199, 0.15);

  color-scheme: light;
}

/* ==========================================================================
   BASE RESETS & ACCESSIBILITY
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

section[id], div[id], article[id] {
  scroll-margin-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

body.drawer-open {
  overflow: hidden;
  touch-action: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
  font-size: 1rem;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

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

.tabular-nums {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 3.5vw, 2rem);
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   TOP TICKER MARQUEE
   ========================================================================== */
.ticker-ribbon {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
  z-index: 40;
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.4);
}

.ticker-label .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #fff;
  animation: beaconPulse 1.6s infinite ease-in-out;
}

.ticker-track {
  display: flex;
  align-items: center;
  animation: scrollTicker 48s linear infinite;
  padding-left: 130px;
}

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

@keyframes scrollTicker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-right: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.ticker-item:hover {
  background-color: var(--border-subtle);
}

.ticker-symbol {
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ticker-price {
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.ticker-change {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.ticker-change.pos, .pos {
  color: var(--bullish);
  background-color: var(--bullish-bg);
}

.ticker-change.neg, .neg {
  color: var(--bearish);
  background-color: var(--bearish-bg);
}

.neutral {
  color: var(--neutral);
  background-color: var(--neutral-bg);
}

/* ==========================================================================
   NAVIGATION HEADER - INSTITUTIONAL TERMINAL DESIGN
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: all var(--transition-normal);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  gap: 1rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.45);
  position: relative;
  flex-shrink: 0;
}

.brand-badge {
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 2px;
}

/* Live Market Status Pill */
.market-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bullish);
  background: var(--bullish-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.live-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--bullish);
  box-shadow: 0 0 8px var(--bullish);
  animation: beaconPulse 1.8s infinite;
}

@keyframes beaconPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Nav Links Menu (Desktop Floating Pill) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  background: rgba(13, 18, 31, 0.55);
  padding: 4px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .nav-links {
  background: rgba(241, 245, 249, 0.8);
}

.nav-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.search-box-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.84rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 38px;
}

.search-box-btn:hover {
  border-color: var(--border-focus);
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.search-kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.theme-btn, .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-btn:hover, .icon-btn:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
  transform: rotate(15deg);
}

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
  background: var(--border-subtle);
  transform: scale(0.95);
}

/* ==========================================================================
   MOBILE APP SLIDE-OUT DRAWER & BACKDROP
   ========================================================================== */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open {
  display: block;
  opacity: 1;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -8px 0 36px rgba(0, 0, 0, 0.55);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

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

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.drawer-close-btn:hover, .drawer-close-btn:active {
  color: var(--bearish);
  background: var(--bearish-bg);
}

.drawer-body {
  padding: 1.25rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-search {
  margin-bottom: 0.5rem;
}

.drawer-section-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.mobile-nav-item a:hover, .mobile-nav-item a.active {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.mobile-nav-item a .nav-icon {
  font-size: 1.1rem;
}

.mobile-nav-footer {
  padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-meta-info {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   MOBILE APP-STYLE BOTTOM NAVIGATION BAR (DOCK)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--border-subtle);
  z-index: 95;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
}

.mobile-bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  transition: all var(--transition-fast);
  user-select: none;
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

.bottom-nav-item.active {
  color: var(--accent-blue);
}

.bottom-nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: var(--radius-full);
}

.bottom-nav-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(-1px);
}

/* ==========================================================================
   BUTTONS & COMMON UI ATOMS
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-outline:hover {
  background: var(--border-subtle);
  border-color: var(--text-secondary);
}

/* ==========================================================================
   BREAKING NEWS LIVE BAR
   ========================================================================== */
.breaking-bar {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12), rgba(244, 63, 94, 0.05));
  border-bottom: 1px solid rgba(239, 68, 68, 0.22);
  padding: 8px 0;
  font-size: 0.84rem;
}

.breaking-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.breaking-tag {
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  flex-shrink: 0;
}

.breaking-headline {
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-grow: 1;
}

.breaking-headline a:hover {
  text-decoration: underline;
  color: var(--accent-blue);
}

.api-source-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.api-source-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bullish);
}

/* ==========================================================================
   MARKET TELEMETRY CARDS (TOP INDICES & TICKERS)
   ========================================================================== */
.market-telemetry {
  padding: clamp(1.25rem, 2.5vw, 2rem) 0;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.telemetry-card {
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(0.9rem, 2vw, 1.25rem);
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.telemetry-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.telemetry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.5rem;
}

.telemetry-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.telemetry-badge {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  flex-shrink: 0;
}

.telemetry-price {
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
}

.telemetry-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.sparkline-canvas {
  width: 100%;
  height: 36px;
  margin-top: 0.5rem;
}

/* ==========================================================================
   HERO BREAKING ARTICLE + MARKET OVERVIEW SECTION
   ========================================================================== */
.hero-section {
  padding-bottom: clamp(2rem, 3.5vw, 3rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.featured-story {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.featured-story:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--shadow-lg);
}

.story-media-wrap {
  position: relative;
  width: 100%;
  height: clamp(220px, 35vw, 360px);
  overflow: hidden;
  background: #111827;
}

.story-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-story:hover .story-image {
  transform: scale(1.04);
}

.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0) 30%, rgba(7, 10, 18, 0.95) 100%);
}

.story-floating-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sentiment-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.category-pill {
  background: rgba(2, 132, 199, 0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.story-content {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.story-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.story-title {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

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

.story-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 10px;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.author-title {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.read-btn {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.read-btn:hover {
  gap: 10px;
}

/* ==========================================================================
   SIDEBAR & REAL-TIME WIDGETS
   ========================================================================== */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 2vw, 1.4rem);
  box-shadow: var(--shadow-sm);
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.widget-title {
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.widget-title svg {
  color: var(--accent-blue);
}

/* Fear and Greed Meter */
.fear-greed-wrap {
  text-align: center;
  padding: 0.5rem 0;
}

.gauge-canvas {
  width: 100%;
  max-width: 260px;
  height: 130px;
  margin: 0 auto;
  display: block;
}

.gauge-score-wrap {
  margin-top: 4px;
  position: relative;
}

.gauge-score {
  font-size: 2.3rem;
  font-weight: 900;
  font-family: var(--font-mono);
  line-height: 1;
}

.gauge-label {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.gauge-history {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.history-item {
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-item .label {
  color: var(--text-muted);
}

.history-item .value {
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Market Movers Mini List */
.movers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mover-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.mover-row:hover {
  background: var(--border-subtle);
}

.mover-info {
  display: flex;
  flex-direction: column;
}

.mover-symbol {
  font-weight: 800;
  font-size: 0.9rem;
}

.mover-name {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mover-values {
  text-align: right;
}

.mover-price {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.mover-change {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* ==========================================================================
   INTERACTIVE STOCK CHART EXPLORER
   ========================================================================== */
.chart-section {
  padding: clamp(2rem, 3.5vw, 3rem) 0;
}

.chart-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-md);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.chart-ticker-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.chart-ticker-name {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
}

.chart-ticker-full {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.chart-price-display {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  font-weight: 900;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.live-stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #10b981;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.live-beacon-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
  animation: liveBeaconPulse 1.4s infinite ease-in-out;
}

@keyframes liveBeaconPulse {
  0% { transform: scale(0.85); opacity: 0.7; box-shadow: 0 0 2px #10b981; }
  50% { transform: scale(1.35); opacity: 1.0; box-shadow: 0 0 10px #10b981; }
  100% { transform: scale(0.85); opacity: 0.7; box-shadow: 0 0 2px #10b981; }
}

.flash-up {
  animation: flashGreen 0.7s ease-out;
}
.flash-down {
  animation: flashRed 0.7s ease-out;
}

@keyframes flashGreen {
  0% { background: rgba(16, 185, 129, 0.35); color: #10b981; }
  100% { background: transparent; }
}
@keyframes flashRed {
  0% { background: rgba(244, 63, 94, 0.35); color: #f43f5e; }
  100% { background: transparent; }
}

.pill-group {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.pill-btn {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.pill-btn.active, .pill-btn:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.chart-container {
  position: relative;
  width: 100%;
  height: clamp(300px, 46vh, 440px);
  background: rgba(11, 16, 28, 0.4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

#mainStockCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 10;
  display: none;
  white-space: nowrap;
}

.chart-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.stat-item .val {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* ==========================================================================
   BLOG / ARTICLES FEED SECTION
   ========================================================================== */
.articles-section {
  padding: clamp(2rem, 3.5vw, 3.5rem) 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: var(--shadow-md);
}

.card-media {
  position: relative;
  width: 100%;
  height: clamp(180px, 28vw, 220px);
  overflow: hidden;
  background: #111827;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-img {
  transform: scale(1.05);
}

.card-body {
  padding: clamp(1.1rem, 2vw, 1.4rem);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.card-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tickers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.ticker-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 3px 8px;
  color: var(--accent-blue);
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE TOOLS SECTION (CALCULATOR & ECONOMIC CALENDAR)
   ========================================================================== */
.tools-section {
  padding: clamp(2rem, 3.5vw, 3.5rem) 0;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.calc-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.calc-results-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.calc-stat-val {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--bullish);
}

/* Economic Calendar & Responsive Table */
.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.calendar-table th {
  text-align: left;
  padding: 10px 8px;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.calendar-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.impact-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.impact-high {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}

.impact-med {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
}

/* ==========================================================================
   SEO FAQ SECTION
   ========================================================================== */
.faq-section {
  padding: clamp(2.5rem, 4vw, 4rem) 0;
}

.faq-list {
  max-width: 900px;
  margin: 1.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.25rem 1.4rem;
  text-align: left;
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
  gap: 12px;
}

.faq-icon {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--accent-blue);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.4rem 1.4rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.65;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ==========================================================================
   NEWSLETTER SUBSCRIBER BANNER
   ========================================================================== */
.newsletter-banner {
  margin: clamp(2.5rem, 4vw, 4rem) 0;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.18) 0%, rgba(99, 102, 241, 0.18) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 3vw, 2.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.newsletter-inner {
  max-width: 650px;
  margin: 0 auto;
}

.newsletter-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.newsletter-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex-grow: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.newsletter-input:focus {
  border-color: var(--border-focus);
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: clamp(2.5rem, 4vw, 4rem) 0 calc(clamp(2.5rem, 4vw, 4rem) + 40px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.disclaimer-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* ==========================================================================
   MODALS (READER & SEARCH MODAL)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  z-index: 5;
}

.modal-close-btn:hover {
  background: var(--bearish-bg);
  color: var(--bearish);
}

.modal-article-wrap {
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  padding-right: clamp(3.5rem, 6vw, 4.5rem);
}

.modal-article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 1.5rem 0;
}

.modal-article-body p {
  margin-bottom: 1.25rem;
}

.modal-article-body h3 {
  color: var(--text-primary);
  font-size: 1.35rem;
  margin: 1.75rem 0 0.75rem;
  font-weight: 800;
}

.modal-article-body ul {
  margin-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.modal-article-body li {
  margin-bottom: 0.5rem;
}

.article-takeaway-box {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-blue);
  padding: 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1.5rem 0;
}

/* Quick Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--bullish);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 150;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   GOOGLE ADSENSE (AUTO ADS OPTIMIZED)
   ========================================================================== */
.google-auto-placed {
  margin: 1.5rem auto !important;
  text-align: center;
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */
.cookie-consent-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 620px;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideUpCookie 0.35s ease-out;
}

@keyframes slideUpCookie {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.cookie-content {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookie-content a {
  color: var(--accent-blue);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE APP VIEWPORT (TABLETS & PHONES)
   Guaranteed Zero-Overlap Architecture
   ========================================================================== */

/* Prevent Header Crowding / Overlap on 13"-15" Laptops */
@media (max-width: 1260px) {
  .market-status-pill {
    display: none;
  }
  .brand-badge {
    display: none;
  }
  .header-actions .btn-primary {
    display: none;
  }
}

/* Switch Desktop Nav to Drawer Before Any Text Overlaps */
@media (max-width: 1140px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Tablet & Mobile Breakpoint (App-Style Experience) */
@media (max-width: 768px) {
  /* Ensure Fixed Bottom Navigation Dock Never Occludes Any Page Content */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .header-inner {
    height: 56px;
    gap: 0.5rem;
  }

  .brand-logo {
    font-size: clamp(0.95rem, 3.8vw, 1.15rem);
    gap: 7px;
    min-width: 0;
    max-width: calc(100% - 128px);
  }

  .brand-logo span:last-of-type {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }

  .brand-badge {
    display: none;
  }

  .market-status-pill {
    display: none;
  }

  .header-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .header-actions .search-kbd {
    display: none;
  }

  .header-actions .search-box-btn span {
    display: none;
  }

  .header-actions .search-box-btn {
    padding: 0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
    flex-shrink: 0;
  }

  .header-actions .theme-btn,
  .mobile-menu-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    flex-shrink: 0;
  }

  .header-actions .btn-primary {
    display: none;
  }

  /* Show Native Mobile App Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: block;
  }

  .site-footer {
    padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .toast-notice {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    right: 1rem;
    left: 1rem;
  }

  /* Telemetry Grid: 2-column app watchlist */
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .telemetry-card {
    padding: 0.75rem 0.85rem;
  }

  .telemetry-price {
    font-size: 1.12rem;
  }

  .telemetry-name {
    font-size: 0.76rem;
  }

  .sparkline-canvas {
    height: 28px;
  }

  /* Articles single column */
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .story-media-wrap {
    height: 220px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  /* Modal on Mobile: Native bottom sheet without overlap */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-dialog {
    max-height: 90vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin: 0;
    width: 100%;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .chart-controls {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  .chart-container {
    height: 310px;
  }

  .calc-results-box {
    grid-template-columns: 1fr;
  }
}

/* Clean Breaking News Bar on Mobile */
@media (max-width: 640px) {
  .api-source-badge {
    display: none;
  }
}

/* Ultra-Compact Phones (iPhone SE, Small Androids) */
@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  .brand-logo {
    font-size: clamp(0.9rem, 3.6vw, 1.05rem);
  }

  .header-actions .search-box-btn,
  .header-actions .theme-btn,
  .mobile-menu-btn {
    width: 34px;
    height: 34px;
  }

  .gauge-canvas {
    max-width: 220px;
    height: 110px;
  }

  .gauge-score {
    font-size: 1.85rem;
  }

  .chart-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Narrowest Screens (≤ 360px) */
@media (max-width: 360px) {
  .telemetry-grid {
    grid-template-columns: 1fr;
  }

  .chart-controls .pill-group {
    width: 100%;
    justify-content: space-between;
  }
}
