:root {
  --burgundy: #670038;
  --burgundy-deep: #4E002B;
  --cream: #FAF6EC;
  --gold-bronze: #77531F;
  --gold-mid: #BA9A51;
  --gold-soft: #DCC97A;
  --gold-dark-ui: #D8B65C;
  --bg: var(--cream);
  --ink: var(--burgundy);
  --accent: var(--gold-mid);      /* lines and ornaments */
  --accent-text: #8F5B0D; /* small words in light mode: warm gold-brown (Amy's option B) */
  --tag-ink: #000;
  --realtor-ink: #000;
  --btn-bg: var(--gold-mid);
  --btn-ink: var(--burgundy);
  --font-head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Hanken Grotesk", -apple-system, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--burgundy);
    --ink: var(--cream);
    --accent: var(--gold-dark-ui);
    --accent-text: var(--gold-dark-ui);
    --tag-ink: var(--gold-dark-ui);
    --realtor-ink: var(--gold-dark-ui);
    --btn-bg: var(--gold-dark-ui);
    --btn-ink: var(--burgundy);
  }
}
:root[data-theme="dark"] {
  --bg: var(--burgundy);
  --ink: var(--cream);
  --accent: var(--gold-dark-ui);
  --accent-text: var(--gold-dark-ui);
    --tag-ink: var(--gold-dark-ui);
    --realtor-ink: var(--gold-dark-ui);
  --btn-bg: var(--gold-dark-ui);
  --btn-ink: var(--burgundy);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
.screen {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 40px) 28px calc(env(safe-area-inset-bottom) + 24px);
  text-align: center;
}
.stage > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.stage > *:nth-child(2) { animation-delay: .08s; }
.stage > *:nth-child(3) { animation-delay: .16s; }
.stage > *:nth-child(4) { animation-delay: .24s; }
.stage > *:nth-child(n+5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .stage > * { animation: none; } }

.portrait { display: block; width: min(72vw, 300px); height: auto; margin: 8px auto 0; aspect-ratio: 1 / 1; }

.stage > picture { display: block; }
.signature { display: block; margin: 36px auto 0; width: 92%; max-width: 440px; height: auto; }
.sig-text {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(44px, 13vw, 62px);
  line-height: 1.1;
  margin: 40px 0 0;
  color: var(--tag-ink);
}
.realtor {
  margin: 2px 0 0;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .5em;
  padding-left: .5em; /* balances trailing letter-spacing so it centers */
  text-transform: uppercase;
  color: var(--realtor-ink);
}
.ring-line {
  height: 2px; width: 150px; border: 0; margin: 36px auto 0;
  background: linear-gradient(90deg, #77531F, #BA9A51, #DCC97A, #BA9A51);
  border-radius: 2px;
}
.label {
  margin: 26px 0 0;
  font-size: 12px; font-weight: 600; letter-spacing: .38em; padding-left: .38em;
  color: var(--accent-text);
}
.bio { margin: 22px 0 0; font-size: 17px; max-width: 65ch; margin-inline: auto; }
.bio + .bio { margin-top: 18px; }
.tagline {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(22px, 6.4vw, 28px);
  line-height: 1.3;
  color: var(--tag-ink);
  margin: 40px 0 36px;
  text-wrap: balance;
}
.sign-off {
  margin: 44px 0 0;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3em; padding-left: .3em;
  text-transform: uppercase;
}
.btn {
  display: inline-block;
  margin-top: 28px;
  min-height: 52px;
  padding: 15px 34px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: 600 16px/1.2 var(--font-body);
  letter-spacing: .04em;
  text-decoration: none;
  border: 0; border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn:focus-visible, .link:focus-visible, .btn-quiet:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.footer { margin: 44px auto 0; font-size: 12px; line-height: 1.6; opacity: .82; max-width: 34ch; }
.confirm {
  display: inline-block; margin-top: 10px;
  font: 600 11px/1.5 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 10px; border: 1px dashed var(--accent-text); border-radius: 6px; color: var(--accent-text);
}
.link {
  display: inline-block; margin-top: 30px; background: none; border: 0; padding: 12px;
  color: var(--accent-text); font: 500 14px var(--font-body); letter-spacing: .06em; text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
dialog {
  border: 1px solid var(--accent); border-radius: 18px; padding: 28px; max-width: min(88vw, 380px);
  background: var(--bg); color: var(--ink); text-align: center;
}
dialog::backdrop { background: rgba(40,0,22,.6); }
dialog h2 { font-family: var(--font-head); font-weight: 500; font-size: 24px; margin: 0 0 12px; }
dialog p { margin: 0 0 18px; }
.btn-quiet { background: none; border: 1px solid var(--accent); color: var(--ink); border-radius: 999px; padding: 12px 26px; font: 500 15px var(--font-body); min-height: 44px; }

/* ---------- bottom bar ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.tab {
  flex: 1; max-width: 200px; min-height: 48px; display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--ink); font: 500 14px var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  border-radius: 999px; opacity: .72;
}
.tab[aria-current="page"] { opacity: 1; color: var(--accent-text); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }
.tab:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* ---------- home and doors ---------- */
.portrait.small { width: 118px; margin-top: 0; }
.door-title { font-family: var(--font-head); font-weight: 400; font-size: clamp(30px, 8.4vw, 40px); line-height: 1.15; margin: 22px 0 0; text-wrap: balance; }
.home-title { margin-top: 24px; }
.lead { font-family: var(--font-head); font-style: italic; font-weight: 300; font-size: 21px; margin: 14px 0 0; color: var(--accent-text); }
.label.first { margin-top: 8px; }
.doors { margin-top: 30px; display: grid; gap: 14px; }
.door-card {
  display: block; text-align: left; text-decoration: none; color: var(--ink);
  padding: 24px 24px 22px; border-radius: 20px;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  box-shadow: 0 14px 34px rgba(0,0,0,.12);
}
.door-card:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.door-card-title { display: block; font-family: var(--font-head); font-weight: 500; font-size: 24px; line-height: 1.2; }
.door-card-text { display: block; margin-top: 8px; font-size: 16px; line-height: 1.55; opacity: .9; }
.door-card-go { display: inline-block; margin-top: 14px; font: 700 13px var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); }

/* ---------- questions ---------- */
.door { text-align: center; }
.qhead { margin-top: 4px; }
.progress-text { margin: 0; font: 600 12px var(--font-body); letter-spacing: .26em; text-transform: uppercase; color: var(--accent-text); }
.progress { height: 3px; margin: 12px auto 0; max-width: 240px; background: color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #77531F, #BA9A51, #DCC97A); transition: width .4s ease; }
.qtext { font-family: var(--font-head); font-weight: 400; font-size: clamp(26px, 7.4vw, 33px); line-height: 1.2; margin: 30px 0 0; text-wrap: balance; }
.help { margin: 10px 0 0; font-size: 15px; opacity: .85; }
.options { margin: 26px 0 0; display: grid; gap: 10px; text-align: left; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt-text {
  display: flex; align-items: center; min-height: 56px; padding: 14px 20px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  font-size: 17px; line-height: 1.35; transition: background .2s, border-color .2s;
}
.opt input:checked + .opt-text { background: var(--accent); color: var(--burgundy); border-color: var(--accent); font-weight: 600; }
.opt input:focus-visible + .opt-text { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.opt input:disabled + .opt-text { opacity: .4; }
.field {
  width: 100%; min-height: 54px; margin-top: 26px; padding: 14px 18px; font: 400 17px var(--font-body);
  color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent);
  border: 1px solid var(--accent); border-radius: 14px;
}
.field:focus { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.field::placeholder { color: color-mix(in srgb, var(--ink) 55%, transparent); }
.navrow { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 34px; }
.navrow .btn { margin-top: 0; }
.btn[aria-disabled="true"] { opacity: .5; }

/* ---------- plan ---------- */
.summary { margin: 14px 0 0; font-size: 16px; opacity: .9; }
.section-title { font-family: var(--font-head); font-weight: 500; font-size: 24px; margin: 44px 0 0; }
.cards { margin-top: 18px; display: grid; gap: 12px; text-align: left; }
.card { padding: 20px 22px; border-radius: 18px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.card-title { font-family: var(--font-head); font-weight: 600; font-size: 26px; margin: 0; color: var(--accent-text); }
.card-why { margin: 6px 0 0; font-size: 16px; line-height: 1.55; }
.note { margin: 16px auto 0; font-size: 14px; opacity: .85; max-width: 34ch; }
.timeline { list-style: none; padding: 0; margin: 20px 0 0; text-align: left; counter-reset: step; }
.timeline li { position: relative; padding: 0 0 22px 52px; counter-increment: step; }
.timeline li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font: 600 15px var(--font-head); color: var(--burgundy); background: var(--accent);
}
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 16.5px; top: 38px; bottom: 4px; width: 1px; background: var(--accent); opacity: .6; }
.when { display: block; font: 700 12px var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 4px; }
.what { display: block; font-size: 16px; line-height: 1.55; }
.extras { text-align: left; margin: 10px 0 0; padding-left: 20px; font-size: 16px; line-height: 1.6; }
.extras li { margin-top: 8px; }
.bookwrap { margin-top: 4px; }
.send { margin-top: 10px; text-align: left; }
.send .section-title, .send .help { text-align: center; }
.flabel { display: block; margin-top: 14px; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.flabel .field { margin-top: 6px; }
.check { display: flex; gap: 12px; align-items: center; margin-top: 18px; font-size: 16px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.send .note { text-align: center; }
.send .btn { display: block; margin: 24px auto 0; }
.send .confirm { display: block; width: auto; max-width: 100%; margin: 12px auto 0; text-align: center; line-height: 1.5; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.formmsg { text-align: center; margin: 14px 0 0; min-height: 1.4em; }
.signature.sig-home { width: 74%; max-width: 320px; margin-top: 14px; }
.home-title { margin-top: 18px; font-size: clamp(26px, 7.2vw, 34px); }
.field.area { resize: vertical; min-height: 120px; font-family: var(--font-body); line-height: 1.5; }
.summary-title { font-size: clamp(24px, 6.6vw, 30px); margin-top: 14px; }
.btn.btn-second { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.section-title { line-height: 1.3; text-wrap: balance; }

/* ---------- Door 4 ---------- */
.segmented, .toggle { display: flex; gap: 8px; margin: 28px 0 0; padding: 5px; border: 1px solid var(--accent); border-radius: 999px; }
.toggle { margin-top: 18px; }
.seg { flex: 1; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: 600 14px/1.2 var(--font-body); letter-spacing: .03em; cursor: pointer; }
.seg[aria-selected="true"], .seg[aria-pressed="true"] { background: var(--accent); color: var(--burgundy); }
.seg:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.when.plain { letter-spacing: .01em; text-transform: none; font: 600 18px/1.3 var(--font-head); color: var(--accent-text); }
.compare-card { margin-top: 16px; text-align: left; }
.compare-card:focus { outline: none; }
.extras.flush { margin-top: 10px; padding-left: 20px; }
.callout { margin-top: 28px; padding: 22px; text-align: left; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 0 16px 16px 0; }
.callout .card-title { font-size: 21px; }
.door .bookwrap { margin-top: 28px; }

/* ---------- Door 3 ---------- */
.tagline.small { font-size: clamp(19px, 5.4vw, 23px); margin: 22px 0 0; }
.back { display: block; text-align: left; margin: -10px 0 6px; padding: 12px 0; }
.label.tight { margin: 14px 0 0; }
.facts { margin: 14px 0 0; padding: 0; text-align: left; display: grid; gap: 12px; }
.fact { padding: 16px 18px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.fact dt { font: 600 13px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.fact dd { margin: 0; }
.fact-value { font-family: var(--font-head); font-weight: 500; font-size: 30px; line-height: 1.2; margin-top: 4px; }
.fact-source { font-size: 13px; line-height: 1.5; opacity: .85; margin-top: 4px; }
.rating { margin: 8px 0 0; font: 600 17px var(--font-body); }
.inline-link { display: inline-block; margin-top: 10px; color: var(--accent-text); font: 600 15px var(--font-body); text-underline-offset: 4px; padding: 6px 0; }
.inline-link.block { display: block; }
.door > .btn { margin-top: 30px; }
.door .bookwrap .btn { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* ---------- fixes from the fresh-eyes pass ---------- */
body { overflow-wrap: anywhere; }
#app.settling { pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.stage.no-anim > * { animation: none; }

/* ---------- footer on every screen ---------- */
.legal { max-width: 520px; margin: 0 auto; padding: 4px 28px calc(env(safe-area-inset-bottom) + 110px); text-align: center; font-size: 12px; line-height: 1.7; color: var(--ink); }
.legal .rule { width: 64px; height: 1px; margin: 0 auto 18px; background: var(--accent); }
.legal picture, .legal .eho { display: block; }
.legal .eho { height: 46px; width: auto; margin: 0 auto 12px; }
.legal p { margin: 2px 0; }
.legal .legal-name { font-weight: 700; letter-spacing: .02em; }
.legal .legal-links { margin-top: 8px; }
.legal a { display: block; width: fit-content; margin: 0 auto; padding: 12px 6px; font-size: 14px; line-height: 1.3; color: var(--accent-text); font-weight: 600; text-underline-offset: 3px; }
.legal a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

/* ---------- thank-you screen ---------- */
.thanks .timeline { margin-top: 18px; }
.thanks .what { font-size: 17px; }
.thanks .tagline { margin: 38px 0 6px; }
.thanks .signature { margin-top: 10px; }

[tabindex="-1"]:focus { outline: none; }
