
:root {
  --bg: #fdfcfa;
  --fg: #1d1d1d;
  --muted: #6b6b6b;
  --accent: #b86a3a;
  --rule: #e3ddd1;
  --card: #ffffff;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  line-height: 1.5;
}
header {
  border-bottom: 1px solid var(--rule);
  background: var(--card);
}
header .inner, main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}
header h1 {
  font-size: 1.6rem;
  margin: 0 0 0.25rem;
  font-weight: 700;
}
header p { margin: 0; color: var(--muted); font-size: 0.95rem; }
header nav { margin-top: 0.75rem; font-size: 0.92rem; }
header nav a { color: var(--accent); text-decoration: none; margin-right: 1rem; }
header nav a:hover { text-decoration: underline; }
h2 { margin-top: 2.5rem; font-weight: 600; font-size: 1.3rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.4rem; }
h3 { margin-top: 1.5rem; font-weight: 600; font-size: 1.05rem; color: #333; }
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 1rem 0 0;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
}
.kpi .v { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.kpi .l { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.chart-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.chart-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
}
.chart-card h3 { margin-top: 0; }
canvas { max-width: 100%; }
#world-map, .country-map {
  height: 480px;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.country-map { height: 540px; }
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.country-grid a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  color: var(--fg);
  text-decoration: none;
  font-size: 0.9rem;
}
.country-grid a:hover { border-color: var(--accent); }
.country-grid .n { color: var(--muted); font-variant-numeric: tabular-nums; }
table.records {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-top: 0.75rem;
  background: var(--card);
}
table.records th, table.records td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
table.records th {
  background: #f5f1e8;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
}
table.records th.sort-asc::after { content: " \25B2"; font-size: 0.7em; }
table.records th.sort-desc::after { content: " \25BC"; font-size: 0.7em; }
table.records a { color: var(--accent); text-decoration: none; }
table.records a:hover { text-decoration: underline; }
table.records td.num { text-align: right; font-variant-numeric: tabular-nums; }
.records-wrap { max-height: 600px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 6px; }
.filter {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter input, .filter select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  font-size: 0.9rem;
  background: var(--card);
}
footer { color: var(--muted); font-size: 0.82rem; padding: 2rem; text-align: center; border-top: 1px solid var(--rule); margin-top: 3rem; }
.store-badges { display: flex; justify-content: center; gap: 12px; margin-bottom: 1rem; flex-wrap: wrap; }
.store-badges a { display: inline-flex; }
.store-badges img { height: 40px; width: auto; }
.note { color: var(--muted); font-size: 0.88rem; margin: 0.4rem 0 1rem; }
.spotlight {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1.1rem;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.spotlight strong { color: var(--accent); }
