/* EMIGRATLY design system v3: editorial, calm, trust-led. Dark by default, true light theme, one gold accent.
   Tokens first; components below only use tokens. No inline styles anywhere (strict CSP). */

:root {
  --bg: #0b0c0e;
  --bg-tint: #101216;
  --surface: #14171c;
  --surface-2: #1a1e25;
  --ink: #f4f1ea;
  --ink-2: #bdbab2;
  --ink-3: #8f8d87;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);
  --gold: #dba94c;
  --gold-hi: #f0c46a;
  --gold-ink: #1b1407;
  --teal: #43b9cb;
  --focus: #f0c46a;
  --glow: radial-gradient(60% 60% at 70% 20%, rgba(219, 169, 76, 0.16), transparent 70%);

  --font-display: "Archivo", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-1: 6px;
  --r-2: 12px;
  --r-3: 20px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.25rem + 1.2vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 4.6rem);
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #faf8f4; --bg-tint: #f2eee6; --surface: #ffffff; --surface-2: #f6f2ea;
    --ink: #15171b; --ink-2: #474a52; --ink-3: #6b6e76;
    --line: rgba(20, 22, 26, 0.12); --line-2: rgba(20, 22, 26, 0.28);
    --gold: #9a6a10; --gold-hi: #b07c1c; --gold-ink: #ffffff; --teal: #0b7a8c; --focus: #9a6a10;
    --glow: radial-gradient(60% 60% at 70% 20%, rgba(176, 124, 28, 0.14), transparent 70%);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #faf8f4; --bg-tint: #f2eee6; --surface: #ffffff; --surface-2: #f6f2ea;
  --ink: #15171b; --ink-2: #474a52; --ink-3: #6b6e76;
  --line: rgba(20, 22, 26, 0.12); --line-2: rgba(20, 22, 26, 0.28);
  --gold: #9a6a10; --gold-hi: #b07c1c; --gold-ink: #ffffff; --teal: #0b7a8c; --focus: #9a6a10;
  --glow: radial-gradient(60% 60% at 70% 20%, rgba(176, 124, 28, 0.14), transparent 70%);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: var(--step-0) / 1.65 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
h1 em { font-style: normal; color: var(--gold); }
p { margin: 0 0 1em; text-wrap: pretty; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: var(--r-1); }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.05rem var(--font-display); letter-spacing: 0.08em; text-decoration: none; }
.brand__mark { display: inline-grid; grid-template-columns: repeat(3, 5px); grid-template-rows: repeat(3, 5px); gap: 2px; flex: none; }
.brand__mark span { width: 5px; height: 5px; background: var(--ink-3); opacity: 0.55; }
.brand__mark span:nth-child(1), .brand__mark span:nth-child(5), .brand__mark span:nth-child(7), .brand__mark span:nth-child(9) { background: var(--gold); opacity: 1; }
.nav { display: none; gap: 1.6rem; margin-left: auto; }
.nav a { text-decoration: none; font-size: 0.94rem; color: var(--ink-2); padding: 6px 0; border-bottom: 2px solid transparent; transition: color 0.18s, border-color 0.18s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); border-bottom-color: var(--gold); }
.top__end { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.icon-btn { background: none; border: 1px solid var(--line); color: var(--ink-2); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; }
.menu summary::-webkit-details-marker { display: none; }
.menu__panel { position: absolute; right: 0; top: 48px; width: min(80vw, 280px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-2); padding: 0.6rem; display: grid; gap: 2px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.menu__panel a:not(.btn) { padding: 0.7rem 0.8rem; border-radius: var(--r-1); text-decoration: none; }
.menu__panel a:not(.btn):hover { background: var(--surface-2); }
.menu__panel .btn { margin-top: 0.4rem; justify-content: center; }
@media (min-width: 980px) { .nav { display: flex; } .menu { display: none; } .top__end { margin-left: 0; } }
@media (max-width: 979px) { .top__end .btn--sm { display: none; } }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 0.95rem var(--font-body); text-decoration: none; padding: 0.7rem 1.15rem; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s; }
.btn:active { transform: scale(0.98); }
.btn--gold { background: var(--gold); color: var(--gold-ink); }
.btn--gold:hover { background: var(--gold-hi); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-2); background: var(--surface); }
.btn--sm { padding: 0.5rem 0.95rem; font-size: 0.88rem; }
.btn--lg { padding: 0.95rem 1.6rem; font-size: 1.02rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---- type helpers ---- */
.eyebrow { font: 700 var(--step--1) var(--font-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; display: flex; align-items: center; gap: 0.7rem; }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.lede { font-size: var(--step-1); color: var(--ink-2); line-height: 1.55; max-width: 62ch; margin-top: 1.1rem; }
.fine { font-size: var(--step--1); color: var(--ink-3); max-width: 78ch; margin-top: 1rem; }

/* ---- hero ---- */
.hero { position: relative; padding-top: clamp(2.5rem, 7vw, 6rem); background: var(--glow); overflow: hidden; }
.hero__grid { display: grid; gap: 2rem; align-items: center; }
.hero__copy .lede { margin-bottom: 1.8rem; }
.hero__art { max-width: 560px; justify-self: center; width: 100%; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; } }
.corridor { width: 100%; height: auto; }
.route { fill: none; stroke: var(--line-2); stroke-width: 1; }
.route--gold { stroke: var(--gold); stroke-opacity: 0.75; stroke-dasharray: 5 7; animation: flow 16s linear infinite; }
.node--src { fill: var(--gold); }
.node--dst { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1; }
@keyframes flow { to { stroke-dashoffset: -240; } }
@media (prefers-reduced-motion: reduce) { .route--gold { animation: none; } html { scroll-behavior: auto; } * { transition: none !important; } }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); overflow: hidden; }
.stats > div { padding: 1.4rem 1.5rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats dt { order: 2; color: var(--ink-3); font-size: 0.86rem; }
.stats dd { order: 1; margin: 0 0 4px; font: 800 var(--step-3) var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stats > div { display: flex; flex-direction: column; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } .stats > div { border-bottom: 0; } .stats > div:last-child { border-right: 0; } }

/* ---- sections ---- */
.sec { padding-block: clamp(3rem, 7vw, 6rem); }
.sec--tight { padding-block: clamp(1.5rem, 3.5vw, 2.5rem); }
.sec--tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.pagehead { padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.pagehead h1 { font-size: var(--step-4); max-width: 18ch; }
.pagehead .prose--lede { margin-top: 1.2rem; }
.h-region { font-size: var(--step-1); font-weight: 700; letter-spacing: 0; display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 1.2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.h-region span { font: 600 0.85rem var(--font-body); color: var(--ink-3); }

.stages { list-style: none; padding: 0; margin: 2.2rem 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; counter-reset: s; }
.stages li { background: var(--surface); padding: 1.6rem; }
.stages__n { display: block; font: 800 0.8rem var(--font-display); color: var(--gold); letter-spacing: 0.14em; margin-bottom: 2rem; }
.stages h3 { margin-bottom: 0.6rem; }
.stages p { color: var(--ink-2); font-size: 0.97rem; margin: 0; }
@media (min-width: 760px) { .stages { grid-template-columns: repeat(4, 1fr); } }

.cards { display: grid; gap: 1rem; margin-top: 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards--3, .cards--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } .cards--4 { grid-template-columns: repeat(4, 1fr); } }
.card { position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); text-decoration: none; transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: var(--surface-2); }
.card h3 { font-size: 1.12rem; }
.card p { color: var(--ink-2); font-size: 0.94rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { color: var(--ink-3) !important; font-size: 0.85rem !important; }
.card__go { margin-top: auto; padding-top: 0.8rem; color: var(--gold); font-size: 0.9rem; font-weight: 600; }
.card__go::after { content: " \2192"; }
.card--country { flex-direction: column; gap: 0.7rem; padding: 1.1rem 1.2rem; }
.flag { width: 28px; height: 20px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-2); }
.flag--lg { width: 40px; height: 28px; display: inline-block; margin-right: 0.6rem; vertical-align: 0.1em; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 1.6rem 0 0; }
.chips a { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.55rem 1rem; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; font-size: 0.95rem; }
.chips a:hover { border-color: var(--gold); }
.chips img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }

.table-wrap { overflow-x: auto; margin-top: 1.8rem; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
.fees { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 560px; }
.fees th, .fees td { text-align: left; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--line); }
.fees thead th { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.fees tbody tr:last-child > * { border-bottom: 0; }
.fees tbody th { font-weight: 600; }
.fees tbody tr:hover { background: var(--surface-2); }

.flags { padding-left: 0; list-style: none; counter-reset: f; display: grid; gap: 0.2rem; margin-top: 1.8rem; max-width: 80ch; }
.flags li { counter-increment: f; position: relative; padding: 1rem 0 1rem 3.2rem; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.flags li::before { content: counter(f, decimal-leading-zero); position: absolute; left: 0; top: 1.05rem; font: 800 0.85rem var(--font-display); color: var(--gold); letter-spacing: 0.08em; }
.flags strong { color: var(--ink); display: block; }

.faq { display: grid; margin-top: 1.6rem; max-width: 80ch; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.2rem 2rem 1.2rem 0; font: 700 1.1rem var(--font-display); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 1rem; color: var(--gold); font-size: 1.5rem; transition: transform 0.2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--ink-2); padding-bottom: 1.2rem; margin: 0; }

.band { background: linear-gradient(120deg, var(--surface-2), var(--surface)); border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.band__in { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; }
.band h2 { font-size: var(--step-2); max-width: 20ch; }

/* ---- article / destination ---- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0 0 1.4rem; font-size: 0.86rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--line-2); }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.6rem; margin: 2rem 0 0; }
.facts > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-1); padding: 1rem 1.2rem; }
.facts dt { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.25rem; }
.facts dd { margin: 0; font-weight: 600; }
.doc { display: grid; gap: 2rem; padding-block: 1rem 3rem; }
@media (min-width: 980px) { .doc:has(.toc) { grid-template-columns: 220px minmax(0, 1fr); gap: 4rem; } }
.toc { position: sticky; top: 90px; align-self: start; font-size: 0.92rem; }
.toc h2 { font: 700 0.74rem var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.8rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 0.4rem 0 0.4rem 1rem; text-decoration: none; color: var(--ink-2); margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--gold); }
@media (max-width: 979px) { .toc { display: none; } }
.docsec { padding-block: 1.6rem 0.6rem; max-width: 72ch; scroll-margin-top: 90px; }
.docsec h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.prose { max-width: 70ch; }
.prose--lede { font-size: var(--step-1); color: var(--ink-2); max-width: 64ch; }
.prose h3 { margin: 1.8rem 0 0.6rem; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 1.3rem; } .prose li { margin-bottom: 0.4rem; } .prose li::marker { color: var(--gold); }
.prose a { color: var(--gold); }
.prose table { border-collapse: collapse; width: 100%; } .prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.8rem; text-align: left; }

.timeline { list-style: none; padding: 0; margin: 0; max-width: 900px; }
.timeline li { display: grid; gap: 0.4rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.timeline__when { color: var(--gold); font: 700 0.8rem var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; }
.timeline h2 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.timeline p { color: var(--ink-2); margin: 0; max-width: 62ch; }
@media (min-width: 760px) { .timeline li { grid-template-columns: 200px 1fr; gap: 2rem; } }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); padding-top: 3.5rem; margin-top: 0; background: var(--bg); }
.foot__grid { display: grid; gap: 2.2rem; grid-template-columns: repeat(2, 1fr); }
.foot__grid > div { grid-column: 1 / -1; }
@media (min-width: 760px) { .foot__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .foot__grid > div { grid-column: auto; } }
.foot h2 { font: 700 0.74rem var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1rem; }
.foot nav a { display: block; text-decoration: none; color: var(--ink-2); padding: 0.28rem 0; } .foot nav a:hover { color: var(--ink); }
.foot__tag { color: var(--ink-3); max-width: 34ch; margin-top: 1rem; font-size: 0.94rem; }
.foot__legal { margin-top: 2.5rem; padding-block: 1.6rem 2.4rem; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.84rem; max-width: 95ch; }

.hero h1 { font-size: clamp(2.3rem, 1.4rem + 3.3vw, 3.9rem); }

/* Site-wide notice (set under Admin > Settings) */
.site-notice { background: color-mix(in srgb, var(--gold) 14%, var(--bg, transparent)); border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); padding: 0.6rem 0; font-size: 0.95rem; }
.site-notice--warn { background: color-mix(in srgb, #d9534f 16%, var(--bg, transparent)); border-bottom-color: color-mix(in srgb, #d9534f 60%, transparent); }
