/* Shared visual language for the consumer entry and assessment.
   Keep scoring, identity, consent and submission behavior in their existing modules. */
:root {
  --consumer-navy: #001029;
  --consumer-surface: #0b203b;
  --consumer-text: #f7f9fc;
  --consumer-muted: #b9c5d9;
  --consumer-gold: #ffbf14;
  --consumer-line: rgba(185, 205, 229, .19);
  --brand-navy: var(--consumer-navy);
  --bg: var(--consumer-navy);
  --text: var(--consumer-text);
  --muted: var(--consumer-muted);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
}

/* One header, one navy, the same brand scale on both sides of the start action. */
.site-header,
.quick-header,
body[data-view="assessment"] .quick-header {
  width: min(1120px, calc(100% - 64px));
  height: 84px;
  min-height: 84px;
  margin: 0 auto;
  border: 0;
  border-bottom: 1px solid var(--consumer-line);
  background: var(--consumer-navy);
  box-shadow: none;
}
.brand, .quick-brand { display: block; width: 190px; max-width: 55%; line-height: 0; }
.brand img, .quick-brand img, body[data-view="assessment"] .quick-brand img {
  width: 100%; height: auto; max-height: none; object-fit: contain;
}
.quick-header::before { background: var(--consumer-navy); box-shadow: none; }
.header-assurance { font-size: 12px; color: var(--consumer-muted); }
.header-assurance .status-dot { display: none; }
.header-assurance > span:last-child { display: inline; }

/* Landing: ample space, quiet surfaces, a single primary invitation per section. */
.hero { padding-block: 44px 80px; }
.hero-logo { width: 280px; max-width: 85%; margin: 0 auto 24px; }
.hero-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 210px;
  max-width: 870px; gap: 28px 42px; margin: 0 auto 32px; align-items: center;
}
.hero-copy { display: contents; }
.hero-situations {
  grid-column: 1 / -1; grid-row: 1; gap: 8px 20px; margin: 0;
  font-size: 13px; font-weight: 500; color: var(--consumer-muted);
}
.hero-situations li { padding: 0; border: 0; border-radius: 0; background: none; }
.hero h1 {
  grid-column: 1 / -1; grid-row: 2; font-size: clamp(42px, 5.3vw, 68px);
  font-weight: 650; letter-spacing: -.045em; line-height: 1.07;
  text-align: center; text-wrap: balance; margin: 0;
}
.hero h1 br { display: none; }
.hero-copy .hero-lead {
  grid-column: 1; grid-row: 3; max-width: 440px; justify-self: end;
  margin: 0; font-size: 21px; line-height: 1.55; text-align: left;
}
.hero-denize { grid-column: 2; grid-row: 3; width: 190px; height: auto; min-height: 0; justify-self: start; }
.hero-denize > img { width: 190px; height: 202px; object-fit: contain; }
.cta { box-shadow: none; font-weight: 650; }
.cta-hero { min-height: 58px; padding: 17px 32px; font-size: 18px; box-shadow: none; }
.hero-explore { margin-top: 24px; border: 0; font-weight: 400; }
.hero-explore:hover { border: 0; padding-bottom: 3px; }
.chapter-start { padding-block: 80px; background: #071a32; }
.chapter-start h2 { font-size: clamp(34px, 4vw, 50px); }
.chapter-start .journey-strip { margin-top: 48px; gap: 36px; }
.chapter-start .section-action { margin-top: 40px; }
.denize-portrait { background: #0b203b; box-shadow: none; }

/* Assessment: normal page scrolling avoids crushed choices on short screens. */
body[data-view="assessment"] {
  height: auto; min-height: 100dvh; overflow: visible;
  background: var(--consumer-navy);
}
body[data-view="assessment"] .quick-background { background: var(--consumer-navy); }
body[data-view="assessment"] .glow,
body[data-view="assessment"] .grid-lines { display: none; }
body[data-view="assessment"] .quick-main {
  display: block; width: min(780px, calc(100% - 64px));
  height: auto; min-height: 0; margin: 44px auto 64px;
}
body[data-view="assessment"] .assessment-card {
  display: block; width: 100%; height: auto; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  backdrop-filter: none; overflow: visible;
}
body[data-view="assessment"] .assessment-card::before,
body[data-view="assessment"] .assessment-card::after,
body[data-view="assessment"] .question-copy::after,
body[data-view="assessment"] .question-number { display: none; }
body[data-view="assessment"] .assessment-subbrand-logo {
  width: 280px; max-width: 85%; height: auto; margin: 0 auto 24px;
}
body[data-view="assessment"] .assessment-card > h1 {
  font-size: clamp(30px, 4vw, 42px); font-weight: 650; line-height: 1.13;
  letter-spacing: -.04em; margin: 0 0 12px; text-align: center;
}
body[data-view="assessment"] .assessment-card > .lead {
  display: block; font-size: 16px; line-height: 1.55; max-width: 470px;
  margin: 0 auto; text-align: center; color: var(--consumer-muted);
}
body[data-view="assessment"] .progress-header {
  margin: 34px 0 10px; padding: 0; background: none; border: 0;
  border-radius: 0; box-shadow: none; font-size: 12px;
}
body[data-view="assessment"] .progress-header strong { font-weight: 500; }
body[data-view="assessment"] .progress-track {
  width: 100%; height: 3px; margin: 0 0 32px; padding: 0;
  border: 0; outline: 0; box-shadow: none; background: #263750;
}
body[data-view="assessment"] .progress-track span { background: var(--consumer-gold); }
body[data-view="assessment"] .question-stage {
  display: block; height: auto; min-height: 0; overflow: visible;
  margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
body[data-view="assessment"] .question-copy { padding: 0; }
body[data-view="assessment"] .question-copy h2 {
  font-size: clamp(23px, 3vw, 29px); font-weight: 600;
  letter-spacing: -.025em; line-height: 1.2; margin: 0 0 8px;
}
body[data-view="assessment"] .question-copy p { font-size: 14px; line-height: 1.5; margin: 0; }
body[data-view="assessment"] .selection-grid,
body[data-view="assessment"].has-multi-question .selection-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto; gap: 12px; margin: 24px 0 0; padding: 0;
  height: auto; max-height: none; min-height: 0; overflow: visible;
  background: none; border: 0; box-shadow: none;
}
body[data-view="assessment"] .option-button,
body[data-view="assessment"].has-multi-question .option-button {
  min-height: 62px; padding: 16px 18px; font-size: 16px; line-height: 1.4;
  border: 1px solid var(--consumer-line); border-radius: 16px;
  background: var(--consumer-surface); box-shadow: none;
  overflow-wrap: normal; font-weight: 500; transform: none;
}
body[data-view="assessment"] .option-button:hover { background: #112b48; border-color: #7199ad; }
body[data-view="assessment"] .option-button.is-selected { background: #133348; border-color: #67d9ee; }
body[data-view="assessment"] .option-button:focus-visible { outline: 3px solid #67d9ee; outline-offset: 3px; }
body[data-view="assessment"].has-area-question .selection-grid { gap: 16px; }
body[data-view="assessment"].has-area-question .area-choice-card {
  min-height: 192px; padding: 28px 22px; gap: 14px; border-width: 1px;
  border-radius: 22px; background: var(--consumer-surface);
  box-shadow: none; font-size: 21px; font-weight: 600;
}
body[data-view="assessment"] .area-choice-icon { font-size: 34px; color: #7dd9e8; }
body[data-view="assessment"] .area-choice-description { font-size: 15px; line-height: 1.5; color: var(--consumer-muted); }
body[data-view="assessment"] .question-actions {
  margin: 24px 0 0; padding: 0; min-height: 0; background: none;
  border: 0; box-shadow: none; align-items: center;
}
body[data-view="assessment"] .question-actions .primary-button,
body[data-view="assessment"].has-multi-question .question-actions .primary-button {
  min-height: 48px; padding: 14px 28px; border-radius: 999px;
  background: var(--consumer-gold); color: var(--consumer-navy);
  font-size: 16px; font-weight: 650; box-shadow: none;
}
body[data-view="assessment"] .question-actions .ghost-button {
  min-height: 48px; font-size: 15px; padding: 12px; border: 0;
}
body[data-view="assessment"] .other-answer:not([hidden]) { overflow: visible; }

@media (max-width: 700px) {
  .site-header, .quick-header, body[data-view="assessment"] .quick-header {
    width: calc(100% - 40px); height: 72px; min-height: 72px;
  }
  .brand, .quick-brand { width: 165px; }
  .header-assurance { font-size: 10px; max-width: 105px; text-align: right; line-height: 1.4; }
  .hero { padding-block: 30px 56px; }
  .hero-logo { width: 240px; margin-bottom: 24px; }
  .hero-layout { grid-template-columns: minmax(0, 1fr) 112px; gap: 22px 8px; margin-bottom: 26px; }
  .hero-situations { font-size: 11px; gap: 7px 14px; }
  .hero h1 { font-size: clamp(34px, 8.7vw, 46px); line-height: 1.1; letter-spacing: -.04em; }
  .hero-copy .hero-lead { font-size: 16px; line-height: 1.5; margin: 0; text-align: left; }
  .hero-denize { width: 112px; }
  .hero-denize > img { width: 112px; height: 120px; }
  .cta-hero { width: 100%; max-width: 400px; min-height: 54px; font-size: 17px; }
  .hero-explore { font-size: 14px; margin-top: 22px; }
  .chapter-start { padding-block: 56px; }
  body[data-view="assessment"] .quick-main { width: calc(100% - 40px); margin: 30px auto 40px; }
  body[data-view="assessment"] .assessment-subbrand-logo { width: 240px; margin-bottom: 24px; }
  body[data-view="assessment"] .assessment-card > h1 { font-size: 30px; }
  body[data-view="assessment"] .assessment-card > .lead { font-size: 14px; max-width: 340px; }
  body[data-view="assessment"] .progress-header { margin-top: 26px; }
  body[data-view="assessment"] .progress-track { margin-bottom: 26px; }
  body[data-view="assessment"] .question-copy h2 { font-size: 23px; }
  body[data-view="assessment"] .question-copy p { font-size: 14px; }
  body[data-view="assessment"] .selection-grid,
  body[data-view="assessment"].has-multi-question .selection-grid,
  body[data-view="assessment"].has-area-question .selection-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
  body[data-view="assessment"].has-area-question .area-choice-card { min-height: 145px; padding: 20px; gap: 8px; font-size: 20px; }
  body[data-view="assessment"] .area-choice-icon { font-size: 30px; }
  body[data-view="assessment"] .area-choice-description { max-width: 290px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .cta, body[data-view="assessment"] .option-button,
  body[data-view="assessment"] .progress-track span { transition: none; }
}

/* Keep the explicit free-analysis invitation readable on narrow phones. */
@media (max-width: 700px) {
  .cta { gap: 12px; padding-inline: 16px; font-size: 16px; }
  .cta span { flex: 0 0 auto; }
}

/* Light form surfaces need explicit dark ink, including Safari autofill. */
.auth-form input:not([type="checkbox"]):not([type="radio"]) {
  background: #f7f9fc;
  color: #10213d;
  -webkit-text-fill-color: #10213d;
  caret-color: #10213d;
  color-scheme: light;
}
.auth-form input::placeholder { color: #52647c; -webkit-text-fill-color: #52647c; opacity: 1; }
.auth-form input:-webkit-autofill {
  -webkit-text-fill-color: #10213d;
  caret-color: #10213d;
  -webkit-box-shadow: 0 0 0 1000px #f7f9fc inset;
}

/* A compact overview is visible before the optional, expanded explanation. */
.hero-journey { max-width: 760px; margin: 32px auto 0; }
.journey-caption { margin: 0 0 16px; color: var(--consumer-muted); font-size: 12px; letter-spacing: .025em; }
.journey-timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.journey-timeline li { position: relative; min-width: 0; display: flex; align-items: center; flex-direction: column; padding: 0 8px; }
.journey-timeline li:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: calc(50% + 20px); width: calc(100% - 40px); height: 1px; background: #ffbf1460; }
.journey-timeline .timeline-number { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #ffbf1480; border-radius: 50%; color: var(--consumer-gold); font-size: 12px; margin-bottom: 12px; }
.journey-timeline strong { font-size: 14px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.journey-timeline li > span:last-child { font-size: 12px; color: var(--consumer-muted); line-height: 1.4; margin-top: 5px; text-wrap: balance; }
.hero:has(.hero-journey) { padding-bottom: 40px; }
.journey-details { max-width: 760px; margin: 28px auto 0; text-align: left; }
.journey-details details { border-bottom: 1px solid var(--consumer-line); }
.journey-details summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; padding: 20px 0; font-weight: 550; font-size: 18px; }
.journey-details summary::-webkit-details-marker { display: none; }
.journey-details summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.journey-details summary span { font-size: 23px; font-weight: 400; color: var(--cyan); }
.journey-details details[open] summary span { transform: rotate(45deg); }
.journey-details details p { max-width: 650px; margin: 0 0 22px; font-size: 16px; line-height: 1.6; color: var(--consumer-muted); }
.chapter-denize, .chapter-clarity { padding-block: 64px; }
@media (max-width: 700px) {
  .hero:has(.hero-journey) { padding-block: 20px 28px; }
  .hero:has(.hero-journey) .hero-logo { width: 205px; margin-bottom: 18px; }
  .hero:has(.hero-journey) .hero-layout { gap: 16px 10px; grid-template-columns: minmax(0, 1fr) 88px; margin-bottom: 18px; }
  .hero:has(.hero-journey) h1 { font-size: clamp(30px, 8.3vw, 42px); }
  .hero:has(.hero-journey) .hero-lead { font-size: 14px; line-height: 1.45; }
  .hero:has(.hero-journey) .hero-denize { width: 88px; }
  .hero:has(.hero-journey) .hero-denize > img { width: 88px; height: 94px; }
  .hero:has(.hero-journey) .cta-hero { min-height: 50px; font-size: 15px; padding-block: 14px; }
  .hero-journey { margin-top: 24px; }
  .journey-caption { font-size: 11px; margin-bottom: 12px; }
  .journey-timeline li { padding-inline: 3px; }
  .journey-timeline strong { font-size: 12px; }
  .journey-timeline li > span:last-child { font-size: 10px; }
  .journey-timeline .timeline-number { margin-bottom: 9px; }
  .hero:has(.hero-journey) .hero-explore { margin-top: 20px; font-size: 13px; }
  .chapter-start, .chapter-denize, .chapter-clarity { padding-block: 42px; }
  .chapter-start h2 { font-size: 32px; }
  .chapter-start .section-intro > p:last-child { margin-top: 14px; font-size: 15px; }
  .journey-details summary { font-size: 16px; padding-block: 18px; }
  .journey-details details p { font-size: 15px; }
}

/* Scale the desktop introduction to the usable viewport, with details at its foot. */
@media (min-width: 701px) {
  :root { --landing-header-height: clamp(60px, 8svh, 84px); }
  .site-header { height: var(--landing-header-height); min-height: var(--landing-header-height); }
  .hero:has(.hero-journey) {
    min-height: calc(100svh - var(--landing-header-height));
    display: flex; flex-direction: column; align-items: center;
    justify-content: space-between; gap: clamp(10px, 1.5svh, 20px);
    padding-block: clamp(14px, 2svh, 24px);
  }
  .hero:has(.hero-journey) .hero-logo { width: clamp(220px, 34svh, 320px); margin: 0; flex-shrink: 0; }
  .hero:has(.hero-journey) .hero-layout {
    width: 100%; max-width: 940px;
    grid-template-columns: minmax(0, 1fr) clamp(130px, 21svh, 220px);
    gap: clamp(10px, 1.8svh, 24px) 32px; margin: 0;
  }
  .hero:has(.hero-journey) h1 {
    font-size: clamp(40px, 6.8svh, 68px); line-height: 1.06;
    max-width: min(900px, 16em); justify-self: center;
  }
  .hero:has(.hero-journey) .hero-lead { font-size: clamp(17px, 2.4svh, 22px); line-height: 1.45; max-width: 560px; }
  .hero:has(.hero-journey) .hero-denize { width: clamp(130px, 21svh, 220px); }
  .hero:has(.hero-journey) .hero-denize > img { width: 100%; height: auto; aspect-ratio: 413 / 440; }
  .hero:has(.hero-journey) .cta-hero { min-height: 50px; padding-block: clamp(14px, 1.8svh, 18px); font-size: clamp(17px, 2.2svh, 20px); flex-shrink: 0; }
  .hero:has(.hero-journey) .hero-journey { width: 100%; max-width: 840px; margin: 0; }
  .journey-caption { margin-bottom: clamp(10px, 1.5svh, 16px); }
  .journey-timeline .timeline-number { margin-bottom: 10px; }
  .hero:has(.hero-journey) .hero-explore { margin: 0; }
}
/* A continuous navy surface avoids a stray band at the bottom of mobile. */
@media (max-width: 700px) {
  .hero:has(.hero-journey) {
    min-height: calc(100svh - 72px);
    display: flex; flex-direction: column; align-items: center;
    justify-content: space-between; gap: 24px; padding-block: 24px;
  }
  .hero:has(.hero-journey) .hero-logo { width: 220px; margin: 0; flex-shrink: 0; }
  .hero:has(.hero-journey) .hero-layout {
    width: 100%; margin: 0; row-gap: clamp(22px, 3.5svh, 32px);
  }
  .hero:has(.hero-journey) .hero-lead { font-size: 15px; line-height: 1.5; }
  .hero:has(.hero-journey) .cta-hero { font-size: 16px; flex-shrink: 0; }
  .hero:has(.hero-journey) .hero-journey { width: 100%; margin: 0; }
  .hero:has(.hero-journey) .journey-caption { font-size: 12px; margin-bottom: 16px; }
  .hero:has(.hero-journey) .journey-timeline strong { font-size: 13px; }
  .hero:has(.hero-journey) .journey-timeline li > span:last-child { font-size: 11px; }
  .hero:has(.hero-journey) .hero-explore { margin: 0; font-size: 14px; }
  .chapter-start { background: var(--consumer-navy); border-top: 0; }
}

/* Duplicate confirmation above multi-select choices, aligned with the bottom CTA. */
body[data-view="assessment"] .question-actions-top {
  justify-content: flex-end;
  margin: 0 0 16px;
}
body[data-view="assessment"] .question-actions-top[hidden] { display: none; }

/* V87: the same brand gold for every answer and selection. */
body[data-view="assessment"] #questionOptions .option-button { border:1.5px solid #ffbf0b; }
body[data-view="assessment"] #questionOptions .option-button:hover { border-color:#ffbf0b; background:rgba(255,191,11,.12); }
body[data-view="assessment"] #questionOptions .option-button.is-selected { border-color:#ffbf0b; background:rgba(255,191,11,.24); box-shadow:inset 0 0 0 1px rgba(255,191,11,.3); }
body[data-view="assessment"] #questionOptions .option-button:focus-visible { outline:3px solid #ffbf0b; outline-offset:3px; }
body[data-view="assessment"] #questionOptions .option-check { border-color:#ffbf0b; }
body[data-view="assessment"] #questionOptions .is-selected .option-check { background:#ffbf0b; border-color:#ffbf0b; color:#001029; box-shadow:none; }
body[data-view="assessment"] #questionOptions .is-selected .option-check::after { border-color:#001029; }
body[data-view="assessment"].has-area-question #questionOptions .area-choice-card:hover,
body[data-view="assessment"].has-area-question #questionOptions .area-choice-card.is-selected { background:#ffbf0b; color:#001029; }
