/* exod.us — passport-page system */
:root {
  --paper: #EEF2EC;
  --paper-2: #E3EAE4;
  --page: #F6F8F3;
  --ink: #15233B;
  --ink-soft: #4B5A70;
  --rule: #C4D1C9;
  --navy: #1D3461;
  --navy-ink: #F6F8F3;
  --guilloche: #B9CCC2;
  --stamp-green: #2C7A57;
  --stamp-violet: #5A3F99;
  --stamp-red: #B0384A;
  --stamp-blue: #24508F;
  --focus: #2B6CB0;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1624;
    --paper-2: #132034;
    --page: #17253B;
    --ink: #E5ECE7;
    --ink-soft: #A5B2C4;
    --rule: #2A3B55;
    --navy: #C9D8F2;
    --navy-ink: #0E1624;
    --guilloche: #263A57;
    --stamp-green: #5CC28F;
    --stamp-violet: #AD93EA;
    --stamp-red: #EC8193;
    --stamp-blue: #86AEEB;
    --focus: #8DB8F5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1624;
  --paper-2: #132034;
  --page: #17253B;
  --ink: #E5ECE7;
  --ink-soft: #A5B2C4;
  --rule: #2A3B55;
  --navy: #C9D8F2;
  --navy-ink: #0E1624;
  --guilloche: #263A57;
  --stamp-green: #5CC28F;
  --stamp-violet: #AD93EA;
  --stamp-red: #EC8193;
  --stamp-blue: #86AEEB;
  --focus: #8DB8F5;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 50;
  background: var(--navy); color: var(--navy-ink); padding: 8px 14px; font-family: var(--sans);
}
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.wordmark {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em;
  text-decoration: none; color: var(--ink);
}
.wordmark span { color: var(--stamp-red); }
.site-header ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500; text-decoration: none; color: var(--ink-soft);
}
.site-header nav a:hover { color: var(--ink); }
@media (max-width: 760px) {
  .site-header nav li:not(:first-child) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600;
  border-radius: 4px; text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
}
.btn-primary { background: var(--navy); color: var(--navy-ink); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-quiet { border-color: var(--rule); color: var(--ink); background: transparent; }
.btn-quiet:hover { border-color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 112px); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
}
.hero h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.4rem);
  line-height: 0.98; letter-spacing: -0.035em; font-weight: 350;
  max-width: 11ch;
}
.lede { margin-top: 28px; font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 16px; font-family: var(--sans); font-size: 0.92rem; color: var(--ink-soft); }

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

/* ---------- Passport page ---------- */
.passport { margin: 0; }
.passport-page {
  position: relative; overflow: hidden;
  background: var(--page);
  border: 1px solid var(--rule);
  border-radius: 6px 14px 14px 6px;
  aspect-ratio: 5 / 6;
  padding: 22px 24px 18px;
  display: flex; flex-direction: column;
  box-shadow:
    -10px 0 0 -6px var(--paper-2),
    -10px 0 0 -5px var(--rule),
    0 30px 60px -30px color-mix(in srgb, var(--ink) 35%, transparent);
}
.passport-page::before { /* stitched spine */
  content: ""; position: absolute; left: 10px; top: 18px; bottom: 18px; width: 0;
  border-left: 1.5px dashed var(--guilloche);
}
.guilloche { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.passport-head {
  position: relative; display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--cond); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.08em; color: var(--ink-soft);
  padding-left: 8px;
}
.page-no { font-family: var(--serif); font-style: italic; letter-spacing: 0; font-weight: 400; }
.stamp-field { position: relative; flex: 1; }
.mrz {
  position: relative; font-family: var(--mono); font-size: clamp(0.56rem, 1.15vw, 0.74rem);
  letter-spacing: 0.12em; color: var(--ink-soft); opacity: 0.75; white-space: nowrap; overflow: hidden;
  padding-left: 8px; line-height: 1.5;
}

/* ---------- Stamps ---------- */
.stamp {
  --ink-c: var(--stamp-green);
  position: absolute;
  display: grid; place-items: center; text-align: center;
  color: var(--ink-c);
  font-family: var(--cond); font-weight: 700; text-transform: uppercase; line-height: 1.02;
  border: 2.5px solid currentColor;
  padding: 8px 14px 9px;
  border-radius: 10px;
  transform: rotate(var(--rot, -6deg));
  /* speckled ink: a noise texture used as an alpha mask */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='1' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -2.4 0 0 0 2.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='1' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  -2.4 0 0 0 2.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.9;
}
.stamp::after { /* inner rule */
  content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 7px; pointer-events: none;
}
.stamp.round { border-radius: 50%; width: 8.4em; height: 8.4em; padding: 0 10px; }
.stamp.round::after { border-radius: 50%; }
.stamp .s-country { font-size: 1.35em; letter-spacing: 0.04em; }
.stamp .s-route { font-size: 0.72em; letter-spacing: 0.08em; font-weight: 600; margin-top: 3px; }
.stamp .s-date { font-size: 0.7em; letter-spacing: 0.12em; font-weight: 600; margin-top: 4px; padding-top: 3px; border-top: 1px solid currentColor; }
.stamp.green { --ink-c: var(--stamp-green); }
.stamp.violet { --ink-c: var(--stamp-violet); }
.stamp.red { --ink-c: var(--stamp-red); }
.stamp.blue { --ink-c: var(--stamp-blue); }

#hero-stamps .stamp { font-size: clamp(0.78rem, 1.5vw, 1rem); }

@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(var(--rot)) scale(1.6); }
  60% { opacity: 0.95; transform: rotate(var(--rot)) scale(0.96); }
  100% { opacity: 0.9; transform: rotate(var(--rot)) scale(1); }
}
.stamp.animate { animation: stamp-in 420ms cubic-bezier(.2,.8,.3,1.2) both; animation-delay: var(--delay, 0ms); }
@media (prefers-reduced-motion: reduce) { .stamp.animate { animation: none; } }

/* ---------- Section scaffolding ---------- */
section { scroll-margin-top: 72px; }
.section-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2, .signup h2, .faq h2 {
  font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; letter-spacing: -0.025em; font-weight: 350;
}
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- Qualifier ---------- */
.qualify { background: var(--paper-2); padding: clamp(64px, 8vw, 112px) 0; border-block: 1px solid var(--rule); }
.qualify-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .qualify-grid { grid-template-columns: 1fr; } }

.quiz { display: grid; gap: 30px; font-family: var(--sans); }
.quiz fieldset { border: 0; margin: 0; padding: 0 0 26px; border-bottom: 1px solid var(--rule); min-width: 0; }
.quiz fieldset:last-child { border-bottom: 0; padding-bottom: 0; }
.quiz legend { font-family: var(--serif); font-size: 1.3rem; letter-spacing: -0.01em; padding: 0; margin-bottom: 12px; }
.hint { font-size: 0.95rem; color: var(--ink-soft); margin: -6px 0 12px; }

.range-row { display: flex; align-items: center; gap: 18px; }
.range-row output {
  font-family: var(--cond); font-weight: 600; font-size: 1.6rem; min-width: 5.6ch; text-align: right; font-variant-numeric: tabular-nums;
}
input[type="range"] {
  -webkit-appearance: none; appearance: none; flex: 1; height: 28px; background: transparent; cursor: pointer; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: var(--rule); border-radius: 2px; }
input[type="range"]::-moz-range-track { height: 3px; background: var(--rule); border-radius: 2px; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9.5px; border-radius: 50%;
  background: var(--page); border: 2.5px solid var(--navy);
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--page); border: 2.5px solid var(--navy); }

.choices { display: grid; gap: 10px; }
.choices-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 1.02rem; line-height: 1.4; }
.choice input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex-shrink: 0; }

.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 8px 14px; border: 1.5px solid var(--rule); border-radius: 999px;
  font-size: 0.95rem; font-weight: 500; background: var(--page);
}
.chip input:checked + span { background: var(--navy); color: var(--navy-ink); border-color: var(--navy); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.results { position: sticky; top: 88px; }
@media (max-width: 900px) { .results { position: static; } }
.results-page { aspect-ratio: auto; min-height: 520px; }
.result-stamps {
  position: relative; flex: 1; margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 14px 10px; align-content: flex-start; justify-content: center;
  padding: 6px 0 6px 8px;
}
.result-stamps .stamp {
  position: relative; font-size: 0.86rem; cursor: pointer; background: transparent;
  margin: 4px 2px;
}
.result-stamps .stamp:hover { opacity: 1; }
.result-stamps .stamp:focus-visible { outline-offset: 6px; }
.result-stamps .stamp.maybe { border-style: dashed; opacity: 0.72; }
.result-stamps .stamp.maybe::after { display: none; }
.empty-stamps {
  margin: auto; max-width: 22em; text-align: center; color: var(--ink-soft); font-family: var(--sans); font-size: 1rem; padding: 40px 0;
}
.results-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin-top: 16px; font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft);
}
.key { width: 22px; height: 12px; border: 2px solid var(--ink-soft); border-radius: 3px; display: inline-block; }
.key-maybe { border-style: dashed; margin-left: 8px; }
.results-help { margin-top: 6px; font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Compare ---------- */
.compare { padding: clamp(64px, 8vw, 112px) 0; }
.filter-bar { display: inline-flex; border: 1.5px solid var(--rule); border-radius: 6px; overflow: hidden; margin-bottom: 18px; font-family: var(--sans); }
.seg { background: transparent; border: 0; padding: 9px 16px; font: inherit; font-weight: 500; color: var(--ink-soft); cursor: pointer; }
.seg + .seg { border-left: 1.5px solid var(--rule); }
.seg[aria-pressed="true"] { background: var(--navy); color: var(--navy-ink); }

.table-scroll { overflow-x: auto; border-top: 2px solid var(--ink); }
.compare-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.98rem; min-width: 940px; }
.compare-table th { text-align: left; vertical-align: bottom; padding: 0; border-bottom: 1px solid var(--ink); }
.compare-table th button {
  all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer;
  padding: 14px 12px 12px; font-family: var(--cond); font-weight: 600; font-size: 1rem; line-height: 1.15; color: var(--ink-soft);
}
.compare-table th button:hover { color: var(--ink); }
.compare-table th button:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.compare-table th[aria-sort] button { color: var(--ink); }
.compare-table th[aria-sort="ascending"] button::after { content: " ↑"; }
.compare-table th[aria-sort="descending"] button::after { content: " ↓"; }
.compare-table td { padding: 14px 12px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; vertical-align: top; }
.compare-table tbody tr:hover { background: color-mix(in srgb, var(--paper-2) 70%, transparent); }
.compare-table th:first-child, .compare-table td:first-child { position: sticky; left: 0; background: var(--paper); z-index: 1; }
.compare-table tbody tr:hover td:first-child { background: var(--paper-2); }
.country-btn {
  all: unset; cursor: pointer; font-family: var(--serif); font-size: 1.12rem; display: inline-flex; gap: 10px; align-items: center; white-space: nowrap;
  text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px;
}
.country-btn:hover { text-decoration-color: currentColor; }
.country-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.flag { width: 22px; height: auto; aspect-ratio: 4 / 3; border-radius: 2px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 15%, transparent); flex-shrink: 0; }
.chip .flag { display: inline-block; width: 18px; margin-right: 7px; vertical-align: -2px; }
.flag-lg { width: 40px; }
.compare-table td:nth-child(n+2) { white-space: nowrap; }
.na { color: var(--ink-soft); }
.dots { letter-spacing: 2px; color: var(--navy); }
.dots .off { color: var(--rule); }
.yes { color: var(--stamp-green); font-weight: 600; }
.no { color: var(--stamp-red); font-weight: 600; }
.table-note { margin-top: 14px; font-family: var(--sans); font-size: 0.9rem; color: var(--ink-soft); max-width: 60em; }

/* ---------- Steps ---------- */
.steps { padding: clamp(64px, 8vw, 112px) 0; background: var(--paper-2); border-block: 1px solid var(--rule); }
.steps-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 96px); }
.sticky-head { position: sticky; top: 100px; align-self: start; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: 1fr; } .sticky-head { position: static; } }

.timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.timeline li { position: relative; counter-increment: step; padding: 0 0 40px 72px; }
.timeline li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--navy); color: var(--navy); background: var(--page);
  font-family: var(--cond); font-weight: 700; font-size: 1.3rem;
}
.timeline li::after {
  content: ""; position: absolute; left: 23px; top: 48px; bottom: 4px; border-left: 2px dotted var(--guilloche);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline h3 { font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 8px; }
.timeline p { color: var(--ink-soft); max-width: 36em; }

.partner {
  display: inline-block; margin-top: 12px; font-family: var(--sans); font-weight: 600; font-size: 0.98rem;
  color: var(--navy); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
}
.partner:hover { text-decoration-thickness: 3px; }

/* ---------- Money ---------- */
.money { padding: clamp(64px, 8vw, 112px) 0; }
.money-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin: 0; }
.money-list > div { padding: 22px 0 26px; border-top: 1px solid var(--rule); }
.money-list dt { font-size: 1.35rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.money-list dd { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }
@media (max-width: 900px) { .money-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .money-list { grid-template-columns: 1fr; } }
.partner-block { margin-top: 24px; }

/* ---------- Signup ---------- */
.signup { background: var(--navy); color: var(--navy-ink); padding: clamp(64px, 8vw, 104px) 0; }
.signup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .signup-grid { grid-template-columns: 1fr; } }
.signup h2 { color: var(--navy-ink); }
.signup-grid > div p { margin-top: 18px; font-size: 1.15rem; opacity: 0.85; max-width: 30em; }
.signup-form { display: grid; gap: 8px; font-family: var(--sans); }
.signup-form label { font-weight: 500; font-size: 0.98rem; margin-top: 8px; }
.signup-form input[type="email"], .signup-form select {
  min-height: 48px; padding: 0 14px; font: inherit; font-size: 1.05rem;
  background: var(--navy-ink); color: var(--ink); border: 1.5px solid transparent; border-radius: 4px;
}
:root[data-theme="dark"] .signup-form input[type="email"], :root[data-theme="dark"] .signup-form select { color: var(--paper); background: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .signup-form input[type="email"],
  :root:not([data-theme="light"]) .signup-form select { color: #E5ECE7; background: #0E1624; }
}
.signup-form input[aria-invalid="true"] { border-color: var(--stamp-red); }
.signup-form .check { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 6px; font-weight: 400; line-height: 1.4; cursor: pointer; }
.signup-form .check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--navy-ink); }
.signup-form .btn-primary { background: var(--navy-ink); color: var(--navy); margin-top: 8px; justify-self: start; }
.signup-form :focus-visible { outline-color: var(--navy-ink); }
.form-msg { min-height: 1.4em; font-weight: 500; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fine { font-family: var(--sans); font-size: 0.88rem; opacity: 0.75; line-height: 1.5; }

/* ---------- FAQ ---------- */
.faq { padding: clamp(64px, 8vw, 112px) 0; }
.faq-wrap { max-width: 860px; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-size: 1.3rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.6rem; font-weight: 400; color: var(--ink-soft);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 24px; color: var(--ink-soft); max-width: 40em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 56px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: start; }
.footer-grid p { color: var(--ink-soft); margin-top: 6px; font-size: 1rem; }
.footer-grid .fine { opacity: 1; margin-top: 0; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Country dialog ---------- */
.country-dialog {
  width: min(680px, calc(100vw - 32px)); max-height: min(86vh, 900px);
  padding: 0; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--page); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(10, 20, 40, 0.5);
}
.country-dialog::backdrop { background: rgba(14, 22, 36, 0.55); }
.country-dialog[open] { animation: dlg-in 220ms ease-out; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .country-dialog[open] { animation: none; } }
.dialog-close-form { position: sticky; top: 0; display: flex; justify-content: flex-end; height: 0; z-index: 2; }
.dialog-close {
  margin: 12px 12px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule);
  background: var(--page); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
#cd-body { padding: 32px clamp(20px, 5vw, 40px) 36px; }
.cd-title { font-size: clamp(2rem, 5vw, 2.6rem); letter-spacing: -0.025em; line-height: 1.05; display: flex; gap: 14px; align-items: center; padding-right: 40px; }
.cd-verdict { margin-top: 12px; color: var(--ink-soft); font-size: 1.12rem; }
.cd-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 8px; padding: 16px 0; border-block: 1px solid var(--rule); font-family: var(--sans); }
.cd-facts div { display: grid; gap: 2px; }
.cd-facts span { font-size: 0.85rem; color: var(--ink-soft); }
.cd-facts strong { font-family: var(--cond); font-size: 1.5rem; font-weight: 600; }
@media (max-width: 520px) { .cd-facts { grid-template-columns: 1fr 1fr; } }
.cd-h { font-size: 1.3rem; margin: 26px 0 10px; }
.cd-routes { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.cd-routes li { padding: 14px 0; border-bottom: 1px solid var(--rule); font-family: var(--sans); }
.cd-routes li:last-child { border-bottom: 0; }
.cd-route-name { font-weight: 600; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.cd-route-req { color: var(--ink-soft); margin-top: 4px; line-height: 1.5; }
.cd-tag {
  font-family: var(--cond); font-weight: 600; font-size: 0.85rem; padding: 1px 8px; border-radius: 3px;
  border: 1.5px solid currentColor;
}
.cd-tag.likely { color: var(--stamp-green); }
.cd-tag.maybe { color: var(--stamp-violet); border-style: dashed; }
.cd-notes { font-family: var(--sans); color: var(--ink-soft); font-size: 1rem; display: grid; gap: 10px; }
.cd-notes strong { color: var(--ink); font-weight: 600; }
.cd-sources { font-family: var(--sans); font-size: 0.9rem; margin-top: 10px; padding-left: 18px; color: var(--ink-soft); }
.cd-sources a { word-break: break-word; }
.cd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
