:root {
  --bg: #050b12;
  --bg-soft: #08101a;
  --surface: #0b1420;
  --surface-2: #0f1a28;
  --surface-3: #132131;
  --surface-soft: #0d1826;
  --border: #203247;
  --border-strong: #35506d;
  --text: #e8eef5;
  --muted: #8ea4bc;
  --primary: #8ec5ff;
  --primary-strong: #d7ecff;
  --accent: #f08a24;
  --accent-soft: #4c2f13;
  --teal: #35c2c1;
  --danger: #ff6b6b;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 12px;
  --radius-sm: 10px;
  --container: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background:
    linear-gradient(rgba(10, 18, 28, 0.92), rgba(5, 11, 18, 0.98)),
    linear-gradient(90deg, rgba(32, 50, 71, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(32, 50, 71, 0.16) 1px, transparent 1px),
    #050b12;
  background-size: auto, 28px 28px, 28px 28px, auto;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: #ffffff; }
p { margin: 0 0 1rem; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.page-shell { padding: 20px 0 48px; }

h1, h2, h3, .logo-title, .site-logo {
  margin: 0;
  letter-spacing: -0.025em;
}
h1 {
  font-size: clamp(2.25rem, 4vw, 3.9rem);
  line-height: 1.02;
  font-weight: 800;
}
h2 {
  font-size: 1.08rem;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
strong,
.data-point strong,
.hero-stat-panel strong,
.metric-card strong,
.trend-card__value,
.meta-strip__item strong,
.fact-card strong,
.ranking-list li strong,
.logo-mark {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5, 11, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(53, 80, 109, 0.75);
}
.topline {
  background: #03080d;
  color: rgba(232, 238, 245, 0.74);
  border-bottom: 1px solid rgba(53, 80, 109, 0.4);
}
.topline-row {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  font-size: .74rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.header-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
}
.site-logo {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  color: var(--text);
}
.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(142, 197, 255, 0.35);
  background: linear-gradient(180deg, #102132 0%, #0b1624 100%);
  color: var(--primary-strong);
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: .12em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), 0 8px 24px rgba(0,0,0,0.28);
}
.logo-copy { display: flex; flex-direction: column; min-width: 0; }
.logo-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f8fbff;
}
.logo-subtitle {
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.site-nav, .header-tools, .lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.site-nav a, .lang-switcher a {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.site-nav a:hover, .lang-switcher a:hover, .lang-switcher a.active {
  background: rgba(19, 33, 49, 0.86);
  border-color: rgba(53, 80, 109, 0.95);
  color: #ffffff;
}
.search-bar-wrap { padding: 0 0 14px; }
.global-search {
  position: relative;
  max-width: 760px;
}
.global-search::before {
  content: "QUERY";
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--muted);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.global-search input {
  width: 100%;
  height: 58px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, #0d1826 0%, #09131f 100%);
  padding: 18px 16px 0;
  font-size: 1rem;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02), var(--shadow);
}
.global-search input::placeholder { color: #86a0bc; }
.global-search input:focus,
select:focus,
input[type="search"]:focus {
  outline: none;
  border-color: rgba(142, 197, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 0 3px rgba(142, 197, 255, 0.12);
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: none;
  background: #0d1826;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-suggestions.show { display: block; }
.search-suggestions a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text);
  border-bottom: 1px solid rgba(32, 50, 71, 0.75);
}
.search-suggestions a:last-child { border-bottom: 0; }
.search-suggestions a:hover { background: #132131; }

.card {
  background: linear-gradient(180deg, rgba(15, 26, 40, 0.98) 0%, rgba(11, 20, 32, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 20%);
  pointer-events: none;
}
.hero-card,
.page-title { padding: 26px; }
.hero-card,
.country-hero,
.indicator-hero,
.compare-hero {
  border-color: rgba(53, 80, 109, 0.95);
  background:
    radial-gradient(circle at top right, rgba(53, 194, 193, 0.12), transparent 28%),
    radial-gradient(circle at left bottom, rgba(240, 138, 36, 0.10), transparent 24%),
    linear-gradient(180deg, #101b2a 0%, #0a1320 100%);
}
.hero-split,
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr);
  gap: 24px;
  align-items: start;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(142, 197, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(142, 197, 255, 0.18);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.lead {
  color: #c7d6e6;
  font-size: 1.02rem;
  max-width: 72ch;
}
.notice-inline {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(8, 16, 26, 0.82);
  border: 1px solid rgba(53, 80, 109, 0.86);
  border-left: 3px solid var(--accent);
  color: #d9e6f3;
}
.hero-aside {
  display: grid;
  gap: 12px;
}
.data-point,
.hero-note,
.hero-stat-panel,
.meta-strip__item {
  background: linear-gradient(180deg, rgba(16, 29, 44, 0.98) 0%, rgba(10, 20, 32, 0.98) 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.data-point span,
.hero-note span,
.hero-stat-panel span,
.metric-label,
.meta-strip__item span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.data-point strong,
.hero-stat-panel strong,
.metric-card strong,
.trend-card__value,
.meta-strip__item strong {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.02;
  color: #f7fbff;
  letter-spacing: -.03em;
}
.hero-note p:last-child,
.data-point p:last-child,
.hero-stat-panel small:last-child { margin-bottom: 0; }
.hero-stat-panel small,
.metric-card small,
.trend-card__year,
.fact-card small,
.mini-card span,
.fact-card span,
.map-note,
.list-links,
.compare-promo-card__intro p,
.bullet-list,
.site-footer p {
  color: var(--muted);
}
.hero-stat-panel--compact strong { font-size: 1.75rem; }

.meta-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(19, 33, 49, 0.9);
  border: 1px solid rgba(53, 80, 109, 0.9);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

.card-grid,
.dashboard-grid,
.grid-two,
.facts-grid,
.trend-grid {
  display: grid;
  gap: 16px;
}
.dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.facts-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.trend-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 22px; }

.mini-card,
.fact-card,
.trend-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  background: linear-gradient(180deg, rgba(18, 31, 47, 0.96) 0%, rgba(11, 20, 32, 0.96) 100%);
  border: 1px solid rgba(32, 50, 71, 0.92);
  border-radius: 8px;
  padding: 15px;
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.mini-card:hover,
.fact-card:hover,
.trend-card:hover {
  transform: translateY(-2px);
  border-color: rgba(142, 197, 255, 0.55);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.34);
}
.mini-card strong,
.fact-card strong { font-size: 1.03rem; color: #ffffff; }
.facts-grid--country .fact-card--featured {
  background: linear-gradient(180deg, rgba(17, 34, 52, 1) 0%, rgba(12, 24, 38, 1) 100%);
  border-color: rgba(142, 197, 255, 0.42);
}
.facts-grid--country .fact-card--featured strong { font-size: 1.38rem; }
.trend-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(11, 19, 29, 0.98) 0%, rgba(8, 15, 24, 0.98) 100%);
}
.trend-card__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.trend-card__head h2 {
  font-size: .94rem;
  color: var(--primary-strong);
}
.text-link {
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.text-link:hover { color: #ffffff; }
.sparkline-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 12px;
}

.ranking-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: rank;
}
.ranking-list li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0 12px 38px;
  border-bottom: 1px solid rgba(32, 50, 71, 0.92);
  position: relative;
}
.ranking-list li::before {
  content: counter(rank, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--accent);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .08em;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.ranking-list li:last-child { border-bottom: 0; }
.ranking-list li strong { color: #ffffff; font-size: .94rem; }
.ranking-list li a { color: #dce7f3; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.ghost-button,
.primary-button,
.tab-button,
.button-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, #112031 0%, #0c1724 100%);
  color: var(--text);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .8rem;
}
.ghost-button:hover,
.tab-button:hover,
.button-link:hover {
  border-color: rgba(142, 197, 255, 0.6);
  color: #ffffff;
}
.primary-button,
.button-link.primary-button {
  background: linear-gradient(180deg, #f39a36 0%, #d97410 100%);
  border-color: rgba(240, 138, 36, 0.8);
  color: #08101a;
}
.primary-button:hover,
.button-link.primary-button:hover {
  background: linear-gradient(180deg, #ffad52 0%, #e17e1d 100%);
  color: #050b12;
}

.filters-inline,
.compare-inline-form,
.tool-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  align-items: end;
}
.filters-inline--indicator {
  grid-template-columns: minmax(160px, 220px) minmax(240px, 1fr) auto;
}
.filters-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filters-inline label,
.compare-inline-form label,
.tool-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 700;
  color: #dce7f3;
}
select,
input[type="search"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font: inherit;
  background: #0c1724;
  color: var(--text);
}
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #8ea4bc 50%), linear-gradient(135deg, #8ea4bc 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
select[multiple] {
  min-height: 290px;
  background-image: none;
  padding-right: 14px;
}
.meta-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.meta-strip__item { min-width: 150px; }
.meta-strip__item strong { font-size: 1.22rem; }

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: .82rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.breadcrumbs .sep { color: var(--border-strong); }
.list-links {
  display: grid;
  gap: 10px;
}
.list-links a {
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(15, 26, 40, 0.94);
  border: 1px solid rgba(32, 50, 71, 0.9);
  color: #dce7f3;
}
.list-links a:hover {
  border-color: rgba(142, 197, 255, 0.45);
}

.metric-card {
  padding: 18px;
  background: linear-gradient(180deg, #101b29 0%, #0b1420 100%);
}
.metric-card--a { border-top: 2px solid var(--primary); }
.metric-card--b { border-top: 2px solid var(--accent); }
.compare-metrics-grid { margin-bottom: 22px; }
.compare-promo-card,
.compare-context-card { height: 100%; }
.compare-promo-card__intro p:last-child { margin-bottom: 0; }
.bullet-list {
  margin: 0;
  padding-left: 18px;
}
.bullet-list li + li { margin-top: 8px; }

.chart-card { overflow: hidden; }
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(32, 50, 71, 0.95);
  border-radius: 8px;
  background: #07111d;
}
.tabs-header {
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tabs-header--underline {
  border-bottom: 1px solid rgba(32, 50, 71, 0.95);
}
.tab-button {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 0 12px;
  color: var(--muted);
  position: relative;
  box-shadow: none;
}
.tab-button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: transparent;
}
.tab-button.active {
  color: #ffffff;
}
.tab-button.active::after {
  background: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.table-wrap { overflow-x: auto; }
.table-wrap--tight { max-width: 100%; }
table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
}
thead th {
  text-align: left;
  font-size: .74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
th, td {
  padding: 11px 10px;
  border-bottom: 1px solid rgba(32, 50, 71, 0.92);
}
tbody tr:hover { background: rgba(19, 33, 49, 0.55); }
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(53, 80, 109, 0.95);
  background: #0d1826;
  color: var(--text);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}
.page.active {
  background: var(--accent);
  color: #07111d;
  border-color: rgba(240, 138, 36, 0.88);
}
.map-shell { min-height: 420px; }
#choropleth-map {
  min-height: 420px;
  background: linear-gradient(180deg, #07111d 0%, #0a1622 100%);
  border: 1px solid rgba(32, 50, 71, 0.95);
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
}
#choropleth-map svg { width: 100%; height: auto; display: block; }

.site-footer {
  background: #02060b;
  color: rgba(232, 238, 245, 0.86);
  border-top: 1px solid rgba(53, 80, 109, 0.6);
}
.site-footer a { color: var(--primary); }
.site-footer a:hover { color: #ffffff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  padding: 24px 0 34px;
}
.footer-title {
  font-size: .92rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.card-empty { color: var(--muted); padding: 14px 0; }

@media (max-width: 1024px) {
  .header-row,
  .hero-split,
  .hero-grid,
  .filters-inline--indicator {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .container { width: min(var(--container), calc(100% - 24px)); }
  .card, .hero-card, .page-title { padding: 18px; }
  .topline-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 0;
  }
  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .site-nav a { white-space: nowrap; }
  .facts-grid--country .fact-card--featured strong { font-size: 1.18rem; }
}

@media (max-width: 560px) {
  .logo-subtitle { display: none; }
  .page-shell { padding-top: 18px; }
  .topline-row { font-size: .68rem; }
  .filters-actions,
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ghost-button,
  .primary-button,
  .button-link {
    width: 100%;
  }
}
