:root {
  --ink: #1f2a2b;
  --muted: #697473;
  --cream: #f7f4eb;
  --paper: #fffef9;
  --teal: #176b67;
  --teal-dark: #0d504d;
  --mint: #cde7dc;
  --orange: #ef8d62;
  --yellow: #f1d46a;
  --line: #dcded7;
  --shadow: 0 24px 70px rgba(37, 57, 53, .11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 5% 90%, rgba(239, 141, 98, .12), transparent 22rem),
    radial-gradient(circle at 94% 8%, rgba(205, 231, 220, .55), transparent 25rem),
    var(--cream);
  color: var(--ink);
  font-family: Atkinson Hyperlegible, Verdana, Arial, sans-serif;
  line-height: 1.55;
}

button, a { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-link { padding: 5px 0; border: 0; background: none; color: var(--muted); font-size: .86rem; }
.header-link:hover { color: var(--teal); }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font: 700 1.15rem Arial, sans-serif;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 45% 55%;
  background: var(--teal);
  color: white;
  transform: rotate(-7deg);
}

.brand-mark::first-letter { transform: rotate(7deg); }

.privacy-pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.55);
  border-radius: 99px;
  padding: 7px 13px;
  color: var(--muted);
  font-size: .83rem;
}

.privacy-pill span { color: var(--teal); font-size: .6rem; margin-right: 5px; }

.screen { display: none; }
.screen.active { display: block; animation: rise .45s ease both; }

#welcome {
  min-height: calc(100vh - 130px);
  align-items: center;
  grid-template-columns: 1.06fr .94fr;
  gap: clamp(45px, 8vw, 105px);
  padding: 48px 20px 100px;
}

#welcome.active { display: grid; }

.eyebrow {
  margin: 0 0 13px;
  color: var(--teal);
  font: 700 .77rem Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2 {
  font-family: Arial, sans-serif;
  line-height: 1.08;
  letter-spacing: -.045em;
  margin: 0;
}

h1 { max-width: 650px; font-size: clamp(3.2rem, 6vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); max-width: 720px; }

.lead {
  max-width: 610px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.27rem);
  margin: 25px 0 0;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 36px 0;
}

.facts > div {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.fact-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--teal);
}

.facts strong, .facts small { display: block; line-height: 1.3; }
.facts strong { font-size: .89rem; }
.facts small { color: var(--muted); font-size: .72rem; margin-top: 2px; }

.primary-button, .secondary-button {
  border-radius: 8px;
  padding: 15px 23px;
  border: 1px solid var(--teal);
  font-weight: 700;
  transition: .2s ease;
}

.primary-button { background: var(--teal); color: white; box-shadow: 0 8px 20px rgba(23,107,103,.2); }
.primary-button:hover { background: var(--teal-dark); transform: translateY(-2px); }
.primary-button span { margin-left: 20px; }
.secondary-button { background: transparent; color: var(--teal); }
.secondary-button:hover { background: white; }
.fine-print { color: var(--muted); font-size: .78rem; margin-top: 15px; }

.word-card {
  position: relative;
  min-height: 520px;
  border-radius: 52% 48% 46% 54% / 46% 43% 57% 54%;
  background: var(--mint);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(2deg);
}

.word-card::before, .word-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(23,107,103,.18);
}
.word-card::before { inset: 65px; }
.word-card::after { inset: 120px; }
.scribble { position: absolute; z-index: 2; top: 45%; left: 50%; transform: translate(-50%, -50%) rotate(-3deg); font: 700 2rem Arial, sans-serif; width: 100%; text-align: center; }
.floating-word { position: absolute; z-index: 2; background: var(--paper); border: 1px solid rgba(31,42,43,.09); padding: 9px 15px; box-shadow: 0 8px 18px rgba(31,42,43,.08); font-weight: 700; }
.word-one { top: 16%; left: 11%; transform: rotate(-8deg); }
.word-two { top: 18%; right: 10%; transform: rotate(7deg); }
.word-three { bottom: 18%; left: 14%; transform: rotate(5deg); }
.word-four { bottom: 16%; right: 13%; transform: rotate(-6deg); }
.orbit { position: absolute; width: 230px; height: 90px; border: 3px solid var(--orange); border-color: var(--orange) transparent; border-radius: 50%; top: 48%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); }
.spark { position: absolute; color: var(--orange); font-size: 1.7rem; }
.spark-one { top: 30%; left: 22%; }
.spark-two { bottom: 28%; right: 22%; color: var(--teal); }

#quiz { max-width: 900px; margin: 0 auto; padding: 22px 0 80px; }
.quiz-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: var(--muted); font-size: .85rem; }
.quiz-top > :last-child { justify-self: end; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 8px 0; }
.text-button:hover { color: var(--ink); }
.progress-track { height: 5px; border-radius: 99px; background: #dfe4de; margin: 15px 0 50px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 8.33%; background: var(--teal); transition: width .35s ease; }

.question-card { position: relative; background: rgba(255,254,249,.75); border: 1px solid white; border-radius: 24px; padding: clamp(30px, 6vw, 68px); box-shadow: var(--shadow); }
.question-number { position: absolute; top: 28px; right: 35px; color: #d2d8d1; font: 700 3rem Arial, sans-serif; }
.question-hint { margin: 15px 0 32px; color: var(--muted); }
.answer-list { display: grid; gap: 11px; }
.answer-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-align: left;
  transition: .18s ease;
}
.answer-option:hover, .answer-option:focus-visible { border-color: var(--teal); transform: translateX(4px); outline: none; }
.answer-option.selected { color: white; background: var(--teal); border-color: var(--teal); }
.answer-key { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 50%; font-size: .72rem; opacity: .65; }

#results { padding: 55px 0 80px; }
.result-layout { display: grid; grid-template-columns: .75fr 1.25fr; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); overflow: hidden; }
.score-panel { display: grid; align-content: center; justify-items: center; padding: 55px 30px; background: var(--mint); text-align: center; }
.score-ring { --score: 0deg; width: 190px; aspect-ratio: 1; display: grid; place-content: center; margin: 18px 0; border-radius: 50%; background: radial-gradient(circle closest-side, var(--mint) 83%, transparent 84%), conic-gradient(var(--teal) var(--score), rgba(255,255,255,.6) 0); }
.score-ring span { font: 700 3.6rem/1 Arial, sans-serif; }
.score-ring small { color: var(--muted); }
.score-note { color: var(--muted); font-size: .85rem; }
.result-copy { padding: clamp(38px, 6vw, 70px); }
.result-copy h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.result-label { color: var(--orange); font-weight: 700; margin: 0 0 8px; }
.next-step { display: flex; gap: 15px; margin: 30px 0; padding: 20px; background: var(--cream); border-left: 4px solid var(--yellow); }
.next-step > span { color: var(--teal); font-weight: 700; }
.next-step p { color: var(--muted); margin: 4px 0 0; }
.result-actions { display: flex; gap: 10px; }
.disclaimer { max-width: 850px; margin: 25px auto 0; color: var(--muted); font-size: .84rem; text-align: center; }

.seo-content {
  position: relative;
  margin-bottom: 70px;
  padding: clamp(75px, 9vw, 120px) clamp(20px, 5vw, 64px);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 34px;
  background:
    radial-gradient(circle at 96% 4%, rgba(205, 231, 220, .72), transparent 28rem),
    rgba(255, 254, 249, .72);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.seo-content::before {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  top: -90px;
  right: 9%;
  border: 2px solid var(--orange);
  border-radius: 46% 54% 61% 39%;
  transform: rotate(22deg);
  opacity: .55;
}
.seo-content[hidden] { display: none; }
.content-intro {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  column-gap: clamp(35px, 8vw, 100px);
  align-items: center;
}
.content-intro .eyebrow { grid-column: 1 / -1; }
.content-intro h2 { max-width: 600px; font-size: clamp(2.65rem, 5vw, 4.7rem); }
.content-intro > p:last-child {
  margin: 5px 0 0;
  padding: 28px 30px;
  border-left: 4px solid var(--orange);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 255, 255, .68);
  color: var(--muted);
  font-size: 1.08rem;
}
.info-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 68px; }
.info-grid article {
  min-height: 245px;
  padding: 32px 28px;
  border: 1px solid rgba(23, 107, 103, .1);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 0 12px 35px rgba(37, 57, 53, .07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.info-grid article:nth-child(2) { background: var(--mint); transform: translateY(18px); }
.info-grid article:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(37, 57, 53, .12); }
.info-grid article:nth-child(2):hover { transform: translateY(13px); }
.info-grid article > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--orange);
  font: 700 .74rem Arial, sans-serif;
  letter-spacing: .08em;
}
.info-grid h3 { margin: 34px 0 10px; font-size: 1.28rem; }
.info-grid p { margin: 0; color: var(--muted); font-size: .95rem; }
.faq-section {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 115px auto 0;
  padding: clamp(35px, 6vw, 66px);
  border-radius: 26px;
  background: var(--teal);
  box-shadow: 0 22px 55px rgba(23, 107, 103, .2);
}
.faq-section .eyebrow { color: var(--yellow); }
.faq-section > h2 { max-width: 650px; color: white; font-size: clamp(2.2rem, 4vw, 3.45rem); margin-bottom: 40px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details {
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 11px;
  background: rgba(255, 255, 255, .08);
  transition: background .2s ease;
}
.faq-list details[open] { background: var(--paper); }
.faq-list summary { position: relative; padding: 20px 55px 20px 21px; color: white; font-weight: 700; cursor: pointer; list-style: none; }
.faq-list details[open] summary { color: var(--ink); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  right: 15px;
  top: 16px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  color: var(--yellow);
  font-size: 1.2rem;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "−"; border-color: var(--line); color: var(--teal); }
.faq-list details p { margin: -2px 55px 22px 21px; color: var(--muted); }
.faq-list a { color: var(--teal); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  padding: 25px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer button { border: 0; padding: 0; background: none; color: inherit; }
.site-footer button:hover { color: var(--teal); }

.info-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 40px));
  padding: clamp(28px, 5vw, 52px);
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(16, 35, 33, .3);
}
.info-dialog::backdrop { background: rgba(23, 37, 36, .62); backdrop-filter: blur(3px); }
.dialog-close { position: absolute; top: 15px; right: 18px; border: 0; background: none; color: var(--muted); font-size: 1.7rem; }
.info-dialog h2 { padding-right: 25px; font-size: clamp(2rem, 5vw, 3rem); }
.info-dialog h3 { margin: 30px 0 8px; }
.info-dialog p, .info-dialog li { color: var(--muted); }
.info-dialog a { color: var(--teal); }
.info-dialog .updated { margin-top: 30px; font-size: .78rem; }
.contact-dialog > p:not(.eyebrow) { color: var(--muted); }
.contact-dialog form { display: grid; gap: 18px; margin-top: 28px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-dialog label { display: grid; gap: 7px; font-size: .86rem; font-weight: 700; }
.contact-dialog input,
.contact-dialog select,
.contact-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.contact-dialog textarea { resize: vertical; min-height: 120px; }
.contact-dialog input:focus,
.contact-dialog select:focus,
.contact-dialog textarea:focus { border-color: var(--teal); outline: 3px solid rgba(23, 107, 103, .13); }
.contact-dialog .primary-button { justify-self: start; }
.form-note { margin: -5px 0 0; font-size: .78rem; font-weight: 400; }
.form-note a { color: var(--teal); }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 780px) {
  .page-shell { width: min(100% - 28px, 1160px); }
  .site-header { height: 72px; }
  #welcome.active { display: flex; flex-direction: column; padding: 30px 4px 70px; }
  .word-card { order: -1; width: 100%; min-height: 280px; }
  .facts { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.7rem, 13vw, 4rem); }
  .result-layout { grid-template-columns: 1fr; }
  .score-panel { padding: 35px 20px; }
  .content-intro { grid-template-columns: 1fr; }
  .content-intro > p:last-child { margin-top: 24px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-grid article { min-height: 0; }
  .info-grid article:nth-child(2) { transform: none; }
  .info-grid article:nth-child(2):hover { transform: translateY(-5px); }
  .faq-section { margin-top: 70px; }
}

@media (max-width: 480px) {
  .privacy-pill { display: none; }
  .header-link { display: none; }
  .site-footer { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .seo-content { padding-inline: 22px; border-radius: 22px; }
  .faq-section { padding: 30px 18px; border-radius: 18px; }
  .question-card { border-radius: 16px; padding-top: 70px; }
  .question-number { font-size: 2.2rem; }
  .result-actions { flex-direction: column; }
  .result-actions button { width: 100%; }
}

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

@media print {
  body { background: white; }
  .site-header, .result-actions, #welcome, #quiz { display: none !important; }
  #results { display: block !important; }
  .result-layout { box-shadow: none; border: 1px solid var(--line); }
}
