@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');

:root {
  color-scheme: light;
  --ink: #1f352f;
  --muted: #77847d;
  --paper: #f5f3ed;
  --card: #fcfbf8;
  --line: #d9ded5;
  --land: #e4e8df;
  --land-hover: #b8cec0;
  --sea: #eaf0ed;
  --accent: #427461;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}
.page { max-width: 1440px; margin: 0 auto; padding: 0 5.2vw; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(31,53,47,.12); }
.brand { display: inline-flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.03em; }
.brand-mark { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #f8f5eb; font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 500; }
.topbar-note { display: inline-flex; align-items: center; gap: 9px; color: #69766e; font-size: 12px; letter-spacing: .02em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #78a78c; }
.intro { padding: 62px 0 33px; }
.eyebrow { margin: 0 0 13px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
h1 { margin: 0; font-family: 'Playfair Display', serif; font-size: clamp(36px, 5.1vw, 66px); font-weight: 500; line-height: 1.1; letter-spacing: -.035em; }
h1 span { color: #86968b; font-style: italic; }
.intro-copy { margin: 16px 0 0; max-width: 530px; color: #6c7971; font-size: 14px; line-height: 1.7; }
.map-card { overflow: hidden; border: 1px solid #e1e3dc; border-radius: 8px; background: var(--card); box-shadow: 0 18px 55px rgba(42,58,49,.055); }
.map-topline { min-height: 57px; padding: 0 24px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid #e8e9e3; }
.map-label { display: flex; align-items: center; gap: 9px; color: #64736b; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.globe-icon { color: var(--accent); font-size: 20px; line-height: 1; }
.map-hint { flex: 1; color: #8a948e; font-size: 11px; text-align: right; }
.view-toggle { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid #e0e4dc; border-radius: 6px; background: #f0f1eb; }
.view-toggle button { padding: 5px 10px; border: 0; border-radius: 4px; background: transparent; color: #718078; cursor: pointer; font: inherit; font-size: 11px; }
.view-toggle button[aria-pressed="true"] { background: #fcfbf8; color: var(--ink); box-shadow: 0 1px 3px rgba(31,53,47,.12); }
.map-wrap { position: relative; padding: 15px 24px 5px; background: radial-gradient(ellipse at 50% 52%, #f5f7f3 0%, var(--card) 73%); }
#world-map { display: block; width: 100%; min-height: 290px; max-height: 600px; overflow: visible; }
.country { fill: var(--land); stroke: #fcfbf8; stroke-width: .72px; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .14s ease; }
.country:hover, .country:focus { fill: var(--land-hover); outline: none; }
.country.visited { fill: #6f9a7d; }
.country.visited:hover, .country.visited:focus { fill: #4f7f64; }
.country:focus-visible { stroke: var(--accent); stroke-width: 1.8px; }
#globe-sphere { fill: var(--sea); stroke: #d5ded8; stroke-width: 1px; pointer-events: none; }
#world-map.globe-mode { cursor: grab; }
#world-map.globe-mode:active { cursor: grabbing; }
#world-map { touch-action: none; cursor: grab; }
#world-map:active { cursor: grabbing; }
.zoom-controls { display: flex; gap: 5px; }
.zoom-controls button { width: 30px; height: 30px; border: 1px solid #dce2da; border-radius: 5px; background: #fcfbf8; color: var(--ink); cursor: pointer; font: inherit; font-size: 17px; }
.zoom-controls button:hover { background: #edf1eb; }
.map-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; pointer-events: none; }
.map-loading[hidden] { display: none; }
.tooltip { position: absolute; z-index: 2; width: min(260px, calc(100% - 16px)); padding: 12px; display: grid; gap: 9px; border: 1px solid rgba(31,53,47,.08); border-radius: 6px; background: #203a32; color: #fffdf7; box-shadow: 0 5px 18px rgba(31,53,47,.16); font-size: 12px; font-weight: 500; }
.tooltip[hidden] { display: none; }
.tooltip-country-name { font-size: 13px; }
.tooltip-action { min-height: 34px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; background: #f4f4ea; color: #203a32; cursor: pointer; font: inherit; text-align: left; }
.tooltip-action:hover { background: #fff; }
.map-footer { min-height: 50px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e8e9e3; }
.legend { display: inline-flex; align-items: center; gap: 8px; color: #738078; font-size: 11px; }
.legend-swatch { width: 12px; height: 12px; border: 1px solid #d5dbd2; border-radius: 2px; background: var(--land); }
.visited-swatch { background: #6f9a7d; }
.map-credit { color: #9aa29c; font-size: 10px; }
.stats-card { margin-top: 16px; padding: 20px 24px; display: flex; align-items: baseline; gap: 13px; border: 1px solid #e1e3dc; border-radius: 7px; background: var(--card); }
.stats-number { display: inline-flex; gap: 8px; align-items: baseline; color: var(--ink); font-family: 'Playfair Display', serif; font-size: 28px; }
.stats-divider { color: #a2aca4; font-size: 20px; }
.stats-label { color: #728078; font-size: 13px; }
.countries-panel { margin-top: 42px; }
.countries-heading { margin-bottom: 18px; display: flex; justify-content: space-between; align-items: end; }
.countries-heading .eyebrow { margin-bottom: 8px; }
h2 { margin: 0; font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 500; letter-spacing: -.02em; }
.table-hint { color: #859189; font-size: 12px; }
.country-groups { display: grid; grid-auto-columns: minmax(220px, 1fr); grid-auto-flow: column; grid-template-rows: 1fr; gap: 12px; align-items: start; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; }
.continent-section { overflow: hidden; border: 1px solid #e1e3dc; border-radius: 6px; background: var(--card); }
.continent-section { min-width: 220px; scroll-snap-align: start; }
.continent-section h3 { margin: 0; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid #e8e9e3; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.continent-tally { flex: 0 0 auto; color: #7d8981; font-size: 10px; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.country-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.country-table tr + tr { border-top: 1px solid #eff0eb; }
.country-table td { padding: 8px 14px; }
.country-label { display: inline-flex; align-items: center; gap: 8px; }
.country-flag { width: 20px; flex: 0 0 20px; font-family: 'Apple Color Emoji', 'Noto Color Emoji', 'Segoe UI Emoji', sans-serif; font-size: 15px; line-height: 1; }
.check-cell { width: 42px; text-align: right; }
.country-check-label { display: inline-flex; cursor: pointer; }
.country-check { width: 16px; height: 16px; accent-color: #527c62; cursor: pointer; }
.page-footer { padding: 22px 0 28px; display: flex; justify-content: space-between; color: #87928b; font-size: 10px; }
.page-footer span:first-child { font-weight: 700; letter-spacing: .15em; }
@media (max-width: 680px) {
  .page { padding: 0 18px; }
  .topbar { height: 65px; }
  .topbar-note { font-size: 10px; }
  .intro { padding: 45px 0 25px; }
  .intro-copy { font-size: 13px; }
  .map-topline { height: auto; flex-wrap: wrap; padding: 9px 12px; gap: 8px; }
  .map-hint { order: 3; width: 100%; flex: 1 0 100%; font-size: 9px; text-align: left; }
  .view-toggle button { padding: 5px 7px; }
  .zoom-controls button { width: 28px; height: 28px; }
  .map-wrap { padding: 8px 5px 0; overflow: hidden; }
  #world-map { min-height: 200px; }
  .map-footer { min-height: 46px; padding: 0 14px; gap: 10px; }
  .map-credit { max-width: 48%; text-align: right; line-height: 1.4; }
  .country-groups { grid-auto-columns: minmax(220px, 78vw); gap: 8px; }
  .countries-heading { align-items: start; gap: 10px; flex-direction: column; }
  .table-hint { font-size: 11px; }
  .country-table td { padding: 8px 9px; }
  .page-footer { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
