/* All-Visas — Oxblood Registry (gov-tech utility, V3-B) */
:root{
  --bg:#fbf7f0; --panel:#f1e7d8; --ink:#2a1410; --muted:#6e5346;
  --gov:#7c1d1d; --gov-d:#511010; --line:#d8c6ad; --warn:#9a5b12;
  --focus:#e8b53a; --ok:#7c1d1d; --blocked:#9a5b12;
}
*{box-sizing:border-box}
html{-webkit-font-smoothing:antialiased}
body{margin:0;background:var(--bg);color:var(--ink);
  font:16px/1.6 "IBM Plex Sans",system-ui,sans-serif}
.mono,code{font-family:"IBM Plex Mono",ui-monospace,monospace}
a{color:var(--gov)}
main{width:100%;margin:0;padding:2.5rem 2.5rem 3rem}

/* skip link + service strip */
.skip-link{position:absolute;left:-999px}
.skip-link:focus{left:8px;top:8px;background:var(--focus);color:var(--ink);
  padding:.5rem .75rem;z-index:50;font-weight:600}
.service-strip{background:var(--gov-d);color:#fff;
  font-family:"IBM Plex Mono",monospace;font-size:12px;
  display:flex;justify-content:space-between;gap:1rem;
  padding:.4rem 2.5rem}
.service-strip,.service-strip span{max-width:100%}
@media(max-width:640px){.service-strip-aside{display:none}}

/* header */
/* one row, never wrapping: brand may shrink/ellipsize, nav stays put */
.site-header{display:flex;flex-wrap:nowrap;gap:1rem;align-items:center;
  justify-content:space-between;padding:1rem 2.5rem;
  border-bottom:2px solid var(--ink);background:var(--bg)}
.site-header .brand{display:flex;align-items:center;gap:.6rem;min-width:0;
  font-weight:700;font-size:1.25rem;color:var(--ink);text-decoration:none;
  overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.brand-mark{display:block;width:2.1rem;height:2.1rem;flex:0 0 auto}
.site-header nav{display:flex;flex:0 0 auto;gap:.25rem;
  font-weight:500;font-size:.95rem;white-space:nowrap}
.site-header nav a{padding:.5rem .75rem;text-decoration:none;color:var(--ink)}
.site-header nav a:hover{background:var(--panel)}
.site-header nav a.is-current{background:var(--gov);color:#fff}
/* breadcrumb crumbs injected from page templates */
.nav-crumb{font-size:.82rem;font-weight:500;color:var(--muted);
  white-space:nowrap;padding:.5rem 0 .5rem .35rem}
.nav-crumb::before{content:"›";margin-right:.35rem;color:var(--line)}
.nav-crumb--active{font-weight:700;color:var(--ink)}
@media(max-width:700px){.nav-crumb{display:none}}
/* tighten the row on small screens so it still fits on one line */
@media(max-width:560px){
  .site-header{padding:.75rem 1rem;gap:.5rem}
  .site-header .brand{font-size:1.05rem}
  .site-header nav{gap:.15rem;font-size:.85rem}
  .site-header nav a{padding:.4rem .5rem}
}

/* headings */
h1{font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.15;font-weight:700;
  letter-spacing:-.01em;margin:.2rem 0 .75rem;max-width:20ch}
h2{font-size:1.15rem;font-weight:700}

/* full-width hero band (finder page) */
.hero-band{background:var(--panel);border-bottom:1px solid var(--line)}
.hero-inner{width:100%;margin:0;padding:2rem 2.5rem;
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:3rem;align-items:center}
.hero-copy{min-width:0}
/* The hero-art slot reserves its box via aspect-ratio so there is no
   layout shift while the decorative WebGL globe initialises. No static
   fallback image: the globe is purely decorative (aria-hidden); without
   JS/WebGL the slot is simply empty and no content is lost. */
.hero-art{min-width:0;align-self:center;position:relative;
  aspect-ratio:1312/736;
  /* box reserves the hero height; the globe is scaled up beyond it and
     clipped, so the band height stays fixed while the globe grows */
  width:100%;max-width:100%;margin-inline:auto;overflow:hidden}
.hero-globe{position:absolute;inset:0;width:100%;height:100%;
  opacity:0;transition:opacity .6s ease;pointer-events:none;cursor:grab;
  /* globe 50% larger; top & bottom intentionally clipped by .hero-art */
  transform:scale(1.5);transform-origin:center}
.hero-art.globe-ready .hero-globe{opacity:1;pointer-events:auto}
.hero-art.globe-ready .hero-globe:active{cursor:grabbing}
@media(max-width:1024px){
  /* single-column copy; the globe stays visible but moves into the
     right half of the band, sitting *behind* the text as decoration.
     Anchor it to .hero-band (not the grid) so its containing block has
     a real height — an abspos child of a grid container otherwise
     resolves to a zero-height grid area. */
  .hero-band{position:relative;overflow:hidden}
  .hero-inner{grid-template-columns:1fr}
  .hero-copy{position:relative;z-index:1}
  .hero-art{display:block;position:absolute;top:0;bottom:0;
    right:0;left:20%;width:80%;max-width:80%;margin-inline:0;
    /* align-self:center (from the base rule, still a grid item) makes an
       abspos box shrink-wrap to content height and ignore `bottom`;
       reset it and pin the height to the band so the globe gets a box */
    align-self:stretch;height:auto;aspect-ratio:auto;
    z-index:0;pointer-events:none}
  .hero-art .hero-globe{pointer-events:none !important}
}
@media(max-width:560px){
  /* on narrow phones the globe spans the right 80%, dimmed behind text */
  .hero-art{left:20%;width:80%;max-width:80%;opacity:.55}
}
.hero-band .eyebrow{margin-bottom:.6rem}
.hero-band h1{margin-top:0}
.hero-lead{color:var(--muted);max-width:62ch;line-height:1.65;
  font-size:1.05rem;margin:1rem 0 0}
.hero-stats{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem 2rem;
  margin:1.6rem 0 0;padding:0;font-family:"IBM Plex Mono",monospace;
  font-size:13px;color:var(--muted)}
.hero-stats strong{color:var(--gov);font-weight:600}

/* ── Wizard layout ── */
main.wizard{max-width:720px;margin:0 auto;padding:2.5rem 2rem 4rem}
@media(max-width:560px){main.wizard{padding:1.5rem 1rem 3rem}}

/* Step 1 (intent picker) needs the full row to fit five cards side-by-side
   on desktop. We override the wizard cap only when step 1 is rendered,
   leaving step 2's focused single-question layout at 720px. The :has()
   selector keeps the CSS self-contained — no extra body class needed. */
main.wizard:has(.wizard-steps--intent){max-width:1280px}

.wizard-steps{display:flex;flex-direction:column;gap:0}
.wizard-head{display:flex;align-items:center;gap:1rem;margin-bottom:1.6rem}
.wizard-progress{display:flex;align-items:center;gap:.4rem}
.wz-dot{display:inline-flex;align-items:center;justify-content:center;
  width:1.7rem;height:1.7rem;border-radius:50%;
  font-family:"IBM Plex Mono",monospace;font-size:.78rem;font-weight:600;
  background:var(--panel);color:var(--muted);border:2px solid var(--line)}
.wz-dot.is-active{background:var(--gov);color:#fff;border-color:var(--gov)}
.wz-line{flex:0 0 1.8rem;height:2px;background:var(--line)}
.wz-step-label{font-family:"IBM Plex Mono",monospace;font-size:.78rem;
  font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;
  margin:0}
.wz-back{font-size:.88rem;font-weight:600;color:var(--gov);text-decoration:none;
  margin-bottom:1.2rem;display:inline-block}
.wz-back:hover{text-decoration:underline}
.wz-title{font-size:1.5rem;font-weight:700;margin:0 0 .4rem}
.wz-lead{color:var(--muted);margin:0 0 2rem;font-size:1rem;max-width:54ch}
.wz-section-label{font-family:"IBM Plex Mono",monospace;font-size:.72rem;
  font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:var(--gov);
  margin:1.6rem 0 .8rem;padding-bottom:.3rem;border-bottom:1px solid var(--line)}
.wz-form label{display:block;margin:0 0 1.1rem;font-size:.88rem;font-weight:600}
.wz-form input[type=text],.wz-form input[type=number],.wz-form select{
  display:block;width:100%;padding:.55rem .7rem;margin-top:.35rem;
  border:2px solid var(--ink);border-radius:0;
  background:#fff;font:400 15px "IBM Plex Sans",sans-serif;color:var(--ink)}
.wz-form input:focus,.wz-form select:focus{outline:3px solid var(--focus);
  outline-offset:0;border-color:var(--ink)}
.wz-form label.checkbox{display:flex;align-items:center;gap:.6rem;
  font-weight:500;font-size:.92rem}
.wz-form label.checkbox input{width:1.15rem;height:1.15rem;
  accent-color:var(--gov);margin:0}
.wz-actions{display:flex;align-items:center;gap:1.2rem;
  margin-top:2rem;padding-top:1.4rem;border-top:2px solid var(--ink)}

/* Intent cards — step 1. Five cards in one row on wide desktops, then
   collapses to 3, then 2, then 1 as the viewport narrows. The card
   itself keeps the same look as before. */
.intent-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:1rem}
@media(max-width:1180px){.intent-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:820px){.intent-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.intent-grid{grid-template-columns:1fr}}
.intent-card{display:flex;flex-direction:column;gap:.3rem;
  padding:1.2rem 1.4rem;background:var(--panel);border:2px solid var(--line);
  text-decoration:none;color:var(--ink);
  transition:border-color .15s,background .15s}
.intent-card:hover,.intent-card:focus-visible{border-color:var(--gov);
  background:#fff;outline:none}
.intent-icon{color:var(--gov);margin-bottom:.55rem;display:block;
  transition:transform .15s}
.intent-card:hover .intent-icon{transform:translateY(-1px)}
.intent-label{font-weight:700;font-size:1rem}
.intent-sub{font-size:.85rem;color:var(--muted);line-height:1.4}

/* Step 1 directory note */
.wz-directory-note{font-family:"IBM Plex Mono",monospace;font-size:.78rem;
  font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;
  margin:0 0 1rem}

/* Step 2 live-count panel */
.wizard-match{display:flex;flex-wrap:wrap;align-items:baseline;gap:.25rem .5rem;
  padding:.85rem 1.1rem;background:var(--panel);border-left:4px solid var(--gov);
  margin-bottom:1.6rem}
.match-count{font-family:"IBM Plex Mono",monospace;font-size:2rem;
  font-weight:700;color:var(--gov);line-height:1}
.match-label{font-size:1rem;font-weight:600;color:var(--ink)}
.match-sep{font-size:1rem;color:var(--muted)}
.match-countries{display:flex;flex-wrap:wrap;gap:.25rem .5rem}
.match-country{font-family:"IBM Plex Mono",monospace;font-size:.78rem;
  font-weight:600;padding:.2rem .45rem;background:#fff;border:1px solid var(--line);
  color:var(--muted)}

/* Step 2 single big-input form */
.wz-single{max-width:460px}
.wz-big-label{display:block;font-size:.88rem;font-weight:700;margin:0 0 1.5rem}
.wz-big-input{display:block;width:100%;padding:.8rem 1rem;margin-top:.5rem;
  border:3px solid var(--ink);border-radius:0;
  font:700 1.6rem "IBM Plex Mono",monospace;color:var(--ink);background:#fff}
.wz-big-input:focus{outline:3px solid var(--focus);outline-offset:0;border-color:var(--ink)}

/* ── Results page layout (full-width, no sidebar grid) ── */
main.results-page{padding:0}

.profile-bar{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.5rem;
  padding:.85rem 2.5rem;background:var(--panel);
  border-bottom:2px solid var(--ink)}
.profile-summary{font-family:"IBM Plex Mono",monospace;font-size:.82rem;
  font-weight:600;color:var(--ink);letter-spacing:.02em;margin:0;
  flex:1 1 auto}
.profile-bar-actions{display:flex;align-items:center;gap:.8rem;flex:0 0 auto}
.btn-sm{display:inline-block;background:var(--gov);color:#fff;
  padding:.4rem .9rem;border:0;border-bottom:2px solid var(--gov-d);
  font:600 .82rem "IBM Plex Sans",sans-serif;cursor:pointer;text-decoration:none}
.btn-sm:hover{background:var(--gov-d)}

.results-page .results-section{padding:2rem 2.5rem 3rem}
@media(max-width:640px){
  .profile-bar{padding:.75rem 1rem}
  .results-page .results-section{padding:1.5rem 1rem 2rem}
}

/* unknown-hint link */
.unknown-hint a{color:var(--gov);font-weight:600;margin-left:.4em}

/* two-column finder layout: kept for any legacy direct-URL access */
main.finder{display:grid;gap:3rem;
  grid-template-columns:360px 1fr;align-items:start}
@media(max-width:900px){main.finder{grid-template-columns:1fr;gap:2rem}}

/* buttons */
.btn{display:inline-block;background:var(--gov);color:#fff;
  padding:.7rem 1.35rem;border:0;border-bottom:3px solid var(--gov-d);
  font:600 1rem "IBM Plex Sans",sans-serif;cursor:pointer;text-decoration:none}
.btn:hover{background:var(--gov-d)}
.reset{margin-left:1rem;font-size:.92rem;font-weight:600;color:var(--gov);
  text-decoration:underline;text-underline-offset:2px}

/* eyebrow */
.eyebrow{font-family:"IBM Plex Mono",monospace;font-size:12px;font-weight:600;
  color:var(--gov);text-transform:uppercase;letter-spacing:.06em;
  margin:0 0 .5rem;max-width:none}

/* finder form: single vertical column, left rail */
.finder-form{margin:0;background:var(--panel);border:1px solid var(--line);
  padding:1.6rem 1.6rem 1.8rem;position:sticky;top:1.5rem;
  /* When the form is taller than the viewport a plain sticky sidebar
     pins its top and leaves the lower sections unreachable. Cap it to
     the visible height and let it scroll internally; short forms never
     hit the cap so they behave exactly as before. */
  max-height:calc(100vh - 3rem);overflow-y:auto}
@media(max-width:900px){.finder-form{position:static;
  max-height:none;overflow-y:visible}}
.form-title{margin:0 0 1.4rem;padding-bottom:.6rem;font-size:1.05rem;
  font-weight:700;border-bottom:2px solid var(--ink)}
.form-actions{display:flex;align-items:center;gap:1rem;
  border-top:2px solid var(--ink);padding-top:1.3rem}
.form-actions .reset{margin-left:0}
/* collapsible filter sections — native <details>, no JS required */
.fsec{border:0;margin:0 0 .9rem;padding:0;border-bottom:1px solid var(--line)}
.fsec:last-of-type{border-bottom:0;margin-bottom:1.2rem}
.fsec>summary{list-style:none;cursor:pointer;display:flex;align-items:center;
  justify-content:space-between;gap:.5rem;padding:.55rem 0;
  font-family:"IBM Plex Mono",monospace;font-size:12px;font-weight:600;
  color:var(--gov);text-transform:uppercase;letter-spacing:.04em;
  user-select:none}
.fsec>summary::-webkit-details-marker{display:none}
.fsec>summary::after{content:"";width:.62rem;height:.62rem;flex:none;
  border-right:2px solid var(--gov);border-bottom:2px solid var(--gov);
  transform:rotate(45deg);transition:transform .18s ease;margin-right:.15rem}
.fsec[open]>summary::after{transform:rotate(225deg)}
.fsec>summary:hover{color:var(--ink)}
.fsec>summary:hover::after{border-color:var(--ink)}
.fsec>summary:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.fsec-body{padding:.4rem 0 1rem}
.profile-form label{display:block;margin:0 0 1.1rem;font-size:.85rem;
  font-weight:600}
.profile-form input[type=text],.profile-form input[type=number],
.profile-form select{display:block;width:100%;padding:.55rem .7rem;
  margin-top:.35rem;border:2px solid var(--ink);border-radius:0;
  background:#fff;font:400 15px "IBM Plex Sans",sans-serif;color:var(--ink)}
.profile-form input:focus,.profile-form select:focus{outline:3px solid var(--focus);
  outline-offset:0;border-color:var(--ink)}
.profile-form label.checkbox{display:flex;align-items:center;gap:.6rem;
  font-weight:500;font-size:.92rem}
.profile-form label.checkbox input{width:1.15rem;height:1.15rem;
  accent-color:var(--gov);margin:0}
.profile-form .btn{margin-top:.5rem}

/* sub-legend + checkbox groups (languages / countries / categories) */
.profile-form .sublegend{display:block;font-family:"IBM Plex Mono",monospace;
  font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;
  letter-spacing:.04em;margin:.4rem 0 .6rem}
.checkgroup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.45rem .8rem;margin:0 0 1.1rem}
.checkgroup label.checkbox{margin:0;font-size:.88rem}
@media(max-width:1100px){.checkgroup{grid-template-columns:1fr}}

/* progressive-enhancement combobox (degree). Native select still works
   with JS off; .combo-hidden removes the duplicate only when enhanced. */
.combo{position:relative}
.combo-hidden{position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap}
.combo-input{display:block;width:100%;padding:.55rem .7rem;margin-top:.25rem;
  border:2px solid var(--ink);border-radius:0;background:#fff;
  font:400 15px "IBM Plex Sans",sans-serif;color:var(--ink)}
.combo-input:focus{outline:3px solid var(--focus);outline-offset:0}
.combo-list{list-style:none;margin:.2rem 0 0;padding:.25rem;position:absolute;
  z-index:5;left:0;right:0;background:#fff;border:2px solid var(--ink);
  max-height:220px;overflow:auto}
.combo-list li{padding:.45rem .55rem;font-size:.9rem;cursor:pointer}
.combo-list li:hover{background:var(--gov);color:#fff}

/* results */
.results-section{margin-top:0;min-width:0}
.results-section>h2{margin:0 0 .25rem;padding-bottom:.6rem;
  border-bottom:2px solid var(--ink)}
.results-section>p{background:var(--panel);border-left:4px solid var(--gov);
  padding:.7rem 1rem;color:var(--ink);max-width:none;margin:1rem 0 1.25rem}

.card{background:var(--bg);border:1px solid var(--line);
  border-radius:0;padding:1.2rem 1.4rem;margin:1rem 0}
.result{display:grid;grid-template-columns:120px 1fr auto;gap:0;
  padding:0;overflow:hidden;animation:fade-in .5s ease both}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
.result-score{background:var(--panel);display:grid;place-content:center}
.result-body{padding:1.2rem 1.4rem;align-self:center}
/* chevron-right button at the right end of the row -> detail page */
.result-go{display:flex;align-items:center;justify-content:center;
  width:64px;align-self:stretch;color:var(--gov);text-decoration:none;
  border-left:1px solid var(--line);transition:background .15s,color .15s}
.result-go:hover,.result-go:focus-visible{background:var(--gov);color:#fff;
  outline:none}
.result.blocked .result-go{color:var(--muted)}
/* oxblood (#7c1d1d) hover for every row, blocked included */
.result.blocked .result-go:hover,
.result.blocked .result-go:focus-visible{background:var(--gov);color:#fff}
.result header{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem}
.result h3{margin:0;font-size:1.25rem;font-weight:700}
.result h3 a{color:var(--ink);text-decoration:none}
.result h3 a:hover{text-decoration:underline}
.result .country{display:inline-flex;align-items:center;gap:.4rem;
  font-family:"IBM Plex Mono",monospace;
  font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;
  color:var(--muted);background:var(--panel);padding:.2rem .45rem}
/* flag artwork (flag-icons, MIT). 1px line keeps white flags (ID/SG)
   from bleeding into the panel background. */
.flag{display:block;width:20px;height:15px;object-fit:cover;
  border:1px solid var(--line);flex:0 0 auto}
.flag-lg{width:72px;height:54px}
/* visa detail header: bigger flag beside the title block */
.visa-head{display:flex;align-items:flex-start;gap:1rem;margin:0 0 .5rem}
.visa-head h1{margin:0}
.visa-head .tag{margin:.5rem 0 0}
.result .summary{color:var(--muted);font-size:.95rem;margin:.6rem 0 0}
.result.blocked{opacity:.78}
.result.blocked .result-score{background:var(--panel)}

/* donut score ring — pure CSS, value via inline --p (SSR, no JS).
   Single accent colour fading from solid into transparency across the
   filled arc, a hard stop at --p%, then the neutral track. */
.ring{--p:0; --rc:var(--gov);
  width:80px;height:80px;border-radius:999px;display:grid;place-content:center;
  background:conic-gradient(
      var(--rc) 0,
      rgba(124,29,29,0) calc(var(--p)*1%),
      var(--line) 0);
  box-shadow:none}
.ring>span{width:62px;height:62px;border-radius:999px;
  background:var(--bg);
  display:grid;place-content:center;text-align:center;line-height:1}
.ring .ring-num{font-family:"IBM Plex Mono",monospace;font-size:22px;
  font-weight:600;color:var(--gov)}
.ring .ring-cap{font-family:"IBM Plex Mono",monospace;font-size:9px;
  margin-top:3px;color:var(--muted)}
/* blocked rows: muted accent, same fade */
.result.blocked .ring{--rc:var(--muted)}
.result.blocked .ring .ring-num{color:var(--muted)}

/* badges / tags shared with country + detail pages */
.tag,.badge{display:inline-block;font-family:"IBM Plex Mono",monospace;
  font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;
  padding:.2rem .5rem;border-radius:2px;background:var(--panel);color:var(--muted)}
.badge.ok{background:var(--gov);color:#fff}
.badge.blocked{background:#efe0c4;color:var(--warn)}
.badge.unknown{background:#ece3d2;color:var(--muted);
  border:1px dashed var(--line)}

/* eligibility-unknown row: same muted treatment as blocked but dashed
   ring, signalling "we cannot judge yet" rather than "you failed". */
.result.eligibility_unknown{opacity:.92}
.result.eligibility_unknown .ring{--rc:var(--muted)}
.result.eligibility_unknown .ring .ring-num{color:var(--muted)}
.result.eligibility_unknown .result-go{color:var(--muted)}
.ring.ring-na{background:none;border:2px dashed var(--line)}
.ring.ring-na .ring-num{color:var(--muted)}
.result-note{margin:.55rem 0 0;font-size:.86rem;color:var(--warn);
  font-family:"IBM Plex Mono",monospace;line-height:1.45}
.result.eligibility_unknown .result-note{color:var(--muted)}

/* "Add details" disclosure inside an eligibility_unknown card. SSR
   only — <details>/<summary> opens without JS; the form is a plain GET
   that re-runs scoring with the new fields merged into the URL. */
.addtl{margin:.55rem 0 0;font-size:.88rem}
.addtl>summary{cursor:pointer;display:inline-block;color:var(--gov);
  font-weight:600;list-style:none;padding:.1rem 0}
.addtl>summary::-webkit-details-marker{display:none}
.addtl>summary::before{content:"+ ";font-weight:700}
.addtl[open]>summary::before{content:"− "}
.addtl-form{margin-top:.6rem;padding:.9rem 1rem 1rem;
  border:1px solid var(--line);background:#fff;font-family:inherit;
  max-width:760px}
.addtl-grid{display:grid;gap:.75rem 1rem;
  grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:680px){.addtl-grid{grid-template-columns:1fr}}
.addtl-field{display:flex;flex-direction:column;gap:.3rem;
  font-size:.85rem;color:var(--muted);min-width:0}
.addtl-field>span{color:var(--ink);font-weight:600;font-size:.82rem}
.addtl-field input[type=number],
.addtl-field input[type=text],
.addtl-field select{padding:.5rem .6rem;border:1px solid var(--line);
  font-size:.92rem;background:#fff;font-family:inherit;width:100%;
  box-sizing:border-box}
.addtl-field--bool{flex-direction:row;align-items:center;gap:.55rem;
  grid-column:1 / -1}
.addtl-field--bool>span{font-weight:500;color:var(--ink);font-size:.9rem}
.addtl-actions{margin-top:.9rem}

/* neutral catalogue card (no profile entered yet): two columns, no
   score column, no badge — a plain browsable directory entry. */
.result.neutral{grid-template-columns:1fr auto}
.result.neutral .result-body{padding:1.2rem 1.4rem}

/* results header: heading + view toggle on one row, count below */
.results-head{display:flex;flex-wrap:wrap;align-items:flex-end;
  gap:.5rem 1rem}
.results-head>h2{flex:1 1 auto}
/* segmented List | Cards control — two SSR <a> links, no JS needed */
.view-toggle{display:inline-flex;border:1px solid var(--line);
  flex:0 0 auto;align-self:center}
.view-opt{display:flex;align-items:center;justify-content:center;
  width:38px;height:34px;color:var(--muted);text-decoration:none;
  background:var(--bg);transition:background .15s,color .15s}
.view-opt svg{display:block}
.view-opt+.view-opt{border-left:1px solid var(--line)}
.view-opt:hover,.view-opt:focus-visible{color:var(--ink);outline:none}
.view-opt.is-active{background:var(--gov);color:#fff}

/* Tier section headers (Confirmed / Potentially eligible / Not a match) */
.tier-header{grid-column:1/-1;padding:.45rem 0 .3rem;margin:1.1rem 0 .35rem;
  font-family:"IBM Plex Mono",monospace;font-size:.72rem;font-weight:600;
  letter-spacing:.08em;text-transform:uppercase;
  border-bottom:2px solid currentColor;color:var(--muted)}
.tier-header:first-child{margin-top:0}
.tier-header.tier-qualified{color:var(--gov)}
.tier-header.tier-eligibility_unknown{color:var(--muted)}
.tier-header.tier-blocked{color:var(--warn);opacity:.7}

/* LIST view (default): pass-through, cards keep their full-width rows */
.results-list{min-width:0}

/* CARD view: responsive grid of vertical-stack tiles, 3 -> 2 -> 1 */
.results-grid{display:grid;grid-template-columns:repeat(3,1fr);
  gap:1rem;min-width:0;margin:1rem 0}
.results-grid .result{margin:0;grid-template-columns:1fr;
  grid-template-rows:auto 1fr auto}
.results-grid .result.neutral{grid-template-columns:1fr}
/* score ring sits on top, centred, full bleed */
.results-grid .result-score{padding:1.2rem 0}
.results-grid .result-body{padding:1.2rem 1.4rem;align-self:start}
/* chevron becomes a full-width bottom bar */
.results-grid .result-go{width:auto;align-self:stretch;
  border-left:0;border-top:1px solid var(--line);padding:.7rem 0}
.results-grid .result-go svg{transform:rotate(90deg)}
@media(max-width:1024px){
  .results-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:560px){
  .results-grid{grid-template-columns:1fr}
}

/* active-filter bar: removable chips + reset, pure server-side links */
.filter-bar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;
  margin:0 0 1.1rem;padding:.7rem .85rem;background:var(--panel);
  border-left:4px solid var(--gov)}
.filter-bar.empty{background:none;border-left:0;padding:0 0 .4rem;
  justify-content:flex-end}
.filter-bar-label{font-family:"IBM Plex Mono",monospace;font-size:.78rem;
  font-weight:600;text-transform:uppercase;letter-spacing:.04em;
  color:var(--muted)}
.filter-tags{list-style:none;display:flex;flex-wrap:wrap;gap:.4rem;
  margin:0;padding:0}
.filter-tag{display:inline-flex;align-items:center;gap:.4rem;
  background:#fff;border:1px solid var(--line);border-radius:2px;
  padding:.22rem .25rem .22rem .55rem;font-size:.85rem;color:var(--ink)}
.filter-tag-x{display:inline-flex;align-items:center;justify-content:center;
  width:18px;height:18px;border-radius:2px;text-decoration:none;
  font-weight:700;line-height:1;color:var(--muted);background:var(--panel)}
.filter-tag-x:hover,.filter-tag-x:focus-visible{background:var(--gov);
  color:#fff;outline:none}
.reset-all{margin-left:auto;font-size:.88rem;font-weight:600;
  color:var(--gov);text-decoration:underline}
.reset-all:hover{color:var(--gov-d)}
.results-count .muted{color:var(--muted)}
.field-hint{margin:.5rem 0 0;font-size:.82rem;color:var(--muted);
  line-height:1.45}


/* breadcrumb / detail / facts (country + visa_detail) */
.breadcrumb{font-family:"IBM Plex Mono",monospace;font-size:.8rem;
  color:var(--muted);margin-bottom:.75rem}
.filters{font-size:.92rem;color:var(--muted)}
.prose{max-width:68ch;line-height:1.7}
.facts{display:grid;grid-template-columns:max-content 1fr;gap:.3rem 1.5rem;
  margin:1.5rem 0;border-top:2px solid var(--ink);padding-top:1rem}
.facts dt{font-weight:700;font-size:.9rem}
.facts dd{margin:0;color:var(--muted)}
.criteria{padding-left:1.1rem}
.criteria li{margin:.4rem 0}

/* pagination */
.pagination{display:flex;flex-wrap:wrap;align-items:center;
  justify-content:center;gap:.4rem;margin:2rem 0 0;
  border-top:2px solid var(--ink);padding-top:1.25rem;
  font-size:.9rem;font-weight:600}
.pagination a{text-decoration:none;color:var(--gov)}
.pg-step,.pg-num{display:inline-flex;align-items:center;justify-content:center;
  min-width:2.1rem;height:2.1rem;padding:0 .55rem;border:1px solid var(--line)}
.pagination a.pg-step:hover,.pagination a.pg-num:hover{background:var(--panel)}
.pg-num.is-current{background:var(--gov);color:#fff;border-color:var(--gov)}
.pagination .disabled{color:var(--line);border-color:var(--line)}
.pg-nums{display:inline-flex;flex-wrap:wrap;gap:.3rem;margin:0 .4rem}
.pg-gap{display:inline-flex;align-items:center;justify-content:center;
  min-width:1.6rem;height:2.1rem;color:var(--muted)}
.pg-summary{text-align:center;margin:.8rem 0 0;
  font-family:"IBM Plex Mono",monospace;font-size:12px;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em}

/* footer */
.site-footer{background:var(--gov-d);color:#fff;margin-top:3rem}
.site-footer-inner{max-width:72ch;margin:0 auto;padding:2.25rem 2.5rem;
  font-family:"IBM Plex Mono",monospace;font-size:13px;line-height:1.7;
  text-align:center}
.site-footer-inner p{opacity:.9;margin:0}
.footer-links{display:flex;flex-wrap:wrap;justify-content:center;
  gap:1.25rem;margin:1.1rem 0 0}
.footer-links a{color:#fff;opacity:.85;text-decoration:underline;
  text-underline-offset:2px}
.footer-links a:hover,.footer-links a:focus-visible{opacity:1}
.site-footer .footer-meta{opacity:.6;margin-top:1rem}

/* legal / static content pages */
.prose.legal h2{font-size:1.05rem;margin:1.8rem 0 .4rem}
.prose.legal p{margin:.4rem 0}
.legal-note{display:inline-block;font-family:"IBM Plex Mono",monospace;
  font-size:.8rem;color:var(--warn);background:#efe0c4;
  padding:.4rem .7rem;border-radius:2px;margin:.2rem 0 1.4rem}

@media(max-width:560px){
  .result{grid-template-columns:1fr}
  .result-score{padding:1.1rem 0}
  .result-go{width:auto;align-self:auto;border-left:0;
    border-top:1px solid var(--line);padding:.7rem 0}
  .result-go svg{transform:rotate(90deg)}
}
