:root {
  --primary: #1E7A46;
  --primary-strong: #125630;
  --accent: #FFCB3D;
  --success: #15803D;
  --warning: #B45309;
  --danger: #DC6B6B;
  --background: #F1F8E9;
  --surface: #FFFFFF;
  --surface-alt: #FFF1C2;
  --selected: #FFF1C2;
  --text-primary: #1F2A1C;
  --text-secondary: #4E6150;
  --border: #CFE3C4;
  --boundary: #73906B;
  --action: #FFCB3D;
  --action-strong: #C99A12;
  --on-action: #3B2A12;
  --tint-warm: #FBE3C4;
  --tint-sun: #FFF1C2;
  --tint-leaf: #DDEFD0;
  --sky: #CDEBFF;
  --hill: #9BDB9F;
  --sun: #FFD27A;
  --acorn: #D9963F;
  --acorn-cap: #8A5A2B;
}

/*
 * The public site wears "Rừng của Sóc", the app's default look (ADR-0117). The colours above this line
 * are written by scripts/build-site.mjs from the design tokens; nothing below names a colour.
 */
@font-face { font-family: 'Baloo 2'; font-weight: 600 800; font-display: swap; src: url('fonts/baloo-2-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Baloo 2'; font-weight: 600 800; font-display: swap; src: url('fonts/baloo-2-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: 'Nunito'; font-weight: 500 800; font-display: swap; src: url('fonts/nunito-vietnamese.woff2') format('woff2'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Nunito'; font-weight: 500 800; font-display: swap; src: url('fonts/nunito-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

:root {
  color-scheme: light;
  --body: 'Nunito', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Baloo 2', 'Nunito', 'Segoe UI', Roboto, Arial, sans-serif;
  --gutter-left: max(20px, env(safe-area-inset-left, 0px));
  --gutter-right: max(20px, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--background); color: var(--text-primary); font: 600 18px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--primary-strong); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--primary-strong); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.6vw, 56px); line-height: 1.12; }
h2 { font-size: clamp(28px, 3.6vw, 38px); }
h3 { font-size: 22px; font-weight: 700; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: clamp(18px, 1.8vw, 21px); color: var(--text-secondary); }
.ui { font-weight: 800; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-left: var(--gutter-left); padding-right: var(--gutter-right); }
.narrow { max-width: 800px; }
.band { padding-block: clamp(48px, 7vw, 88px); }
.band > .wrap { display: grid; gap: 24px; }
.leaf { background: var(--tint-leaf); }
.sun { background: var(--tint-sun); }

.skip { position: absolute; left: -999px; top: 0; z-index: 3; background: var(--surface); padding: 12px 16px; }
.skip:focus { left: 8px; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 2; background: var(--sky); padding-top: env(safe-area-inset-top, 0px); }
.guide .topbar { background: var(--tint-leaf); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font: 800 20px/1 var(--display); color: var(--text-primary); text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 12px; }
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a { display: inline-flex; align-items: center; min-height: 48px; padding-inline: 12px; font-size: 16px; font-weight: 700; color: var(--text-primary); text-decoration: none; white-space: nowrap; }
.topbar nav .nav-cta { min-height: 44px; border-radius: 22px; background: var(--primary); color: var(--surface); padding-inline: 18px; }
@media (hover: hover) { .topbar nav a:not(.nav-cta):hover { text-decoration: underline; } .topbar nav .nav-cta:hover { background: var(--primary-strong); } }
@media (max-width: 620px) { .topbar nav a:not(.nav-cta) { display: none; } }

/* Where a family on V1 goes. Under the bar rather than over the page: it is for some visitors only. */
.previous { position: relative; z-index: 1; background: var(--accent); color: var(--on-action); padding-block: 10px; font-size: 17px; line-height: 1.45; }
.previous p { max-width: none; }
.previous a { color: var(--on-action); font-weight: 800; }

/* Buttons: the app's own, with its lip. One sunflower button per view. */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 6px 28px 10px; border: 0; border-radius: 24px; background: var(--action); box-shadow: inset 0 -4px 0 var(--action-strong); color: var(--on-action); font: 800 19px/1.2 var(--display); text-decoration: none; text-align: center; cursor: pointer; }
.button-quiet, .actions .button:not(:first-child) { background: var(--surface); box-shadow: inset 0 0 0 2px var(--boundary), inset 0 -5px 0 var(--border); color: var(--primary-strong); }
.text-link { display: inline-flex; align-items: center; min-height: 48px; padding-inline: 8px; font-weight: 800; }
.button:active { box-shadow: none; }
@media (hover: hover) { .button:hover { filter: brightness(1.03); } }
.actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; }
.status { display: inline-block; justify-self: start; font-weight: 800; color: var(--primary-strong); }

/* Hero: the scene behind Today, at the width of the page */
.hero { position: relative; overflow: hidden; background: var(--sky); padding-block: 24px 0; }
.hero-clouds { position: absolute; inset: 0 0 auto; width: 100%; height: 150px; fill: var(--surface); }
.hero-row { position: relative; z-index: 1; display: grid; gap: 32px; align-items: end; }
.hero-words { display: grid; gap: 20px; align-self: center; padding-bottom: 8px; }
.hero-words .lede { color: var(--text-primary); }
.hero-picture { position: relative; display: flex; justify-content: center; align-items: flex-end; max-height: 420px; }
.hero-picture .phone { align-self: flex-start; width: 240px; }
.hero-mascot { position: absolute; z-index: 2; bottom: 26px; left: calc(50% - 188px); width: 120px; }
.hero-hills { position: absolute; z-index: 1; inset: auto 0 -1px; width: 100%; height: 64px; }
.hero-hills .far { fill: var(--hill); }
.hero-hills .near { fill: var(--background); }
.mascot svg { display: block; width: 100%; height: auto; }

.phone { width: 100%; max-width: 270px; padding: 8px; border-radius: 36px; background: var(--text-primary); }
.phone img { border-radius: 28px; width: 100%; }

@media (min-width: 860px) {
  .hero-row { grid-template-columns: 1.15fr 1fr; gap: 48px; }
  .hero-words { padding-block: 40px 110px; }
  .hero-picture { max-height: 540px; padding-top: 24px; }
  .hero-picture .phone { width: 300px; max-width: 300px; }
  .hero-mascot { width: 170px; left: calc(50% - 278px); bottom: 24px; }
  .hero-hills { height: 96px; }
}

/* Try it: a lesson, in miniature */
.demo-row { position: relative; align-items: center; }
.demo-words { display: grid; gap: 12px; }
.demo { display: grid; gap: 16px; padding: 24px 20px; border: 2px solid var(--border); border-radius: 24px; background: var(--surface); min-height: 452px; align-content: start; }
.demo-acorns { display: flex; justify-content: center; gap: 14px; }
.demo-acorns svg { width: 30px; height: 30px; }
.acorn .cap { fill: var(--boundary); } .acorn .nut { fill: var(--tint-leaf); } .acorn .stem { fill: none; stroke: var(--boundary); stroke-width: 2; stroke-linecap: round; }
.acorn.done .cap { fill: var(--acorn-cap); } .acorn.done .nut { fill: var(--acorn); } .acorn.done .stem { stroke: var(--acorn-cap); }
#demo.finished { align-content: center; }
#demo-stage { display: grid; gap: 16px; justify-items: center; }
#demo-stage p { text-align: center; }
#demo-stage h3 { text-align: center; }
.listen { background: var(--primary); box-shadow: inset 0 -4px 0 var(--primary-strong); color: var(--surface); gap: 12px; }
.listen svg { width: 26px; height: 26px; }
.demo-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; width: 100%; }
.demo-option { display: grid; justify-items: center; gap: 4px; min-height: 132px; padding: 12px 6px; border: 2px solid var(--border); border-bottom-width: 5px; border-radius: 20px; background: var(--surface); color: var(--text-primary); font: 800 16px/1.3 var(--body); cursor: pointer; }
.demo-option img { width: 84px; height: 84px; }
.demo-option[aria-pressed='true'] { border-color: var(--primary); background: var(--tint-leaf); }
.demo-option.tried { border-style: dashed; background: var(--background); }
.demo-feedback { min-height: 3.2em; text-align: center; max-width: none; font-weight: 700; }
.demo-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; min-height: 56px; }
.demo-cheer { position: absolute; right: 12px; bottom: 100%; width: 92px; margin-bottom: -10px; }
@media (min-width: 860px) {
  .demo-row { grid-template-columns: 1fr 1.25fr; gap: 56px; }
  .demo-cheer { right: 48px; width: 110px; }
}

/* A day */
.day, .start, .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; counter-reset: step; }
.day li { display: grid; gap: 18px; justify-items: center; align-content: start; }
.day li > div, .parent-item > div { display: grid; gap: 6px; max-width: 320px; }
.day .phone, .parent-item .phone, .split .phone { max-height: 420px; overflow: hidden; border-radius: 36px 36px 0 0; padding-bottom: 0; }
@media (max-width: 719px) { .day .phone, .parent-item .phone, .split .phone { max-height: 320px; } }
.day .phone img, .parent-item .phone img, .split .phone img { border-radius: 28px 28px 0 0; }
@media (min-width: 720px) { .day { grid-template-columns: repeat(3, 1fr); } }

.split { align-items: center; justify-items: center; }
.split > div { display: grid; gap: 16px; }
.leaf:has(.split) { padding-bottom: 0; }
@media (min-width: 720px) { .split { grid-template-columns: 1.3fr 1fr; gap: 56px; } }

.grades { margin: 0; display: grid; }
.grades > div { display: grid; gap: 2px 24px; padding-block: 16px; border-top: 2px solid var(--border); }
.grades > div:last-child { border-bottom: 2px solid var(--border); }
.grades dt { font: 800 20px/1.4 var(--display); color: var(--primary-strong); }
.grades dd { margin: 0; }
@media (min-width: 620px) { .grades > div { grid-template-columns: 130px 1fr; } }

.parents { display: grid; gap: 40px; }
.parent-item { display: grid; gap: 18px; justify-items: center; align-content: start; }
@media (min-width: 720px) { .parents { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.forest { background: var(--primary-strong); color: var(--surface); }
.forest a { color: var(--accent); }
.forest :focus-visible { outline-color: var(--accent); }
.safe { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px 48px; }
.safe li { padding-left: 34px; position: relative; max-width: 52ch; }
.safe li::before { content: ''; position: absolute; left: 2px; top: 5px; width: 9px; height: 16px; border: solid var(--accent); border-width: 0 4px 4px 0; transform: rotate(42deg); border-radius: 2px; }
@media (min-width: 720px) { .safe { grid-template-columns: 1fr 1fr; } }

/* Download */
.channels { display: grid; gap: 20px; }
.channel { display: grid; gap: 12px; justify-items: start; align-content: start; padding: 24px; border-radius: 24px; background: var(--surface); border: 2px solid var(--border); }
.start li { display: grid; gap: 4px; padding-left: 60px; position: relative; counter-increment: step; }
.start li::before, .steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-action); font: 800 22px/1 var(--display); padding-top: 3px; }
@media (min-width: 720px) { .channels { grid-template-columns: 1fr 1fr; } .start { grid-template-columns: repeat(3, 1fr); margin-top: 12px; } }

details { border-top: 2px solid var(--border); }
details:last-of-type { border-bottom: 2px solid var(--border); }
.band > .wrap:has(details) { gap: 0; } .band > .wrap:has(details) h2 { margin-bottom: 24px; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding-block: 12px; font-weight: 800; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; flex: none; width: 11px; height: 11px; margin-right: 6px; border: solid var(--primary-strong); border-width: 0 3px 3px 0; transform: translateY(-3px) rotate(45deg); }
details[open] summary::after { transform: translateY(3px) rotate(225deg); }
details p { padding-bottom: 20px; }

/* Guide */
.guide-head { background: var(--tint-leaf); padding-block: 28px 36px; }
.guide-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.guide-head-row > div:first-child { display: grid; gap: 12px; }
.guide-head .mascot { flex: none; width: clamp(84px, 16vw, 140px); margin-bottom: -36px; }
.guide h1 { font-size: clamp(32px, 4.6vw, 46px); }
.toc { margin-top: 36px; }
.toc ol { margin: 0; padding: 0 0 0 1.4em; columns: 2; column-gap: 40px; }
.toc li { break-inside: avoid; }
.toc a { display: inline-block; padding-block: 8px; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.guide section { padding-block: 40px 8px; display: grid; gap: 16px; }
.guide section > h2 { font-size: clamp(26px, 3vw, 32px); }
.guide section > h3 { margin-top: 10px; }
.guide section > ol:not(.steps), .guide section > ul { margin: 0; padding-left: 1.4em; display: grid; gap: 8px; }
.guide section:has(> details) { gap: 0; } .guide section:has(> details) > h2 { margin-bottom: 16px; }
.steps { gap: 22px; }
.steps > li { position: relative; padding-left: 60px; min-height: 44px; display: grid; gap: 4px; counter-increment: step; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px; margin-block: 8px; }
@media (max-width: 480px) { .shots { grid-template-columns: 1fr 1fr; } .shots figure:nth-child(3):last-child { grid-column: 1 / -1; width: calc(50% - 10px); justify-self: center; } }
.shots img { border: 2px solid var(--border); border-radius: 20px; width: 100%; }
.shots figcaption { margin-top: 8px; font-size: 16px; font-weight: 800; text-align: center; color: var(--text-secondary); }
.tabs { display: grid; gap: 16px 32px; }
.tabs > div { display: grid; gap: 2px; align-content: start; }
@media (min-width: 620px) { .tabs { grid-template-columns: 1fr 1fr; } }

/* Footer */
.footer-hills { display: block; width: 100%; height: 64px; margin-top: 40px; fill: var(--hill); }
.footer-ground { background: var(--hill); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); margin-top: -1px; }
.footer-row { display: grid; gap: 14px; }
.footer-name { font: 800 22px/1.2 var(--display); }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.footer a { color: var(--text-primary); }
.fine { font-size: 15px; }

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