/* WobMath app: hand-written CSS, no framework. Same palette and fonts as wobmath.com. */
@font-face { font-family: "Baloo 2"; font-weight: 700; font-display: swap; src: url(/static/fonts/baloo-2-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Baloo 2"; font-weight: 800; font-display: swap; src: url(/static/fonts/baloo-2-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Andika"; font-weight: 400; font-display: swap; src: url(/static/fonts/andika-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Andika"; font-weight: 700; font-display: swap; src: url(/static/fonts/andika-latin-700-normal.woff2) format("woff2"); }

:root {
  --cream: #fbf6ea; --paper: #fff; --sand: #f3e9d4; --line: #e4d6ba;
  --navy: #1b2550; --ink: #26304f; --muted: #545d78;
  --yellow: #f5b83d; --yellow-soft: #fde9b8; --blue: #1f6fbf; --green: #2e7a3e; --green-soft: #dcefdc;
  --teal: #13777b; --brown: #6e4a33; --orange: #a8470f; --red: #b3261e; --red-soft: #fbe3e1; --purple: #5a3f9e;
  --radius: 20px; --shadow: 0 1px 2px rgba(27,37,80,.06), 0 8px 24px rgba(27,37,80,.09);
  --head: "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: "Andika", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; }
img, svg { max-width: 100%; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--head); color: var(--navy); line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); } h2 { font-size: 1.5rem; } h3 { font-size: 1.2rem; }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow-wrap { max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); } .small { font-size: .9rem; }
.lead { font-size: 1.2rem; }
.inline { display: inline; }
.alert { background: var(--red-soft); color: var(--red); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.notice { background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.draft { background: var(--yellow-soft); border: 2px dashed #e0a800; border-radius: 12px; padding: 8px 12px; font-weight: 700; }
.tbc { background: #fff1a8; box-shadow: 0 0 0 2px #e0a800 inset; border-radius: 4px; padding: 0 .2em; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 800; font-size: 1.05rem;
  background: var(--navy); color: #fff; border: 2px solid var(--navy); border-radius: 999px; padding: .6em 1.2em;
  text-decoration: none; cursor: pointer; transition: transform .1s ease; }
.btn:hover { transform: translateY(-1px); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; }
.btn.big { font-size: 1.25rem; padding: .7em 1.5em; }
.btn.small { font-size: .85rem; padding: .3em .8em; }
.btn.ok { background: var(--green); border-color: var(--green); }
.btn.danger { background: var(--red); border-color: var(--red); }
.link-btn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* top bar */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; align-items: center; gap: 12px 20px; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--head); font-weight: 800; font-size: 1.6rem; color: var(--navy); text-decoration: none; }
.brand span { color: var(--teal); }
.topnav { margin-left: auto; display: flex; gap: 6px 18px; align-items: center; flex-wrap: wrap; font-family: var(--head); font-weight: 700; }
.topnav a, .topnav .link-btn { color: var(--ink); text-decoration: none; }
.topnav a:hover { color: var(--navy); text-decoration: underline; }
.kid-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--yellow-soft); border-radius: 999px; padding: 2px 14px 2px 4px;
  font-family: var(--head); font-weight: 800; color: var(--navy); text-decoration: none; }
.kid-chip img { height: 40px; width: auto; }
.foot { padding: 32px 0; color: var(--muted); font-size: .9rem; }

/* cards and forms */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin: 18px 0; }
.card.narrow { max-width: 460px; margin: 40px auto; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 4px; font-weight: 700; }
.form label.choice { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.form legend { font-weight: 700; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input:not([type]), select, textarea {
  font: inherit; padding: .55em .75em; border: 2px solid #9aa3bd; border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31,111,191,.2); }
input[type=radio], input[type=checkbox] { accent-color: var(--navy); width: 1.15em; height: 1.15em; }
.form.compact { gap: 6px; margin-top: 6px; }
.danger-zone { border-color: #e9b8b3; }
.msg-art { display: block; margin: 0 auto 10px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 24px 0 8px; }

/* landing */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center; padding: clamp(32px, 6vw, 80px) 0; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: relative; min-height: 280px; }
.hero-art img { position: absolute; }
.hero-art img:first-child { left: 20%; top: 0; }
.hero-art .f1 { left: 0; bottom: 0; } .hero-art .f2 { right: 4%; top: 6%; } .hero-art .f3 { right: 0; bottom: 0; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-art { min-height: 240px; } }

/* profile picker */
.profile-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; margin: 28px 0; }
.profile-card { display: grid; justify-items: center; gap: 4px; }
.profile-btn, .profile-card.add { width: 170px; min-height: 210px; border: 4px solid transparent; border-radius: 28px; background: var(--paper);
  box-shadow: var(--shadow); cursor: pointer; display: grid; justify-items: center; align-content: center; gap: 4px; padding: 14px;
  text-decoration: none; transition: transform .12s ease, border-color .12s ease; font: inherit; }
.profile-btn:hover, .profile-card.add:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--yellow); }
.profile-btn img { height: 120px; width: auto; }
.pname { font-family: var(--head); font-weight: 800; font-size: 1.35rem; color: var(--navy); }
.pgrade { color: var(--muted); font-size: .95rem; }
.plus { font-size: 4rem; line-height: 1; color: var(--teal); font-family: var(--head); }
.avatar-wobmat { background: #fbeedc; } .avatar-pippa { background: #e4eef3; } .avatar-kip { background: #e3ecfa; }
.avatar-nora { background: #fbe6d6; } .avatar-mags { background: #e3eef0; }
.avatar-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.avatar-opt { display: grid; justify-items: center; gap: 2px; border: 3px solid var(--line); border-radius: 18px; padding: 8px 10px; cursor: pointer; font-weight: 400 !important; }
.avatar-opt input { position: absolute; opacity: 0; }
.avatar-opt:has(input:checked) { border-color: var(--yellow); background: var(--yellow-soft); }
.avatar-opt img { height: 80px; width: auto; }
.grownups { margin-top: 30px; }

/* learner home */
.kid-hello { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0; background: var(--paper);
  border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow); }
.kid-hello h1 { margin: 0; }
.kid-hello .continue { margin-left: auto; }
.kid-stats { display: flex; gap: 14px; flex-wrap: wrap; font-family: var(--head); font-weight: 700; margin: 4px 0 0; }
.kid-stats span { background: var(--yellow-soft); border-radius: 999px; padding: 2px 12px; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.book-card { display: grid; gap: 8px; background: var(--paper); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); border-top: 10px solid var(--teal); transition: transform .12s ease; }
.book-card:hover { transform: translateY(-4px); }
.book-card.unit-a { border-top-color: var(--orange); } .book-card.unit-b { border-top-color: var(--teal); }
.book-card.unit-c { border-top-color: var(--green); } .book-card.unit-d { border-top-color: var(--purple); }
.book-unit { font-family: var(--head); font-weight: 800; background: var(--navy); color: #fff; border-radius: 10px; padding: 0 10px; justify-self: start; }
.book-title { font-family: var(--head); font-weight: 800; font-size: 1.3rem; color: var(--navy); line-height: 1.15; }
.book-chapters { display: grid; gap: 2px; font-size: .9rem; color: var(--muted); }
.bar { height: 12px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), #f0a020); border-radius: 999px; }
.book-meta { font-size: .9rem; font-weight: 700; color: var(--muted); }
.grade-switch { margin: 28px 0; }
.grade-switch summary { cursor: pointer; font-family: var(--head); font-weight: 800; color: var(--navy); font-size: 1.15rem; }
.grade-list { display: grid; gap: 8px; margin-top: 10px; }
.grade-list .level { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.grade-list a { background: var(--paper); border: 2px solid var(--line); border-radius: 12px; padding: 2px 10px; text-decoration: none; color: var(--navy); font-weight: 700; }
.grade-list a[aria-current] { border-color: var(--navy); }

/* learning map */
.map-head { margin-top: 18px; }
.map-head h1 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.back { font-family: var(--head); font-weight: 700; text-decoration: none; }
.map-scroll { width: min(900px, 100%); margin: 0 auto 40px; }
.trail { width: 100%; height: auto; display: block; }
.trail-shadow { fill: none; stroke: rgba(110,74,51,.18); stroke-width: 46; stroke-linecap: round; }
.trail-path { fill: none; stroke: #e2c9a0; stroke-width: 30; stroke-linecap: round; stroke-dasharray: 2 30; }
.node-chapter rect { fill: var(--navy); }
.node-chapter text { fill: #fff; text-anchor: middle; font-family: var(--head); }
.ch-num { font-size: 20px; font-weight: 700; fill: var(--yellow) !important; }
.ch-title { font-size: 25px; font-weight: 800; }
.node-lesson circle { fill: var(--paper); stroke: var(--brown); stroke-width: 6; transition: transform .15s ease; transform-box: fill-box; transform-origin: center; }
.node-lesson:hover circle { transform: scale(1.1); }
.node-lesson.started circle { fill: var(--yellow-soft); }
.node-lesson.done circle { fill: var(--yellow); stroke: #c48a12; }
.node-lesson.current circle { stroke: var(--blue); stroke-width: 9; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .node-lesson.current circle { animation: none; } * { transition: none !important; } }
.l-num { text-anchor: middle; font-family: var(--head); font-weight: 800; font-size: 26px; fill: var(--navy); }
.l-stars { text-anchor: middle; font-size: 22px; fill: #c48a12; letter-spacing: 2px; }
.l-title { font-family: var(--head); font-weight: 700; font-size: 22px; fill: var(--ink); paint-order: stroke; stroke: var(--cream); stroke-width: 6px; }
.l-title.left { text-anchor: start; } .l-title.right { text-anchor: end; }
.node-chest rect { fill: var(--brown); stroke: #c48a12; stroke-width: 5; }
.node-chest.done rect { fill: var(--yellow); }
.chest-icon { text-anchor: middle; font-size: 36px; }
.marker { pointer-events: none; }

/* lesson player */
.lesson-page main { padding-bottom: 60px; }
.crumbs { margin: 14px 0 6px; font-family: var(--head); font-weight: 700; }
.crumbs a { text-decoration: none; }
.player-head .kicker { color: var(--teal); font-family: var(--head); font-weight: 700; margin: 0; }
.l-badge { background: var(--navy); color: #fff; border-radius: 12px; padding: 0 10px; font-size: .8em; }
.steps { list-style: none; padding: 0; margin: 10px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.steps button { font-family: var(--head); font-weight: 800; font-size: 1rem; border: 3px solid var(--line); background: var(--paper);
  color: var(--navy); border-radius: 999px; padding: .35em 1em; cursor: pointer; }
.steps button.on { border-color: var(--navy); background: var(--yellow-soft); }
.steps button.done::after { content: " ✔"; color: var(--green); }
.goal { background: var(--paper); border-left: 6px solid var(--teal); border-radius: 10px; padding: 8px 14px; }
.stage { min-height: 300px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0; }
.page-count { font-family: var(--head); font-weight: 700; color: var(--muted); }

.comic-page { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.comic-page.n3 > .panel:first-child, .comic-page.n5 > .panel:first-child { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.comic-page.n2 { grid-template-columns: 1fr; }
@media (max-width: 700px) { .comic-page { grid-template-columns: 1fr; } }
/* A panel's aspect-ratio plus min-height can make the grid track wider than a phone (220px x 21/9 = 513px). */
.comic-page > .panel { min-width: 0; }
.panel { position: relative; margin: 0; border: 4px solid var(--navy); border-radius: 14px; overflow: hidden; background: #fff;
  aspect-ratio: 16 / 10; min-height: 220px; max-height: 460px; display: flex; flex-direction: column; justify-content: space-between; }
.panel .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.panel .caption { position: relative; z-index: 2; align-self: flex-start; background: var(--yellow-soft); border: 2px solid var(--navy);
  border-radius: 0 0 10px 0; padding: 2px 10px; font-weight: 700; font-size: .95rem; margin: 0; }
.panel .bubbles { position: relative; z-index: 3; display: grid; gap: 6px; padding: 8px; order: -1; }
.bubble { background: #fff; border: 2px solid var(--navy); border-radius: 16px; padding: 4px 10px; font-size: .95rem; max-width: 92%;
  box-shadow: 0 2px 0 rgba(27,37,80,.2); }
.bubble:nth-child(even) { justify-self: end; }
.bubble.think { border-style: dashed; border-radius: 22px; }
.bubble.shout { border-width: 3px; font-weight: 700; }
.bubble b { font-family: var(--head); color: var(--teal); }
.panel .cast { position: relative; z-index: 1; display: flex; justify-content: space-around; align-items: flex-end; padding: 0 6px 4px; margin-top: auto; }
.cast-sprite { height: clamp(56px, 12vw, 110px); width: auto; }
.cast-sprite.flip { transform: scaleX(-1); }
.panel-fig { position: relative; z-index: 2; background: rgba(255,255,255,.92); margin: 4px 10px; border-radius: 10px; padding: 4px; text-align: center; }
.panel-fig img { max-height: 160px; max-width: 100%; }
@media (max-width: 700px) { .panel, .comic-page.n3 > .panel:first-child, .comic-page.n5 > .panel:first-child { aspect-ratio: auto; } }   /* grow to fit the bubbles */

.study { background: var(--paper); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.study h3 { margin-top: 1em; }
.box { border-radius: 14px; padding: 12px 16px; margin: 12px 0; border-left: 8px solid var(--blue); background: #eef4fb; }
.box-definition { border-color: var(--teal); background: #e6f3f3; } .box-rule, .box-theorem { border-color: var(--purple); background: #efebf8; }
.box-method { border-color: var(--green); background: #e8f3e9; } .box-watch { border-color: var(--red); background: var(--red-soft); }
.example { border: 2px dashed var(--line); border-radius: 14px; padding: 12px 16px; margin: 12px 0; }
.ex-steps .why { color: var(--muted); font-size: .95rem; }
.ex-answer { font-weight: 700; }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--yellow-soft); border-radius: 14px; padding: 10px; margin: 12px 0; }
.note-head { width: 56px; height: auto; flex: none; }
.fig-block { text-align: center; }
.figure { max-width: 100%; height: auto; max-height: 360px; display: block; margin: 8px auto; }
.fx-wrap { overflow-x: auto; overflow-y: hidden; padding: 6px 0; }
.fx-wrap > .fx { width: max-content; min-width: 100%; }   /* a centred wide formula can't scroll to its left part */
.try-it { border-top: 3px solid var(--line); margin-top: 16px; padding-top: 8px; }

.notebook { background: #fffdf5; border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow);
  background-image: repeating-linear-gradient(transparent 0 31px, #e9eef8 31px 32px); margin-bottom: 18px; }
.nb-head { display: flex; align-items: center; gap: 12px; }
.nb-art { height: 90px; width: auto; }
.notebook li { margin: 8px 0; font-size: 1.1rem; }
.nb-figs { display: flex; flex-wrap: wrap; gap: 10px; }

.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 18px; }
.level-card { display: grid; justify-items: center; gap: 4px; background: var(--paper); border: 4px solid var(--line); border-radius: 24px;
  padding: 18px; cursor: pointer; box-shadow: var(--shadow); font: inherit; transition: transform .12s ease; }
.level-card:hover { transform: translateY(-3px); border-color: var(--yellow); }
.level-card.passed { border-color: var(--yellow); background: var(--yellow-soft); }
.lv-star { font-size: 2.6rem; color: #c48a12; line-height: 1; }
.lv-name { font-family: var(--head); font-weight: 800; font-size: 1.3rem; color: var(--navy); }
.lv-meta { color: var(--muted); }

.round h2 { margin-top: 6px; }
.dots { display: flex; gap: 8px; margin: 6px 0 14px; flex-wrap: wrap; }
.dot { width: 22px; height: 22px; border-radius: 50%; background: var(--sand); border: 3px solid var(--line); }
.dot.now { border-color: var(--blue); }
.dot.ok { background: var(--green); border-color: var(--green); }
.dot.no { background: #e9b8b3; border-color: var(--red); }
.q-card { background: var(--paper); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin: 10px 0; }
.q-prompt { font-size: 1.25rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.choice-btn { display: flex; align-items: center; gap: 8px; text-align: left; font: inherit; font-size: 1.1rem; background: #fff;
  border: 3px solid var(--line); border-radius: 16px; padding: 10px 12px; cursor: pointer; }
.choice-btn:hover:not(:disabled) { border-color: var(--blue); }
.choice-btn .letter { font-family: var(--head); font-weight: 800; background: var(--navy); color: #fff; border-radius: 50%;
  width: 1.8em; height: 1.8em; display: grid; place-items: center; flex: none; }
.choice-btn.right { border-color: var(--green); background: var(--green-soft); }
.choice-btn.wrong { border-color: var(--red); background: var(--red-soft); }
.c-fig { max-height: 90px; width: auto; }
.ans-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.ans-row { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; }
.ans-input { font-size: 1.4rem !important; width: 9em; text-align: center; }
.ans-input.right { border-color: var(--green); background: var(--green-soft); }
.ans-input.wrong { border-color: var(--red); background: var(--red-soft); }
.scratch { width: 100%; margin: 10px 0; }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.fb { display: flex; gap: 12px; align-items: center; border-radius: 16px; padding: 10px 14px; margin-top: 12px; }
.fb.ok { background: var(--green-soft); color: var(--green); font-size: 1.3rem; font-family: var(--head); }
.fb.no { background: #fff6e0; }
.fb.self { display: block; background: #eef4fb; }
.fb.retry { background: #fff6e0; }
.hint-box { background: var(--yellow-soft); border: 2px dashed var(--yellow); border-radius: 16px; padding: 8px 14px; margin-top: 12px; }
.hint-box .hint-title { font-family: var(--head); font-weight: 800; margin: 0 0 4px; }
.hint-box ul { margin: 4px 0; padding-left: 1.2em; }
.help-row:empty { display: none; }
.choice-btn.wrong:disabled { opacity: .65; }
.fb-art { height: 70px; width: auto; flex: none; }
.ans b { font-family: var(--head); }
.sol { color: var(--muted); }
.result { text-align: center; background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.result.pass { background: linear-gradient(180deg, var(--yellow-soft), #fff); }
.result-art { height: 160px; width: auto; }
.score { font-family: var(--head); font-weight: 800; font-size: 2.6rem; color: var(--navy); margin: 0; }
.result .q-actions { justify-content: center; }
.deeper-head { display: flex; align-items: center; gap: 12px; }
.deeper-art { height: 100px; width: auto; }
.chest-intro { text-align: center; background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }

.badge-pop { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: grid; justify-items: center; gap: 2px;
  background: var(--paper); border: 4px solid var(--yellow); border-radius: 22px; padding: 14px 20px; box-shadow: var(--shadow);
  animation: popin .35s ease-out; font-family: var(--head); }
.badge-pop strong { color: var(--orange); }
.badge-pop-art { height: 80px; width: auto; }
@keyframes popin { from { transform: translateY(30px) scale(.8); opacity: 0; } }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin: 18px 0; }
.badge { display: grid; justify-items: center; gap: 4px; background: var(--paper); border-radius: 18px; padding: 12px; text-align: center;
  font-family: var(--head); font-weight: 700; filter: grayscale(1); opacity: .45; }
.badge.earned { filter: none; opacity: 1; box-shadow: var(--shadow); border: 3px solid var(--yellow); }
.badge img { height: 80px; width: auto; }
.badge-grid.small .badge img { height: 56px; }
.stars .star { color: #d9cdb6; } .stars .star.on { color: #c48a12; }

/* grown-ups and admin */
.kid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.kid-card header { display: flex; gap: 12px; align-items: center; }
.kid-card h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.stats.wide { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.stats div { background: var(--cream); border-radius: 12px; padding: 8px 10px; }
.stats dt { font-size: .8rem; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--head); font-weight: 800; font-size: 1.3rem; color: var(--navy); }
.inline-av { vertical-align: middle; height: 56px; width: auto; }
.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 160px; background: var(--paper);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.bar-col { display: grid; grid-template-rows: 1fr auto; height: 100%; align-items: end; justify-items: center; }
.bar-col .v { width: 70%; background: var(--teal); border-radius: 6px 6px 0 0; min-height: 2px; }
.bar-col .d { font-size: .75rem; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--paper); }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-family: var(--head); color: var(--navy); background: var(--sand); }
.tbl tr.ok td { background: #f2f9f2; } .tbl tr.bad td { background: var(--red-soft); }
.tbl tr.disabled td { opacity: .5; }
.row-actions { white-space: nowrap; }
.row-actions details { display: inline-block; }
.row-actions summary { list-style: none; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { font-family: var(--head); font-weight: 700; text-decoration: none; border: 2px solid var(--line); border-radius: 999px; padding: 2px 14px; color: var(--navy); background: var(--paper); }
.tabs a[aria-current] { border-color: var(--navy); background: var(--yellow-soft); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 16px 0; }
.metric { display: grid; background: var(--paper); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.mv { font-family: var(--head); font-weight: 800; font-size: 2.2rem; color: var(--navy); line-height: 1; }
.ml { font-weight: 700; } .ms { font-size: .85rem; color: var(--muted); }
.searchbar { display: flex; gap: 8px; margin: 12px 0; }
.prose { max-width: 760px; margin: 30px auto; }

/* report a problem */
.report { margin-top: 10px; }
.report-link { color: var(--muted); font-size: .9rem; }
.report-form { display: grid; gap: 6px; background: var(--cream); border-radius: 12px; padding: 10px 12px; max-width: 520px; }
.report-form p { margin: 0; }
.report-kinds { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .95rem; }
.report-form textarea { width: 100%; }
.report-form .btn { justify-self: start; }
.report-done { color: var(--green); font-weight: 700; }
.update-banner { background: var(--yellow-soft); border: 2px solid var(--yellow); border-radius: 16px; padding: 10px 16px; margin: 12px 0 18px; text-align: left; }
.update-banner p { margin: 4px 0; }
.steps-list li { margin: 6px 0; }
