/* visa.css — the visa finder (search + results + detail sheet).
   Built on the "clean premium" tokens in main.css (--wg-ease-spring,
   --wg-focus-ring, --wg-shadow-card …).

   The detail sheet is appended to document.body by js/visa.js, deliberately
   outside .wg-main, so no animated ancestor can become its containing block
   and trap it under the sticky header. */

.wg-visa { max-width: 860px; margin: 0 auto; }

.wg-visa-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wg-visa-muted { color: var(--wg-muted); font-size: .9rem; }

/* ── Hero + search ────────────────────────────────────────────────────── */

.wg-visa-hero {
  background: linear-gradient(180deg, var(--wg-tint), var(--wg-bg));
  border: 1px solid var(--wg-border-soft);
  border-radius: var(--wg-radius-card);
  padding: 22px 20px 24px;
  box-shadow: var(--wg-shadow-card);
  /* Own the gap to whatever follows. It used to come from .wg-visa-status's
     top margin, which vanishes with the element on first paint (it renders
     empty and :empty hides it), so the hero sat flush against the results. */
  margin-bottom: 18px;
}
.wg-visa-kicker {
  display: inline-block; font-size: .72rem; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--wg-color-dark); background: rgba(14, 175, 76, .10);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.wg-visa-title { font-size: 1.5rem; line-height: 1.25; margin: 0 0 10px; }
.wg-visa-lead  { color: var(--wg-muted); margin: 0 0 18px; line-height: 1.6; }

.wg-visa-searchbar { display: flex; gap: 8px; align-items: stretch; }
.wg-visa-inputwrap { position: relative; flex: 1 1 auto; min-width: 0; }

.wg-visa-searchicon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; color: var(--wg-muted);
  pointer-events: none;
}
/* wg_icon() emits a 24×24 SVG; scale it down for the field. */
.wg-visa-searchicon .wg-ico { width: 17px; height: 17px; }
/* Qualified with the tag on purpose. main.css styles inputs via
   `input[type="search"], …` — specificity (0,1,1) — which BEATS a bare
   `.wg-visa-input` (0,1,0) and silently reset the padding to 10px 12px,
   letting typed text run under the search icon. `input.wg-visa-input` is also
   (0,1,1) and visa.css loads after main.css, so it wins on order without
   needing !important. Any page-level input styling in this codebase hits the
   same trap. */
input.wg-visa-input {
  width: 100%; padding: 13px 38px 13px 36px;
  border: 1px solid var(--wg-border-soft); border-radius: 12px;
  background: #fff; font-size: 1rem; line-height: 1.2;
  transition: border-color var(--wg-dur) ease, box-shadow var(--wg-dur) ease;
}
input.wg-visa-input:focus {
  outline: none; border-color: var(--wg-color);
  box-shadow: var(--wg-focus-ring);
}
/* The browser's own clear affordance would sit on top of ours. */
.wg-visa-input::-webkit-search-cancel-button { display: none; }

.wg-visa-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer;
  font-size: .85rem; color: var(--wg-muted);
  padding: 6px 8px; border-radius: 8px; line-height: 1;
}
.wg-visa-clear:hover { background: var(--wg-surface); }

/* .wg-btn is width:100% (mobile-first), so this variant must opt out. */
.wg-visa-go {
  width: auto; flex: 0 0 auto;
  padding: 13px 20px; font-weight: 700; border-radius: 12px;
  transition: transform .14s var(--wg-ease-spring), box-shadow var(--wg-dur) ease;
}
.wg-visa-go:hover  { box-shadow: var(--wg-shadow-hover); }
.wg-visa-go:active { transform: scale(.985); }

/* ── Category chips ───────────────────────────────────────────────────── */
/* The .wg-chip base lives in marketplace.css, which this page does not load,
   so these are scoped and self-contained rather than reusing that name. */

.wg-visa-cats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.wg-visa-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--wg-border-soft); background: #fff;
  font-size: .88rem; font-weight: 600; color: var(--wg-text);
  transition: transform .14s var(--wg-ease-spring),
              background var(--wg-dur) ease, border-color var(--wg-dur) ease;
}
.wg-visa-chip:hover  { border-color: var(--wg-color); }
.wg-visa-chip:active { transform: scale(.97); }
.wg-visa-chip:focus-visible { outline: none; box-shadow: var(--wg-focus-ring); }
.wg-visa-chip.is-on {
  background: var(--wg-color); border-color: var(--wg-color); color: #fff;
}
.wg-visa-chip-n {
  font-size: .76rem; font-weight: 700; opacity: .7;
  background: rgba(0, 0, 0, .07); padding: 1px 6px; border-radius: 999px;
}
.wg-visa-chip.is-on .wg-visa-chip-n { background: rgba(255, 255, 255, .22); opacity: .95; }

/* ── Results ──────────────────────────────────────────────────────────── */

/* Top margin is 0 — the hero supplies the gap now, so the spacing above the
   results is the same whether or not this line has anything to say. */
.wg-visa-status { margin: 0 2px 10px; font-size: .92rem; color: var(--wg-muted); }
.wg-visa-status:empty { display: none; }

.wg-visa-results {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 10px;
}
@media (min-width: 640px) {
  .wg-visa-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Column, so a card carrying a direct tool link still stretches to the row
   height and the link sits beneath the button rather than inside it. */
.wg-visa-card { margin: 0; display: flex; flex-direction: column; }
.wg-visa-cardbtn {
  display: flex; flex-direction: column; gap: 5px;
  width: 100%; flex: 1 1 auto; text-align: left; cursor: pointer;
  padding: 15px 16px;
  border: 1px solid var(--wg-border-soft); border-radius: var(--wg-radius-card);
  background: #fff; box-shadow: var(--wg-shadow-card);
  transition: transform .14s var(--wg-ease-spring),
              box-shadow var(--wg-dur) ease, border-color var(--wg-dur) ease;
}
.wg-visa-cardbtn:hover {
  border-color: var(--wg-color); box-shadow: var(--wg-shadow-hover);
}
.wg-visa-cardbtn:active { transform: scale(.99); }
.wg-visa-cardbtn:focus-visible { outline: none; box-shadow: var(--wg-focus-ring); }

.wg-visa-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wg-visa-code {
  font-size: 1.02rem; font-weight: 800; letter-spacing: .01em;
  color: var(--wg-color-dark);
}
.wg-visa-badge {
  font-size: .68rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--wg-color-dark);
  background: rgba(14, 175, 76, .12);
  padding: 3px 8px; border-radius: 999px;
}
/* Source-currency disclosure (audit-6, item 16): amber, visible on the
   card and repeated in the sheet — a flagged manual is never a surprise
   the result card springs at the end. */
.wg-visa-badge-stale { background: rgba(212, 148, 9, .16); color: #7a5300; }
.wg-visa-stale-note,
.wg-visachk-stale-pre {
  background: rgba(212, 148, 9, .1);
  border: 1px solid rgba(212, 148, 9, .35);
  border-radius: 10px;
  color: #7a5300;
  font-size: .86rem; line-height: 1.5;
  padding: 8px 12px; margin: 8px 0;
}
@media (prefers-color-scheme: dark) {
  .wg-visa-badge-stale { color: #e8b04b; }
  .wg-visa-stale-note, .wg-visachk-stale-pre { color: #e8b04b; }
}
.wg-visa-name { font-weight: 700; font-size: .97rem; line-height: 1.35; }
.wg-visa-sum {
  color: var(--wg-muted); font-size: .88rem; line-height: 1.5;
  /* Summaries vary a lot in length; clamp so the grid stays even. */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.wg-visa-applies {
  font-size: .8rem; color: var(--wg-muted); margin-top: 2px;
}

/* Direct link to a visa's own tool (F-2-7's calculator). Reads as an action
   attached to the card, not as a second card. */
.wg-visa-cardlink {
  display: block; margin-top: -1px; padding: 11px 16px;
  border: 1px solid var(--wg-color); border-top: 0;
  border-radius: 0 0 var(--wg-radius-card) var(--wg-radius-card);
  background: var(--wg-tint); color: var(--wg-color-dark);
  font-size: .88rem; font-weight: 700; text-decoration: none;
  transition: background var(--wg-dur) ease;
}
.wg-visa-cardlink:hover { background: rgba(14, 175, 76, .14); text-decoration: none; }
.wg-visa-cardlink:focus-visible { outline: none; box-shadow: var(--wg-focus-ring); }
/* Square off the button's bottom corners when a link is attached below it. */
.wg-visa-card:has(.wg-visa-cardlink) .wg-visa-cardbtn {
  border-radius: var(--wg-radius-card) var(--wg-radius-card) 0 0;
}

/* ── Source + footer ──────────────────────────────────────────────────── */

.wg-visa-sec { margin: 26px 0; }
.wg-visa-sec h2 { font-size: 1.12rem; margin: 0 0 10px; }
.wg-visa-sec p  { line-height: 1.65; margin: 0 0 10px; }
.wg-visa-source {
  background: var(--wg-surface); border-radius: var(--wg-radius-card); padding: 18px;
}
.wg-visa-foot {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--wg-border-soft);
}

/* ── Detail sheet ─────────────────────────────────────────────────────── */

.wg-visa-locked { overflow: hidden; }

.wg-visa-sheet {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: flex-end; justify-content: center;
}
.wg-visa-sheet[hidden] { display: none; }

.wg-visa-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(12, 20, 15, .45);
}
.wg-visa-sheet-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto;
  background: var(--wg-bg, #fff);
  border-radius: 18px 18px 0 0;
  padding: 26px 20px 30px;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
}

/* The entrance animation is attached by .is-open and carries NO fill, so the
   panel's resting geometry comes from the rules above rather than from an
   animation's fill state.
   Why it matters: an animation that never advances — a backgrounded tab
   suspends rAF, and the animation then sits frozen on its first frame — would,
   with `fill: both`, pin the panel at translateY(18px) and push its bottom off
   the viewport. Layout must not depend on the animation having run. This also
   keeps the project's standing rule intact: no forward-filling transform is
   left on an element that contains position:fixed children. */
.wg-visa-sheet.is-open .wg-visa-sheet-backdrop {
  animation: wg-visa-fade .18s var(--wg-ease-out);
}
.wg-visa-sheet.is-open .wg-visa-sheet-panel {
  animation: wg-visa-rise .26s var(--wg-ease-spring);
}
@media (min-width: 640px) {
  .wg-visa-sheet { align-items: center; }
  .wg-visa-sheet-panel { border-radius: 18px; }
}

.wg-visa-sheet-x {
  position: absolute; top: 12px; right: 12px;
  border: 0; background: var(--wg-surface); cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: .9rem; color: var(--wg-muted); line-height: 1;
}
.wg-visa-sheet-x:hover { background: var(--wg-border-soft); }
.wg-visa-sheet-x:focus-visible { outline: none; box-shadow: var(--wg-focus-ring); }

.wg-visa-sheet-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wg-visa-sheet-code {
  font-size: 1.3rem; font-weight: 800; color: var(--wg-color-dark);
}
.wg-visa-sheet-title { font-size: 1.22rem; line-height: 1.3; margin: 8px 0 2px; }
.wg-visa-sheet-ko  { color: var(--wg-muted); font-size: .92rem; margin: 0 0 10px; }
.wg-visa-sheet-sum { line-height: 1.65; margin: 0 0 10px; }

.wg-visa-act {
  display: block; width: 100%; text-align: center;
  margin: 16px 0 4px; padding: 14px 18px;
  font-weight: 700; border-radius: 12px; text-decoration: none;
  transition: transform .14s var(--wg-ease-spring), box-shadow var(--wg-dur) ease;
}
.wg-visa-act:hover  { box-shadow: var(--wg-shadow-hover); text-decoration: none; }
.wg-visa-act:active { transform: scale(.985); }

.wg-visa-infonote {
  background: #fff8e6; border: 1px solid #f5e2ad;
  padding: 13px 15px; border-radius: 10px; margin: 16px 0 4px;
}
.wg-visa-infonote p { margin: 0 0 5px; line-height: 1.55; font-size: .93rem; }
.wg-visa-infonote p:last-child { margin-bottom: 0; }

.wg-visa-sheet-src {
  margin-top: 20px; padding-top: 14px;
  border-top: 1px solid var(--wg-border-soft);
}
.wg-visa-sheet-src h3 { font-size: .95rem; margin: 0 0 6px; }
.wg-visa-sheet-src p  { margin: 0 0 4px; line-height: 1.55; }
.wg-visa-sheet-disc   { margin-top: 14px; line-height: 1.55; }

@keyframes wg-visa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wg-visa-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wg-visa-sheet.is-open .wg-visa-sheet-backdrop,
  .wg-visa-sheet.is-open .wg-visa-sheet-panel { animation: none; }
  .wg-visa-cardbtn, .wg-visa-chip, .wg-visa-go, .wg-visa-act { transition: none; }
  .wg-visa-cardbtn:active, .wg-visa-chip:active,
  .wg-visa-go:active, .wg-visa-act:active { transform: none; }
}

/* ── Guided check (visa_check.php) ────────────────────────────────────── */

.wg-visachk-back {
  display: inline-block; margin-top: 12px;
  font-size: .9rem; font-weight: 600; text-decoration: none;
}

.wg-visachk-stage { margin: 20px 0; }
/* Stale-source warning: prominent, ahead of the verdict body. */
.wg-visachk-stale {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid #c77700;
  background: rgba(199, 119, 0, 0.08);
  border-radius: 0 8px 8px 0;
  font-weight: 600;
}

/* "Not yet" honesty: a timing gap renders as an opening, not a refusal. */
.wg-visachk-notyetnote {
  margin: 12px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--wg-color);
  background: color-mix(in srgb, var(--wg-color) 6%, transparent);
  border-radius: 0 8px 8px 0;
}
.wg-visachk-notyetnote p { margin: 0 0 6px; }
.wg-visachk-notyet { opacity: 0.9; font-style: italic; }
/* The floating Create button (fixed, bottom-right on mobile) was landing on
   top of the lower answer options (fourth audit, item 15). Clearance below
   the wizard keeps the last option tappable; the FAB itself stays. */
@media (max-width: 760px) {
  .wg-visachk-stage { padding-bottom: 96px; }
}

.wg-visachk-card {
  background: #fff; border: 1px solid var(--wg-border-soft);
  border-radius: var(--wg-radius-card); box-shadow: var(--wg-shadow-card);
  padding: 20px 18px 22px;
}

.wg-visachk-prog { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.wg-visachk-progbar {
  flex: 1 1 auto; height: 6px; border-radius: 999px;
  background: var(--wg-surface); overflow: hidden;
}
.wg-visachk-progbar span {
  display: block; height: 100%; background: var(--wg-color);
  border-radius: 999px; transition: width .3s var(--wg-ease-out);
}
.wg-visachk-progtxt { font-size: .78rem; font-weight: 700; color: var(--wg-muted); white-space: nowrap; }
/* Indeterminate state (audit-6, item 19): before the branching answer the
   total is unknowable, so the bar sweeps instead of claiming a percent. */
.wg-visachk-progbar.is-indet span {
  width: 30%;
  animation: wg-visachk-sweep 1.2s ease-in-out infinite;
}
@keyframes wg-visachk-sweep {
  0%   { margin-left: 0; }
  50%  { margin-left: 70%; }
  100% { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wg-visachk-progbar.is-indet span { animation: none; width: 100%; opacity: .35; }
}

.wg-visachk-q    { font-size: 1.15rem; line-height: 1.35; margin: 0 0 8px; }
.wg-visachk-hint { margin: 0 0 10px; line-height: 1.55; }
.wg-visachk-mode {
  font-size: .74rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--wg-muted); margin: 0 0 12px;
}

.wg-visachk-opts { display: grid; gap: 8px; }
.wg-visachk-opt {
  display: flex; align-items: flex-start; gap: 11px; width: 100%;
  text-align: left; cursor: pointer; padding: 13px 14px;
  border: 1px solid var(--wg-border-soft); border-radius: 12px;
  background: #fff; font-size: .95rem; line-height: 1.45; color: var(--wg-text);
  transition: transform .14s var(--wg-ease-spring),
              border-color var(--wg-dur) ease, background var(--wg-dur) ease;
}
.wg-visachk-opt:hover  { border-color: var(--wg-color); }
.wg-visachk-opt:active { transform: scale(.99); }
.wg-visachk-opt:focus-visible { outline: none; box-shadow: var(--wg-focus-ring); }
.wg-visachk-opt.is-on { border-color: var(--wg-color); background: var(--wg-tint); }

.wg-visachk-optmark {
  flex: 0 0 auto; width: 19px; height: 19px; margin-top: 1px;
  border: 2px solid var(--wg-border-soft); border-radius: 50%;
  position: relative; transition: border-color var(--wg-dur) ease;
}
.wg-visachk-opt.is-on .wg-visachk-optmark { border-color: var(--wg-color); }
.wg-visachk-opt.is-on .wg-visachk-optmark::after {
  content: ''; position: absolute; inset: 3px;
  background: var(--wg-color); border-radius: 50%;
}

.wg-visachk-nav { display: flex; gap: 10px; margin-top: 18px; }
.wg-visachk-nav .wg-btn { width: auto; flex: 1 1 0; padding: 13px 16px; border-radius: 12px; font-weight: 700; }
.wg-visachk-nav .wg-visachk-done { text-align: center; text-decoration: none; }
.wg-visachk-next[disabled] { opacity: .45; cursor: not-allowed; }

/* Result */
.wg-visachk-resulth { font-size: 1.25rem; margin: 0 0 8px; }
.wg-visachk-result[data-status="likely"]   .wg-visachk-resulth { color: var(--wg-color-dark); }
.wg-visachk-result[data-status="blocked"]  .wg-visachk-resulth { color: #b3261e; }
.wg-visachk-result > p { line-height: 1.65; margin: 0 0 6px; }

.wg-visachk-sech { font-size: .95rem; margin: 20px 0 8px; }
.wg-visachk-routes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wg-visachk-route {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--wg-border-soft); background: var(--wg-surface);
  font-size: .93rem; line-height: 1.5;
}
.wg-visachk-routes.is-open   .wg-visachk-route { border-left: 3px solid var(--wg-color); background: var(--wg-tint); }
.wg-visachk-routes.is-blocked .wg-visachk-route { border-left: 3px solid #b3261e; background: #fff5f5; }
/* Deliberately not the blocker's red. A notice redirects the reader to the
   right status; dressing it as a refusal is the exact misreading the separate
   kind exists to prevent. */
.wg-visachk-routes.is-notice .wg-visachk-route { border-left: 3px solid #1a73a7; background: #f2f8fc; }
/* Procedure notes (F-5 depth): factual, neutral — informative rather than
   directive, so calmer than the blue redirect styling. */
.wg-visachk-routes.is-procnote .wg-visachk-route { border-left: 3px solid #6b7b8a; background: #f6f8f9; }
/* Path Finder entry on the hub hero: a brand-green banner row under the
   search bar — the discovery flow deserves to be seen. */
.wg-visa-pathentry { margin: 10px 0 0; }
.wg-visa-pathentry-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px; border-radius: 12px;
  /* Gold, not brand green: this row must be found. Dark bronze text —
     white on gold fails contrast. */
  background: linear-gradient(135deg, #f7c437, #eda30b);
  box-shadow: 0 3px 12px rgba(224, 148, 9, .32);
  /* .86rem holds the mobile label ("…for YOU") on one line at 360px;
     roomier screens step back up. */
  font-size: .86rem; font-weight: 700; line-height: 1.4;
  color: #4a3200; text-decoration: none;
  transition: transform .14s var(--wg-ease-spring),
              box-shadow var(--wg-dur) ease, filter var(--wg-dur) ease;
}
.wg-visa-pathentry-link:hover {
  filter: brightness(1.05); box-shadow: 0 6px 18px rgba(224, 148, 9, .4);
  text-decoration: none; color: #4a3200;
}
.wg-visa-pathentry-link:active { transform: scale(.99); }
.wg-visa-pathentry-link:focus-visible { outline: none; box-shadow: var(--wg-focus-ring); }
.wg-visa-pathentry-arrow {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 999px;
  background: rgba(255, 255, 255, .45); font-weight: 700;
  transition: transform .14s var(--wg-ease-spring);
  /* An idle beckon: two quick nudges, then a long rest — three cycles
     after page load, then still. */
  animation: wg-pathentry-beckon 3.2s ease-in-out 1.2s 3;
}
@keyframes wg-pathentry-beckon {
  0%, 24%, 100% { transform: translateX(0); }
  6%  { transform: translateX(4px); }
  12% { transform: translateX(0); }
  18% { transform: translateX(4px); }
}
/* The pointer takes over: stop beckoning, hold the hover nudge. */
.wg-visa-pathentry-link:hover .wg-visa-pathentry-arrow {
  animation: none; transform: translateX(2px);
}
@media (min-width: 640px) {
  .wg-visa-pathentry-link { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wg-visa-pathentry-link, .wg-visa-pathentry-arrow { transition: none; animation: none; }
  .wg-visa-pathentry-link:active { transform: none; }
  .wg-visa-pathentry-link:hover .wg-visa-pathentry-arrow { transform: none; }
}
/* Phones get the short hook so the row holds one line; the full sentence
   returns where it fits. Scaling the full text down instead would need
   ~10px type on a 360px screen — unreadable, so swap words, not size. */
.wg-visa-pathentry-full { display: none; }
@media (min-width: 640px) {
  .wg-visa-pathentry-full { display: inline; }
  .wg-visa-pathentry-short { display: none; }
}

/* ── Expiry reminder card + changelog link (hub hero) ─────────────── */

.wg-visa-rem {
  margin: 10px 0 0; padding: 13px 16px;
  border: 1px solid var(--wg-border-soft); border-radius: 12px;
  background: #fff;
}
.wg-visa-rem-h { font-size: .95rem; margin: 0 0 6px; }
.wg-visa-rem-loading, .wg-visa-rem-guest, .wg-visa-rem-note {
  font-size: .85rem; color: var(--wg-muted); line-height: 1.55; margin: 0 0 8px;
}
.wg-visa-rem-line { font-size: .92rem; font-weight: 600; margin: 0 0 6px; }
.wg-visa-rem-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.wg-visa-rem-form label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: .78rem; font-weight: 700; color: var(--wg-muted);
}
.wg-visa-rem-form select, .wg-visa-rem-form input {
  padding: 9px 10px; border: 1px solid var(--wg-border-soft); border-radius: 10px;
  background: #fff; font-size: .92rem;
}
.wg-visa-rem-form select:focus-visible, .wg-visa-rem-form input:focus-visible {
  outline: none; border-color: var(--wg-color); box-shadow: var(--wg-focus-ring);
}
.wg-visa-rem-save {
  padding: 10px 18px; cursor: pointer; border: none; border-radius: 999px;
  background: var(--wg-color); color: #fff; font-size: .88rem; font-weight: 700;
  transition: background var(--wg-dur) ease, transform .14s var(--wg-ease-spring);
}
.wg-visa-rem-save:hover { background: var(--wg-color-dark); }
.wg-visa-rem-save:active { transform: scale(.97); }
.wg-visa-rem-actions { display: flex; gap: 8px; }
.wg-visa-rem-edit, .wg-visa-rem-del {
  padding: 7px 14px; cursor: pointer; background: none;
  border: 1px solid var(--wg-border-soft); border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--wg-text);
  transition: border-color var(--wg-dur) ease;
}
.wg-visa-rem-edit:hover { border-color: var(--wg-color); }
.wg-visa-rem-del:hover { border-color: #c0392b; color: #c0392b; }

.wg-visa-changes-link { margin: 10px 2px 0; font-size: .88rem; }

.wg-visachk-cite { font-size: .76rem; color: var(--wg-muted); }
.wg-visachk-note { margin-top: 18px; line-height: 1.55; }

/* Bespoke-tool shortcut on a route/notice card (audit-9 P1-4): a real
   link served as data, styled as a compact pill button. */
.wg-visachk-toolcta {
  display: inline-block; margin: 6px 0 2px; padding: 7px 14px;
  border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: var(--wg-primary, #2563eb); color: #fff; text-decoration: none;
  transition: transform .18s var(--wg-ease-spring, ease), filter .18s ease;
}
.wg-visachk-toolcta:hover { filter: brightness(1.08); }
.wg-visachk-toolcta:active { transform: scale(.97); }
.wg-visachk-toolcta:focus-visible { outline: none; box-shadow: var(--wg-focus-ring); }
@media (prefers-reduced-motion: reduce) {
  .wg-visachk-toolcta { transition: none; }
  .wg-visachk-toolcta:active { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wg-visachk-opt, .wg-visachk-progbar span { transition: none; }
  .wg-visachk-opt:active { transform: none; }
}

/* Join prompt on the result card (guests). An invitation, not a wall —
   the old sign-in gate that replaced the whole result lived here. */
.wg-visachk-cta {
  background: var(--wg-tint); border: 1px solid var(--wg-border-soft);
  border-radius: 12px; padding: 14px 16px; margin-top: 20px;
}
.wg-visachk-cta h3 { margin: 0 0 6px; font-size: 1rem; }
.wg-visachk-cta p { margin: 0; line-height: 1.6; }
.wg-visachk-cta .wg-visachk-nav { margin-top: 12px; }

/* Which conditions an unmet route is still missing (cumulative visas). */
.wg-visachk-missing {
  display: block; margin-top: 4px; font-size: .86rem;
  color: #8a5a00; background: #fff8e6;
  border-left: 2px solid #e0a800; border-radius: 0 6px 6px 0;
  padding: 6px 9px; line-height: 1.45;
}

/* Questions the applicant has not answered yet, and requirements Waegook has
   not verified. Two separate blocks on purpose: one is "you still have work to
   do", the other is "we could not check this for you" — collapsing them would
   read as though an unverified employer requirement were the user's fault. */
.wg-visachk-todo,
.wg-visachk-gates {
  margin: 14px 0 0; padding: 12px 14px;
  border-radius: var(--wg-radius-card, 12px);
  font-size: .9rem; line-height: 1.5;
}
.wg-visachk-todo  { background: #fff8e6; border: 1px solid #f0d999; color: #6b4700; }
.wg-visachk-gates { background: #eef4ff; border: 1px solid #c9dbff; color: #24406e; }
/* Collapsed "other situations" — routes that belong to a different identity
   (someone else's family/employment/investment path). De-emphasised, never
   withheld: the summary line invites comparison without reading as to-dos. */
.wg-visachk-others { margin: 14px 0 0; }
.wg-visachk-others summary {
  cursor: pointer; font-size: .9rem; font-weight: 600;
  color: var(--wg-muted, #5c5c58); padding: 8px 2px;
  list-style-position: inside;
}
.wg-visachk-others summary:hover { color: var(--wg-text, #222); }
.wg-visachk-others[open] summary { margin-bottom: 8px; }
.wg-visachk-others .wg-visachk-routes { opacity: .85; }

/* Waived documents, explained (audit-9 P2-2): the same collapsed shape as
   the other-situations list — the exemptions the user chose, with the
   answer that waived each row. */
.wg-visachk-waived { margin: 14px 0 0; }
.wg-visachk-waived summary {
  cursor: pointer; font-size: .9rem; font-weight: 600;
  color: var(--wg-muted, #5c5c58); padding: 8px 2px;
  list-style-position: inside;
}
.wg-visachk-waived summary:hover { color: var(--wg-text, #222); }
.wg-visachk-waived[open] summary { margin-bottom: 8px; }
.wg-visachk-waived .wg-visachk-routes { opacity: .85; }

/* The procedure-coverage caveat. Neutral, not alarm-coloured: it is a scope
   statement about what was checked, not a problem with the applicant. */
.wg-visachk-procpartial .wg-visachk-proclist-h {
  margin: 10px 0 4px; font-weight: 700; font-size: .92rem;
}
.wg-visachk-proclist { margin: 0 0 4px 18px; line-height: 1.55; }
.wg-visachk-procnote {
  margin: 12px 0 0; padding: 10px 14px;
  border-radius: var(--wg-radius-card, 12px);
  background: var(--wg-surface, #f6f6f4); border: 1px solid var(--wg-border-soft, #e4e4e0);
  color: var(--wg-muted, #5c5c58); font-size: .88rem; line-height: 1.5;
}

.wg-visachk-todo h3,
.wg-visachk-gates h3 {
  margin: 0 0 6px; font-size: .9rem; font-weight: 700;
}
.wg-visachk-todo ul,
.wg-visachk-gates ul { margin: 0; padding-left: 18px; }
.wg-visachk-todo li,
.wg-visachk-gates li { margin: 3px 0; }

@media (prefers-color-scheme: dark) {
  .wg-visachk-todo  { background: #2e2411; border-color: #5c4a1e; color: #f0dcae; }
  .wg-visachk-gates { background: #16233a; border-color: #2f4470; color: #cfe0ff; }
}

/* Score panel for points-based visas */
.wg-visachk-score {
  margin: 16px 0 4px; padding: 14px 15px;
  border: 1px solid var(--wg-border-soft); border-radius: 12px;
  background: var(--wg-surface);
}
.wg-visachk-score.is-pass { background: var(--wg-tint); border-color: var(--wg-color); }
.wg-visachk-scorehead { display: flex; align-items: baseline; gap: 9px; }
.wg-visachk-scoretotal { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--wg-color-dark); }
.wg-visachk-scoreof { font-size: .86rem; color: var(--wg-muted); }
.wg-visachk-scorebar {
  position: relative; height: 8px; margin-top: 11px;
  border-radius: 999px; background: #e6ece8; overflow: visible;
}
.wg-visachk-scorebar span {
  display: block; height: 100%; border-radius: 999px; background: var(--wg-color);
  transition: width .4s var(--wg-ease-out);
}
/* The pass mark, so the bar reads as "am I past the line" not just "how full". */
.wg-visachk-scorebar i {
  position: absolute; top: -3px; width: 2px; height: 14px;
  background: var(--wg-color-dark); border-radius: 1px;
}
.wg-visachk-scorebase { margin: 9px 0 0; font-size: .86rem; color: var(--wg-muted); }
.wg-visachk-scorebase.is-short { color: #8a5a00; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .wg-visachk-scorebar span { transition: none; } }

/* ── Document checklists ──────────────────────────────────────────────── */
.wg-visa-docgroup {
  font-size: .82rem; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--wg-muted);
  margin: 16px 0 7px;
}
.wg-visa-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.wg-visa-doc {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px 10px 26px; position: relative;
  border-radius: 9px; background: var(--wg-surface);
  font-size: .92rem; line-height: 1.5;
}
/* Required items get a filled marker, optional ones a hollow one, so the
   distinction survives without relying on colour alone. */
.wg-visa-doc::before {
  content: ''; position: absolute; left: 10px; top: 15px;
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid var(--wg-muted);
}
.wg-visa-doc.is-req::before { background: var(--wg-color); border-color: var(--wg-color); }

/* Four requirement states, each with a distinct MARKER as well as a label —
   the old boolean styled "required" and "sometimes required" identically, and
   colour alone would not carry the difference for everyone. Filled = required,
   half = conditional, hollow = optional, square = informational (not a
   document you bring at all). */
.wg-visa-doc.is-required::before {
  background: var(--wg-color); border-color: var(--wg-color);
}
.wg-visa-doc.is-conditional::before {
  background: linear-gradient(to right, #e0a800 0 50%, transparent 50% 100%);
  border-color: #e0a800;
}
.wg-visa-doc.is-optional::before { background: transparent; }
.wg-visa-doc.is-informational::before {
  border-radius: 2px; background: transparent;
  border-style: dashed; border-color: var(--wg-muted);
}

.wg-visa-docreq {
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; align-self: flex-start;
  padding: 1px 7px; border-radius: 999px; margin-top: 1px;
}
.wg-visa-doc.is-required      .wg-visa-docreq { background: #e8f0ff; color: #24406e; }
.wg-visa-doc.is-conditional   .wg-visa-docreq { background: #fff3d6; color: #7a5300; }
.wg-visa-doc.is-optional      .wg-visa-docreq { background: var(--wg-tint); color: var(--wg-muted); }
.wg-visa-doc.is-informational .wg-visa-docreq { background: transparent; color: var(--wg-muted); }

/* Who prepares it — quiet by design, but present on every row that knows. */
.wg-visa-docby { color: var(--wg-muted); font-size: .82rem; font-style: italic; }
/* Apostille / translation / validity rules, kept visually apart from the note
   so they read as procedural constraints rather than description. */
.wg-visa-docauth {
  color: var(--wg-muted); font-size: .8rem;
  border-left: 2px solid var(--wg-border-soft); padding-left: 7px; margin-top: 3px;
}

@media (prefers-color-scheme: dark) {
  .wg-visa-doc.is-required    .wg-visa-docreq { background: #1b2a45; color: #cfe0ff; }
  .wg-visa-doc.is-conditional .wg-visa-docreq { background: #3a2f14; color: #f0d99a; }
}

.wg-visa-docnote { color: var(--wg-muted); font-size: .85rem; }
.wg-visa-docwhen {
  color: #8a5a00; font-size: .82rem; font-weight: 600; margin-top: 2px;
}
.wg-visa-docsbtn { margin-top: 8px; }
.wg-visachk-docs { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--wg-border-soft); }

/* ── Likely sub-code ──────────────────────────────────────────────────── */
.wg-visachk-subs { margin-top: 20px; }
.wg-visachk-sublist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wg-visachk-sub {
  display: flex; align-items: baseline; gap: 11px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 11px;
  background: var(--wg-tint); border: 1px solid var(--wg-color);
}
.wg-visachk-subcode {
  font-size: 1.05rem; font-weight: 800; letter-spacing: .01em;
  color: var(--wg-color-dark); white-space: nowrap;
}
.wg-visachk-sublabel { font-size: .9rem; line-height: 1.45; }

/* An unverified gate on a route. Visually distinct from the amber "still
   needed" span because it is a different message: not something the applicant
   failed to do, but something Waegook cannot check for them.

   NOT .wg-visachk-gate — that class is the SIGN-IN gate card (js line ~277),
   and reusing it wrapped the whole sign-in panel in this blue box. Same
   collision as .wg-visachk-missing earlier; the names in this file are close
   enough together that it is worth checking before adding another. */
.wg-visachk-cantconfirm {
  display: block; margin-top: 4px; font-size: .86rem;
  color: #24406e; background: #eef4ff;
  border-left: 2px solid #7aa2e8; border-radius: 0 6px 6px 0;
  padding: 6px 9px; line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  .wg-visachk-cantconfirm { color: #cfe0ff; background: #16233a; border-left-color: #3d63a8; }
}

/* "What this result is based on" — the confidence panel. Muted list, no
   alarm colours: it states scope, not problems. */
.wg-visachk-coverage {
  margin: 16px 0 0; padding: 12px 14px;
  border-radius: var(--wg-radius-card, 12px);
  background: var(--wg-surface, #f6f6f4);
  border: 1px solid var(--wg-border-soft, #e4e4e0);
}
.wg-visachk-coverage h3 {
  margin: 0 0 6px; font-size: .84rem; font-weight: 700;
  color: var(--wg-muted, #5c5c58); text-transform: uppercase; letter-spacing: .04em;
}
.wg-visachk-coverage ul { margin: 0; padding-left: 18px; }
.wg-visachk-coverage li {
  margin: 4px 0; font-size: .87rem; line-height: 1.5;
  color: var(--wg-muted, #5c5c58);
}

/* Shared checklist metadata: sub-code chip and source-page line. */
.wg-visa-docsub {
  display: inline-block; font-size: .72rem; font-weight: 700;
  color: var(--wg-color-dark); background: rgba(14, 175, 76, .1);
  padding: 1px 7px; border-radius: 999px; margin-left: 6px;
}
.wg-visa-docpages { display: block; font-size: .74rem; color: var(--wg-muted); margin-top: 2px; }

/* Matched-because line on search results: quiet, explanatory, never loud. */
.wg-visa-matched {
  display: block; font-size: .76rem; color: var(--wg-color-dark);
  background: rgba(14, 175, 76, .07); border-radius: 6px;
  padding: 2px 8px; margin-top: 2px; align-self: flex-start;
}
