:root {
  --ink: #141414;
  --muted: #67635e;
  --paper: #f4f0e9;
  --paper-dark: #e8e2d8;
  --white: #fff;
  --line: #d9d2c8;
  --wine: #681f2b;
  --wine-light: #8e3443;
  --gold: #a88652;
  --danger: #a42d2d;
  --control-radius: 5px;
  --shadow: 0 28px 90px rgba(28, 22, 17, .15);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #ddd8d0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; touch-action: manipulation; }
button, input { -webkit-appearance: none; appearance: none; }
input[type="checkbox"], input[type="radio"] { -webkit-appearance: auto; appearance: auto; }

.quiz-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: var(--shadow);
  position: relative;
  overflow: clip;
}

.topbar {
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid rgba(20, 20, 20, .1);
  background: rgba(244, 240, 233, .97);
  position: relative;
  z-index: 10;
}
.wordmark {
  color: var(--ink);
  font: 700 21px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: .075em;
  text-decoration: none;
}
.wordmark { display: inline-flex; align-items: center; }
.wordmark img { display: block; width: 175px; height: 48px; object-fit: contain; }
.topbar__caption { color: #827c74; font-size: 10px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.close-button {
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 1px solid #d5cec3;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 25px;
  line-height: 32px;
  transition: background .18s ease, color .18s ease;
}
.close-button:hover { background: var(--ink); color: white; }
.is-embedded .close-button { visibility: hidden; }
.is-embedded .topbar { position: sticky; top: 0; }
.progress { height: 3px; background: #ddd6cc; }
.progress__bar { display: block; width: 0; height: 100%; background: var(--wine); transition: width .3s ease; }

.screen {
  display: none;
  min-height: calc(100vh - 71px);
  min-height: calc(100dvh - 71px);
  position: relative;
}
.screen.is-active { display: flex; animation: reveal .3s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.screen--intro { padding: 0; align-items: stretch; }
.intro-media { width: 52%; min-height: calc(100vh - 68px); min-height: calc(100dvh - 68px); position: relative; overflow: hidden; background: #222; }
.intro-media picture, .intro-media img { display: block; width: 100%; height: 100%; }
.intro-media img { object-fit: cover; object-position: 50% 50%; }
.intro-media__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02) 45%, rgba(0,0,0,.52)); }
.intro-media__note { position: absolute; left: 34px; right: 34px; bottom: 29px; display: flex; align-items: end; justify-content: space-between; color: white; }
.intro-media__note span { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.intro-media__note b { font-size: 12px; }
.intro-copy {
  width: 48%;
  padding: clamp(38px, 7vh, 76px) clamp(34px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
}
.eyebrow, .step-label { color: var(--wine); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-weight: 700; }
/* Screen headings receive focus for screen readers, without a control outline. */
.screen h1[tabindex="-1"]:focus, .screen h2[tabindex="-1"]:focus { outline: none; }
h1 { margin-top: 20px; font-size: clamp(42px, 4vw, 48px); line-height: 1.08; letter-spacing: -.03em; }
h2 { margin-top: 9px; font-size: clamp(34px, 4vw, 48px); line-height: 1.08; letter-spacing: -.025em; }
.intro-lead { max-width: 490px; margin: 24px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.65; }

.primary-button {
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--ink);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  font-size: 16px;
  line-height: 1.3;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
.primary-button i { font-style: normal; font-size: 19px; }
.primary-button:hover { background: var(--wine); transform: translateY(-1px); }
.primary-button:focus-visible, .choice:focus-visible, input:focus-visible { outline: 3px solid rgba(104,31,43,.25); outline-offset: 2px; }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.primary-button--wide { width: 100%; justify-content: space-between; }
.benefits { margin: 22px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; color: #56524c; font-size: 10px; line-height: 1.4; }
.benefits li { display: flex; flex-direction: column; gap: 6px; align-items: center; min-width: 0; padding: 0; border: 0; background: none; text-align: center; }
.benefits li span { max-width: 105px; text-wrap: balance; }
.benefits li svg { width: 16px; height: 16px; flex: 0 0 16px; color: #292723; }

.screen--question { flex-direction: column; padding: 40px 50px 0; }
.screen-inner { width: min(940px, 100%); margin: 0 auto; padding-bottom: 26px; }
.screen-inner--narrow { width: min(760px, 100%); }
.question-head { margin-bottom: 25px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.question-head p { max-width: 270px; margin: 0 0 5px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }

.choice-grid { display: grid; gap: 12px; }
.choice-grid--visual { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.choice {
  min-height: 68px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: rgba(255,255,255,.58);
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  font-weight: 700;
  position: relative;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.choice:hover { border-color: #8e867d; background: white; transform: translateY(-1px); }
.choice small { color: var(--gold); font-size: 9px; letter-spacing: .12em; }
.choice.is-selected { border-color: var(--ink); background: white; box-shadow: inset 0 0 0 1px var(--ink); }
.choice.is-selected::after { content: "✓"; margin-left: auto; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; display: grid; place-items: center; background: var(--wine); color: white; font-size: 13px; }

.choice--visual { height: clamp(255px, 39vh, 365px); min-height: 240px; padding: 0; border: 0; overflow: hidden; align-items: end; background: #222; color: white; }
.choice--visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .25s ease; }
.choice--visual::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, transparent 38%, rgba(0,0,0,.78)); }
.choice--visual span { margin: 0 0 20px 20px; position: relative; z-index: 2; font: 700 clamp(20px, 2.1vw, 28px)/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
.choice--visual i { display: none; }
.choice--visual:hover img { transform: scale(1.025); }
.choice--visual.is-selected { box-shadow: inset 0 0 0 4px white, 0 0 0 2px var(--wine); }
.choice--visual.is-selected::after { position: absolute; top: 15px; right: 15px; z-index: 3; }
.choice--visual.is-selected i { display: none; }

.choice-grid--categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-grid--quality { grid-template-columns: 1fr; }
.choice--quality { min-height: 84px; padding: 17px 20px; }
.choice--quality > span { display: grid; gap: 5px; min-width: 0; }
.choice--quality b { font-size: 15px; }
.choice--quality em { color: var(--muted); font-size: 13px; line-height: 1.5; font-style: normal; font-weight: 400; }

.other-field { margin-top: 16px; display: block; }
.other-field > span, .form-card form > label > span, legend { display: block; margin-bottom: 7px; color: #5f5a54; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.other-field input, .form-card input[type="text"], .form-card input[type="tel"] { width: 100%; min-width: 0; height: 52px; padding: 0 15px; border: 1px solid var(--line); border-radius: var(--control-radius); background: white; color: var(--ink); font-size: 16px; outline: 0; }
.other-field input:focus, .form-card input:focus { border-color: var(--wine); }

.assistant { margin-top: 17px; display: flex; align-items: center; gap: 11px; color: var(--muted); font-size: 11px; }
.assistant img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.assistant div { display: grid; gap: 2px; }
.assistant b { color: var(--ink); font-size: 10px; letter-spacing: .04em; }

.quiz-nav {
  width: calc(100% + 100px);
  min-height: 78px;
  margin: auto -50px 0;
  padding: 12px 50px;
  border-top: 1px solid var(--line);
  background: rgba(244,240,233,.96);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}
.quiz-nav .primary-button { min-width: 190px; }
.back-button, .text-button { min-height: 44px; padding: 10px 0; border: 0; background: transparent; color: #68635d; cursor: pointer; font-size: 14px; }
.back-button:hover, .text-button:hover { color: var(--wine); }
.screen-error { margin: 10px 0 16px; }

.screen--form, .screen--thanks { padding: 42px; align-items: center; justify-content: center; background: linear-gradient(130deg, #e8e0d5, #f7f4ee 56%, #eee7dc); }
.form-layout { width: min(880px, 100%); display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); background: white; border-radius: var(--control-radius); overflow: hidden; box-shadow: 0 24px 80px rgba(40,31,24,.14); }
.form-summary { padding: 43px 38px; background: var(--ink); color: white; display: flex; flex-direction: column; }
.form-summary .eyebrow { color: #d2b98d; }
.form-summary > strong { margin: 25px 0 12px; font: 700 clamp(48px, 5vw, 64px)/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; letter-spacing: -.06em; white-space: nowrap; }
.form-summary sup { font-size: 25px; }
.form-summary h3 { font-size: 25px; }
.form-summary p { color: #c6c1bb; font-size: 14px; line-height: 1.6; }
.form-summary ul { margin: auto 0 0; padding: 20px 0 0; border-top: 1px solid #3f3f3f; list-style: none; display: grid; gap: 11px; font-size: 11px; }
.form-summary li::before { content: "✓"; margin-right: 9px; color: #d2b98d; }
.form-card { min-width: 0; padding: 38px 42px 30px; background: white; }
.form-card h2 { margin-top: 8px; font-size: 36px; }
.form-card > p { margin: 12px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.form-card form > label { display: block; margin-bottom: 12px; }
.form-card fieldset { margin: 15px 0; padding: 0; border: 0; }
.messengers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.messengers label { cursor: pointer; position: relative; }
.messengers input { position: absolute; opacity: 0; }
.messengers span { min-height: 46px; border: 1px solid var(--line); border-radius: var(--control-radius); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.messengers input:checked + span { border-color: var(--ink); background: var(--ink); color: white; }
.messengers input:focus-visible + span { outline: 3px solid rgba(104,31,43,.4); outline-offset: 2px; }
.consent { display: flex !important; align-items: flex-start; gap: 9px; }
.consent input { width: 20px; height: 20px; flex: 0 0 20px; margin: 1px 0 0; accent-color: var(--wine); }
.consent span { margin: 0 !important; color: #67635e !important; font-size: 12px !important; font-weight: 400 !important; line-height: 1.5; letter-spacing: 0 !important; text-transform: none !important; }
.consent a { color: inherit; }
.honeypot { position: absolute !important; left: -10000px; }
.form-error { min-height: 18px; color: var(--danger); font-size: 13px; line-height: 1.5; }
.primary-button--submit { width: 100%; justify-content: space-between; }
.text-button { display: block; margin: 11px auto 0; }

.thanks-card { width: min(590px, 100%); padding: 58px 45px; background: white; box-shadow: 0 24px 80px rgba(40,31,24,.12); text-align: center; }
.thanks-icon { width: 68px; height: 68px; margin: 0 auto 25px; border-radius: 50%; display: grid; place-items: center; background: var(--wine); color: white; font-size: 28px; }
.thanks-card h2 { margin-top: 12px; }
.thanks-card p { color: var(--muted); font-size: 13px; }
.thanks-card .primary-button { margin-top: 16px; }
.lead-number { font-size: 12px !important; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .quiz-shell { width: 100%; box-shadow: none; }
  .intro-media { width: 46%; }
  .intro-copy { width: 54%; padding: 46px 38px; }
  h1 { font-size: 43px; }
  .screen--question { padding-left: 34px; padding-right: 34px; }
  .quiz-nav { width: calc(100% + 68px); margin-left: -34px; margin-right: -34px; padding-left: 34px; padding-right: 34px; }
  .choice--visual { height: 315px; }
  .assistant { display: none; }
  .form-layout { grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); }
  .form-summary { padding: 38px 28px; }
  .form-summary h3 { font-size: 21px; }
  .form-summary > strong { font-size: 48px; }
  .form-card { padding: 32px 24px; }
  .form-card h2 { font-size: 30px; }
}

@media (max-width: 720px) {
  .topbar { height: 58px; padding: 0 16px; grid-template-columns: 1fr auto; }
  .wordmark { font-size: 18px; }
  .topbar__caption { display: none; }
  .close-button { width: 44px; height: 44px; font-size: 22px; line-height: 28px; }
  .screen { min-height: calc(100vh - 61px); min-height: calc(100dvh - 61px); }
  .screen--intro { flex-direction: column; }
  .intro-media { width: 100%; min-height: 34vh; height: 34vh; }
  .intro-media img { object-position: 50% 48%; }
  .intro-media__note { left: 17px; right: 17px; bottom: 13px; }
  .intro-media__note span { font-size: 8px; }
  .intro-media__note b { font-size: 9px; }
  .intro-copy { width: 100%; min-height: calc(66vh - 58px); padding: 25px 19px 24px; justify-content: flex-start; }
  h1 { margin-top: 11px; font-size: clamp(32px, 9vw, 38px); }
  .intro-lead { margin: 15px 0 18px; font-size: 14px; line-height: 1.55; }
  .primary-button { min-height: 52px; }
  .benefits { margin-top: 18px; gap: 8px; font-size: 10px; }

  .screen--question { padding: 24px 16px 0; }
  .question-head { margin-bottom: 17px; display: block; }
  .question-head h2 { font-size: 31px; }
  .question-head p { margin: 9px 0 0; max-width: none; text-align: left; font-size: 13px; }
  .choice-grid--visual { grid-template-columns: 1fr; gap: 9px; }
  .choice--visual { height: 118px; min-height: 118px; }
  .choice--visual img { object-position: 50% 34%; }
  .choice--visual span { margin: 0 0 14px 14px; font-size: 22px; }
  .choice--visual i { margin: 0 14px 15px auto; font-size: 8px; }
  .choice--visual.is-selected::after { top: 10px; right: 10px; }
  .choice-grid--categories { grid-template-columns: 1fr; gap: 7px; }
  .choice { min-height: 55px; padding: 10px 13px; font-size: 15px; }
  .choice--visual { padding: 0; }
  .choice--quality { min-height: 72px; }
  .choice--quality b { font-size: 15px; }
  .choice--quality em { font-size: 12px; }
  .other-field { margin-top: 12px; }
  .other-field input { height: 48px; }
  .quiz-nav { width: calc(100% + 32px); min-height: 68px; margin: auto -16px 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
  .quiz-nav .primary-button { min-width: 0; width: 100%; padding: 10px 14px; gap: 10px; font-size: 14px; }

  .screen--form { padding: 18px 13px calc(18px + env(safe-area-inset-bottom)); align-items: flex-start; }
  .form-layout { grid-template-columns: 1fr; }
  .form-summary { padding: 24px 21px; display: flex; }
  .form-summary > strong { margin: 14px 0 10px; font-size: 48px; }
  .form-summary h3 { margin: 0; font-size: 21px; }
  .form-summary p { margin: 10px 0 0; font-size: 13px; }
  .form-summary ul { display: none; }
  .form-card { padding: 24px 20px 18px; }
  .form-card h2 { font-size: 28px; }
  .form-card > p { margin-bottom: 15px; font-size: 14px; }
  .form-card input[type="text"], .form-card input[type="tel"] { height: 49px; }
  .messengers span { min-height: 46px; font-size: 14px; }
  .screen--thanks { padding: 18px; }
  .thanks-card { padding: 42px 20px; }
  .thanks-card h2 { font-size: 30px; }
  .thanks-card .primary-button { width: 100%; padding: 12px 14px; gap: 10px; font-size: 14px; }
}

@media (max-width: 380px) {
  .intro-media { height: 31vh; min-height: 31vh; }
  .intro-copy { min-height: calc(69vh - 58px); }
  .choice--visual { height: 105px; min-height: 105px; }
}

/* Embedded popup follows content height instead of filling the browser window. */
.is-embedded .quiz-shell, .is-embedded .screen { min-height: 0; }
.is-embedded .topbar { height: 56px; padding: 0 24px; }
.is-embedded .intro-media { min-height: 320px; height: auto; }
.is-embedded .intro-media picture { position: absolute; inset: 0; }
.is-embedded .intro-copy { min-height: 0; padding: 30px 28px; }
.is-embedded h1 { font-size: 36px; }
.is-embedded .intro-lead { margin: 18px 0 22px; font-size: 14px; }
.is-embedded .intro-media__note { left: 20px; right: 20px; bottom: 20px; gap: 16px; }
.is-embedded .intro-media__note span { font-size: 9px; letter-spacing: .1em; }
.is-embedded .intro-media__note b { font-size: 10px; white-space: nowrap; }
.is-embedded .benefits { margin-top: 16px; }
.is-embedded .quiz-nav { margin-top: 24px; }
@media (max-width: 720px) {
  .is-embedded .topbar { padding: 0 16px; }
  .is-embedded .intro-media { min-height: 0; height: 180px; }
  .is-embedded .intro-copy { padding: 22px 20px; }
  .is-embedded h1 { font-size: 32px; }
  .is-embedded .intro-media__note { left: 16px; right: 16px; bottom: 13px; }
  .is-embedded .intro-media__note span { font-size: 8px; }
  .is-embedded .intro-media__note b { font-size: 9px; }
}

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