/* =========================================================
   NovaPulse Editorial Design System & Responsive Architecture
   Flawless Navigation, Clean Marquee & Multi-Device Geometry
   ========================================================= */

:root {
  /* Default: Pristine Light Theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.95);
  --bg-surface-hover: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-glass-strong: rgba(0, 0, 0, 0.05);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #4f46e5;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(79, 70, 229, 0.5);
  --border-editorial: rgba(0, 0, 0, 0.12);

  --accent-primary: #4f46e5;
  --accent-secondary: #0891b2;
  --accent-glow: rgba(79, 70, 229, 0.12);
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0891b2 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(8, 145, 178, 0.06));

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --container-max: 1280px;

  /* Typography Pairing */
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Dynamic Article Font Scaling */
  --article-font-size: 1.15rem;
  --article-line-height: 1.9;
}

/* Obsidian Dark Theme */
[data-theme="dark"] {
  --bg-primary: #080c15;
  --bg-secondary: #0d1424;
  --bg-surface: rgba(15, 23, 42, 0.85);
  --bg-surface-hover: rgba(26, 38, 66, 0.9);
  --bg-card: rgba(13, 20, 36, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-strong: rgba(255, 255, 255, 0.07);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #818cf8;

  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-editorial: rgba(255, 255, 255, 0.15);

  --accent-primary: #6366f1;
  --accent-secondary: #06b6d4;
  --accent-glow: rgba(99, 102, 241, 0.22);
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(6, 182, 212, 0.08));

  --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 20px 50px rgba(0, 0, 0, 0.6);
}

/* Sepia / Warm Paper Theme */
[data-theme="sepia"] {
  --bg-primary: #f7f4ee;
  --bg-secondary: #efeae1;
  --bg-surface: rgba(247, 244, 238, 0.95);
  --bg-surface-hover: #e8e2d5;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-glass-strong: rgba(0, 0, 0, 0.05);

  --text-primary: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #854d0e;
  --text-accent: #9a3412;

  --border-subtle: rgba(28, 25, 23, 0.1);
  --border-focus: rgba(154, 52, 18, 0.5);
  --border-editorial: rgba(28, 25, 23, 0.2);

  --accent-primary: #9a3412;
  --accent-secondary: #b45309;
  --accent-glow: rgba(154, 52, 18, 0.15);
  --accent-gradient: linear-gradient(135deg, #9a3412 0%, #b45309 50%, #d97706 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(154, 52, 18, 0.08), rgba(217, 119, 6, 0.06));

  --shadow-sm: 0 2px 8px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 20px 50px rgba(28, 25, 23, 0.12);
}

/* Explicit Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-surface: rgba(255, 255, 255, 0.95);
  --bg-surface-hover: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-glass-strong: rgba(0, 0, 0, 0.05);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #4f46e5;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(79, 70, 229, 0.5);
  --border-editorial: rgba(0, 0, 0, 0.12);

  --accent-primary: #4f46e5;
  --accent-secondary: #0891b2;
  --accent-glow: rgba(79, 70, 229, 0.12);
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0891b2 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(8, 145, 178, 0.06));

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Atmosphere Elements */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.ambient-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
}
.ambient-glow-1 { top: -100px; left: -100px; background: radial-gradient(circle, var(--accent-primary), transparent 70%); }
.ambient-glow-2 { bottom: -150px; right: -150px; background: radial-gradient(circle, var(--accent-secondary), transparent 70%); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.22;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Reading Progress Line */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent-gradient);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* Editorial Topbar */
.editorial-topbar {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  padding: 0.45rem 0;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  position: relative;
  z-index: 101;
}

.editorial-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.topbar-divider { opacity: 0.4; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.live-signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #10b981;
  font-weight: 600;
}

.signal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 1.5s infinite;
}

.topbar-link:hover { color: var(--text-primary); }

/* =========================================================
   Primary Header & Responsive Uncrowded Navigation
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all 0.3s ease;
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.logo-emblem {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.logo-emblem svg {
  width: 20px;
  height: 20px;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}

/* Nav Links - Desktop */
.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
  overflow: hidden;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-glass-strong);
}

.nav-link.active {
  color: var(--accent-primary);
  background: var(--accent-gradient-subtle);
}

/* Action Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

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

.kbd-shortcut {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-glass-strong);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.btn-theme-switch {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-theme-switch:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
  background: var(--bg-surface-hover);
  transform: translateY(-2px);
}

.mobile-only {
  display: none;
}

/* =========================================================
   Mobile Drawer
   ========================================================= */

.mobile-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.open {
  display: flex;
  opacity: 1;
}

.mobile-drawer {
  width: 320px;
  max-width: 85%;
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.drawer-section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

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

.drawer-nav-item a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.drawer-nav-item a:hover, .drawer-nav-item.active a {
  background: var(--accent-gradient-subtle);
  color: var(--accent-primary);
}

/* =========================================================
   Breaking Wire Marquee Ticker (Isolated Flex)
   ========================================================= */

.trending-ticker-bar {
  background: rgba(99, 102, 241, 0.04);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.45rem 0;
  position: relative;
  z-index: 90;
  overflow: hidden;
}

.ticker-container-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.ticker-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ef4444;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.ticker-marquee-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0%, black 16px, black calc(100% - 16px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 16px, black calc(100% - 16px), transparent 100%);
}

.ticker-track {
  display: flex;
  gap: 3.5rem;
  white-space: nowrap;
  animation: tickerSlide 45s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
}

.ticker-item:hover {
  color: var(--text-primary);
}

.ticker-item .cat-tag {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

/* =========================================================
   Cover Story & Article Cards
   ========================================================= */

.hero-cover-section {
  padding: 3.5rem 0 2.5rem 0;
}

.cover-story-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3rem;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 3.5rem;
}

.lead-story-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.editorial-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-focus);
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lead-story-title {
  font-size: clamp(2.3rem, 4.5vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
  transition: color 0.2s ease;
}

.lead-story-title:hover {
  color: var(--accent-primary);
}

.lead-story-excerpt {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.lead-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  gap: 1rem;
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-initials {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.9rem;
}

.author-name-title {
  display: flex;
  flex-direction: column;
}

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

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

.cover-image-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 260px;
  max-height: 420px;
  background: var(--bg-secondary);
  position: relative;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  contain: layout paint;
}

.cover-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Category Filter Bar */
.category-filter-bar {
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 3rem;
}

.category-filter-bar::-webkit-scrollbar {
  display: none;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-pill:hover, .category-pill.active {
  background: var(--accent-gradient-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  contain: content;
  content-visibility: auto;
  contain-intrinsic-size: 380px;
}

.article-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
}

.card-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  min-height: 180px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card-content-area {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

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

.meta-category {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.28;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

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

.card-excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* =========================================================
   Single Article Reader Layout & Drop Caps
   ========================================================= */

.reader-container {
  padding: 3.5rem 0 6rem 0;
}

.reader-header-wrap {
  max-width: 900px;
  margin: 0 auto 3rem auto;
}

.reader-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.reader-title {
  font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.reader-subtitle {
  font-size: 1.3rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-family: var(--font-serif);
  font-style: italic;
}

.reader-byline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border-editorial);
  border-bottom: 1px solid var(--border-editorial);
}

.reader-hero-banner {
  max-width: 1000px;
  margin: 0 auto 3.5rem auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 21 / 10;
  height: auto;
  min-height: 280px;
  max-height: 480px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
  contain: layout paint;
}

.reader-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reader-two-column {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

/* Drop Caps */
.article-prose {
  font-size: var(--article-font-size);
  line-height: var(--article-line-height);
  color: var(--text-primary);
}

.article-prose > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  font-size: 4.2rem;
  float: left;
  line-height: 0.8;
  margin-right: 0.75rem;
  margin-top: 0.2rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.article-prose p {
  margin-bottom: 1.85rem;
}

.article-prose h2 {
  font-size: 2rem;
  margin-top: 3.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.article-prose h3 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.article-prose blockquote {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-secondary);
  border-left: 4px solid var(--accent-primary);
  background: var(--bg-glass-strong);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 2.5rem 0;
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 0.92rem;
}

.article-prose th, .article-prose td {
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border-subtle);
}

.article-prose th {
  background: var(--bg-surface);
  font-weight: 700;
  font-family: var(--font-sans);
}

.article-prose pre {
  background: #020617;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  margin: 2rem 0;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
}

/* Key Takeaways Box */
.key-takeaways-card {
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
}

.takeaways-title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.takeaways-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.takeaways-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.takeaways-list li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: 800;
}

/* Sticky Right Sidebar */
.reader-sidebar {
  position: sticky;
  top: 95px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.toc-title {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-primary);
  background: var(--bg-glass-strong);
  font-weight: 600;
  padding-left: 0.75rem;
}

/* Floating Reader Control Dock */
.floating-reader-dock {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-focus);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg), 0 0 35px var(--accent-glow);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 999;
  max-width: calc(100vw - 20px);
}

.dock-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.dock-btn:hover {
  color: var(--text-primary);
  background: var(--bg-glass-strong);
}

.dock-divider {
  width: 1px;
  height: 18px;
  background: var(--border-subtle);
}

/* FAQ Section */
.faq-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}

.faq-title {
  margin-bottom: 1.5rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

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

.faq-question {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
}

.faq-toggle-icon { transition: transform 0.3s ease; }
.faq-item.active .faq-toggle-icon { transform: rotate(180deg); }

.faq-answer {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  display: none;
}

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

/* Newsletter Box */
.newsletter-section {
  margin: 4.5rem 0;
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-lg);
  padding: 3.5rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

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

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  justify-content: center;
}

.newsletter-input {
  flex-grow: 1;
  max-width: 360px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.2rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-gradient);
  color: #ffffff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px var(--accent-glow);
  color: #ffffff;
}

/* Site Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2.5rem 0;
  margin-top: 6rem;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 320px;
}

.footer-column h4 {
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

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

.footer-link {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.footer-link:hover { color: var(--text-primary); }

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

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-sublink:hover { color: var(--text-primary); }

/* Search Modal */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.search-modal-backdrop.open { display: flex; }

.search-modal {
  width: 100%;
  max-width: 620px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-modal-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.btn-icon-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
}

.search-results-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.75rem;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-focus);
  color: var(--text-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInRight 0.3s ease;
}

/* =========================================================
   Master Adaptive Responsive Media Queries & Fluid Geometry
   Flawlessly Engineered for All Screen Sizes (320px to 4K Ultra-Wide)
   ========================================================= */

/* --- 1. Large Displays & Ultra-Wide (>= 1440px) --- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1380px;
  }
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* --- 2. Compact Laptops & Large Tablets (<= 1200px) --- */
@media (max-width: 1200px) {
  .header-inner { gap: 1rem; }
  .nav-links { gap: 0.25rem; }
  .nav-link { font-size: 0.84rem; padding: 0.4rem 0.65rem; }
  .cover-story-grid { gap: 2rem; }
  .reader-two-column { gap: 2.5rem; }
}

/* --- 3. Tablets Landscape & Portrait (<= 1024px) --- */
@media (max-width: 1024px) {
  .main-nav { display: none; }
  .mobile-only { display: flex; }
  
  /* Hero & Cover Story */
  .hero-cover-section { padding: 2rem 0 1.75rem 0; }
  .cover-story-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
  }
  .cover-image-card {
    max-height: 380px;
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  /* Articles Grid (Clean 2 Columns on Tablets) */
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
    margin-bottom: 3rem;
  }

  /* Reader Page Layout */
  .reader-container { padding: 2rem 0 5rem 0; }
  .reader-two-column {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .reader-sidebar {
    position: static;
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* --- 4. Phablets & Standard Mobile (<= 768px) --- */
@media (max-width: 768px) {
  /* Container Breathing Room */
  .container {
    padding: 0 1.15rem;
  }

  /* Header Optimization */
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
  .header-inner {
    height: 64px;
  }
  .search-text, .kbd-shortcut {
    display: none;
  }
  .search-trigger {
    padding: 0.45rem 0.6rem;
    min-width: 38px;
    min-height: 38px;
    justify-content: center;
  }
  .btn-theme-switch {
    width: 38px;
    height: 38px;
  }

  /* Ticker Tape */
  .trending-ticker-bar {
    padding: 0.35rem 0;
  }
  .ticker-badge-pill {
    font-size: 0.62rem;
    padding: 0.18rem 0.5rem;
  }
  .ticker-track {
    gap: 2rem;
  }
  .ticker-item {
    font-size: 0.8rem;
  }

  /* Cover Story Scaling */
  .lead-story-title {
    font-size: clamp(1.65rem, 5.2vw, 2.4rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
  }
  .lead-story-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }
  .lead-author-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }

  /* Articles Grid (Single Column on Mobile) */
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .card-thumbnail {
    aspect-ratio: 16 / 9;
    min-height: 160px;
  }
  .card-content-area {
    padding: 1.35rem;
  }
  .card-title {
    font-size: 1.25rem;
    overflow-wrap: break-word;
  }

  /* Reader Page on Mobile */
  .reader-header-wrap { margin-bottom: 2rem; }
  .reader-breadcrumbs {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .reader-breadcrumbs::-webkit-scrollbar { display: none; }
  .reader-title {
    font-size: clamp(1.8rem, 5.8vw, 2.6rem);
    line-height: 1.18;
    overflow-wrap: break-word;
  }
  .reader-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
  .reader-byline-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .reader-hero-banner {
    margin-bottom: 2rem;
    aspect-ratio: 16 / 9;
    max-height: 320px;
    min-height: 180px;
  }
  .reader-sidebar {
    grid-template-columns: 1fr;
  }

  /* Mobile Content Prose Protection */
  .article-prose {
    font-size: 1.05rem;
    line-height: 1.75;
  }
  .article-prose h2 {
    font-size: 1.55rem;
    margin-top: 2.25rem;
  }
  .article-prose h3 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
  }
  .article-prose blockquote {
    padding: 1.15rem 1.25rem;
    font-size: 1.1rem;
    margin: 1.75rem 0;
  }
  .article-prose table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    border-collapse: collapse;
  }
  .article-prose pre {
    padding: 1rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
  }

  /* Key Takeaways Card */
  .key-takeaways-card {
    padding: 1.25rem;
    margin-bottom: 2rem;
  }

  /* Floating Reader Dock (Safe-Area & Thumb Friendly) */
  .floating-reader-dock {
    width: 95%;
    max-width: 440px;
    padding: 0.4rem 0.75rem;
    gap: 0.35rem;
    justify-content: space-between;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .dock-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
  }

  /* Full Screen Mobile Search Modal */
  .search-modal-backdrop {
    padding-top: 0;
    align-items: stretch;
  }
  .search-modal {
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
  }
  .search-modal-header {
    padding: 1rem;
  }
  .search-input {
    font-size: 16px; /* Prevents iOS Safari auto-zoom on input focus */
  }
  .search-results-list {
    flex-grow: 1;
    max-height: none;
    padding: 0.75rem 1rem;
  }

  /* Newsletter Box */
  .newsletter-section {
    padding: 2.5rem 1.25rem;
    margin: 3rem 0;
  }
  .newsletter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .newsletter-input {
    width: 100%;
    max-width: 100%;
    font-size: 16px; /* iOS auto-zoom prevention */
    padding: 0.85rem 1rem;
  }
  .newsletter-form .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
  }

  /* Footer Mobile */
  .site-footer {
    padding: 3rem 0 2rem 0;
    margin-top: 3.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
}

/* --- 5. Compact Smartphones (<= 480px, iPhone SE, Galaxy, Pixel) --- */
@media (max-width: 480px) {
  .container {
    padding: 0 0.85rem;
  }

  /* Brand Logo Header */
  .brand-logo { gap: 0.5rem; }
  .logo-emblem { width: 34px; height: 34px; border-radius: 10px; }
  .logo-emblem svg { width: 17px; height: 17px; }
  .brand-title { font-size: 1.15rem; }
  .brand-subtitle { font-size: 0.52rem; letter-spacing: 0.1em; }
  .header-actions { gap: 0.4rem; }

  /* Topbar Compact */
  .editorial-topbar { padding: 0.35rem 0; font-size: 0.65rem; }
  .topbar-right span:not(.live-signal-badge) { display: none; }

  /* Cover Story */
  .lead-story-title {
    font-size: clamp(1.45rem, 6.2vw, 1.95rem);
  }
  .cover-image-card {
    min-height: 190px;
    max-height: 250px;
  }

  /* Drop Cap in Reader (Scaled so it doesn't displace entire paragraph) */
  .article-prose > p:first-of-type::first-letter {
    font-size: 3.1rem;
    line-height: 0.85;
    margin-right: 0.5rem;
    margin-top: 0.1rem;
  }

  /* Drawer Sizing */
  .mobile-drawer {
    width: 290px;
    max-width: 88vw;
    padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px)) 1rem;
  }

  /* Dock Button Labels on Mini Screens */
  .floating-reader-dock {
    gap: 0.2rem;
    padding: 0.35rem 0.5rem;
  }
  .dock-btn {
    font-size: 0.72rem;
    padding: 0.35rem 0.4rem;
  }
}

/* --- 6. Ultra-Compact Displays (<= 360px, Fold Outer Screens) --- */
@media (max-width: 360px) {
  .brand-subtitle { display: none; }
  .brand-title { font-size: 1.05rem; }
  .dock-btn span { display: none; } /* Icon-only floating dock on ultra-narrow phones */
  .dock-btn svg { width: 16px; height: 16px; }
  .lead-story-title { font-size: 1.35rem; }
  .reader-title { font-size: 1.55rem; }
}

/* --- 7. Mobile Touch Target & Interaction Ergonomics --- */
@media (hover: none) and (pointer: coarse) {
  /* Prevent sticky hover states on mobile touch */
  .article-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }
  .article-card:active {
    transform: scale(0.985);
    transition: transform 0.15s ease;
  }
  .cover-story-title:hover {
    color: inherit;
  }

  /* High Ergonomic Touch Targets (44px minimum for Apple/Google guidelines) */
  .btn-theme-switch,
  .search-trigger,
  #mobile-menu-toggle,
  .dock-btn,
  .category-pill,
  .btn-icon-close,
  .footer-link,
  .drawer-nav-item a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  
  /* Smooth Tap Highlight */
  * {
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.15);
  }
}
