:root {
  color-scheme: light;
  --night: #102434;
  --deep: #17384b;
  --hymn: #28536a;
  --mist: #f2f7f5;
  --white: #fbfdfc;
  --ink: #142630;
  --muted: #667b84;
  --line: #d9e3e2;
  --gold: #d9a441;
  --gold-dark: #a8751f;
  --rose: #b75f65;
  --shadow: 0 24px 70px rgba(9, 31, 43, 0.14);
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --body: "Avenir Next", Avenir, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.58; }

:focus-visible { outline: 3px solid rgba(217, 164, 65, 0.52); outline-offset: 3px; }

.ambient { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.ambient span:first-child { position: absolute; width: 620px; height: 620px; border-radius: 50%; background: rgba(40, 83, 106, 0.09); top: -390px; left: -210px; }
.ambient span:last-child { position: absolute; width: 500px; height: 500px; border: 1px solid rgba(217, 164, 65, 0.18); border-radius: 50%; right: -320px; top: 34%; box-shadow: 0 0 0 70px rgba(217, 164, 65, 0.025), 0 0 0 140px rgba(217, 164, 65, 0.018); }

.topbar {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(20, 38, 48, 0.1);
}

.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--night); text-decoration: none; font-weight: 750; letter-spacing: -0.02em; }
.wordmark-mark { width: 34px; height: 34px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; color: var(--gold-dark); }
.credit-pill { border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.72); color: var(--hymn); padding: 9px 13px; font-size: 12px; font-weight: 700; }
.credit-pill span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--night); color: white; margin-right: 5px; }

main { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.intro { text-align: center; padding: 76px 0 34px; max-width: 790px; margin: 0 auto; }
.eyebrow { margin: 0 0 14px; color: var(--hymn); font-size: 11px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
h1, h2, legend { font-family: var(--display); font-weight: 600; letter-spacing: -0.04em; }
h1 { margin: 0; font-size: clamp(48px, 8vw, 82px); line-height: 0.98; color: var(--night); }
.lede { max-width: 610px; margin: 24px auto 0; color: var(--muted); font-size: clamp(17px, 2.5vw, 21px); line-height: 1.58; }

.invite-banner { margin: 28px auto 0; max-width: 650px; padding: 15px; border: 1px solid rgba(217, 164, 65, 0.5); background: #fffaf0; border-radius: 18px; display: flex; align-items: center; gap: 13px; text-align: left; box-shadow: 0 12px 35px rgba(111, 76, 19, 0.08); }
.invite-banner[hidden] { display: none; }
.invite-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--night); }
.invite-banner div { flex: 1; }
.invite-banner p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.invite-banner button { border: 0; border-radius: 999px; background: var(--night); color: white; padding: 10px 17px; font-weight: 750; }

.wizard-shell { position: relative; max-width: 820px; min-height: 560px; margin: 0 auto 80px; border-radius: 30px; background: rgba(251, 253, 252, 0.94); border: 1px solid rgba(20, 38, 48, 0.1); box-shadow: var(--shadow); overflow: hidden; }
.progress { height: 4px; background: #e8efed; }
.progress span { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, var(--gold), #f0c96d); transition: width 320ms ease; }
form { padding: clamp(30px, 6vw, 62px); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.step { display: none; animation: rise 360ms ease both; }
.step.is-active { display: block; }
legend { display: block; width: 100%; padding: 0; color: var(--night); font-size: clamp(32px, 5vw, 48px); line-height: 1.08; }
.step-help { color: var(--muted); line-height: 1.55; margin: 12px 0 30px; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-card { min-height: 128px; position: relative; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; cursor: pointer; transition: border 180ms, transform 180ms, box-shadow 180ms; }
.choice-card:hover { transform: translateY(-2px); border-color: #b9cbc9; box-shadow: 0 10px 28px rgba(17, 53, 69, 0.08); }
.choice-card.is-selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 10px 30px rgba(217, 164, 65, 0.12); background: #fffdf7; }
.choice-card input, .promise-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-symbol { grid-row: 1 / 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #edf3f2; color: var(--hymn); font-family: var(--display); font-size: 21px; }
.choice-card strong { align-self: end; color: var(--night); }
.choice-card small { align-self: start; margin-top: 5px; color: var(--muted); line-height: 1.35; }
.intention-grid .choice-card:last-child { grid-column: 1 / -1; }

label > span { display: block; margin-bottom: 8px; color: var(--night); font-size: 13px; font-weight: 750; }
label em { color: var(--muted); font-weight: 500; font-style: normal; }
input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); padding: 14px 15px; transition: border 160ms, box-shadow 160ms; }
input:focus, textarea:focus { border-color: var(--hymn); box-shadow: 0 0 0 4px rgba(40, 83, 106, 0.08); outline: none; }
textarea { resize: vertical; min-height: 150px; line-height: 1.55; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-pair + label, .field-pair label, fieldset > label { display: block; margin-bottom: 20px; }

.voice-row { display: flex; align-items: center; gap: 14px; margin: 12px 0 24px; }
.voice-button { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; background: white; padding: 11px 15px; color: var(--hymn); font-weight: 750; }
.voice-button .mic { color: var(--rose); font-size: 10px; }
.voice-button.is-listening { border-color: var(--rose); background: #fff7f7; }
.voice-button.is-listening .mic { animation: pulse 1s infinite; }
.voice-row small { flex: 1; color: var(--muted); line-height: 1.4; }
.privacy-choice { background: #eef4f3; border-radius: 16px; padding: 17px; display: grid; gap: 10px; }
.privacy-choice > span { color: var(--night); font-size: 13px; font-weight: 750; }
.privacy-choice label { color: var(--muted); font-size: 13px; }
.privacy-choice input { width: auto; margin-right: 6px; }

.promise-list { display: grid; gap: 10px; }
.promise-card { position: relative; display: grid; grid-template-columns: 1fr auto; padding: 18px 52px 18px 18px; border: 1px solid var(--line); border-radius: 18px; background: white; cursor: pointer; }
.promise-card.is-selected { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: #fffdf7; }
.promise-card strong { color: var(--night); }
.promise-card > span:not(.promise-check) { color: var(--gold-dark); font-size: 12px; font-weight: 750; }
.promise-card small { grid-column: 1 / -1; color: var(--muted); margin-top: 7px; line-height: 1.45; }
.promise-check { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #edf3f2; color: transparent; }
.promise-card.is-selected .promise-check { background: var(--gold); color: var(--night); }

.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 34px; }
.step-actions.single { justify-content: flex-end; }
.primary-button, .pricing-grid button { border: 0; border-radius: 999px; background: var(--night); color: white; padding: 14px 21px; font-weight: 780; box-shadow: 0 9px 22px rgba(16, 36, 52, 0.16); }
.primary-button:hover, .pricing-grid button:hover { background: var(--deep); transform: translateY(-1px); }
.text-button, .quiet-button { border: 0; background: transparent; color: var(--hymn); padding: 10px 4px; font-weight: 750; text-decoration: underline; text-decoration-color: rgba(40, 83, 106, 0.25); text-underline-offset: 4px; }
.quiet-button { margin-top: 12px; }

.review-card { margin-top: 28px; border: 1px solid var(--line); border-radius: 22px; padding: 24px; background: linear-gradient(145deg, #f5faf8, white); }
.review-thread { width: 58px; height: 58px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 22px; color: var(--gold-dark); box-shadow: 0 0 0 8px rgba(217, 164, 65, 0.08); }
.review-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.review-card dl div { border-top: 1px solid var(--line); padding-top: 10px; }
.review-card dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; }
.review-card dd { margin: 4px 0 0; color: var(--night); font-weight: 750; }
.review-card p { border-top: 1px solid var(--line); margin: 18px 0 0; padding-top: 18px; color: var(--muted); font-family: var(--display); font-size: 18px; line-height: 1.5; }
.credit-notice { display: flex; gap: 6px; flex-direction: column; margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #eef4f3; color: var(--muted); font-size: 13px; }
.credit-notice strong { color: var(--hymn); }

.generating, .result { padding: clamp(44px, 8vw, 80px); text-align: center; }
.pulse-note { width: 86px; height: 86px; margin: 0 auto 28px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-dark); font-size: 32px; animation: pulse 1.7s infinite; }
.generating h2, .result h2 { margin: 0; color: var(--night); font-size: clamp(34px, 6vw, 52px); }
.generating p { color: var(--muted); }
.generation-line { max-width: 380px; height: 5px; border-radius: 99px; background: #e5ecea; overflow: hidden; margin: 26px auto 0; }
.generation-line span { display: block; width: 35%; height: 100%; border-radius: 99px; background: var(--gold); animation: travel 1.8s infinite ease-in-out; }
.result-audio { max-width: 520px; margin: 30px auto 12px; padding: 22px; border-radius: 22px; background: var(--night); color: white; }
.result-audio audio { width: 100%; }
.demo-audio { display: grid; gap: 5px; justify-items: center; }
.demo-audio > span { font-size: 32px; color: #f3d27e; }
.demo-audio small { color: #b9ccd3; }
.result-private { color: var(--muted); font-size: 13px; }
.share-actions { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 24px 0; }
.reminder-optin { max-width: 560px; margin: 40px auto 0; padding: 18px; text-align: left; border-radius: 16px; background: #edf3f2; }
.reminder-optin label { color: var(--night); font-weight: 700; }
.reminder-optin input[type="checkbox"] { width: auto; }
.reminder-optin small { display: block; margin-top: 9px; color: var(--muted); }
#reminderFields { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
#reminderFields button { border: 0; border-radius: 12px; background: var(--hymn); color: white; padding: 0 15px; font-weight: 750; }

.pricing-panel { position: fixed; inset: 50% auto auto 50%; transform: translate(-50%, -50%); z-index: 20; width: min(760px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow: auto; padding: clamp(28px, 5vw, 48px); border-radius: 28px; background: var(--white); box-shadow: 0 40px 120px rgba(5, 21, 30, 0.42); }
.pricing-panel[hidden] { display: none; }
body.pricing-open:before { content: ""; position: fixed; inset: 0; z-index: 19; background: rgba(9, 27, 38, 0.58); backdrop-filter: blur(5px); }
.close-button { position: absolute; right: 20px; top: 17px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #edf3f2; color: var(--night); font-size: 24px; }
.pricing-panel h2 { max-width: 520px; margin: 0 0 26px; color: var(--night); font-size: clamp(34px, 6vw, 50px); line-height: 1.04; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pricing-grid article { padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.pricing-grid article.membership-card { border-color: var(--gold); background: #fffdf7; }
.plan-type { color: var(--hymn); text-transform: uppercase; font-size: 10px; font-weight: 850; letter-spacing: 0.14em; }
.pricing-grid h3 { margin: 12px 0 8px; }
.pricing-grid strong { display: block; color: var(--night); font-family: var(--display); font-size: 36px; }
.pricing-grid strong small { font-family: var(--body); font-size: 12px; color: var(--muted); }
.pricing-grid p { min-height: 44px; color: var(--muted); line-height: 1.45; font-size: 13px; }
.pricing-grid button { width: 100%; }
.pricing-footnote { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0 0; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translate(-50%, 150%); max-width: calc(100% - 30px); border-radius: 14px; background: var(--night); color: white; padding: 13px 17px; box-shadow: 0 15px 40px rgba(7, 24, 34, 0.28); opacity: 0; transition: 220ms ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { background: #7f3339; }
footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; min-height: 90px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(20, 38, 48, 0.1); color: var(--muted); font-size: 13px; }
footer button { border: 0; background: none; color: var(--hymn); text-decoration: underline; }

@keyframes rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(217, 164, 65, 0.06); } }
@keyframes travel { 0% { transform: translateX(-110%); } 100% { transform: translateX(400%); } }

@media (max-width: 650px) {
  .topbar, main, footer { width: min(100% - 24px, 1120px); }
  .topbar { min-height: 68px; }
  .wordmark > span:last-child { display: none; }
  .intro { padding-top: 52px; }
  h1 { font-size: clamp(44px, 14vw, 62px); }
  .wizard-shell { margin-bottom: 38px; border-radius: 22px; }
  form { padding: 28px 18px 24px; }
  legend { font-size: 34px; }
  .choice-grid, .field-pair, .pricing-grid { grid-template-columns: 1fr; }
  .intention-grid .choice-card:last-child { grid-column: auto; }
  .choice-card { min-height: 112px; }
  .voice-row { align-items: flex-start; flex-direction: column; }
  .review-card dl { grid-template-columns: 1fr; }
  .step-actions { margin-top: 26px; }
  .primary-button { padding: 13px 17px; }
  .share-actions { flex-direction: column; gap: 4px; }
  .share-actions .primary-button { width: 100%; }
  #reminderFields { grid-template-columns: 1fr; }
  #reminderFields button { min-height: 44px; }
  .pricing-grid p { min-height: auto; }
}

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