:root {
  --graphite: #0e0e0e;
  --charcoal: #1a1a1a;
  --taupe: #3a352f;
  --sand: #d9c6b3;
  --ivory: #f4efe8;
  --bronze: #b9987a;
  --burgundy: #6b1f2b;
  --olive: #55624b;
  --mist: rgba(244, 239, 232, 0.58);
  --border: rgba(244, 239, 232, 0.15);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--graphite); }
body { margin: 0; color: var(--ivory); background: var(--graphite); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.survey-shell { width: min(1240px, calc(100% - 80px)); margin: 0 auto; }
.survey-header { display: flex; align-items: center; justify-content: space-between; min-height: 93px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 22px/1 var(--serif); letter-spacing: -0.055em; }
.brand img { width: 25px; height: 22px; object-fit: contain; filter: invert(1); }
.brand em { font-style: italic; font-weight: 500; }
.save-state { display: inline-flex; align-items: center; gap: 9px; color: var(--mist); font-size: 11px; }
.save-state__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); transition: background .2s ease; }
.save-state.is-saving .save-state__dot { background: var(--bronze); animation: pulse 1s infinite; }
.save-state.is-error .save-state__dot { background: var(--burgundy); }

.survey-intro { max-width: 720px; padding: 76px 0 74px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--sand); font-size: 10px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { width: 25px; height: 1px; background: currentColor; }
h1 { margin: 19px 0 23px; font: 500 clamp(51px, 7vw, 86px)/.94 var(--serif); letter-spacing: -.065em; }
h1 em { color: var(--sand); font-style: italic; }
.survey-intro > p:not(.eyebrow) { max-width: 520px; margin: 0; color: var(--mist); font-size: 15px; line-height: 1.65; }
.survey-intro .survey-intro-note { margin-top: 14px; color: var(--sand); font-size: 12px; line-height: 1.55; }

.survey-workspace { display: grid; grid-template-columns: 238px minmax(0, 1fr); align-items: start; gap: clamp(38px, 7vw, 112px); padding-bottom: 110px; }
.survey-tools { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 0 28px; color: var(--mist); font-size: 11px; }
.survey-tools p { margin: 0; line-height: 1.6; }
.survey-tools > div { display: flex; gap: 22px; flex-wrap: wrap; }
.survey-tools button { padding: 9px 0; color: var(--sand); background: none; border: 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.survey-notice { padding: 20px 24px; margin-bottom: 28px; border: 1px solid var(--bronze); color: var(--sand); font-size: 13px; line-height: 1.5; }
.survey-notice p { margin: 0 0 10px; }
.notice-action { padding: 7px 0; margin-right: 24px; border: 0; border-bottom: 1px solid currentColor; color: var(--ivory); background: none; font-size: 12px; }
.answer-guidance { margin: 24px 0 0; color: #716a63; font-size: 11px; line-height: 1.6; }
.question-card { scroll-margin-top: 24px; }
.question-card h2:focus { outline: none; }
.review-blocks { border-top: 1px solid rgba(14,14,14,.16); }
.review-blocks button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 15px 0; border: 0; border-bottom: 1px solid rgba(14,14,14,.16); background: none; color: var(--taupe); text-align: left; font-size: 13px; }
.review-blocks button span:last-child { white-space: nowrap; color: #716a63; font-size: 11px; }
.respondent-label { overflow-wrap: anywhere; font-size: 11px !important; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 840px) { .survey-tools { align-items: flex-start; flex-direction: column; gap: 8px; } }
.survey-progress { position: sticky; top: 30px; padding-top: 8px; }
.progress-caption, .progress-percent { margin: 0; font-size: 10px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.progress-caption { color: var(--sand); }
.progress-track { height: 2px; margin: 16px 0 12px; background: rgba(244,239,232,.2); overflow: hidden; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--sand); transition: width .35s ease; }
.progress-percent { color: var(--mist); }
.block-nav { display: grid; gap: 0; margin-top: 36px; border-top: 1px solid var(--border); }
.block-nav button { position: relative; width: 100%; padding: 10px 0; color: rgba(244,239,232,.44); background: transparent; border: 0; border-bottom: 1px solid var(--border); text-align: left; font-size: 10px; line-height: 1.3; transition: color .2s ease; }
.block-nav button:hover, .block-nav button.is-active { color: var(--ivory); }
.block-nav button.is-active::before { content: ""; position: absolute; top: 0; bottom: 0; left: -14px; width: 2px; background: var(--sand); }
.block-nav button.is-complete::after { content: "✓"; position: absolute; right: 0; color: var(--sand); }

.question-card { min-height: 555px; padding: clamp(28px, 4vw, 53px); color: var(--graphite); background: var(--ivory); box-shadow: 18px 18px 0 rgba(217,198,179,.10); }
.card-topline { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-bottom: 27px; border-bottom: 1px solid rgba(14,14,14,.16); }
.card-number { margin: 0; color: var(--burgundy); font-size: 11px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.card-position { margin: 0; color: #827970; font-size: 11px; }
.question-card h2 { max-width: 650px; margin: 25px 0 10px; font: 500 clamp(34px, 4vw, 52px)/.98 var(--serif); letter-spacing: -.055em; }
.block-description { max-width: 590px; min-height: 21px; margin: 0 0 29px; color: #716a63; font-size: 13px; line-height: 1.55; }
.fields { display: grid; gap: 25px; }
.field { display: grid; gap: 10px; }
.field label { max-width: 690px; color: #292622; font: 500 18px/1.25 var(--serif); letter-spacing: -.025em; }
.field__number { display: inline-block; min-width: 29px; margin-right: 4px; color: var(--bronze); font: 600 10px/1 var(--sans); letter-spacing: .08em; vertical-align: 3px; }
.field__help { margin: -3px 0 0 34px; color: #827970; font-size: 11px; line-height: 1.45; }
.field textarea, .field input, .field select { width: 100%; color: var(--graphite); background: transparent; border: 0; border-bottom: 1px solid rgba(14,14,14,.25); border-radius: 0; outline: 0; transition: border-color .2s ease, background .2s ease; }
.field textarea, .field input { padding: 9px 0 11px; font-size: 14px; line-height: 1.55; }
.field textarea { min-height: 86px; resize: vertical; }
.field textarea::placeholder, .field input::placeholder { color: #aaa198; }
.field select { padding: 11px 22px 12px 0; font-size: 14px; line-height: 1.5; }
.field textarea:focus, .field input:focus, .field select:focus { border-color: var(--burgundy); }
.field:focus-within label { color: var(--burgundy); }
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(14,14,14,.16); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--graphite); color: var(--ivory); background: var(--graphite); font-size: 11px; font-weight: 600; transition: background .2s ease, color .2s ease, transform .2s ease; }
.button:hover { color: var(--graphite); background: var(--sand); border-color: var(--sand); transform: translateY(-2px); }
.button--quiet { color: var(--graphite); background: transparent; border-color: transparent; }
.button--quiet:hover { color: var(--burgundy); background: transparent; border-color: transparent; transform: none; }
.button span { margin-left: 16px; font: 22px/1 var(--serif); }
.card-hint { margin: 0; color: #827970; font-size: 11px; line-height: 1.4; text-align: right; }

.completion { display: grid; min-height: 450px; place-items: center; text-align: center; }
.completion__inner { max-width: 580px; }
.completion__mark { display: grid; width: 55px; height: 55px; margin: 0 auto 24px; place-items: center; color: var(--ivory); background: var(--olive); border-radius: 50%; font: 30px/1 var(--serif); }
.completion h2 { margin: 0 0 15px; font: 500 clamp(38px, 5vw, 58px)/.98 var(--serif); letter-spacing: -.055em; }
.completion p { color: #716a63; font-size: 14px; line-height: 1.65; }
.completion .button { margin-top: 26px; }
.survey-footer { display: flex; justify-content: space-between; gap: 25px; padding: 25px 0 31px; border-top: 1px solid var(--border); color: var(--mist); font-size: 10px; line-height: 1.5; }
.survey-footer p { margin: 0; }
.survey-footer a { color: var(--sand); white-space: nowrap; }

@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 840px) {
  .survey-shell { width: min(100% - 40px, 620px); }
  .survey-header { min-height: 76px; }
  .survey-intro { padding: 56px 0 49px; }
  .survey-workspace { grid-template-columns: 1fr; gap: 27px; padding-bottom: 65px; }
  .survey-progress { position: static; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 0; }
  .progress-track { width: 100%; margin: 0; }
  .progress-percent { text-align: right; }
  .block-nav { display: flex; grid-column: 1 / -1; overflow-x: auto; margin-top: 8px; border: 0; scrollbar-width: none; }
  .block-nav::-webkit-scrollbar { display: none; }
  .block-nav button { width: auto; flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--border); border-right: 0; white-space: nowrap; }
  .block-nav button:first-child { border-radius: 2px 0 0 2px; }
  .block-nav button:last-child { border-right: 1px solid var(--border); border-radius: 0 2px 2px 0; }
  .block-nav button.is-active::before { display: none; }
  .block-nav button.is-active { color: var(--graphite); background: var(--sand); }
  .block-nav button.is-complete::after { display: none; }
  .question-card { min-height: 0; padding: 27px 22px; box-shadow: 8px 8px 0 rgba(217,198,179,.10); }
  .question-card h2 { margin-top: 22px; }
}
@media (max-width: 500px) {
  .survey-shell { width: min(100% - 28px, 620px); }
  .save-state { font-size: 9px; }
  h1 { font-size: clamp(49px, 16vw, 68px); }
  .survey-intro > p:not(.eyebrow) { font-size: 14px; }
  .survey-intro .survey-intro-note { font-size: 12px; }
  .progress-caption, .progress-percent { font-size: 9px; letter-spacing: .09em; }
  .question-card { padding: 24px 18px; }
  .card-topline { padding-bottom: 20px; }
  .question-card h2 { font-size: 35px; }
  .field { gap: 8px; }
  .field label { font-size: 17px; }
  .field__help { margin-left: 0; }
  .card-actions { flex-wrap: wrap; margin-top: 32px; }
  .card-hint { width: 100%; order: 3; text-align: left; }
  .card-actions .button:last-of-type { margin-left: auto; }
  .survey-footer { display: block; }
  .survey-footer a { display: inline-block; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
