:root {
  --bg: #f7f9fb;
  --ink: #101525;
  --muted: #5c667a;
  --line: rgba(16, 21, 37, 0.12);
  --panel: #ffffff;
  --soft: #f2f7fb;
  --navy: #13183b;
  --purple: #735cff;
  --blue: #2f8cff;
  --cyan: #8ae9f1;
  --green: #2fa977;
  --amber: #d99016;
  --rose: #e94d73;
  --shadow: 0 24px 70px rgba(18, 24, 59, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -12rem, rgba(115, 92, 255, 0.2), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.flow-page {
  width: min(calc(100% - 28px), 920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 46px) 0;
  display: grid;
  align-items: center;
}

.flow-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.flow-header {
  padding: clamp(20px, 4vw, 34px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 86% 20%, rgba(138, 233, 241, 0.22), transparent 18rem),
    linear-gradient(135deg, rgba(115, 92, 255, 0.06), rgba(47, 140, 255, 0.04));
}

.brand-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px;
  gap: 22px;
  align-items: center;
}

.product-thumb {
  width: 164px;
  aspect-ratio: 1 / 0.82;
  object-fit: contain;
  justify-self: end;
}

.eyebrow,
.step-pill,
.answer-label,
.tag,
.button,
.ghost-button,
.result-label {
  letter-spacing: 0.02em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 10px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -0.035em;
}

#screen-subtitle {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
}

.status-row.no-pill {
  grid-template-columns: 1fr;
  gap: 0;
}

.progress-wrap {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ebf1;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--blue), var(--cyan));
  transition: width 220ms ease;
}

.step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.status-row.no-pill .step-pill,
.step-pill[hidden] {
  display: none !important;
  width: 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  margin: 0;
  overflow: hidden;
}

#app {
  padding: clamp(20px, 4vw, 34px);
}

.question-screen,
.email-screen,
.result-screen {
  display: grid;
  gap: 22px;
}

.answers {
  display: grid;
  gap: 12px;
}

.answer-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.answer-button:hover,
.answer-button.selected {
  border-color: rgba(115, 92, 255, 0.62);
  background: #f5f3ff;
  transform: translateY(-1px);
}

.answer-label {
  display: block;
  font-size: 17px;
  font-weight: 850;
}

.answer-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.answer-icon {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(115, 92, 255, 0.3);
  border-radius: 999px;
  background: #ffffff;
}

.answer-button.selected .answer-icon {
  background: var(--purple);
  box-shadow: inset 0 0 0 8px #ffffff;
}

.nav-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 20px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}

.button {
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #ffffff;
}

.button:hover {
  background: #0d1230;
}

.button:disabled {
  cursor: not-allowed;
  border-color: #cbd5df;
  background: #cbd5df;
  color: #667085;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--navy);
}

.preview-card,
.email-card,
.result-summary,
.curve-card,
.tips-card,
.plan-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.preview-card,
.email-card,
.result-summary,
.tips-card,
.plan-card {
  padding: clamp(18px, 3vw, 26px);
}

.preview-grid,
.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 1.08fr);
  gap: 22px;
  align-items: start;
}

.preview-card h2,
.email-card h2,
.result-summary h2,
.tips-card h2,
.plan-card h2 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.preview-card p,
.email-card p,
.result-summary p,
.tips-card p,
.plan-card p,
.small-note {
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 16px 0 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef9f4;
  color: #136044;
  font-size: 13px;
  font-weight: 900;
}

.tag[data-risk="moderate"] {
  background: #fff7df;
  color: #734a00;
}

.tag[data-risk="high"] {
  background: #fff0f4;
  color: #9a2348;
}

.email-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.email-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.email-input {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  color: var(--ink);
}

.email-input:focus {
  outline: 3px solid rgba(115, 92, 255, 0.18);
  border-color: var(--purple);
}

.curve-card {
  padding: 16px;
  background:
    radial-gradient(circle at 86% 0%, rgba(115, 92, 255, 0.12), transparent 14rem),
    #fbfeff;
}

.curve-svg {
  display: block;
  width: 100%;
  height: auto;
}

.curve-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.result-label {
  margin-bottom: 7px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tips-list {
  margin: 14px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.tips-list li + li {
  margin-top: 8px;
}

.plan-card {
  display: grid;
  gap: 18px;
  background:
    radial-gradient(circle at 94% 10%, rgba(138, 233, 241, 0.18), transparent 16rem),
    #ffffff;
}

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

.plan-item {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fbfdff;
}

.plan-item p {
  margin-bottom: 0;
}

.plan-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: clamp(18px, 3vw, 24px);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--navy), #252b65);
  color: #ffffff;
}

.cta-panel .result-label,
.cta-panel p {
  color: rgba(255, 255, 255, 0.76);
}

.cta-panel h3 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.cta-panel p:last-child {
  margin-bottom: 0;
}

.cta-panel .button {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--navy);
  white-space: nowrap;
}

.email-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4f8ff;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .flow-page {
    width: min(calc(100% - 24px), 920px);
    align-items: start;
  }

  .brand-strip,
  .preview-grid,
  .result-grid,
  .plan-grid,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .product-thumb {
    width: min(100%, 230px);
    justify-self: start;
    order: -1;
  }

  .status-row {
    grid-template-columns: 1fr;
  }

  .step-pill {
    width: fit-content;
  }
}

@media (max-width: 520px) {
  .flow-card {
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(30px, 9.5vw, 42px);
  }

  .answer-button {
    min-height: 64px;
    padding: 14px;
  }

  .nav-row,
  .button-row {
    flex-direction: column-reverse;
  }

  .button-row {
    flex-direction: column;
  }

  .nav-row .button,
  .nav-row .ghost-button,
  .button-row .button,
  .button-row .ghost-button,
  .email-form .button,
  .email-form .ghost-button {
    width: 100%;
  }
}
