/* Calm lesson, "Show me" guide, teachers' page and phone header (kept apart from style.css). */
/* Calm lesson: one task, one picture. "Show me" is a hand over the real page that never blocks it. */
.task-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.task-top .show-me { margin-left: auto; font-size: 14px; }
.stage-foot { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.ghost { position: fixed; z-index: 50; pointer-events: none; transition: left 0.7s ease, top 0.7s ease; }
.ghost-hand { display: block; width: 34px; height: 34px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: rgba(245, 200, 66, 0.35); border: 3px solid var(--accent); box-shadow: 0 0 0 8px rgba(245, 200, 66, 0.12);
  animation: ghost-press 1.3s ease-in-out infinite; }
.ghost-say { margin: 10px 0 0 -10px; padding: 6px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--accent);
  color: var(--ink); font-weight: 600; white-space: nowrap; font-size: 15px; }
@keyframes ghost-press { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .ghost { transition: none; } .ghost-hand { animation: none; } }
.discover:fullscreen { background: var(--paper); padding: 24px; }

/* Teachers' page */
.teachers { max-width: 1100px; margin: 0 auto; padding: 24px; }
.teacher-steps { font-size: 18px; line-height: 1.6; padding-left: 24px; }
.teacher-steps li { margin: 6px 0; }
.table-wrap { overflow-x: auto; }
.plan { border-collapse: collapse; width: 100%; font-size: 15px; }
.plan th, .plan td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); vertical-align: top; }
.plan th { color: var(--muted, #9fb0b8); font-weight: 600; }
.plan tr.missing td:nth-child(4) { color: var(--b); font-weight: 600; }
.plan tr.partial td:nth-child(4) { color: var(--accent); }
.plan a { color: inherit; }
.taskbox .task-top button.link.show-me { color: var(--soft); }
/* boards.css styles .link for lines in pictures; buttons with that class stay fully visible */
button.link { opacity: 1; }
@media (max-width: 640px) { header.top { flex-wrap: wrap; row-gap: 8px; } header.top > a.quiet { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }

/* ===== Design-system fixes found by the design audit (tests/ui/design.ui.test.js) ===== */
/* Fonts: Hanken Grotesk for text, JetBrains Mono for formulas, numbers in pictures and code (DESIGN-RULES.md). */
:root { --math: var(--font-mono); }
.board svg { font-family: var(--font); }
.digit, .small, .explain-formula p, .explain-signs dt { font-family: var(--font-mono); }
/* Touch targets: at least 44 × 44 px. */
.tabs button, .taskbox .goals button, .task-top .show-me, header .quiet, header .primary { min-height: 44px; }
header .quiet { min-width: 44px; }
/* A reached target: green mark, but the text keeps full contrast in light and dark. */
.taskbox .goals button.reached { color: var(--ink); }
/* Handles stay visible on any colour: the ring sits on a disc of the page colour. */
.knob .halo { fill: var(--paper); opacity: 0.92; }
.knob:hover .halo, .knob:focus .halo, .knob.held .halo { fill: var(--accent); opacity: 0.35; }
/* Raised and lowered parts of formulas (typeset.js): close to the base, not changing the line height. */
sup.math-up, sub.math-down { font-size: 0.7em; line-height: 0; position: relative; vertical-align: baseline; }
sup.math-up { top: -0.5em; } sub.math-down { top: 0.25em; }
.math-plain { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
sup.math-up, sub.math-down { speak: none; }
/* More touch-target and contrast fixes from the design audit. */
.quiet, header button, .lesson-top button, .values button, .board-tools button { min-width: 44px; }
a.brand, a.topic-link { min-height: 44px; display: inline-flex; align-items: center; }
a.topic-link { display: flex; }
.plan th { color: var(--soft); }
/* Light scheme: picture colours dark enough for labels on their own tinted areas (4.5:1). */
@media (prefers-color-scheme: light) { :root:not([data-colours=dark]) { --b: #a0402b; --a-soft: #1565c01c; --b-soft: #a0402b1c; --c-soft: #7b1fa21c; } }
html[data-colours=light] { --b: #a0402b; --a-soft: #1565c01c; --b-soft: #a0402b1c; --c-soft: #7b1fa21c; }
.discover button, .values button { min-width: 44px; }
