/* The Second Passport — stylesheet v2.
   Visual language taken from the passport itself, used only where it carries information:
   ink stamp = program status, data page (guilloche + MRZ) = key facts, entry stamps = dated
   changes, passport covers = navigation between programs. Everything else stays quiet.
   Mobile-first. No external requests. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var-latin-v5.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-var-latin-v5.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}

:root {
  --ink: #0F2442;
  --ink-2: #2A3D57;
  --muted: #55657A;
  --paper: #FFFFFF;
  --mist: #F4F6F9;
  --line: #DCE3EA;
  --line-strong: #C3CDD8;
  --cover: #1B3A6B;
  --cover-deep: #132B50;
  --foil: #E2B44C;
  --foil-ink: #8A6312;
  --foil-soft: #FBF3DF;
  --security: #EEF3EF;
  --security-line: #CBDAD1;
  --stamp-ok: #1E6B4F;
  --stamp-warn: #9A5B00;
  --stamp-stop: #A3202C;
  --alert-bg: #FFF6E5;
  --alert-line: #F0C98A;
  --alert-ink: #6E3A06;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ocr: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --tap: 44px;
  --r-lg: 14px;
  --r-md: 10px;
  --lift: 0 1px 2px rgba(15, 36, 66, .06), 0 8px 24px rgba(15, 36, 66, .07);
  --guilloche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='36' viewBox='0 0 120 36'%3E%3Cg fill='none' stroke-width='.7'%3E%3Cpath d='M0 18 Q15 4 30 18 T60 18 T90 18 T120 18' stroke='%23C3D4CA'/%3E%3Cpath d='M0 26 Q15 12 30 26 T60 26 T90 26 T120 26' stroke='%23D3E0D8'/%3E%3Cpath d='M0 10 Q15 -4 30 10 T60 10 T90 10 T120 10' stroke='%23D3E0D8'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--cover); text-decoration-color: var(--foil); text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { color: var(--cover-deep); text-decoration-color: var(--cover); }
:focus-visible { outline: 3px solid var(--foil); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-md); }
.skip:focus { top: 8px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--font-serif); color: var(--ink); letter-spacing: -.015em; }
h1 { font-size: clamp(32px, 5.6vw, 50px); line-height: 1.08; margin: 14px 0 14px; font-weight: 700; }
h2 { font-size: clamp(24px, 3.4vw, 31px); line-height: 1.18; margin: 0 0 14px; font-weight: 700; }
h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; }
p { margin: 0 0 12px; }
.lead { font-size: clamp(18px, 2.2vw, 20px); line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; max-width: 64ch; }
.note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.prose { max-width: 70ch; }

/* ── Header ─────────────────────────────────────────────── */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-serif); font-weight: 700; font-size: 21px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo:hover { color: var(--ink); }
.logo__icon { flex: none; width: 30px; height: 30px; }
.nav-toggle {
  width: var(--tap); height: var(--tap); display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); color: var(--ink); cursor: pointer;
}
.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cover); text-decoration: underline; text-decoration-color: var(--foil); }
.site-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--lift); padding: 8px 16px 16px; }
.site-nav.is-open li a { display: flex; align-items: center; min-height: var(--tap); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open { display: block; position: static; box-shadow: none; border: 0; padding: 0; }
  .site-nav ul { display: flex; gap: 26px; font-size: 15px; }
  .site-nav.is-open li a { border: 0; min-height: 0; }
}

/* ── Breadcrumb & alert ─────────────────────────────────── */
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 16px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration-color: var(--line-strong); }

.banner {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 14px;
  padding: 12px 16px; border-radius: var(--r-md); font-size: 14.5px; line-height: 1.5;
  background: var(--alert-bg); border: 1px solid var(--alert-line); color: var(--alert-ink);
}
.banner p { margin: 0; }
.banner svg { flex: none; margin-top: 2px; }
.banner a { color: var(--alert-ink); font-weight: 600; text-decoration-color: currentColor; }
.banner--medium { background: var(--mist); border-color: var(--line-strong); color: var(--ink-2); }
.banner--medium a { color: var(--ink-2); }

/* ── Program hero ───────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 8px; padding-bottom: 8px; }
.hero__text h1 { max-width: 20ch; }
.hero__photo { position: relative; margin: 0; }
.hero__photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--lift); background: var(--mist); }
.hero__photo figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: right; }
.hero__photo figcaption a { color: var(--muted); text-decoration-color: var(--line-strong); text-decoration-thickness: 1px; }
.hero__stamp { position: absolute; left: 14px; bottom: 44px; }
@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 18px; }
  .hero__stamp { left: -28px; bottom: 40px; }
}

/* Byline */
.byline { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); }
.byline > div { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.byline__photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--foil); }
.byline .verified { display: inline-flex; align-items: center; gap: 5px; color: var(--stamp-ok); font-weight: 600; }

/* ── Ink stamp (status) ─────────────────────────────────── */
.stamp {
  --c: var(--stamp-ok);
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 14px 5px; color: var(--c); background: rgba(255, 255, 255, .92);
  border: 2.5px solid var(--c); border-radius: 8px; outline: 1px solid var(--c); outline-offset: 2px;
  font-family: var(--font-serif); font-weight: 800; line-height: 1.1; transform: rotate(-7deg);
}
.stamp__main { font-size: 18px; letter-spacing: .02em; }
.stamp__date { font-family: var(--font-sans); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.stamp--warn { --c: var(--stamp-warn); }
.stamp--stop { --c: var(--stamp-stop); }
td .stamp { transform: rotate(-3deg); padding: 3px 10px 2px; border-width: 2px; outline-offset: 1px; }
td .stamp__main { font-size: 14px; }

/* ── Layout ─────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 20px; padding-bottom: 56px; }
.content > section { margin-top: 52px; scroll-margin-top: 16px; }
.content > section:first-child { margin-top: 0; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
  .sidebar { position: sticky; top: 16px; align-self: start; }
}

/* ── Data page (key facts) ──────────────────────────────── */
.datapage {
  position: relative; padding: 20px 16px 16px; border-radius: var(--r-lg);
  background-color: var(--security); background-image: var(--guilloche); background-size: 120px 36px;
  border: 1px solid var(--security-line); box-shadow: var(--lift);
}
.datapage__title { font-size: 21px; margin: 0 0 14px; }
.datapage__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.field { margin: 0; padding: 10px 12px; background: rgba(255, 255, 255, .78); border-radius: var(--r-md); }
.field dt { font-size: 12.5px; color: var(--muted); }
.field dd { margin: 2px 0 0; font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1.25; }
.field dd a { color: var(--ink); }
.field dd.is-warn { color: var(--stamp-warn); }
.field dd.is-danger { color: var(--stamp-stop); }
.datapage__sub { font-size: 15px; margin: 18px 0 8px; font-family: var(--font-sans); color: var(--ink-2); }
.datapage__obs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.datapage__obs li { padding: 9px 12px; background: rgba(255, 255, 255, .78); border-radius: var(--r-md); }
.obs__label { display: block; font-size: 12.5px; color: var(--muted); }
.mrz {
  margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--security-line);
  font-family: var(--font-ocr); font-size: 12px; letter-spacing: .12em; color: #6A7B8F;
  display: grid; gap: 2px; overflow: hidden;
}
.mrz span { white-space: nowrap; overflow: hidden; }
@media (min-width: 700px) {
  .datapage { padding: 24px 24px 18px; }
  .datapage__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .datapage__obs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mrz { font-size: 13px; letter-spacing: .16em; }
}

/* ── Table of contents ──────────────────────────────────── */
.toc { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; font-size: 14.5px; background: var(--paper); margin-top: 24px; }
.toc summary { font-weight: 700; cursor: pointer; min-height: 28px; }
.toc ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.toc a { display: flex; align-items: center; min-height: 38px; text-decoration-color: var(--line-strong); }
.sidebar .toc { margin-top: 0; }
.sidebar .toc ol { grid-template-columns: 1fr; }
@media (max-width: 1023px) { .sidebar .toc { display: none; } }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { border-top: 0; background: var(--mist); font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
tbody th { font-weight: 500; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total th, tr.total td { font-weight: 700; background: #EAF0F8; border-top: 2px solid var(--cover); }
.table-wrap table { min-width: 0; }
.table-wrap table.is-wide { min-width: 560px; }
.is-selected { background: var(--foil-soft); }
tr.total .is-selected { background: #F6E6BA; }
@media (max-width: 699px) {
  .table-wrap table.is-single { min-width: 0; }
  table.is-single [data-household]:not(.is-selected) { display: none; }
  th, td { padding: 10px 12px; }
}
/* Comparison tables become one card per program below 900px: six columns don't fit a tablet. */
@media (max-width: 899px) {
  .table-wrap--stack { border: 0; overflow: visible; background: transparent; }
  .table-wrap--stack table.stack { min-width: 0; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack th, table.stack td { display: block; }
  table.stack tr { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 14px 10px; margin-bottom: 10px; background: var(--paper); }
  table.stack th[scope="row"] { border: 0; padding: 8px 0; font-size: 18px; }
  table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); text-align: right; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-weight: 500; text-align: left; }
  table.stack td { white-space: normal; }
  table.stack td::before { flex: none; }
}
sup.cite { font-size: 11px; margin-left: 2px; }
sup.cite a { text-decoration: none; padding: 0 2px; color: var(--foil-ink); font-weight: 600; }

/* ── Calculator ─────────────────────────────────────────── */
.calc { margin: 0 0 14px; padding: 18px; border-radius: var(--r-lg); background: var(--cover); color: #fff; box-shadow: var(--lift); }
.calc__label { font-size: 14px; font-weight: 600; margin: 0 0 10px; color: #D8E1EE; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font: inherit; font-size: 14.5px; font-weight: 500; min-height: var(--tap); padding: 0 16px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; cursor: pointer;
}
.pill:hover { border-color: var(--foil); }
.pill[aria-pressed="true"] { background: var(--foil); border-color: var(--foil); color: var(--ink); font-weight: 700; }
.calc__result { margin: 16px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; color: #D8E1EE; }
.calc__result strong { font-family: var(--font-serif); font-size: clamp(26px, 4vw, 34px); color: #fff; letter-spacing: -.01em; }

/* ── Lists, steps, changelog, FAQ, sources ──────────────── */
.list { margin: 0; padding-left: 20px; line-height: 1.75; }
.list li { margin-bottom: 4px; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: step; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; min-height: 36px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700; color: var(--cover);
  border: 2px solid var(--cover); background: var(--paper); z-index: 1;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: -16px; width: 2px; background: var(--line); }
.steps strong { display: block; }
.changelog { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.changelog li { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: start; }
.changelog p { margin: 0; }
.entry-stamp {
  justify-self: start; display: inline-block; padding: 3px 10px; font-family: var(--font-serif); font-weight: 700; font-size: 14px;
  color: var(--cover); border: 1.5px solid var(--cover); border-radius: 5px; transform: rotate(-1.5deg); background: var(--paper);
}
.changelog li:nth-child(even) .entry-stamp { transform: rotate(1.2deg); }
@media (min-width: 700px) { .changelog li { grid-template-columns: 190px 1fr; gap: 18px; } .entry-stamp { justify-self: end; } }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 600; font-size: 17px; cursor: pointer; min-height: 28px; }
.faq summary::marker { color: var(--foil-ink); }
.faq details[open] summary { color: var(--cover); }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }
.sources { font-size: 14px; padding-left: 22px; display: grid; gap: 8px; color: var(--ink-2); }
.sources li:target { background: var(--foil-soft); border-radius: 4px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #E6F1EC; color: var(--stamp-ok); }

.risk-high { color: var(--stamp-stop); font-weight: 600; }
.risk-medium { color: var(--stamp-warn); font-weight: 600; }
.risk-low, .risk-none { color: var(--stamp-ok); font-weight: 600; }
.risk-lost { color: var(--muted); font-weight: 600; }
.card__meta { font-size: 12.5px; color: var(--muted); }

/* ── Passport covers (navigation between programs) ──────── */
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 18px; }
.cover {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 196px; padding: 18px 14px 14px 22px;
  border-radius: 6px 14px 14px 6px; text-decoration: none; color: #fff;
  --c: var(--cover);
  background: var(--c);
  background: linear-gradient(155deg, color-mix(in srgb, var(--c) 80%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 72%, #000) 100%);
  box-shadow: inset 7px 0 0 rgba(0, 0, 0, .2), var(--lift);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cover:hover { color: #fff; transform: translateY(-3px); box-shadow: inset 7px 0 0 rgba(0, 0, 0, .2), 0 14px 30px rgba(15, 36, 66, .2); }
.cover__emblem { color: var(--foil); margin-bottom: 4px; line-height: 0; }
.cover__name { font-family: var(--font-serif); font-weight: 700; font-size: 19px; line-height: 1.2; color: #fff; }
.cover__price { margin-top: auto; font-weight: 700; font-size: 16px; color: #F3DFA8; }
.cover__from { font-weight: 500; font-size: 12.5px; color: #C9D4E6; }
.cover__status { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #E7EEF8; }
.cover__status--warn { background: rgba(226, 180, 76, .3); }
.cover__status--stop { background: rgba(163, 32, 44, .6); }
/* Real passport colour per country (--c, set inline). Golden visas get a residence card instead:
   you get a permit, not a passport — the shape says it before the text does. */
.cover__kind { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: rgba(255, 255, 255, .72); }
.cover--card {
  border-radius: 14px; padding: 0 14px 14px; color: var(--ink); overflow: hidden;
  background: linear-gradient(180deg, var(--c) 0 46px, #F4F7F3 46px 100%);
  box-shadow: inset 0 0 0 1px var(--line), var(--lift);
}
.cover--card:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px rgba(15, 36, 66, .2); }
.cover--card .cover__emblem { color: var(--foil); height: 46px; display: flex; align-items: center; margin: 0; }
.cover--card .cover__kind { color: #4A5A70; margin-top: 8px; }
.cover--card .cover__name { color: var(--ink); }
.cover--card .cover__price { color: var(--c); }
.cover--card .cover__from { color: #4A5A70; }
.cover--card .cover__status { background: #E3EAE2; color: var(--ink); }
.cover--card .cover__status--warn { background: #F6E7C1; }
.cover--card .cover__status--stop { background: #F4D3D6; }

/* ── Hub & home hero ────────────────────────────────────── */
.hub-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 22px 0 8px; }
.hub-hero h1 { max-width: 18ch; }
@media (min-width: 1024px) {
  .hub-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 40px; }
  .covers--fan { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .covers--fan .cover:nth-child(3n+1) { transform: rotate(-3deg) translateY(6px); }
  .covers--fan .cover:nth-child(3n+3) { transform: rotate(3deg) translateY(6px); }
  .covers--fan .cover:hover { transform: rotate(0) translateY(-4px); }
}

/* ── Sidebar, panels, buttons ───────────────────────────── */
.sidebar { display: grid; gap: 16px; align-content: start; }
.panel { padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); }
.panel h2 { font-size: 21px; }
.panel--soft { background-color: var(--security); background-image: var(--guilloche); background-size: 120px 36px; border-color: var(--security-line); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 18px;
  border-radius: var(--r-md); border: 0; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--cover); color: #fff;
}
.btn:hover { background: var(--cover-deep); color: #fff; }
.btn--ghost { background: var(--paper); border: 1.5px solid var(--cover); color: var(--cover); }
.btn--ghost:hover { background: var(--mist); color: var(--cover); }
.btn--block { display: flex; width: 100%; }

/* ── Mobile CTA bar ─────────────────────────────────────── */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(15, 36, 66, .08);
}
.cta-bar .btn { flex: 1; font-size: 14.5px; }
.has-cta-bar { padding-bottom: 72px; }
@media (min-width: 1024px) { .cta-bar { display: none; } .has-cta-bar { padding-bottom: 0; } }

/* ── Subscribe form ─────────────────────────────────────── */
.subscribe { display: grid; gap: 10px; }
.subscribe .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.subscribe label.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; padding: 0; background: none; }
.subscribe input[type="email"] {
  font: inherit; font-weight: 400; min-height: var(--tap); padding: 0 12px; width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--paper); color: var(--ink);
}
.subscribe input[type="email"]:focus-visible { border-color: var(--cover); }
.subscribe .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); }
.subscribe .consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--cover); }
.subscribe__status { margin: 0; font-size: 14px; min-height: 1px; }
.subscribe__status.is-ok { color: var(--stamp-ok); font-weight: 600; }
.subscribe__status.is-error { color: var(--stamp-stop); font-weight: 600; }
.subscribe.is-done .field, .subscribe.is-done .consent, .subscribe.is-done button { display: none; }

/* ── Person page ────────────────────────────────────────── */
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 8px 0 20px; }
.person-photo { width: 124px; height: 124px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--foil), var(--lift); }
.person-head h1 { margin: 0 0 4px; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #C2CCDA; font-size: 13.5px; padding: 32px 0; margin-top: 24px; }
.site-footer p { margin: 0 0 10px; }
.site-footer strong { color: #fff; }
.site-footer ul { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: #E7EEF8; text-decoration-color: var(--foil); display: inline-flex; min-height: 32px; align-items: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .cover:hover, .covers--fan .cover:hover { transform: none; }
}
@media print { .site-header, .sidebar, .cta-bar, .site-footer, .calc, .hero__photo { display: none; } a { color: inherit; } }

/* ── Home search (instant filter, grows with the number of programs) ── */
.search { position: relative; max-width: 460px; margin-top: 18px; }
.search__icon { position: absolute; left: 14px; top: 15px; color: #4A5A70; pointer-events: none; }
.search input {
  width: 100%; min-height: 48px; padding: 10px 14px 10px 42px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-strong); border-radius: 999px; box-shadow: var(--lift);
}
.search input:focus { outline: none; border-color: var(--cover); box-shadow: 0 0 0 3px rgba(226, 180, 76, .45); }
.search__results {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 14px 30px rgba(15, 36, 66, .16);
}
.search__results a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search__results a:hover, .search__results a:focus { background: #EEF3EF; outline: none; }
.search__name { font-weight: 600; }
.search__meta { font-size: 13.5px; color: #4A5A70; white-space: nowrap; }
.search__none { padding: 10px 12px; color: #4A5A70; font-size: 14.5px; }

/* ── Contact form ───────────────────────────────────────── */
.contact { display: grid; gap: 14px; max-width: 640px; margin-top: 24px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--lift); }
.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact__row { display: grid; gap: 14px; }
@media (min-width: 640px) { .contact__row { grid-template-columns: 1fr 1fr; } }
.contact .field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; padding: 0; background: none; }
.contact input, .contact select, .contact textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: 10px;
}
.contact textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.contact input:focus-visible, .contact select:focus-visible, .contact textarea:focus-visible { outline: none; border-color: var(--cover); box-shadow: 0 0 0 3px rgba(226, 180, 76, .45); }
.contact .note { margin: 0; }
.contact .btn { justify-self: start; }
.contact__status { margin: 0; font-weight: 600; }
.contact__status:empty { display: none; }
.contact__status.is-ok { color: #1E6B45; }
.contact__status.is-error { color: #A3202C; }

/* ── "More programs" under the hero covers ── */
.covers--more { margin-top: 14px; }
.covers--more[hidden] { display: none; }
.covers__more { margin-top: 18px; }
@media (min-width: 1024px) { .hub-hero:has(.covers--more:not([hidden])) { align-items: start; } }

/* ── Insights (articles and listing) ─────────────────────── */
.article-head { padding-top: 8px; padding-bottom: 8px; }
.article-head h1 { max-width: 24ch; }
.eyebrow { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.eyebrow__kind { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--foil-ink); }
.article .banner { margin: 0 0 24px; }
.keypoints { padding: 18px 20px; border: 1px solid var(--security-line); border-left: 4px solid var(--cover); border-radius: var(--r-lg); background: var(--security); }
.keypoints h2 { font-size: 19px; margin: 0 0 8px; }
.keypoints ul { margin: 0; padding-left: 20px; line-height: 1.7; }
.keypoints li + li { margin-top: 6px; }
.article-body { max-width: 70ch; margin-top: 28px; }
.article-body h2 { margin-top: 40px; scroll-margin-top: 16px; }
.article-body p, .article-body .list { line-height: 1.75; }
.article-body .list { margin: 0 0 18px; }
.article > section { margin-top: 44px; scroll-margin-top: 16px; }
.guide-card { display: grid; gap: 4px; margin: 24px 0; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--foil); border-radius: var(--r-lg); background: var(--paper); color: var(--ink-2); text-decoration: none; box-shadow: var(--lift); }
.guide-card:hover { border-color: var(--line-strong); color: var(--ink-2); }
.guide-card strong { font-family: var(--font-serif); font-size: 19px; color: var(--cover); }
.guide-card__label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--foil-ink); }
.guide-card__meta { font-size: 13px; color: var(--muted); }
.insight-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.insight { padding: 22px 0; border-bottom: 1px solid var(--line); }
.insight:first-child { padding-top: 0; }
.insight h2 { font-size: clamp(21px, 2.6vw, 25px); margin: 0 0 8px; }
.insight h2 a { color: var(--ink); text-decoration: none; }
.insight h2 a:hover { color: var(--cover); text-decoration: underline; }
.insight p:last-child { margin: 0; color: var(--ink-2); max-width: 70ch; }
.insight-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 14.5px; }
.insight-mini a { display: block; font-weight: 600; line-height: 1.4; }
.insight-mini time { font-size: 12.5px; color: var(--muted); }

/* ── Eligibility checker ─────────────────────────────────── */
.finder-page { padding-bottom: 56px; max-width: 880px; }
.finder-page > section { margin-top: 48px; }
.finder { display: grid; gap: 22px; margin-top: 8px; }
.finder__q { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 18px; margin: 0; background: var(--paper); }
.finder__q legend { font-family: var(--font-serif); font-weight: 700; font-size: 19px; color: var(--ink); padding: 0 6px; display: flex; align-items: center; gap: 10px; }
.finder__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cover); color: #fff; font-family: var(--font-sans); font-size: 14px; }
.choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--paper); }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--cover); background: var(--mist); box-shadow: inset 0 0 0 1px var(--cover); }
.choice input { margin-top: 3px; accent-color: var(--cover); }
.choice strong { display: block; font-weight: 600; color: var(--ink); }
.choice__hint { display: block; font-size: 13px; color: var(--muted); }
.finder-results:focus { outline: none; }
.matches { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px; }
.match { padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--stamp-ok); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--lift); }
.match--near { border-left-color: var(--foil); box-shadow: none; }
.match h3 { margin: 0 0 8px; font-size: 21px; }
.match h3 a { color: var(--cover); text-decoration: none; }
.match__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; margin: 0; }
.match__facts dt { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.match__facts dd { margin: 2px 0 0; font-weight: 600; color: var(--ink); }
.match__detail { margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); }
.match__why { margin: 10px 0 0; padding-left: 18px; color: var(--stamp-warn); font-weight: 600; font-size: 14.5px; }
.match__risk { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--alert-bg); color: var(--alert-ink); font-size: 13.5px; }
.match__more { display: inline-block; margin-top: 10px; font-weight: 600; }
.finder-alerts { margin-top: 28px; }
.finder[hidden], .finder-results[hidden] { display: none; }
@media (max-width: 899px) {
  table.stack td.stack__text { display: block; text-align: left; }
  table.stack td.stack__text::before { display: block; margin-bottom: 2px; }
}
.finder__select, .nat-form select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); font: inherit; color: var(--ink); margin-top: 8px; }
.nat-form { grid-template-columns: 1fr; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--paper); gap: 10px; }
.nat-group { margin: 28px 0 0; font-size: 19px; }
.nat-group--excluded { color: var(--stamp-stop); }
.nat-group--restricted { color: var(--stamp-warn); }
.match--no { border-left-color: var(--stamp-stop); }
.match__meta { margin: 0; font-size: 14px; color: var(--muted); }
.match__nat { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--mist); color: var(--ink-2); font-size: 13.5px; }
