:root {
  --ivory: #f8f7ec;
  --paper: #fffef8;
  --pine: #213f35;
  --muted: #53685e;
  --evergreen: #26735d;
  --sage: #ddebd5;
  --honey: #f4cb61;
  --peach: #efaa8f;
  --line: rgba(33, 63, 53, 0.16);
  --shadow: 0 24px 70px rgba(33, 63, 53, 0.12);
  --rounded: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--pine);
  background: var(--ivory);
  font-family: var(--rounded);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--evergreen); text-underline-offset: 0.18em; }
a:hover { color: var(--pine); }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 4px; border-radius: 4px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--pine); color: white; }
.skip-link:focus { top: 1rem; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: relative; z-index: 10; padding: 22px 0; border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--pine); font-size: 1.35rem; font-weight: 850; text-decoration: none; letter-spacing: -.03em; }
.brand-mark { display: block; width: 38px; height: 38px; flex: 0 0 auto; }
.brand-mark, .legal-icon { border-radius: 22%; }
nav { display: flex; gap: 25px; font-size: .94rem; font-weight: 700; }
nav a { color: var(--pine); text-decoration: none; }
.eyebrow { margin: 0 0 14px; color: var(--evergreen); font-size: .78rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.2rem); font-weight: 900; }
h2 { margin: 0 0 18px; font-size: clamp(2.1rem, 4vw, 3.6rem); font-weight: 860; }
h3 { margin: 0 0 8px; font-size: 1.3rem; }
p { margin: 0 0 1rem; }
.lede { max-width: 670px; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.6; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 22px; border-radius: 18px; font-weight: 800; text-decoration: none; }
.button-primary { color: white; background: var(--evergreen); box-shadow: 0 10px 30px rgba(38, 115, 93, .2); }
.button-primary:hover { color: white; background: var(--pine); }
.button-secondary { color: var(--pine); border: 2px solid var(--pine); background: rgba(255,255,255,.4); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero { position: relative; overflow: hidden; padding: 82px 0 96px; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: var(--sage); }
.hero::before { width: 48vw; height: 48vw; right: -12vw; bottom: -26vw; opacity: .65; }
.hero::after { width: 20vw; height: 20vw; left: -9vw; top: 4vw; opacity: .42; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 64px; }
.hero h1 span { color: var(--evergreen); }
.hero-art { position: relative; min-height: 480px; display: grid; place-items: center; }
.hero-art::before { content: ""; position: absolute; width: 92%; aspect-ratio: 1; border-radius: 46% 54% 54% 46%; background: var(--sage); transform: rotate(-7deg); box-shadow: var(--shadow); }
.hero-art .milo { position: relative; z-index: 2; width: min(410px, 87%); filter: drop-shadow(0 25px 20px rgba(33,63,53,.13)); }
.word-token { position: absolute; z-index: 3; width: 112px; padding: 8px; background: var(--paper); border-radius: 25px; box-shadow: 0 14px 40px rgba(33,63,53,.14); }
.word-token.apple { left: 0; top: 8%; transform: rotate(-8deg); }
.word-token.train { right: 0; bottom: 6%; transform: rotate(8deg); }
.coming-soon { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px; padding: 9px 13px; border-radius: 999px; background: rgba(244,203,97,.48); font-size: .88rem; font-weight: 800; }
.coming-soon::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--evergreen); }
.section { padding: 88px 0; }
.section-kicker { max-width: 720px; margin-bottom: 42px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { min-height: 280px; padding: 28px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,255,255,.52); }
.feature:nth-child(2) { background: var(--sage); }
.feature:nth-child(3) { background: rgba(244,203,97,.32); }
.feature .number { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 56px; border-radius: 15px; background: var(--pine); color: white; font-weight: 850; }
.feature p { color: var(--muted); }
.activity-counts { color: var(--muted); }
.app-preview { background: var(--pine); color: var(--ivory); }
.app-preview .eyebrow, .app-preview .lede, .preview-hint { color: var(--sage); }
.preview-hint { font-size: .9rem; margin-bottom: 0; }
.screenshot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.app-screenshot { min-width: 0; margin: 0; }
.ipad-frame { display: block; padding: 11px; border: 2px solid #858b87; border-radius: 28px; background: #1b211f; box-shadow: 0 18px 32px rgba(0, 0, 0, .22), inset 0 0 0 1px #080d0b; }
.ipad-frame img { display: block; width: 100%; height: auto; border-radius: 15px; }
.ipad-frame:hover { border-color: var(--honey); }
.ipad-frame:focus-visible { border-radius: 28px; }
.app-screenshot figcaption { padding: 24px 2px 0; }
.app-screenshot h3 { font-size: 1.25rem; }
.app-screenshot p { margin: 0; color: var(--sage); font-size: .95rem; }
.privacy-note { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.note-card { padding: 34px; border-radius: 30px; background: var(--sage); }
.note-card ul { padding-left: 1.25rem; margin-bottom: 0; }
.cta { padding: 54px; border-radius: 38px; background: var(--honey); text-align: center; }
.cta h2 { max-width: 750px; margin-inline: auto; }
.site-footer { padding: 55px 0 28px; border-top: 1px solid var(--line); }
.footer-inner { flex-wrap: wrap; align-items: flex-start; }
.footer-inner p { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 22px; }
.footer-links a { color: var(--pine); font-weight: 700; }
.legal-line { flex: 1 0 100%; padding-top: 24px; border-top: 1px solid var(--line); }
.page-privacy .legal-line, .page-terms .legal-line { text-align: center; }
.document-hero { padding: 70px 0 48px; }
.document-hero h1 { max-width: 900px; font-size: clamp(2.7rem, 6vw, 5rem); }
.page-privacy .document-hero, .page-terms .document-hero { text-align: center; }
.page-privacy .document-hero h1, .page-terms .document-hero h1,
.page-privacy .document-hero .lede, .page-terms .document-hero .lede { margin-inline: auto; }
.legal-icon { display: block; margin: 0 auto 24px; }
.last-updated { font-size: .92rem; color: var(--muted); margin-bottom: 26px; }
.document { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 60px; align-items: start; padding-bottom: 90px; }
.document aside { position: sticky; top: 24px; padding: 20px; border-radius: 20px; background: var(--sage); }
.document aside strong { display: block; margin-bottom: 10px; }
.document aside a { display: block; padding: 5px 0; color: var(--pine); font-size: .9rem; }
.prose section { padding: 30px 0; border-top: 1px solid var(--line); }
.prose section:first-child, .prose .last-updated + section { border-top: 0; padding-top: 0; }
.prose h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.prose h3 { margin-top: 1.7rem; }
.prose p, .prose li { color: #344f45; }
.prose li + li { margin-top: .45rem; }
.callout { padding: 22px; border-left: 5px solid var(--evergreen); border-radius: 0 18px 18px 0; background: var(--sage); }
.support-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 34px 0 60px; }
.support-card { padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: rgba(255,255,255,.55); }
.support-card p { color: var(--muted); }
.support-card a { font-weight: 800; }
.not-found { min-height: 68vh; display: grid; place-items: center; text-align: center; }
.not-found img { width: 260px; }

@media (max-width: 820px) {
  body { font-size: 16px; }
  .shell { width: min(100% - 28px, 680px); }
  .site-header { padding: 17px 0; }
  nav a:first-child { display: none; }
  nav { gap: 15px; }
  .hero { padding: 55px 0 70px; }
  .hero-grid, .privacy-note { grid-template-columns: 1fr; }
  .hero-art { min-height: 390px; order: -1; }
  .hero-art .milo { width: 310px; }
  .features { grid-template-columns: 1fr; }
  .screenshot-grid { grid-template-columns: 1fr; justify-items: center; gap: 42px; }
  .app-screenshot { width: min(100%, 380px); }
  .feature { min-height: 0; }
  .feature .number { margin-bottom: 28px; }
  .section { padding: 66px 0; }
  .document { grid-template-columns: 1fr; gap: 25px; }
  .document aside { position: static; }
  .support-grid { grid-template-columns: 1fr; }
  .cta { padding: 38px 22px; }
}

@media (max-width: 520px) {
  h1 { font-size: 3.15rem; }
  .brand { font-size: 1.15rem; }
  .brand-mark { transform: scale(.88); transform-origin: left center; margin-right: -4px; }
  nav a { font-size: .82rem; }
  nav a:nth-child(2) { display: none; }
  .hero-art { min-height: 320px; }
  .hero-art .milo { width: 250px; }
  .word-token { width: 82px; border-radius: 18px; }
  .button-row { flex-direction: column; }
  .button { width: 100%; }
  .footer-inner { display: block; }
  .footer-links { margin-top: 25px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Keep every exercise slot in place as the question and feedback change. */
.demo-section { overflow-anchor: none; }
.demo-layout { display: grid; grid-template-columns: .7fr 1.3fr; gap: 56px; align-items: start; }
.demo-introduction { padding-top: 30px; }
.demo-introduction h2 { max-width: 380px; }
.demo-detail { color: var(--muted); font-size: .95rem; }
.demo-credits { margin-top: 26px; font-size: .78rem; }
.word-demo { padding: 24px; border: 1px solid var(--line); border-radius: 34px; background: var(--paper); box-shadow: var(--shadow); min-width: 0; }
.word-demo [hidden] { display: none !important; }
.word-demo button { font: inherit; cursor: pointer; touch-action: manipulation; }
.word-demo .button { gap: 14px; border: 0; font-weight: 800; }
.word-demo :focus-visible { outline-color: var(--pine); }
.demo-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; margin-bottom: 12px; }
.demo-toggles { display: flex; align-items: center; gap: 6px; }
.demo-label { font-size: .8rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.demo-sound { min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--ivory); color: var(--pine); font-size: .82rem !important; }
.demo-progress-row { display: flex; align-items: center; gap: 20px; justify-content: space-between; margin-bottom: 10px; }
.demo-progress-row p { margin: 0; color: var(--muted); font-size: .85rem; }
.demo-progress-row progress { display: block; width: 80px; height: 7px; appearance: none; border: 0; border-radius: 20px; overflow: hidden; background: var(--sage); color: var(--evergreen); }
.demo-progress-row progress::-webkit-progress-bar { background: var(--sage); border-radius: 20px; }
.demo-progress-row progress::-webkit-progress-value { background: var(--evergreen); border-radius: 20px; }
.demo-progress-row progress::-moz-progress-bar { background: var(--evergreen); border-radius: 20px; }
.demo-question { display: grid; align-items: center; min-height: 2.4em; text-align: center; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.2; margin-bottom: 12px; }
.demo-chalkboard { position: relative; display: flex; align-items: center; justify-content: center; height: 180px; padding: 12px; border: 6px solid #bc9a6b; border-radius: 24px; background: linear-gradient(130deg, #3a6153, #294c40); box-shadow: 0 6px 0 #a8875d, 0 12px 20px rgba(33,63,53,.1); color: var(--ivory); }
.demo-chalkboard::after { content: ""; position: absolute; width: 34px; height: 6px; right: 25px; bottom: 0; border-radius: 2px; background: var(--ivory); transform: rotate(-5deg); }
.demo-chalkboard img { display: block; width: 150px; height: 150px; object-fit: contain; }
.demo-listen-icon { width: 96px; height: 96px; }
.demo-letter { font-size: 6rem; font-weight: 850; line-height: 1; }
.demo-image-retry { font-size: .9rem !important; color: var(--pine); background: var(--ivory); }
.demo-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 20px; }
.word-demo[data-kind="letter"] .demo-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.word-demo .demo-choice { display: grid; place-items: center; height: 78px; padding: 8px 5px; border: 2px solid var(--evergreen); border-radius: 19px; background: var(--ivory); color: var(--pine); font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 850; line-height: 1.15; box-shadow: 0 4px 0 var(--pine); transition: background .15s, border-color .15s; }
.demo-choice:hover:enabled { background: var(--sage); }
.word-demo button:disabled { cursor: default; }
.demo-hear:disabled, .demo-instruction:disabled, .demo-action:disabled { opacity: .5; }
.word-demo[data-state="intro"] .demo-choice, .word-demo[data-state="loading"] .demo-choice, .word-demo[data-state="error"] .demo-choice { opacity: .5; }
.word-demo .demo-choice.is-wrong { background: #fae7dd; border-color: #a15b3e; }
.word-demo .demo-choice.is-correct { background: var(--sage); border-color: var(--evergreen); }
.demo-help { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 46px; margin-top: 12px; }
.demo-hear { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--pine); background: var(--ivory); font-weight: 750 !important; white-space: nowrap; }
.demo-instruction { min-height: 44px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font-size: .83rem !important; text-decoration: underline; text-underline-offset: .18em; }
.demo-milo-message { display: grid; grid-template-columns: 126px 1fr; align-items: center; gap: 10px; margin-top: 10px; padding: 0 14px 0 0; border-radius: 22px; background: var(--sage); min-height: 126px; }
.demo-milo { display: block; width: 126px; height: 126px; object-fit: contain; }
.demo-milo-message p { min-height: 4.35em; display: flex; align-items: center; margin: 0; font-size: .92rem; line-height: 1.45; }
.demo-speaker { display: block; color: var(--evergreen); font-size: .76rem; font-weight: 850; }
.demo-audio-status { min-height: 2.8em; margin: 8px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.demo-action { width: 100%; min-height: 54px; }
@media (max-width: 1000px) { .demo-layout { grid-template-columns: .75fr 1.25fr; gap: 30px; } }
@media (max-width: 820px) {
  .demo-layout { grid-template-columns: 1fr; gap: 24px; }
  .demo-introduction { padding-top: 0; }
  .demo-introduction h2 { max-width: none; }
  .demo-introduction .lede { margin-bottom: 12px; }
  .demo-detail { margin-bottom: 8px; font-size: .9rem; }
  .demo-credits { margin: 16px 0 0; }
}
@media (max-width: 520px) {
  .word-demo { padding: 16px; border-radius: 26px; }
  .demo-toolbar { margin-bottom: 10px; }
  .demo-label { font-size: .7rem; }
  .demo-sound { font-size: .76rem !important; padding-inline: 10px; }
  .demo-chalkboard { height: 156px; border-radius: 19px; }
  .demo-chalkboard img { width: 126px; height: 126px; }
  .demo-choices { gap: 10px; margin-top: 18px; }
  .word-demo .demo-choice { height: 70px; font-size: 2rem; border-radius: 15px; }
  .demo-help { gap: 10px; }
  .demo-hear { padding-inline: 10px; font-size: .85rem !important; }
  .demo-instruction { font-size: .76rem !important; }
  .demo-milo-message { grid-template-columns: 108px 1fr; min-height: 126px; gap: 4px; padding-right: 10px; }
  .demo-milo { width: 108px; height: 108px; }
  .demo-milo-message p { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { .demo-choice { transition: none; } }
