:root {
  color-scheme: light;
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --ink: #29231f;
  --muted: #625a52;
  --line: #d9d0c3;
  --primary: #7a4b2a;
  --primary-dark: #633b21;
  --gold: #c89b5b;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.site-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.site-header, main, .site-footer { width: min(100% - 48px, 1180px); margin-inline: auto; }
.site-header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 650; letter-spacing: .01em; }
.brand-mark { display: grid; place-items: center; width: 31px; aspect-ratio: 1; border: 1.5px solid var(--primary); border-radius: 50%; }
.brand-mark span { width: 15px; aspect-ratio: 1; border: 1.5px solid var(--primary); border-radius: 50%; position: relative; }
.brand-mark span::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--primary); }
.header-note { color: var(--muted); font-size: 13px; letter-spacing: .07em; text-decoration: none; }
.header-note:hover { color: var(--primary); }
main { flex: 1; }
.screen { animation: enter .36s ease both; }
.eyebrow { margin: 0 0 20px; color: var(--primary); text-transform: uppercase; letter-spacing: .19em; font-size: 11px; font-weight: 750; }
.intro-screen { min-height: min(760px, calc(100dvh - 190px)); display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: clamp(40px, 6vw, 100px); padding-block: 55px 70px; }
.intro-copy { max-width: 630px; }
.intro-copy h1, .result-hero h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; line-height: 1.08; }
.intro-copy h1 { font-size: clamp(48px, 5.8vw, 84px); }
.intro-copy h1 em { color: var(--primary); font-weight: 400; }
.intro-subtitle { margin: 27px 0 0; max-width: 490px; font-size: clamp(18px, 2vw, 22px); line-height: 1.42; }
.intro-instruction { margin: 19px 0 30px; max-width: 510px; color: var(--muted); font-size: 15px; }
.button { min-height: 50px; padding: 12px 22px; display: inline-flex; align-items: center; justify-content: center; gap: 30px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; text-decoration: none; transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 7px 20px #492a171c; }
.button-primary { background: var(--primary); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--primary-dark); }
.button-primary:disabled { background: #ad9c8d; color: #fff; }
.button-secondary { border-color: var(--line); background: transparent; color: var(--ink); }
.button-secondary:hover { border-color: var(--primary); background: #fff9ef; }
.intro-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; color: var(--muted); font-size: 12px; }
.intro-meta span + span::before { content: "·"; margin-right: 26px; color: var(--gold); }
.intro-art { position: relative; min-height: 570px; overflow: hidden; border-radius: 220px 220px 14px 14px; background: radial-gradient(circle at 50% 42%, #f1ddbb 0, #e8d1aa 28%, #cfa871 65%, #a76f44 100%); box-shadow: inset 0 0 0 1px #ffffff60; }
.intro-art::before { content: ""; position: absolute; inset: 22px; border: 1px solid #fff8e994; border-radius: 210px 210px 8px 8px; }
.intro-art::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 39px, #fff7e409 40px 41px); pointer-events: none; }
.art-caption { position: absolute; z-index: 2; top: 53px; left: 50%; transform: translateX(-50%); color: #533b2b; white-space: nowrap; text-transform: uppercase; letter-spacing: .28em; font-size: 10px; font-weight: 700; }
.art-orbit { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); aspect-ratio: 1; border: 1px solid #fff9e6b8; border-radius: 50%; }
.orbit-one { width: 80%; }
.orbit-two { width: 58%; }
.art-center { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); width: 38%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #fff9e6db; border-radius: 50%; background: #fff9e620; box-shadow: 0 0 0 24px #fff9e611; }
.art-inner { width: 31%; aspect-ratio: 1; background: #fff7e6; border-radius: 50%; box-shadow: 0 0 0 16px #fff7e633; }
.art-corner { position: absolute; width: 90px; height: 90px; border: 1px solid #fff8e96b; transform: rotate(45deg); }
.art-corner-top { top: 130px; left: -45px; }.art-corner-bottom { bottom: 75px; right: -45px; }
.site-footer { display: flex; justify-content: space-between; gap: 36px; padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }
.site-footer p:first-child { flex: 0 0 auto; font-weight: 700; color: var(--primary); }
.disclaimer { max-width: 770px; }

.quiz-screen { max-width: 790px; margin: 0 auto; padding: clamp(35px, 7vw, 75px) 0 95px; }
.quiz-topline, .progress-heading, .quiz-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.quiz-topline .eyebrow { margin-bottom: 0; }
.text-button { border: 0; padding: 8px 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--primary); }
.progress-heading { margin-top: 43px; font-size: 13px; font-weight: 650; }
#progress-percent { color: var(--muted); }
.progress-track { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 10px; background: #e7ded1; }
.progress-track span { display: block; width: 5%; height: 100%; border-radius: inherit; background: var(--primary); transition: width .28s ease; }
.question-panel { margin-top: 46px; }
.question-panel fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.question-panel legend { width: 100%; margin-bottom: 30px; padding: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 4vw, 46px); line-height: 1.2; letter-spacing: -.025em; }
.answer-options { display: grid; gap: 12px; }
.answer-card { position: relative; display: flex; align-items: center; gap: 20px; min-height: 72px; padding: 16px 20px; border: 1.5px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.answer-card:hover { border-color: #ac865f; transform: translateX(2px); }
.answer-card:has(input:checked) { border-color: var(--primary); background: #f2e9db; }
.answer-card:has(input:focus-visible) { outline: 3px solid var(--primary); outline-offset: 3px; }
.answer-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.answer-letter { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--primary); font-size: 13px; font-weight: 750; }
.answer-card:has(input:checked) .answer-letter { border-color: var(--primary); background: var(--primary); color: #fff; }
.answer-text { flex: 1; line-height: 1.45; }
.answer-check { opacity: 0; color: var(--primary); font-weight: 800; font-size: 19px; }
.answer-card:has(input:checked) .answer-check { opacity: 1; }
.quiz-actions { margin-top: 33px; }
.quiz-actions .button { min-width: 145px; }

.result-screen { max-width: 900px; margin: 0 auto; padding: clamp(38px, 7vw, 78px) 0 85px; }
.result-hero { position: relative; padding: clamp(33px, 6vw, 60px); border-radius: var(--radius); overflow: hidden; background: #e8d6b9; }
.result-hero::after { content: ""; position: absolute; width: 360px; aspect-ratio: 1; top: -165px; right: -95px; border: 1px solid #ffffff9a; border-radius: 50%; box-shadow: 0 0 0 42px #ffffff20, 0 0 0 84px #ffffff20; pointer-events: none; }
.result-hero .eyebrow { position: relative; z-index: 1; }
.result-hero h1 { position: relative; z-index: 1; max-width: 690px; font-size: clamp(39px, 5.3vw, 69px); }
#result-name { color: var(--primary); }
.result-classification { position: relative; z-index: 1; margin: 14px 0 0; color: var(--primary-dark); font-size: 14px; font-weight: 700; }
.result-summary { position: relative; z-index: 1; margin: 30px 0 0; max-width: 610px; font-size: 18px; }
.tie-note { position: relative; z-index: 1; margin: 13px 0 0; font-weight: 700; }
.result-details { margin-top: 55px; }
.scores-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.scores-heading .eyebrow { margin-bottom: 7px; }
.scores-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.025em; font-size: 38px; }
.scores-heading > p { max-width: 310px; margin: 0; color: var(--muted); font-size: 13px; }
.score-list { display: grid; gap: 22px; }
.score-row { display: grid; grid-template-columns: 105px 1fr 125px; align-items: center; gap: 18px; }
.score-name { font-weight: 700; }
.score-track { height: 11px; background: #e7ded1; border-radius: 20px; overflow: hidden; }
.score-fill { height: 100%; width: 0; border-radius: inherit; background: var(--primary); transition: width .5s ease; }
.score-row:not(.top-score) .score-fill { background: #be9b73; }
.score-value { color: var(--muted); text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.score-method { margin: 30px 0 0; padding-top: 19px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 850px) {
  .intro-screen { grid-template-columns: 1fr; min-height: 0; gap: 36px; padding-top: 55px; }
  .intro-art { min-height: 380px; border-radius: 180px 180px 14px 14px; }
  .site-footer { display: block; }.site-footer .disclaimer { margin-top: 13px; }
}
@media (max-width: 560px) {
  .site-header, main, .site-footer { width: min(100% - 36px, 1180px); }
  .site-header { min-height: 70px; }.brand { font-size: 12px; gap: 9px; }.brand-mark { width: 26px; }.brand-mark span { width: 13px; }.header-note { font-size: 11px; white-space: nowrap; }
  .intro-screen { padding-top: 44px; padding-bottom: 55px; }.intro-copy h1 { font-size: clamp(43px, 12vw, 61px); }.intro-subtitle { margin-top: 21px; }.intro-instruction { margin-top: 16px; }
  .intro-art { min-height: 300px; border-radius: 170px 170px 12px 12px; }.art-caption { top: 38px; font-size: 9px; }.art-inner { box-shadow: 0 0 0 11px #fff7e633; }
  .intro-meta { gap: 7px 14px; }.intro-meta span + span::before { margin-right: 14px; }
  .quiz-screen { padding-top: 35px; padding-bottom: 60px; }.progress-heading { margin-top: 30px; }.question-panel { margin-top: 32px; }.question-panel legend { margin-bottom: 25px; }
  .answer-card { min-height: 68px; padding: 13px 14px; gap: 13px; }.answer-letter { flex-basis: 32px; width: 32px; height: 32px; }.answer-text { font-size: 14px; }.quiz-actions .button { min-width: 0; flex: 1; }.quiz-actions { gap: 10px; }
  .result-screen { padding-bottom: 55px; }.result-hero { padding: 29px 24px; }.result-summary { font-size: 16px; }.result-details { margin-top: 40px; }.scores-heading { display: block; }.scores-heading > p { margin-top: 8px; }.score-row { grid-template-columns: 75px 1fr 81px; gap: 9px; }.score-name, .score-value { font-size: 12px; }.score-track { height: 9px; }.result-actions .button { flex: 1; gap: 10px; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
