:root {
  --navy: #0b1f3a;
  --ink: #1c2433;
  --muted: #5b6573;
  --line: #dce3ec;
  --bg: #f4f6f8;
  --white: #fff;
  --accent: #0d3b66;
  --gold: #c4a35a;
}
html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Georgia, "Times New Roman", serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
body.is-loading, body.nav-open { overflow: hidden; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 120; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; }
.logo { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; z-index: 2; display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; display: block; background: transparent; }
.logo-text span { font-weight: 400; opacity: .85; }
.nav { display: flex; flex-wrap: wrap; align-items: center; }
.nav a, .nav-logout button {
  color: rgba(255,255,255,.78);
  text-decoration: none;
  margin-left: 16px;
  font-family: system-ui, sans-serif;
  font-size: .95rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.nav a:hover, .nav-logout button:hover { color: #fff; }
.nav a.is-active {
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 #fff;
  padding-bottom: 2px;
}
.nav-drawer-head { display: none; }
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  z-index: 2;
}
.nav-toggle-box { display: flex; flex-direction: column; gap: 4px; width: 18px; }
.nav-toggle-box span { display: block; height: 2px; background: #fff; border-radius: 2px; }
.nav-toggle-label { font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.nav-scrim { display: none; }
.geo-hint {
  margin: 0;
  padding: 7px 20px;
  text-align: center;
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  line-height: 1.45;
  color: #243044;
  background: #e7eef6;
  border-bottom: 1px solid var(--line);
}
.geo-hint[hidden] { display: none !important; }
.geo-hint a { font-weight: 600; margin-left: .35em; }
.demo-banner { background: #f8e9a1; color: #3b3208; text-align: center; padding: 8px 12px; font-family: system-ui, sans-serif; font-size: .92rem; }
.hero { background: var(--white); border-bottom: 1px solid var(--line); padding: 48px 0 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--muted); font-family: system-ui, sans-serif; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--navy); margin: .2em 0 .4em; }
.lead { font-size: 1.15rem; max-width: 42rem; }
.muted { color: var(--muted); font-family: system-ui, sans-serif; font-size: .95rem; }
.section { padding: 36px 0; }
.country-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.country-grid a { display: block; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 16px; text-decoration: none; color: inherit; }
.country-grid a:hover { border-color: var(--accent); }
.country-grid span { display: block; color: var(--muted); font-size: .9rem; margin-top: 4px; }
.cat-list article { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 12px; }
.cat-list h3 { margin: 0 0 8px; color: var(--navy); }
.search-box { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 24px; }
.search-box input, .search-box select { flex: 1; min-width: 160px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.search-box button { background: var(--navy); color: #fff; border: 0; padding: 12px 22px; border-radius: 6px; cursor: pointer; font-family: system-ui, sans-serif; }
.country-group { margin: 28px 0 8px; }
.country-group > h2, .country-group > h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.15rem; }
.intent-grid { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.intent-card {
  display: block;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--navy);
  border-radius: 8px;
  padding: 16px 16px 18px;
  text-decoration: none;
  color: inherit;
}
.intent-card:hover { border-color: var(--accent); border-top-color: var(--gold); }
.intent-card strong { display: block; color: var(--navy); font-family: system-ui, sans-serif; margin-bottom: 6px; }
.intent-card span { display: block; color: var(--muted); font-size: .92rem; font-family: system-ui, sans-serif; }
.journey-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.journey-nav a {
  font-family: system-ui, sans-serif;
  font-size: .9rem;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  border-radius: 999px;
  padding: 6px 12px;
}
.journey-nav a:hover { border-color: var(--accent); }
.page-block { margin: 36px 0; scroll-margin-top: 88px; }
.page-block h2 { color: var(--navy); }
.page-block h3 { font-size: 1.05rem; color: var(--navy); margin: 1.2em 0 .4em; }
.consulate-card, .rights-note {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}
.consulate-actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.btn-navy {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-family: system-ui, sans-serif;
  padding: 10px 16px;
  border-radius: 6px;
}
.btn-navy:hover { filter: brightness(1.08); color: #fff; }
.mission-list { list-style: none; padding: 0; margin: 16px 0 0; }
.mission-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.mission-kind {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.mission-list a + span { display: block; color: var(--muted); font-size: .92rem; }
.sos-note, .help-line, .rights-note { font-family: system-ui, sans-serif; font-size: .95rem; }
.help-line { margin: 20px 0 8px; }
.rights-note { margin-top: 20px; }
.checklist { list-style: none; padding: 0; counter-reset: pasi; }
.checklist > li {
  counter-increment: pasi;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px 8px 56px;
  margin: 0 0 12px;
  position: relative;
}
.checklist > li::before {
  content: counter(pasi);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: .85rem;
  display: grid;
  place-items: center;
}
.checklist > li > h3 { margin-top: 0; }
.checklist > li > p { margin: 0 0 8px; color: var(--muted); font-family: system-ui, sans-serif; font-size: .95rem; }
.sos-footer { max-width: 42rem; margin: 4px auto 0; font-size: .85rem; opacity: .9; }
.sos-footer a { color: #fff; }
.page { padding: 32px 0 56px; }
.crumbs { font-family: system-ui, sans-serif; font-size: .9rem; color: var(--muted); }
.chip-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list a, .chip-static { display: inline-block; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; color: inherit; font-family: system-ui, sans-serif; font-size: .92rem; }
.chip-list a:hover { border-color: var(--accent); }
.source-group { font-family: system-ui, sans-serif; font-size: 1.05rem; color: var(--navy); margin: 1.4em 0 .4em; }
.sources { line-height: 1.7; margin: 0 0 1rem; }
.listing-list { list-style: none; padding: 0; }
.listing-list li { border-bottom: 1px solid var(--line); }
.listing-list a { display: block; padding: 12px 0; text-decoration: none; color: inherit; }
.listing-list span { display: block; color: var(--muted); }
.badge { display: inline-block; background: #f8e9a1; padding: 4px 10px; border-radius: 4px; font-family: system-ui, sans-serif; font-size: .85rem; }
.facts { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; }
.prose { max-width: 42rem; }
.site-footer { background: var(--navy); color: rgba(255,255,255,.82); padding: 28px 0; font-size: .92rem; font-family: system-ui, sans-serif; text-align: center; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.copyright { margin: 12px 0 0; opacity: .78; font-size: .85rem; }
.nav-logout { display: inline; margin-left: 16px; }
.flash { background: #e8f0e4; padding: 10px 14px; border-radius: 6px; margin: 16px auto 0; }
.profile-head { margin: 16px 0 28px; }
.profile-block { margin: 28px 0; }
.profile-block h2 { color: var(--navy); font-size: 1.25rem; }
.profile-facts { margin: 24px 0; }
.auth-page { max-width: 32rem; }
.auth-form { display: flex; flex-direction: column; gap: 8px; margin: 20px 0; }
.auth-form label { font-family: system-ui, sans-serif; font-size: .9rem; }
.auth-form input[type="text"], .auth-form input[type="email"], .auth-form input[type="password"] { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.auth-form button, .auth-form-button { background: var(--navy); color: #fff; border: 0; padding: 12px 22px; border-radius: 6px; cursor: pointer; font-family: system-ui, sans-serif; margin-top: 8px; }
.auth-form .check { display: flex; align-items: center; gap: 8px; }
.account-type { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0 4px; background: var(--white); }
.account-type legend { font-family: system-ui, sans-serif; font-weight: 600; padding: 0 6px; }
.account-type .choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 4px; cursor: pointer; }
.account-type .choice + .choice { border-top: 1px solid var(--line); }
.account-type small { display: block; color: var(--muted); margin-top: 2px; }
.form-errors { color: #8a1f1f; padding-left: 1.1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--navy);
  color: #fff;
  transition: opacity .35s ease, visibility .35s ease;
}
.page-loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.page-loader-mark { width: 48px; height: 48px; border-radius: 12px; }
.page-loader-spin {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.page-loader-text { font-family: system-ui, sans-serif; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 31, 58, .28);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); }
.search-box button:hover, .auth-form button:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .page-loader, .to-top, .nav, .nav-scrim { transition: none; }
  .page-loader-spin { animation: none; border-top-color: #fff; }
}
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 28, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 30;
  }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: min(22rem, 86vw);
    background: #0e2747;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 88px 22px 32px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform .22s ease;
    z-index: 35;
    box-shadow: -16px 0 40px rgba(0,0,0,.25);
  }
  body.nav-open .nav { transform: translateX(0); }
  .nav-drawer-head {
    display: block;
    margin: 0 0 18px;
    font-family: system-ui, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .72rem;
    color: rgba(255,255,255,.55);
  }
  .nav a, .nav-logout, .nav-logout button {
    margin: 0;
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 10px;
    border-radius: 10px;
    font-size: 1.05rem;
    box-shadow: none;
  }
  .nav a.is-active { background: rgba(255,255,255,.1); color: #fff; }
  .nav-logout { margin-top: 12px; }
  .facts { grid-template-columns: 1fr; }
  .intent-grid { grid-template-columns: 1fr; }
  .checklist > li { padding-left: 18px; padding-top: 48px; }
  .checklist > li::before { top: 14px; }
}
