/* =========================================================
   Client Project Discovery — styles
   1. Tokens  2. Base  3. Header  4. Backdrop  5. Components
   6. Step 1  7. Step 2  8. Fields  9. Review  10. Done
   11. Action bar  12. Responsive
   ========================================================= */

/* 1. Tokens ------------------------------------------------ */
:root {
  --navy: #0c2340;
  --navy-2: #13345c;
  --accent: #0b5cad;
  --accent-2: #2f80ed;
  --accent-ink: #08467f;
  --accent-soft: #eaf2fd;
  --accent-soft-2: #f3f8fe;

  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #0f1b2b;
  --ink-2: #364557;
  --muted: #66758a;
  --faint: #98a6b8;
  --line: #e3e8ef;
  --line-2: #d2dae4;

  --ok: #13795b;
  --ok-soft: #e7f5ef;
  --warn: #93590a;
  --warn-soft: #fdf4e3;
  --err: #b42318;
  --err-soft: #fdeceb;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow-xs: 0 1px 2px rgba(15, 27, 43, 0.05);
  --shadow: 0 1px 2px rgba(15, 27, 43, 0.04), 0 8px 24px -8px rgba(15, 27, 43, 0.08);
  --shadow-lg: 0 2px 4px rgba(15, 27, 43, 0.04), 0 24px 48px -16px rgba(15, 27, 43, 0.16);
  --focus: 0 0 0 4px rgba(47, 128, 237, 0.22);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --bar-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* 2. Base -------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: calc(var(--bar-h) + 32px + env(safe-area-inset-bottom));
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(47, 128, 237, 0.2); }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only {
  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: 16px; top: -60px; z-index: 50;
  background: #fff; color: var(--accent); padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }
.icon { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.main:focus, h1:focus { outline: none; box-shadow: none; }

/* Frosted look without backdrop-filter: blurring over the animated background on every
   frame is what made page changes stutter, so the panels use a near-opaque white instead. */
.glass {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(15, 27, 43, 0.04);
}

/* 3. Header ------------------------------------------------ */
.site-header { position: relative; z-index: 15; background: #fff; }
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.brand-logo { display: inline-flex; align-items: center; flex: none; height: 32px; }
.brand-logo img { height: 100%; width: auto; max-width: 168px; object-fit: contain; display: block; }
.brand-divider { width: 1px; height: 28px; background: var(--line); flex: none; }
.brand-text { min-width: 0; }
.brand-title { font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em; line-height: 1.3; color: var(--ink); }
.brand-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub:empty { display: none; }

.header-tools { display: flex; align-items: center; gap: 18px; flex: none; }
.save-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.save-status:not(:empty)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22a06b; box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.15); }
.lang-switch { display: inline-flex; padding: 3px; border-radius: 9px; background: #eef1f5; border: 1px solid var(--line); }
.lang-btn {
  border: 0; background: none; cursor: pointer; color: var(--muted);
  min-width: 40px; padding: 5px 10px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; transition: background 0.15s, color 0.15s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 27, 43, 0.14); }

.progress-band { border-bottom: 1px solid var(--line); background: rgba(250, 251, 253, 0.9); }
.stepper { list-style: none; margin: 0; padding: 16px 0; display: flex; align-items: center; }
.step { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--muted); }
.step:last-child { flex: none; }
.step:not(:last-child)::after {
  content: ""; flex: 1; height: 2px; min-width: 24px; margin: 0 20px;
  background: var(--line); border-radius: 2px; transition: background 0.4s var(--ease);
}
.step--complete:not(:last-child)::after { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.step-num {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: #fff;
  font-size: 13px; font-weight: 700; color: var(--muted); transition: all 0.25s var(--ease);
}
.step-num .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.step-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.step-kicker { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.step-label { font-size: 14px; font-weight: 600; white-space: nowrap; }
.step--current .step-num { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 0 0 5px rgba(12, 35, 64, 0.08); }
.step--current .step-label { color: var(--ink); }
.step--current .step-kicker { color: var(--accent); }
.step--complete .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step--complete .step-label { color: var(--ink-2); }

/* 4. Backdrop ---------------------------------------------- */
.stage { position: relative; isolation: isolate; }
.backdrop {
  position: absolute; inset: 0 0 auto 0; height: 640px; z-index: -1;
  overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #e8f1fc 0%, #f0f5fb 50%, var(--bg) 100%);
}
.blob { position: absolute; border-radius: 50%; opacity: 0.55; will-change: transform; transform: translateZ(0); }
.blob--1 {
  width: 560px; height: 560px; top: -240px; left: -140px;
  background: radial-gradient(circle at 40% 40%, rgba(90, 162, 240, 0.95), rgba(90, 162, 240, 0.35) 38%, rgba(90, 162, 240, 0) 70%);
  animation: drift-1 22s ease-in-out infinite alternate;
}
.blob--2 {
  width: 500px; height: 500px; top: -180px; right: -120px; opacity: 0.42;
  background: radial-gradient(circle, rgba(56, 195, 224, 0.9), rgba(56, 195, 224, 0.3) 38%, rgba(56, 195, 224, 0) 70%);
  animation: drift-2 26s ease-in-out infinite alternate;
}
.blob--3 {
  width: 420px; height: 420px; top: 60px; left: 42%; opacity: 0.22;
  background: radial-gradient(circle, rgba(123, 108, 246, 0.9), rgba(123, 108, 246, 0.3) 38%, rgba(123, 108, 246, 0) 70%);
  animation: drift-3 30s ease-in-out infinite alternate;
}
@keyframes drift-1 { to { transform: translate(180px, 90px) scale(1.12); } }
@keyframes drift-2 { to { transform: translate(-200px, 110px) scale(0.92); } }
@keyframes drift-3 { to { transform: translate(-140px, -60px) scale(1.18); } }
.backdrop-grid {
  position: absolute; inset: -22px 0 0 -22px; will-change: transform;
  background-image: radial-gradient(rgba(12, 35, 64, 0.15) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 80%);
          mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 80%);
  animation: grid-pan 40s linear infinite;
}
@keyframes grid-pan { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(22px, 22px, 0); } }
.backdrop-fade { position: absolute; inset: auto 0 0 0; height: 200px; background: linear-gradient(180deg, rgba(245, 247, 250, 0), var(--bg)); }
.backdrop-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.backdrop.has-video .blob { display: none; }

/* 5. Components -------------------------------------------- */
.main { padding-top: clamp(28px, 4vw, 56px); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- page transitions ---------- */
.section-nav { view-transition-name: section-nav; }
.section-card { view-transition-name: section-card; }
.site-header { view-transition-name: site-header; }
.action-bar { view-transition-name: action-bar; }
::view-transition-group(*) { animation-duration: 0.36s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.24s; }
/* Header and bottom bar swap instantly — cross-fading them made text ghost and let content show through */
::view-transition-old(action-bar), ::view-transition-old(site-header) { display: none; }
::view-transition-new(action-bar), ::view-transition-new(site-header) { animation: none; }
::view-transition-group(action-bar), ::view-transition-group(site-header) { animation: none; z-index: 2; }
::view-transition-old(section-card) { animation: vt-out-forward 0.14s ease-in both; }
::view-transition-new(section-card) { animation: vt-in-forward 0.34s var(--ease) 0.08s both; }
html[data-nav-dir="back"]::view-transition-old(section-card) { animation-name: vt-out-back; }
html[data-nav-dir="back"]::view-transition-new(section-card) { animation-name: vt-in-back; }
@keyframes vt-out-forward { to { opacity: 0; transform: translateX(-28px); } }
@keyframes vt-in-forward { from { opacity: 0; transform: translateX(36px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateX(28px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-36px); } }
/* Fallback for browsers without View Transitions */
.slide-in-forward { animation: vt-in-forward 0.34s var(--ease) both; }
.slide-in-back { animation: vt-in-back 0.34s var(--ease) both; }

.display {
  font-size: clamp(30px, 1.6vw + 22px, 46px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  margin: 14px 0 14px; color: var(--ink);
}
.display--sm { font-size: clamp(26px, 1.2vw + 20px, 36px); }
.lead { font-size: clamp(15px, 0.3vw + 14px, 17.5px); color: var(--ink-2); line-height: 1.65; max-width: 640px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.eyebrow-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(11, 92, 173, 0.15);
  color: var(--accent-ink); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; box-shadow: var(--shadow-xs);
}
.eyebrow-pill .icon { width: 15px; height: 15px; color: var(--accent); }

.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: clamp(36px, 5vw, 56px) 0 16px; }
.block-sub { margin-top: 4px; }
.block-title { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.block-title--center { text-align: center; margin: 44px 0 18px; }
.block-sub { color: var(--muted); font-size: 13.5px; }

.icon-tile {
  display: inline-grid; place-items: center; flex: none; border-radius: 11px;
  background: linear-gradient(145deg, #f2f7fe, #e3eefc); color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(11, 92, 173, 0.1);
}
.icon-tile--sm { width: 34px; height: 34px; border-radius: 9px; }
.icon-tile--sm .icon { width: 17px; height: 17px; }
.icon-tile--md { width: 42px; height: 42px; }
.icon-tile--md .icon { width: 21px; height: 21px; }
.icon-tile--lg { width: 52px; height: 52px; border-radius: 14px; }
.icon-tile--lg .icon { width: 25px; height: 25px; }

.count-chip {
  margin-left: auto; padding: 3px 9px; border-radius: 999px; background: #f1f4f8;
  color: var(--muted); font-size: 11.5px; font-weight: 600; white-space: nowrap;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border-radius: 10px;
  font-weight: 600; font-size: 14.5px; letter-spacing: -0.005em; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); box-shadow: var(--shadow-xs);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.2s, transform 0.08s;
}
.btn:hover { border-color: #b9c5d3; background: #fafbfc; }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 17px; height: 17px; transition: transform 0.2s var(--ease); }
.btn--primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(180deg, #1468bd, var(--accent));
  box-shadow: 0 1px 2px rgba(11, 92, 173, 0.3), 0 6px 16px -6px rgba(11, 92, 173, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn--primary:hover { background: linear-gradient(180deg, #0f5eae, #0a4f95); border-color: transparent; }
.btn--primary:hover .icon:last-child { transform: translateX(3px); }
.btn--ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--accent); padding: 0 12px; }
.btn--ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn--small { min-height: 36px; font-size: 13.5px; padding: 0 12px; }
.btn--large { min-height: 52px; padding: 0 26px; font-size: 15.5px; border-radius: 12px; }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.label-short { display: none; }

.banner {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; margin: 20px 0;
  border-radius: var(--r); background: var(--accent-soft); color: var(--accent-ink); font-size: 14px;
  border: 1px solid rgba(11, 92, 173, 0.12);
}
.banner p { flex: 1; }
.banner--warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(147, 89, 10, 0.15); }
.banner--error { background: var(--err-soft); color: var(--err); border-color: rgba(180, 35, 24, 0.15); }

.note {
  display: flex; gap: 14px; align-items: center; margin-top: 20px; padding: 16px 20px;
  background: rgba(255, 255, 255, 0.7); border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2); font-size: 14px;
}

.meter { height: 6px; background: #e8edf3; border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s var(--ease); }

/* 6. Step 1 — Preparation ---------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: 28px; }
.hero-hint { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13.5px; }

.journey { border-radius: var(--r-lg); padding: 22px 22px 18px; }
.journey-title { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.journey-list { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 4px; }
.journey-list::before { content: ""; position: absolute; left: 16px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--line-2), transparent); }
.journey-item { position: relative; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 0; border-radius: var(--r); }
.journey-item .icon-tile { background: #fff; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.journey-item.is-active .icon-tile { background: var(--navy); color: #fff; box-shadow: 0 4px 12px -4px rgba(12, 35, 64, 0.5); }
.journey-item-title { font-weight: 600; font-size: 14.5px; }
.journey-item-meta { color: var(--muted); font-size: 13px; }
.journey-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.journey-foot span { display: inline-flex; align-items: center; gap: 6px; }
.journey-foot .icon { width: 15px; height: 15px; }

.prep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.prep-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow); transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
}
.prep-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d5e2f1; }
.prep-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.prep-card h3 { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.check-item {
  position: relative; display: flex; gap: 11px; align-items: flex-start; cursor: pointer;
  margin: 0 -8px; padding: 6px 8px; border-radius: 8px;
  color: var(--ink-2); font-size: 14px; line-height: 1.5; transition: background 0.15s, color 0.15s;
}
.check-item:hover { background: #f5f8fc; }
.check-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
  display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 2px;
  border: 1.5px solid #b3c0cf; border-radius: 5px; background: #fff; color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.check-box .icon { width: 13px; height: 13px; stroke-width: 3; }
.check-item input:checked + .check-box { background: var(--ok); border-color: var(--ok); color: #fff; transform: scale(1.04); }
.check-item input:checked ~ .check-text { color: var(--muted); }
.check-item input:focus-visible + .check-box { box-shadow: var(--focus); }
.count-chip.is-complete { background: var(--ok-soft); color: var(--ok); }

.block-head-text { min-width: 0; }
.prep-tools { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px 12px; }
.prep-progress { display: flex; flex-direction: column; gap: 6px; min-width: 150px; margin-right: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.print-head { display: none; }

/* 7. Step 2 — Project information -------------------------- */
.info-layout { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.section-nav { position: sticky; top: 20px; border-radius: var(--r-lg); padding: 18px 12px 12px; min-width: 0; }
.nav-progress { padding: 0 8px 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.nav-progress-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.nav-progress-row strong { color: var(--ink); font-size: 15px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 9px 10px; border: 0; background: none; border-radius: 10px;
  color: var(--muted); font-size: 14px; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(12, 35, 64, 0.05); color: var(--ink); }
.nav-num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line-2); font-size: 11.5px; font-weight: 700; background: #fff; transition: all 0.2s;
}
.nav-num .icon { width: 13px; height: 13px; stroke-width: 2.6; }
.nav-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item.is-current { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line); }
.nav-item.is-current .nav-num { border-color: var(--navy); background: var(--navy); color: #fff; }
.nav-item.is-done .nav-num { border-color: var(--ok); background: var(--ok); color: #fff; }
.nav-item.is-attention .nav-num { border-color: #d68a1c; background: #fff7ea; color: #b26a00; }

.section-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(22px, 3.2vw, 44px); box-shadow: var(--shadow-lg);
}
.section-head { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: start; margin-bottom: 30px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.section-head-text { min-width: 0; }
.section-title { font-size: clamp(22px, 1vw + 16px, 28px); font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 6px; }
.section-desc { color: var(--ink-2); }
.req-legend { font-size: 12.5px; color: var(--muted); white-space: nowrap; padding-top: 2px; }
.req { color: var(--err); font-weight: 700; }

/* 8. Fields ------------------------------------------------ */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 22px; }
.field { grid-column: 1 / -1; min-width: 0; }
.field.is-revealing { animation: reveal 0.28s var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.field--half { grid-column: span 1; }
.field-label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 9px; padding: 0; color: var(--ink); letter-spacing: -0.005em; }
.field-help { color: var(--muted); font-size: 13px; margin: -5px 0 11px; }
.choice-group { border: 0; margin: 0; padding: 0; min-width: 0; }

.input {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--line-2); border-radius: 10px; background: #fcfdfe;
  box-shadow: inset 0 1px 2px rgba(15, 27, 43, 0.03);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input::placeholder { color: var(--faint); }
.input:hover { border-color: #b9c5d3; }
.input:focus { outline: none; border-color: var(--accent-2); background: #fff; box-shadow: var(--focus); }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.55; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
select.input { appearance: none; padding-right: 40px; cursor: pointer; }
.has-error .input { border-color: var(--err); background: #fffafa; }

/* Options sit in an even grid: 3 columns on desktop, 2 on tablet, 1–2 on phones */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.choices--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.choice { position: relative; display: flex; cursor: pointer; min-width: 0; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-text {
  display: flex; align-items: center; width: 100%; min-height: 48px; padding: 10px 14px 10px 42px;
  border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd;
  font-size: 14px; line-height: 1.35; color: var(--ink-2);
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.choice-mark {
  position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px;
  border: 1.5px solid #a9b6c6; background: #fff; z-index: 1; transition: all 0.15s;
}
.field--radio .choice-mark { border-radius: 50%; }
.field--checkbox .choice-mark { border-radius: 5px; }
.choice:hover .choice-text { border-color: #c3cfdc; color: var(--ink); background: #fff; }
.choice input:checked ~ .choice-text {
  border-color: var(--accent-2); background: var(--accent-soft-2); color: var(--accent-ink); font-weight: 500;
  box-shadow: 0 0 0 1px var(--accent-2), 0 4px 12px -6px rgba(11, 92, 173, 0.4);
}
.choice input:checked + .choice-mark { border-color: var(--accent); background: var(--accent); }
.field--radio .choice input:checked + .choice-mark { box-shadow: inset 0 0 0 3.5px #fff; }
.field--checkbox .choice input:checked + .choice-mark::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4.5px; height: 8.5px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.choice input:focus-visible ~ .choice-text { box-shadow: var(--focus); }
.has-error .choice-text { border-color: #eab0aa; }

.other-wrap { margin-top: 11px; max-width: 440px; animation: enter 0.2s ease-out; }
.url-list { display: grid; gap: 9px; margin-bottom: 8px; }
.url-row { position: relative; }
.url-row .input { padding-right: 44px; }
.url-remove {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: none; color: var(--faint); cursor: pointer;
}
.url-remove:hover { background: var(--err-soft); color: var(--err); }
.url-remove .icon { width: 16px; height: 16px; }
.url-add { margin-left: -10px; }
.field-error { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--err); font-size: 13px; font-weight: 500; }
.field-error .icon { width: 16px; height: 16px; }

/* 9. Review ------------------------------------------------ */
.review-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: end; margin-bottom: 8px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); border-radius: var(--r-lg); overflow: hidden; }
.stat { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat--ok strong { color: var(--ok); }
.stat--warn strong { color: var(--err); }

.review-grid { columns: 2 380px; column-gap: 18px; margin-top: 24px; }
.review-card {
  break-inside: avoid; margin: 0 0 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 22px 14px; box-shadow: var(--shadow);
}
.review-card.has-error { border-color: #f0b8b1; box-shadow: 0 0 0 4px var(--err-soft), var(--shadow); }
.review-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.review-head h2 { font-size: 15.5px; font-weight: 650; flex: 1; letter-spacing: -0.01em; }
.review-list { margin: 0; }
.review-row { padding: 11px 0; border-bottom: 1px solid #eef1f5; }
.review-row:last-child { border-bottom: 0; }
.review-row dt { color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.review-row dd { margin: 0; font-size: 14.5px; font-weight: 500; word-break: break-word; }
.review-row dd.is-missing { color: var(--err); }
.review-skipped, .review-empty { font-size: 12.5px; color: var(--faint); padding-top: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 10. Done ------------------------------------------------- */
.done { max-width: 880px; margin: 0 auto; }
.done-card { text-align: center; border-radius: 22px; padding: clamp(28px, 5vw, 52px) clamp(20px, 5vw, 56px); }
.done-card .lead { margin: 0 auto; }
.done-badge { width: 76px; height: 76px; margin: 0 auto 8px; }
.done-badge svg { width: 100%; height: 100%; }
.done-badge .ring-bg { fill: var(--ok-soft); stroke: none; }
.done-badge .ring { fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 176; stroke-dashoffset: 176; transform: rotate(-90deg); transform-origin: center; animation: ring 0.9s var(--ease) forwards; }
.done-badge .tick { fill: none; stroke: var(--ok); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: tick 0.45s 0.6s var(--ease) forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }
@keyframes tick { to { stroke-dashoffset: 0; } }
.reference {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; padding: 8px 8px 8px 16px;
  border-radius: 999px; background: #f2f5f9; border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.reference strong { padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--ink); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; letter-spacing: 0.02em; box-shadow: var(--shadow-xs); }
.next-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.next-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.next-card p { margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.next-num { position: absolute; top: 18px; right: 20px; font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: 0.06em; }
.demo-note { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 22px auto 0; width: fit-content; padding: 8px 14px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }

/* 11. Action bar ------------------------------------------- */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: #fff;
  border-top: 1px solid rgba(15, 27, 43, 0.08); box-shadow: 0 -8px 24px -12px rgba(15, 27, 43, 0.12);
  padding-bottom: env(safe-area-inset-bottom);
}
.action-inner { display: flex; align-items: center; gap: 14px; min-height: var(--bar-h); padding-top: 12px; padding-bottom: 12px; }
.action-hint { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 13px; }
.action-hint .icon { width: 15px; height: 15px; }
.action-inner > .btn:last-child { margin-left: auto; }
.action-inner > .action-hint:first-child { justify-content: flex-start; }
.action-dots { display: inline-flex; gap: 5px; margin-right: 6px; }
.action-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--line-2); transition: all 0.3s var(--ease); }
.action-dots i.is-past { background: var(--accent-2); opacity: 0.5; }
.action-dots i.is-current { width: 20px; background: var(--accent); }

.noscript { padding: 40px 24px; }

/* 12. Responsive ------------------------------------------- */
/* Large desktop */
@media (min-width: 1600px) {
  :root { --container: 1320px; }
  body { font-size: 15.5px; }
}
/* Laptop / tablet landscape */
@media (max-width: 1100px) {
  .review-top { grid-template-columns: 1fr; }
  .stats { max-width: 560px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .journey { max-width: 680px; }
  .journey-list { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .journey-list::before { display: none; }
  .journey-item { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; background: rgba(255, 255, 255, 0.6); border: 1px solid var(--line); }
}
/* Tablet portrait: section nav becomes a scrollable chip row */
@media (max-width: 960px) {
  .info-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .section-nav { position: static; padding: 12px; border-radius: var(--r); min-width: 0; }
  .nav-progress { display: flex; align-items: center; gap: 12px; padding: 0 4px 12px; }
  .nav-progress-row { margin: 0; gap: 10px; flex: none; }
  .nav-progress .meter { flex: 1; }
  .nav-list { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-list li { flex: none; scroll-snap-align: start; }
  .nav-item { padding: 7px 12px 7px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); box-shadow: inset 0 0 0 1px var(--line); }
  .nav-item.is-current { box-shadow: inset 0 0 0 1.5px var(--navy); }
  .next-grid { grid-template-columns: 1fr; }
  .section-head { grid-template-columns: auto 1fr; }
  .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .req-legend { grid-column: 2; padding: 0; }
}
/* Phone */
@media (max-width: 680px) {
  :root { --bar-h: 68px; }
  body { font-size: 15px; }
  .save-status { display: none; }
  .topbar-inner { height: 60px; }
  .brand { gap: 10px; }
  .brand-divider, .brand-sub { display: none !important; }
  .brand-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
  .brand-logo { height: 26px; }
  .brand-logo img { max-width: 112px; }
  .stepper { padding: 12px 0; }
  .step { gap: 0; }
  .step-text { display: none; }
  .step--current { flex: 1.8; }
  .step--current .step-text { display: flex; margin-left: 10px; min-width: 0; }
  .step-label { overflow: hidden; text-overflow: ellipsis; }
  .step:not(:last-child)::after { margin: 0 10px; min-width: 16px; }
  .step-num { width: 28px; height: 28px; font-size: 12px; }
  .backdrop { height: 520px; }

  .hero-actions .btn { width: 100%; }
  .hero-hint { display: none; }
  .journey { padding: 18px; }
  .journey-list { grid-template-columns: 1fr; gap: 4px; }
  .journey-list::before { display: block; }
  .journey-item { flex-direction: row; align-items: center; padding: 8px 8px 8px 0; background: none; border: 0; }
  .block-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .prep-tools { justify-content: flex-start; }
  .prep-progress { flex-basis: 100%; margin: 0; }
  .prep-card { padding: 18px; }
  .prep-card:hover { transform: none; }

  .section-card { padding: 22px 18px 26px; border-radius: 14px; }
  .section-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 24px; padding-bottom: 20px; }
  .section-head .icon-tile { width: 44px; height: 44px; }
  .req-legend { grid-column: 1; }
  .fields { grid-template-columns: 1fr; gap: 24px; }
  .field--half { grid-column: 1 / -1; }
  .choice-text { min-height: 46px; }
  .choices { grid-template-columns: 1fr; }
  .choices--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 12px 14px; }
  .stat strong { font-size: 20px; }
  .review-grid { columns: 1; }
  .review-card { padding: 16px 16px 10px; }

  .action-hint { display: none; }
  .action-inner .btn--primary { flex: 1; }
  .label-long { display: none; }
  .label-short { display: inline; }
}
/* Small phones */
@media (max-width: 380px) {
  .lang-btn { min-width: 34px; padding: 5px 8px; }
  .stat span { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .done-badge .ring, .done-badge .tick { stroke-dashoffset: 0; }
}
@media print {
  @page { margin: 14mm; }
  .site-header, .action-bar, .backdrop, .section-nav, .hero, .banner, .prep-tools, .skip-link { display: none !important; }
  body { padding: 0; background: #fff; font-size: 12px; }
  .main { padding-top: 0; }
  .slide-in-forward, .slide-in-back { animation: none; }
  .print-head { display: block; margin-bottom: 4px; }
  .print-title { font-size: 18px; font-weight: 700; }
  .print-sub { color: #555; }
  .block-head { margin: 10px 0 12px; }
  .prep-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .prep-card { box-shadow: none; border-color: #ccc; padding: 12px 14px; break-inside: avoid; transform: none !important; }
  .icon-tile { box-shadow: none; background: none; width: 22px; height: 22px; }
  .check-item { padding: 2px 0; margin: 0; font-size: 12px; }
  .check-box { border-color: #777; }
  .note { border-color: #ccc; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
