:root {
  color-scheme: light;
  --paper: #f7f8f1;
  --surface: #ffffff;
  --moss: #294a3c;
  --moss-deep: #213e32;
  --blue-gray: #58717b;
  --ink: #273c37;
  --muted: #61756d;
  --line: #dce5dc;
  --butter: #ffe5a1;
  --butter-soft: #fff6dd;
  --wrong: #a65f28;
  --shadow: 0 18px 55px rgba(36, 67, 53, 0.09);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 92% 4%, #eaf0e9 0, transparent 27%), var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; }
button:focus-visible { outline: 4px solid #e6af37; outline-offset: 4px; }
[hidden] { display: none !important; }

.page-shell {
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.3vw, 68px);
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--moss);
  font-size: clamp(16px, 1.45vw, 19px);
  font-weight: 600;
  white-space: nowrap;
}
.brand strong { font-weight: 800; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--moss);
  color: var(--butter);
  font-size: 20px;
  line-height: 1;
}
.header-tag {
  border: 1px solid #cfddd0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--blue-gray);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

main { width: 100%; flex: 1; display: flex; }
.screen { width: 100%; margin: auto 0; }

.intro-card, .finish-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #e3e9dc;
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: var(--surface);
}
.intro-card {
  min-height: 545px;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(350px, 0.94fr);
  align-items: center;
}
.intro-copy { position: relative; z-index: 2; padding: 56px clamp(40px, 5.5vw, 80px); }
.eyebrow, .small-label, .question-kicker {
  color: var(--blue-gray);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-dot { width: 10px; height: 10px; border-radius: 50%; background: #dbbb59; }
.intro-copy h1, .finish-copy h1 {
  margin: 24px 0 19px;
  color: var(--moss-deep);
  font-size: clamp(46px, 5.25vw, 78px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.055em;
}
.intro-copy h1 em, .finish-copy h1 em { color: var(--blue-gray); font-style: normal; }
.intro-topic {
  max-width: 610px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: 700;
  line-height: 1.4;
}
.intro-helper { max-width: 530px; margin: 16px 0 28px; color: var(--muted); font-size: 17px; line-height: 1.55; }
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 58px;
  border: 0;
  border-radius: 17px;
  padding: 14px 24px;
  background: var(--moss);
  box-shadow: 0 8px 18px rgba(37, 77, 59, .17);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.primary-button:hover { background: var(--moss-deep); transform: translateY(-2px); box-shadow: 0 12px 22px rgba(37, 77, 59, .2); }
.primary-button span { font-size: 24px; font-weight: 500; line-height: 1; }

.intro-art { position: relative; height: 100%; min-height: 545px; display: flex; justify-content: center; align-items: flex-end; isolation: isolate; }
.art-halo {
  position: absolute;
  z-index: -1;
  width: min(86%, 460px);
  aspect-ratio: 1;
  left: 8%;
  bottom: -5%;
  border-radius: 50%;
  background: #e4eee7;
  box-shadow: 0 0 0 36px #f1f5ec;
}
.intro-art::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 90%;
  height: 100px;
  bottom: -62px;
  left: 5%;
  border-radius: 50%;
  background: var(--butter-soft);
}
.mascot { display: block; width: auto; object-fit: contain; }
.mascot--intro { position: relative; max-width: 91%; max-height: 470px; filter: drop-shadow(0 14px 13px rgba(40, 66, 54, .12)); animation: bob 4s ease-in-out infinite; }
.intro-bubble {
  position: absolute;
  z-index: 2;
  top: 61px;
  right: 9%;
  padding: 16px 21px;
  border: 2px solid var(--moss);
  border-radius: 23px 23px 5px 23px;
  background: var(--butter);
  color: var(--moss-deep);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
  transform: rotate(5deg);
  animation: sway 4s ease-in-out infinite;
}
.art-spark, .finish-spark { position: absolute; color: #d8bc69; font-size: 35px; }
.art-spark--one { top: 34%; left: 7%; }
.art-spark--two { right: 7%; bottom: 19%; font-size: 26px; }
.intro-notes { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 28px; padding: 22px 0 10px; color: var(--blue-gray); font-size: 15px; font-weight: 700; }
.intro-notes > span { display: inline-flex; align-items: center; gap: 8px; }
.note-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e3ede5; color: var(--moss); font-size: 10px; font-weight: 900; }

.quiz-screen { max-width: 1120px; margin: 16px auto 26px; }
.quiz-topline { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 3px 15px; }
.quiz-topline h2 { margin: 6px 0 0; color: var(--moss-deep); font-size: clamp(23px, 2.25vw, 31px); letter-spacing: -.03em; }
.progress-text { flex: none; color: var(--moss); font-size: clamp(17px, 1.7vw, 22px); font-weight: 900; }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #dae6dc; margin-bottom: 20px; }
.progress-fill { display: block; height: 100%; width: 20%; border-radius: inherit; background: linear-gradient(90deg, #6d9484, var(--moss)); transition: width .28s ease; }
.question-card { border: 1px solid #e2e9df; border-radius: 29px; padding: clamp(23px, 3.15vw, 42px); background: var(--surface); box-shadow: var(--shadow); }
.question-kicker { color: #73877b; }
.question-card h1 { max-width: 1030px; margin: 14px 0 26px; color: var(--moss-deep); font-size: clamp(23px, 2.2vw, 32px); font-weight: 800; line-height: 1.38; letter-spacing: -.025em; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.answer-button {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-height: 106px;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 19px;
  padding: 18px;
  background: #fbfcfa;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-size: clamp(16px, 1.33vw, 19px);
  font-weight: 600;
  line-height: 1.45;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.answer-button:hover:not(:disabled) { border-color: #a7b5bb; background: #f6f8f9; transform: translateY(-2px); box-shadow: 0 7px 13px rgba(34, 64, 49, .07); }
.answer-button:disabled { cursor: default; }
.answer-button.is-wrong { border-color: #e9bd77; background: #fff9ec; }
.answer-button.is-correct { border-color: #4e876d; background: #eaf5ec; }
.answer-letter { flex: none; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: #e8eee8; color: var(--moss); font-size: 16px; font-weight: 900; }
.is-wrong .answer-letter { background: #f7e4bf; color: #744b20; }
.is-correct .answer-letter { background: var(--moss); color: #fff; }
.answer-text { padding-top: 3px; }

.response-panel { display: flex; align-items: center; gap: 15px; margin-top: 16px; border: 2px solid #d8e6dc; border-radius: 23px; padding: 14px 17px; background: #f0f7f1; box-shadow: 0 9px 24px rgba(34, 64, 49, .05); }
.response-panel[data-state="wrong"] { border-color: #f0d29e; background: #fff8e9; }
.mascot--response { flex: none; width: 62px; height: 72px; object-fit: contain; object-position: center top; }
.response-content { flex: 1; min-width: 0; }
.response-message { margin: 0; color: var(--moss-deep); font-size: clamp(17px, 1.42vw, 20px); font-weight: 800; line-height: 1.42; }
.response-panel[data-state="wrong"] .response-message { color: #7e5128; }
.correct-details { margin-top: 7px; }
.correct-answer { display: inline-block; margin: 0 0 5px; border-radius: 7px; background: #dcecdf; padding: 5px 9px; color: var(--moss-deep); font-size: 16px; font-weight: 900; }
.explanation { margin: 3px 0 0; color: #365248; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.5; }
.next-button { flex: none; min-height: 51px; padding: 10px 17px; font-size: 16px; border-radius: 14px; white-space: nowrap; }

.finish-card { min-height: 520px; display: grid; grid-template-columns: minmax(330px, .9fr) minmax(0, 1.1fr); align-items: center; }
.finish-art { position: relative; align-self: stretch; display: flex; justify-content: center; align-items: flex-end; isolation: isolate; }
.finish-halo { position: absolute; z-index: -1; width: min(82%, 410px); aspect-ratio: 1; left: 9%; bottom: -8%; border-radius: 50%; background: #e7eee4; box-shadow: 0 0 0 30px #f6f6e8; }
.mascot--finish { max-width: 86%; max-height: 440px; filter: drop-shadow(0 14px 13px rgba(40, 66, 54, .12)); animation: bob 4s ease-in-out infinite; }
.finish-spark--one { top: 22%; right: 11%; }
.finish-spark--two { bottom: 30%; left: 9%; font-size: 26px; }
.finish-copy { padding: 55px clamp(36px, 5vw, 68px); }
.finish-copy h1 { font-size: clamp(42px, 4.7vw, 66px); }
.finish-copy p { margin: 0 0 28px; color: var(--muted); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.55; }
.site-footer { padding: 18px 0 22px; color: #788b80; font-size: 13px; font-weight: 600; text-align: center; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes sway { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(2deg); } }

@media (max-width: 920px) {
  .intro-card { grid-template-columns: minmax(0, 1fr) minmax(290px, .75fr); min-height: 500px; }
  .intro-copy { padding: 42px 34px; }
  .intro-art { min-height: 500px; }
  .intro-bubble { top: 38px; right: 4%; font-size: 16px; }
  .answer-button { min-height: 120px; }
  .response-panel { flex-wrap: wrap; }
  .next-button { margin-left: 77px; }
}

@media (max-width: 700px) {
  .page-shell { padding: 0 16px; }
  .site-header { min-height: 68px; }
  .header-tag { display: none; }
  .brand { font-size: 16px; }
  .intro-screen, .finish-screen { margin: 13px 0 auto; }
  .intro-card, .finish-card { display: flex; flex-direction: column; border-radius: 26px; }
  .intro-copy { order: 1; width: 100%; padding: 32px 26px 0; }
  .intro-copy h1 { margin: 16px 0; font-size: clamp(42px, 10.3vw, 62px); }
  .intro-topic { font-size: 19px; }
  .intro-helper { font-size: 16px; margin: 13px 0 20px; }
  .intro-art { order: 2; width: 100%; height: 260px; min-height: 260px; overflow: hidden; }
  .art-halo { width: 265px; left: calc(50% - 132px); bottom: -71px; box-shadow: 0 0 0 22px #f1f5ec; }
  .mascot--intro { max-height: 285px; max-width: 260px; }
  .intro-bubble { top: 16px; right: 12%; padding: 10px 13px; font-size: 14px; }
  .art-spark--one { top: 20%; left: 17%; }
  .intro-notes { justify-content: flex-start; gap: 10px 20px; padding: 16px 4px; font-size: 13px; }
  .quiz-screen { margin-top: 8px; }
  .quiz-topline { align-items: center; margin-bottom: 12px; }
  .quiz-topline h2 { font-size: 22px; }
  .progress-track { margin-bottom: 15px; }
  .question-card { border-radius: 23px; padding: 22px 18px; }
  .question-card h1 { margin: 12px 0 21px; font-size: clamp(22px, 6vw, 28px); }
  .answers { grid-template-columns: 1fr; gap: 11px; }
  .answer-button { min-height: 0; padding: 15px; font-size: 16px; }
  .answer-letter { width: 32px; height: 32px; }
  .response-panel { align-items: flex-start; gap: 10px; padding: 12px; }
  .mascot--response { width: 47px; height: 59px; }
  .response-message { font-size: 17px; }
  .next-button { width: 100%; margin-left: 0; }
  .finish-art { order: 2; min-height: 290px; width: 100%; overflow: hidden; }
  .finish-copy { order: 1; width: 100%; padding: 35px 27px 0; }
  .finish-copy h1 { margin: 16px 0; font-size: clamp(38px, 9.5vw, 55px); }
  .finish-copy p { font-size: 17px; margin-bottom: 23px; }
  .finish-halo { width: 275px; left: calc(50% - 137px); bottom: -85px; }
  .mascot--finish { max-height: 300px; }
}

@media (max-width: 370px) {
  .brand { font-size: 14px; }
  .intro-copy { padding-left: 20px; padding-right: 20px; }
  .eyebrow, .small-label, .question-kicker { font-size: 11px; }
  .intro-topic { font-size: 18px; }
  .question-card h1 { font-size: 21px; }
  .answer-button { gap: 11px; }
}

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