/* Mobile-first reset, design tokens, and layout primitives. */
:root {
  color-scheme: light;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-muted: #eef3f8;
  --color-surface-strong: #d9e5f2;
  --color-text: #162032;
  --color-text-muted: #4b5a71;
  --color-heading: #0f1728;
  --color-border: #c9d4e3;
  --color-link: #0d5bd7;
  --color-link-hover: #0b4ab0;
  --color-accent: #0d5bd7;
  --color-accent-strong: #0a46a8;
  --color-accent-contrast: #ffffff;
  --color-success: #15803d;
  --color-danger: #b91c1c;
  --color-info: #1d4ed8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 40, 0.08);
  --shadow-md: 0 10px 24px rgba(15, 23, 40, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: clamp(1.125rem, 1.02rem + 0.5vw, 1.35rem);
  --step-2: clamp(1.375rem, 1.1rem + 1.2vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
  --line-tight: 1.2;
  --line-copy: 1.65;
  --line-relaxed: 1.8;
  --container-max: 70rem;
  --tap-target: 2.75rem;
  --grid-gap: clamp(1rem, 2vw, 1.75rem);
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --color-bg: #09111f;
    --color-surface: #101a2b;
    --color-surface-muted: #152033;
    --color-surface-strong: #21314a;
    --color-text: #e5edf7;
    --color-text-muted: #b3c0d5;
    --color-heading: #f8fbff;
    --color-border: #30415e;
    --color-link: #8bb8ff;
    --color-link-hover: #b1ceff;
    --color-accent: #8bb8ff;
    --color-accent-strong: #b1ceff;
    --color-accent-contrast: #09111f;
    --color-success: #4ade80;
    --color-danger: #f87171;
    --color-info: #93c5fd;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 14px 30px rgba(0, 0, 0, 0.28);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  overflow-x: clip;
  background:
    radial-gradient(circle at top, rgba(13, 91, 215, 0.08), transparent 28rem),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: var(--line-copy);
  text-rendering: optimizeLegibility;
}

body > .container {
  padding-block: var(--space-4) var(--space-7);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

button,
input,
select,
textarea {
  border-radius: var(--radius-sm);
}

textarea:not([rows]) {
  min-height: 10rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

td,
th {
  text-align: left;
  vertical-align: top;
}

a {
  color: var(--color-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-accent) 40%, transparent);
  outline-offset: 3px;
}

a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none;
}

p,
ul,
ol,
dl,
blockquote,
figure,
pre,
table,
form,
fieldset {
  margin-block: 0 0.875rem;
}

ul,
ol {
  padding-inline-start: 1.25rem;
}

li + li {
  margin-top: 0.25rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-heading);
  font-weight: 700;
  line-height: var(--line-tight);
  text-wrap: balance;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: var(--step-3);
  letter-spacing: -0.03em;
  margin-top: 0;
}

h2 {
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--step-1);
}

h4,
h5,
h6 {
  font-size: 1rem;
}

small,
.caption-text {
  font-size: var(--step--1);
  color: var(--color-text-muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-6);
}

::selection {
  background: color-mix(in srgb, var(--color-accent) 24%, transparent);
}

.container {
  width: min(100% - 1.5rem, var(--container-max));
  margin-inline: auto;
}

.row,
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
}

.column,
.columns {
  min-width: 0;
}

@media (min-width: 48rem) {
  .row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }

  .one.column,
  .one.columns { grid-column: span 1; }
  .two.column,
  .two.columns { grid-column: span 2; }
  .three.column,
  .three.columns { grid-column: span 3; }
  .four.column,
  .four.columns { grid-column: span 4; }
  .five.column,
  .five.columns { grid-column: span 5; }
  .six.column,
  .six.columns,
  .one-half.column,
  .one-half.columns { grid-column: span 6; }
  .seven.column,
  .seven.columns { grid-column: span 7; }
  .eight.column,
  .eight.columns { grid-column: span 8; }
  .nine.column,
  .nine.columns { grid-column: span 9; }
  .ten.column,
  .ten.columns { grid-column: span 10; }
  .eleven.column,
  .eleven.columns { grid-column: span 11; }
  .twelve.column,
  .twelve.columns { grid-column: 1 / -1; }
  .one-third.column,
  .one-third.columns { grid-column: span 4; }
  .two-thirds.column,
  .two-thirds.columns { grid-column: span 8; }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-space, var(--space-4));
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--space-3));
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
}

.u-full-width {
  width: 100%;
}

.u-pull-right {
  margin-inline-start: auto;
}

.text-center,
.center-text {
  text-align: center;
}

.left-text {
  text-align: left;
}

.right-text {
  text-align: right;
}

.hide,
.hide-media-867px {
  display: none !important;
}

.show {
  display: block !important;
}

.show-media-867px {
  display: block !important;
}

@media (min-width: 54.1875rem) {
  .hide-media-867px {
    display: initial !important;
  }

  .show-media-867px {
    display: none !important;
  }
}

button,
.button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-target);
  min-width: var(--tap-target);
  padding: 0.625rem 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

button:hover,
.button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
}

button:active,
.button:active,
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active {
  transform: translateY(0);
}

.button.button-primary,
button.button-primary,
input[type="submit"].button-primary,
input[type="reset"].button-primary,
input[type="button"].button-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-contrast);
}

.button.button-primary:hover,
button.button-primary:hover,
input[type="submit"].button-primary:hover,
input[type="reset"].button-primary:hover,
input[type="button"].button-primary:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: var(--color-accent-contrast);
}

.button.button-ghost,
button.button-ghost,
input[type="submit"].button-ghost,
input[type="reset"].button-ghost,
input[type="button"].button-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-heading);
}

.button.button-ghost:hover,
button.button-ghost:hover,
input[type="submit"].button-ghost:hover,
input[type="reset"].button-ghost:hover,
input[type="button"].button-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.button-small {
  min-height: 2rem;
  min-width: 2rem;
  padding-inline: 0.625rem;
  font-size: var(--step--1);
}

input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="file"],
input[type="tel"],
input[type="url"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-height: var(--tap-target);
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: inset 0 1px 1px rgba(15, 23, 40, 0.04);
}

input.input-small {
  min-height: 2rem;
  padding-block: 0.25rem;
  font-size: var(--step--1);
}

label,
legend {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

fieldset {
  border: 0;
  padding: 0;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
}

pre,
code {
  font-family: var(--font-mono);
}

pre,
blockquote,
.well {
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.well-sm {
  padding: var(--space-3);
}

.img-thumbnail {
  padding: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.table > thead > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > td,
.table > thead > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > th {
  padding: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.table > thead > tr > th {
  border-bottom: 2px solid var(--color-border);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background: color-mix(in srgb, var(--color-surface-muted) 76%, transparent);
}

.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
  padding: 0.5rem;
}

.footer {
  padding-block: var(--space-5);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--step--1);
  text-align: center;
}

.footer a {
  display: inline-block;
  min-height: var(--tap-target);
  padding: 0.5rem 0.25rem;
}

.rate-holder,
.exchange-holder {
  padding: var(--space-3);
}

.currency-code-text,
.currency-code-onpage-text {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.arrow-green {
  color: var(--color-success);
}

.arrow-red {
  color: var(--color-danger);
}

.arrow-blue {
  color: var(--color-info);
}

.google-charts {
  width: 100%;
  min-height: 25rem;
  margin-inline: auto;
}

a.mouse-pointer {
  cursor: pointer;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

header > a:first-child,
header > img:first-child {
  flex-shrink: 0;
}

.header-logo {
  font-size: 1.5rem;
  font-weight: 700;
}

.header-hamburger {
  display: none;
}

.top-menu,
.top-menu-mobile {
  width: 100%;
}

.menu-post {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  z-index: 20;
  min-width: 14rem;
  padding: var(--space-2) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.dropdown-content ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dropdown-content a {
  display: block;
  padding: 0.5rem 0.875rem;
}

.dropdown-content a:hover {
  background: var(--color-surface-muted);
}

.country-static-map,
#map-canvas,
.adsbygoogle,
.ad-slot {
  margin-block: var(--space-5);
}

.country-static-map img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.ad-slot {
  position: relative;
  padding: 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  box-shadow: var(--shadow-sm);
}

.ad-slot__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.ad-slot__label {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-slot .adsbygoogle {
  display: block;
  min-height: 280px;
  margin: 0;
}

.ad-slot--sidebar .adsbygoogle {
  min-height: 250px;
}

.map-widget {
  display: grid;
  gap: var(--space-3);
}

.map-widget__notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top left, rgba(192, 76, 46, 0.12), transparent 48%),
    var(--color-surface-muted);
}

.map-widget__notice p,
.map-widget__status {
  margin: 0;
}

.map-widget__status {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.map-widget__status--error {
  color: #a3371a;
}

.map-widget.is-loaded .map-widget__notice {
  display: none;
}

#map-canvas {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  background:
    linear-gradient(180deg, rgba(7, 32, 61, 0.08), rgba(7, 32, 61, 0.02)),
    linear-gradient(135deg, rgba(192, 76, 46, 0.08), rgba(255, 255, 255, 0));
}

.nine.columns > div:first-child,
.nine.columns > p,
.nine.columns > ul,
.nine.columns > ol,
.nine.columns > h1,
.nine.columns > h2,
.nine.columns > h3,
.nine.columns > h4 {
  max-width: var(--measure);
}

.three.columns {
  align-self: start;
}

.three.columns h3:first-child,
.three.columns h4:first-child {
  margin-top: 0;
}

@media (max-width: 47.99rem) {
  body > .container {
    padding-block: var(--space-3) var(--space-6);
  }

  [style*="margin-top: 5%"] {
    margin-top: var(--space-5) !important;
  }

  .map-widget__notice {
    align-items: flex-start;
    flex-direction: column;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-surface-muted: #eef3f8;
  --color-surface-strong: #d9e5f2;
  --color-text: #162032;
  --color-text-muted: #4b5a71;
  --color-heading: #0f1728;
  --color-border: #c9d4e3;
  --color-link: #0d5bd7;
  --color-link-hover: #0b4ab0;
  --color-accent: #0d5bd7;
  --color-accent-strong: #0a46a8;
  --color-accent-contrast: #ffffff;
  --color-success: #15803d;
  --color-danger: #b91c1c;
  --color-info: #1d4ed8;
  --shadow-sm: 0 1px 2px rgba(15, 23, 40, 0.08);
  --shadow-md: 0 10px 24px rgba(15, 23, 40, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #09111f;
  --color-surface: #101a2b;
  --color-surface-muted: #152033;
  --color-surface-strong: #21314a;
  --color-text: #e5edf7;
  --color-text-muted: #b3c0d5;
  --color-heading: #f8fbff;
  --color-border: #30415e;
  --color-link: #8bb8ff;
  --color-link-hover: #b1ceff;
  --color-accent: #8bb8ff;
  --color-accent-strong: #b1ceff;
  --color-accent-contrast: #09111f;
  --color-success: #4ade80;
  --color-danger: #f87171;
  --color-info: #93c5fd;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stack-tight {
  --stack-space: var(--space-2);
}

.cluster-space-between {
  justify-content: space-between;
}

.site-shell {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.page-layout {
  display: grid;
  gap: var(--space-5);
}

.page-main {
  min-width: 0;
}

.page-sidebar {
  min-width: 0;
}

@media (min-width: 64rem) {
  .page-layout {
    grid-template-columns: minmax(0, 1.75fr) minmax(17rem, 0.65fr);
    align-items: start;
  }

  .page-sidebar {
    position: sticky;
    top: 1rem;
  }
}

.card {
  padding: clamp(1rem, 2.8vw, 1.75rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.eyebrow {
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  max-width: 60ch;
  color: var(--color-text);
  font-size: var(--step-1);
  line-height: var(--line-relaxed);
}

.site-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
  background: transparent;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-heading);
  font-weight: 700;
  text-decoration: none;
}

.site-logo img {
  width: auto;
  max-height: 3rem;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.theme-toggle {
  gap: var(--space-2);
}

.theme-toggle__icon {
  font-size: 1rem;
}

.site-nav {
  display: none;
}

@media (min-width: 54.25rem) {
  .site-nav {
    display: block;
  }
}

.site-nav__list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.site-nav__item {
  position: relative;
}

.site-nav__details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.site-nav__details summary {
  padding: 0.875rem 1rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  border-radius: inherit;
  border-bottom: 1px solid transparent;
}

.site-nav__details summary::-webkit-details-marker {
  display: none;
}

.site-nav__details[open] summary {
  border-bottom-color: var(--color-border);
  background: var(--color-surface-muted);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.site-nav__panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  min-width: 14rem;
  width: max-content;
  max-width: 22rem;
  margin-top: 0.25rem;
  padding: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.site-nav__item:nth-last-child(-n+2) .site-nav__panel {
  left: auto;
  right: 0;
}

.site-nav__jump {
  display: inline-flex;
  margin-bottom: var(--space-2);
  font-size: var(--step--1);
  font-weight: 600;
}

.site-nav__countries {
  max-height: 14rem;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-inline-start: 1rem;
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.search-toggle:hover {
  background: var(--color-surface-muted);
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(3rem, 10vh, 5rem);
  padding-inline: 1rem;
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 40, 0.55);
  cursor: pointer;
}

.search-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(15, 23, 40, 0.2);
}

.search-overlay__head {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.search-overlay__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.search-overlay__close:hover {
  background: var(--color-surface-muted);
}

/* Hero search on home page — kept for index.php */
.site-search {
  display: grid;
  gap: var(--space-4);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-muted);
}

@media (min-width: 52rem) {
  .site-search {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }
}

.site-search__copy > *:last-child {
  margin-bottom: 0;
}

.site-search__control {
  position: relative;
}

.site-search__input-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  gap: var(--space-2);
}

/* In the overlay the results are in-flow; in the hero they drop down absolutely */
.site-search__results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  z-index: 10;
}

.search-overlay__panel .site-search__results {
  position: static;
  margin-top: var(--space-2);
}

.site-search__results[hidden] {
  display: none;
}

.site-search__result {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
}

.site-search__result:hover,
.site-search__result:focus-visible {
  background: var(--color-surface-muted);
}

.site-search__hint {
  margin-top: 0.5rem;
  margin-bottom: 0;
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.home-hero {
  gap: var(--space-5);
}

.stats-strip {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.stats-strip div {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  font-size: var(--step-2);
  color: var(--color-heading);
}

.popular-rail {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.popular-rail__items {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}

.popular-pill {
  flex: 0 0 auto;
  min-width: 10rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.popular-pill span,
.popular-pill small {
  display: block;
}

.content-split {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 56rem) {
  .content-split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

.prose-card p:last-child,
.map-card p:last-child {
  margin-bottom: 0;
}

.continent-directory {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.continent-directory__summary {
  color: var(--color-text-muted);
}

.continent-tabs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
}

.continent-tab {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  white-space: nowrap;
}

.continent-tab.is-active {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 12%, var(--color-surface));
  color: var(--color-heading);
}

.continent-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
}

.continent-card {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.continent-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.continent-card__header span {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.continent-card__link {
  flex-shrink: 0;
  font-size: var(--step--1);
  font-weight: 700;
}

.country-link-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  padding: 0;
  list-style: none;
}

.country-link-grid li {
  margin: 0;
}

.country-link-grid a {
  display: block;
  height: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.continent-hub-section p:last-child {
  margin-bottom: 0;
}

.continent-hub-grid,
.continent-country-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
}

.continent-hub-card,
.continent-country-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  box-shadow: var(--shadow-sm);
}

.continent-hub-card span,
.continent-country-card span {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.continent-hero {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 62rem) {
  .continent-hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: start;
  }
}

.editorial-slot-note {
  padding: 0.875rem 1rem;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface-muted) 78%, transparent);
  color: var(--color-text-muted);
}

.continent-country-card__flag {
  font-size: 1.5rem;
  line-height: 1;
}

.sidebar-card {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.sidebar-card > *:last-child {
  margin-bottom: 0;
}

.sidebar-links {
  margin: 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  justify-content: center;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.footer__langs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.footer__langs a[aria-current="true"] {
  font-weight: 700;
  text-decoration: underline;
}

.install-prompt {
  position: fixed;
  right: 0.75rem;
  bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px) + 0.5rem);
  left: 0.75rem;
  z-index: 29;
  gap: var(--space-3);
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(13, 91, 215, 0.16), transparent 55%),
    var(--color-surface);
  box-shadow: var(--shadow-md);
}

.install-prompt:not([hidden]) {
  display: grid;
}

.install-prompt__eyebrow,
.install-prompt__copy {
  margin: 0;
}

.install-prompt__eyebrow {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install-prompt__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.country-hero {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 62rem) {
  .country-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }
}

.country-hero__links {
  margin-top: var(--space-2);
}

.country-hero__media {
  min-width: 0;
}

.country-fact-card {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
}

.country-fact-card__flag {
  margin-bottom: var(--space-3);
  font-size: 2rem;
}

.fact-list {
  display: grid;
  gap: var(--space-3);
}

.fact-list div {
  display: grid;
  gap: 0.25rem;
}

.fact-list dt {
  color: var(--color-text-muted);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fact-list dd {
  margin: 0;
  color: var(--color-heading);
  font-weight: 600;
}

.country-story p:last-child {
  margin-bottom: 0;
}

.country-faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.country-faq details + details {
  margin-top: var(--space-3);
}

.country-faq summary {
  padding: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.country-faq details p {
  margin: 0;
  padding: 0 1rem 1rem;
}

.neighbors-carousel {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.neighbor-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-muted);
  box-shadow: var(--shadow-sm);
}

.neighbor-card span {
  color: var(--color-text-muted);
  font-size: var(--step--1);
}

.continent-link-card .button {
  flex-shrink: 0;
}

.map-panel p:last-of-type {
  margin-bottom: 0;
}

#map-canvas {
  width: 100%;
  min-height: clamp(18rem, 48vw, 32rem);
}

.country-static-map img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.mobile-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  padding: 0.25rem;
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 -10px 24px rgba(15, 23, 40, 0.16);
}

.mobile-bottom-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-heading);
  font-size: 0.72rem;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (max-width: 22.5rem) {
  .mobile-bottom-nav a {
    font-size: 0.62rem;
  }
}

@media (min-width: 54.25rem) {
  .mobile-bottom-nav {
    display: none;
  }

  .install-prompt {
    right: 1rem;
    bottom: 1rem;
    left: auto;
    max-width: 26.25rem;
    display: none;
  }
}

/* Quiz CTA: mobile reorder — quiz above continent-hub */
@media (max-width: 640px) {
  .home-hero { order: -2; }
  .quiz-promo-card { order: -1; }
}

/* Inline quiz CTA card (land.php / continent.php) */
.quiz-inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(13,91,215,0.06), rgba(245,158,11,0.08));
  border-left: 3px solid #f59e0b;
}
.quiz-inline-cta__content { flex: 1; min-width: 0; }
