/* ═══════════════════════════════════════════════════════════
   AMPP — public applicant portal styles [public builder]
   Design tokens come from tokens.css (do not redefine).
═══════════════════════════════════════════════════════════ */

/* ── shell ─────────────────────────────────────────────── */
.announce-bar {
  background: var(--navy);
  color: #cfd9e8;
  font-size: .85rem;
  text-align: center;
  padding: .45rem 1rem;
}
.announce-bar p { margin: 0; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: .6rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  min-width: 0;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex: none;
}
.brand-name { font-size: 1rem; line-height: 1.3; }
.nav-links {
  display: flex;
  gap: 1rem;
  margin-inline-start: auto;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--ink-mid);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  padding: .35rem .25rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.lang-switch {
  display: flex;
  gap: .2rem;
  background: var(--accent-pale);
  border-radius: 999px;
  padding: .2rem;
}
.lang-switch a {
  text-decoration: none;
  color: var(--ink-mid);
  font-size: .85rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 999px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.lang-switch a.active { background: var(--navy); color: var(--white); }
.lang-switch a:hover:not(.active) { background: var(--white); }

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  min-height: 60vh;
}

.footer {
  background: var(--navy);
  color: #b9c6d8;
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1rem;
}
.footer-title { color: var(--white); font-weight: 700; margin-bottom: .35rem; }
.footer-small { font-size: .8rem; margin-top: .75rem; opacity: .8; }

/* ── hero + home ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-lt) 100%);
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}
.hero-inner { padding: 3rem 2rem; max-width: 720px; }
.hero h1 { font-size: 1.9rem; line-height: 1.35; margin-bottom: .6rem; }
.hero-sub { color: #d4deec; font-size: 1.05rem; }

.section { margin-bottom: 2.5rem; }
.section-title { color: var(--navy); font-size: 1.35rem; margin-bottom: .3rem; }
.section-sub { color: var(--ink-mid); margin-bottom: 1.2rem; }

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}
.mission-card {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.mission-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.mission-card.selected { border-color: var(--gold); }
.mission-code {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-pale);
  border-radius: 6px;
  padding: .1rem .5rem;
  align-self: flex-start;
  direction: ltr;
}
.mission-name { font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.mission-city { color: var(--ink-mid); font-size: .9rem; }
.mission-cta { margin-top: .6rem; color: var(--accent); font-weight: 600; font-size: .9rem; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.how-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  margin-bottom: .6rem;
}
.how-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: .3rem; }
.how-card p { font-size: .9rem; color: var(--ink-mid); }
.home-links { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── cards ─────────────────────────────────────────────── */
.wizard-card, .narrow-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}
.narrow-card { max-width: 640px; margin: 0 auto; }
@media (max-width: 640px) {
  .wizard-card, .narrow-card { padding: 1.25rem; }
}

/* ── step progress ─────────────────────────────────────── */
.wizard-head { margin-bottom: 1.75rem; }
.wizard-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--ink-mid);
  margin-bottom: 1rem;
}
.wizard-mission { font-weight: 600; color: var(--navy); }
.wizard-ref { font-weight: 600; letter-spacing: .04em; }

.steps {
  list-style: none;
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  padding-bottom: .25rem;
}
.step {
  flex: 1;
  min-width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  position: relative;
}
.step::before {
  content: '';
  position: absolute;
  top: 19px;
  inset-inline-start: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step:first-child::before { display: none; }
.step.done::before, .step.current::before { background: var(--accent); }
.step-circle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--ink-mid);
  font-weight: 700;
  text-decoration: none;
}
.step.done .step-circle { background: var(--accent); border-color: var(--accent); color: var(--white); }
.step.current .step-circle { border-color: var(--navy); background: var(--navy); color: var(--white); box-shadow: 0 0 0 4px var(--accent-pale); }
.step-label {
  font-size: .72rem;
  text-align: center;
  color: var(--ink-mid);
  line-height: 1.3;
}
.step.current .step-label { color: var(--navy); font-weight: 600; }

/* ── forms ─────────────────────────────────────────────── */
.step-title { color: var(--navy); font-size: 1.45rem; margin-bottom: .3rem; }
.step-sub { color: var(--ink-mid); margin-bottom: 1.5rem; }
.form-section-title {
  color: var(--navy);
  font-size: 1.05rem;
  margin: 1.75rem 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--accent-pale);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem 1.25rem;
}
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field legend {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
.field fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="file"], select, textarea {
  min-height: 44px;
  padding: .5rem .8rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: var(--white);
  width: 100%;
}
textarea { resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--accent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid var(--accent-pale); outline-offset: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error {
  color: var(--danger);
  font-size: .82rem;
  margin: 0;
}
.hint { color: var(--ink-mid); font-size: .82rem; margin: 0; }
.muted { color: var(--ink-mid); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.is-hidden { display: none !important; }

.dob-pair { border: 0; padding: 0; margin: 0 0 1rem; }
.dob-pair legend { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.dob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem;
  margin-top: .4rem;
}
.dob-grid label { font-size: .8rem; font-weight: 500; color: var(--ink-mid); display: block; margin-bottom: .2rem; }

.radio-row, .check-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.radio-pill, .check-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: .45rem .9rem;
  min-height: 44px;
  cursor: pointer;
  background: var(--white);
  font-size: .92rem;
}
.radio-pill:hover, .check-pill:hover { border-color: var(--accent); }
.radio-pill input, .check-pill input { width: 18px; height: 18px; min-height: 0; accent-color: var(--accent); }
.radio-pill:has(input:checked), .check-pill:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-pale);
  font-weight: 600;
}
.check-line {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  cursor: pointer;
  padding: .4rem 0;
}
.check-line input { width: 20px; height: 20px; min-height: 0; margin-top: .2rem; flex: none; accent-color: var(--accent); }

/* ── buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--accent); }
.btn-outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--accent-pale); border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink-mid); }
.btn-ghost:hover { background: var(--accent-pale); color: var(--navy); }
.btn-lg { font-size: 1.05rem; padding: .7rem 2rem; }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }

.wizard-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.wizard-actions .btn-primary { margin-inline-start: auto; }
.autosave-note { font-size: .8rem; color: var(--ink-mid); }

.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── notices, pills, badges ────────────────────────────── */
.notice {
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
}
.notice p { margin: 0 0 .3rem; }
.notice p:last-child { margin-bottom: 0; }
.notice-title { font-weight: 700; }
.notice-info { background: var(--info-pale); border-color: var(--info); }
.notice-ok { background: var(--ok-pale); border-color: var(--ok); }
.notice-warn { background: var(--warn-pale); border-color: var(--warn); }
.notice-danger { background: var(--danger-pale); border-color: var(--danger); }

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  padding: .15rem .6rem;
}
.pill-ok { background: var(--ok-pale); color: var(--ok); }
.pill-warn { background: var(--warn-pale); color: var(--warn); }
.badge {
  font-size: .72rem;
  font-weight: 700;
  border-radius: 6px;
  padding: .12rem .5rem;
}
.badge-required { background: var(--danger-pale); color: var(--danger); }
.badge-optional { background: var(--accent-pale); color: var(--accent); }
.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .3rem .9rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--badge-color, var(--ink));
  background: color-mix(in srgb, var(--badge-color, #64748b) 14%, white);
  border: 1px solid color-mix(in srgb, var(--badge-color, #64748b) 40%, white);
}

.empty-state {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--ink-mid);
}

/* ── previous passports rows ───────────────────────────── */
.pp-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  align-items: end;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: .75rem;
}
.pp-row .field label { font-size: .8rem; }
.pp-remove { min-height: 44px; color: var(--danger); }
.pp-remove:hover { background: var(--danger-pale); color: var(--danger); }

/* ── photo / signature / documents ─────────────────────── */
.media-section { margin-bottom: 1.5rem; }
.photo-flex { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.photo-current { display: flex; flex-direction: column; align-items: center; gap: .6rem; flex: none; }
.photo-thumb {
  width: 140px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--bg);
}
.photo-placeholder {
  width: 140px; height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink-mid);
  background: var(--cream);
  font-weight: 600;
  direction: ltr;
}
.photo-tools { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: .9rem; }

.crop-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-top: .5rem;
  touch-action: none;
  direction: ltr;
}
#photo-canvas {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
}
#crop-box {
  position: absolute;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 9999px rgba(15,36,65,.45);
  cursor: move;
  border-radius: 2px;
}
.crop-handle {
  position: absolute;
  width: 18px; height: 18px;
  background: var(--gold);
  border: 2px solid var(--white);
  border-radius: 50%;
  right: -10px;
  bottom: -10px;
  cursor: nwse-resize;
}
.assist-box {
  background: var(--warn-pale);
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .88rem;
}
.assist-title { font-weight: 700; margin-bottom: .3rem; }
.assist-box ul { margin: 0; padding-inline-start: 1.2rem; }

.sig-thumb, .sig-placeholder {
  width: 220px;
  height: 80px;
  object-fit: contain;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
}
.sig-placeholder { border-style: dashed; background: var(--cream); }
#sig-canvas {
  width: 100%;
  max-width: 600px;
  height: auto;
  aspect-ratio: 3 / 1;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  touch-action: none;
  cursor: crosshair;
  direction: ltr;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.doc-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.doc-card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.doc-label { font-weight: 600; color: var(--navy); }
.doc-uploaded { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.doc-uploaded li { display: flex; gap: .5rem; align-items: center; font-size: .85rem; }
.doc-filename { overflow-wrap: anywhere; }
.doc-status { font-size: .82rem; color: var(--ink-mid); min-height: 1em; }
.doc-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.doc-list li { display: flex; gap: .75rem; flex-wrap: wrap; font-size: .9rem; }

/* ── categories (step 6) ───────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.category-card { display: block; cursor: pointer; }
.category-card input { position: absolute; opacity: 0; }
.category-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  height: 100%;
}
.category-card:hover .category-body { border-color: var(--accent); }
.category-card input:checked + .category-body {
  border-color: var(--navy);
  background: var(--accent-pale);
  box-shadow: var(--shadow-sm);
}
.category-card input:focus-visible + .category-body { outline: 3px solid var(--accent); outline-offset: 2px; }
.category-name { font-weight: 700; color: var(--navy); }
.category-validity { color: var(--ink-mid); font-size: .85rem; }
.category-fee { font-weight: 700; color: var(--accent); font-size: 1.1rem; margin-top: .3rem; direction: ltr; }

.declaration-box {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--cream);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

/* ── summary ───────────────────────────────────────────── */
.summary { display: flex; flex-direction: column; gap: 1.5rem; }
.summary-section h3 {
  color: var(--navy);
  font-size: .98rem;
  margin-bottom: .6rem;
}
.summary-grid, .lookup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .4rem .9rem;
  margin: 0;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px dashed var(--border);
  padding: .35rem 0;
  font-size: .9rem;
}
.summary-row dt { color: var(--ink-mid); flex: none; max-width: 55%; }
.summary-row dd { margin: 0; font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.media-summary { display: flex; gap: 2rem; flex-wrap: wrap; margin-bottom: .75rem; }
.media-item { display: flex; align-items: center; gap: .6rem; }
.media-label { font-size: .9rem; color: var(--ink-mid); }
.media-thumb {
  width: 60px; height: 77px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.table-wrap { overflow-x: auto; }
.mini-table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.mini-table th, .mini-table td {
  border: 1px solid var(--border);
  padding: .45rem .7rem;
  text-align: start;
}
.mini-table th { background: var(--accent-pale); color: var(--navy); }

/* ── done page ─────────────────────────────────────────── */
.done-card { max-width: 760px; margin: 0 auto; text-align: center; }
.done-check {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--ok-pale);
  color: var(--ok);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ok);
}
.reference-box {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.reference-label { font-size: .85rem; color: #b9c6d8; }
.reference-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}
.token-box { text-align: start; }
.token-title { font-weight: 700; }
.token-value {
  display: block;
  background: var(--white);
  border: 1px dashed var(--warn);
  border-radius: var(--radius-sm);
  padding: .6rem .8rem;
  margin: .6rem 0;
  font-size: .9rem;
  overflow-wrap: anywhere;
  user-select: all;
}
.done-actions { justify-content: center; }
.next-steps {
  text-align: start;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.next-steps h2 { color: var(--navy); font-size: 1.05rem; margin-bottom: .6rem; }
.next-list { padding-inline-start: 1.3rem; display: flex; flex-direction: column; gap: .4rem; }
.mission-address { margin-top: .9rem; font-size: .9rem; color: var(--ink-mid); }

/* ── dedup interstitial ────────────────────────────────── */
.dedup-card { max-width: 820px; margin: 0 auto; }
.dedup-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--warn-pale);
  color: var(--warn);
  border: 2px solid var(--warn);
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.dedup-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.dedup-option {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.dedup-option h2 { font-size: 1rem; color: var(--navy); }
.dedup-option p { font-size: .88rem; color: var(--ink-mid); flex: 1; }
.dedup-note { margin-top: .5rem; }

/* ── status / timeline ─────────────────────────────────── */
.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.status-head .reference-value { color: var(--navy); font-size: 1.15rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .55rem 0;
  position: relative;
}
.timeline-item + .timeline-item { border-top: 1px dashed var(--border); }
.timeline-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--badge-color, var(--accent));
  flex: none;
}
.timeline-label { font-weight: 600; }
.timeline-date { margin-inline-start: auto; color: var(--ink-mid); font-size: .85rem; }

.lookup-card { text-align: start; }
.alt-link { margin-top: 1.25rem; font-size: .9rem; color: var(--ink-mid); }
.or-divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.1rem 0;
  color: var(--ink-mid);
  font-size: .85rem;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── toasts ────────────────────────────────────────────── */
.toast-region {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 200;
  max-width: min(360px, calc(100vw - 2rem));
}
.toast {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: .75rem 1.1rem;
  box-shadow: var(--shadow-md);
  font-size: .92rem;
  animation: toast-in .25s ease-out;
}
.toast-ok { border-inline-start: 4px solid var(--ok); }
.toast-error { border-inline-start: 4px solid var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── print ─────────────────────────────────────────────── */
@media print {
  .announce-bar, .navbar, .footer, .toast-region,
  .wizard-actions, .btn, .lang-switch { display: none !important; }
  .page { max-width: none; padding: 0; }
  .wizard-card, .narrow-card { box-shadow: none; border: 0; padding: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   APPENDED COMPONENTS (contract §24.7 / §24.9)
   autosave indicator states · reference banner · country combobox
═══════════════════════════════════════════════════════════════ */

/* §24.7 autosave indicator */
.autosave-note.is-saved { color: var(--ok); }
.autosave-note.is-failed { color: var(--warn); font-weight: 600; }

/* §24.7 reference banner (rendered by the public layout on wizard pages) */
.reference-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .9rem;
  max-width: 960px;
  margin: 1rem auto 0;
  padding: .6rem 1rem;
  background: var(--warn-pale);
  border: 1px solid var(--warn);
  border-radius: var(--radius-sm);
  font-size: .88rem;
}
.reference-banner-text { margin: 0; color: var(--ink); }
.reference-banner-ref {
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--navy);
  background: var(--white);
  border: 1px dashed var(--warn);
  border-radius: var(--radius-sm);
  padding: .1rem .55rem;
}
.reference-banner .btn-sm {
  padding: .3rem .8rem;
  font-size: .8rem;
  margin-inline-start: auto;
}
@media print {
  .reference-banner { display: none !important; }
}

/* §24.9 country autocomplete (progressive enhancement over <select>) */
.countryselect { position: relative; }
.countryselect-native { display: none !important; }
.countryselect-list {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 80;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: .3rem;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.countryselect-list [role="option"] {
  padding: .45rem .65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.countryselect-list [role="option"]:hover,
.countryselect-list [role="option"].is-active {
  background: var(--accent-pale);
  color: var(--accent);
}
.countryselect-list [role="option"][aria-selected="true"] {
  font-weight: 600;
}
.countryselect-empty {
  padding: .45rem .65rem;
  color: var(--ink-mid);
}

/* ── step 5 media pipeline (2026-08 production fixes; appended) ── */
.req-star { color: var(--danger); font-weight: 700; }
.crop-viewport { display: inline-block; direction: ltr; margin-top: .5rem; }
.crop-viewport canvas {
  display: block;
  max-width: 100%;
  border: 2px solid var(--gold);
  border-radius: var(--radius-sm);
  touch-action: none;
  cursor: grab;
  background: var(--white);
}
.crop-viewport canvas.is-dragging { cursor: grabbing; }
.zoom-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  direction: ltr;
  margin-top: .6rem;
  max-width: 420px;
}
.zoom-row input[type="range"] { flex: 1; min-width: 100px; direction: ltr; }
.btn-zoom { min-width: 2.4rem; padding: .35rem .6rem; font-weight: 700; line-height: 1; }
.photo-samples {
  flex: none;
  max-width: 300px;
  border: 1px solid var(--border);
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .88rem;
}
.photo-samples .assist-title { margin-bottom: .35rem; }
.photo-samples-imgs { display: flex; gap: .6rem; margin: .4rem 0 .6rem; }
.photo-samples-imgs img {
  width: 84px;
  height: 108px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
}
.photo-guide {
  margin: 0;
  padding-inline-start: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.sig-status-msg { font-size: .85rem; color: var(--danger); min-height: 1.1em; }


/* ── dual-calendar date picker ─────────────────────────────── */
.ampp-dp {
  position: absolute; z-index: 60; margin-top: 6px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 10px; width: 280px;
}
.field { position: relative; }
.ampp-dp-head { display: flex; gap: 8px; margin-bottom: 8px; }
.ampp-dp-head select { flex: 1; min-height: 38px; }
.ampp-dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; direction: ltr; }
.ampp-dp-day {
  border: 1px solid var(--border); background: var(--cream);
  border-radius: 6px; min-height: 32px; cursor: pointer; font: inherit;
}
.ampp-dp-day:hover { background: var(--accent-pale); border-color: var(--accent); }
.ampp-dp-day.is-selected { background: var(--navy); color: var(--white); border-color: var(--navy); }

.photo-guide-link { display: block; }
.photo-guide-img { max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); }
