/* AcumenTeach free tools: shared styles, matching the Starberry Nova books.
   Uses the colour tokens from styles.css (--green, --forest, --gold, --mist, --line, --ink, --muted). */
:root {
  --nova-red: #E5484D; --nova-pink: #FFF0F3; --nova-line: #E2405A;
  --hoot-cream: #FBF5E3; --hoot-gold: #C9A24A;
  --lvl-core: #DCEBD8; --lvl-cs: #E8F0D2; --lvl-stretch: #FBF0CC; --lvl-chal: #F6D6D6;
}

/* ---------- page header with Nova ---------- */
.tool-head { padding-block: 48px 36px; border-bottom: 1px solid var(--line); }
.tool-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 28px; align-items: center; }
.tool-head h1 { margin: 6px 0 10px; }
@media (max-width: 820px) { .tool-head .wrap { grid-template-columns: 1fr; } }

/* Nova speech bubble (same as the books) */
.nova-say { display: flex; gap: 10px; align-items: flex-start; }
.nova-say img { width: 58px; height: 58px; flex: 0 0 auto; }
.nova-say .bub { position: relative; flex: 1; background: var(--nova-pink); border: 2px solid var(--nova-line); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: .95rem; line-height: 1.4; color: var(--ink); }
.nova-say .bub::before { content: ""; position: absolute; left: -10px; top: 18px; border: 8px solid transparent; border-right-color: var(--nova-line); border-left: 0; }
.nova-say .bub b { color: var(--ink); }

/* Professor Hoot box (same as the books) */
.hoot-say { display: flex; gap: 12px; align-items: center; background: var(--hoot-cream); border: 2px solid var(--hoot-gold); border-radius: 14px; padding: 10px 14px; font-size: .92rem; line-height: 1.45; }
.hoot-say img { width: 46px; height: auto; flex: 0 0 auto; }
.hoot-say b { color: var(--forest); }

/* ---------- controls ---------- */
.tool-wrap { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 960px) { .tool-wrap { grid-template-columns: 1fr; } }
.panel { position: sticky; top: 90px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 18px; }
@media (max-width: 960px) { .panel { position: static; } }
.panel h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; margin: 0 0 8px; color: var(--forest); }
.panel .hint { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick button, .seg button { font: 700 .9rem var(--sans); border: 1.5px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; cursor: pointer; min-width: 40px; padding: 7px 10px; }
.pick button:hover, .seg button:hover { border-color: var(--green); }
.pick button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.seg button { font-size: .82rem; padding: 9px 8px; }
.seg button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
.mini { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini button { font: 600 .78rem var(--sans); background: var(--mist); border: 0; border-radius: 999px; padding: 6px 10px; cursor: pointer; color: var(--green); }
.mini button:hover { background: var(--line); }
.toggle { display: flex; align-items: center; gap: 10px; font-size: .9rem; font-weight: 600; cursor: pointer; }
.toggle input { width: 20px; height: 20px; accent-color: var(--green); }
.panel textarea, .panel select { width: 100%; font: inherit; font-size: .95rem; padding: 10px 12px; border: 1px solid #B8C7BD; border-radius: 10px; background: #fff; }
.panel textarea { min-height: 90px; resize: vertical; }
.panel .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel .actions .btn { text-align: center; padding: 12px 10px; font-size: .9rem; cursor: pointer; font-family: var(--sans); }

/* ---------- on-screen A4 preview ---------- */
.preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; background: var(--mist); border-radius: 14px; padding: 20px 12px; overflow: hidden; min-width: 0; }
.preview-note { font-size: .85rem; color: var(--muted); text-align: center; margin: 0; }
.sheet-scale { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 22px; min-width: 0; overflow: hidden; }
.sheet { width: 210mm; height: 297mm; background: #fff; box-shadow: 0 6px 24px rgba(6,48,28,.12); padding: 11mm 12mm 9mm; display: flex; flex-direction: column; color: #16211B; transform-origin: top left; overflow: hidden; font-family: var(--sans); }
.sheet.land { width: 297mm; height: 210mm; }

/* ---------- sheet parts (book style) ---------- */
.s-run { display: flex; gap: 2mm; font-size: 7.5pt; color: var(--muted); border-bottom: .25mm solid var(--line); padding-bottom: 1.5mm; margin-bottom: 3mm; }
.s-run b { color: var(--gold-ink, #8A6517); letter-spacing: .04em; }
.s-nova { display: flex; gap: 2.5mm; align-items: flex-start; margin-bottom: 3mm; }
.s-nova img { width: 13mm; height: 13mm; flex: 0 0 auto; }
.s-nova div { position: relative; flex: 1; background: var(--nova-pink); border: .5mm solid var(--nova-line); border-radius: 3mm; padding: 2mm 3.5mm; font-size: 9.5pt; font-weight: 600; line-height: 1.35; }
.s-head { background: var(--forest); color: #fff; border-radius: 1.5mm 1.5mm 0 0; padding: 2.5mm 4mm; display: flex; align-items: center; justify-content: space-between; }
.s-head h2 { margin: 0; font: 700 15pt/1.1 var(--sans); color: #fff; }
.s-pill { background: var(--lvl-core); color: var(--forest); font-size: 8pt; font-weight: 700; border-radius: 10mm; padding: 1mm 3mm; }
.s-meta { display: grid; grid-template-columns: repeat(4, 1fr); border: .25mm solid var(--line); border-top: 0; background: var(--mist); margin-bottom: 4mm; }
.s-meta span { padding: 2mm 3mm; font-size: 8.5pt; font-weight: 700; border-right: .25mm solid var(--line); white-space: nowrap; overflow: hidden; }
.s-meta span:last-child { border-right: 0; }
.s-label { font-size: 7.5pt; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8A6517; border-bottom: .3mm solid #E6D6A8; padding-bottom: 1mm; margin: 0 0 2.5mm; }
.s-body { flex: 1; min-height: 0; }
.s-hoot { display: flex; gap: 3mm; align-items: center; background: var(--hoot-cream); border: .5mm solid var(--hoot-gold); border-radius: 3mm; padding: 2mm 3.5mm; font-size: 8.8pt; line-height: 1.4; margin-top: 3mm; }
.s-hoot img { width: 10mm; height: auto; }
.s-hoot b { color: var(--forest); }
.s-mistake { border: .5mm dashed var(--nova-line); border-radius: 3mm; padding: 2.5mm 3.5mm; margin-top: 3mm; background: #fff; }
.s-mistake h3 { margin: 0 0 1.5mm; font: 700 10pt var(--sans); color: var(--nova-red); display: flex; align-items: center; gap: 2mm; }
.s-mistake h3 img { width: 8mm; height: 8mm; }
.s-mistake p { margin: 0 0 1.5mm; font-size: 8.8pt; }
.s-mistake .row { display: flex; flex-wrap: wrap; gap: 2mm 6mm; font-size: 10.5pt; font-weight: 600; }
.s-mistake .row span { white-space: nowrap; }
.s-foot { margin-top: 2.5mm; padding-top: 1.5mm; border-top: .25mm solid var(--line); display: flex; justify-content: space-between; font-size: 7pt; color: var(--muted); }
.s-foot b { color: var(--green); font-weight: 600; }

/* ---------- printing: only the sheets ---------- */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  .site-header, .site-footer, .skip, .no-print, main > *:not(.print-host), .print-host .panel, .print-host .preview-note { display: none !important; }
  .print-host, .print-host .wrap, .tool-wrap, .preview, .sheet-scale { padding: 0 !important; margin: 0 !important; background: none !important; display: block !important; max-width: none !important; width: auto !important; border: 0 !important; gap: 0 !important; }
  .sheet { box-shadow: none !important; transform: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.ogl { font-size: .78rem; color: var(--muted); margin-top: 14px; }

/* ---------- times tables ---------- */
.tt-grid { display: grid; gap: 4mm 5mm; }
.tt-grid.cols-1 { grid-template-columns: 70mm; }
.tt-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.tt-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.tt-block { border: .3mm solid var(--line); border-radius: 2mm; overflow: hidden; }
.tt-block h3 { margin: 0; background: var(--mist); color: var(--forest); font: 700 10pt var(--sans); padding: 1.5mm 3mm; border-bottom: .3mm solid var(--line); }
.tt-line { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 3mm; height: 5.6mm; font-size: 10pt; border-bottom: .2mm dotted #C9D6CD; }
.tt-grid.tall .tt-line { height: 6.6mm; }
.tt-line b { min-width: 12mm; text-align: right; color: var(--green); }
.tt-quiz { columns: 2; column-gap: 10mm; margin: 0; padding-left: 8mm; font-size: 12pt; }
.tt-quiz li { height: 9.2mm; display: list-item; break-inside: avoid; padding-top: 1.5mm; }
.tt-quiz li::marker { color: #8A6517; font-size: 9pt; font-weight: 700; }
.tt-quiz .ln { display: inline-block; width: 18mm; border-bottom: .3mm solid #16211B; height: 4mm; vertical-align: baseline; }
.tt-quiz .bx { display: inline-block; width: 11mm; height: 7mm; border: .35mm solid #16211B; border-radius: 1mm; vertical-align: middle; }
.tt-square { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tt-square th, .tt-square td { border: .25mm solid #9FB3A6; text-align: center; font-size: 9pt; padding: 0; }
.tt-square.n10 th, .tt-square.n10 td { height: 13mm; font-size: 11pt; }
.tt-square.n12 th, .tt-square.n12 td { height: 11.5mm; font-size: 10pt; }
.tt-square.n20 th, .tt-square.n20 td { height: 8.4mm; font-size: 7.5pt; }
.tt-square th { background: var(--forest); color: #fff; font-weight: 700; }
.tt-square td.hl { background: var(--nova-pink); }
.tt-ans { columns: 6; column-gap: 4mm; font-size: 10pt; margin: 0; padding-left: 8mm; }
.tt-ans li { margin-bottom: 1.2mm; }
.tt-ans li::marker { color: var(--muted); font-size: 8pt; }
.tt-ans-m { margin-top: 5mm; font-size: 10pt; background: var(--nova-pink); border: .4mm solid var(--nova-line); border-radius: 2mm; padding: 3mm; }

/* ---------- spelling ---------- */
.sp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 5mm; grid-auto-flow: column; }
.sp-list.c2 { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(10, auto); }
.sp-list.c3 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(22, auto); }
.sp-list.c4 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(25, auto); }
.sp-list li { display: flex; align-items: center; gap: 2.5mm; font-size: 11pt; height: 7.6mm; border-bottom: .2mm dotted #C9D6CD; }
.sp-list.tight li { font-size: 9.5pt; height: 6.3mm; }
.sp-box { width: 3.6mm; height: 3.6mm; border: .3mm solid #16211B; border-radius: .8mm; flex: 0 0 auto; }
.sp-lscwc { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sp-lscwc th { background: var(--forest); color: #fff; font-size: 8pt; padding: 1.8mm 1mm; font-weight: 700; }
.sp-lscwc td { border: .25mm solid #9FB3A6; height: 11.5mm; font-size: 12pt; }
.sp-lscwc td.w { font-weight: 700; padding-left: 2.5mm; color: var(--forest); background: var(--mist); }
.sp-lscwc th:nth-child(1), .sp-lscwc td:nth-child(1) { width: 27%; }
.sp-lscwc td.t, .sp-lscwc th:nth-child(3), .sp-lscwc th:nth-child(5), .sp-lscwc th:nth-child(7) { width: 7%; }
.sp-test { columns: 2; column-gap: 12mm; margin: 0; padding-left: 9mm; font-size: 12pt; }
.sp-test li { height: 12.5mm; break-inside: avoid; }
.sp-test li::marker { font-weight: 700; color: #8A6517; }
.sp-test li span { display: inline-block; width: 70mm; border-bottom: .3mm solid #16211B; height: 8mm; }
.sp-read { columns: 3; column-gap: 8mm; margin: 0 0 4mm; padding-left: 9mm; font-size: 12pt; }
.sp-read li { margin-bottom: 2.5mm; font-weight: 600; }
.sp-miss { margin: 0; padding-left: 9mm; font-size: 14pt; }
.sp-miss li { display: flex; align-items: flex-end; gap: 8mm; height: 13.5mm; }
.sp-miss li::marker { font-size: 11pt; font-weight: 700; color: #8A6517; }
.sp-miss .g { display: inline-flex; gap: 1.2mm; min-width: 85mm; letter-spacing: .5mm; }
.sp-miss .g b { font-weight: 600; }
.sp-gap { display: inline-block; width: 5.5mm; height: 7mm; border-bottom: .4mm solid #16211B; }
.sp-miss .l { flex: 1; border-bottom: .3mm solid #9FB3A6; height: 8mm; }

/* ---------- number facts topics ---------- */
.qstyles { display: grid; gap: 8px; }
.qstyles h2 { margin-bottom: 2px; }
.qstyles .toggle { font-weight: 500; font-size: .86rem; }
#dh-ranges button { min-width: 0; }
[hidden] { display: none !important; }

/* ---------- MTC practice ---------- */
.mtc { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px 24px; text-align: center; box-shadow: 0 10px 30px rgba(6,48,28,.08); }
.mtc h2 { margin-top: 0; }
.mtc-small { color: var(--muted); font-size: .9rem; }
.mtc-top { display: flex; justify-content: space-between; font-weight: 700; color: var(--forest); font-size: .95rem; }
.mtc-timer { height: 14px; background: var(--mist); border-radius: 99px; overflow: hidden; margin: 12px 0 18px; }
.mtc-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--nova-red), var(--hoot-gold)); border-radius: 99px; }
.mtc-ready { font-size: 1.3rem; font-weight: 700; color: var(--muted); min-height: 1.6em; }
.mtc-sum { font-size: clamp(2.6rem, 9vw, 4.6rem); font-weight: 800; color: var(--forest); min-height: 1.3em; display: flex; justify-content: center; align-items: center; gap: 16px; }
.mtc-in { display: inline-block; min-width: 2.6em; border-bottom: 5px solid var(--forest); color: var(--green); }
.mtc-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 360px; margin: 22px auto 0; }
.mtc-pad button { font: 800 1.6rem var(--sans); padding: 14px 0; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--forest); cursor: pointer; }
.mtc-pad button:active { background: var(--mist); }
.mtc-pad .k-del, .mtc-pad .k-ent { font-size: 1rem; }
.mtc-pad .k-ent { background: var(--forest); color: #fff; border-color: var(--forest); }
.mtc-score { font-size: 4rem; font-weight: 800; color: var(--forest); line-height: 1; }
.mtc-tip { background: var(--hoot-cream); border: 2px solid var(--hoot-gold); border-radius: 14px; padding: 14px; display: grid; gap: 10px; justify-items: center; }
.mtc-list { list-style: none; padding: 0; margin: 20px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; text-align: left; }
.mtc-list li { padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
.mtc-list li.ok { background: #E7F4EA; }
.mtc-list li.no { background: var(--nova-pink); }
.mtc-list li span { color: var(--muted); font-size: .8rem; }
.mtc-list em { color: var(--green); font-style: normal; font-weight: 700; }

/* ---------- hundred square ---------- */
.hs-wrap { min-width: 0; }
.hs-board { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; background: var(--mist); padding: 8px; border-radius: 14px; max-width: 640px; }
.hs-cell { aspect-ratio: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 8px; font: 700 clamp(.75rem, 2.4vw, 1.15rem) var(--sans); color: var(--forest); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: transform .08s; }
.hs-cell:hover { transform: scale(1.06); }
.hs-blank { color: transparent; }
.hs-gap { background: #fff; border-style: dashed; border-color: var(--nova-line); cursor: text; }
.hs-gap input { width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font: 800 clamp(.75rem, 2.4vw, 1.15rem) var(--sans); color: var(--forest); outline: none; padding: 0; }
.hs-gap.ok { background: #7BD389; border-style: solid; border-color: #4caf6a; }
.hs-gap.no { background: var(--nova-pink); }
.hs-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-weight: 600; font-size: .9rem; }
.hs-legend i { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 6px; border: 1px solid var(--line); }
.hs-colours button { color: #16211B; }
.hs-colours button[aria-pressed="true"] { outline: 3px solid var(--forest); outline-offset: 1px; color: #16211B; }
.hs-print-foot { display: none; }
@media print {
  .site-header, .site-footer, .no-print, .tool-head, .band-forest, .skip, .hoot-say { display: none !important; }
  .tool-wrap { display: block !important; }
  .hs-board { max-width: none; width: 180mm; margin: 10mm auto 0; background: none; }
  .hs-cell { border-radius: 2mm; }
  .hs-print-foot { display: block; text-align: center; font-size: 9pt; color: #555; margin-top: 4mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- GCSE flashcards ---------- */
.fc-decks { max-width: 900px; margin: 0 auto 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.fc-progress { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.fc-pbar { flex: 1; height: 12px; background: var(--mist); border-radius: 99px; overflow: hidden; }
.fc-pbar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }
.fc-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0 20px; font-size: .85rem; font-weight: 700; }
.fc-stats span { padding: 4px 10px; border-radius: 99px; }
.fc-stats .b3 { background: #E7F4EA; color: #1d6b39; } .fc-stats .b2 { background: #FBF0CC; color: #7a5a00; } .fc-stats .b1 { background: var(--nova-pink); color: #b3261e; } .fc-stats .b0 { background: var(--mist); color: var(--muted); }
.fc-stage { max-width: 640px; margin: 0 auto; text-align: center; }
.fc-card { position: relative; height: 300px; perspective: 1200px; cursor: pointer; outline: none; }
.fc-face { position: absolute; inset: 0; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; font-size: 1.25rem; font-weight: 700; line-height: 1.45; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .45s; box-shadow: 0 10px 30px rgba(6,48,28,.12); }
.fc-face small { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; opacity: .75; }
.fc-front { background: #fff; border: 2px solid var(--line); color: var(--forest); }
.fc-back { background: var(--forest); color: #fff; transform: rotateY(180deg); font-size: 1.12rem; }
.fc-card.flip .fc-front { transform: rotateY(-180deg); }
.fc-card.flip .fc-back { transform: rotateY(0); }
.fc-card:focus-visible .fc-front { outline: 3px solid var(--hoot-gold); }
.fc-rate { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; }
.fc-rate p { width: 100%; margin: 0; font-weight: 700; }
.fc-rate button { font: 700 1rem var(--sans); border: 0; border-radius: 12px; padding: 12px 20px; cursor: pointer; }
.fc-rate .r1 { background: var(--nova-pink); color: #b3261e; } .fc-rate .r2 { background: #FBF0CC; color: #7a5a00; } .fc-rate .r3 { background: var(--green); color: #fff; }
.fc-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: center; margin-top: 22px; }
.fc-own { max-width: 640px; margin: 28px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.fc-own textarea { width: 100%; font: inherit; padding: 10px; border: 1px solid #B8C7BD; border-radius: 10px; margin-bottom: 10px; }
.fc-printout { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body.fc-printing > *:not(main), body.fc-printing main > *:not(.fc-printout) { display: none !important; }
  .fc-printout { display: block !important; }
  .fc-sheet { width: 210mm; height: 297mm; padding: 10mm 12mm; box-sizing: border-box; break-after: page; display: flex; flex-direction: column; font-family: var(--sans); }
  .fc-sh { font-size: 8pt; color: #555; margin-bottom: 4mm; } .fc-sh b { color: #8A6517; }
  .fc-row { display: grid; grid-template-columns: 1fr 1fr; height: 37mm; border: .4mm solid #16211B; border-bottom: 0; }
  .fc-row:last-of-type { border-bottom: .4mm solid #16211B; }
  .fc-q, .fc-a { padding: 3mm 5mm; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11pt; font-weight: 700; line-height: 1.35; }
  .fc-q { border-right: .5mm dashed #888; color: #06301C; }
  .fc-a { font-weight: 600; font-size: 10pt; background: #F3F7F4; }
  .fc-sf { margin-top: auto; font-size: 8pt; color: #555; text-align: center; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- sound button + Nova cheer ---------- */
.sound-btn { position: fixed; left: 16px; bottom: 16px; z-index: 60; font: 700 .9rem var(--sans); background: #fff; color: var(--forest); border: 2px solid var(--forest); border-radius: 99px; padding: 9px 16px; cursor: pointer; box-shadow: 0 6px 18px rgba(6,48,28,.15); }
.sound-btn[aria-pressed="true"] { background: var(--forest); color: #fff; }
@media (max-width: 600px) { .sound-btn span { display: none; } }
.nova-toast { position: fixed; left: 50%; bottom: 28px; z-index: 70; display: flex; align-items: center; gap: 10px; background: var(--nova-pink); border: 3px solid var(--nova-line); border-radius: 99px; padding: 6px 22px 6px 8px; font: 800 1.35rem var(--sans); color: var(--forest); box-shadow: 0 10px 28px rgba(6,48,28,.2); transform: translate(-50%, 140%) scale(.8); opacity: 0; pointer-events: none; transition: transform .25s cubic-bezier(.3,1.6,.5,1), opacity .2s; }
.nova-toast.show { transform: translate(-50%, 0) scale(1); opacity: 1; }
.nova-toast.no { background: #fff; border-color: var(--hoot-gold); }
.nova-toast img { width: 54px; height: 54px; }
@media print { .sound-btn, .nova-toast { display: none !important; } }

/* ---------- 20 free minutes a day ---------- */
.gate-chip { position: fixed; right: 16px; bottom: 16px; z-index: 60; font: 700 .85rem var(--sans); background: #fff; color: var(--forest); border: 2px solid var(--hoot-gold); border-radius: 99px; padding: 8px 14px; text-decoration: none; box-shadow: 0 6px 18px rgba(6,48,28,.15); }
.gate-chip.low { background: var(--nova-pink); border-color: var(--nova-line); }
.gate-lock { position: fixed; inset: 0; z-index: 90; background: rgba(6,48,28,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-box { background: #fff; border-radius: 22px; max-width: 480px; width: 100%; padding: 28px 24px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: grid; gap: 10px; justify-items: center; }
.gate-box h2 { margin: 0; color: var(--forest); }
.gate-box p { margin: 0; }
.gate-form { width: 100%; display: grid; gap: 6px; margin: 6px 0; }
.gate-form label { font-weight: 700; }
.gate-form div { display: flex; gap: 8px; }
.gate-form input { flex: 1; font: 700 1.1rem var(--sans); padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; text-transform: uppercase; min-width: 0; }
.gate-msg { color: var(--nova-red); font-size: .9rem; min-height: 1.2em; }
.gate-small { font-size: .8rem; color: var(--muted); }
body.gate-on { overflow: hidden; }
@media print { .gate-chip, .gate-lock { display: none !important; } }
.unlock-form { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: grid; gap: 14px; }
.unlock-code { display: inline-block; font: 800 2.4rem var(--sans); letter-spacing: .12em; color: var(--forest); background: var(--hoot-cream); border: 3px dashed var(--hoot-gold); border-radius: 16px; padding: 10px 26px; margin: 14px 0; }

/* ---------- Daily 10 ---------- */
.d10-levels { max-width: 560px; margin: 10px auto 14px; grid-template-columns: repeat(4, 1fr); }
.d10-streak { font-size: 1.1rem; }
.d10-dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 18px; }
.d10-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--mist); border: 2px solid var(--line); }
.d10-dots i.now { border-color: var(--forest); background: #fff; transform: scale(1.25); }
.d10-dots i.ok { background: var(--green); border-color: var(--green); }
.d10-dots i.no { background: var(--nova-red); border-color: var(--nova-red); }
.d10-q { font-size: clamp(1.6rem, 5.5vw, 2.8rem); font-weight: 800; color: var(--forest); min-height: 1.4em; line-height: 1.25; }
.d10-form { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.d10-form input { width: 9em; font: 800 1.8rem var(--sans); text-align: center; padding: 8px; border: 3px solid var(--line); border-radius: 14px; color: var(--forest); }
.d10-form input.ok { border-color: var(--green); background: #E7F4EA; }
.d10-form input.no { border-color: var(--nova-red); background: var(--nova-pink); }
.d10-fb { min-height: 1.4em; font-weight: 700; color: var(--nova-red); }
.d10-pad { grid-template-columns: repeat(3, 1fr); }
.d10-list { text-align: left; max-width: 520px; margin: 16px auto; padding-left: 1.4em; display: grid; gap: 4px; }
.d10-list li.ok b { color: var(--green); } .d10-list li.no b { color: var(--nova-red); }
.d10-sharebox { max-width: 560px; margin: 0 auto 16px; text-align: left; display: grid; gap: 6px; }
.d10-sharebox div { display: flex; gap: 8px; }
.d10-sharebox input { flex: 1; min-width: 0; font: inherit; font-size: .85rem; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }

/* ---------- speed game ---------- */
.sp-topics { max-width: 620px; margin: 0 auto 12px; grid-template-columns: repeat(3, 1fr); }
.sp-tables { justify-content: center; margin-bottom: 12px; }
.sp-q { font-size: clamp(2.2rem, 8vw, 3.8rem); font-weight: 800; color: var(--forest); margin: 6px 0 18px; min-height: 1.3em; }
.sp-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
.sp-btns button { font: 800 1.5rem var(--sans); padding: 16px 0; border-radius: 16px; border: 3px solid var(--line); background: #fff; color: var(--forest); cursor: pointer; transition: transform .08s; }
.sp-btns button:hover { border-color: var(--green); }
.sp-btns button:active { transform: scale(.94); }
.sp-btns button.ok { background: var(--green); color: #fff; border-color: var(--green); }
.sp-btns button.no { background: var(--nova-pink); border-color: var(--nova-red); animation: sp-shake .3s; }
@keyframes sp-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.mtc-timer i.low { background: var(--nova-red); }
@media (max-width: 520px) { .sp-btns { grid-template-columns: repeat(3, 1fr); } .sp-topics { grid-template-columns: repeat(2, 1fr); } }

/* ---------- spelling test ---------- */
.st-lists { max-width: 640px; margin: 0 auto 16px; grid-template-columns: repeat(5, 1fr); }
.st-count { max-width: 420px; margin: 0 auto; }
.st textarea { width: 100%; max-width: 520px; font: inherit; padding: 10px; border: 1px solid #B8C7BD; border-radius: 10px; }
.st-msg { color: var(--nova-red); font-weight: 600; }
.st-hear { font-size: 1.3rem; padding: 18px 30px; margin: 18px 0 8px; }
.st-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; text-align: left; margin: 16px 0; }
.st-list li { padding: 6px 10px; border-radius: 8px; }
.st-list li.ok { background: #E7F4EA; } .st-list li.no { background: var(--nova-pink); }
.st-list s { color: var(--nova-red); }
@media (max-width: 600px) { .st-lists { grid-template-columns: repeat(3, 1fr); } }
@media print {
  .mtc-pr-h { font: 700 18pt var(--sans); color: #06301C; margin: 2mm 0; }
  .mtc-pr-meta { display: flex; gap: 8mm; font-size: 10pt; margin-bottom: 3mm; }
  .mtc-pr-score { font: 800 30pt var(--sans); color: #06301C; margin: 2mm 0 4mm; }
  .mtc-pr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .mtc-pr { width: 100%; border-collapse: collapse; font-size: 10pt; }
  .mtc-pr th { background: #06301C; color: #fff; padding: 1.5mm; font-size: 8.5pt; }
  .mtc-pr td { border: .25mm solid #9FB3A6; padding: 1.6mm 2mm; text-align: center; }
  .mtc-pr tr.mtc-pr-no td { background: #FFF0F3; }
  .mtc-pr-tip { margin-top: 6mm; padding: 3mm; border: .5mm solid #C9A24A; background: #FBF5E3; border-radius: 2mm; font-size: 10.5pt; }
}

/* ---------- telling the time ---------- */
.ck-levels { max-width: 640px; margin: 0 auto 16px; grid-template-columns: repeat(5, 1fr); }
.ck-clock { width: min(280px, 70vw); margin: 10px auto 18px; }
.ck-face { width: 100%; height: auto; display: block; }
.ck-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 560px; margin: 0 auto; }
.ck-opts button { font: 700 1.1rem var(--sans); padding: 14px 10px; border-radius: 14px; border: 3px solid var(--line); background: #fff; color: var(--forest); cursor: pointer; display: grid; gap: 2px; }
.ck-opts button small { font-size: .85rem; color: var(--muted); }
.ck-opts button.ok { background: var(--green); color: #fff; border-color: var(--green); } .ck-opts button.ok small { color: #e7f4ea; }
.ck-opts button.no { background: var(--nova-pink); border-color: var(--nova-red); }
@media (max-width: 600px) { .ck-levels { grid-template-columns: repeat(2, 1fr); } }

/* ---------- fraction wall ---------- */
.fw-wall { display: grid; gap: 6px; max-width: 900px; margin: 0 auto; }
.fw-row { display: grid; grid-template-columns: 1fr 56px; gap: 8px; align-items: center; }
.fw-cells { display: grid; gap: 3px; }
.fw-cells button { height: 44px; border: 2px solid #06301C; background: #fff; border-radius: 6px; font: 700 clamp(.6rem, 1.6vw, .9rem) var(--sans); color: var(--forest); cursor: pointer; padding: 0; }
.fw-count { font: 800 1.1rem var(--sans); }
.fw-say { text-align: center; font-weight: 700; font-size: 1.1rem; min-height: 1.5em; margin: 14px 0; color: var(--forest); }
.fq-cmp { grid-template-columns: 1fr 1fr; max-width: 360px; }
@media print { .fw-cells button { height: 16mm; } .fw-row { grid-template-columns: 1fr 14mm; } .fw-wall { max-width: none; width: 190mm; } }

/* ---------- certificate + tracker ---------- */
.cert-input { width: 100%; font: 700 1.05rem var(--sans); padding: 10px 12px; border: 1px solid #B8C7BD; border-radius: 10px; }
.sheet.cert { padding: 10mm; }
.cert-in { flex: 1; border: 3mm double #C9A24A; border-radius: 6mm; outline: 1mm solid #06301C; outline-offset: -6mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14mm 12mm; background: radial-gradient(circle at 50% 20%, #FFFDF5, #FBF5E3); }
.cert-logo { width: 22mm; }
.cert-kick { letter-spacing: .3em; font: 700 10pt var(--sans); color: #8A6517; margin: 3mm 0; }
.cert-title { font: 700 40pt/1.05 'Cormorant Garamond', Georgia, serif; color: #06301C; margin: 2mm 0 8mm; }
.cert-to { font-size: 13pt; margin: 0; }
.cert-name { font: 700 30pt 'Cormorant Garamond', Georgia, serif; color: #C2414B; border-bottom: .6mm solid #C9A24A; min-width: 120mm; padding: 4mm 6mm 2mm; margin: 4mm 0 8mm; }
.cert-for { font-size: 14pt; line-height: 1.5; margin: 0; }
.cert-for b { font-size: 18pt; color: #06301C; }
.cert-stars { font-size: 26pt; margin: 8mm 0; }
.cert-sign { display: flex; gap: 22mm; margin-top: 4mm; }
.cert-sign div { display: grid; justify-items: center; gap: 1mm; }
.cert-sign img { height: 20mm; }
.cert-sign .sig { font: italic 700 16pt 'Cormorant Garamond', Georgia, serif; color: #06301C; border-top: .4mm solid #06301C; padding-top: 1mm; min-width: 50mm; }
.cert-sign small { font-size: 8pt; color: #555; }
.cert-date { margin: 8mm 0 0; font-size: 11pt; }
.cert-foot { font-size: 8pt; color: #8A6517; margin: 2mm 0 0; }
.trk-t { width: 100%; border-collapse: collapse; margin-top: 4mm; }
.trk-t th, .trk-t td { border: .3mm solid #9FB3A6; text-align: center; font-size: 9pt; }
.trk-t tr:first-child th { background: #06301C; color: #fff; padding: 2mm 1mm; font-size: 8pt; }
.trk-t th { font: 800 14pt var(--sans); color: #06301C; background: #EEF4F0; width: 18mm; }
.trk-t td { height: 15mm; }
.trk-star { font-size: 20pt; color: #C9A24A; }

/* ---------- required practicals ---------- */
.rp-subj { max-width: 480px; margin: 0 auto; }
.rp-list { max-width: 860px; margin: 18px auto 0; display: grid; gap: 10px; }
.rp-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rp-card summary { cursor: pointer; padding: 14px 16px; display: flex; gap: 12px; align-items: center; font-size: 1.05rem; color: var(--forest); }
.rp-n { width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.rp-tag { margin-left: auto; font-size: .75rem; font-weight: 700; background: #DBEAFE; color: #1e3a8a; padding: 3px 8px; border-radius: 99px; }
.rp-body { padding: 0 18px 4px; font-size: .95rem; line-height: 1.55; }
.rp-body p { margin: 0 0 8px; }
.rp-ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 18px 16px; background: var(--hoot-cream); border-top: 1px solid var(--line); }
.rp-tick { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; cursor: pointer; }
.rp-tick input { width: 20px; height: 20px; accent-color: var(--green); }
@media print {
  .rp-pt { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
  .rp-pt th { background: #06301C; color: #fff; padding: 1.5mm; }
  .rp-pt td { border: .25mm solid #9FB3A6; padding: 1.5mm 2mm; vertical-align: top; }
  .rp-pt td:nth-child(n+3) { width: 16mm; }
}

/* ---------- GCSE timetable ---------- */
.tm-subjects { display: grid; gap: 6px; max-height: 340px; overflow: auto; padding-right: 4px; }
.tm-subj { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: .88rem; }
.tm-subj label { display: flex; gap: 6px; align-items: center; font-weight: 600; cursor: pointer; }
.tm-subj select { width: auto !important; padding: 4px 6px !important; font-size: .8rem !important; }
.tm-subj:not(.on) select { opacity: .35; }
.tm-add { display: flex; gap: 6px; margin-top: 8px; }
.tm-add input { flex: 1; min-width: 0; font: inherit; padding: 8px; border: 1px solid #B8C7BD; border-radius: 10px; }
.tm-l { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.tm-l input, .tm-l select { width: auto !important; font: inherit; padding: 6px 8px; border: 1px solid #B8C7BD; border-radius: 8px; }
.tm-t { width: 100%; border-collapse: collapse; margin-bottom: 5mm; table-layout: fixed; }
.tm-t th, .tm-t td { border: .25mm solid #9FB3A6; font-size: 8.5pt; padding: 1.4mm 2mm; height: 9.5mm; }
.tm-t tr:first-child th { background: #06301C; color: #fff; font-size: 8pt; }
.tm-t th { width: 26mm; text-align: left; background: #EEF4F0; color: #06301C; }
.tm-t th small { color: #555; font-weight: 500; }
.tm-t td { position: relative; font-weight: 600; }
.tm-tick { position: absolute; right: 1.5mm; top: 1mm; color: #555; }
.tm-off td, .tm-off th { opacity: .35; }
#tt-summary span { display: inline-block; padding: 2px 8px; border-radius: 99px; margin: 2px; font-size: .8rem; }
.tm-subj select { max-width: 112px; }
.tm-l input, .tm-l select { max-width: 150px; min-width: 0; }
.tm-add .btn { padding: 8px 14px; flex: none; }
.panel > div { min-width: 0; }
