:root {
  --bg: #f3f8fe;
  --surface: #ffffff;
  --surface-soft: #eef7ff;
  --text: #102033;
  --muted: #58708c;
  --border: #c8d8ea;
  --soft-border: #d7e8fb;
  --header: #0b3a67;
  --header-deep: #082f49;
  --accent: #1d4ed8;
  --accent-soft: #dbeafe;
  --teal: #0891b2;
  --blue: #2563eb;
  --green: #0e7490;
  --orange: #f59e0b;
  --red: #e11d48;
  --purple: #4f46e5;
  --card-bg: #f8fbff;
  --stripe: #f6faff;
  --hover: #e0f2fe;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 40px;
  color: var(--text);
  background:
    linear-gradient(180deg, #eaf5ff 0, #f8fbff 300px, #ffffff 100%);
  line-height: 1.5;
}

h1 {
  text-align: center;
  margin-bottom: 10px;
  color: var(--header-deep);
}

h2 {
  margin-top: 42px;
  color: var(--header);
  border-bottom: 2px solid #bfdbfe;
  padding-bottom: 6px;
}

h3.section-subtitle {
  margin-top: 28px;
  margin-bottom: 12px;
  color: #164e63;
  font-size: 18px;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 30px;
  font-size: 15px;
}

.context-panel {
  background: linear-gradient(135deg, #eff8ff 0%, #ffffff 70%);
  border: 1px solid var(--soft-border);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(14, 116, 144, 0.08);
  margin: 0 0 34px;
  padding: 22px 24px;
}

.context-panel h2 {
  border-bottom: 0;
  color: var(--header-deep);
  margin: 0 0 10px;
  padding-bottom: 0;
}

.context-panel p {
  color: var(--text);
  margin: 0 0 10px;
}

.source-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.source-note a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.source-note a:hover {
  text-decoration: underline;
}

.summary-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--soft-border);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.07);
}

.card h3 {
  margin: 0;
  font-size: 26px;
  color: var(--accent);
}

.card p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 20px 0 34px;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--soft-border);
  border-radius: 8px;
  padding: 18px 18px 10px;
  box-shadow: 0 8px 22px rgba(14, 116, 144, 0.08);
  min-height: 340px;
}

.chart-card.wide {
  grid-column: 1 / -1;
  min-height: 420px;
}

.chart-title {
  font-weight: 700;
  color: var(--header-deep);
  margin-bottom: 4px;
  font-size: 16px;
}

.chart-note {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.chart-wrap {
  position: relative;
  height: 300px;
}

.chart-card.wide .chart-wrap {
  height: 360px;
}

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

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 15px;
  margin-bottom: 28px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(15, 76, 129, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.wide-table {
  min-width: 1000px;
}

.country-table {
  min-width: 850px;
}

thead {
  background-color: var(--header);
  color: #ffffff;
}

th,
td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
  font-weight: bold;
}

tbody tr:nth-child(even) {
  background-color: var(--stripe);
}

tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

tbody tr:hover {
  background-color: var(--hover);
}

.footnote {
  color: var(--muted);
  font-size: 12px;
  margin-top: -16px;
  margin-bottom: 24px;
}

.footer {
  margin-top: 35px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.footer a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media print {
  body {
    margin: 20px;
    background: #ffffff;
  }

  .chart-grid {
    grid-template-columns: 1fr;
    break-inside: avoid;
  }

  .chart-card {
    box-shadow: none;
    min-height: 260px;
    break-inside: avoid;
  }

  .chart-wrap,
  .chart-card.wide .chart-wrap {
    height: 260px;
  }

  .table-container {
    overflow: visible;
    border: none;
    box-shadow: none;
  }

  table {
    font-size: 10px;
    min-width: unset !important;
  }

  th,
  td {
    padding: 5px;
  }

  .summary-box {
    grid-template-columns: repeat(4, 1fr);
  }
}
