:root {
  --bg: #f5efe6;
  --bg-soft: #faf7f2;
  --ink: #2b2a26;
  --muted: #6e6a61;
  --line: #d9d0c3;
  --sage-dark: #4f5f4b;
  --deep: #263029;
  --max: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  color: var(--ink);
  background: var(--bg-soft);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sage-dark);
  outline-offset: 5px;
}
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 208, 195, .75);
}
.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.brand-mark {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: #fff;
  font: 700 13px/1 Georgia, serif;
  letter-spacing: .08em;
}
.brand-text strong { color: var(--sage-dark); }
.main-nav { flex-shrink: 0; font-size: 14px; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}
.nav-cta:hover { background: var(--bg); }

main { flex: 1; display: flex; }
.test-section {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 88px 0;
}
.test-content { text-align: center; }
.eyebrow {
  margin: 0 0 24px;
  color: var(--sage-dark);
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: 11px;
  font-weight: 650;
}
h1 {
  max-width: 800px;
  margin: 0 auto 36px;
  font: 400 clamp(40px, 6vw, 76px)/1.12 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease;
}
.button-primary { background: var(--deep); color: #fff; }
.button-primary:hover { background: #18211b; }
.test-status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.intro-note { margin: -16px 0 24px; color: var(--muted); font-size: 14px; }
.intro-instructions { max-width: 610px; margin: 0 auto 16px; font-size: 16px; }
.intro-disclaimer { max-width: 590px; margin: 0 auto 28px; color: var(--muted); font-size: 12px; }
.quiz-panel { width: min(100%, 600px); margin-inline: auto; text-align: left; }
.quiz-panel .eyebrow { margin-bottom: 12px; }
.question-progress { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 3px;
  margin-bottom: 32px;
  border: 0;
  border-radius: 3px;
  background: var(--line);
  color: var(--sage-dark);
}
progress::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
progress::-webkit-progress-value { background: var(--sage-dark); border-radius: 3px; }
progress::-moz-progress-bar { background: var(--sage-dark); border-radius: 3px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { width: 100%; padding: 0; }
.quiz-title { margin: 0 0 28px; font-size: clamp(30px, 4vw, 44px); line-height: 1.2; letter-spacing: -.03em; }
.quiz-title:focus { outline: none; }
.question-hint { margin: -14px 0 22px; color: var(--muted); font-size: 13px; }
.answer-list { display: grid; gap: 10px; }
.answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255,255,255,.4);
}
.answer-option:hover { background: var(--bg); }
.answer-option:has(input:checked) { border-color: var(--sage-dark); background: #edf0e9; }
.answer-option:has(input:focus-visible) { outline: 2px solid var(--sage-dark); outline-offset: 3px; }
.answer-option input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; accent-color: var(--sage-dark); }
.quiz-actions { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.button-ghost:hover { background: var(--bg); }
.result-intro { color: var(--muted); margin: -12px 0 24px; }
.answer-summary { margin: 0; }
.answer-summary > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.answer-summary > div:first-child { border-top: 1px solid var(--line); }
.answer-summary dt { margin-bottom: 7px; font-size: 14px; font-weight: 650; color: var(--sage-dark); }
.answer-summary dd { margin: 0; }
.demo-note { font-size: 13px; color: var(--muted); margin: 22px 0 28px; }
.continuation { margin-top: 28px; }
.continuation .test-status { margin-top: 10px; }
.button:disabled { background: #e5e4dc; color: #62665d; cursor: not-allowed; }
.text-button {
  min-height: 44px;
  padding: 8px 0;
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--sage-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.data-note { max-width: 480px; margin: 18px auto 0; color: var(--muted); font-size: 12px; }
.result-panel { width: min(100%, 720px); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fffdf9; }
.result-panel .eyebrow { margin-bottom: 6px; }
.result-date { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.result-panel .quiz-title { margin-bottom: 24px; }
.result-panel .answer-summary > div { padding: 20px 0; }
.result-panel .answer-summary dd { overflow-wrap: anywhere; }
.result-panel .demo-note { margin: 20px 0 24px; }
.result-note { margin: 22px 0 26px; font-size: 12px; color: var(--muted); }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-actions .button { padding-inline: 12px; gap: 8px; border-radius: 12px; font-size: 14px; }
.save-status { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.save-status:empty { display: none; }

.site-footer {
  padding: 24px 0 32px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}
.footer-grid > span:nth-child(2) { text-align: center; }
.footer-grid > span:last-child { text-align: right; }

@media (max-width: 740px) {
  .container { width: min(calc(100% - 32px), var(--max)); }
  .brand { gap: 9px; font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; }
  .nav-cta { padding-inline: 14px; }
  .test-section { padding: 64px 0; }
  .test-section:has(.quiz-panel:not([hidden])) { padding: 36px 0; }
  .quiz-actions .button { padding-inline: 18px; }
  .eyebrow { font-size: 10px; letter-spacing: .12em; }
  .footer-grid { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid > span:nth-child(2),
  .footer-grid > span:last-child { text-align: left; }
}
@media (max-width: 520px) {
  .result-panel { padding: 22px 18px; }
  .result-actions { grid-template-columns: 1fr; }
  .intro-instructions { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
