:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f5f7fb;
  background: #07090d;
  font-synthesis: none;
  --ink: #f5f7fb;
  --muted: #a8b0bf;
  --subtle: #747e8e;
  --brand: #2487ff;
  --brand-strong: #0875f5;
  --brand-soft: rgb(36 135 255 / 12%);
  --line: #252b35;
  --line-strong: #384251;
  --surface: #11151c;
  --surface-raised: #171c24;
  --surface-input: #0c1016;
  --danger: #ff6b72;
  --danger-soft: rgb(255 107 114 / 8%);
  --focus-ring: rgb(36 135 255 / 28%);
}

* { box-sizing: border-box; }
html { min-width: 20rem; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -12rem, rgb(36 135 255 / 16%), transparent 29rem),
    #07090d;
}
button, input, textarea, select { font: inherit; }
button, label, select { -webkit-tap-highlight-color: transparent; }

.site-header {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 7%);
  color: var(--ink);
  background: rgb(7 9 13 / 92%);
  backdrop-filter: blur(16px);
}
.brand { display: flex; min-width: 0; align-items: center; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { overflow: hidden; font-size: 0.96rem; letter-spacing: -0.015em; text-overflow: ellipsis; white-space: nowrap; }
.brand small { margin-top: 0.08rem; color: #8f99a8; font-size: 0.7rem; }
.secure-note { display: none; align-items: center; gap: 0.45rem; color: #919aa9; font-size: 0.78rem; }
.secure-dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0.22rem var(--brand-soft); }

.app-shell { width: min(72rem, 100%); margin: 0 auto; padding: 1rem; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; align-items: start; }
.progress-panel { padding: 1rem 0.25rem 0.8rem; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 0.45rem; color: #70b4ff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.progress-copy { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; color: var(--muted); font-size: 0.82rem; }
.progress-copy strong { color: #dce8f8; font-weight: 650; }
.progress-track { height: 0.3rem; overflow: hidden; border-radius: 999px; background: #242b35; }
.progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0875f5, #55a7ff); box-shadow: 0 0 0.8rem rgb(36 135 255 / 48%); transition: width 180ms ease; }
.draft-status { min-height: 1.2rem; margin: 0.7rem 0 0; color: var(--subtle); font-size: 0.75rem; line-height: 1.45; }

.form-card, .state-card { background: var(--surface); }
.form-card { min-width: 0; padding: 1.15rem; border: 1px solid rgb(255 255 255 / 6%); border-radius: 1rem; box-shadow: 0 1.4rem 4rem rgb(0 0 0 / 24%); }
.block-kicker { margin: 0 0 0.45rem; color: #70b4ff; font-size: 0.76rem; font-weight: 750; letter-spacing: 0.04em; }
.block-heading { text-align: center; }
.block-title { margin: 0; color: white; font-size: clamp(1.65rem, 8vw, 2.25rem); line-height: 1.1; letter-spacing: -0.04em; }
.block-help { margin: 0.65rem 0 1.5rem; color: var(--subtle); font-size: 0.78rem; line-height: 1.5; }
.stage-opening { margin: 0 0 1.5rem; padding: 1.05rem; border-left: 2px solid var(--brand); border-radius: 0 0.75rem 0.75rem 0; background: linear-gradient(90deg, var(--brand-soft), transparent); text-align: left; }
.stage-opening strong { display: block; color: white; font-size: 1.02rem; line-height: 1.45; }
.stage-opening p { margin: 0.45rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

.question { min-width: 0; margin: 0; padding: 1.35rem 0; border: 0; border-top: 1px solid var(--line); }
.question:first-of-type { padding-top: 0; border-top: 0; }
.question legend, .field-label { display: block; width: 100%; margin-bottom: 0.75rem; color: var(--ink); font-size: 1rem; font-weight: 680; line-height: 1.45; }
.question-label-text { display: inline; }
.required { display: inline; margin-left: 0.18rem; color: #ff858b; font-size: 0.95em; font-weight: 800; white-space: nowrap; }

.text-input, .number-input, .date-input, .phone-input, .country-select, textarea {
  width: 100%;
  min-height: 3.35rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  padding: 0.82rem 0.9rem;
  color: white;
  background: var(--surface-input);
  caret-color: var(--brand);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.text-input::placeholder, .number-input::placeholder, .phone-input::placeholder, textarea::placeholder { color: #7f8998; opacity: 1; }
textarea { min-height: 7rem; resize: vertical; line-height: 1.55; }
.text-input:hover, .number-input:hover, .date-input:hover, .phone-input:hover, .country-select:hover, textarea:hover { border-color: #536073; }
.text-input:focus, .number-input:focus, .date-input:focus, .phone-input:focus, .country-select:focus, textarea:focus { border-color: var(--brand); outline: 0; background: #0e141d; box-shadow: 0 0 0 0.22rem var(--focus-ring); }
.text-input:not(:placeholder-shown):not(:focus), .number-input:not(:placeholder-shown):not(:focus), .phone-input:not(:placeholder-shown):not(:focus), textarea:not(:placeholder-shown):not(:focus) { border-color: #465266; }
.date-input { color-scheme: dark; }
.has-error { border-color: var(--danger) !important; background: var(--danger-soft) !important; box-shadow: 0 0 0 0.18rem rgb(255 107 114 / 13%); }

.choices { display: grid; gap: 0.65rem; }
.choice { display: flex; min-height: 3.5rem; gap: 0.75rem; align-items: center; padding: 0.85rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 0.75rem; color: #e9edf4; background: var(--surface-input); cursor: pointer; line-height: 1.4; transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease, transform 120ms ease; }
.choice:hover { border-color: #536a88; background: #111923; }
.choice:has(input:focus-visible) { border-color: var(--brand); box-shadow: 0 0 0 0.22rem var(--focus-ring); }
.choice:has(input:checked) { border-color: var(--brand); color: white; background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgb(36 135 255 / 25%); }
.choice input { width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--brand); flex: 0 0 auto; }

.field-hint { margin: 0.5rem 0 0; color: var(--subtle); font-size: 0.8rem; line-height: 1.45; }
.field-error { margin: 0.55rem 0 0; color: var(--danger); font-size: 0.86rem; font-weight: 650; line-height: 1.4; }

.delivery-options { display: grid; gap: 0.65rem; }
.delivery-choice-block { display: grid; gap: 0.65rem; }
.delivery-whatsapp-action { width: 100%; }
.form-actions { display: flex; flex-wrap: wrap-reverse; justify-content: space-between; gap: 0.65rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.button { display: inline-flex; min-height: 3.35rem; flex: 1 1 9rem; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 0.75rem; padding: 0.8rem 1.25rem; cursor: pointer; font-weight: 760; transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
.button:focus-visible { outline: 0; box-shadow: 0 0 0 0.22rem var(--focus-ring); }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--brand-strong); box-shadow: 0 0.7rem 1.6rem rgb(8 117 245 / 20%); }
.button-primary:hover { background: #1683fc; box-shadow: 0 0.8rem 1.8rem rgb(8 117 245 / 28%); }
.button-secondary { border-color: var(--line-strong); color: #dfe5ee; background: transparent; }
.button-secondary:hover { border-color: #536073; background: var(--surface-raised); }
.button:disabled { cursor: wait; opacity: 0.62; }

.state-card { width: min(38rem, 100%); margin: 3rem auto; padding: clamp(1.5rem, 5vw, 3rem); border: 1px solid var(--line); border-radius: 1.1rem; box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 30%); text-align: center; }
.state-card h1 { margin: 0.75rem 0; font-size: clamp(1.6rem, 7vw, 2.4rem); letter-spacing: -0.035em; }
.state-card p { color: var(--muted); line-height: 1.55; }
.spinner { display: inline-block; width: 2.5rem; height: 2.5rem; border: 0.22rem solid #293241; border-top-color: var(--brand); border-radius: 50%; animation: spin 750ms linear infinite; }
.success-icon, .pending-icon { display: grid; width: 4rem; height: 4rem; margin: 0 auto; place-items: center; border: 1px solid rgb(79 163 255 / 55%); border-radius: 50%; color: white; background: var(--brand-soft); font-size: 1.8rem; font-weight: 900; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 35rem) {
  .site-header { padding-inline: clamp(1.25rem, 4vw, 3rem); }
  .secure-note { display: flex; }
  .app-shell { padding: clamp(1.25rem, 3vw, 2.5rem); }
  .form-card { padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: 1.25rem; }
  .form-actions { flex-wrap: nowrap; }
  .form-actions .button { flex: 0 1 auto; min-width: 8.75rem; }
}

@media (min-width: 49rem) {
  .form-layout { grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
  .progress-panel { position: sticky; top: 1.5rem; padding: 1.25rem 0; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
