:root {
  --forest: #29352b;
  --forest-deep: #1d281f;
  --forest-soft: #526052;
  --cream: #f5ead6;
  --cream-light: #fffaf0;
  --sand: #dcc9aa;
  --gold: #bc9562;
  --paper: rgba(255, 250, 240, 0.92);
  --white: #ffffff;
  --danger: #913b32;
  --border: rgba(41, 53, 43, 0.18);
  --shadow: 0 24px 70px rgba(40, 48, 38, 0.14);
  --radius-lg: 30px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--forest);
  background:
    radial-gradient(circle at 10% 6%, rgba(188, 149, 98, 0.18), transparent 30rem),
    radial-gradient(circle at 93% 24%, rgba(41, 53, 43, 0.08), transparent 28rem),
    linear-gradient(135deg, #fffaf0 0%, #f4e7d2 100%);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 20;
  padding: .75rem 1rem;
  color: var(--cream-light);
  background: var(--forest-deep);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .28rem .7rem .28rem .32rem;
  color: var(--cream-light);
  background: #373d32;
  border: 1px solid rgba(245,234,214,.2);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(41,53,43,.14);
}
.brand-symbol { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 5px 12px rgba(0,0,0,.15)); }
.brand-wordmark { width: 174px; height: auto; display: block; }

.privacy-note, .local-only {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--forest-soft);
  font-size: .86rem;
}
.privacy-note svg, .local-only svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.main { flex: 1; display: grid; place-items: center; padding: 3.5rem 0 4rem; }
.screen { width: 100%; }

.start-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 2.4rem;
  align-items: center;
}
.intro-copy { max-width: 700px; }
.eyebrow, .result-kicker, .card-label {
  margin: 0 0 .8rem;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2, p { overflow-wrap: anywhere; }
h1 {
  max-width: 780px;
  margin: 0;
  color: var(--forest-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.65rem, 6vw, 5.35rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .99;
}
h1 span { color: var(--gold); }
.lead { max-width: 650px; margin: 1.5rem 0 1.25rem; color: var(--forest); font-size: clamp(1.15rem, 2vw, 1.36rem); line-height: 1.48; }
.intro-copy > p:not(.eyebrow):not(.lead) { max-width: 650px; color: var(--forest-soft); }

.primary-button, .secondary-button {
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: .78rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.primary-button { color: var(--cream-light); background: var(--forest); box-shadow: 0 9px 24px rgba(41,53,43,.2); }
.intro-copy > .primary-button { margin-top: 1.25rem; }
.primary-button:hover { transform: translateY(-2px); background: var(--forest-deep); }
.primary-button:focus-visible, .secondary-button:focus-visible, .text-button:focus-visible, .answer-option:focus-within { outline: 3px solid rgba(188,149,98,.48); outline-offset: 3px; }
.secondary-button { color: var(--forest); background: transparent; border-color: var(--border); box-shadow: none; }
.secondary-button:hover { background: rgba(220,201,170,.26); }

.orientation-card {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--cream-light);
  background: linear-gradient(148deg, #3b493b 0%, #202b22 100%);
  border: 1px solid rgba(255,250,240,.12);
  border-radius: 52% 52% var(--radius-lg) var(--radius-lg) / 34% 34% var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
}
.orientation-card::after {
  content: "";
  position: absolute;
  inset: 1rem;
  pointer-events: none;
  border: 1px solid rgba(245,234,214,.18);
  border-radius: inherit;
}
.tree-emblem { position: absolute; top: 1rem; left: 50%; width: min(67%, 300px); height: auto; transform: translateX(-50%); opacity: .92; filter: sepia(.1) drop-shadow(0 16px 30px rgba(0,0,0,.16)); }
.orientation-card h2, .orientation-card ul { position: relative; z-index: 1; }
.card-wordmark { position: relative; z-index: 1; width: 180px; height: auto; margin: 0 0 .55rem; border-radius: 5px; }
.orientation-card h2 { max-width: 390px; margin: 0 0 1.1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 500; line-height: 1.14; }
.orientation-card ul { margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .65rem .8rem; list-style: none; }
.orientation-card li { display: flex; align-items: center; gap: .55rem; color: rgba(255,250,240,.88); font-size: .9rem; line-height: 1.35; }
.orientation-card li span { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; color: var(--forest-deep); background: var(--cream); border-radius: 50%; font-weight: 800; font-size: .78rem; }

.medical-note {
  grid-column: 1 / -1;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  color: #59472e;
  background: rgba(255,250,240,.72);
  border: 1px solid rgba(188,149,98,.42);
  border-radius: var(--radius-md);
}
.medical-note p { margin: 0; font-size: .9rem; line-height: 1.5; }

.quiz-screen { max-width: 820px; }
.progress-head { margin-bottom: 1.2rem; }
.progress-head > div:first-child { margin-bottom: .6rem; display: flex; justify-content: space-between; color: var(--forest-soft); font-size: .88rem; font-weight: 750; }
.progress-track { height: 7px; overflow: hidden; background: rgba(41,53,43,.13); border-radius: 999px; }
.progress-track span { display: block; width: 10%; height: 100%; background: linear-gradient(90deg, var(--gold), #d7bc91); border-radius: inherit; transition: width 280ms ease; }
.question-card { padding: clamp(1.4rem, 4vw, 3rem); background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: .65rem; color: var(--forest-deep); font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.2; }
.question-hint { margin: 0 0 1.3rem; color: var(--forest-soft); }
.answer-list { display: grid; gap: .75rem; }
.answer-option { position: relative; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: .85rem; min-height: 60px; padding: .8rem 1rem; background: rgba(245,234,214,.58); border: 1px solid transparent; border-radius: 15px; cursor: pointer; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.answer-option:hover { transform: translateX(3px); border-color: rgba(188,149,98,.65); }
.answer-option:has(input:checked) { background: rgba(220,201,170,.54); border-color: var(--forest); }
.answer-option input { position: absolute; opacity: 0; pointer-events: none; }
.radio-mark { width: 23px; height: 23px; display: grid; place-items: center; border: 2px solid #8a917f; border-radius: 50%; }
.radio-mark::after { content: ""; width: 11px; height: 11px; background: var(--forest); border-radius: 50%; transform: scale(0); transition: transform 130ms ease; }
.answer-option input:checked + .radio-mark { border-color: var(--forest); }
.answer-option input:checked + .radio-mark::after { transform: scale(1); }
.answer-error { margin: .9rem 0 0; color: var(--danger); font-weight: 700; }
.question-actions { margin-top: 1.8rem; display: flex; justify-content: space-between; gap: 1rem; }
.local-only { justify-content: center; margin: 1rem 0 0; }

.result-screen { max-width: 940px; }
.result-header { padding-bottom: 1.35rem; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; border-bottom: 1px solid var(--border); }
.result-header h1 { max-width: 720px; font-size: clamp(2.3rem, 6vw, 4.8rem); }
.tone { margin: 0 0 .5rem; color: var(--forest-soft); }
.result-symbol { flex: 0 0 auto; width: 94px; height: 94px; display: grid; place-items: center; color: var(--cream-light); background: var(--forest); border: 10px solid var(--cream); border-radius: 50%; font-family: Georgia, serif; font-size: 2.1rem; }
.result-explanation { max-width: 840px; margin: 1.6rem 0; font-size: 1.12rem; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.insight-card, .impulse-card { min-height: 100%; padding: 1.5rem; border-radius: var(--radius-md); }
.insight-card { background: var(--paper); border: 1px solid var(--border); }
.insight-card ul { margin: 0; padding-left: 1.25rem; }
.insight-card li + li { margin-top: .8rem; }
.impulse-card { background: linear-gradient(145deg, #3a483a, #202b22); color: var(--cream-light); }
.impulse-card .card-label { color: var(--sand); }
.impulse-card p:last-child { margin-bottom: 0; }
.secondary-result { margin-top: 1rem; padding: 1.1rem 1.3rem; background: rgba(220,201,170,.34); border-left: 4px solid var(--gold); border-radius: 4px var(--radius-md) var(--radius-md) 4px; }
.secondary-result p { margin: .25rem 0 0; }
.score-overview { margin: 1rem 0; padding: 1.25rem 1.4rem; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius-md); }
.score-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.score-overview h2 { margin: 0; font-size: 1.15rem; }
.text-button { padding: .35rem; color: var(--forest); background: none; border: 0; font-weight: 750; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.score-bars { margin-top: 1.15rem; display: grid; gap: .8rem; }
.score-row { display: grid; grid-template-columns: 190px 1fr 46px; gap: .8rem; align-items: center; font-size: .9rem; }
.score-track { height: 8px; overflow: hidden; background: rgba(41,53,43,.13); border-radius: 999px; }
.score-fill { height: 100%; background: var(--gold); border-radius: inherit; }
#score-details > p { margin: 1rem 0 0; color: var(--forest-soft); font-size: .88rem; }
.cta-card { margin-top: 1.2rem; padding: clamp(1.5rem, 4vw, 2.5rem); background: linear-gradient(135deg, rgba(220,201,170,.44), rgba(255,250,240,.76)); border: 1px solid rgba(188,149,98,.28); border-radius: var(--radius-lg); }
.cta-card h2 { max-width: 680px; margin: 0 0 .8rem; color: var(--forest-deep); font-family: Georgia, serif; font-size: clamp(1.65rem, 3vw, 2.5rem); font-weight: 500; line-height: 1.2; }
.cta-card .primary-button { margin-top: .8rem; }
.cta-card small { display: block; margin-top: .75rem; color: var(--forest-soft); }
.result-footer { margin-top: 1.2rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1.5rem; align-items: center; border-top: 1px solid var(--border); }
.result-footer p { max-width: 650px; margin: 0; color: var(--forest-soft); font-size: .88rem; }
.site-footer { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--forest-soft); border-top: 1px solid var(--border); font-size: .88rem; }
.site-footer a { text-underline-offset: 3px; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 1.2rem, 680px); }
  .site-header { min-height: 78px; }
  .brand-symbol { width: 42px; height: 42px; }
  .brand-wordmark { width: 150px; height: auto; }
  .privacy-note { max-width: 150px; text-align: right; line-height: 1.25; }
  .main { padding: 2.2rem 0 3rem; align-items: start; }
  .start-screen { grid-template-columns: 1fr; gap: 1.5rem; }
  .orientation-card { min-height: 510px; order: 2; }
  .medical-note { order: 3; grid-template-columns: 1fr; gap: .3rem; }
  .result-grid { grid-template-columns: 1fr; }
  .result-symbol { width: 72px; height: 72px; border-width: 7px; font-size: 1.65rem; }
  .score-row { grid-template-columns: 1fr 44px; gap: .35rem .6rem; }
  .score-track { grid-column: 1 / -1; grid-row: 2; }
  .result-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  body { line-height: 1.55; }
  .brand { gap: .35rem; padding-right: .5rem; }
  .brand-symbol { width: 36px; height: 36px; }
  .brand-wordmark { width: 126px; }
  .privacy-note { max-width: 24px; overflow: hidden; gap: 0; font-size: 0; white-space: nowrap; }
  .privacy-note svg { flex: 0 0 18px; }
  h1 { font-size: clamp(2.35rem, 13vw, 3.35rem); }
  .orientation-card { min-height: 475px; padding: 1.4rem; }
  .tree-emblem { width: 72%; }
  .orientation-card ul { grid-template-columns: 1fr; }
  .question-card { padding: 1.2rem; border-radius: 21px; }
  .question-actions { align-items: stretch; flex-direction: column-reverse; }
  .question-actions button { width: 100%; }
  .result-header { align-items: flex-start; }
  .score-overview-head { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 1rem 0; }
}

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