@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/grandstander-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/grandstander-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/grandstander-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/grandstander-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/grandstander-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Grandstander';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/grandstander-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/lexend-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/lexend-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/lexend-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/lexend-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/lexend-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/lexend-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/lexend-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/lexend-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* © 2026 HPM Services (Pty) Ltd. All rights reserved. Proprietary, see LICENSE.txt. */
/* Layout: one centred column (max 760px), sky-paper ground, white question cards; the lark mascot anchors each screen. */
:root {
  --sky: #eaf2fb;
  --paper: #ffffff;
  --paper-2: #f4f8fd;
  --ink: #0a2c4e;
  --ink-2: #4c5a78;
  --line: #d3dfee;
  --sun: #fcac16;
  --sun-soft: #fff1cf;
  --sun-ink: #6b4300;
  --sea: #1864a8;
  --sea-soft: #e3ecfd;
  --leaf: #158a5c;
  --leaf-soft: #ddf5ea;
  --berry: #d8492a;
  --berry-soft: #fde6df;
  --lark: #049ee3;
  --lark-2: #1864a8;
  --belly: #ffffff;
  --plum: #7a4fc9;
  --bar0: #2763d6; --bar1: #ffb21f; --bar2: #158a5c; --bar3: #d8492a;
  --display: 'Grandstander', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --body: 'Lexend', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --shadow: 0 1px 0 rgba(22, 34, 61, 0.06), 0 8px 24px -12px rgba(22, 34, 61, 0.25);
  --q-size: 1.35rem;
  --key-h: 58px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #0e1830; --paper: #17243f; --paper-2: #1c2b4a; --ink: #edf2fb; --ink-2: #a9b7d2; --line: #2b3d60;
    --sun: #ffc247; --sun-soft: #3d3016; --sun-ink: #ffd88a; --sea: #77a6ff; --sea-soft: #1f3363;
    --leaf: #3fcf8e; --leaf-soft: #133a2b; --berry: #ff8466; --berry-soft: #4a2219;
    --lark: #2fb2ee; --lark-2: #4f8fd0; --belly: #eaf6ff; --plum: #b291f2;
    --bar0: #77a6ff; --bar1: #ffc247; --bar2: #3fcf8e; --bar3: #ff8466;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky: #0e1830; --paper: #17243f; --paper-2: #1c2b4a; --ink: #edf2fb; --ink-2: #a9b7d2; --line: #2b3d60;
  --sun: #ffc247; --sun-soft: #3d3016; --sun-ink: #ffd88a; --sea: #77a6ff; --sea-soft: #1f3363;
  --leaf: #3fcf8e; --leaf-soft: #133a2b; --berry: #ff8466; --berry-soft: #4a2219;
  --lark: #2fb2ee; --lark-2: #4f8fd0; --belly: #eaf6ff; --plum: #b291f2;
  --bar0: #77a6ff; --bar1: #ffc247; --bar2: #3fcf8e; --bar3: #ff8466;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { background: var(--sky); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
body.band-fp { --q-size: 1.6rem; --key-h: 64px; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0; }
.app { max-width: 760px; margin: 0 auto; padding-inline: 16px; padding-block: 12px 40px; display: flex; flex-direction: column; gap: 18px; }

/* top bar */
.bar { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.01em; background: none; border: 0; padding: 0; }
.brand .lark { width: 36px; height: 36px; }
.brand small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.7rem; color: var(--ink-2); letter-spacing: 0.02em; }
.spacer { flex: 1; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font-size: 0.85rem; }
.iconbtn svg { width: 20px; height: 20px; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); height: 44px; }
.lang button { border: 0; background: none; padding: 0 12px; font-weight: 600; font-size: 0.85rem; color: var(--ink-2); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* lark */
.lark .body { fill: var(--lark); } .lark .wing { fill: var(--lark-2); } .lark .belly { fill: var(--belly); }
.lark .beak { fill: var(--sun); } .lark .eye { fill: var(--ink); } .lark .shine { fill: #fff; } .lark .leg { stroke: var(--sun-ink); stroke-width: 3; stroke-linecap: round; fill: none; }
.lark .crest { fill: var(--lark-2); } .lark .cheek { fill: var(--berry); opacity: 0.35; }
.lark .happy-eye { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.bob { animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-2deg); } }
.hop { animation: hop 0.6s ease-out; transform-origin: 50% 90%; }
@keyframes hop { 0% { transform: translateY(0); } 35% { transform: translateY(-14px) rotate(-6deg); } 70% { transform: translateY(0) rotate(3deg); } 100% { transform: none; } }

/* hero / speech */
.hello { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 12px; }
.hello .lark { width: 96px; height: 96px; }
.bubble { position: relative; background: var(--paper); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.bubble::before { content: ''; position: absolute; left: -8px; bottom: 18px; width: 16px; height: 16px; background: var(--paper); transform: rotate(45deg); border-radius: 3px; }
.bubble h1 { font-size: 1.6rem; }
.bubble p { margin: 4px 0 0; color: var(--ink-2); }

/* stats chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.chip svg { width: 18px; height: 18px; }
.chip b { font-weight: 700; }

/* big actions */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action { text-align: left; border: 0; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); min-height: 112px; position: relative; overflow: hidden; }
.action h2 { font-size: 1.3rem; }
.action p { margin: 0; font-size: 0.85rem; opacity: 0.85; }
.action.mix { background: var(--sun); color: #2a1a00; }
.action.exam { background: var(--ink); color: var(--paper); }
.action .deco { position: absolute; right: -6px; bottom: -14px; font-family: var(--display); font-size: 4.6rem; opacity: 0.18; line-height: 1; pointer-events: none; }
@media (max-width: 420px) { .actions { grid-template-columns: 1fr; } .action { min-height: 92px; } }

/* topics */
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-h h2 { font-size: 1.2rem; }
.section-h span { font-size: 0.8rem; color: var(--ink-2); }
.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.topic { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; padding: 12px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); min-height: 76px; }
.topic:hover { border-color: var(--sea); }
.topic .ti { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.35rem; background: var(--sea-soft); color: var(--sea); }
.topic .ti svg { width: 24px; height: 24px; }
.topic .tn { font-weight: 600; font-size: 0.9rem; line-height: 1.25; min-width: 0; }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 15px; height: 15px; }
.stars .on { fill: var(--sun); stroke: var(--sun-ink); stroke-width: 1; }
.stars .off { fill: none; stroke: var(--line); stroke-width: 1.5; }
.topic:nth-child(4n+2) .ti { background: var(--sun-soft); color: var(--sun-ink); }
.topic:nth-child(4n+3) .ti { background: var(--leaf-soft); color: var(--leaf); }
.topic:nth-child(4n+4) .ti { background: var(--berry-soft); color: var(--berry); }

/* question */
.qtop { display: flex; align-items: center; gap: 10px; }
.progress { flex: 1; height: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--sun); border-radius: 999px; transition: width 0.3s; }
.qcount { font-size: 0.85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.qtopic { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qtext { font-family: var(--display); font-weight: 600; font-size: var(--q-size); line-height: 1.3; overflow-wrap: anywhere; }
.qvis { display: flex; justify-content: center; }
.qvis svg { width: 100%; max-width: 320px; height: auto; }
.qvis svg.clock { max-width: 230px; }
.qvis svg.dots { max-width: 280px; }
.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1; margin: 0 0.12em; font-variant-numeric: tabular-nums; }
.frac > span:first-child { border-bottom: 2px solid currentColor; padding: 0 0.15em 0.08em; }
.frac > span:last-child { padding: 0.08em 0.15em 0; }
.qtext .frac { font-size: 0.9em; }

/* svg visuals */
.vis .sh { fill: var(--sun); stroke: var(--ink); stroke-width: 2; }
.vis .un { fill: var(--paper-2); stroke: var(--ink); stroke-width: 2; }
.vis .face { fill: var(--paper-2); stroke: var(--ink); stroke-width: 4; }
.vis .tick { stroke: var(--ink-2); stroke-width: 1.5; } .vis .tick.big { stroke: var(--ink); stroke-width: 3; }
.vis .num { fill: var(--ink); font-family: var(--display); font-size: 17px; font-weight: 700; text-anchor: middle; }
.vis .hand { stroke: var(--ink); stroke-linecap: round; } .vis .hand.hour { stroke-width: 7; } .vis .hand.min { stroke-width: 4; stroke: var(--sea); }
.vis .pin { fill: var(--sun); stroke: var(--ink); stroke-width: 2; }
.vis .grid { stroke: var(--line); stroke-width: 1; } .vis .axis { stroke: var(--ink); stroke-width: 2; }
.vis .ax { fill: var(--ink-2); font-family: var(--body); font-size: 12px; } .vis .ax.lab { fill: var(--ink); font-size: 12.5px; }
.vis .bar.b0 { fill: var(--bar0); } .vis .bar.b1 { fill: var(--bar1); } .vis .bar.b2 { fill: var(--bar2); } .vis .bar.b3 { fill: var(--bar3); }
.vis .shape { fill: var(--sea-soft); stroke: var(--sea); stroke-width: 4; stroke-linejoin: round; }
.vis .shape.face2 { fill: var(--paper-2); } .vis .shape.face3 { fill: var(--line); }
.vis .lbl { fill: var(--ink); font-family: var(--body); font-size: 15px; font-weight: 600; }
.vis .dot { fill: var(--sun); stroke: var(--sun-ink); stroke-width: 1.5; }
.vis .ray { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; } .vis .arc { fill: none; stroke: var(--berry); stroke-width: 3; }
.vis .marble { stroke: var(--ink); stroke-width: 1.5; }
.vis .m-red { fill: #e2483d; } .vis .m-blue { fill: #2f6fe0; } .vis .m-green { fill: #22a065; } .vis .m-yellow { fill: #f6c21c; }

/* answers */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { min-height: 64px; padding: 10px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper-2); font-family: var(--display); font-weight: 600; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; text-align: center; overflow-wrap: anywhere; }
body.band-fp .choice { min-height: 76px; font-size: 1.4rem; }
.choice:hover:not(:disabled) { border-color: var(--sea); }
.choice.sel { border-color: var(--sea); background: var(--sea-soft); }
.choice.right { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }
.choice.wrong { border-color: var(--berry); background: var(--berry-soft); color: var(--berry); text-decoration: line-through; }
.choice:disabled:not(.right):not(.wrong) { opacity: 0.55; }
.answerbox { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 2rem; min-height: 72px; border-radius: 14px; border: 2px dashed var(--line); background: var(--paper-2); padding: 8px 14px; font-variant-numeric: tabular-nums; }
.answerbox.filled { border-style: solid; border-color: var(--sea); }
.answerbox .ph { color: var(--ink-2); font-weight: 500; font-size: 1rem; font-family: var(--body); }
.answerbox .unit { color: var(--ink-2); font-size: 1.3rem; }
.answerbox .caret { width: 3px; height: 1.1em; background: var(--sea); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.fracbox { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.fracbox button { min-width: 84px; height: 54px; border-radius: 10px; border: 2px solid var(--line); background: var(--paper); font-family: var(--display); font-weight: 700; font-size: 1.6rem; }
.fracbox button.on { border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-soft); }
.fracbox hr { width: 100%; border: 0; border-top: 3px solid var(--ink); margin: 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key { height: var(--key-h); border-radius: 14px; border: 1px solid var(--line); background: var(--paper); font-family: var(--display); font-weight: 700; font-size: 1.5rem; box-shadow: 0 2px 0 var(--line); }
.key:active { transform: translateY(2px); box-shadow: none; }
.key.fn { font-size: 1rem; color: var(--ink-2); }
.key svg { width: 24px; height: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; padding: 0 22px; border-radius: 14px; border: 0; font-family: var(--display); font-weight: 700; font-size: 1.15rem; background: var(--sea); color: #fff; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.btn:disabled { opacity: 0.45; }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.go { background: var(--leaf); }
.btn.sun { background: var(--sun); color: #2a1a00; }
.btn.danger { background: var(--berry); }
.btn.wide { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1; }

/* feedback */
.fb { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.fb.ok { background: var(--leaf-soft); }
.fb.no { background: var(--berry-soft); }
.fb.show { background: var(--sun-soft); }
.fb h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
.fb.ok h3 { color: var(--leaf); } .fb.no h3 { color: var(--berry); } .fb.show h3 { color: var(--sun-ink); }
.fb p { margin: 0; }
.steps { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }
.steps li::marker { color: var(--ink-2); font-weight: 600; }
.plus { font-family: var(--display); font-weight: 700; color: var(--sun-ink); background: var(--sun); border-radius: 999px; padding: 2px 10px; font-size: 0.9rem; }

/* summary / results */
.result { text-align: center; align-items: center; }
.result .lark { width: 120px; height: 120px; }
.big { font-family: var(--display); font-weight: 700; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.level { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 18px; border-radius: 14px; background: var(--sea-soft); color: var(--sea); }
.level b { font-family: var(--display); font-size: 1.3rem; }
.level span { font-size: 0.8rem; }
.list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; width: 100%; text-align: left; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--paper-2); }
.list li > :first-child { flex: 1; min-width: 0; }

/* test nav */
.qnav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.qnav button { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.qnav button.done { background: var(--sea-soft); border-color: var(--sea); color: var(--sea); font-weight: 600; }
.qnav button.cur { outline: 3px solid var(--sun); outline-offset: 1px; }
.timer { font-variant-numeric: tabular-nums; font-size: 0.85rem; color: var(--ink-2); }
.review { display: flex; flex-direction: column; gap: 10px; width: 100%; text-align: left; }
.rv { border-radius: 14px; border: 1px solid var(--line); background: var(--paper); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rv.ok { border-left: 6px solid var(--leaf); } .rv.no { border-left: 6px solid var(--berry); }
.rv .rq { font-weight: 600; overflow-wrap: anywhere; }
.rv .ra { font-size: 0.9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.rv .ra b { color: var(--ink); }
.rv .qvis svg { max-width: 200px; }
details summary { cursor: pointer; color: var(--sea); font-weight: 600; font-size: 0.9rem; }

/* profiles */
.kids { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.kid { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--paper); border: 2px solid transparent; box-shadow: var(--shadow); text-align: left; }
.kid:hover { border-color: var(--sea); }
.kid .lark { width: 64px; height: 64px; flex: none; }
.kid h2 { font-size: 1.35rem; overflow-wrap: anywhere; }
.kid p { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.kid.add { border: 2px dashed var(--line); box-shadow: none; background: transparent; justify-content: center; min-height: 92px; font-weight: 600; color: var(--ink-2); }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > .lbl { font-weight: 600; font-size: 0.9rem; }
.field input[type="text"], .field input[type="number"] { height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 14px; font: inherit; font-size: 1.15rem; color: var(--ink); width: 100%; }
.field input:focus { border-color: var(--sea); outline: none; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-width: 52px; height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper); font-weight: 600; }
.seg button[aria-pressed="true"] { border-color: var(--sea); background: var(--sea-soft); color: var(--sea); }
.seg button:disabled { opacity: 0.45; }
.seg .soon { font-size: 0.65rem; display: block; font-weight: 400; line-height: 1; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 48px; height: 48px; border-radius: 50%; border: 3px solid transparent; padding: 4px; background: var(--paper); }
.swatches button[aria-pressed="true"] { border-color: var(--ink); }
.swatches svg { width: 100%; height: 100%; }
.hint { font-size: 0.8rem; color: var(--ink-2); margin: 0; }
.note { font-size: 0.85rem; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; }

/* parent report */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { background: var(--paper); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }
.tile b { display: block; font-family: var(--display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.tile span { font-size: 0.8rem; color: var(--ink-2); }
.tablewrap { overflow-x: auto; background: var(--paper); border-radius: 14px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
.meter { width: 90px; height: 8px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; display: inline-block; vertical-align: middle; }
.meter i { display: block; height: 100%; background: var(--sea); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pill.good { background: var(--leaf-soft); color: var(--leaf); } .pill.mid { background: var(--sun-soft); color: var(--sun-ink); } .pill.low { background: var(--berry-soft); color: var(--berry); } .pill.none { background: var(--paper-2); color: var(--ink-2); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.confirm { border: 2px solid var(--berry); background: var(--berry-soft); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 0.9rem; max-width: calc(100% - 32px); z-index: 50; box-shadow: var(--shadow); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  .bob, .hop, .answerbox .caret { animation: none; }
  .progress i { transition: none; }
}

/* fixes after phone/desktop test pass */
.topic .tn { hyphens: auto; -webkit-hyphens: auto; }
.topic .ti { font-family: var(--body); font-size: 1.45rem; }
.keypad, .card > .btn.wide[data-act="check"] { width: 100%; max-width: 440px; align-self: center; }
.rv .qvis svg, .rv .qvis svg.dots, .rv .qvis svg.clock { max-width: 150px; max-height: 160px; }
@media (max-width: 520px) {
  .brand small { display: none; }
  .brand { font-size: 1.15rem; gap: 6px; }
  .bar { gap: 6px; }
  .iconbtn { min-width: 40px; padding: 0 8px; }
  .lang button { padding: 0 10px; }
  td .meter, td .stars { display: none; }
  th, td { padding: 9px 8px; }
}

/* CAPS content-area grouping */
.area { display: flex; flex-direction: column; gap: 10px; }
.area h3 { font-family: var(--body); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); font-weight: 600; }
.topic.soon { opacity: 0.55; border-style: dashed; background: transparent; cursor: default; }
.topic.soon:hover { border-color: var(--line); }
.tmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.term { font-size: 0.7rem; color: var(--ink-2); font-weight: 600; letter-spacing: 0.02em; }
.mbar { flex: 1; min-width: 40px; height: 6px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); overflow: hidden; }
.mbar i { display: block; height: 100%; background: var(--leaf); }

/* Intermediate (Gr 4-7) and Senior (Gr 8+): calmer, more grown-up look */
body.band-ip, body.band-sp { --display: 'Lexend', 'Segoe UI', system-ui, sans-serif; --radius: 12px; --q-size: 1.25rem; --key-h: 54px; }
body.band-ip h1, body.band-sp h1, body.band-ip h2, body.band-sp h2 { font-weight: 600; letter-spacing: -0.01em; }
body.band-ip .hello, body.band-sp .hello { grid-template-columns: auto 1fr; align-items: center; }
body.band-ip .hello .lark, body.band-sp .hello .lark { width: 52px; height: 52px; }
body.band-ip .bubble, body.band-sp .bubble { background: none; box-shadow: none; padding: 0; }
body.band-ip .bubble::before, body.band-sp .bubble::before { display: none; }
body.band-ip .bubble h1, body.band-sp .bubble h1 { font-size: 1.45rem; }
body.band-ip .action, body.band-sp .action { min-height: 88px; }
body.band-ip .action .deco, body.band-sp .action .deco { display: none; }
body.band-ip .topics, body.band-sp .topics { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
body.band-ip .topic, body.band-sp .topic { min-height: 64px; border-radius: 10px; padding: 10px 12px; grid-template-columns: 36px 1fr; }
body.band-ip .topic .ti, body.band-sp .topic .ti { width: 36px; height: 36px; border-radius: 8px; font-size: 1.05rem; }
body.band-ip .topic .ti svg, body.band-sp .topic .ti svg { width: 20px; height: 20px; }
body.band-ip .topic .tn, body.band-sp .topic .tn { font-weight: 500; font-size: 0.88rem; }
body.band-ip .choice, body.band-sp .choice { font-family: var(--body); font-weight: 500; font-size: 1.05rem; min-height: 56px; border-radius: 10px; }
body.band-ip .btn, body.band-sp .btn { font-family: var(--body); font-weight: 600; font-size: 1rem; height: 50px; border-radius: 10px; }
body.band-ip .key, body.band-sp .key { font-family: var(--body); font-weight: 500; font-size: 1.3rem; border-radius: 10px; }
body.band-ip .answerbox, body.band-sp .answerbox { font-family: var(--body); font-weight: 600; font-size: 1.6rem; border-radius: 10px; }
body.band-ip .fb h3, body.band-sp .fb h3 { font-family: var(--body); font-weight: 600; font-size: 1.05rem; }
body.band-ip .qtext, body.band-sp .qtext { font-weight: 500; }
body.band-ip .vis .num, body.band-sp .vis .num { font-family: var(--body); font-weight: 600; }
body.band-ip .result .lark, body.band-sp .result .lark { width: 64px; height: 64px; }
/* Senior Phase: dark, sleek by default with a cool accent */
body.band-sp { --sky: #0d1322; --paper: #151d31; --paper-2: #1b2540; --ink: #e9eef8; --ink-2: #9aa8c3; --line: #29355a; --sea: #5ea0ff; --sea-soft: #1a2c55; --sun: #ffb21f; --sun-soft: #352914; --sun-ink: #ffd27a; --leaf: #3fd193; --leaf-soft: #12382a; --berry: #ff7d63; --berry-soft: #43211b; color-scheme: dark; }
body.band-sp .action.mix { background: var(--sea); color: #06122b; }
body.band-sp .action.exam { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); }
body.band-fp .topic .tn { overflow-wrap: anywhere; }

/* topic page, methods and lessons */
.eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); font-weight: 600; }
.topichead { gap: 10px; }
.topichead h1 { font-size: 1.5rem; }
.methods .method { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; padding: 0; font-weight: 600; }
.methods .method > span:nth-child(2) { flex: 1; min-width: 0; }
.methods li { padding: 0; } .methods .method { padding: 12px; }
.mi { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); font-weight: 700; flex: none; }
.arrow { color: var(--sea); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
.lessonh { font-size: 1.4rem; }
.introlist { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; font-size: 1.05rem; }
.nextask { background: var(--sea-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 1.05rem; }
.working { display: flex; flex-direction: column; gap: 6px; background: var(--paper-2); border-radius: 12px; padding: 12px 14px; }
.working li.shown { color: var(--sun-ink); }
.gridwrap { display: flex; justify-content: center; overflow-x: auto; }
.cols { display: grid; grid-template-columns: repeat(var(--w), 2.1rem); font-family: var(--body); font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 600; row-gap: 2px; }
.cc { text-align: center; height: 2.2rem; line-height: 2.2rem; }
.cc.mark { font-size: 0.85rem; color: var(--berry); height: 1.2rem; line-height: 1.2rem; font-weight: 700; }
.cc.op { color: var(--ink-2); }
.cc.res { color: var(--leaf); }
.cc.blank::after { content: ''; display: inline-block; width: 1.2rem; height: 1.6rem; border-bottom: 2px dashed var(--line); vertical-align: middle; }
.cline { border-top: 2px solid var(--ink); height: 0; }
/* test scope */
.scopecard { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--sea); background: var(--sea-soft); }
.scopecard > span:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scopecard b { font-size: 1.1rem; overflow-wrap: anywhere; }
.scopecard small { color: var(--ink-2); font-size: 0.82rem; }
.scopecard.empty { border-style: dashed; background: var(--paper); border-color: var(--line); }
.scopegrp { border: 0; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.scopegrp legend { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--sea); flex: none; }
.check small { color: var(--ink-2); }
.field input[type="date"] { height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 14px; font: inherit; color: var(--ink); width: 100%; }
.topic { position: relative; }
.topic.inscope { border-color: var(--sea); border-width: 2px; }
.badge { position: absolute; top: -9px; right: 10px; background: var(--sea); color: #fff; font-size: 0.65rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; letter-spacing: 0.03em; }

/* demo and teacher review versions */
.fbbtn span { font-weight: 600; }
@media (max-width: 520px) { .fbbtn span { display: none; } }
.linkbtn { align-self: flex-start; background: none; border: 0; padding: 6px 0; color: var(--ink-2); font: inherit; font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.linkbtn:hover { color: var(--sea); }
a.btn { text-decoration: none; }
.demobar { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 16px; border-radius: var(--radius); border: 2px dashed var(--sun); background: var(--sun-soft); color: var(--ink); font-size: 0.88rem; }
.demobar > span:first-child { flex: 1; min-width: 0; }
.demobar .arrow { font-weight: 600; white-space: nowrap; color: var(--sun-ink); }
.introbtns { display: flex; flex-direction: column; gap: 10px; }
.field textarea, .field select { border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 10px 14px; font: inherit; color: var(--ink); width: 100%; }
.field select { height: 52px; padding: 0 12px; }
.field textarea:focus, .field select:focus { border-color: var(--sea); outline: none; }
.field input[hidden], .mrow input[hidden] { display: none; }
details.field > summary { cursor: pointer; padding: 10px 0; }
.mlist { display: flex; flex-direction: column; gap: 12px; }
.mrow { display: flex; flex-direction: column; gap: 6px; }
.mrow label { font-size: 0.85rem; color: var(--ink-2); }
.mrow select, .mrow input { height: 46px; border-radius: 10px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 10px; font: inherit; font-size: 0.95rem; color: var(--ink); width: 100%; }
.revcard .revtop { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.revcard .row { flex-wrap: wrap; }
.review .seg button { height: 42px; font-size: 0.88rem; }
.badge.good { background: var(--leaf); }
.note.ctx { font-size: 0.8rem; overflow-wrap: anywhere; }
.codebox { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: var(--sea-soft); }
.codebox b { font-size: 1.6rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
#fbtext { width: 100%; margin-top: 8px; font: 0.8rem/1.45 ui-monospace, Menlo, Consolas, monospace; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); padding: 10px; }
@media (max-width: 440px) { .bar:has(.fbbtn) .brand > span { display: none; } }
@media (max-width: 520px) { .revcard .row > .btn { flex: 1 1 100%; } }

/* subjects */
.subjtabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: thin; }
.subjtabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 0.9rem; color: var(--ink); white-space: nowrap; }
.subjtabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.subjtabs .si { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--sea-soft); color: var(--sea); font-size: 0.75rem; font-weight: 700; }
.subjtabs .si svg { width: 16px; height: 16px; }
.subjtabs button[aria-pressed="true"] .si { background: var(--sun); color: #2a1a00; }
.topic .ti svg { width: 24px; height: 24px; }
.passage { background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; text-align: left; font-family: var(--body); font-weight: 400; font-size: 0.98rem; line-height: 1.55; max-height: 46vh; overflow-y: auto; }
.passage summary { font-weight: 600; cursor: pointer; }
.passage p { margin: 8px 0 0; }
.qvis:has(.passage) { display: block; }
.textans { width: 100%; height: 60px; border-radius: 14px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 16px; font: inherit; font-size: 1.3rem; font-weight: 600; color: var(--ink); text-align: center; }
.textans:focus { border-color: var(--sea); outline: none; }
.textans:disabled { opacity: 0.8; }
.recap .introlist { font-size: 1rem; }
tr.subjrow th { text-align: left; padding-top: 18px; font-size: 0.78rem; color: var(--ink); }

/* explain in my language */
.xlbox { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); }
.xlbox[hidden] { display: none; }
.xlbox .lbl { font-weight: 600; font-size: 0.85rem; }
.xlseg button { height: 38px; min-width: 0; padding: 0 12px; font-size: 0.85rem; }
.xlout { white-space: pre-line; font-size: 1rem; line-height: 1.55; }
.xlout:empty { display: none; }
.xlout.busy { color: var(--ink-2); font-style: italic; }
.xlout small { display: block; margin-top: 8px; font-size: 0.75rem; color: var(--ink-2); font-style: normal; }
.xlbtn[hidden] { display: none; }

/* "Understand it first" */
.subjtabs { flex-wrap: wrap; overflow-x: visible; }
.basicscard { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--leaf); background: var(--leaf-soft); color: var(--ink); }
.basicscard > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.basicscard b { font-size: 1.1rem; }
.basicscard small { color: var(--ink-2); font-size: 0.85rem; }
.basicscard .bi { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: #fff; font-weight: 700; font-size: 1.3rem; flex: none; }
.basicscard .arrow { color: var(--leaf); font-size: 1.4rem; }
.basics { gap: 12px; }
.basics p { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.basics .bh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.basics h2 { font-size: 1.2rem; }
.words { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.words > div { padding: 12px 14px; border-radius: 12px; background: var(--paper-2); border-left: 5px solid var(--sea); }
.words dt { font-weight: 700; font-size: 1.1rem; color: var(--sea); }
.words dd { margin: 4px 0 0; line-height: 1.55; }
.wex { display: block; margin-top: 6px; color: var(--ink-2); font-size: 0.95rem; }
p.wex { margin-top: 0; }
.rules { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 14px; }
.rules li > b { font-size: 1.05rem; }
.rules p { margin-top: 4px; font-size: 1rem; }
.tag { font-weight: 700; color: var(--sun-ink); background: var(--sun-soft); border-radius: 6px; padding: 0 6px; font-size: 0.85rem; }
.basics.helper summary { font-family: var(--display); font-weight: 600; font-size: 1.1rem; color: var(--ink); }
.bq { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.bq + .bq { border-top: 1px solid var(--line); padding-top: 14px; }
.bqq { font-size: 1.05rem; }
.basics .choice { font-size: 1rem; font-family: var(--body); font-weight: 500; min-height: 52px; }
.gw { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted var(--sea) 2px; text-underline-offset: 4px; cursor: help; }
.gw:hover { color: var(--sea); }
.gloss { position: fixed; inset: 0; z-index: 60; background: rgba(10, 18, 36, 0.35); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.gcard { width: 100%; max-width: 520px; background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 10px; margin-bottom: env(safe-area-inset-bottom, 0px); }
.gcard .bh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gcard h3 { font-size: 1.3rem; color: var(--sea); }
.gcard p { margin: 0; line-height: 1.55; }
@media (min-width: 700px) { .gloss { align-items: center; } }

/* help, FAQ, terms, consent, offline */
.searchin { height: 50px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 14px; font: inherit; font-size: 1rem; color: var(--ink); width: 100%; }
.searchin:focus { border-color: var(--sea); outline: none; }
.hublinks { display: flex; flex-wrap: wrap; gap: 8px; }
.hublinks .btn { flex: 1 1 180px; height: 48px; font-size: 0.95rem; }
.hublinks .btn svg { width: 18px; height: 18px; }
.helplist { gap: 8px; }
.hitem { border-radius: 12px; background: var(--paper-2); padding: 0 14px; }
.hitem summary { padding: 12px 0; color: var(--ink); font-size: 1rem; }
.hitem[open] { padding-bottom: 12px; }
.hitem p { margin: 0; line-height: 1.55; }
.hitem .introlist { font-size: 1rem; }
.legal h1 { font-size: 1.5rem; }
.legalsec h2 { font-size: 1.05rem; margin-top: 6px; }
.legalsec p { margin: 6px 0 0; line-height: 1.55; font-size: 0.95rem; }
.legalbox { border-radius: 12px; background: var(--paper-2); padding: 0 14px; max-height: none; }
.legalbox summary { padding: 12px 0; }
.legalbox[open] { padding-bottom: 12px; max-height: 50vh; overflow-y: auto; }
.consents { display: flex; flex-direction: column; gap: 8px; }
.consents .check { align-items: flex-start; }
.consents .check span { line-height: 1.45; }
.offbar { position: fixed; left: 50%; top: calc(8px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 45; background: var(--ink); color: var(--paper); font-size: 0.8rem; padding: 6px 14px; border-radius: 999px; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center; }
.offbar[hidden] { display: none; }

/* brand: logo mark and two-colour wordmark (from the BrightLark logo) */
.brand .bmark { width: 38px; height: 38px; object-fit: contain; flex: none; }
.brand .wm { font-weight: 700; }
.wb { color: var(--ink); } .wl { color: var(--sun); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wl { color: var(--sun); } }
.hello .heromark { width: 104px; height: auto; align-self: center; }
body.band-ip .hello .heromark, body.band-sp .hello .heromark { width: 64px; }

/* teacher tools: plans, books, study material, search */
.tools h2 { margin: 0; }
.toolgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.tool { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper-2); color: var(--ink); min-height: 84px; }
.tool b { font-family: var(--display); font-size: 1.05rem; }
.tool small { color: var(--ink-2); font-size: 0.82rem; line-height: 1.35; }
.tool:hover { border-color: var(--sea); }
.plist li { padding: 0; }
.plist .method { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: none; border: 0; padding: 12px; color: var(--ink); font-weight: 600; }
.plist .method > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.plist small { font-weight: 400; }
.lessonbox { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 12px; background: var(--paper-2); }
.lessonbox legend { font-weight: 700; padding: 0 6px; }
.lessonbox .field textarea, .lessonbox .field select, .lessonbox .field input[type="text"] { background: var(--paper); }
.row2 { display: grid; grid-template-columns: auto minmax(100px, 160px); gap: 12px; align-items: end; }
.filebtn { position: relative; cursor: pointer; text-align: center; }
.field input[type="file"] { font: inherit; font-size: 0.9rem; max-width: 100%; }
.mattext { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.85rem; max-height: 320px; overflow: auto; background: var(--paper-2); border-radius: 10px; padding: 10px; margin: 8px 0 0; }
.breakall { overflow-wrap: anywhere; }
.schoolm summary { cursor: pointer; }
.schoolm summary small { display: block; margin-top: 2px; }
.schoolm .steps { margin: 10px 0; padding-left: 22px; }
.schoolm h3 { font-size: 1rem; margin: 12px 0 6px; }
.srch mark { background: var(--sun-soft, #fde7b8); color: inherit; border-radius: 3px; padding: 0 2px; }
@media (max-width: 380px) { .toolgrid { grid-template-columns: minmax(0, 1fr); } .row2 { grid-template-columns: minmax(0, 1fr); } }
.form > textarea { border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 10px 14px; font: inherit; color: var(--ink); width: 100%; }
.planbtns > .btn { min-width: 140px; }
.row2 .seg { flex-wrap: nowrap; }
.hwlist .hwitem { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px; background: var(--paper); border: 1px solid var(--line); }
.hwitem b { display: block; font-size: 1.05rem; margin-top: 2px; }
.hwitem p { margin: 6px 0 0; overflow-wrap: anywhere; }
.hwitem.done { opacity: 0.7; }
.hwitem.done b { text-decoration: line-through; }
.hwbar { border-style: solid; border-color: var(--sea); background: var(--sea-soft); }
.seg.wrap { flex-wrap: wrap; }
.field input[type="date"] { height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 14px; font: inherit; color: var(--ink); width: 100%; }
#hwmsg, #hwpaste { border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 10px 14px; font: inherit; font-size: 0.9rem; color: var(--ink); width: 100%; }
.row > input[type="text"] { flex: 1; min-width: 0; height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 12px; font: inherit; color: var(--ink); }
/* keep both language buttons visible on narrow phones */
.bar { min-width: 0; }
.bar .lang, .bar .iconbtn { flex: none; }
@media (max-width: 440px) { .bar:has([data-act="sound"]):has([data-act="help"]) .brand > span { display: none; } .bar { gap: 8px; } }
.tablewrap { overflow-x: auto; margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; }
.stafft { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.stafft th, .stafft td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.stafft th { background: var(--paper-2); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-2); }
.stafft tr:last-child td { border-bottom: 0; }
.signedas { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 8px 0 0; font-size: 0.85rem; color: var(--ink-2); }
.field input[type="email"] { height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 14px; font: inherit; font-size: 1.1rem; color: var(--ink); width: 100%; }
#jpaste, #stmsg { border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 10px 14px; font: inherit; font-size: 0.9rem; color: var(--ink); width: 100%; }
.stafft th { white-space: nowrap; }
.codepill { display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--sun-soft); font-family: ui-monospace, monospace; letter-spacing: 0.04em; }
.field input[inputmode="numeric"] { height: 52px; border-radius: 12px; border: 2px solid var(--line); background: var(--paper-2); padding: 0 14px; font: inherit; font-size: 1.4rem; letter-spacing: 0.3em; color: var(--ink); width: 100%; }
.stafft td:nth-child(2) { white-space: nowrap; }

/* class calendar, reminders and term plan */
.cal .calhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal .calhead h2 { margin: 0; text-transform: capitalize; font-size: 1.1rem; }
.cgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cwd { text-align: center; font-size: 0.75rem; color: var(--ink-2); font-weight: 600; padding: 2px 0; }
.cday { min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 4px 0; font-weight: 600; color: var(--ink); }
.cday.empty { border: 0; background: none; }
.cday.today { border-color: var(--sun); }
.cday[aria-pressed="true"] { border-color: var(--sea); background: var(--sea-soft); color: var(--sea); }
.cday .dots { display: flex; gap: 2px; margin-top: 4px; min-height: 8px; flex-wrap: wrap; justify-content: center; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); vertical-align: 1px; }
.dot.k-hw, .dot.k-assign, .dot.k-project { background: var(--sea); }
.dot.k-test { background: var(--berry); }
.dot.k-reading, .dot.k-poem, .dot.k-oral { background: var(--sun); }
.dot.k-other { background: var(--ink-2); }
.dot[class*="k-ev-"] { background: var(--leaf); }
.dot.k-ev-holiday { background: var(--line); box-shadow: inset 0 0 0 1px var(--ink-2); }
.calkey { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 0.78rem; color: var(--ink-2); }
.calkey .dot { margin-right: 4px; }
.addkinds button { height: 40px; font-size: 0.85rem; }
.remind .remhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.remind .remhead h2 { margin: 0; }
.remlist li { padding: 8px 0; }
.remind h3 { margin: 10px 0 2px; font-size: 0.95rem; }
.atts { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 6px 0; }
.att { display: inline-flex; align-items: center; gap: 4px; }
.filebtn { cursor: pointer; }
table.weeks td { vertical-align: top; }
table.weeks td input { width: 100%; min-width: 0; }
table.weeks tr.now td { background: var(--sun-soft); }
details.imp { margin-top: 12px; }
details.imp summary { cursor: pointer; font-weight: 600; color: var(--sea); }
@media (max-width: 380px) { .cday { min-height: 42px; font-size: 0.85rem; } }

/* HPM Hub subscription: banner strip and the App Blocker */
.licbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #fff4c7; color: #4a3b00; font-size: 0.95rem; }
.licbar.bad { background: #fde3e1; color: #7a1d14; }
.licbar a { color: inherit; font-weight: 700; white-space: nowrap; }
.licblock h1 { margin-top: 0; }
.licblock .btn + .btn, .licblock .btn + h2, .licblock a.btn { margin-top: 10px; }

/* copyright footer on every screen */
footer.copy { margin: 28px 0 8px; text-align: center; font-size: 0.8rem; color: var(--ink-2); }
footer.copy .linkbtn { font-size: inherit; }

/* Responsive workspace pilot: desktop, landscape/portrait tablet, and phone. */
.app { width:100%; }
@media (min-width: 768px) {
  html[data-mode="teacher"] .app[data-view^="t"] { max-width: min(100%, 1320px); padding-inline: clamp(20px,3vw,44px); }
}
@media (min-width: 1100px) {
  html[data-mode="teacher"] .app[data-view^="t"] { max-width: min(100%, 1560px); }
}
.tablewrap { max-width:100%; min-width:0; overscroll-behavior-x:contain; }
.stafft th,.stafft td { overflow-wrap:break-word; word-break:normal; }
th { font-size:0.8rem; }
.pill { font-size:0.8rem; }
:root:not([data-theme="dark"]) .pill.good { color:#0b6240; }
:root:not([data-theme="dark"]) .pill.low { color:#a32c15; }
.licbar { background:var(--sun-soft); color:var(--sun-ink); }
.licbar.bad { background:var(--berry-soft); color:var(--berry); }
/* SVG-only, low-cost brand mascot micro-motion. */
.lark .wing { transform-box:fill-box; transform-origin:80% 55%; }
.lark .eye,.lark .shine { transform-box:fill-box; transform-origin:center; }
@media (prefers-reduced-motion:no-preference) {
  .brand .lark .wing { animation:bl-wing 7s ease-in-out infinite; }
  .brand .lark .eye,.brand .lark .shine { animation:bl-blink 9s ease-in-out infinite; }
}
@keyframes bl-wing { 0%,88%,100%{transform:rotate(0)} 92%{transform:rotate(-8deg)} 96%{transform:rotate(3deg)} }
@keyframes bl-blink { 0%,94%,97%,100%{transform:scaleY(1)} 95%{transform:scaleY(.12)} }
