:root {
  --sdb-petroleum: #123f4a;
  --sdb-turquoise: #20b8a6;
  --sdb-orange: #ff8a3d;
  --sdb-off-white: #f7f3ea;
  --sdb-graphite: #202c33;
  --sdb-bg: var(--sdb-off-white);
  --sdb-surface: #fffdf8;
  --sdb-surface-raised: #ffffff;
  --sdb-border: rgba(18, 63, 74, 0.16);
  --sdb-text: var(--sdb-graphite);
  --sdb-muted: #607077;
  --sdb-accent: var(--sdb-turquoise);
  --sdb-accent-strong: #159d8e;
  --sdb-accent-ink: #083832;
  --sdb-action: var(--sdb-orange);
  --sdb-action-strong: #ef7627;
  --sdb-error: #b43832;
  --sdb-focus: var(--sdb-turquoise);
  --sdb-radius-card: 32px;
  --sdb-radius-control: 16px;
  --sdb-shadow: 0 28px 80px rgba(18, 63, 74, 0.14), 0 3px 14px rgba(18, 63, 74, 0.07);
  --sdb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", Nunito, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { background: var(--sdb-bg); }

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(32, 184, 166, 0.13), transparent 30rem),
    radial-gradient(circle at 97% 88%, rgba(255, 138, 61, 0.12), transparent 30rem),
    var(--sdb-bg);
  color: var(--sdb-text);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(18, 63, 74, 0.1) 0.65px, transparent 0.65px);
  background-size: 8px 8px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 60%);
  opacity: 0.25;
  pointer-events: none;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--sdb-petroleum);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.page-shell {
  width: min(100% - 40px, 1180px);
  min-height: 100svh;
  padding: 18px 0 26px;
}

.site-header {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 20px;
}

.brand {
  min-height: auto;
  padding: 0;
  align-self: auto;
  gap: 10px;
  color: var(--sdb-petroleum);
}

.brand__mark {
  width: 50px;
  height: 42px;
  overflow: visible;
  border-radius: 0;
  background: none;
  color: inherit;
  transform: none;
}

.brand__halo,
.brand__smile,
.brand__car,
.brand__face {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__halo { stroke: var(--sdb-turquoise); stroke-width: 6; }
.brand__car { fill: var(--sdb-petroleum); stroke: var(--sdb-petroleum); stroke-width: 3; }
.brand__face { stroke: var(--sdb-off-white); stroke-width: 4; }
.brand__smile { stroke: var(--sdb-orange); stroke-width: 6; }

.brand__wordmark {
  display: grid;
  margin-top: -1px;
  font-size: 17px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.brand__wordmark strong { color: var(--sdb-orange); font-weight: 900; }

.partner-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.partner-lockup[hidden] { display: none; }
.partner-lockup__divider { width: 1px; height: 32px; background: var(--sdb-border); }
.partner-lockup__label { color: var(--sdb-muted); font-size: 10px; line-height: 1.15; }
.partner-lockup__logo { display: block; width: auto; max-width: 118px; height: 28px; object-fit: contain; }

.header-assurance {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  gap: 7px;
  color: var(--sdb-petroleum);
  font-size: 12px;
  font-weight: 750;
}

.header-assurance span {
  display: grid;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: rgba(32, 184, 166, 0.13);
  color: var(--sdb-accent-strong);
  place-items: center;
}

.quote-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: min(720px, calc(100svh - 116px));
  border: 1px solid rgba(18, 63, 74, 0.11);
  border-radius: var(--sdb-radius-card);
  background: var(--sdb-surface);
  box-shadow: var(--sdb-shadow);
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
}

.brand-panel {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: clamp(34px, 4vw, 54px);
  flex-direction: column;
  background:
    radial-gradient(circle at 80% 15%, rgba(32, 184, 166, 0.35), transparent 22rem),
    linear-gradient(150deg, #174f5c, var(--sdb-petroleum) 60%);
  color: #fff;
}

.brand-panel::after {
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 360px;
  height: 250px;
  border: 28px solid var(--sdb-orange);
  border-top: 0;
  border-radius: 0 0 50% 50%;
  content: "";
  opacity: 0.92;
  transform: rotate(-8deg);
}

.brand-panel__eyebrow {
  position: relative;
  z-index: 1;
  color: #9ce5da;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-panel__title {
  position: relative;
  z-index: 1;
  margin: 20px 0 0;
  font-size: clamp(30px, 3.3vw, 48px);
  font-weight: 720;
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.brand-panel__title strong { color: #ffad75; font-weight: 900; }

.brand-panel__illustration {
  position: relative;
  z-index: 1;
  width: min(100%, 310px);
  margin: auto auto 8px;
  filter: drop-shadow(0 24px 36px rgba(3, 29, 35, 0.28));
  animation: sdb-car-breathe 5s ease-in-out 900ms infinite;
}

.brand-panel__illustration svg { display: block; width: 100%; overflow: visible; }
.brand-panel__road, .brand-panel__car, .brand-panel__window, .brand-panel__face { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.brand-panel__road--top {
  stroke: var(--sdb-turquoise);
  stroke-width: 14;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: sdb-draw-arc 900ms var(--sdb-ease) 260ms forwards;
}
.brand-panel__car { fill: rgba(8, 43, 51, 0.58); stroke: #fff8ef; stroke-width: 7; }
.brand-panel__window { stroke: #fff8ef; stroke-width: 7; }
.brand-panel__face { stroke: #fff8ef; stroke-width: 8; }
.brand-panel__road--bottom {
  stroke: var(--sdb-orange);
  stroke-width: 14;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: sdb-draw-arc 900ms var(--sdb-ease) 420ms forwards;
}

.brand-panel__note {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #e9f7f4;
  font-size: 11px;
  font-weight: 750;
}

.insurance-quiz,
.quiz-card,
.quiz-card form { min-width: 0; }

.insurance-quiz { background: var(--sdb-surface); }

.quiz-card {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: var(--sdb-surface);
  box-shadow: none;
}

.step-shell {
  min-height: 100%;
  padding: 22px clamp(28px, 4vw, 58px) 24px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 360ms var(--sdb-ease), transform 360ms var(--sdb-ease);
}

.step-shell.step-shell--visible { opacity: 1; transform: none; }

.step-shell[data-motion-direction="forward"] { --step-enter-x: 18px; }
.step-shell[data-motion-direction="back"] { --step-enter-x: -18px; }
.step-shell[data-motion-direction="initial"] { --step-enter-x: 0px; }

.step-shell.step-shell--visible .step-topline,
.step-shell.step-shell--visible .encouragement,
.step-shell.step-shell--visible .step-heading,
.step-shell.step-shell--visible .step-content,
.step-shell.step-shell--visible .quiz-actions,
.step-shell.step-shell--visible .privacy-note {
  animation: sdb-step-in 430ms var(--sdb-ease) both;
}

.step-shell.step-shell--visible .step-topline { animation-delay: 20ms; }
.step-shell.step-shell--visible .encouragement { animation-delay: 45ms; }
.step-shell.step-shell--visible .step-heading { animation-delay: 65ms; }
.step-shell.step-shell--visible .step-content { animation-delay: 115ms; }
.step-shell.step-shell--visible .quiz-actions { animation-delay: 155ms; }
.step-shell.step-shell--visible .privacy-note { animation-delay: 190ms; }

.step-topline {
  min-height: 48px;
  margin-bottom: 14px;
  grid-template-columns: 44px 1fr 44px;
}

.back-button,
.secure-mark {
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #728389;
}

.back-button:hover {
  border-color: var(--sdb-border);
  background: rgba(32, 184, 166, 0.08);
  color: var(--sdb-petroleum);
}

.secure-mark { color: var(--sdb-turquoise); font-size: 22px; }

.step-group {
  color: #087e70;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.step-main { max-width: 580px; }

.encouragement {
  margin-bottom: 18px;
  padding: 8px 12px 8px 8px;
  border-color: rgba(32, 184, 166, 0.25);
  background: rgba(32, 184, 166, 0.08);
  color: #315a61;
}

.encouragement span { background: var(--sdb-turquoise); color: #fff; }
.step-heading { margin-bottom: 26px; }

.step-heading h1,
.success-state h1 {
  max-width: 18ch;
  color: var(--sdb-petroleum);
  font-size: clamp(30px, 3.2vw, 43px);
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.step-heading h1::after {
  display: block;
  width: 48px;
  height: 5px;
  margin-top: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sdb-orange) 0 68%, var(--sdb-turquoise) 68%);
  content: "";
}

.step-heading p,
.success-state p { color: var(--sdb-muted); font-size: 15px; }

.field__label { color: var(--sdb-petroleum); }

.social-name-toggle {
  border-color: rgba(32, 184, 166, 0.35);
  background: rgba(32, 184, 166, 0.08);
  color: var(--sdb-accent-strong);
}

.social-name-toggle:hover { background: rgba(32, 184, 166, 0.15); }
.social-name-toggle:focus-visible { outline-color: rgba(32, 184, 166, 0.35); }

.social-name-panel {
  border-color: rgba(18, 63, 74, 0.18);
  background: rgba(247, 243, 234, 0.6);
}

.field__input {
  min-height: 58px;
  border: 1.5px solid var(--sdb-border);
  border-radius: var(--sdb-radius-control);
  background: #fff;
  color: var(--sdb-graphite);
  box-shadow: 0 2px 0 rgba(18, 63, 74, 0.03);
}

.field__input::placeholder { color: #9aa5a8; }
.field__input:hover { border-color: rgba(18, 63, 74, 0.28); }
.field__input:focus {
  border-color: var(--sdb-turquoise);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(32, 184, 166, 0.13);
}

.select-wrap::after { color: var(--sdb-petroleum); }
.field__hint, .choice-note, .lookup-status, .form-status { color: var(--sdb-muted); }

.choice-grid { gap: 12px; }

.choice-card,
.fipe-candidate,
.consent-card {
  border: 1.5px solid var(--sdb-border);
  background: #fff;
  box-shadow: 0 2px 0 rgba(18, 63, 74, 0.03);
}

.choice-card { min-height: 64px; border-radius: 18px; }
.choice-card:hover { border-color: rgba(32, 184, 166, 0.58); background: #fbfffe; transform: translateY(-1px); }
.choice-card:has(input:focus-visible),
.consent-card:has(input:focus-visible) { outline-color: rgba(32, 184, 166, 0.38); }
.choice-card:has(input:checked),
.fipe-candidate:has(input:checked) {
  border-color: var(--sdb-turquoise);
  background: rgba(32, 184, 166, 0.09);
  box-shadow: 0 0 0 1px rgba(32, 184, 166, 0.12), 0 8px 20px rgba(18, 63, 74, 0.06);
  animation: sdb-choice-confirm 300ms var(--sdb-ease);
}

.choice-card__icon { font-size: 22px; filter: saturate(0.88); }
.choice-card__label { color: var(--sdb-graphite); font-weight: 760; }
.choice-card__check,
.consent-card__control { border-color: #9cacb0; }
.choice-card:has(input:checked) .choice-card__check,
.consent-card:has(input:checked) .consent-card__control {
  border-color: var(--sdb-turquoise);
  background: var(--sdb-turquoise);
  color: #fff;
  animation: sdb-check-pop 260ms var(--sdb-ease);
}

.has-error .field__input,
.has-error .choice-card,
.has-error .consent-card { animation: sdb-error-nudge 260ms ease-out; }

.alternative-actions button { color: var(--sdb-muted); }
.alternative-actions button:hover { background: rgba(32, 184, 166, 0.07); color: var(--sdb-petroleum); }
.lookup-status--success { color: #087e70; }

.vehicle-result {
  border-color: rgba(32, 184, 166, 0.32);
  background: rgba(32, 184, 166, 0.08);
}

.vehicle-result__check { background: var(--sdb-turquoise); color: #fff; }
.vehicle-result__body > span:last-child,
.vehicle-result__fipe span,
.fipe-candidate small { color: var(--sdb-muted); }
.vehicle-result__eyebrow { color: #087e70; }
.vehicle-result__fipe { color: var(--sdb-graphite); }

.consent-card { color: #53656a; }
.consent-card:has(input:checked) { border-color: rgba(32, 184, 166, 0.55); background: rgba(32, 184, 166, 0.06); }

.tap-feedback { color: #087e70; }

.quiz-actions { max-width: 580px; margin-top: 26px; }

.button {
  min-height: 58px;
  border-radius: 17px;
  font-weight: 850;
  transition: background 180ms ease, transform 180ms var(--sdb-ease), box-shadow 180ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(0.985); }
.button:focus-visible,
.back-button:focus-visible,
.alternative-actions button:focus-visible { outline-color: rgba(32, 184, 166, 0.42); }

.button--primary {
  background: var(--sdb-orange);
  box-shadow: 0 10px 24px rgba(255, 138, 61, 0.24), inset 0 -2px 0 rgba(126, 50, 0, 0.12);
  color: #3c210e;
}

.button--primary:hover {
  background: var(--sdb-action-strong);
  box-shadow: 0 14px 30px rgba(255, 138, 61, 0.3), inset 0 -2px 0 rgba(126, 50, 0, 0.12);
}

.button--primary span:last-child { transition: transform 220ms var(--sdb-ease); }
.button--primary:hover span:last-child { transform: translateX(4px); }

.button--skip { background: rgba(18, 63, 74, 0.06); color: var(--sdb-petroleum); }
.privacy-note { color: var(--sdb-muted); }

.success-state { min-height: 100%; }
.success-state__icon {
  background: var(--sdb-turquoise);
  box-shadow: 0 0 0 11px rgba(32, 184, 166, 0.1);
  color: #fff;
  animation: sdb-success-pop 520ms var(--sdb-ease) both;
}

@keyframes sdb-step-in {
  from { opacity: 0; transform: translateX(var(--step-enter-x, 0)) translateY(8px); }
  to { opacity: 1; transform: translate(0, 0); }
}

@keyframes sdb-choice-confirm {
  0% { transform: scale(1); }
  52% { transform: scale(0.985); }
  100% { transform: scale(1); }
}

@keyframes sdb-check-pop {
  0% { transform: scale(0.55) rotate(-14deg); }
  70% { transform: scale(1.1) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes sdb-error-nudge {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px); }
  65% { transform: translateX(4px); }
}

@keyframes sdb-success-pop {
  0% { opacity: 0; transform: scale(0.65) rotate(-12deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes sdb-draw-arc { to { stroke-dashoffset: 0; } }

@keyframes sdb-car-breathe {
  0%, 100% { transform: translateY(0) rotate(-0.35deg); }
  50% { transform: translateY(-7px) rotate(0.35deg); }
}

.page-note { color: var(--sdb-muted); }

@media (max-width: 899px) {
  .page-shell { width: 100%; padding: 0; }
  .site-header { min-height: 76px; padding: max(12px, env(safe-area-inset-top)) 20px 10px; }
  .brand__mark { width: 44px; height: 36px; }
  .header-assurance { font-size: 0; }
  .header-assurance span { font-size: 12px; }
  .partner-lockup__label { display: none; }
  .partner-lockup__logo { max-width: 84px; height: 23px; }
  .quote-stage { min-height: calc(100svh - 76px); border: 0; border-radius: 28px 28px 0 0; box-shadow: 0 -10px 42px rgba(18, 63, 74, 0.08); grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .step-shell { min-height: calc(100svh - 76px); padding: 10px 22px max(16px, env(safe-area-inset-bottom)); }
  .step-main { margin: auto; }
  .page-note { display: none; }
}

@media (min-width: 700px) and (max-width: 899px) {
  .page-shell { width: min(100% - 48px, 760px); padding: 18px 0 28px; }
  .site-header { padding-inline: 0; }
  .quote-stage { min-height: 690px; border: 1px solid var(--sdb-border); border-radius: 30px; }
  .quiz-card { min-height: 690px; }
  .step-shell { min-height: 690px; padding-inline: 46px; }
}

@media (max-width: 480px) {
  .site-header { gap: 10px; }
  .brand__wordmark { font-size: 15px; }
  .partner-lockup { margin-left: auto; }
  .header-assurance { display: none; }
  .step-heading h1 { font-size: clamp(29px, 9.2vw, 38px); }
  .choice-card { min-height: 60px; }
}

@media (max-height: 690px) and (max-width: 699px) {
  .site-header { min-height: 66px; padding-block: 8px; }
  .quote-stage, .step-shell { min-height: calc(100svh - 66px); }
  .step-heading h1 { font-size: 28px; }
  .step-heading h1::after { margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .step-shell { transform: none; }
  .choice-card:hover, .button:hover { transform: none; }
  .brand-panel__illustration,
  .brand-panel__road,
  .step-shell.step-shell--visible .step-topline,
  .step-shell.step-shell--visible .encouragement,
  .step-shell.step-shell--visible .step-heading,
  .step-shell.step-shell--visible .step-content,
  .step-shell.step-shell--visible .quiz-actions,
  .step-shell.step-shell--visible .privacy-note,
  .choice-card:has(input:checked),
  .fipe-candidate:has(input:checked),
  .choice-card:has(input:checked) .choice-card__check,
  .consent-card:has(input:checked) .consent-card__control,
  .has-error .field__input,
  .has-error .choice-card,
  .has-error .consent-card,
  .success-state__icon { animation: none; }
}
