:root {
  --igm-red: #e30613;
  --igm-red-dark: #b0050f;
  --igm-red-soft: rgba(227, 6, 19, 0.12);
  --bg: #111214;
  --surface: #1a1c1f;
  --text: #f5f5f5;
  --muted: #a3a8b3;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #60a5fa;
  --dash-bg: #f5f5f5;
  --card-bg: #ffffff;
  --card-dark: #1a1a1a;
  --chart-gray: #777777;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.65rem 1rem;
  background: rgba(17, 18, 20, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--igm-red);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text);
}

.brand:hover { text-decoration: none; }

.brand img {
  height: 42px;
  width: auto;
  display: block;
}

.brand-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-text span {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.nav-badge-live {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(74, 222, 128, 0.12);
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.hero {
  padding: 1.5rem 1rem 1rem;
  background: radial-gradient(ellipse 100% 80% at 50% -20%, rgba(227, 6, 19, 0.22) 0%, var(--bg) 65%);
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.45rem, 5vw, 2rem);
  letter-spacing: -0.02em;
}

.hero .sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 42rem;
}

.author-credit {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.author-credit strong { color: #fff; font-weight: 700; }

.live-notice {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 42rem;
}

.live-notice strong { color: #dbeafe; }

.disclaimer {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fde68a;
  font-size: 0.78rem;
  line-height: 1.5;
  max-width: 42rem;
}

.disclaimer strong { color: #fcd34d; }

.dashboard-shell {
  background: var(--dash-bg);
  color: var(--card-dark);
  padding-bottom: 1rem;
}

.kpi-strip {
  background: var(--igm-red);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.kpi {
  flex: 1 1 120px;
  text-align: center;
  padding: 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kpi:last-child { border-right: none; }

.kpi-value {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.kpi-label {
  font-size: clamp(0.6rem, 1.5vw, 0.72rem);
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.dashboard-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.card-wide { grid-column: 1 / -1; }

.card-header {
  background: var(--card-dark);
  color: #fff;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-header .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--igm-red);
  flex-shrink: 0;
}

.card-header h2 {
  margin: 0;
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  font-weight: 600;
}

.card-body { padding: 1.25rem; }

.chart-wrap {
  position: relative;
  height: clamp(240px, 35vw, 320px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
  padding: 1.25rem;
}

.stat-box {
  background: var(--dash-bg);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  border-top: 3px solid var(--igm-red);
}

.stat-box .big {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 800;
  color: var(--card-dark);
}

.stat-box .label {
  font-size: clamp(0.65rem, 1.4vw, 0.75rem);
  color: var(--chart-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.stat-box .sub {
  font-size: clamp(0.7rem, 1.5vw, 0.8rem);
  color: #444;
  margin-top: 5px;
}

.footer-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 1.5rem 1rem 2rem;
  line-height: 1.6;
  background: var(--bg);
}

.footer-note a { color: #93c5fd; }
.footer-note strong { color: #fff; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    padding: 0.875rem 0.75rem;
    gap: 0.875rem;
  }

  .card-wide { grid-column: auto; }
  .chart-wrap { height: 260px; }
  .stats-grid { padding: 0.875rem; gap: 0.625rem; }
  .kpi { flex: 1 1 90px; padding: 10px 8px; }
  .nav-links { display: none; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .kpi { flex: 1 1 80px; }
}
