:root {
  --primary: #1a56db;
  --primary-hover: #1e429f;
  --secondary: #0e9f6e;
  --accent: #e02424;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.badge-live {
  background: #def7ec;
  color: #03543f;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* Hero */
.hero {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 720px;
  margin: 0 auto 1.5rem;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.kpi-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
}

.kpi-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }

/* Section Styling */
.section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.chart-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-toggle {
  background: #f3f4f6;
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.btn-toggle.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Charts Grid */
.charts-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 340px;
}

/* Table */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
  user-select: none;
}

th:hover {
  color: var(--primary);
}

tr:hover td {
  background: #f3f4f6;
}

.search-box {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  width: 100%;
  max-width: 280px;
}

/* Looker Studio Embed Section */
.embed-card {
  background: #1e293b;
  color: #f8fafc;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.embed-card h2 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.embed-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.embed-tab-btn {
  background: #334155;
  color: #cbd5e1;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.embed-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.iframe-container {
  position: relative;
  width: 100%;
  height: 720px;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.desktop-notice {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

/* SEO Content & FAQ */
.seo-content {
  padding: 1.75rem 2rem;
}

.faq-item {
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-question {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.faq-answer {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Ad Placements */
.ad-slot {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f3f4f6;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.8rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .charts-grid-2 { grid-template-columns: 1fr; }
  .iframe-container { height: 480px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .chart-wrapper { height: 260px; }
}


/* Navigation, Editorial Articles, Guides & Multi-Column Footer (v3) */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: #eff6ff;
}

.hero-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.pill-link {
  background: #ffffff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}

.pill-link:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.editorial-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: #111827;
}

.editorial-card p {
  color: #374151;
  font-size: 0.96rem;
  margin-bottom: 0.85rem;
}

.editorial-list {
  padding-left: 1.4rem;
  margin: 0.75rem 0 1rem;
  color: #374151;
  font-size: 0.95rem;
}

.editorial-list li {
  margin-bottom: 0.6rem;
}

.editorial-list a,
.faq-answer a,
.report-article a,
.table-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.editorial-list a:hover,
.faq-answer a:hover,
.report-article a:hover,
.table-link:hover {
  text-decoration: underline;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: #bfdbfe;
  background: #ffffff;
}

.guide-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.45rem;
}

.guide-card h3 {
  font-size: 1.08rem;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.guide-card h3 a {
  color: #111827;
  text-decoration: none;
}

.guide-card h3 a:hover {
  color: var(--primary);
}

.guide-card p {
  font-size: 0.88rem;
  color: #4b5563;
  margin-bottom: 1rem;
}

.guide-read-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 1.5rem 0 0.75rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.report-article {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.report-article h1 {
  font-size: 1.95rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.article-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.report-article h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin: 1.85rem 0 0.75rem;
}

.report-article p {
  color: #374151;
  font-size: 0.98rem;
  margin-bottom: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr;
  gap: 2rem;
}

.footer-links {
  list-style: none;
  margin-top: 0.6rem;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: #4b5563;
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .header-content {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
  }
  .report-article {
    padding: 1.35rem;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
