* {
  box-sizing: border-box;
}

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.06);
  --blue: #2563eb;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

.topbar {
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.22), transparent 30%),
    linear-gradient(135deg, #0f172a 0%, #111827 55%, #1e293b 100%);
  color: white;
  padding: 28px 24px 26px;
}

.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.eyebrow,
.section-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  color: #93c5fd;
  margin-bottom: 12px;
}

.topbar h1 {
  margin: 0 0 10px 0;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #dbeafe;
  max-width: 780px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  align-self: center;
}

.hero-card-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
  margin-bottom: 8px;
  font-weight: 700;
}

.hero-card-value {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}

.hero-card-text {
  font-size: 14px;
  line-height: 1.5;
  color: #dbeafe;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.controls-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  padding: 14px 24px;
  flex-wrap: wrap;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.controls select {
  padding: 10px 12px;
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow-soft);
}

.meta-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.meta-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
}

.meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

.meta-value {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.page {
  width: 100%;
}

.map-section,
.methodology-section,
.tables-section {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.map-section {
  padding-top: 22px;
  padding-bottom: 6px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}

.section-header h2,
.card h2 {
  margin: 4px 0 0 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-kicker {
  color: var(--blue);
}

.section-note {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

#map {
  width: 100%;
  height: 58vh;
  min-height: 380px;
  max-height: 620px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.legend {
  margin-top: 14px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.methodology-section,
.tables-section {
  padding-top: 18px;
  padding-bottom: 28px;
}

.card {
  background: var(--surface);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.card p {
  line-height: 1.65;
  margin: 0 0 14px 0;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.info-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.info-tile h3 {
  margin: 0 0 8px 0;
  font-size: 17px;
  color: var(--text);
}

.info-tile p {
  margin: 0;
  font-size: 14px;
}

.formula-box {
  margin: 18px 0;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  padding: 16px;
}

.formula-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.formula {
  margin: 0;
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.prototype-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  padding: 14px 16px;
  color: #9a3412 !important;
  margin-top: 10px !important;
}

.tables-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
}

tbody tr:hover {
  background: #f8fbff;
}

@media (max-width: 980px) {
  .topbar-inner {
    grid-template-columns: 1fr;
  }

  .section-header {
    display: block;
  }

  .section-note {
    margin-top: 10px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #map {
    height: 46vh;
    min-height: 300px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .map-section,
  .methodology-section,
  .tables-section,
  .controls-inner,
  .meta-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .card {
    padding: 16px;
  }

  .section-header h2,
  .card h2 {
    font-size: 22px;
  }

  .source-list {
  margin: 10px 0 18px 0;
  padding-left: 20px;
  color: var(--muted);
}

.source-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}
}