:root {
  --navy: #09212c;
  --navy-2: #12313d;
  --navy-3: #183a46;
  --gold: #97927d;
  --gold-2: #b6ad91;
  --paper: #fbfaf6;
  --paper-2: #f2f0ea;
  --line: rgba(9, 33, 44, 0.14);
  --line-dark: rgba(255, 255, 255, 0.16);
  --text: #09212c;
  --muted: #66737a;
  --white: #ffffff;
  --danger: #9b3a36;
  --warning: #9a722d;
  --ok: #27614a;
  --shadow: 0 24px 70px rgba(9, 33, 44, 0.18);
  --soft-shadow: 0 18px 48px rgba(9, 33, 44, 0.1);
  --font-sans: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body.quiz-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, rgba(151, 146, 125, 0.2), transparent 28rem),
    linear-gradient(145deg, #061820 0%, var(--navy) 42%, #f7f5ef 42.2%, #f7f5ef 100%);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiz-topbar {
  width: min(100% - 48px, 980px);
  margin: 0 auto;
  padding: 16px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: min(220px, 54vw);
  height: auto;
  display: block;
}

.quiz-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(9, 33, 44, 0.18);
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 800;
  background: #d8cfb6;
  box-shadow: 0 10px 24px rgba(9, 33, 44, 0.16);
}

.quiz-wrap {
  width: min(100% - 48px, 980px);
  margin: 0 auto;
  padding: 10px 0 4px;
}

.quiz-card {
  position: relative;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(20px, 2.3vw, 28px);
  border: 1px solid rgba(9, 33, 44, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quiz-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), rgba(151, 146, 125, 0.22), transparent);
  pointer-events: none;
}

.quiz-progress {
  height: 6px;
  border-radius: 999px;
  background: #e4e0d7;
  overflow: hidden;
  margin-bottom: 10px;
}

.quiz-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--navy));
  transition: width 260ms ease;
}

.quiz-step-counter {
  margin: -2px 0 10px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: block;
  width: 100%;
  padding: 0;
  white-space: normal;
}

.quiz-step {
  display: none;
}

.quiz-step.active {
  display: block;
  animation: quizFade 220ms ease both;
}

.quiz-step.attention {
  animation: quizShake 420ms ease both;
}

@keyframes quizFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes quizShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}

.eyebrow,
.result-label,
.result-map-label,
.result-roadmap-label,
.sim-group-label,
.admission-tag,
.result-info-card > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.intro-title,
.result-step h2,
.sim-block legend {
  max-width: 720px;
  margin: 0 0 16px;
  color: var(--navy);
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: 0;
}

.intro-title {
  max-width: 700px;
  font-size: clamp(2.4rem, 3.5vw, 3.4rem);
  margin-bottom: 20px;
}

.intro-lead,
.step-sub {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.65;
  max-width: 680px;
  margin: 0 0 36px;
}
.intro-name-field,
.sim-field {
  margin-top: 10px;
}

.intro-name-field span,
.sim-field span {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
}
.intro-name-field input,
.sim-field input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(9, 33, 44, 0.18);
  border-radius: 12px;
  padding: 0 18px;
  color: var(--navy);
  background: #fff;
  outline: none;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.intro-name-field input::placeholder,
.sim-field input::placeholder {
  color: #9ba6ab;
  font-family: var(--font-sans);
  font-weight: 500;
  font-style: italic;
}

.intro-name-field input:focus,
.sim-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(151, 146, 125, 0.16);
}

.intro-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.intro-benefits li {
  min-height: 88px;
  display: flex;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: #4e5d64;
}

.intro-benefits svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--gold);
}

.intro-benefits strong {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.intro-friction {
  margin: 12px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.sim-build {
  display: block;
}

.sim-stage {
  display: block;
}

.sim-block legend {
  max-width: 720px;
  font-size: clamp(2.02rem, 2.9vw, 2.62rem);
}

.sim-block .step-sub {
  margin-bottom: 22px;
}

.sim-group-label {
  margin-top: 18px;
}

.sim-block .step-sub + .sim-group-label {
  margin-top: 0;
}

.sim-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sim-chip {
  position: relative;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 16px 13px 46px;
  border: 1px solid rgba(9, 33, 44, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #fbfaf6);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(9, 33, 44, 0.045);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.sim-chip:hover {
  border-color: rgba(151, 146, 125, 0.55);
  transform: translateY(-1px);
}

.sim-chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.sim-chip::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 1.5px solid rgba(9, 33, 44, 0.42);
  border-radius: 999px;
  transform: translateY(-50%);
  background: #fff;
}

.sim-chip:has(input[type="checkbox"])::before {
  border-radius: 5px;
}

.sim-chip.is-on {
  border-color: rgba(151, 146, 125, 0.9);
  background: linear-gradient(180deg, #fffdf7, #efebe0);
  box-shadow: 0 10px 22px rgba(9, 33, 44, 0.09);
}

.sim-chip.is-on::before {
  border-color: var(--gold);
  background:
    radial-gradient(circle at center, var(--navy) 0 42%, transparent 44%),
    #fff;
}

.sim-chip:has(input[type="checkbox"]).is-on::before {
  background: var(--navy);
  box-shadow: inset 0 0 0 4px #fff;
}

.sim-chip span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}

.sim-field {
  margin-top: 10px;
}

.consent-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(9, 33, 44, 0.14);
  border-radius: 12px;
  background: var(--paper);
  color: #46565e;
  font-size: 0.98rem;
  line-height: 1.45;
  cursor: pointer;
}

.consent-card input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--navy);
}

.quiz-analyzing {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
}

.quiz-analyzing[hidden] {
  display: none;
}

.analyzing-ring {
  width: 92px;
  height: 92px;
  border: 8px solid rgba(151, 146, 125, 0.22);
  border-top-color: var(--gold);
  border-radius: 999px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.analyzing-text {
  margin: 18px 0 0;
  color: var(--text);
  font-weight: 900;
}

.quiz-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
}

.primary-control,
.ghost-control,
.primary-button,
.ghost-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  padding: 0 22px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.primary-control,
.primary-button {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 16px 28px rgba(9, 33, 44, 0.16);
}

.primary-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ghost-control,
.ghost-button {
  background: #fff;
  color: var(--navy);
  border-color: rgba(9, 33, 44, 0.16);
}

.result-step {
  text-align: left;
}

.result-profile-badge {
  display: none;
}

.result-profile-badge svg {
  width: 24px;
  height: 24px;
}

.result-step h2 {
  max-width: 700px;
  font-size: clamp(1.9rem, 2.55vw, 2.35rem);
}

.result-step > p {
  max-width: 700px;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--navy);
  line-height: 1.65;
  margin-bottom: 24px;
}

.result-synthesis {
  margin: 12px 0;
  padding: 13px 15px;
  border-left: 5px solid var(--gold);
  border-radius: 12px;
  background: var(--paper);
  color: var(--text);
  font-weight: 800;
  line-height: 1.45;
}

.result-exposure-map,
.result-roadmap,
.result-admission,
.result-alerts,
.result-risk {
  margin-top: 10px;
}

.result-exposure-map {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.result-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-map-card {
  min-height: 104px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.result-map-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-map-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.12;
  font-weight: 900;
}

.result-map-card p {
  margin: 6px 0 0;
  color: #43535b;
  font-size: 1rem;
  line-height: 1.38;
}

.result-map-card.is-high {
  border-color: rgba(155, 58, 54, 0.28);
  background: #fff2f1;
}

.result-map-card.is-medium {
  border-color: rgba(154, 114, 45, 0.3);
  background: #fff8e8;
}

.result-map-card.is-low {
  border-color: rgba(39, 97, 74, 0.22);
  background: #f3faf6;
}

.result-alerts {
  display: grid;
  gap: 16px;
}

.result-info-card {
  padding: 16px;
  border: 1px solid rgba(9, 33, 44, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.result-info-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.34rem;
  line-height: 1.16;
  font-weight: 600;
  letter-spacing: 0;
}

.result-info-card p {
  margin: 10px 0;
  color: #43535b;
  font-size: 1.02rem;
  line-height: 1.6;
}

.result-info-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
}

.result-info-rental {
  border-left: 5px solid #d49f35;
  background: linear-gradient(180deg, #fff9ea, #fff);
}

.result-info-dividends {
  border-left: 5px solid #c65f5a;
  background: linear-gradient(180deg, #fff1f1, #fff);
}

.result-info-succession {
  border-left: 5px solid var(--gold);
  background: linear-gradient(180deg, #f5f1ff, #fff);
}

.result-tax-table,
.result-tax-table-two {
  display: grid;
  margin: 16px 0;
  border: 1px solid rgba(9, 33, 44, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.result-tax-table div,
.result-tax-table-two div {
  display: grid;
  gap: 0;
  border-bottom: 1px solid rgba(9, 33, 44, 0.1);
}

.result-tax-table div {
  grid-template-columns: 1.25fr 1fr 1fr;
}

.result-tax-table-two div {
  grid-template-columns: 1.2fr 1fr;
}

.result-tax-table div:last-child,
.result-tax-table-two div:last-child {
  border-bottom: 0;
}

.result-tax-table strong,
.result-tax-table span,
.result-tax-table-two strong,
.result-tax-table-two span {
  padding: 10px 12px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.3;
}

.result-tax-table div:first-child,
.result-tax-table-two div:first-child {
  background: rgba(151, 146, 125, 0.32);
}

.result-note {
  font-size: 0.94rem;
}

.result-step > .result-risk {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px;
  border-radius: 18px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  line-height: 1.5;
  text-align: left;
}

.result-roadmap {
  padding: 16px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.result-roadmap ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.result-roadmap li {
  color: #43535b;
  font-weight: 700;
  line-height: 1.45;
}

.result-admission {
  padding: 16px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--navy-3));
}

.result-admission[data-temp="quente"] {
  background: linear-gradient(135deg, #3a1514, var(--navy));
}

.result-admission[data-temp="morno"] {
  background: linear-gradient(135deg, var(--navy), #433c28);
}

.result-admission[data-temp="frio"] {
  background: linear-gradient(135deg, #143a2d, var(--navy));
}

.result-admission .admission-tag {
  color: var(--gold-2);
}

.result-admission p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  line-height: 1.55;
}

.result-contact-note {
  color: var(--muted);
  font-weight: 800;
}

.result-meta {
  display: none;
  gap: 7px;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(151, 146, 125, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf7, #f5f1e7);
  color: var(--text);
}

.result-meta strong {
  display: block;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 900;
}

.result-meta span {
  display: block;
  color: #43535b;
  font-weight: 700;
  line-height: 1.48;
}

.result-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.result-actions .primary-button svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 860px) {
  body.quiz-page {
    background:
      linear-gradient(180deg, var(--navy) 0 176px, #f7f5ef 176px 100%);
  }

  .quiz-topbar,
  .quiz-wrap {
    width: min(100% - 28px, 720px);
  }

  .quiz-topbar {
    padding-top: 14px;
  }

  .quiz-card {
    width: 100%;
    padding: 20px 16px;
    border-radius: 20px;
  }

  .intro-title {
    max-width: 700px;
    font-size: clamp(2rem, 7vw, 2.8rem);
    margin-bottom: 14px;
  }

  .intro-benefits,
  .result-map-grid {
    grid-template-columns: 1fr;
  }

  .intro-benefits li {
    min-height: auto;
  }

  .sim-block legend,
  .result-step h2 {
    max-width: 680px;
    font-size: clamp(1.75rem, 5.6vw, 2.28rem);
  }

  .sim-chip {
    min-height: 58px;
    padding-right: 14px;
  }

  .result-tax-table,
  .result-tax-table-two {
    overflow-x: auto;
  }

  .result-tax-table div,
  .result-tax-table-two div {
    min-width: 640px;
  }

  .quiz-controls,
  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-control,
  .ghost-control,
  .primary-button,
  .ghost-button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .brand img {
    width: 176px;
  }

  .quiz-topbar {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding-bottom: 8px;
  }

  .quiz-back {
    min-height: 36px;
    padding: 0 14px;
  }

  .intro-lead,
  .step-sub {
    max-width: 700px;
    color: #45545b;
    font-size: 1rem;
    line-height: 1.5;
  }

  .result-step > p {
    max-width: 700px;
    color: var(--navy);
    font-family: var(--font-serif);
    font-size: 1.08rem;
    line-height: 1.58;
    margin-bottom: 20px;
  }

  .intro-benefits {
    gap: 8px;
  }

  .sim-chips {
    grid-template-columns: 1fr;
  }

  .result-info-card,
  .result-exposure-map,
  .result-roadmap,
  .result-admission,
  .result-risk {
    padding: 14px;
    border-radius: 16px;
  }
}