/* Questionnaire (wizard) page */

.form-page { background: var(--bg); }
html:has(.form-page) { scroll-padding-bottom: 110px; }
@media (min-width: 560px) { html:has(.form-page) { scroll-padding-bottom: 0; } }
.form-page .site-header .header-phone { margin-left: auto; }
.wizard-wrap { position: relative; padding: 20px 0 48px; isolation: isolate; overflow-x: clip; }
.wizard-wrap::before { content: ''; position: absolute; inset: 0 0 auto; height: 260px; z-index: -1; background: var(--ink); }
.wizard-wrap::after { content: ''; position: absolute; z-index: -1; top: -200px; right: -200px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 180, 0, .28), transparent 65%); pointer-events: none; }
.wizard { max-width: 720px; margin: 0 auto; padding: 0 12px; scroll-margin-top: calc(var(--header-h) + 8px); }
@media (min-width: 560px) { .wizard { padding: 0 20px; } .wizard-wrap { padding-top: 36px; } }

.wz-head { color: #fff; padding: 4px 4px 18px; }
.wz-head h1 { font-size: clamp(24px, 6vw, 34px); }
.progress { margin-top: 16px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 700; color: #b9c2d3; margin-bottom: 8px; }
.progress-meta span:first-child { color: var(--sun); }
.progress-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: 4%; border-radius: inherit; background: linear-gradient(90deg, var(--sun), var(--volt)); transition: width .4s ease; }

.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 12px; padding: 12px 16px; border-radius: 14px; background: var(--volt-soft); color: var(--notice-text); font-size: 14px; font-weight: 600; }
.link { background: none; border: 0; padding: 0; color: var(--sun-2); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.link .icon { width: 16px; height: 16px; }

.wz-card { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.wz-nav { border-radius: 0 0 24px 24px; }
#wzBody { padding: 24px 18px 8px; }
@media (min-width: 560px) { #wzBody { padding: 36px 36px 12px; } }
.step-title { font-size: clamp(22px, 5vw, 28px); outline: none; }
.step-intro { margin-top: 8px; color: var(--muted); font-size: 15px; }
.req-note { font-size: 14px; }
.req { color: var(--danger); font-style: normal; font-weight: 800; }
.fields { margin-top: 22px; display: grid; gap: 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* fields */
.field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field[hidden] { display: none; }
.label { font-weight: 700; font-size: 15px; padding: 0; }
.muted { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--field-line); background: var(--surface-2);
  font-size: 17px; /* >=16px prevents iOS zoom */ transition: border-color .15s, box-shadow .15s, background .15s; appearance: none; -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1 5 5 5-5' stroke='%235b6577' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--field-hover); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sun); background: var(--surface); box-shadow: 0 0 0 4px rgba(255, 180, 0, .18); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); background: var(--invalid-bg); }
.hint { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.error { color: var(--danger); font-size: 13.5px; font-weight: 600; min-height: 0; }
.error:empty { display: none; }
.with-unit { position: relative; }
.with-unit input { padding-right: 84px; }
.unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; font-size: 14px; pointer-events: none; }
.with-btn { display: grid; gap: 8px; }
.btn-geo { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1.5px dashed var(--dashed); background: transparent; font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; }
.btn-geo:hover { border-color: var(--sun); color: var(--sun-2); }
.btn-geo.loading { opacity: .6; cursor: progress; }
@media (min-width: 560px) { .with-btn { grid-template-columns: 1fr auto; } }

/* choice chips */
.choice legend { margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; min-height: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px; border-radius: 12px; border: 1.5px solid var(--field-line); background: var(--surface-2); font-weight: 600; font-size: 15px; line-height: 1.25; transition: all .15s; user-select: none; }
.chip:hover span { border-color: var(--field-hover); }
.chip input:checked + span { border-color: var(--sun); background: var(--sun-soft); box-shadow: inset 0 0 0 1px var(--sun); color: var(--chip-on); }
.chip input:checked + span::before { content: ''; width: 16px; height: 16px; margin-right: 8px; border-radius: 50%; background: var(--sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a1324' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat; flex: none; }
.chip input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.invalid .chip span { border-color: var(--invalid-line); }

/* type choice */
.type-choice { margin-top: 22px; display: grid; gap: 12px; }
@media (min-width: 560px) { .type-choice { grid-template-columns: 1fr 1fr; } }
.type-card { text-align: left; display: grid; gap: 4px; padding: 22px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface-2); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.type-card:hover { border-color: var(--sun); transform: translateY(-2px); box-shadow: var(--shadow); }
.type-card.biz:hover { border-color: var(--volt); }
.type-card.active { border-color: var(--sun); background: var(--sun-soft); }
.type-card .ico { margin-bottom: 10px; }
.type-card b { font-size: 18px; }
.type-card small { color: var(--muted); font-size: 14px; }
.trust { margin: 22px 0 8px; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; font-weight: 600; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { color: var(--volt); width: 18px; height: 18px; }

/* files */
.files-block { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.file-cats { display: grid; gap: 8px; }
.file-cat { border: 1.5px dashed var(--dashed); border-radius: 14px; background: var(--surface-2); }
.file-add { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; position: relative; min-height: 54px; }
.file-add:hover { background: var(--sun-soft); border-radius: 12px; }
.file-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-add .icon { color: var(--sun-2); }
.file-add span { font-weight: 600; font-size: 15px; }
.file-add b { margin-left: auto; color: var(--sun-2); font-size: 14px; white-space: nowrap; }
.file-add input:focus-visible ~ b { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.file-list { padding: 0 10px 10px; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.file-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-list li small { color: var(--muted); white-space: nowrap; }
.file-list .icon { width: 18px; height: 18px; color: var(--muted); }
.file-list button { border: 0; background: none; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); display: grid; }
.file-list button:hover { background: var(--danger-soft); color: var(--danger); }
.small-note { font-size: 12.5px; }

/* navigation */
.wz-nav { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: var(--nav-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
@media (min-width: 560px) { .wz-nav { padding: 18px 36px 24px; position: static; background: none; border: 0; } }
.wz-nav .btn { flex: 1; }
.wz-nav .btn-back { flex: 0 0 auto; --b: var(--btn-back); color: var(--text); box-shadow: none; padding: 0 18px; }
.wz-nav .btn-back:hover { --b: var(--btn-back-hover); box-shadow: none; }
@media (max-width: 380px) { .btn-back span { display: none; } }
@media (min-width: 560px) { .wz-nav .btn:not(.btn-back) { flex: 0 1 auto; margin-left: auto; min-width: 220px; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(10, 19, 36, .25); border-top-color: var(--ink); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wz-help { margin-top: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.wz-help a { font-weight: 700; color: var(--text); }

/* summary */
.summary { margin-top: 20px; display: grid; gap: 12px; }
.sum-group { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--surface-2); }
.sum-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.sum-head h3 { font-size: 16px; }
.sum-head .link { font-size: 14px; }
.summary dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 16px; font-size: 14.5px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0 0 8px; font-weight: 700; overflow-wrap: anywhere; white-space: pre-line; }
@media (min-width: 560px) { .summary dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } .summary dd { margin: 0 0 4px; } }
.sum-files { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.sum-files li { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.sum-files .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
.sum-files small { color: var(--muted); font-weight: 500; }

.consent { margin-top: 22px; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; cursor: pointer; padding: 14px; border-radius: 14px; background: var(--sun-soft); }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--sun-2); cursor: pointer; }
.consent a { color: var(--text); font-weight: 700; }
.turnstile { margin-top: 16px; min-height: 65px; }
.alert { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: var(--alert-bg); color: var(--alert-text); font-size: 14.5px; font-weight: 600; }
.alert a { color: inherit; }

/* success */
.success { text-align: center; padding: 20px 0 28px; display: grid; justify-items: center; gap: 14px; }
.success-ico { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--volt); color: #fff; box-shadow: 0 0 0 10px var(--volt-soft); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.success-ico .icon { width: 38px; height: 38px; }
.success h2 { font-size: clamp(22px, 5vw, 28px); margin-top: 8px; }
.success p { color: var(--muted); max-width: 460px; }
.success-id { padding: 10px 16px; border-radius: 12px; background: var(--bg); color: var(--text) !important; }
.success .btn { margin-top: 8px; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ---------- mobile refinements (< 560px) ---------- */
.wz-help a, .header-phone span { white-space: nowrap; }
@media (max-width: 559px) {
  .wizard-wrap { padding-top: 14px; }
  .wizard-wrap::before { height: 200px; }
  .wz-head { padding: 0 4px 14px; }
  .wz-head h1 { font-size: 21px; }
  .progress { margin-top: 10px; }
  .progress-meta { font-size: 13px; margin-bottom: 6px; }
  #wzBody { padding: 20px 16px 4px; }
  .step-title { font-size: 21px; }
  .step-intro { font-size: 14px; }
  .fields { margin-top: 18px; gap: 18px; }
  .label { font-size: 14.5px; }
  /* chips fill the row evenly: easier to tap, no ragged edges */
  .chips { gap: 6px; }
  .chip { flex: 1 1 auto; }
  .chip span { width: 100%; justify-content: center; text-align: center; min-height: 48px; padding: 10px 12px; font-size: 14.5px; }
  .chip input:checked + span::before { margin-right: 6px; }
  .type-choice { margin-top: 16px; gap: 10px; }
  .type-card { grid-template-columns: 48px 1fr; column-gap: 14px; align-items: center; padding: 16px; }
  .type-card .ico { grid-row: span 2; margin: 0; }
  .type-card b { font-size: 16.5px; line-height: 1.25; }
  .type-card small { font-size: 13.5px; line-height: 1.35; }
  .trust { margin-top: 18px; gap: 6px 16px; font-size: 13px; }
  .file-add { padding: 10px 12px; min-height: 50px; }
  .file-add span { font-size: 14px; }
  .summary dl { font-size: 14px; }
  .consent { font-size: 13.5px; padding: 12px; }
  .wz-help { font-size: 13px; padding: 0 12px; }
}
