:root {
  --brand: #e54928;
  --brand-d: #c7391b;
  --brand-soft: #fff1ec;
  --ink: #1d2126;
  --muted: #5d6570;
  --line: #e2e5e9;
  --line-2: #cfd4da;
  --card: #fff;
  --ok: #1f8a4c;
  --err: #c0271b;
  --r: 22px;
  --r-sm: 14px;
  --sh: 0 20px 60px rgba(10, 14, 20, .28), 0 2px 8px rgba(10, 14, 20, .12);
  --focus: 0 0 0 3px rgba(229, 73, 40, .35);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); background: #1b4f86;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.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; }

.bg {
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6, 18, 34, .22) 0%, rgba(6, 18, 34, .05) 40%, rgba(6, 18, 34, .40) 100%), var(--bg) center / cover no-repeat, #1b4f86;
}

.page { padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); max-width: 820px; margin: 0 auto; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); overflow: clip; }

.card-head { padding: 18px 16px 6px; text-align: center; }
.brandbar { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 16px; }
.logo { display: block; flex: none; width: 112px; height: auto; }
.slogan { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 600; font-size: .8rem; line-height: 1.3; text-align: left; max-width: 26ch; box-shadow: 0 6px 16px rgba(229, 73, 40, .22); }
@media (max-width: 359px) { .brandbar { flex-direction: column; gap: 10px; } .slogan { text-align: center; } }
.intro h1 { margin: 0 0 8px; font-size: clamp(1.45rem, 5.4vw, 2rem); line-height: 1.2; letter-spacing: -.01em; font-weight: 800; }
.intro p { margin: 0 auto; max-width: 62ch; color: var(--muted); font-size: .95rem; }
.card.is-compact .intro p { display: none; }
.card.is-compact .brandbar { margin-bottom: 10px; }

.progress { display: none; padding: 16px 16px 0; }
.progress-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #f07a3a); transition: width .35s ease; }
.progress-text { margin: 8px 0 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.stepper { display: none; list-style: none; margin: 0; padding: 0 20px; counter-reset: s; }
.js .progress { display: block; }

.survey { padding: 8px 16px 0; }
.step { padding: 14px 0 6px; }
.js .step { display: none; }
.js .step.is-current { display: block; animation: stepin .28s ease-out; }
@keyframes stepin { from { opacity: 0; transform: translateY(6px); } }
.step-kicker { margin: 0 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-d); font-weight: 700; }
.js .step-kicker { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.q { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.q-title { display: block; padding: 0; margin: 0 0 14px; font-size: 1.22rem; line-height: 1.3; font-weight: 700; letter-spacing: -.005em; }
.q-title:focus { outline: none; }
.opts { display: grid; gap: 10px; }
.opt { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt-box {
  display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 16px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff;
  font-weight: 600; transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
}
.opt-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; transition: .15s; position: relative; }
.opt-label { flex: 1; }
.opt:hover .opt-box { border-color: #b9c0c8; }
.opt:active .opt-box { transform: scale(.99); }
.opt input:checked + .opt-box { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.opt input:checked + .opt-box .opt-dot { border-color: var(--brand); background: var(--brand); box-shadow: inset 0 0 0 4px #fff; }
.opt input:focus-visible + .opt-box { box-shadow: var(--focus); border-color: var(--brand); }
.opts-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts-cards .opt-box { flex-direction: column; justify-content: center; text-align: center; gap: 10px; padding: 18px 10px 16px; min-height: 150px; }
.opts-cards .opt-box img { width: auto; max-height: 86px; object-fit: contain; }
.opts-cards .opt-dot { position: absolute; top: 10px; right: 10px; }

.err, .alert {
  display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 0; padding: 12px 14px;
  border: 1px solid #ffd3cd; border-radius: 14px; background: linear-gradient(180deg, #fff6f5, #fff0ee);
  color: #8a1c13; font-size: .93rem; font-weight: 500; line-height: 1.45;
  box-shadow: 0 6px 18px rgba(192, 39, 27, .10); animation: errin .28s cubic-bezier(.2, .9, .3, 1.2);
}
.err::before, .alert::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: #d92d20 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 7v6M12 17h.01'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: 0 0 0 4px rgba(217, 45, 32, .12);
}
@keyframes errin { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.q.has-error .opt-box { border-color: #f4aaa1; }
.q.has-error .opts { animation: nudge .38s ease-in-out; }
@keyframes nudge { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.field .err { margin: 7px 0 0; padding: 0; border: 0; background: none; box-shadow: none; gap: 7px; font-size: .85rem; color: var(--err); animation-duration: .2s; }
.field .err::before { width: 17px; height: 17px; background-size: 11px; box-shadow: none; }

.intro-title { margin-bottom: 16px; }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.benefits li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--r-sm); background: #f6f8fa; }
.benefits img { flex: none; width: 64px; height: 64px; object-fit: contain; }
.benefits p { margin: 0; font-size: .95rem; color: var(--muted); }
.benefits b { color: var(--ink); }
.slogan-bold { font-weight: 700; letter-spacing: .01em; }

.fields { display: grid; gap: 14px; }
.field { display: block; }
.field-label { display: block; margin: 0 0 6px; font-weight: 600; font-size: .95rem; }
.req { color: var(--brand-d); }
.field input {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.field input[aria-invalid="true"] { border-color: #e0584d; background: #fffafa; box-shadow: 0 0 0 3px rgba(217, 45, 32, .10); }
.consent { margin: 16px 0 0; font-size: .85rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.actions {
  position: sticky; bottom: 0; z-index: 3; display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  margin: 6px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 14px; background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 1rem;
  letter-spacing: .01em; cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: var(--brand-d); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[data-next], .btn[data-submit] { flex: 1; max-width: 260px; }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 14px; }
.btn-ghost:hover { background: #f2f4f6; }
.btn[data-prev] { margin-right: auto; }
.btn .spinner { display: none; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn.is-loading { pointer-events: none; opacity: .9; }
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-text { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.done { padding: 34px 20px 40px; text-align: center; outline: none; }
.done-ic { width: 76px; height: 76px; fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.done-ic circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .6s ease-out forwards; }
.done-ic path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s .45s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h2 { margin: 12px 0 6px; font-size: 1.35rem; }
.done p { margin: 0; color: var(--muted); }

.foot { padding: 22px 8px 6px; text-align: center; color: #fff; font-size: .95rem; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.foot p { margin: 0 0 6px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

@media (min-width: 720px) {
  .page { padding: 48px 24px 28px; }
  .card-head { padding: 30px 40px 8px; }
  .brandbar { gap: 26px; margin-bottom: 20px; }
  .logo { width: 200px; }
  .slogan { font-size: 1rem; padding: 11px 18px; border-radius: 12px; max-width: 40ch; }
  .intro p { font-size: 1rem; }
  .js .progress { display: none; }
  .js .stepper { display: flex; gap: 0; margin: 18px 0 0; padding: 0 40px; }
  .stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: .82rem; font-weight: 600; color: var(--muted); text-align: center; }
  .stepper li::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 3px; border-radius: 3px; background: var(--line); }
  .stepper li:first-child::before { display: none; }
  .stepper .num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-2); color: var(--muted); font-weight: 700; position: relative; z-index: 1; transition: .2s; }
  .stepper li.is-done .num { background: var(--brand); border-color: var(--brand); color: transparent; }
  .stepper li.is-done .num::after { content: ""; position: absolute; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
  .stepper li.is-done::before, .stepper li.is-current::before { background: var(--brand); }
  .stepper li.is-current { color: var(--ink); }
  .stepper li.is-current .num { border-color: var(--brand); color: var(--brand-d); box-shadow: 0 0 0 4px var(--brand-soft); }
  .survey { padding: 8px 40px 0; }
  .step { padding-top: 22px; }
  .q-title { font-size: 1.4rem; text-align: center; margin-bottom: 20px; }
  .opts { max-width: 560px; margin: 0 auto; }
  .opts-cards { max-width: 460px; gap: 16px; }
  .q > .err { max-width: 560px; margin-left: auto; margin-right: auto; }
  .fields { grid-template-columns: 1fr 1fr; gap: 16px 18px; }
  .intro-title { text-align: center; }
  .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .benefits li { flex-direction: column; align-items: center; padding: 18px 16px; }
  .benefits b { display: block; text-align: center; margin-bottom: 4px; }
  .benefits img { width: 96px; height: 96px; }
  .consent { text-align: center; }
  .actions { position: static; margin: 10px -40px 0; padding: 18px 40px 26px; background: none; backdrop-filter: none; border-top: 0; }
  .btn[data-next], .btn[data-submit] { flex: 0 1 auto; min-width: 180px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
