@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --paper: #f7f6f2;
  --ink: #29483d;
  --green: #29483d;
  --deep: #203a31;
  --light: #dfd2c2;
  --bronze: #91785d;
  --muted: #5e6d65;
  --line: rgba(41, 72, 61, .2);
  --heading: 'Manrope', Arial, sans-serif;
  --body: 'DM Sans', Arial, sans-serif;
  color-scheme: light;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p { margin: 0; line-height: 1.65; }
h1, h2, h3 { margin: 0; font-family: var(--heading); font-weight: 500; }
button:focus-visible, a:focus-visible, input:focus-visible + span, summary:focus-visible, textarea:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: var(--light); color: var(--ink); }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; transform: translateY(-170%); padding: 12px 18px; background: white; color: var(--ink); }
.skip-link:focus { transform: none; }
.app-shell { display: grid; grid-template-columns: minmax(340px, 40%) minmax(0, 1fr); min-height: 100vh; }
.brand-rail { position: sticky; top: 0; height: 100vh; min-height: 690px; overflow: hidden; color: #fff; background: var(--deep); }
.rail-photo { position: absolute; inset: -4%; background: url('assets/landscape.webp') center / cover no-repeat; transform: scale(1.04); }
.rail-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 39, 31, .66), rgba(15, 39, 31, .73) 38%, rgba(13, 36, 28, .91)); }
.rail-content { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: clamp(28px, 4.6vw, 76px); }
.brand-logo { display: block; width: clamp(155px, 15vw, 210px); }
.brand-logo img { display: block; width: 100%; height: auto; }
.rail-message { max-width: 650px; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.rail-message .eyebrow { margin-bottom: 22px; color: var(--light); }
.rail-message h1 { max-width: 700px; font-size: clamp(3rem, 4.45vw, 6rem); line-height: 1.13; letter-spacing: -.055em; text-wrap: balance; }
.rail-message > p:last-child { max-width: 480px; margin-top: 28px; font-size: 1.05rem; color: #e7ede8; }
.rail-signoff { padding-top: 22px; border-top: 1px solid #ffffff5c; color: #e7ede8; font-size: .95rem; }

.work-area { display: flex; min-width: 0; flex-direction: column; padding: 0 clamp(28px, 5vw, 86px); background: var(--paper); }
.work-inner { width: 100%; max-width: 820px; margin: 0 auto; flex: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 92px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.topbar a, .site-footer a { text-decoration: underline; text-underline-offset: 4px; }
.topbar a:hover, .site-footer a:hover { color: var(--bronze); }
.progress-heading { display: flex; justify-content: space-between; gap: 14px; margin: 44px 0 14px; color: var(--muted); font-size: .88rem; }
.progress-heading span:first-child { color: var(--ink); font-weight: 600; }
.progress-track { height: 4px; overflow: hidden; background: #d9ded7; }
.progress-track span { display: block; width: 16.666%; height: 100%; background: var(--bronze); transition: width .3s ease; }
.section-heading { margin: clamp(38px, 4vw, 64px) 0 26px; }
.section-heading .eyebrow, #result-view > .eyebrow { color: var(--bronze); }
.section-heading h2, #result-title { margin-top: 14px; font-size: clamp(2.35rem, 3.55vw, 4.2rem); letter-spacing: -.055em; line-height: 1.14; }
.section-heading > p:last-child, .result-intro { max-width: 620px; margin-top: 18px; color: var(--muted); font-size: 1.05rem; }
.question-card { margin: 0; padding: 26px 0 32px; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.question-card legend { display: block; width: 100%; padding: 0; font-family: var(--heading); font-size: clamp(1.12rem, 1.6vw, 1.35rem); font-weight: 500; letter-spacing: -.025em; line-height: 1.4; }
.choice-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.choice { position: relative; display: block; min-width: 0; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: flex; align-items: center; justify-content: center; min-height: 54px; height: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 28px; color: var(--ink); background: #ffffff9c; text-align: center; font-size: .87rem; line-height: 1.25; transition: border-color .18s, background .18s, color .18s; cursor: pointer; }
.choice:hover span { border-color: var(--bronze); }
.choice input:checked + span { border-color: var(--green); color: #fff; background: var(--green); }
.choice input:focus-visible + span { outline-offset: 2px; }
.comment-details { margin-top: 18px; }
.comment-details summary { width: fit-content; color: var(--green); font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.comment-details summary:hover { color: var(--bronze); }
.comment-label { display: block; margin: 18px 0 8px; color: var(--muted); font-size: .88rem; }
.comment-input { display: block; width: 100%; min-height: 96px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); resize: vertical; line-height: 1.5; }
.comment-input::placeholder { color: #737d75; }
.validation-error { margin: 8px 0 18px; color: #8d3f2d; font-size: .95rem; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0 75px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 13px 26px; border: 1px solid transparent; border-radius: 999px; font-size: .94rem; font-weight: 600; line-height: 1.3; text-align: center; transition: background .18s, border-color .18s; }
.button-primary { margin-left: auto; background: var(--green); color: #fff; }
.button-primary:hover { background: #1d352c; }
.button-secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button-secondary:hover { border-color: var(--bronze); }

#result-view { padding: 54px 0 70px; }
.result-intro { max-width: 700px; }
.result-overview { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); margin-top: 38px; padding: clamp(26px, 3vw, 40px); background: var(--green); color: #fff; }
.result-score { flex: 0 0 auto; min-width: 150px; font-family: var(--heading); font-size: clamp(3.5rem, 6vw, 5.7rem); font-weight: 500; letter-spacing: -.075em; line-height: 1; }
.result-score small { display: block; margin-top: 9px; font-family: var(--body); font-size: .78rem; font-weight: 500; letter-spacing: 0; text-transform: uppercase; color: var(--light); }
.result-overview p { color: #e6eee8; font-size: 1rem; }
.result-overview .score-note { margin-top: 10px; color: #cbd8d0; font-size: .82rem; }
.result-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.result-panel { min-width: 0; padding: 26px; border: 1px solid var(--line); background: #fff; }
.result-panel h3 { font-size: 1.45rem; letter-spacing: -.035em; margin-bottom: 14px; }
.result-panel p { color: var(--muted); font-size: .94rem; }
.result-item { padding: 15px 0; border-top: 1px solid var(--line); }
.result-item strong { display: block; margin-bottom: 5px; font-family: var(--heading); font-size: .98rem; font-weight: 600; }
.result-item p { font-size: .9rem; }
.area-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 56px 0 16px; }
.area-heading h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); letter-spacing: -.04em; }
.area-heading p { color: var(--muted); font-size: .88rem; }
.area-results { border-top: 1px solid var(--line); }
.area-row { padding: 21px 0 24px; border-bottom: 1px solid var(--line); }
.area-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.area-row h4 { margin: 0; font-family: var(--heading); font-size: 1.05rem; font-weight: 600; }
.area-row strong { white-space: nowrap; font-family: var(--heading); font-size: 1.15rem; font-weight: 600; }
.area-meter { height: 7px; margin-top: 12px; overflow: hidden; background: #dce1da; border-radius: 99px; }
.area-meter span { display: block; height: 100%; background: var(--bronze); border-radius: inherit; }
.area-row p { margin-top: 8px; color: var(--muted); font-size: .88rem; }
.comments-section { margin-top: 56px; }
.comments-section h3 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); letter-spacing: -.04em; }
.comments-section > p { margin: 7px 0 20px; color: var(--muted); font-size: .94rem; }
.comment-result { padding: 21px 0 24px; border-top: 1px solid var(--line); break-inside: avoid; }
.comment-result .comment-area { color: var(--bronze); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.comment-result h4 { margin: 6px 0 8px; font-family: var(--heading); font-size: 1.06rem; font-weight: 600; }
.comment-result .comment-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.result-cta { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-top: 58px; padding: clamp(26px, 3vw, 40px); background: var(--green); color: white; }
.result-cta .eyebrow { color: var(--light); }
.result-cta h3 { max-width: 420px; margin: 10px 0 12px; font-size: clamp(1.7rem, 2.7vw, 2.5rem); letter-spacing: -.045em; line-height: 1.2; }
.result-cta p:last-child { max-width: 400px; color: #dce7df; font-size: .95rem; }
.button-light { flex: 0 0 auto; background: white; color: var(--green); }
.button-light:hover { background: var(--light); }
.result-actions { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 25px; }
.text-button { padding: 6px 0; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--ink); font-size: .9rem; }
.text-button:hover { color: var(--bronze); }
.site-footer { display: flex; justify-content: space-between; gap: 22px; width: 100%; max-width: 820px; margin: 0 auto; padding: 25px 0 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.site-footer p { max-width: 470px; }

@media (max-width: 1200px) {
  .app-shell { grid-template-columns: minmax(300px, 35%) minmax(0, 1fr); }
  .rail-message h1 { font-size: clamp(2.7rem, 4.3vw, 4.3rem); }
  .work-area { padding: 0 clamp(24px, 3.5vw, 58px); }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .brand-rail { position: relative; height: auto; min-height: 0; }
  .rail-content { display: block; padding: 24px clamp(24px, 5vw, 48px) 32px; }
  .brand-logo { width: 165px; }
  .rail-message { margin-top: 28px; }
  .rail-message .eyebrow { margin-bottom: 10px; }
  .rail-message h1 { max-width: 650px; font-size: clamp(2.3rem, 5.4vw, 4rem); }
  .rail-message > p:last-child { margin-top: 12px; max-width: 580px; font-size: .97rem; }
  .rail-signoff { display: none; }
  .work-area { padding: 0 clamp(24px, 5vw, 48px); }
  .topbar { min-height: 66px; }
  .progress-heading { margin-top: 30px; }
}
@media (max-width: 620px) {
  .brand-logo { width: 145px; }
  .rail-message h1 { font-size: clamp(2.05rem, 8.7vw, 3.2rem); }
  .rail-message > p:last-child { font-size: .9rem; }
  .topbar { font-size: .78rem; }
  .section-heading { margin-top: 34px; }
  .section-heading h2, #result-title { font-size: clamp(2.05rem, 9vw, 3rem); }
  .section-heading > p:last-child { font-size: 1rem; }
  .question-card { padding: 22px 0 26px; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice:last-child { grid-column: 1 / -1; }
  .choice span { min-height: 50px; }
  .form-actions { margin-bottom: 50px; }
  .button { padding: 12px 18px; }
  .result-overview { align-items: start; flex-direction: column; }
  .result-columns { grid-template-columns: 1fr; }
  .area-heading { display: block; }
  .area-heading p { margin-top: 6px; }
  .result-cta { align-items: stretch; flex-direction: column; }
  .site-footer { display: block; }
  .site-footer a { display: inline-block; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
@media print {
  body { background: white; color: black; }
  .app-shell { display: block; }
  .brand-rail, .topbar, .site-footer, .result-actions, .result-cta a, #quiz-view { display: none !important; }
  .work-area { display: block; padding: 0; }
  .work-inner { max-width: none; }
  #result-view { padding: 0; }
  .result-overview, .result-panel, .result-cta { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .area-row { break-inside: avoid; }
}
