:root {
  --navy: #0b1f3a;
  --ink: #1c2433;
  --muted: #5b6573;
  --line: #dce3ec;
  --bg: #f4f6f8;
  --white: #fff;
  --accent: #0d3b66;
  --gold: #c4a35a;
  --gutter: 16px;
}
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-left: var(--gutter);
  padding-right: var(--gutter);
}
.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-top: 14px; padding-bottom: 14px; }
.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 var(--gutter);
  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 {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8e9a1;
  color: #3b3208;
  padding: 8px 8px 8px var(--gutter);
  font-family: system-ui, sans-serif;
  font-size: .92rem;
}
html.demo-banner-off .demo-banner { display: none; }
.demo-banner-text { flex: 1; margin: 0; text-align: center; min-width: 0; }
.demo-banner-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3b3208;
  font: 700 1.35rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.demo-banner-close:hover { background: rgba(59, 50, 8, .1); }
.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-top: 36px; padding-bottom: 36px; }
.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(2, 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; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; margin: 20px 0 0; font-family: system-ui, sans-serif; }
.support-quote {
  max-width: 46rem;
  font-size: 1.02rem;
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 16px;
  color: var(--ink);
}
.support-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 22px;
}
.support-note {
  margin: 0;
  padding: 14px 16px;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: system-ui, sans-serif;
  font-size: .95rem;
}
.support-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 20px;
  scroll-margin-top: 88px;
  box-shadow: 0 8px 24px rgba(11, 31, 58, .04);
}
.support-panel > h2 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 1.28rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.support-panel > p { margin: 0 0 12px; }
.support-panel > p:last-child { margin-bottom: 0; }
.support-panel-sos {
  border-top: 3px solid #8a1f1f;
  background: #fdf8f8;
}
.support-panel .checklist { margin-top: 14px; }
.support-form {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  min-width: 0;
}
.support-form .field,
.support-form .field-pair,
.support-form .job-grid {
  min-width: 0;
}
.support-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.support-form label,
.support-form .check {
  font-family: system-ui, sans-serif;
  font-size: .9rem;
}
.support-form input[type="text"],
.support-form input[type="email"],
.support-form input[type="tel"],
.support-form select,
.support-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}
.support-form select { min-height: 44px; }
.support-form textarea { resize: vertical; min-height: 5.5rem; }
.field-pair,
.job-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 14px;
}
.field-pair .field-span,
.job-grid .field-span,
.support-form > .field-span { grid-column: 1 / -1; }
.job-fields {
  margin: 0;
  padding: 14px 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #f8fafc;
  min-width: 0;
}
.job-fields legend {
  font-family: system-ui, sans-serif;
  font-weight: 600;
  font-size: .92rem;
  padding: 0 6px;
  color: var(--navy);
}
.support-form .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  cursor: pointer;
}
.support-form .check input { margin-top: 3px; flex: none; }
.support-form .form-note { margin: 0; }
.support-form button {
  justify-self: start;
  background: var(--navy);
  color: #fff;
  border: 0;
  padding: 12px 22px;
  border-radius: 6px;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
}
.support-form button:hover { filter: brightness(1.08); }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.sos-box { border-top: 3px solid #8a1f1f; }
.sos-footer { max-width: 42rem; margin: 4px auto 0; font-size: .85rem; opacity: .9; }
.sos-footer a { color: #fff; }
.page { padding-top: 32px; padding-bottom: 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); }
.home-facts { margin: 22px 0 0; padding-left: 1.1rem; max-width: 46rem; color: var(--muted); }
.field-error { color: #8a1f1f; font-size: .88rem; margin: 4px 0 0; }
.form-hint { margin: 6px 0 8px; color: var(--muted); font-size: .9rem; }
.support-warn {
  background: #fdecec;
  border: 1px solid #e2b6b6;
  border-left: 4px solid #8a1f1f;
  padding: 12px 14px;
  border-radius: 8px;
}
.badge-demo { background: #f8e9a1; font-weight: 700; display: inline-block; padding: 8px 12px; }
.badge-source { background: #e8f0e4; }
.profile-moderation { display: grid; gap: 28px; }
.profile-moderation fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  min-width: 0;
}
.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 (min-width: 881px) {
  :root { --gutter: 20px; }
}
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .search-box input, .search-box select { min-width: 0; }
  .country-grid { grid-template-columns: 1fr; }
  .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; }
  .support-panel { padding: 16px 14px 14px; }
  .job-fields { padding: 12px; }
}
.admin-table-wrap { overflow: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { border-bottom: 1px solid rgba(11,31,58,.12); padding: 8px 10px; text-align: left; vertical-align: top; }
.admin-action { display: grid; gap: 6px; min-width: 180px; }
.admin-action input[type=text], .admin-action select { width: 100%; }
.two-factor-qr { max-width: 220px; margin: 16px 0; background: #fff; padding: 8px; }
.recovery-codes { font-family: ui-monospace, monospace; }
@media (max-width: 359px) {
  .field-pair { grid-template-columns: 1fr; }
}
