@font-face { font-family: 'DM Sans'; src: url('fonts/dmsans.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }
/* colors come from theme.css */
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
[data-size="l"] { font-size: 19px; }
body { margin: 0; font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 .7em; }
.muted { color: var(--soft); }
.small { font-size: .85rem; }

.demo-bar { background: var(--ink); color: var(--bg); text-align: center; font-size: .85rem; padding: 7px 12px; }
.demo-bar a { color: var(--sun); font-weight: 700; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 14px 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
@media (max-width: 400px) { .brand { font-size: 1rem; } }
.brand img { width: 36px; height: 36px; border-radius: 11px; }
.saved-link { text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); white-space: nowrap; }
.saved-link b { background: var(--pri); color: var(--pri-ink); border-radius: 999px; padding: 0 7px; margin-left: 4px; font-size: .8rem; }

main { max-width: 760px; margin: 0 auto; padding: 4px 18px 60px; outline: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }

/* home */
.hero { text-align: center; padding: 34px 22px 28px; }
.hero .art { width: 120px; height: 120px; margin: 0 auto 10px; display: block; }
.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.hero p { color: var(--soft); max-width: 520px; margin: 0 auto 22px; }
.ages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.age-btn { border: 0; border-radius: 20px; padding: 20px 10px; cursor: pointer; background: var(--pri); color: var(--pri-ink); font-weight: 800; font-size: 1.35rem; box-shadow: 0 6px 0 var(--pri-dark); transition: transform .08s; }
.age-btn span { display: block; font-size: .8rem; font-weight: 600; opacity: .9; margin-top: 2px; }
.age-btn:nth-child(2) { background: var(--acc); box-shadow: 0 6px 0 var(--acc-dark); color: #fff; }
.age-btn:nth-child(3) { background: var(--sun); box-shadow: 0 6px 0 var(--sun-dark); color: var(--ink); }
.age-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--pri-dark); }
.promise { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: .88rem; color: var(--soft); font-weight: 600; }
.promise span::before { content: '✓ '; color: var(--pri); font-weight: 800; }

/* lesson */
.agebar { display: flex; gap: 8px; justify-content: center; margin: 4px 0 14px; flex-wrap: wrap; }
.chip { border: 2px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; font-size: .9rem; }
.chip.on { border-color: var(--pri); background: var(--pri); color: var(--pri-ink); }
.lesson { padding: 0; overflow: hidden; }
.lhead { background: var(--pri); color: var(--pri-ink); padding: 22px 22px 20px; position: relative; }
.lhead .eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.lhead h1 { font-size: 2rem; font-weight: 800; margin: 4px 0 2px; }
.lhead .say { font-size: .92rem; opacity: .95; }
.lhead .cheer { margin: 12px 0 0; font-weight: 600; background: rgba(255,255,255,.16); border-radius: 14px; padding: 10px 14px; }
.sec { padding: 20px 22px; border-top: 1px solid var(--line); }
.sec:first-of-type { border-top: 0; }
.sec h2 { font-size: 1.25rem; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sec h2 .ico { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 1.1rem; }
.sec .ttl { font-size: 1.1rem; font-weight: 800; margin: 6px 0 2px; }
.sec .meta { font-size: .85rem; color: var(--soft); margin-bottom: 10px; }
.sec h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--soft); margin: 12px 0 6px; font-weight: 800; }
.sup { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.sup li { background: var(--soft-bg); border-radius: 999px; padding: 4px 12px; font-size: .9rem; font-weight: 600; }
ol.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: s; }
ol.steps li { counter-increment: s; position: relative; padding: 4px 0 6px 38px; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--pri-soft); color: var(--pri-deep); font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.why { margin: 10px 0 0; font-size: .92rem; background: var(--soft-bg); border-radius: 14px; padding: 10px 14px; }
.ico.a { background: var(--pri-soft); } .ico.c { background: var(--acc-soft); } .ico.f { background: var(--sun-soft); }
.fact p.big { font-size: 1.12rem; font-weight: 600; margin: 6px 0 0; }
.challenge { background: var(--sun-soft); }
.challenge p { margin: 6px 0 0; font-weight: 600; }
.actions { display: flex; gap: 10px; padding: 18px 22px 22px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; padding: 14px 18px; font-weight: 800; cursor: pointer; background: var(--soft-bg); color: var(--ink); text-decoration: none; font-size: 1rem; }
.btn.line { background: transparent; border: 2px solid var(--line); }
.btn.save { background: var(--pri); color: var(--pri-ink); flex: 1 1 220px; font-size: 1.1rem; }
.btn.save.on { background: var(--acc); color: #fff; }
.btn:focus-visible, .chip:focus-visible, .age-btn:focus-visible, .saved-link:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* saved */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 8px 0 16px; flex-wrap: wrap; }
.pagehead h1 { font-size: 1.8rem; font-weight: 800; }
.slist { list-style: none; margin: 0; padding: 0; }
.slist li { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.slist li:first-child { border-top: 0; }
.slist .grow { flex: 1; min-width: 0; }
.slist .t { font-weight: 800; }
.slist button.open { background: none; border: 0; text-align: left; cursor: pointer; padding: 0; width: 100%; }
.empty { text-align: center; color: var(--soft); padding: 26px 10px; }
.foot { text-align: center; font-size: .8rem; color: var(--soft); margin-top: 26px; }
.foot a { font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 700; opacity: 0; transition: .25s; pointer-events: none; z-index: 90; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.pop { animation: pop .35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 1.65rem; }
  .ages { gap: 8px; }
  .age-btn { font-size: 1.15rem; padding: 16px 6px; }
  .lhead h1 { font-size: 1.65rem; }
  .sec, .lhead, .actions { padding-left: 18px; padding-right: 18px; }
}
@media print {
  .top, .agebar, .actions, .demo-bar, .foot, .toast { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .lhead { background: #fff !important; color: #000 !important; border-bottom: 3px solid #000; }
  .lhead .cheer { background: #f2f2f2; }
  .sec { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
