:root {
  --ivory: #f5f0e7;
  --paper: #fbf8f2;
  --ink: #171716;
  --muted: #6e685f;
  --line: #d8d0c4;
  --rose: #a96f6a;
  --rose-pale: #ead8d4;
  --navy: #26384a;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); }
button, input { font: inherit; }
button { color: inherit; }

.topbar { min-height: 84px; padding: 18px clamp(22px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: baseline; gap: 7px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.wordmark span { font-family: var(--serif); font-style: italic; font-size: 1rem; }
.wordmark strong { font-family: var(--serif); font-size: 1.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.text-button, .back-button, .close-button { border: 0; background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

main { min-height: calc(100vh - 158px); }
.view { display: none; }
.view.active { display: block; }
.intro-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); min-height: 620px; border-bottom: 1px solid var(--line); }
.intro-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 8vw, 120px); }
.eyebrow { margin: 0 0 18px; color: var(--rose); font-size: .77rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { margin: 0; max-width: 680px; font-size: clamp(3rem, 6vw, 6.8rem); line-height: .94; letter-spacing: -.04em; }
.lede { max-width: 620px; margin: 28px 0 34px; color: var(--muted); font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.5; }
.primary-button, .secondary-button { width: fit-content; min-height: 52px; padding: 14px 21px; border: 1px solid var(--ink); cursor: pointer; font-weight: 700; }
.primary-button { background: var(--ink); color: white; }
.primary-button:hover, .primary-button:focus-visible { background: var(--navy); }
.secondary-button { background: transparent; }
.time-note { margin-top: 14px; color: var(--muted); font-size: .82rem; }
.editorial-image { margin: 0; min-height: 520px; overflow: hidden; }
.editorial-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.journey { padding: 80px clamp(22px, 5vw, 72px) 96px; }
.section-heading { display: grid; grid-template-columns: .4fr 1fr; gap: 30px; align-items: start; margin-bottom: 40px; }
.section-heading h2 { margin: 0; max-width: 760px; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.05; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.step-card { min-height: 190px; padding: 24px; display: grid; align-content: space-between; gap: 10px; text-align: left; background: transparent; border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.step-card span { color: var(--rose); font-family: var(--serif); }
.step-card strong { font-family: var(--serif); font-size: 1.55rem; font-weight: 400; }
.step-card small { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.step-card.available { cursor: pointer; background: var(--paper); }
.step-card.available:hover, .step-card.available:focus-visible { background: var(--rose-pale); }
.step-card:disabled { opacity: .58; }

.assessment-shell, .result-shell { max-width: 980px; margin: 0 auto; padding: 42px 24px 90px; }
.assessment-top { display: grid; grid-template-columns: 44px 1fr 44px; gap: 22px; align-items: center; }
.back-button, .close-button { font-size: 1.6rem; text-decoration: none; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: .82rem; }
.progress-track { height: 3px; background: var(--line); }
.progress-bar { height: 100%; background: var(--rose); transition: width .25s ease; }
.question-panel { max-width: 760px; margin: 80px auto 0; }
.question-panel h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.02; }
.question-help { margin: 18px 0 30px; color: var(--muted); line-height: 1.6; }
.measurement-entry { margin: 34px 0; padding: 28px; background: var(--paper); border: 1px solid var(--line); }
.measurement-entry label { display: block; margin-bottom: 12px; font-weight: 700; }
.measurement-row { display: flex; align-items: center; gap: 12px; }
.measurement-row input { width: min(220px, 70vw); min-height: 58px; padding: 12px 16px; border: 1px solid var(--ink); background: white; font-size: 1.2rem; }
.measurement-row span { color: var(--muted); }
.choices { display: grid; gap: 12px; margin: 32px 0; }
.choice { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); background: var(--paper); cursor: pointer; text-align: left; line-height: 1.4; }
.choice:hover, .choice:focus-visible { border-color: var(--ink); }
.choice.selected { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--rose); }
.choice-mark { width: 19px; height: 19px; flex: 0 0 19px; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.choice.selected .choice-mark::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--rose); }
.question-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; }
.selection-note { color: var(--muted); font-size: .84rem; }

.result-header { padding: 56px 0 44px; border-bottom: 1px solid var(--ink); }
.result-header h1 { font-size: clamp(3rem, 6vw, 5.8rem); }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); }
.result-card { min-height: 330px; padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.result-card > span { color: var(--rose); font-family: var(--serif); }
.result-card h2 { margin: 60px 0 20px; font-size: 1.55rem; }
.result-card ul { padding-left: 20px; color: var(--muted); line-height: 1.7; }
.accent-card { background: var(--navy); color: white; }
.accent-card blockquote { margin: 60px 0 0; font-family: var(--serif); font-size: 1.5rem; line-height: 1.45; }
.result-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.saved-confirmation { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.step-card.complete { box-shadow: inset 0 4px 0 var(--rose); }
.step-card.complete::after { content: 'Profile saved'; color: var(--rose); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

footer { min-height: 74px; padding: 22px clamp(22px, 5vw, 72px); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--serif); }

@media (max-width: 820px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-copy { padding: 64px 24px 52px; }
  .editorial-image { min-height: 420px; }
  .section-heading, .result-grid { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: repeat(2, 1fr); }
  .result-card { min-height: 250px; }
}

@media (max-width: 520px) {
  .topbar { min-height: 72px; }
  .wordmark span { display: none; }
  .wordmark strong { font-size: 1.35rem; }
  h1 { font-size: 3.25rem; }
  .step-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 145px; }
  .assessment-top { grid-template-columns: 34px 1fr 34px; gap: 10px; }
  .question-panel { margin-top: 52px; }
  .question-actions, footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
