/* ==========================================================================
   Snapaclick — core design system
   Tokens · base · layout · components. Shared by every page.
   Brand: deep navy for trust, azure blue for action, teal for "verified /
   selected" states, a small warm-orange highlight. Cool, bright neutrals.
   ========================================================================== */

@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2?v=0b6e24a233) format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/inter-latin-wght-normal.woff2?v=0b6e24a233) format('woff2'); }
/* Metric-matched fallbacks (Arial scaled to each web font's average glyph width, ascent and descent,
   measured from the woff2 files), so the swap to the web font does not reflow headings. */
@font-face { font-family: 'Inter Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 100 550; size-adjust: 107.5%; ascent-override: 90.1%; descent-override: 22.4%; line-gap-override: 0%; }
@font-face { font-family: 'Inter Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 551 900; size-adjust: 107.5%; ascent-override: 90.1%; descent-override: 22.4%; line-gap-override: 0%; }
@font-face { font-family: 'Jakarta Fallback'; src: local('Arial'), local('ArialMT'); font-weight: 100 550; size-adjust: 106%; ascent-override: 97.9%; descent-override: 20.9%; line-gap-override: 0%; }
@font-face { font-family: 'Jakarta Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 551 900; size-adjust: 106%; ascent-override: 97.9%; descent-override: 20.9%; line-gap-override: 0%; }

:root {
  --ink: #0A1F3D; --ink-2: #12305A; --ink-3: #1D4580; --ink-4: #2E5C9E;
  --brand: #1565D8; --brand-hover: #0E50B4; --brand-50: #EAF2FD; --brand-100: #CFE1FA;
  --accent: #0EA5A0; --accent-2: #14B8B0; --accent-3: #2DD4BF; --accent-ink: #0A7C78; --accent-50: #E7F8F6; --accent-100: #C3EFEA;
  --warm: #FF7A45; --warm-ink: #B4461A; --warm-50: #FFF1EA;
  --grad: linear-gradient(120deg, #1565D8 0%, #0EA5A0 100%);
  --paper: #F5F8FC; --surface: #FFFFFF; --surface-2: #F1F5FA; --surface-3: #E6EDF6;
  --line: #E1E8F1; --line-2: #CAD5E2; --line-3: #A7B4C6;
  /* --text-3 is ≥ 4.5:1 (WCAG AA) on white, --paper, --surface-2 and --surface-3. */
  --text: #0A1F3D; --text-2: #45566F; --text-3: #5B6B82; --text-inv: #FFFFFF; --placeholder: #6B7280;
  --success: #12804A; --success-bg: #E9F9F0; --success-line: #B3E6C8;
  --warning: #A4500A; --warning-bg: #FFF6EA; --warning-line: #F6D6A2;
  --danger: #C0262D; --danger-hover: #9E1F25; --danger-bg: #FEF1F1; --danger-line: #F7C5C6;
  --info: #1565D8; --info-bg: #EEF5FE; --info-line: #C6DBF9;
  --focus: #1565D8; --focus-inv: #FFFFFF;

  --font: 'Inter', 'Inter Fallback', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Jakarta Fallback', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

  --r-xs: 6px; --r-sm: 9px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(10, 31, 61, .06), 0 1px 1px rgba(10, 31, 61, .03);
  --sh-2: 0 8px 22px -8px rgba(10, 31, 61, .16), 0 2px 4px rgba(10, 31, 61, .04);
  --sh-3: 0 30px 60px -18px rgba(10, 31, 61, .28), 0 6px 14px -6px rgba(10, 31, 61, .08);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 120ms; --t: 200ms; --t-slow: 360ms;
  /* viewport-fit=cover: side padding never lets content slide under a landscape notch / Dynamic Island. */
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --container: 1160px; --gutter: max(clamp(16px, 4vw, 32px), var(--safe-l), var(--safe-r));
  --header-h: 68px;
  /* Light-only UI: opt out of forced/auto darkening, which would falsify the official background-colour previews. */
  color-scheme: only light;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--safe-t) + 16px); }
body { font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
img, svg, video, canvas { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--ink-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; color: var(--text); font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; } /* zero specificity: component padding always wins */
[hidden] { display: none !important; }
::selection { background: var(--accent-100); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* The brand-blue ring is only ~3:1 on the navy bands; use white there. */
:where(.site-footer, .section-dark, .cta-band, .toast, .badge-dark) :focus-visible { outline-color: var(--focus-inv); }
[tabindex="-1"]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  /* Transitions get 0s, not a tiny duration: any running transition (the default property is `all`) holds
     `visibility` at its old value for a frame, so focusing into a panel that was just shown would fail. */
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
}

/* ── Typography ────────────────────────────────────────────────────────── */
.display { font-family: var(--font-display); font-weight: 800; font-size: clamp(38px, 5.6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; }
/* Highlighted words: brand gradient text (solid fallback for forced-colours / old browsers). */
.display em, .display-sm em, .h1 em, .h2 em { font-style: normal; color: var(--brand); background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
@media (forced-colors: active) { .display em, .display-sm em, .h1 em, .h2 em { -webkit-text-fill-color: currentColor; background: none; } }
.display-sm { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.8vw, 42px); line-height: 1.1; letter-spacing: -0.03em; }
.h1 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; font-weight: 800; }
.h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.03em; }
.h3 { font-size: 20px; letter-spacing: -0.015em; }
.h4 { font-size: 16px; letter-spacing: -0.01em; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); line-height: 1.6; max-width: 60ch; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); font-size: 14px; }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.tabular { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 650; }

/* ── Layout ────────────────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: 720px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.stack-sm { --stack: 8px; } .stack-lg { --stack: 28px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.between { justify-content: space-between; }
.grid { display: grid; gap: var(--gap, 20px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
main { flex: 1 0 auto; }
.section { padding-block: clamp(56px, 9vw, 112px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; transition: top var(--t); }
.skip-link:focus { top: 12px; color: #fff; }

/* ── Icons ─────────────────────────────────────────────────────────────── */
.icon { display: inline-block; width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn { --bh: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--bh); padding: 0 20px; border-radius: var(--r-pill); font-weight: 600; font-size: 15px; letter-spacing: -0.005em; line-height: 1; text-decoration: none; white-space: nowrap; border: 1px solid transparent; transition: background var(--t-fast) var(--ease), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t), transform var(--t-fast); user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 8px 20px -10px rgba(21, 101, 216, .75); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); color: #fff; }
.btn-accent { background: linear-gradient(120deg, #1259C4, #097F7B); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 10px 24px -12px rgba(14, 165, 160, .8); }
.btn-accent:hover:not(:disabled) { background: linear-gradient(120deg, #0E4FB0, #08706C); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-2); box-shadow: var(--sh-1); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-4); color: var(--ink); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { --bh: 36px; padding: 0 14px; font-size: 14px; }
.btn-xs { --bh: 30px; padding: 0 11px; font-size: 13px; }
.btn-lg { --bh: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
/* A full-width button may hold a long label ("Create my Surrender / Renunciation Certificate photo"): wrap it rather than widen the page. */
.btn-block { white-space: normal; text-wrap: balance; text-align: center; line-height: 1.25; padding-block: 10px; }
.btn-icon { width: var(--bh); padding: 0; }
.btn .spinner { --s: 16px; }
/* Fingers need 44 px; compact sizes stay compact for mouse users. */
@media (pointer: coarse) { .btn-sm, .btn-xs { --bh: 44px; } }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.field { display: grid; gap: 6px; }
.field + .field { margin-top: 16px; }
.grid > .field + .field, .cluster > .field + .field { margin-top: 0; }
.label { font-size: 14px; font-weight: 600; color: var(--text); }
.label .req { color: var(--danger); margin-left: 2px; }
.hint { font-size: 13px; color: var(--text-3); }
.error-text { font-size: 13px; color: var(--danger); font-weight: 500; display: flex; gap: 6px; align-items: center; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 16px; color: var(--text); transition: border-color var(--t-fast), box-shadow var(--t-fast); -webkit-appearance: none; appearance: none; }
.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(21, 101, 216, .14); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"], .check input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(192, 38, 45, .12); }
[role="radiogroup"][aria-invalid="true"] .option { border-color: var(--danger); }
.select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234A5468' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.select:disabled, .input:disabled { background-color: var(--surface-2); color: var(--text-3); cursor: not-allowed; }
.input-code { text-transform: uppercase; letter-spacing: .03em; } /* codes and references; the value itself is upper-cased on blur */
.textarea { min-height: 96px; resize: vertical; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; line-height: 1.45; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); display: grid; place-items: center; transition: background var(--t-fast), border-color var(--t-fast); }
.check input::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background var(--t); flex: none; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--t) var(--ease); }
.switch input:checked { background: var(--success); }
.switch input:checked::after { transform: translateX(16px); }
.segmented { display: inline-flex; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); gap: 2px; border: 1px solid var(--line); }
.segmented button { padding: 7px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--text-2); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: var(--sh-1); }

/* Selectable option cards (packages, add-ons) */
.option { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; transition: border-color var(--t-fast), box-shadow var(--t), background var(--t-fast); }
.option:hover { border-color: var(--line-2); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; margin-top: 1px; transition: background-color var(--t-fast), border-color var(--t-fast); }
.option.is-checkbox .tick { border-radius: 7px; }
.option .tick svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; opacity: 0; }
.option:has(input:checked) { border-color: var(--accent); background: linear-gradient(0deg, rgba(14, 165, 160, .05), rgba(14, 165, 160, .05)), var(--surface); box-shadow: 0 0 0 3px rgba(14, 165, 160, .14); }
.option:has(input:checked) .tick { background: var(--accent); border-color: var(--accent); }
.option:has(input:checked) .tick svg { opacity: 1; }
.option:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.option:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.option-title { font-weight: 650; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.option-desc { font-size: 14px; color: var(--text-2); margin-top: 2px; line-height: 1.45; }
.option-price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Surfaces ──────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-1); }
.card-pad { padding: clamp(20px, 3vw, 32px); }
.card-head { padding: 22px clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.card-body { padding: clamp(20px, 3vw, 32px); }
.card-foot { padding: 18px clamp(20px, 3vw, 32px); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.divider { height: 1px; background: var(--line); border: 0; margin-block: 20px; }

/* ── Badges, chips, callouts ───────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 650; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.badge-neutral { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.badge-green { background: var(--success-bg); color: var(--success); border-color: var(--success-line); }
.badge-amber { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-line); }
.badge-red { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-blue { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge-accent { background: var(--accent-50); color: var(--accent-ink); border-color: var(--accent-100); }
.badge-dark { background: var(--ink); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 550; color: var(--text-2); text-decoration: none; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); border: 1px solid; font-size: 14.5px; line-height: 1.5; }
.callout > .icon { margin-top: 2px; }
.callout ul { padding-left: 18px; }
.callout-info { background: var(--info-bg); border-color: var(--info-line); color: #1E3A8A; }
.callout-success { background: var(--success-bg); border-color: var(--success-line); color: #14532D; }
.callout-warning { background: var(--warning-bg); border-color: var(--warning-line); color: #7C2D12; }
.callout-danger { background: var(--danger-bg); border-color: var(--danger-line); color: #7F1D1D; }
.callout-neutral { background: var(--surface-2); border-color: var(--line); color: var(--text-2); }
.callout strong { color: inherit; }

/* ── Feedback ──────────────────────────────────────────────────────────── */
.spinner { --s: 20px; width: var(--s); height: var(--s); border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.progress { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width var(--t-slow) var(--ease); }

.toast-region { position: fixed; z-index: 2000; left: 50%; bottom: max(20px, var(--safe-b)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 8px 13px 16px; border-radius: var(--r); background: var(--ink); color: #fff; box-shadow: var(--sh-3); font-size: 14.5px; pointer-events: auto; animation: toast-in var(--t-slow) var(--ease); transition: opacity .3s, transform .3s var(--ease); }
.toast.is-error { background: #7F1D1D; }
.toast.is-alert { background: #991B1B; box-shadow: var(--sh-3), 0 0 0 2px #FCA5A5; }
.toast.is-success { background: #14532D; }
.toast-action { flex: none; align-self: center; padding: 6px 10px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .16); color: #fff; font-weight: 650; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.toast-action:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); pointer-events: none; }
.toast .icon { margin-top: 2px; }
.toast-msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -6px 0 -6px 4px; border-radius: var(--r-sm); color: rgba(255, 255, 255, .8); }
.toast-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.toast-close .icon { margin: 0; }
@media (pointer: coarse) { .toast-close { width: 44px; height: 44px; margin-block: -12px; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }

/* Dialogs (native <dialog>) */
.dialog { border: 0; padding: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--text); box-shadow: var(--sh-3); width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain; }
/* `* { margin: 0 }` above removes the browser's own margin: auto that centres a modal dialog. */
.dialog:modal { margin: auto; }
.dialog[aria-busy="true"] .dialog-body { opacity: .7; pointer-events: none; transition: opacity var(--t); }
.dialog::backdrop { background: rgba(8, 15, 27, .62); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialog-in var(--t-slow) var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.dialog-body { padding: 16px 24px 8px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; flex-wrap: wrap; }
.dialog-wide { width: min(880px, calc(100vw - 24px)); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
/* Sticky headers need the wrapper to scroll vertically too; phones keep the page as the only vertical scroller. */
@media (min-width: 641px) and (min-height: 600px) { .table-wrap { overflow: auto; max-height: min(75vh, 760px); } }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 650; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color var(--t-fast); }
.table tbody tr.is-clickable { cursor: pointer; }
.table tbody tr.is-clickable:hover, .table tbody tr.is-clickable:focus-visible { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Definition lists */
.dl { display: grid; gap: 0; }
.dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.dl > div:last-child { border-bottom: 0; }
.dl dt { color: var(--text-2); }
.dl dd { font-weight: 600; text-align: right; }

/* Swatch */
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-2); vertical-align: -2px; }

/* ── Site header / footer ──────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 100; height: calc(var(--header-h) + var(--safe-t)); padding-top: var(--safe-t); background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--t), box-shadow var(--t); }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(11, 22, 38, .4); }
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; font: 800 20px/1 var(--font-display); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 14px -6px rgba(21, 101, 216, .7); position: relative; overflow: hidden; }
.brand-mark::after { content: ''; position: absolute; width: 7px; height: 7px; right: 6px; top: 6px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.brand-name b { font-weight: 800; color: var(--brand); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 550; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--brand); background: var(--brand-50); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.menu-btn .i-close, .menu-btn[aria-expanded="true"] .i-menu { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline-block; }
@media (pointer: coarse) { .nav a { display: inline-flex; align-items: center; min-height: 44px; } }
@media (max-width: 1040px) {
  /* Dropdown under the sticky header; scrolls on its own on short landscape screens. */
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px var(--gutter) 20px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--sh-2);
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h) - var(--safe-t)); overflow-y: auto; overscroll-behavior: contain; }
  .nav.is-open { display: flex; animation: nav-in var(--t) var(--ease); }
  .nav a { display: flex; align-items: center; min-height: 48px; padding: 10px 14px; font-size: 16px; }
  .menu-btn { display: inline-flex; }
  .header-actions .hide-sm { display: none; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } }
@media (max-width: 480px) {
  /* The brand gives way (ellipsis) before the header can ever push the page sideways. */
  .site-header .container { gap: 8px; }
  .site-header .brand { min-width: 0; gap: 8px; }
  .site-header .brand-mark { flex: none; }
  .site-header .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
  .header-actions { gap: 4px; flex: none; }
  .header-actions .btn-primary { padding-inline: 12px; }
  .header-actions .btn-primary .icon { display: none; }
}
@media (max-width: 360px) { .site-header .brand-name { display: none; } }

/* Sample passport portraits (assets/img/sample-*.svg, 300×460 with the head from y 64 to 275).
   --head and --top are fractions of the photo height (shared photoTargets), so the sample is framed
   exactly like a finished photo for that document. 460/211 = 2.18; 64/460 = 0.139. */
.spec-thumb img, .sample-photo img { position: absolute; left: 50%; transform: translateX(-50%); max-width: none; width: auto; height: calc(var(--head, .72) * 218%); top: calc(var(--top, .11) * 100% - var(--head, .72) * 218% * .139); }
.sample-photo { position: relative; overflow: hidden; aspect-ratio: var(--ar, 35 / 45); background: var(--bg, #fff); border-radius: 6px; box-shadow: 0 0 0 1px rgba(10, 31, 61, .1), 0 12px 26px -14px rgba(10, 31, 61, .45); }
.sample-photo .guide { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(14, 165, 160, .9); }
.sample-photo .guide.crown { top: calc(var(--top, .11) * 100%); }
.sample-photo .guide.chin { top: calc((var(--top, .11) + var(--head, .72)) * 100%); }

.site-footer { background: radial-gradient(90% 120% at 100% 0%, rgba(14, 165, 160, .22), transparent 55%), radial-gradient(70% 90% at 0% 100%, rgba(21, 101, 216, .28), transparent 60%), var(--ink); color: rgba(255, 255, 255, .72); padding-block: 56px 32px; margin-top: auto; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
/* .62 white keeps ≥ 4.5:1 even over the lighter gradient corners. */
.footer-grid h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .62); margin-bottom: 10px; font-weight: 650; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: 2px; font-size: 14.5px; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 32px; overflow-wrap: anywhere; }
@media (pointer: coarse) { .footer-grid li a { min-height: 44px; } }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-name b { color: #7CC4FF; }
.footer-legal { margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, .62); }
.trust-row { display: flex; gap: 10px 18px; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, .62); margin-top: 18px; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; } }

/* Retake page action row (order.css .step-nav plus a button group): wraps, then stacks full-width on phones.
   Doubled class: order.css loads after this file and must not win on equal specificity. */
.step-nav.retake-nav { flex-wrap: wrap; }
.retake-nav .nav-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-left: auto; }
@media (max-width: 600px) {
  .step-nav.retake-nav { flex-direction: column; align-items: stretch; text-align: center; }
  .retake-nav .nav-actions { flex-direction: column-reverse; margin-left: 0; }
  .step-nav.retake-nav .btn { width: 100%; min-width: 0; white-space: normal; }
}

/* Sandbox ribbon (development / demo only) */
.sandbox-bar { background: repeating-linear-gradient(-45deg, #FFF3CD, #FFF3CD 12px, #FFEDB5 12px, #FFEDB5 24px); color: #6B4E00; font-size: 13px; font-weight: 600; text-align: center; padding: 6px 12px; border-bottom: 1px solid #F1D98A; }
.sandbox-bar a { color: inherit; }
