:root {
  color-scheme: light;
  --green-950: #052f29;
  --green-900: #073f36;
  --green-800: #0b5146;
  --gold-600: #b9851c;
  --gold-400: #d9b45a;
  --cream: #fffaf0;
  --sand: #f3ead8;
  --paper: #fffdf8;
  --ink: #17342f;
  --muted: #5d6e69;
  --line: #ded3bd;
  --shadow: 0 22px 60px rgba(5, 47, 41, .12);
}

* { box-sizing: border-box; }
html { background: var(--cream); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(217,180,90,.14), transparent 28rem),
    linear-gradient(180deg, #fffdf8 0%, #f7efdf 100%);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

button, input { font: inherit; }
button { min-height: 48px; }
button:focus-visible, input:focus-visible, .answer-card:focus-within {
  outline: 3px solid #147e70;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 5;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  background: var(--green-950);
  color: white;
  border-radius: .25rem;
}
.skip-link:focus { transform: none; }

.brand {
  display: flex;
  justify-content: center;
  padding: 1.6rem 1.25rem 1rem;
}
.brand a { display: inline-flex; }
.brand img { width: min(280px, 72vw); height: 52px; object-fit: contain; }

.shell {
  width: min(860px, calc(100% - 2rem));
  min-height: 620px;
  margin: 0 auto 2rem;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: rgba(255, 253, 248, .94);
  border: 1px solid rgba(185,133,28,.28);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.intro { max-width: 680px; margin: 0 auto; text-align: center; padding: 4vh 0 2vh; }
.eyebrow {
  margin: 0 0 .65rem;
  color: var(--gold-600);
  font-weight: 750;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .82rem;
}
h1, h2, legend { font-family: Georgia, "Times New Roman", serif; color: var(--green-950); }
h1 { margin: 0; font-size: clamp(2.25rem, 7vw, 4.35rem); line-height: 1.06; font-weight: 500; letter-spacing: -.035em; }
.lede { margin: 1.25rem auto 0; font-size: clamp(1.15rem, 3vw, 1.45rem); color: var(--green-800); }
.rule { display: flex; align-items: center; gap: 1rem; margin: 1.4rem auto; color: var(--gold-600); }
.rule::before, .rule::after { content: ""; height: 1px; flex: 1; background: var(--gold-400); }
.context { max-width: 590px; margin: 0 auto; }
.fine-print { color: var(--muted); font-size: .95rem; }

.primary, .secondary, .text-button, .family-choice {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
.primary { padding: .82rem 1.5rem; background: var(--green-900); color: white; }
.primary:hover:not(:disabled) { background: var(--green-800); transform: translateY(-1px); }
.primary:disabled { cursor: not-allowed; opacity: .48; }
.secondary { padding: .75rem 1.35rem; border: 1px solid var(--green-900); background: transparent; color: var(--green-900); }
.secondary:hover { background: var(--green-900); color: white; }
.text-button { padding: .65rem 1rem; background: transparent; color: var(--green-800); text-decoration: underline; text-underline-offset: .2em; }

.intro .primary { margin-top: 1.1rem; min-width: 180px; }
.question-screen { max-width: 680px; margin: 0 auto; }
.progress-row { display: grid; gap: .45rem; margin-bottom: 2rem; }
.progress-row p { margin: 0; color: var(--muted); font-weight: 650; }
.progress-track { height: 5px; background: #e9e0cf; border-radius: 99px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 20%; background: var(--gold-600); }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { width: 100%; margin-bottom: 1.5rem; font-size: clamp(1.65rem, 5vw, 2.4rem); line-height: 1.22; font-weight: 500; }
.answer-list { display: grid; gap: .8rem; }
.answer-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.15rem 1fr;
  align-items: center;
  gap: .8rem;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  cursor: pointer;
}
.answer-card:hover { border-color: var(--gold-600); }
.answer-card:has(input:checked) { border-color: var(--green-900); background: #f0f7f4; box-shadow: inset 0 0 0 1px var(--green-900); }
.answer-card input { position: absolute; opacity: 0; pointer-events: none; }
.answer-letter {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--sand);
  color: var(--green-900);
  font-weight: 800;
}
.answer-card:has(input:checked) .answer-letter { background: var(--green-900); color: white; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.75rem; }

.result-screen { max-width: 730px; margin: 0 auto; }
.result-grid { display: grid; grid-template-columns: minmax(180px, 270px) 1fr; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); }
.badge-wrap { aspect-ratio: 1; }
.badge-wrap img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 10px 14px rgba(5,47,41,.16)); }
.result-copy h1 { font-size: clamp(2rem, 5vw, 3.35rem); }
.result-description { font-size: 1.12rem; }
.qualification { color: var(--muted); }
.adoption-note { min-height: 1.6em; margin-bottom: 0; color: var(--green-800); font-weight: 750; }
.adoption-office { margin: 2rem 0 1.5rem; padding: 1.5rem; background: #f3ead8; border-radius: 18px; }
.adoption-office h2 { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 500; }
.adoption-office p:not(.eyebrow) { margin: .35rem 0 1rem; }
.family-choices { display: flex; flex-wrap: wrap; gap: .55rem; }
.family-choice { min-height: 42px; padding: .55rem .85rem; border: 1px solid #bcae92; background: var(--paper); color: var(--green-900); }
.family-choice:hover, .family-choice[aria-pressed="true"] { border-color: var(--green-900); background: var(--green-900); color: white; }
footer { padding: .25rem 1rem 2rem; text-align: center; color: var(--muted); font-size: .86rem; }

[hidden] { display: none !important; }

@media (max-width: 620px) {
  .brand { padding-top: 1rem; }
  .shell { width: min(100% - 1rem, 860px); min-height: 70vh; padding: 1.35rem; border-radius: 20px; }
  .intro { padding-top: 1rem; }
  .result-grid { grid-template-columns: 1fr; text-align: center; }
  .badge-wrap { width: min(230px, 72vw); margin: 0 auto; }
  .family-choices { justify-content: center; }
  .result-screen > .secondary { display: block; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .progress-track, .answer-letter { border: 1px solid ButtonText; }
  .answer-card:has(input:checked) { outline: 2px solid Highlight; }
}
