/*
 * Whitman Pro Insights - Premium Core Styles v3
 * Mega Menu · Dark Mode · Search · Progress Bar · Breadcrumbs · Trust Logos · Gated Content · Charts
 */

:root {
  --primary-color: #0b2545;
  --secondary-color: #166534;
  --accent-color: #f59e0b;
  --bg-color: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --surface-alt: #ffffff;
  --surface-hero: #f1f5f9;
  --surface-code: #f1f5f9;
  --shadow-color: rgba(0, 0, 0, 0.1);

  --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px 0 var(--shadow-color), 0 1px 2px -1px var(--shadow-color);
  --shadow-md: 0 10px 15px -3px var(--shadow-color), 0 4px 6px -4px var(--shadow-color);
  --shadow-lg: 0 20px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);

  --max-width: 1200px;
  --header-height: 72px;

  --mega-width: 820px;

  --progress-height: 3px;
  --progress-color: var(--accent-color);
}

[data-theme="dark"] {
  --primary-color: #e2e8f0;
  --secondary-color: #4ade80;
  --accent-color: #fbbf24;
  --bg-color: #0f172a;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  --card-bg: #1e293b;
  --surface-alt: #1e293b;
  --surface-hero: #0f172a;
  --surface-code: #1e293b;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.3);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.skip-nav {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 10000;
  font-weight: 700;
  transition: top 0.2s ease;
}
.skip-nav:focus {
  top: 0;
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  font-weight: 800;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: 1.5rem; }
p { margin-bottom: var(--spacing-sm); }

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover { color: var(--secondary-color); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

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

.section {
  padding: var(--spacing-lg) 0;
}

.section-alt {
  background-color: var(--surface-alt);
}

.asym-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 768px) {
  .asym-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
  .asym-grid.reverse {
    grid-template-columns: 1fr 1.2fr;
  }
}

/* ─────────────────── Reading Progress Bar ─────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: var(--progress-height);
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  z-index: 1001;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ─────────────────── Header v3 ─────────────────── */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 36px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-item > a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-item > a:hover {
  background-color: var(--bg-color);
  color: var(--secondary-color);
}

.nav-item > a::after {
  display: none;
}

.nav-item.has-mega > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--text-muted);
  margin-left: 0.35rem;
  transition: transform 0.2s ease;
}

.nav-item.has-mega:hover > a::after {
  transform: rotate(180deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
}
.search-toggle:hover {
  color: var(--primary-color);
  background-color: var(--bg-color);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-outline-primary {
  background: transparent;
  border: 1.5px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}

[data-theme="dark"] .btn-outline-primary {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
[data-theme="dark"] .btn-outline-primary:hover {
  background: var(--accent-color);
  color: #0f172a;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
  padding: 0.25rem;
}

/* ─────────────────── Mega Menu ─────────────────── */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: var(--mega-width);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
  transform: translateX(-50%) translateY(8px);
  z-index: 200;
  pointer-events: none;
}

.nav-item.has-mega:hover .mega-menu,
.nav-item.has-mega.mega-active .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 0;
}

.mega-col {
  padding: 1.5rem;
  border-right: 1px solid var(--border-color);
}
.mega-col:last-child {
  border-right: none;
}

.mega-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 700;
}

.mega-col ul {
  list-style: none;
}

.mega-col li {
  margin-bottom: 0.5rem;
}

.mega-col a {
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  display: block;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.mega-col a:hover {
  background: var(--bg-color);
  color: var(--secondary-color);
  padding-left: 0.75rem;
}

.mega-featured {
  background: var(--bg-color);
  border-radius: 0 0 var(--radius-md) 0;
}

.mega-featured-card {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
.mega-featured-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mega-featured-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.mega-featured-card > div {
  padding: 0.75rem 1rem;
}

.mega-featured-tag {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mega-featured-card p {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0;
}

/* ─────────────────── Search Overlay ─────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}
.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-overlay-inner {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 640px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 75vh;
  display: flex;
  flex-direction: column;
}
.search-overlay.active .search-overlay-inner {
  transform: translateY(0) scale(1);
}

.search-overlay-inner h2 {
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.search-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  transition: color 0.2s ease;
}
.search-close:hover {
  color: var(--text-main);
}

.search-box {
  position: relative;
  margin-bottom: 1rem;
}
.search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-family: inherit;
  background: var(--bg-color);
  color: var(--text-main);
  transition: border-color 0.2s ease;
}
.search-box input:focus {
  outline: none;
  border-color: var(--secondary-color);
}
.search-box svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-results {
  overflow-y: auto;
  flex: 1;
}

.search-result-item {
  display: block;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  margin-bottom: 0.5rem;
}
.search-result-item:hover {
  background: var(--bg-color);
  border-color: var(--border-color);
}

.search-result-item h4 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.search-result-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.4;
}

.search-result-item .search-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: #dbeafe;
  color: #1e40af;
  margin-top: 0.35rem;
}

.search-no-results {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.search-overlay-inner {
  position: relative;
}

/* ─────────────────── Breadcrumb ─────────────────── */
.breadcrumb {
  padding: 0.75rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-color);
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
.breadcrumb li {
  display: flex;
  align-items: center;
}
.breadcrumb a {
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s ease;
}
.breadcrumb a:hover {
  color: var(--secondary-color);
}
.breadcrumb-sep {
  margin: 0 0.5rem;
  color: var(--border-color);
  font-size: 1rem;
}
.breadcrumb-current {
  color: var(--text-main);
  font-weight: 600;
}

/* ─────────────────── Dark Mode Toggle ─────────────────── */
.dark-toggle-wrap {
  margin-top: 1rem;
}
.dark-toggle {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: all 0.2s ease;
  color: var(--text-muted);
}
.dark-toggle:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ─────────────────── Mobile Menu Overlay ─────────────────── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1023px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--card-bg);
    flex-direction: column;
    padding: 5rem var(--spacing-md) var(--spacing-md);
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--border-color);
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    gap: 0;
  }
  .nav-links.active {
    display: flex;
    transform: translateX(0);
  }
  .nav-item > a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
  }
  .mega-menu {
    display: none !important;
  }
  .nav-actions {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
    z-index: 101;
  }
}

/* ─────────────────── Footer v3 ─────────────────── */
.site-footer {
  background: #0b2545;
  color: white;
  padding: var(--spacing-lg) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
}

[data-theme="dark"] .site-footer {
  background: #020617;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.footer-col h4 {
  color: white;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.95rem;
}

.footer-col a:hover {
  color: white;
}

.footer-contact {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.footer-trust {
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
  text-align: center;
}

.footer-trust-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.trust-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.trust-logo {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}
.trust-logo:hover {
  background: rgba(255,255,255,0.12);
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #94a3b8;
  font-size: 0.875rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  max-width: 800px;
  margin: 0.5rem auto 0;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
}

/* ─────────────────── Cards ─────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .card-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid.featured {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: #cbd5e1;
}

.card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.article-card .card-img {
  margin-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.article-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.article-card .article-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}
.tag-analysis { background: #dbeafe; color: #1e40af; }
.tag-regulatory { background: #dcfce7; color: #166534; }
.tag-market { background: #fef3c7; color: #92400e; }
.tag-infrastructure { background: #ede9fe; color: #5b21b6; }

[data-theme="dark"] .tag-analysis { background: rgba(59,130,246,0.15); color: #93c5fd; }
[data-theme="dark"] .tag-regulatory { background: rgba(34,197,94,0.15); color: #86efac; }
[data-theme="dark"] .tag-market { background: rgba(245,158,11,0.15); color: #fcd34d; }
[data-theme="dark"] .tag-infrastructure { background: rgba(139,92,246,0.15); color: #c4b5fd; }

.article-card .article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.article-card .article-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  line-height: 1.6;
}

/* ─────────────────── Buttons ─────────────────── */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(11, 37, 69, 0.2);
}
[data-theme="dark"] .btn-primary {
  background: var(--accent-color);
  color: #0f172a;
  box-shadow: 0 4px 6px rgba(251,191,36,0.2);
}

.btn-primary:hover {
  background: #1e3a8a;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(11, 37, 69, 0.3);
}
[data-theme="dark"] .btn-primary:hover {
  background: #f59e0b;
}

.btn-secondary {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.btn-green {
  background: var(--secondary-color);
  color: white;
  box-shadow: 0 4px 6px rgba(22, 101, 52, 0.2);
}
.btn-green:hover {
  background: #15803d;
  color: white;
  transform: translateY(-2px);
}

/* ─────────────────── Article Styles ─────────────────── */
.article-header {
  max-width: 880px;
  margin: 0 auto var(--spacing-lg);
  text-align: center;
}

.article-meta {
  display: flex;
  gap: var(--spacing-md);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.article-content {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.article-content h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.article-content h3 {
  margin-top: 2rem;
}

.article-content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

.article-content blockquote {
  border-left: 4px solid var(--secondary-color);
  margin: 2rem 0;
  font-style: italic;
  background: rgba(22, 101, 52, 0.06);
  padding: 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--secondary-color);
  font-size: 1.15rem;
}

[data-theme="dark"] .article-content blockquote {
  background: rgba(74, 222, 128, 0.08);
}

/* ─────────────────── Article Layout with Sticky TOC ─────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 220px 1fr;
  }
}

.sticky-toc {
  display: none;
}

@media (min-width: 1024px) {
  .sticky-toc {
    display: block;
    position: sticky;
    top: calc(var(--header-height) + 1.5rem);
    align-self: start;
    max-height: calc(100vh - var(--header-height) - 3rem);
    overflow-y: auto;
  }
  .sticky-toc nav {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
  }
  .sticky-toc p {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
  }
  .sticky-toc ul {
    list-style: none;
    padding-left: 0;
  }
  .sticky-toc li {
    margin-bottom: 0.4rem;
  }
  .sticky-toc a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    display: block;
    padding: 0.25rem 0.5rem;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.15s ease;
    line-height: 1.35;
  }
  .sticky-toc a:hover {
    color: var(--secondary-color);
    background: var(--bg-color);
  }
  .sticky-toc a.active {
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    background: rgba(22, 101, 52, 0.05);
    font-weight: 600;
  }
  [data-theme="dark"] .sticky-toc a.active {
    background: rgba(74, 222, 128, 0.08);
  }
}

/* ─────────────────── Forms ─────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

.form-control {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--card-bg);
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.form-control.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-error-msg {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 600;
}

.form-success {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(22, 101, 52, 0.06);
  border: 2px solid var(--secondary-color);
  border-radius: var(--radius-lg);
}
.form-success-icon {
  width: 64px;
  height: 64px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.form-success-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}
.form-success h3 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.form-success p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ─────────────────── FAQ Accordion ─────────────────── */
.faq-item {
  margin-bottom: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-item.open {
  border-color: var(--secondary-color);
  box-shadow: var(--shadow-md);
}

.faq-q {
  font-weight: 800;
  color: var(--primary-color);
  font-size: 1.05rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  transition: background-color 0.2s ease;
}
.faq-q:hover {
  background-color: var(--bg-color);
}
.faq-q::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--secondary-color);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.faq-item.open .faq-q::after {
  transform: rotate(45deg);
}

.faq-a {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s ease;
}
.faq-item.open .faq-a {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
}

/* ─────────────────── Inline TOC ─────────────────── */
.toc {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 2rem;
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.toc p {
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc li {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  position: relative;
}

.toc li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

.toc a {
  color: var(--text-main);
  font-weight: 500;
}

.toc a:hover {
  color: var(--secondary-color);
}

/* ─────────────────── Hero Section ─────────────────── */
.hero-section {
  background: linear-gradient(to bottom, var(--surface-hero) 0%, var(--bg-color) 100%);
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  overflow: hidden;
}

.page-hero {
  background-color: #0b2545;
  color: white;
  padding: var(--spacing-lg) 0;
}
.page-hero h1 {
  color: white;
}
.page-hero .hero-subtitle {
  font-size: 1.25rem;
  color: #cbd5e1;
  font-weight: 300;
}

[data-theme="dark"] .page-hero {
  background-color: #020617;
}

/* ─────────────────── Credibility Bar ─────────────────── */
.cred-bar {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 2rem 0;
}
.cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .cred-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}
.cred-item-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
}
.cred-item-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─────────────────── Signal Section ─────────────────── */
.signal-section {
  background-color: #0b2545;
  color: white;
}
[data-theme="dark"] .signal-section {
  background-color: #020617;
  border: 1px solid #1e293b;
}
.signal-section .signal-icon {
  margin-bottom: 1rem;
}
.signal-section .signal-quote {
  font-size: 1.25rem;
  font-style: italic;
  color: #e2e8f0;
  margin-bottom: 1.5rem;
  font-weight: 300;
}
.signal-section .signal-author {
  font-weight: 700;
  font-size: 1.1rem;
}
.signal-section .signal-role {
  font-size: 0.875rem;
  color: #94a3b8;
}

/* ─────────────────── Lead Magnet / CTA Banner ─────────────────── */
.lead-magnet {
  background: linear-gradient(135deg, #0b2545 0%, #1e3a5f 100%);
  color: white;
  padding: var(--spacing-lg) 0;
}
.lead-magnet h2 {
  color: white;
}
.lead-magnet p {
  color: #cbd5e1;
  font-size: 1.1rem;
}
.lead-magnet-form {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 1.5rem auto 0;
}
@media (max-width: 600px) {
  .lead-magnet-form {
    flex-direction: column;
  }
}
.lead-magnet-form input {
  flex: 1;
  padding: 1rem;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 1rem;
  font-family: inherit;
}
.lead-magnet-form input::placeholder {
  color: rgba(255,255,255,0.5);
}
.lead-magnet-form input:focus {
  outline: none;
  border-color: var(--accent-color);
  background: rgba(255,255,255,0.15);
}

/* ─────────────────── Article Filter Tabs ─────────────────── */
.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  justify-content: center;
}
.filter-tab {
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-muted);
  transition: all 0.2s ease;
}
.filter-tab:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.filter-tab.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* ─────────────────── Editorial Banner ─────────────────── */
.editorial-banner {
  background: #fffbeb;
  color: #b45309;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #fcd34d;
}

[data-theme="dark"] .editorial-banner {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-bottom-color: rgba(245, 158, 11, 0.2);
}

/* ─────────────────── Cookie Consent Banner ─────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  padding: 1.25rem var(--spacing-md);
  z-index: 9999;
  border-top: 3px solid var(--primary-color);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.visible {
  transform: translateY(0);
}
.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.cookie-text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
}
.cookie-text a {
  color: var(--primary-color);
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}
.cookie-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.cookie-accept {
  background: var(--primary-color);
  color: white;
}
.cookie-accept:hover {
  background: #1e3a8a;
}
.cookie-reject {
  background: var(--bg-color);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.cookie-reject:hover {
  background: var(--border-color);
}

@media (max-width: 768px) {
  .cookie-banner-inner {
    flex-direction: column;
    text-align: center;
  }
  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
}

/* ─────────────────── Gated Content / Whitepaper ─────────────────── */
.gated-hero {
  background: linear-gradient(135deg, #0b2545 0%, #1e3a5f 50%, #166534 100%);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gated-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.gated-hero h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
}
.gated-hero p {
  color: #cbd5e1;
  font-size: 1.15rem;
}

.gated-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: #fbbf24;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.gated-form-wrap {
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(8px);
}

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

.gated-form-wrap label {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
}

.gated-form-wrap input,
.gated-form-wrap select {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}
.gated-form-wrap input:focus,
.gated-form-wrap select:focus {
  outline: none;
  border-color: var(--accent-color);
}
.gated-form-wrap input::placeholder {
  color: rgba(255,255,255,0.4);
}
.gated-form-wrap select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.gated-form-wrap select option {
  background: #1e293b;
  color: white;
}

.gated-form-privacy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1rem;
}
.gated-form-privacy a {
  color: #94a3b8;
  text-decoration: underline;
}

.wp-toc-list {
  list-style: none;
  padding-left: 0;
  counter-reset: wp-toc;
}
.wp-toc-list li {
  counter-increment: wp-toc;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}
.wp-toc-list li::before {
  content: counter(wp-toc, decimal-leading-zero);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary-color);
  flex-shrink: 0;
  min-width: 2.5rem;
}
.wp-toc-list li:last-child {
  border-bottom: none;
}
.wp-toc-list h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
  color: var(--text-main);
}
.wp-toc-list p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ─────────────────── Client Portal ─────────────────── */
.portal-hero {
  background: linear-gradient(135deg, #0b2545 0%, #1a365d 100%);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  text-align: center;
}
.portal-hero h1 {
  color: white;
}
.portal-hero p {
  color: #cbd5e1;
  font-size: 1.1rem;
}

.portal-login-card {
  max-width: 440px;
  margin: -3rem auto 0;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 10;
}

.portal-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: var(--spacing-lg);
}
@media (min-width: 768px) {
  .portal-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portal-feature {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.portal-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.portal-feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(22, 101, 52, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--secondary-color);
}
.portal-feature h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.portal-feature p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ─────────────────── Chart Container ─────────────────── */
.chart-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}
.chart-container canvas {
  width: 100% !important;
  max-height: 400px;
}
.chart-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
  font-style: italic;
}
.chart-source {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: right;
}

/* ─────────────────── Regional Page ─────────────────── */
.region-hero {
  background: linear-gradient(135deg, #0b2545 0%, #1e3a5f 100%);
  color: white;
  padding: var(--spacing-lg) 0;
  position: relative;
  overflow: hidden;
}
.region-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
}
.region-hero h1 {
  color: white;
}
.region-hero p {
  color: #cbd5e1;
  font-size: 1.1rem;
}

.region-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
@media (min-width: 768px) {
  .region-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
.region-stat {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}
.region-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--secondary-color);
}
.region-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

.region-map-placeholder {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ─────────────────── Utilities ─────────────────── */
.content-680 { max-width: 680px; }
.content-780 { max-width: 780px; }
.content-880 { max-width: 880px; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ─────────────────── Scroll Animations ─────────────────── */
.animate-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ─────────────────── Related Articles Grid ─────────────────── */
.related-articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 600px) {
  .related-articles {
    grid-template-columns: 1fr 1fr;
  }
}
.related-article-link {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  align-items: flex-start;
}
.related-article-link:hover {
  border-color: var(--secondary-color);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}
.related-article-link img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.related-article-info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.related-article-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─────────────────── Keyframes ─────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────── Print Styles ─────────────────── */
@media print {
  .site-header, .site-footer, .cookie-banner,
  .mobile-overlay, .reading-progress, .search-overlay,
  .dark-toggle-wrap, .sticky-toc, .nav-actions { display: none !important; }
  body { background: white; color: black; font-size: 12pt; }
  .container { max-width: 100%; }
  a { color: black; text-decoration: underline; }
}
