/* Pass The Passport — passport burgundy on visa-page green */
:root {
  --paper: #eef3ef;        /* visa page */
  --paper-2: #e2ebe5;
  --card: #ffffff;
  --ink: #17233b;          /* navy ink */
  --ink-2: #4b5668;
  --muted: #6d7787;
  --burgundy: #7b1d2a;     /* passport cover, visited */
  --burgundy-2: #a12a3b;
  --teal: #1d6672;         /* immigration stamp ink, links */
  --gold: #b58a2e;         /* cover foil */
  --land: #bfcdc5;
  --ocean: #f6f9f7;
  --line: #c9d4cd;
  --radius-s: 4px;
  --radius-m: 10px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --wrap: 1120px;
  --measure: 68ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121a24; --paper-2: #18222f; --card: #1c2735; --ink: #e8edf0; --ink-2: #b9c2cc;
    --muted: #8f9aa6; --burgundy: #d0566a; --burgundy-2: #e27587; --teal: #6fc0c9;
    --gold: #d8b25a; --land: #2a3646; --ocean: #0e151e; --line: #2d3a4a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121a24; --paper-2: #18222f; --card: #1c2735; --ink: #e8edf0; --ink-2: #b9c2cc;
  --muted: #8f9aa6; --burgundy: #d0566a; --burgundy-2: #e27587; --teal: #6fc0c9;
  --gold: #d8b25a; --land: #2a3646; --ocean: #0e151e; --line: #2d3a4a; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--serif); font-optical-sizing: auto;
  /* faint guilloché-style security pattern, like a passport page */
  background-image:
    repeating-radial-gradient(circle at 0 0, transparent 0 22px, color-mix(in srgb, var(--teal) 5%, transparent) 22px 23px);
  background-attachment: fixed;
}
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--burgundy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: .6em 1em; z-index: 1000; }
.skip:focus { left: 1rem; top: 1rem; }
.muted { color: var(--muted); }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap--wide { width: min(100% - 32px, 1400px); }

/* ---------- masthead */
.masthead { background: var(--burgundy); color: #fff; position: sticky; top: 0; z-index: 500; }
.masthead__inner { width: min(100% - 32px, 1400px); margin: auto; display: flex; align-items: center; gap: 1rem; min-height: 60px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font: 800 1.15rem/1 var(--display); letter-spacing: -.01em; margin-right: auto; }
.brand:hover { color: #fff; }
.brand picture { display: contents; }
.brand__mark { width: 52px; height: 52px; flex: none; border-radius: 50%; box-shadow: 0 1px 4px rgb(0 0 0 / .25); }
@media (max-width: 40rem) { .brand__mark { width: 42px; height: 42px; } }
.nav { display: flex; gap: .25rem; font: 600 .98rem/1 var(--display); }
.nav a { color: #fbeff0; text-decoration: none; padding: .6em .75em; border-radius: var(--radius-s); }
.nav a:hover, .nav a[aria-current] { background: rgb(255 255 255 / .12); color: #fff; }
.nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--gold); }
.navtoggle { display: none; }
@media (max-width: 760px) {
  .navtoggle { display: block; background: none; color: #fff; border: 1px solid rgb(255 255 255 / .5); border-radius: var(--radius-s); font: 600 .95rem var(--display); padding: .45em .8em; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; background: var(--burgundy); flex-direction: column; padding: .5rem 16px 1rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: .8em .5em; }
}

/* ---------- hero */
.hero { position: relative; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.hero .map { --map-h: min(72vh, 640px); border-radius: 0; border: 0; }
.hero .map__legend { max-width: 1400px; margin: 0 auto; padding-block: .7em 0; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.hero__text { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 46ch); gap: 1rem 3rem; align-items: end;
  max-width: 1400px; margin: 0 auto; padding-block: 2rem 2.2rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); border-top: 1px solid var(--line); }
.hero__text h1 { margin: 0; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; margin: 0; }
@media (max-width: 760px) {
  .hero__text { grid-template-columns: minmax(0, 1fr); padding-block: 1.4rem; }
  .hero .map { --map-h: 56vh; }
}

/* ---------- map */
.map { height: var(--map-h, 520px); background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-m); position: relative; overflow: hidden; z-index: 1; }
.map.leaflet-container { background: var(--ocean); font: inherit; }
.map__fallback { padding: 2rem; color: var(--muted); }
.map__legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; font: 500 .88rem/1.4 var(--display); color: var(--ink-2); margin: .6rem 0 1.4rem; }
.map__hint { color: var(--muted); }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: -.5rem; vertical-align: -1px; }
.key--v { background: var(--burgundy); }
.key--t { background: var(--land); border: 1px solid var(--line); }
.pin { width: 15px; height: 15px; border-radius: 50% 50% 50% 0; background: var(--burgundy); transform: rotate(-45deg); border: 2px solid #fff; box-sizing: border-box; box-shadow: 0 1px 3px rgb(0 0 0 / .35); transition: transform .12s; }
.leaflet-marker-icon:hover .pin, .leaflet-marker-icon:focus .pin { transform: rotate(-45deg) scale(1.35); }
.leaflet-tooltip.ptp-tip { font: 600 .9rem/1.2 var(--display); background: var(--ink); color: #fff; border: 0; border-radius: var(--radius-s); padding: .35em .6em; box-shadow: none; }
.leaflet-tooltip.ptp-tip::before { display: none; }
.leaflet-control-zoom a { color: var(--ink) !important; }
.leaflet-control-attribution { display: none; }

/* ---------- sections */
.band { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.band--tint { background: var(--paper-2); border-block: 1px solid var(--line); }
.band--ink { background: var(--ink); color: #eef2f5; }
.band--ink h2 { color: #fff; }
.band--continents { padding-bottom: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.split__text { max-width: var(--measure); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.continents { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.continents li { box-shadow: 0 0 0 .5px var(--line); }
.continents a { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; padding: 1rem 1.1rem 1.1rem; background: var(--card); text-decoration: none; color: var(--ink); height: 100%; }
.continents a:hover { background: color-mix(in srgb, var(--burgundy) 6%, var(--card)); }
.continents__name { font: 600 1.1rem/1.2 var(--display); }
.continents__count { font: 400 .95rem var(--display); color: var(--muted); }
.continents__count b { color: var(--burgundy); font-weight: 800; font-size: 1.15rem; }
.continents .progress { grid-column: 1 / -1; }
@media (min-width: 1000px) { .continents { grid-template-columns: repeat(4, 1fr); } .continents li:last-child { grid-column: span 2; } }

.progress { height: 6px; background: var(--paper-2); border-radius: 3px; overflow: hidden; margin-top: .45rem; }
.progress__bar { display: block; height: 100%; width: var(--p); background: var(--burgundy); border-radius: 3px; }

.catlist { list-style: none; padding: 0; margin: 0; }
.catlist a { display: grid; grid-template-columns: 1fr auto; padding: .85rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 600 1.15rem/1.2 var(--display); }
.catlist a:hover span:first-child { color: var(--burgundy); }
.catlist__n { font-weight: 400; color: var(--muted); font-size: 1rem; }
.catlist .progress { grid-column: 1 / -1; }

.button { display: inline-block; font: 600 1rem/1 var(--display); padding: .85em 1.25em; border-radius: var(--radius-s); background: var(--burgundy); color: #fff; text-decoration: none; }
.button:hover { background: var(--burgundy-2); color: #fff; }
.button--quiet { background: transparent; color: var(--burgundy); box-shadow: inset 0 0 0 2px var(--burgundy); }

/* ---------- goals (bucket list cards) */
.goals { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.4rem 1.2rem; }
.goals--feature { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.goal a { display: flex; flex-direction: column; gap: .45rem; text-decoration: none; color: inherit; }
.goal__img { aspect-ratio: 3 / 2; background: var(--paper-2); border-radius: var(--radius-s); overflow: hidden; display: block; position: relative; }
.goal__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.goal a:hover .goal__img img { transform: scale(1.04); }
.goal__title { font: 600 1.05rem/1.25 var(--display); }
.goal a:hover .goal__title { text-decoration: underline; text-underline-offset: .15em; }
.goal__meta { display: flex; gap: .5rem; align-items: center; font: 500 .85rem var(--display); color: var(--muted); }
.band--ink .goal__meta { color: #a9b4c0; }
.tick { color: var(--burgundy); font-weight: 700; display: inline-flex; align-items: center; gap: .3em; }
.band--ink .tick { color: #f0b4bd; }
.tick::before { content: ""; width: 1em; height: 1em; border-radius: 50%; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 100 16A8 8 0 008 0zm-1.2 11.6L3.4 8.2l1.2-1.2 2.2 2.2 4.6-4.6 1.2 1.2z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 100 16A8 8 0 008 0zm-1.2 11.6L3.4 8.2l1.2-1.2 2.2 2.2 4.6-4.6 1.2 1.2z'/%3E%3C/svg%3E") center/contain no-repeat; }
.todo { color: var(--ink-2); }
.goal__cat::before { content: "/ "; opacity: .6; }
.goal:not(.goal--done) .goal__img img { filter: saturate(.35); }
.goal[hidden] { display: none; }

/* ---------- page heads, prose */
.pagehead { padding: clamp(2rem, 5vw, 3.5rem) 0 1.4rem; }
.pagehead__sub { font: 400 1.15rem var(--display); color: var(--ink-2); margin: 0; }
.pagehead__sub b { color: var(--burgundy); font-weight: 800; }
.pagehead .progress { max-width: 420px; }
.crumbs { font: 600 .95rem var(--display); margin: 0 0 .6rem; color: var(--muted); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--burgundy); text-decoration: underline; }
.figures { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: .4rem 0 0; }
.figures div { display: flex; flex-direction: column-reverse; }
.figures dt { font: 500 .95rem var(--display); color: var(--muted); }
.figures dd { margin: 0; font: 800 2.2rem/1.1 var(--display); color: var(--burgundy); }

.prose { padding-bottom: 2.5rem; }
.prose > * { max-width: var(--measure); }
.prose h2, .prose h3, .prose h4 { margin-top: 1.6em; }
.prose img { display: block; margin: 1.6rem 0 .5rem; border-radius: var(--radius-s); width: 100%; }
.prose img + p, .prose p:has(> img:only-child) + p { font: 400 .92rem/1.45 var(--display); color: var(--muted); }
.prose a img { margin: .4rem 0; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose blockquote { margin: 1.5em 0; padding-left: 1em; border-left: 4px solid var(--gold); font-style: italic; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-s); }
.prose--intro { padding-bottom: 1rem; }
.prose--aside { border-top: 1px solid var(--line); padding-top: 2.5rem; margin-top: 2rem; }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: .4em .5em; text-align: left; }

/* resources page: logo + text pairs */
.prose img[src*="300x300"], .prose img[src*="200x"], .prose img[src$=".png"]:not([src*="2020/04/Top"]) { width: auto; max-width: 140px; max-height: 110px; object-fit: contain; margin: 1.6rem 0 .4rem; }

/* ---------- places lists */
.jump { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 1rem; }
.jump a { font: 600 .95rem var(--display); padding: .45em .8em; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.jump a:hover { border-color: var(--burgundy); color: var(--burgundy); }
.continent { padding: 2rem 0 1rem; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.continent__head { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 1rem; margin-bottom: 1rem; }
.continent__head h2 { margin: 0; }
.continent__head h2 a { color: inherit; text-decoration: none; }
.continent__head h2 a:hover { color: var(--burgundy); }
.continent__head .progress { grid-column: 1 / -1; }
.continent__count { margin: 0; font: 400 1rem var(--display); color: var(--muted); }
.continent__count b { color: var(--burgundy); font-size: 1.2rem; }
.countries { list-style: none; padding: 0; margin: 0 0 1.5rem; columns: 4 150px; column-gap: 1.5rem; }
.countries li { break-inside: avoid; padding: .2rem 0; font: 500 1rem/1.35 var(--display); display: flex; align-items: center; gap: .5rem; }
.countries li::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--burgundy); }
.countries li.is-v::before { background: var(--burgundy); }
.countries li.is-t::before { border-color: var(--muted); }
.countries a { color: var(--ink); text-decoration: none; }
.countries li.is-t a { color: var(--muted); }
.countries a:hover { color: var(--burgundy); text-decoration: underline; }
.countries--big li { font-size: 1.1rem; padding: .3rem 0; }

/* ---------- country pages */
.countryhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 2rem 3rem; padding: clamp(2rem, 5vw, 3rem) 0 2rem; align-items: start; }
.countryhead h1 { display: flex; align-items: center; gap: .9rem; }
.flag { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line); }
.countryhead__side { position: relative; }
.countryhead__side .map__legend { display: none; }
@media (max-width: 860px) { .countryhead { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 1.2rem 0 0; font-family: var(--display); }
.facts div { display: contents; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; font-weight: 600; }
.status { display: inline-block; font: 600 .95rem var(--display); padding: .35em .75em; border-radius: var(--radius-s); margin: .2rem 0 .6rem; }
.status--todo { background: var(--paper-2); color: var(--ink-2); border: 1px dashed var(--muted); }
.status--done { background: var(--burgundy); color: #fff; }
.where { font: 500 1rem var(--display); color: var(--muted); }

/* the passport stamp */
.stamp { position: absolute; z-index: 600; top: -26px; right: -14px; width: 118px; height: 118px; transform: rotate(-14deg); color: var(--burgundy); pointer-events: none; mix-blend-mode: multiply; opacity: .88; }
@media (prefers-color-scheme: dark) { .stamp { mix-blend-mode: normal; } }
.stamp svg { width: 100%; height: 100%; fill: none; stroke: currentColor; }
.stamp circle:first-of-type { stroke-width: 3; stroke-dasharray: 2 1.2; }
.stamp circle + circle { stroke-width: 1.5; }
.stamp text { fill: currentColor; stroke: none; font: 700 10.5px var(--display); letter-spacing: 1.6px; }
.stamp__mid { position: absolute; inset: 0; display: grid; place-items: center; font: 800 1.6rem/1 var(--display); letter-spacing: .04em; }
@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: thunk .45s cubic-bezier(.2, 1.6, .4, 1) .25s both; }
  @keyframes thunk { from { transform: rotate(-4deg) scale(1.6); opacity: 0; } to { transform: rotate(-14deg) scale(1); opacity: .88; } }
}
@media (max-width: 860px) { .stamp { top: auto; bottom: -20px; right: 8px; width: 96px; height: 96px; } }

/* ---------- bucket list */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.4rem; }
.tabs a { font: 600 .98rem var(--display); padding: .5em .9em; border-radius: var(--radius-s); text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); }
.tabs a span { color: var(--muted); font-weight: 400; margin-left: .2em; }
.tabs a[aria-current] { background: var(--burgundy); color: #fff; border-color: var(--burgundy); }
.tabs a[aria-current] span { color: #f3c9cf; }
.filterbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 1.4rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.filterbar h2 { margin: 0; }
.filter { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--card); }
.filter button { font: 600 .95rem var(--display); border: 0; background: none; color: var(--ink); padding: .55em 1em; cursor: pointer; }
.filter button + button { border-left: 1px solid var(--line); }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.itemhead { padding: clamp(2rem, 5vw, 3rem) 0 1.2rem; max-width: 900px; }
.itemhero { margin-top: 0; margin-bottom: 2rem; }
.itemhero img { width: 100%; max-height: 70vh; object-fit: cover; border-radius: var(--radius-m); display: block; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; border-top: 1px solid var(--line); padding: 1.5rem 0 3rem; }
.pager a { display: flex; flex-direction: column; text-decoration: none; font: 600 1.05rem/1.3 var(--display); color: var(--ink); }
.pager a span { font-weight: 400; color: var(--muted); font-size: .9rem; }
.pager a[rel="next"] { text-align: right; grid-column: 2; }
.pager a:hover { color: var(--burgundy); }

/* ---------- gallery */
.gallery { list-style: none; padding: 0 0 3rem; columns: 4 260px; column-gap: 12px; }
.gallery li { break-inside: avoid; margin-bottom: 12px; }
.gallery img { display: block; width: 100%; border-radius: var(--radius-s); }
.gallery a:hover img { opacity: .9; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgb(10 14 22 / .9); }
.lightbox img { max-width: 96vw; max-height: 90vh; display: block; border-radius: var(--radius-s); }
.lightbox__close { position: fixed; top: 16px; right: 16px; font: 600 1rem var(--display); background: #fff; border: 0; border-radius: var(--radius-s); padding: .5em .9em; cursor: pointer; }

.notfound { min-height: 50vh; }

/* ---------- footer */
.footer { background: var(--burgundy); color: #f6e7e9; margin-top: 3rem; }
.footer a { color: #fff; }
.footer__inner { width: min(100% - 32px, 1400px); margin: auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding: 2.5rem 0 1.5rem; }
.footer__brand { display: flex; align-items: center; gap: .75rem; font: 800 1.3rem var(--display); color: #fff; margin-bottom: .6rem; }
.footer__logo { width: 64px; height: 64px; border-radius: 50%; }
.footer__about p:last-child { max-width: 46ch; }
.footer__links, .footer__social { display: flex; flex-direction: column; gap: .35rem; font: 500 1rem var(--display); }
.footer__links a, .footer__social a { text-decoration: none; }
.footer__links a:hover, .footer__social a:hover { text-decoration: underline; }
@media (max-width: 760px) { .footer__inner { grid-template-columns: 1fr 1fr; } .footer__about { grid-column: 1 / -1; } }
.footer__legal { width: min(100% - 32px, 1400px); margin: auto; padding: 1rem 0 1.4rem; font: 400 .88rem var(--display); color: #e7c9cd; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .masthead, .footer, .map, .map__legend, .filter, .tabs { display: none !important; } body { background: #fff; } }

/* ---------- country page: before you go, contents, neighbours */
.before { padding: .5rem 0 1.5rem; }
.before h2 { font-size: 1.3rem; }
.before__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; }
.before__links a { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-family: var(--display); }
.before__links a:hover { border-color: var(--teal); }
.before__links b { color: var(--teal); font-weight: 600; }
.before__links span { font-size: .9rem; color: var(--muted); }
.countrybody { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 2.5rem; align-items: start; border-top: 1px solid var(--line); padding-top: 2rem; }
.countrybody .prose h2 { margin-top: 0; padding-top: 1.6rem; scroll-margin-top: 70px; }
.countrybody .prose h2:first-child { padding-top: 0; }
.toc { position: sticky; top: 80px; font-family: var(--display); }
.toc__title { font-weight: 600; color: var(--muted); font-size: .9rem; margin-bottom: .4rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .3rem 0 .3rem .8rem; text-decoration: none; color: var(--ink-2); font-size: .95rem; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--burgundy); border-left-color: var(--burgundy); }
@media (max-width: 860px) { .countrybody { grid-template-columns: 1fr; gap: 1rem; } .toc { position: static; } .toc ol { display: flex; flex-wrap: wrap; gap: .3rem; border: 0; } .toc a { border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; margin: 0; background: var(--card); font-size: .88rem; } }
.countries--inline { columns: 3 150px; }
.status--done::before { content: "✓ "; }

/* gallery captions */
.gallery figure { margin: 0; }
.gallery figcaption { font: 500 .88rem/1.35 var(--display); padding: .4rem .1rem 0; color: var(--ink-2); }
.gallery figcaption a { color: var(--ink); text-decoration: none; }
.gallery figcaption a:hover { color: var(--burgundy); text-decoration: underline; }
.gallery figcaption span { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.gallery--feed { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding-bottom: 2rem; }
.gallery--feed img { aspect-ratio: 1; object-fit: cover; }
.lightbox__cap { color: #fff; font: 500 1rem var(--display); text-align: center; margin: .6rem 0 0; }

/* ---------- bucket list goal page */
.itemgrid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; align-items: start; padding-bottom: 2rem; }
.itemgrid .itemhero { margin: 0 0 1.5rem; }
.itemgrid .prose h2 { font-size: 1.35rem; margin-top: 1.4em; }
.itemgrid .prose h2:first-child { margin-top: 0; }
.itemgrid__side { position: sticky; top: 80px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.1rem 1.2rem 1.2rem; }
.itemgrid__side h2 { font-size: 1.1rem; margin-bottom: .8rem; }
.facts--stack { grid-template-columns: 1fr; gap: .1rem; margin: 0; }
.facts--stack div { display: block; padding: .5rem 0; border-top: 1px solid var(--line); }
.facts--stack dt { font-size: .85rem; }
.diff { display: inline-block; padding: .1em .55em; border-radius: var(--radius-s); font-size: .92rem; }
.diff--easy { background: color-mix(in srgb, var(--teal) 14%, var(--card)); }
.diff--moderate { background: color-mix(in srgb, var(--gold) 22%, var(--card)); }
.diff--challenging { background: color-mix(in srgb, var(--burgundy) 16%, var(--card)); }
.diff--extreme, .diff--not-possible { background: var(--burgundy); color: #fff; }
@media (max-width: 900px) { .itemgrid { grid-template-columns: 1fr; } .itemgrid__side { position: static; order: -1; } }

.countrybody--city { grid-template-columns: 0 minmax(0, 1fr); gap: 0; }
.source { font: 400 .85rem/1.4 var(--display); color: var(--muted); }

/* Goal extras: photo credit, sub-goals, continent progress, sponsor link */
.credit { font: 400 .78rem/1.4 var(--display); color: var(--muted); margin-top: .5rem; }
.credit a { color: inherit; }
.subgoals { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.subgoals h2 { margin: 0 0 .4rem; }
.subgoals h3 { font: 600 1rem var(--display); margin: 1.5rem 0 .6rem; }
.subgoals .progress { margin: .4rem 0 1.4rem; }
.goals--sub { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sponsor { margin: 1rem 0 0; }
.map__wheelhint { position: absolute; inset: auto 0 50% 0; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); z-index: 500; background: color-mix(in srgb, var(--ink) 82%, transparent); color: #fff; font: 600 .95rem/1.3 var(--display); padding: .6em 1em; border-radius: var(--radius-s); pointer-events: none; text-align: center; }

/* Test-site banner (only on builds made with --test-site) */
.testbar { margin: 0; padding-block: .45rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--gold); color: #17233b; font: 600 .85rem/1.3 var(--display); text-align: center; }
.testbar a { color: inherit; }
