:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #8e8e93;
  --line: rgba(29, 29, 31, 0.1);
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --canvas: #f5f5f7;
  --blue: #0071e3;
  --blue-dark: #005bb7;
  --blue-soft: #e8f2ff;
  --green: #248a3d;
  --red: #d70015;
  --shadow: 0 30px 80px rgba(20, 28, 46, 0.1);
  --radius-xl: 36px;
  --radius-lg: 26px;
  --radius-md: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 7%, rgba(93, 166, 255, 0.11), transparent 26rem),
    radial-gradient(circle at 90% 32%, rgba(139, 92, 246, 0.07), transparent 28rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.26;
  pointer-events: none;
}

.ambient-one { left: -8rem; top: 28%; background: #7db8ff; }
.ambient-two { right: -10rem; bottom: 6%; background: #bda6ff; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  appearance: none;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: transparent;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: white;
  background: var(--ink);
  border-radius: 9px;
  font-weight: 750;
  letter-spacing: -0.05em;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.view { display: none; }
.view.is-active { display: block; animation: view-in 0.45s cubic-bezier(.2,.7,.2,1) both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-view {
  min-height: calc(100vh - 164px);
  padding: 64px 0 100px;
  grid-template-columns: 1.14fr 0.86fr;
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
}

.intro-view.is-active { display: grid; }
.intro-copy { max-width: 700px; }

.eyebrow,
.section-label,
.question-kicker {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro-copy h1,
.results-hero h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.6rem);
  line-height: 0.97;
  letter-spacing: -0.065em;
  font-weight: 720;
}

.intro-copy h1 span {
  color: transparent;
  background: linear-gradient(100deg, #0878e9 10%, #6555de 92%);
  -webkit-background-clip: text;
  background-clip: text;
}

.intro-lede {
  max-width: 610px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
  letter-spacing: -0.018em;
}

.intro-actions { display: flex; align-items: center; gap: 22px; margin-top: 38px; }

.primary-button,
.back-button,
.quiet-button,
.text-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 50px;
  padding: 0 26px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.primary-button {
  color: white;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(0, 113, 227, 0.2);
}

.primary-button:hover { background: var(--blue-dark); transform: translateY(-1px); }
.primary-button:active { transform: translateY(0); }

.back-button,
.quiet-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.back-button:hover,
.quiet-button:hover { background: #fff; }

.text-button {
  padding-inline: 4px;
  color: var(--blue);
  background: transparent;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 0.84rem;
}

.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row i { width: 6px; height: 6px; border-radius: 50%; background: #34c759; }

.preview-card {
  position: relative;
  overflow: hidden;
  padding: 32px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.preview-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -50% 30%;
  height: 13rem;
  background: rgba(0, 113, 227, 0.1);
  filter: blur(60px);
}

.preview-topline { position: relative; z-index: 1; display: flex; justify-content: space-between; color: var(--muted); font-size: 0.9rem; }
.pill { padding: 5px 10px; border-radius: 999px; color: var(--blue); background: var(--blue-soft); font-size: 0.74rem; font-weight: 700; }

.preview-number {
  position: relative;
  z-index: 1;
  margin: 42px 0 22px;
  font-size: clamp(3.5rem, 7vw, 5.2rem);
  font-weight: 720;
  letter-spacing: -0.06em;
}

.preview-number span { margin-left: 5px; font-size: 1.15rem; letter-spacing: 0; font-weight: 600; color: var(--muted); }

.preview-progress,
.progress-track,
.metric-bar {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.08);
}

.preview-progress span { display: block; width: 68%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0071e3, #7c6ce7); }

.preview-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.preview-grid div { padding-top: 17px; border-top: 1px solid var(--line); }
.preview-grid small { display: block; margin-bottom: 7px; color: var(--muted); }
.preview-grid strong { font-size: 1rem; }
.preview-note { position: relative; z-index: 1; margin: 28px 0 0; color: var(--faint); font-size: 0.78rem; line-height: 1.5; }

.hidden { display: none !important; }

.wizard-view {
  width: min(770px, 100%);
  min-height: calc(100vh - 164px);
  margin: 0 auto;
  padding: 36px 0 90px;
}

.progress-shell { margin-bottom: 34px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 11px; color: var(--muted); font-size: 0.84rem; }
.progress-meta b { color: var(--ink); font-weight: 680; }
.progress-track { height: 5px; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .35s ease; }

.question-card {
  min-height: 455px;
  padding: clamp(32px, 6vw, 58px);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 70px rgba(22, 31, 50, 0.08);
  backdrop-filter: blur(24px);
}

.question-card.animate { animation: question-in .32s cubic-bezier(.2,.7,.2,1) both; }

@keyframes question-in {
  from { opacity: 0; transform: translateX(13px); }
  to { opacity: 1; transform: translateX(0); }
}

.question-kicker { margin-bottom: 15px; }
.question-card h2 { max-width: 650px; margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -0.052em; }
.question-help { max-width: 620px; min-height: 1.6em; margin: 16px 0 32px; color: var(--muted); font-size: 1rem; line-height: 1.62; }

.answer-area { margin-top: 12px; }

.select-answer { display: block; width: min(100%, 560px); }
.select-answer select {
  appearance: none;
  width: 100%;
  min-height: 68px;
  padding: 0 52px 0 20px;
  color: var(--ink);
  background-color: rgba(255,255,255,.76);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 23px) 29px, calc(100% - 17px) 29px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  font-size: 1.05rem;
  font-weight: 620;
}
.select-answer select:focus { border-color: var(--blue); }
.preset-meta { margin: 14px 2px 0; color: var(--faint); font-size: .82rem; }
.preset-meta.is-visible { color: var(--blue-dark); }

.number-answer {
  display: flex;
  align-items: baseline;
  width: min(100%, 460px);
  border-bottom: 2px solid rgba(29, 29, 31, 0.14);
  transition: border-color .2s ease;
}

.number-answer:focus-within { border-color: var(--blue); }
.number-answer .prefix { margin-right: 8px; color: var(--muted); font-size: 1.6rem; }
.number-answer input {
  width: 100%;
  padding: 10px 0 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
  font-size: clamp(2.7rem, 8vw, 4.8rem);
  line-height: 1;
  font-weight: 680;
  letter-spacing: -0.055em;
}
.number-answer .suffix { white-space: nowrap; margin-left: 12px; color: var(--muted); font-size: 1rem; }

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

.option-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 74px;
  padding: 18px 48px 18px 20px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.option-card:hover { transform: translateY(-1px); border-color: rgba(0,113,227,.35); }
.option-card.is-selected { border-color: var(--blue); background: var(--blue-soft); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card span { font-size: 0.98rem; line-height: 1.35; }
.option-card::after {
  content: "";
  position: absolute;
  right: 20px;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(29,29,31,.2);
  border-radius: 50%;
}
.option-card.is-selected::after { border: 5px solid var(--blue); background: white; }

.range-answer { width: min(100%, 570px); }
.range-value { display: flex; align-items: baseline; gap: 8px; margin-bottom: 30px; }
.range-value strong { font-size: clamp(3rem, 7vw, 4.6rem); letter-spacing: -0.055em; }
.range-value span { color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--blue); cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; margin-top: 11px; color: var(--faint); font-size: 0.78rem; }

.validation-message { min-height: 1.3em; margin: 18px 0 0; color: var(--red); font-size: 0.85rem; }
.wizard-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; }
.wizard-nav .back-button { min-width: 100px; }
.next-button { min-width: 120px; }

.results-view { padding: 54px 0 100px; }

.results-hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: end;
  gap: 70px;
  padding: 30px 0 70px;
}

.results-hero h1 { max-width: 760px; font-size: clamp(2.8rem, 6vw, 5.8rem); }
.results-summary { max-width: 720px; margin: 26px 0 0; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }

.result-hero-number {
  padding: 28px 30px;
  background: var(--ink);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(29,29,31,.18);
}
.result-hero-number span { color: rgba(255,255,255,.65); font-size: .86rem; }
.result-hero-number strong { display: block; margin: 24px 0 7px; font-size: clamp(2.7rem, 6vw, 4.8rem); letter-spacing: -.06em; }
.result-hero-number small { color: rgba(255,255,255,.56); }

.scenario-switch {
  display: inline-flex;
  gap: 5px;
  padding: 5px;
  background: rgba(29,29,31,.07);
  border-radius: 999px;
  margin-bottom: 24px;
}

.scenario-switch button {
  border: 0;
  padding: 10px 20px;
  color: var(--muted);
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 620;
}
.scenario-switch button.is-active { color: var(--ink); background: white; box-shadow: 0 3px 12px rgba(29,29,31,.08); }

.metric-grid { display: grid; grid-template-columns: 1.45fr 1fr 1fr; gap: 18px; }
.metric-card { padding: 28px; min-height: 190px; background: var(--surface-strong); border: 1px solid rgba(29,29,31,.06); border-radius: var(--radius-lg); }
.metric-card p { margin: 0; color: var(--muted); }
.metric-card strong { display: block; margin: 30px 0 10px; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.055em; }
.metric-card small { color: var(--faint); }
.primary-metric { background: linear-gradient(145deg, #f0f7ff, #ffffff 72%); }
.primary-metric strong { color: var(--blue-dark); }
.metric-bar { height: 6px; margin: 20px 0 11px; }
.metric-bar span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .55s ease; }

.results-section {
  margin-top: 22px;
  padding: clamp(30px, 5vw, 54px);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(29,29,31,.06);
  border-radius: var(--radius-xl);
}

.split-section { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(40px, 7vw, 90px); align-items: center; }
.results-section h2 { margin: 0; font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.08; letter-spacing: -.045em; }
.section-copy { margin: 20px 0 0; color: var(--muted); line-height: 1.7; }
.section-label { margin-bottom: 15px; }

.formula-card { padding: 7px 24px; background: var(--canvas); border-radius: var(--radius-lg); }
.formula-card div { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.formula-card div:last-child { border: 0; }
.formula-card span { color: var(--muted); }
.formula-total strong { color: var(--blue-dark); font-size: 1.2rem; }

.section-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.section-heading-row > p { max-width: 390px; margin: 0; color: var(--muted); line-height: 1.6; }
.table-shell { overflow-x: auto; border: 1px solid var(--line); border-radius: 19px; }
table { width: 100%; border-collapse: collapse; min-width: 690px; }
th, td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #fafafa; font-size: .82rem; font-weight: 620; }
td { font-size: .94rem; }
tbody tr:last-child td { border-bottom: 0; }
.status-tag { display: inline-block; padding: 6px 10px; color: var(--muted); background: var(--canvas); border-radius: 999px; font-size: .75rem; font-weight: 650; }
.status-tag.good { color: var(--green); background: #eaf7ed; }

.bar-chart { display: grid; gap: 20px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr 82px; align-items: center; gap: 16px; }
.bar-row > span { color: var(--muted); font-size: .86rem; }
.bar-row > strong { text-align: right; font-size: .88rem; }
.bar-track { height: 30px; padding: 4px; background: var(--canvas); border-radius: 999px; }
.bar-fill { height: 100%; min-width: 8px; border-radius: 999px; background: linear-gradient(90deg, #0071e3, #7f6ce8); transition: width .5s ease; }
.bar-target { margin: 8px 98px 0 86px; padding-top: 12px; color: var(--faint); border-top: 1px dashed rgba(29,29,31,.18); font-size: .78rem; text-align: right; }

.assumptions-section { padding-block: 8px; }
details { padding: 0 16px; }
summary { padding: 22px 0; cursor: pointer; font-weight: 650; }
.assumptions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 30px; padding: 4px 0 24px; color: var(--muted); line-height: 1.6; }
.assumptions-grid p { margin: 0; }
.assumptions-grid strong { color: var(--ink); }

.results-actions { display: flex; gap: 14px; justify-content: center; margin-top: 34px; }
.disclaimer { max-width: 900px; margin: 34px auto 0; color: var(--faint); text-align: center; font-size: .78rem; line-height: 1.6; }

footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: .78rem;
}

@media (max-width: 900px) {
  .intro-view.is-active,
  .results-hero,
  .split-section { grid-template-columns: 1fr; }
  .intro-view { padding-top: 40px; gap: 64px; }
  .preview-card { max-width: 610px; }
  .results-hero { gap: 40px; }
  .result-hero-number { max-width: 520px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .primary-metric { grid-column: span 2; }
  .section-heading-row { align-items: start; flex-direction: column; }
}

@media (max-width: 620px) {
  .site-header,
  main,
  footer { width: min(100% - 28px, 1180px); }
  .site-header { height: 70px; }
  .site-header .quiet-button { min-height: 40px; padding-inline: 16px; font-size: .82rem; }
  .intro-view { min-height: auto; padding: 46px 0 80px; }
  .intro-copy h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .intro-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .trust-row { flex-direction: column; gap: 11px; }
  .preview-card { padding: 25px; border-radius: 28px; }
  .preview-grid { grid-template-columns: 1fr; gap: 10px; }
  .wizard-view { padding-top: 22px; }
  .question-card { min-height: 430px; padding: 30px 24px; border-radius: 28px; }
  .option-grid { grid-template-columns: 1fr; }
  .wizard-nav .back-button { min-width: 86px; }
  .results-view { padding-top: 34px; }
  .results-hero { padding-bottom: 48px; }
  .metric-grid { grid-template-columns: 1fr; }
  .primary-metric { grid-column: auto; }
  .results-section { padding: 28px 22px; border-radius: 28px; }
  .formula-card { padding-inline: 18px; }
  .formula-card div { align-items: start; flex-direction: column; gap: 6px; }
  .bar-row { grid-template-columns: 58px 1fr 70px; gap: 10px; }
  .bar-target { margin-inline: 68px 80px; }
  .assumptions-grid { grid-template-columns: 1fr; }
  .results-actions { flex-direction: column; }
  footer { gap: 12px; flex-direction: column; }
}

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

:focus-visible { outline: 3px solid rgba(0, 113, 227, .32); outline-offset: 3px; }
