:root {
  --bg: #f6f4ee;
  --bg-soft: #efece3;
  --surface: #ffffff;
  --ink: #101a2b;
  --ink-2: #2b3547;
  --muted: #5d6676;
  --line: #e2ded3;
  --line-strong: #cfc9bb;
  --brand: #12366b;
  --brand-ink: #ffffff;
  --brand-soft: #e6ecf6;
  --accent: #d4621c;
  --accent-soft: #fbeadf;
  --ok: #17734a;
  --ok-soft: #e3f2ea;
  --warn: #8a4b07;
  --warn-soft: #fdf1df;
  --warn-line: #efcf9f;
  --shadow: 0 1px 2px rgba(16, 26, 43, .05), 0 8px 24px -12px rgba(16, 26, 43, .12);
  --radius: 14px;
  --radius-sm: 9px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220;
    --bg-soft: #0f1829;
    --surface: #121c2e;
    --ink: #e9edf4;
    --ink-2: #cdd4e0;
    --muted: #96a1b4;
    --line: #1f2b40;
    --line-strong: #2c3a53;
    --brand: #8fb3f2;
    --brand-ink: #0b1220;
    --brand-soft: #18263f;
    --accent: #f08a4b;
    --accent-soft: #2a1d15;
    --ok: #5ccf97;
    --ok-soft: #12291f;
    --warn: #f2b766;
    --warn-soft: #221a0f;
    --warn-line: #4a3517;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-soft: #0f1829;
  --surface: #121c2e;
  --ink: #e9edf4;
  --ink-2: #cdd4e0;
  --muted: #96a1b4;
  --line: #1f2b40;
  --line-strong: #2c3a53;
  --brand: #8fb3f2;
  --brand-ink: #0b1220;
  --brand-soft: #18263f;
  --accent: #f08a4b;
  --accent-soft: #2a1d15;
  --ok: #5ccf97;
  --ok-soft: #12291f;
  --warn: #f2b766;
  --warn-soft: #221a0f;
  --warn-line: #4a3517;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
html[data-text="sm"] { font-size: 93.75%; }
html[data-text="lg"] { font-size: 112.5%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.fine { color: var(--muted); font-size: .8125rem; margin-top: 18px; }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Concept bar */
.concept-bar { background: var(--ink); color: var(--bg); font-size: .8125rem; }
.concept-bar .wrap { display: flex; align-items: center; gap: 10px; padding-block: 8px; flex-wrap: wrap; }
.concept-bar a { color: inherit; font-weight: 600; text-underline-offset: 2px; }
.concept-pill { background: var(--accent); color: #fff; font-weight: 600; font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); }
.brand-mark { width: 30px; height: 30px; }
.brand-text { font-size: 1.0625rem; color: var(--ink); letter-spacing: -0.01em; }
.brand-text strong { font-weight: 700; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: .9375rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.text-size { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--surface); }
.text-size button { border: 0; background: none; padding: 6px 9px; font-size: .8125rem; font-weight: 600; cursor: pointer; color: var(--muted); line-height: 1; }
.text-size button sup { font-size: .6em; }
.text-size button[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.icon-btn svg, .btn svg, .search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-btn { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 600; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, var(--ink)); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { font-size: .875rem; padding: 7px 14px; }
.btn-lg { font-size: 1rem; padding: 13px 20px; }

/* Hero */
.hero { padding: 56px 0 40px; background:
  radial-gradient(900px 400px at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
  radial-gradient(700px 380px at 0% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: start; }
.hero h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02; }
.hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--brand); letter-spacing: -0.01em; }
.lede { font-size: 1.1875rem; color: var(--ink-2); max-width: 34em; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 36px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 560px; }
.hero-facts li { background: var(--surface); padding: 14px 16px; display: grid; gap: 2px; }
.hero-facts strong { font-size: .9375rem; }
.hero-facts span { font-size: .8125rem; color: var(--muted); }

.task-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 8px; }
.task-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 14px 10px; }
.task-head h2 { font-size: 1.0625rem; }
.task-list { display: grid; }
.task-list a { display: grid; grid-template-columns: 40px 1fr 16px; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; text-decoration: none; }
.task-list a:hover { background: var(--bg-soft); }
.task-list a:hover .chev { transform: translateX(3px); color: var(--ink); }
.task-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.task-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.task-name { font-weight: 600; font-size: .9375rem; }
.task-desc { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.task-name .ext { color: var(--muted); font-weight: 500; font-size: .8125rem; }
.chev { width: 16px; height: 16px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 2; transition: transform .15s ease; }

/* Notices */
.notices { padding: 8px 0 8px; }
.notice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.notice { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; min-height: 150px; }
.notice-tag { align-self: flex-start; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 8px; border-radius: 999px; }
.notice h3 { font-size: 1rem; }
.notice p { color: var(--muted); font-size: .875rem; }
.notice a { margin-top: auto; font-weight: 600; font-size: .875rem; color: var(--brand); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.notice a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Sections */
.section { padding: 72px 0 0; }
.section-head { margin-bottom: 28px; }
.section-head h2, .prepare-grid h2, .faq-side h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.section-head.split { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 40px; right: -14px; width: 14px; height: 1px; background: var(--line-strong); }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--brand); color: var(--brand-ink); margin-bottom: 16px; }
.steps h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: .9rem; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.vertical { flex-direction: column; align-items: stretch; margin-top: 16px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 13px; border-radius: 999px; font-size: .875rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; justify-content: space-between; }
.chips.vertical .chip { border-radius: 10px; }
.chip .count { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-selected="true"], .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-selected="true"] .count, .chip[aria-pressed="true"] .count { color: color-mix(in srgb, var(--bg) 70%, transparent); }

/* Visa cards */
.visa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.visa-card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; min-height: 220px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.visa-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.visa-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.purpose { font-size: .75rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); padding: 3px 9px; border-radius: 999px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; color: var(--muted); }
.visa-card h3 { font-size: 1.125rem; }
.visa-card p { color: var(--muted); font-size: .875rem; }
.visa-meta { margin-top: auto; display: grid; gap: 4px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .8125rem; }
.visa-meta div { display: flex; justify-content: space-between; gap: 10px; }
.visa-meta dt { color: var(--muted); }
.visa-meta dd { margin: 0; font-weight: 500; text-align: right; }
.visa-more { font-size: .8125rem; font-weight: 600; color: var(--brand); }

/* Advisory */
.advisory { display: grid; grid-template-columns: 48px 1fr; gap: 18px; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 18px; padding: 28px; }
.advisory-icon { width: 48px; height: 48px; padding: 11px; border-radius: 12px; background: var(--surface); color: var(--warn); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.advisory h2 { font-size: 1.375rem; margin-bottom: 8px; }
.advisory p { color: var(--ink-2); max-width: 62em; }
.advisory a { font-weight: 600; }
.advisory-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.advisory-links a { font-size: .875rem; text-decoration: none; background: var(--surface); border: 1px solid var(--warn-line); padding: 7px 12px; border-radius: 9px; }
.advisory-links a:hover { border-color: var(--warn); }

/* Checklist */
.prepare-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.prepare-grid > div p.muted { margin-top: 12px; max-width: 26em; }
.progress { margin-top: 24px; display: grid; gap: 8px; max-width: 320px; }
.progress-bar { height: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--ok); border-radius: inherit; transition: width .25s ease; }
#progress-text { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.checklist { display: grid; gap: 10px; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; background: var(--surface); }
.check .box svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check strong { display: block; font-size: .9875rem; }
.check span.detail { display: block; color: var(--muted); font-size: .875rem; margin-top: 2px; }
.check:has(input:checked) { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.check:has(input:checked) .box { background: var(--ok); border-color: var(--ok); }
.check:has(input:checked) .box svg { opacity: 1; }
.check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Ports */
.port-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.segmented { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.segmented button { border: 0; background: none; padding: 7px 13px; border-radius: 8px; font-size: .875rem; font-weight: 500; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; }
.segmented button .count { font-size: .75rem; font-variant-numeric: tabular-nums; }
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.search { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; height: 40px; min-width: 240px; color: var(--muted); }
.search:focus-within { border-color: var(--brand); }
.search input { border: 0; outline: 0; background: none; font: inherit; font-size: .9375rem; color: var(--ink); width: 100%; }
.port-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.port-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .9375rem; display: flex; align-items: center; gap: 10px; }
.port-grid li svg { width: 16px; height: 16px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.port-grid mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }
.port-grid .empty { grid-column: 1 / -1; color: var(--muted); justify-content: center; }

/* Help */
.help-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 14px; }
.help-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.help-card.primary { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.help-card.primary .help-kind, .help-card.primary .help-note { color: color-mix(in srgb, var(--brand-ink) 75%, transparent); }
.help-kind { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.help-card h3 { font-size: 1.125rem; }
.help-contact { display: grid; gap: 4px; }
.help-contact a { text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.help-contact a.mail { font-size: .9rem; font-weight: 500; word-break: break-all; }
.help-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.help-card.primary .help-contact a { font-size: 1.5rem; }
.help-card.primary .help-contact a.mail { font-size: 1rem; }
.help-hours { font-size: .8125rem; color: var(--ok); font-weight: 600; }
.help-card.primary .help-hours { color: inherit; }
.help-note { font-size: .8125rem; color: var(--muted); margin-top: auto; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 48px; align-items: start; }
.faq-side { position: sticky; top: 96px; }
.faq-side .search { margin-top: 20px; width: 100%; }
.faq-list { display: grid; gap: 8px; }
.faq-list details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.faq-list summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; flex: none; }
.faq-list details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.faq-list details[open] { border-color: var(--line-strong); }
.faq-list .answer { padding: 0 18px 18px; color: var(--ink-2); }
.faq-list .topic { font-size: .75rem; color: var(--muted); font-weight: 500; margin-left: auto; margin-right: 6px; white-space: nowrap; }
.faq-empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 12px; }

/* Footer */
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--bg-soft); padding: 48px 0 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid .brand { margin-bottom: 12px; }
.footer-title { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-links { display: grid; gap: 6px; }
.footer-links a { text-decoration: none; font-size: .9375rem; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.source-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.source-dot.off { background: var(--warn); }

/* Dialog */
.visa-dialog { width: min(640px, 100% - 32px); max-height: min(86vh, 780px); border: 1px solid var(--line); border-radius: 20px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); }
.visa-dialog::backdrop { background: rgba(11, 18, 32, .55); backdrop-filter: blur(3px); }
.visa-dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-close-row { position: sticky; top: 0; display: flex; justify-content: flex-end; padding: 12px 12px 0; margin: 0; }
#visa-dialog-body { padding: 0 28px 28px; }
#visa-dialog-body h2 { font-size: 1.75rem; margin: 8px 0 6px; }
#visa-dialog-body .summary { color: var(--ink-2); font-size: 1.0625rem; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 20px 0; }
.facts div { background: var(--bg); padding: 12px 14px; }
.facts dt { font-size: .75rem; color: var(--muted); font-weight: 500; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: .9rem; }
.dlg-section { margin-top: 18px; }
.dlg-section h3 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.dlg-section ul { display: grid; gap: 6px; }
.dlg-section li { padding-left: 20px; position: relative; }
.dlg-section li::before { content: ''; position: absolute; left: 4px; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.dlg-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* Skeletons */
.skeleton, .skeleton-row { background: linear-gradient(90deg, var(--bg-soft), var(--surface), var(--bg-soft)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-color: var(--line); }
.skeleton-row { height: 64px; border-radius: 12px; margin: 4px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 1080px) {
  .visa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a { padding: 8px 9px; }
  .text-size { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .prepare-grid, .faq-layout { grid-template-columns: 1fr; gap: 32px; }
  .faq-side { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .notice-grid { grid-template-columns: 1fr; }
  .notice { min-height: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .menu-btn { display: inline-grid; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; margin: 0; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 1rem; }
  .text-size { display: inline-flex; }
}
@media (max-width: 560px) {
  .hero { padding-top: 36px; }
  .hero-facts { grid-template-columns: 1fr; }
  .steps, .visa-grid, .help-grid { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .text-size { display: none; }
  .search { min-width: 0; width: 100%; }
  .port-tools { width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; justify-content: center; padding: 7px 6px; }
  .facts { grid-template-columns: 1fr; }
  .advisory { grid-template-columns: 1fr; padding: 22px; }
  .section { padding-top: 56px; }
  .lede { font-size: 1.0625rem; }
  .btn-lg { width: 100%; }
}

/* ---------- Apply page ---------- */
.apply-nav { display: flex; gap: 4px; margin-left: 8px; }
.apply-nav a { text-decoration: none; color: var(--ink-2); font-size: .9375rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.apply-nav a:hover { background: var(--bg-soft); }
.apply-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.apply-main { padding: 40px 0 96px; }
.apply-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.apply-head h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); letter-spacing: -0.03em; }
.apply-head .muted { margin-top: 8px; }
.apply-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }

.stepper { position: sticky; top: 96px; display: grid; gap: 4px; }
.stepper li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--muted); }
.stepper li strong { display: block; color: var(--ink-2); font-size: .9375rem; font-weight: 600; }
.stepper li small { display: block; font-size: .8125rem; }
.stepper .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .875rem; border: 1.5px solid var(--line-strong); background: var(--surface); }
.stepper li.current { background: var(--surface); box-shadow: var(--shadow); }
.stepper li.current .dot { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.stepper li.done { cursor: pointer; }
.stepper li.done .dot { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }

.apply-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.step { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; min-width: 0; }
.step legend { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.02em; padding: 0; margin-bottom: 18px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.label { font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.label em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 12px; width: 100%; min-height: 46px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.field .invalid { border-color: #c2410c; }
.hint { font-size: .8125rem; color: var(--muted); }
.err { font-size: .8125rem; color: #c2410c; font-weight: 500; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.visa-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.visa-option { position: relative; display: block; cursor: pointer; }
.visa-option input { position: absolute; opacity: 0; }
.visa-option > span { display: block; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; background: var(--bg); height: 100%; transition: border-color .15s ease, background .15s ease; }
.visa-option strong { display: block; font-size: .9375rem; }
.visa-option small { display: block; color: var(--muted); font-size: .8125rem; margin-top: 2px; line-height: 1.4; }
.visa-option input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.visa-option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.drop { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 6px 14px; align-items: center; border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 16px; cursor: pointer; background: var(--bg); }
.drop:hover { border-color: var(--brand); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop strong { display: block; }
.drop small { display: block; color: var(--muted); font-size: .8125rem; }
.drop-preview { grid-row: span 2; width: 56px; height: 68px; border-radius: 8px; background: var(--bg-soft) center/cover no-repeat; border: 1px solid var(--line); }
.drop-preview.pdf { display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--muted); }
.file-status { font-size: .8125rem; color: var(--muted); }
.file-status.good { color: var(--ok); font-weight: 500; }
.file-status.bad { color: #c2410c; font-weight: 500; }

.review { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0; }
.review div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.review div:last-child { border-bottom: 0; }
.review dt { color: var(--muted); font-size: .875rem; }
.review dd { margin: 0; font-weight: 500; word-break: break-word; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: 14px 16px; cursor: pointer; font-size: .9375rem; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }

.form-error { margin-top: 18px; color: #c2410c; font-weight: 500; }
.form-nav { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.form-nav #next-btn { margin-left: auto; padding: 11px 20px; }
.form-nav #back-btn { padding: 11px 16px; }
.btn-link { background: none; border: 0; color: var(--brand); padding: 11px 8px; }
.btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { opacity: .6; cursor: progress; }

.view.narrow { max-width: 560px; margin: 24px auto 0; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.result-card h1 { font-size: 1.875rem; letter-spacing: -0.025em; }
.result-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; }
.result-icon.ok { background: var(--ok-soft); color: var(--ok); }
.result-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem; font-weight: 700; letter-spacing: .06em; background: var(--bg-soft); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px 18px; text-align: center; user-select: all; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.lookup .field input { text-transform: none; }
.lookup input[name="reference"] { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.timeline { display: grid; gap: 0; margin: 8px 0; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 18px; color: var(--muted); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.timeline li.done { color: var(--ink); font-weight: 600; }
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.done:not(:last-child)::before { background: var(--ok); }
.timeline li.bad { color: #c2410c; font-weight: 600; }
.timeline li.bad .dot { background: #c2410c; border-color: #c2410c; }
.timeline small { display: block; font-weight: 400; color: var(--muted); font-size: .8125rem; }
.officer-note { background: var(--brand-soft); border-radius: 12px; padding: 14px 16px; }
.officer-note p { margin-top: 4px; color: var(--ink-2); }

@media (max-width: 900px) {
  .apply-grid { grid-template-columns: 1fr; }
  .stepper { position: static; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stepper li { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 8px 4px; }
  .stepper li small { display: none; }
  .stepper li strong { font-size: .75rem; }
  .apply-nav a { padding: 8px 8px; font-size: .875rem; }
}
@media (max-width: 640px) {
  .apply-nav { display: none; }
  .apply-card, .result-card { padding: 20px; }
  .row, .visa-options { grid-template-columns: 1fr; }
  .review div { grid-template-columns: 1fr; gap: 2px; }
  .form-nav { flex-wrap: wrap; }
  .form-nav #next-btn { width: 100%; order: -1; margin-left: 0; }
  .ref { font-size: 1.2rem; }
}
