: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: 1rem 0;
}

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

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

.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; }
}
