/* ===================================================================
   MARKET TECTONICS — GLOBAL MACRO & GEOPOLITICAL INTELLIGENCE
   Design System: Clean Light Professional Edition
   Clean, Fast, AdSense-Ready, Mobile-Responsive
   =================================================================== */

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

:root {
  /* Core Background Palette — Light Theme */
  --bg-primary:    #ffffff;
  --bg-secondary:  #f8f9fa;
  --bg-tertiary:   #f1f3f5;
  --bg-elevated:   #e9ecef;
  --bg-card:       #ffffff;

  /* Brand Accent — Deep Blue */
  --accent:        #1a56db;
  --accent-light:  #1c64f2;
  --accent-dark:   #1e429f;
  --accent-glow:   rgba(26, 86, 219, 0.10);
  --accent-gradient: linear-gradient(135deg, #1a56db 0%, #1e429f 100%);

  /* Status Indicators */
  --status-critical:  #dc2626;
  --status-elevated:  #d97706;
  --status-stable:    #16a34a;
  --glow-red:   rgba(220, 38, 38, 0.12);
  --glow-amber: rgba(217, 119, 6, 0.12);

  /* Text Hierarchy */
  --text-primary:   #111827;
  --text-secondary: #4b5563;
  --text-muted:     #596780;

  /* Borders */
  --border-subtle: #e5e7eb;
  --border-mid:    #d1d5db;
  --border-strong: #1a56db;

  /* Typography */
  --font-brand: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows — subtle for light theme */
  --shadow-sm:   0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md:   0 4px 16px rgba(0, 0, 0, 0.10);
  --shadow-lg:   0 12px 32px rgba(0, 0, 0, 0.14);
  --shadow-blue: 0 0 20px rgba(26, 86, 219, 0.10);

  /* Layout */
  --container-max: 1360px;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  14px;
  --transition-fast:   0.16s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  overflow-x: hidden;
  line-height: 1.65;
}

p {
  line-height: 1.75;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===================================================================
   1. LIVE MARKET TICKER
   =================================================================== */
.ticker-strip {
  display: none !important;
}

.ticker-strip-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-right: 14px;
  border-right: 1px solid var(--border-subtle);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.72rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--status-critical);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--status-critical);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.3); }
}

.ticker-track-wrap {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 3%, #000 97%, transparent 100%);
}

.ticker-track {
  display: flex;
  gap: 28px;
  animation: ticker-slide 40s linear infinite;
  white-space: nowrap;
}
.ticker-track:hover { animation-play-state: paused; }

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

.ticker-item { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); }
.ticker-symbol  { color: var(--text-primary); font-weight: 600; }
.ticker-val     { color: #c9d1d9; }
.ticker-change.up   { color: var(--status-stable); }
.ticker-change.down { color: var(--status-critical); }

/* ===================================================================
   2. MAIN HEADER & NAVIGATION
   =================================================================== */
.main-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  gap: 20px;
}

/* Brand */
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.brand-emblem-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
}
.brand-link:hover .brand-emblem-wrap { border-color: var(--accent); transform: scale(1.04); }
.brand-emblem-img { width: 100%; height: 100%; object-fit: cover; }
.brand-svg-fallback { width: 100%; height: 100%; }

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

.brand-title {
  font-family: var(--font-brand);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.64rem;
  color: var(--accent-light);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

/* Main Nav */
.main-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.nav-item:hover, .nav-item.active {
  color: var(--accent);
  background: rgba(26, 86, 219, 0.07);
}
.nav-item.active { color: var(--accent); font-weight: 600; }

/* Search */
.header-search-wrap {
  flex: 1;
  max-width: 340px;
  position: relative;
  margin: 0 8px;
}

.header-search-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px 8px 36px;
  color: var(--text-primary);
  font-size: 0.83rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition-fast);
}
.header-search-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.10);
}
.header-search-input::placeholder { color: var(--text-muted); }

.header-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.82rem;
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.40);
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-mid);
}

.btn-admin {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-mid);
  font-size: 0.80rem;
  padding: 7px 14px;
}
.btn-admin:hover {
  background: rgba(26, 86, 219, 0.07);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-mobile-menu {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 85vw);
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-subtle);
  z-index: 9999;
  transition: right var(--transition-normal);
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.10);
}
.mobile-nav-drawer.active { right: 0; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-nav-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
}
.mobile-nav-body { padding: 12px 0; }
.mobile-nav-link {
  display: block;
  padding: 13px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}
.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--accent);
  background: rgba(26, 86, 219, 0.05);
  padding-left: 26px;
}

/* ===================================================================
   3. CATEGORY FILTER BAR
   =================================================================== */
.nav-subbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-subbar::-webkit-scrollbar { display: none; }

.nav-subbar-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  white-space: nowrap;
}

.category-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.category-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.category-tab.active {
  color: var(--accent);
  background: rgba(26, 86, 219, 0.07);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
}

/* ===================================================================
   4. HERO SPOTLIGHT SECTION
   =================================================================== */
.hero-spotlight-section { margin: 24px 0 28px; }

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Lead Article Card */
.lead-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}
.lead-card:hover {
  border-color: var(--accent);
}

.lead-cover-wrap {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: #e5e7eb;
}
.lead-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lead-card:hover .lead-cover-img { transform: none; }
.lead-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.18) 100%);
}

.lead-badge-stack {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.pill {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pill-fault-critical {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-weight: 700;
}
.pill-fault-elevated {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 700;
}
.pill-fault-stable {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-weight: 700;
}
.pill-category {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-weight: 700;
}

.lead-content {
  padding: 24px 26px 20px;
  position: relative;
  z-index: 3;
  background: #ffffff;
}
.lead-title {
  font-family: var(--font-brand);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 10px;
  transition: color var(--transition-fast);
}
.lead-card:hover .lead-title { color: var(--accent); }
.lead-thesis {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
  gap: 10px;
  flex-wrap: wrap;
}
.meta-author-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
}
.meta-author-name { color: var(--text-primary); font-weight: 600; }
.meta-stats { display: flex; align-items: center; gap: 12px; }
.stat-item { display: flex; align-items: center; gap: 4px; }

/* Secondary Column */
.secondary-column { display: flex; flex-direction: column; gap: 14px; }

.briefing-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.briefing-card:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
}
.briefing-header { display: flex; align-items: center; justify-content: space-between; }
.briefing-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  transition: color var(--transition-fast);
}
.briefing-card:hover .briefing-title { color: var(--accent); }
.briefing-snippet {
  font-size: 0.80rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===================================================================
   5. MAIN FEED + SIDEBAR LAYOUT
   =================================================================== */
.main-layout-section { margin: 28px 0 60px; }

.content-sidebar-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 28px;
}
@media (max-width: 1024px) { .content-sidebar-grid { grid-template-columns: 1fr; } }

.section-heading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-subtle);
  margin-bottom: 22px;
}
.section-title {
  font-family: var(--font-brand);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.filter-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); }

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.article-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.article-card:hover {
  border-color: var(--accent);
}

.article-thumb-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #e9ecef;
}
.article-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-card:hover .article-thumb-img { transform: none; }

.article-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.article-card-title {
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 8px 0 7px;
  transition: color var(--transition-fast);
}
.article-card:hover .article-card-title { color: var(--accent); }
.article-card-snippet {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-tags-wrap { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.tag-badge {
  font-size: 0.67rem;
  color: var(--accent-dark);
  background: rgba(26, 86, 219, 0.06);
  border: 1px solid rgba(26, 86, 219, 0.15);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

/* ===================================================================
   6. SIDEBAR WIDGETS
   =================================================================== */
.sidebar-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-title {
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Newsletter Widget */
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.84rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast);
}
.newsletter-input:focus { border-color: var(--accent); }
.newsletter-input::placeholder { color: var(--text-muted); }

/* Sidebar links */
.footer-links { list-style: none; padding: 0; }
.footer-links li + li { margin-top: 8px; }
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.45;
  transition: color var(--transition-fast);
  display: block;
  padding: 2px 0;
}
.footer-links a:hover { color: var(--accent-light); }

/* ===================================================================
   7. ARTICLE READER OVERLAY
   =================================================================== */
.reader-view-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 24, 39, 0.60);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.reader-view-overlay.active { display: block; opacity: 1; }

.reader-container {
  max-width: 840px;
  margin: 40px auto 100px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.20);
  overflow: hidden;
}

.reader-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 22px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}
.reader-back-btn, .reader-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}
.reader-back-btn:hover, .reader-close-btn:hover { color: var(--accent); }

.reader-hero-media {
  width: 100%;
  height: 340px;
  position: relative;
  background: #e9ecef;
}
.reader-hero-img { width: 100%; height: 100%; object-fit: cover; }

.reader-body-wrap { padding: 32px 40px; }
@media (max-width: 768px) { .reader-body-wrap { padding: 20px 18px; } }

.reader-title {
  font-family: var(--font-brand);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 12px;
}
.reader-subtitle {
  font-size: 1.04rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 22px;
}

/* Key Takeaways */
.takeaways-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.takeaways-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.takeaways-list { list-style: none; padding: 0; }
.takeaways-list li {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}
.takeaways-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* Article Prose */
.article-prose {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--text-primary);
}
.article-prose h1, .article-prose h2, .article-prose h3 {
  font-family: var(--font-brand);
  color: var(--text-primary);
  margin: 24px 0 10px;
}
.article-prose h2 { font-size: 1.45rem; }
.article-prose h3 { font-size: 1.18rem; color: var(--accent); }
.article-prose p { margin: 0 0 16px; }
.article-prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 20px;
  background: #eff6ff;
  margin: 20px 0;
  color: var(--text-secondary);
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-prose ul { margin: 12px 0 16px 22px; }
.article-prose li { margin-bottom: 6px; }
.article-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-link:hover { color: var(--accent-dark); }

/* ===================================================================
   8. COMMENTS SECTION
   =================================================================== */
.comments-section {
  margin-top: 40px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
}
.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.comments-title {
  font-family: var(--font-brand);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-badge-count {
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  font-family: var(--font-mono);
}

/* Composer */
.comment-composer {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}
.comment-composer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 600px) { .comment-composer-top { grid-template-columns: 1fr; } }

.comment-input-field, .comment-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast);
}
.comment-input-field:focus, .comment-textarea:focus { border-color: var(--accent); }
.comment-input-field::placeholder, .comment-textarea::placeholder { color: var(--text-muted); }

.comment-textarea {
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
  margin-bottom: 10px;
}
.comment-composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-rules-hint { font-size: 0.75rem; color: var(--text-muted); }

/* Comments Thread */
.comments-thread-list { display: flex; flex-direction: column; gap: 2px; }
.comment-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.comment-item:last-child { border-bottom: none; }
.comment-item.sub-reply {
  padding-left: 20px;
  border-left: 2px solid var(--border-mid);
  margin-left: 14px;
  background: transparent;
}
.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.comment-author-badge { display: flex; align-items: center; gap: 8px; }
.comment-author-name { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); }
.comment-badge-verified {
  background: #eff6ff;
  color: var(--accent);
  border: 1px solid #bfdbfe;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 99px;
}
.comment-timestamp { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.comment-text { font-size: 0.9rem; color: var(--text-primary); line-height: 1.6; margin-bottom: 8px; }
.comment-actions { display: flex; align-items: center; gap: 12px; }
.comment-vote-btn, .comment-reply-btn {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  font-family: var(--font-sans);
  padding: 2px 0;
}
.comment-vote-btn:hover { color: var(--status-stable); }
.comment-vote-btn.upvoted { color: var(--status-stable); font-weight: 700; }
.comment-reply-btn:hover { color: var(--accent); }

/* ===================================================================
   9. PUBLISH ARTICLE MODAL (Public use now moved to admin panel)
      Keep for inline reader use
   =================================================================== */
.creator-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
}
.creator-modal-overlay.active { display: flex; }

.creator-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.16);
  overflow: hidden;
}
.creator-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.creator-modal-title {
  font-family: var(--font-brand);
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-primary);
}
.creator-modal-body { padding: 24px; }
.creator-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

/* Form Elements */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition-fast);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.10);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-select option { background: #ffffff; }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 600px) {
  .form-row-2 { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
}

/* ===================================================================
   10. FOOTER
   =================================================================== */
.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col-title {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

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

/* ===================================================================
   11. TOAST NOTIFICATIONS
   =================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  animation: toast-in 0.3s ease forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
   12. ADMIN PANEL (admin.html)
   =================================================================== */
.admin-body {
  background: var(--bg-secondary);
  min-height: 100vh;
  font-family: var(--font-sans);
}

.admin-login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg-secondary);
}

.admin-login-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.10);
}

.admin-login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.admin-login-logo .brand-title {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.admin-login-logo p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-panel-wrap {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}
.admin-panel-wrap.active { display: flex; }

.admin-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-topbar-left { display: flex; align-items: center; gap: 14px; }
.admin-brand { font-family: var(--font-brand); font-size: 1.05rem; color: var(--text-primary); }
.admin-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-user-info { font-size: 0.82rem; color: var(--text-muted); }

.admin-main {
  display: grid;
  grid-template-columns: 260px 1fr;
  flex: 1;
}
@media (max-width: 900px) { .admin-main { grid-template-columns: 1fr; } }

.admin-sidebar {
  background: #ffffff;
  border-right: 1px solid var(--border-subtle);
  padding: 20px 0;
  min-height: calc(100vh - 60px);
}
.admin-nav-section { padding: 0 12px; margin-bottom: 20px; }
.admin-nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0 10px;
  margin-bottom: 6px;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.admin-nav-item:hover, .admin-nav-item.active {
  color: var(--accent);
  background: rgba(26, 86, 219, 0.07);
}
.admin-nav-item.active { color: var(--accent); border-left: 3px solid var(--accent); padding-left: 9px; }
.admin-nav-icon { font-size: 1rem; flex-shrink: 0; }

.admin-content { padding: 28px 32px; background: var(--bg-secondary); }
@media (max-width: 900px) { .admin-content { padding: 20px 16px; } }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.admin-panel-title {
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.admin-panel-subtitle { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 24px; }

/* Stats Cards */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: border-color var(--transition-fast);
  box-shadow: var(--shadow-sm);
}
.stat-card:hover { border-color: var(--accent); }
.stat-card-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.stat-card-value { font-family: var(--font-mono); font-size: 1.65rem; font-weight: 700; color: var(--text-primary); }
.stat-card-sub { font-size: 0.75rem; color: var(--status-stable); margin-top: 4px; }

/* Article Manager Table */
.admin-table-wrap {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.admin-table-title { font-weight: 700; color: var(--text-primary); font-size: 0.92rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}
.admin-table td {
  padding: 13px 16px;
  font-size: 0.88rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(26,86,219,0.03); }
.admin-table .article-title-cell { font-weight: 600; color: var(--text-primary); max-width: 260px; }
.admin-table .article-title-cell small { display: block; font-weight: 400; color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }

.btn-table-edit, .btn-table-delete {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.btn-table-edit { color: var(--accent-light); }
.btn-table-edit:hover { background: rgba(59,130,246,0.12); border-color: var(--accent); }
.btn-table-delete { color: var(--status-critical); margin-left: 6px; }
.btn-table-delete:hover { background: rgba(239,68,68,0.10); border-color: var(--status-critical); }

/* Login form error state */
.form-error {
  color: var(--status-critical);
  font-size: 0.82rem;
  margin-top: 8px;
  display: none;
}
.form-error.visible { display: block; }

/* ===================================================================
   13. RESPONSIVE MEDIA QUERIES
   =================================================================== */
@media (max-width: 1024px) {
  .main-nav-links { display: none; }
  .btn-mobile-menu { display: flex; }
  .header-search-wrap { max-width: 240px; }
}

@media (max-width: 768px) {
  .header-search-wrap { display: none; }
  .lead-cover-wrap { height: 260px; }
  .reader-container { margin: 0; border-radius: 0; }
  .creator-modal-card { border-radius: 0; }
  .admin-login-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .brand-tagline { display: none; }
  .brand-title { font-size: 1.1rem; }
  .articles-grid { grid-template-columns: 1fr; }
}

/* Scrollbar Styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ===================================================================
   14. SIMPLE FOOTER STYLES
   =================================================================== */
.main-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 36px 0 28px;
  margin-top: 60px;
}
.footer-simple-content {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.footer-simple-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer-simple-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.footer-simple-links a:hover {
  color: var(--accent);
}
.footer-copyright-line {
  font-size: 0.77rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  line-height: 1.6;
}

/* ===================================================================
   15. PAGES TYPOGRAPHY & SPACING (PRIVACY, CONTACT, ABOUT, TERMS)
   =================================================================== */
.legal-doc-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 56px;
  box-shadow: var(--shadow-md);
  margin-bottom: 60px;
}

.legal-header-bar {
  padding-bottom: 28px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-main-title {
  font-family: var(--font-brand);
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.015em;
}

.legal-lead-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.legal-body-content {
  line-height: 1.85;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

.legal-section {
  margin-bottom: 40px;
}

.legal-section h2 {
  font-family: var(--font-brand);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-top: 32px;
  margin-bottom: 16px;
}

.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
  margin-top: 20px;
  margin-bottom: 12px;
}

.legal-section p {
  line-height: 1.85;
  font-size: 0.95rem;
  margin-bottom: 18px;
  color: var(--text-secondary);
}

.legal-bullet-list {
  margin: 16px 0 24px 24px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.legal-bullet-list li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.legal-link {
  color: var(--accent);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.legal-link:hover {
  color: var(--accent-dark);
}

.highlight-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 26px 30px;
  margin: 28px 0;
  line-height: 1.85;
}

.legal-contact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  line-height: 1.8;
  margin-top: 18px;
}

/* Contact Page Layout & Spacing */
.contact-page-header {
  text-align: center;
  margin-bottom: 44px;
  padding-top: 12px;
}

.contact-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 36px;
  align-items: start;
}

.contact-info-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  line-height: 1.75;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.contact-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(26,86,219,0.10);
  transform: translateY(-2px);
}

.contact-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.contact-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 12px;
}

.contact-email-link {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: inline-block;
  transition: color var(--transition-fast);
}

.contact-email-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.contact-sla-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  line-height: 1.7;
}

.contact-form-column {
  width: 100%;
}

.contact-form-wrap {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-md);
}

.contact-form-wrap .form-group {
  margin-bottom: 22px;
}

.contact-form-wrap .form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-form-wrap .form-input,
.contact-form-wrap .form-select,
.contact-form-wrap .form-textarea {
  width: 100%;
  padding: 13px 16px;
  font-size: 0.92rem;
  line-height: 1.6;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.contact-form-wrap .form-input:focus,
.contact-form-wrap .form-select:focus,
.contact-form-wrap .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.ad-sponsor-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.70rem;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent);
}

@media (max-width: 860px) {
  .contact-layout-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .legal-doc-card {
    padding: 30px 22px;
  }
  .contact-form-wrap {
    padding: 26px 20px;
  }
}

/* ===================================================================
   14. HEADER AUTH BUTTONS & AUTHENTICATION PAGES (Sign In & Sign Up)
   =================================================================== */
.btn-signin {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-size: 0.80rem;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-signin:hover {
  background: var(--bg-secondary);
  border-color: var(--border-mid);
  color: var(--accent);
}

.btn-signup {
  background: var(--accent-gradient);
  color: #ffffff !important;
  border: 1px solid var(--accent);
  font-size: 0.80rem;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 4px rgba(26, 86, 219, 0.2);
}
.btn-signup:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(26, 86, 219, 0.3);
}

.user-session-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent);
  font-size: 0.80rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.btn-signout {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.76rem;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.btn-signout:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: var(--status-critical);
}

/* Auth Page Layout */
.auth-page-wrap {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  background: var(--bg-secondary);
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.auth-header {
  text-align: center;
  margin-bottom: 26px;
}
.auth-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.auth-title {
  font-family: var(--font-brand);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.25;
}
.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-form .form-group {
  margin-bottom: 18px;
}
.auth-form .form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.auth-form .form-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 0.90rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.auth-form .form-input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.auth-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.82rem;
}
.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
}
.auth-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}
.auth-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.btn-auth-submit {
  width: 100%;
  padding: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  justify-content: center;
  background: var(--accent-gradient);
  color: #ffffff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.25);
}
.btn-auth-submit:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 86, 219, 0.35);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}
.auth-divider span {
  padding: 0 12px;
}

.auth-demo-box {
  background: var(--bg-secondary);
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  margin-bottom: 20px;
}
.auth-demo-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.btn-demo-quick {
  background: #ffffff;
  border: 1px solid var(--border-mid);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-demo-quick:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 18px;
  display: none;
}
.auth-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.auth-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* ===================================================================
   15. ADMIN EDITOR ENHANCEMENTS & SEO PREVIEWS
   =================================================================== */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}
.badge-status-published {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-status-draft {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.input-slug-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.input-slug-prefix {
  padding: 10px 12px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.80rem;
  border-right: 1px solid var(--border-subtle);
  white-space: nowrap;
  user-select: none;
}
.input-slug-field {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
}

.editor-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 10px;
  padding-bottom: 6px;
}
.btn-editor-tab {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.btn-editor-tab.active {
  background: #eff6ff;
  color: var(--accent);
}
.editor-preview-box {
  min-height: 320px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow-y: auto;
  display: none;
}
.editor-preview-box.active {
  display: block;
}

.seo-preview-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
}
.seo-preview-url {
  font-size: 0.75rem;
  color: #202124;
  margin-bottom: 2px;
}
.seo-preview-title {
  font-size: 1.05rem;
  color: #1a0dab;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
}
.seo-preview-desc {
  font-size: 0.82rem;
  color: #4d5156;
  line-height: 1.4;
}

.auth-config-banner {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-config-banner.connected {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.auth-config-banner.disconnected {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* ===================================================================
   RICH ARTICLE MEDIA & DYNAMIC CONTENT STYLES (100% RESPONSIVE)
   =================================================================== */

/* Responsive Figures & Images */
.article-prose figure,
.article-prose .article-img-box {
  margin: 32px 0;
  width: 100%;
  text-align: center;
}

.article-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  display: block;
  margin: 0 auto;
}

.article-prose figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  line-height: 1.4;
}

/* Editorial Quotes & Pull Quotes */
.article-prose blockquote,
.article-prose .editorial-quote {
  margin: 30px 0;
  padding: 20px 26px;
  border-left: 4px solid var(--accent);
  background: var(--bg-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-primary);
  font-size: 1.08rem;
  line-height: 1.65;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.article-prose blockquote cite,
.article-prose .editorial-quote cite {
  display: block;
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  font-style: normal;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* Interactive / Chat Dialogue Snippets */
.article-prose .chat-dialogue {
  margin: 32px 0;
  padding: 22px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.article-prose .chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.90rem;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  word-break: break-word;
}

.article-prose .chat-msg-left {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 2px;
}

.article-prose .chat-msg-right {
  align-self: flex-end;
  background: var(--accent);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.article-prose .chat-msg-right .chat-sender {
  color: #bfdbfe;
}

.article-prose .chat-msg-right p {
  color: #ffffff;
}

.article-prose .chat-sender {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 4px;
}

.article-prose .chat-msg p {
  margin: 0;
  font-size: 0.90rem;
}

/* Strategic Intelligence Callout */
.article-prose .article-callout {
  margin: 28px 0;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: rgba(26, 86, 219, 0.06);
  border: 1px solid rgba(26, 86, 219, 0.20);
  border-left: 4px solid var(--accent);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.article-prose .callout-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.article-prose .callout-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Responsive Data Tables */
.article-prose .table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}

.article-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.article-prose th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-mid);
  white-space: nowrap;
}

.article-prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.article-prose tr:last-child td {
  border-bottom: none;
}

.article-prose tr:hover td {
  background: rgba(26, 86, 219, 0.02);
}

/* Media query for small mobile screens */
@media (max-width: 600px) {
  .article-prose .chat-msg {
    max-width: 95%;
  }
  .article-prose blockquote,
  .article-prose .editorial-quote {
    padding: 14px 18px;
    font-size: 0.98rem;
  }
}



