/* MXL – Mastery eXperience Learning. One stylesheet, based on the original MXL site's look. */
:root {
  --navy: #07366B;
  --navy-2: #0B3D78;
  --ink: #10345F;
  --muted: #58749A;
  --line: #D8E7F4;
  --paper: #EAFBFF;
  --blue: #168EEA;
  --blue-dark: #0876C8;
  --teal: #28D8C4;
  --cyan: #28B9D5;
  --violet: #7657D5;
  --gold: #FFBD35;
  --green: #16A34A;
  --ok-bg: #E8FFF2; --ok-line: #58C98F;
  --bad-bg: #FFF0E9; --bad-line: #FF9D83;
  --warn-bg: #FFF7E0; --warn-line: #F1C14C;
  --cell-none: #EEF4FA; --cell-1: #FECACA; --cell-2: #FDE68A; --cell-3: #BEF264; --cell-4: #4ADE80; --cell-5: #15803D;
  --radius: 14px;
  --shadow: 0 4px 14px rgba(6, 53, 96, .07);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  /* every page except home: light blue sky with soft white clouds */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='700' viewBox='0 0 1200 700'%3E%3Cg fill='%23fff'%3E%3Cg opacity='.75'%3E%3Cellipse cx='150' cy='120' rx='90' ry='34'/%3E%3Cellipse cx='205' cy='100' rx='60' ry='42'/%3E%3Cellipse cx='110' cy='105' rx='45' ry='30'/%3E%3C/g%3E%3Cg opacity='.6'%3E%3Cellipse cx='760' cy='80' rx='110' ry='36'/%3E%3Cellipse cx='820' cy='58' rx='70' ry='46'/%3E%3Cellipse cx='715' cy='64' rx='50' ry='32'/%3E%3C/g%3E%3Cg opacity='.55'%3E%3Cellipse cx='1060' cy='330' rx='95' ry='32'/%3E%3Cellipse cx='1110' cy='312' rx='58' ry='38'/%3E%3C/g%3E%3Cg opacity='.5'%3E%3Cellipse cx='420' cy='420' rx='120' ry='36'/%3E%3Cellipse cx='480' cy='398' rx='70' ry='44'/%3E%3Cellipse cx='370' cy='404' rx='52' ry='30'/%3E%3C/g%3E%3Cg opacity='.45'%3E%3Cellipse cx='120' cy='600' rx='85' ry='28'/%3E%3Cellipse cx='165' cy='584' rx='52' ry='34'/%3E%3C/g%3E%3Cg opacity='.5'%3E%3Cellipse cx='880' cy='610' rx='100' ry='30'/%3E%3Cellipse cx='935' cy='592' rx='60' ry='38'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 0 0 / 1200px 700px repeat fixed,
    linear-gradient(180deg, #CDEEFF 0, #E2F5FF 50%, #EEF9FF 100%) fixed;
  min-height: 100vh;
}
a { color: var(--blue-dark); text-decoration: none; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(22px, 3vw, 28px); margin: .3rem 0 1rem; font-weight: 750; }
h2 { font-size: 20px; margin: 0 0 .7rem; font-weight: 750; }
h3 { font-size: 16px; margin: 0 0 .4rem; font-weight: 700; }
small, .muted { color: var(--muted); }
code { background: #EEF6FF; padding: 0 .3em; border-radius: 4px; }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid #9FC9F5; background: #EAF4FF; color: #064B91; padding: .55rem 1rem; border-radius: 9px; text-decoration: none;
}
button:disabled { opacity: .5; cursor: default; }
.primary { background: linear-gradient(135deg, #078CBA, #0860AD); border: 2px solid #8BD5EE; color: #fff; box-shadow: 0 4px 0 #C4E4F5; }
.primary:hover { filter: brightness(1.06); }
.gold { background: var(--gold); border-color: #F1A92B; color: #12365D; box-shadow: 0 4px 0 #F6DFA8; }
.ghost { background: #fff; }
.small { padding: .3rem .65rem; font-size: 13px; }
.wide { width: 100%; }
input, select, textarea {
  font: inherit; padding: .55rem .75rem; border: 2px solid #C6DDF2; border-radius: 10px; background: #fff; color: var(--ink); max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 13px; margin: .5rem 0; }
input.short { width: 5rem; }
label { display: block; margin: .55rem 0; font-weight: 600; }
label input, label select { display: block; width: 100%; margin-top: .3rem; font-weight: 400; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
label.check input { width: auto; margin: 0; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(105deg, #082B5A 0%, var(--navy-2) 60%, #082B5A 100%);
  border-bottom: 2px solid var(--cyan); box-shadow: 0 4px 15px rgba(6, 35, 76, .18);
}
.nav { width: min(1450px, calc(100% - 32px)); margin: 0 auto; min-height: 68px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brandmark {
  width: 43px; height: 43px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, #08BFC1, #087FD1); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 5px 16px #00B7BD55;
}
.brand b { display: block; font-size: 16px; font-weight: 750; line-height: 1.1; }
.brand small { display: block; color: #D4E8FF; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.home-search[hidden] { display: none; }
.home-search { display: flex; align-items: center; background: #fff; border: 1px solid #D7E7F5; border-radius: 999px; padding: 3px 3px 3px 14px; width: min(360px, 30vw); }
.home-search input { border: 0; padding: 6px 4px; flex: 1; min-width: 0; }
.home-search button { background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.navlinks { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.navbtn {
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .48); color: #fff; border-radius: 7px;
  padding: 7px 12px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.navbtn:hover { background: rgba(255, 255, 255, .2); }
.navbtn.active { background: #fff; color: var(--navy); }
.navbtn.primary { background: var(--blue); border-color: var(--blue); box-shadow: none; }
.navbtn.sub { background: #FFC94D; color: #082B5A; border-color: #FFC94D; }
.menu-toggle { display: none; margin-left: auto; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .48); color: #fff; padding: 8px 11px; }
.who { color: #fff; font-size: 13px; font-weight: 600; }
/* Explore Skills menu (IXL's Learning menu): opens on hover or keyboard focus */
.navdrop { position: relative; }
.mega { display: none; position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(760px, 92vw);
  grid-template-columns: repeat(3, 1fr); gap: 18px 26px; padding: 20px 24px; background: #fff; border-radius: 14px; border-top: 4px solid var(--cyan);
  box-shadow: 0 18px 40px rgba(6, 35, 76, .28); }
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -24px; height: 24px; } /* keeps the menu open while the mouse moves down to it */
.navdrop:hover .mega, .navdrop:focus-within .mega { display: grid; }
.mega-col { display: flex; flex-direction: column; gap: 6px; }
.mega-h { color: var(--navy); font-weight: 800; font-size: 15px; }
.mega-links { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #8AA2BC; }
.mega-links a, .mega-link { color: var(--blue-dark); font-size: 13px; font-weight: 600; }
.mega-links a:hover, .mega-link:hover, a.mega-h:hover { text-decoration: underline; }
@media (max-width: 860px) {
  .navdrop { width: 100%; }
  .mega { position: static; transform: none; width: 100%; grid-template-columns: repeat(2, 1fr); margin-top: 8px; box-shadow: none; }
  .navlinks.open .mega { display: grid; }
}
/* Subject pages: by class / by topic (IXL Maths page) */
.xp-hero { text-align: center; padding: 22px 18px 16px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(180deg, #E3F6FF, #fff); border: 1px solid #CFE6F7; }
.xp-hero h1 { color: #0B6FB8; font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 6px; }
.xp-hero p { max-width: 640px; margin: 0 auto 12px; color: #365879; }
.xp-subjects { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.xp-subjects a { padding: 6px 14px; border-radius: 999px; border: 2px solid #C6DDF2; background: #fff; color: var(--navy); font-weight: 700; font-size: 14px; }
.xp-subjects a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.xp-viewby { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #5B7894; }
.xp-viewby a { padding: 5px 14px; border-radius: 8px 8px 0 0; color: var(--blue-dark); font-weight: 700; border-bottom: 3px solid transparent; }
.xp-viewby a.active { background: #1EA7E1; color: #fff; border-bottom-color: #0B6FB8; }
.xp-list { display: flex; flex-direction: column; gap: 10px; max-width: 900px; margin: 0 auto; }
.xp-row { display: flex; align-items: stretch; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid #DCE8F3; box-shadow: 0 2px 6px rgba(15, 55, 95, .08); color: var(--ink); transition: transform .12s, box-shadow .12s; }
.xp-row:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 55, 95, .16); }
.xp-tab { flex: none; width: 46px; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 16px; }
.xp-list.topics .xp-tab { width: 10px; }
.xp-body { flex: 1; min-width: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.xp-body b { color: var(--c); font-size: 17px; }
.xp-body small { color: #4A6782; font-size: 12.5px; line-height: 1.45; }
.xp-body small i { font-style: normal; font-weight: 700; color: #2F4E6B; }
.xp-body .sep { color: #AFC3D6; }
.xp-see { flex: none; align-self: center; margin: 0 14px; padding: 7px 12px; border-radius: 6px; background: var(--c); color: #fff; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.xp-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.xp-jump a, .xp-dot { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; font-size: 13px; }
.xp-dot { width: 28px; height: 28px; font-size: 12px; margin-right: 8px; vertical-align: middle; }
@media (max-width: 560px) {
  .xp-row { flex-wrap: wrap; }
  .xp-see { margin: 0 14px 10px 60px; }
  .xp-list.topics .xp-see { margin-left: 24px; }
}
@media (max-width: 1100px) { .home-search { display: none; } }
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .navlinks { display: none; width: 100%; margin: 0 0 12px; }
  .navlinks.open { display: flex; }
  .nav { flex-wrap: wrap; }
  .brand b { font-size: 16px; }
}

/* ---------- Page frame + side art ---------- */
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 40px; position: relative; z-index: 1; }
.side-art { display: none; }
/* Park scenery from the school's design: the boy on the left, the girl and the school on the right.
   The strips fill the space beside the content and fade softly into the page. */
/* Shown only where there is free space beside the content (never under it): the strip is exactly
   the empty margin, so cards, text and buttons are never covered and nothing else changes. */
/* home page: a little sky at the top, then the light page colour, with the park scenery at the sides */
body[data-page="explore"] { background: linear-gradient(180deg, #BFE8FF 0, #DDF5FF 260px, var(--paper) 520px, var(--paper)); }
html:has(body[data-page="explore"]) { background: var(--paper); }
/* The scenery stays its natural size beside the content (never stretched on very wide or zoomed-out
   screens): at most 400px wide and 900px tall, standing on the bottom of the window, next to the content. */
@media (min-width: 1560px) {
  body[data-page="explore"] .side-art { display: block; position: fixed; top: 64px; bottom: 0; z-index: 0; pointer-events: none;
    width: min(calc((100vw - 1180px) / 2 - 10px), 400px);
    background-size: cover; background-repeat: no-repeat; }
  .side-art.left { left: max(0px, calc(50% - 590px - min(calc((100vw - 1180px) / 2 - 10px), 400px) - 10px)); background-image: url(../img/mxl-scene-left.webp); background-position: 60% bottom; }
  .side-art.right { right: max(0px, calc(50% - 590px - min(calc((100vw - 1180px) / 2 - 10px), 400px) - 10px)); background-image: url(../img/mxl-scene-right.webp); background-position: 40% bottom; }
}
.landscape { height: clamp(90px, 14vw, 200px); background: url(../img/mxl-landscape-bottom.svg) bottom / 100% 100% no-repeat; margin-top: -30px; position: relative; z-index: 0; }

/* ---------- Generic blocks ---------- */
.card { background: #fff; border: 1px solid #D5E5F2; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.cards3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.stat { font-size: 30px; font-weight: 800; color: var(--navy); }
.note { background: #EEF6FF; border: 1px solid #CFE3F7; border-radius: 12px; padding: .65rem .9rem; margin: .5rem 0 1rem; }
.note.warn, .warn-card { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.loading { padding: 3rem; text-align: center; color: var(--muted); }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: .5rem; }
.crumbs a { color: var(--blue-dark); text-decoration: underline; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; align-items: center; }
.scroll-x { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.section { padding: 26px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 22px; color: var(--navy); }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.count { background: #D9E9FF; color: #1456A3; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; }
.pill { display: inline-block; background: #EAF7FF; color: #075C9C; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 600; }

/* ---------- Home: hero ---------- */
.welcome {
  display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.4fr); gap: 22px; align-items: center;
  background: linear-gradient(120deg, var(--navy) 0%, #10518C 100%); border: 1px solid #2D9FDD; border-radius: 22px;
  padding: 24px; box-shadow: 0 12px 26px rgba(4, 46, 87, .16); color: #fff;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #174D7E; border-radius: 999px; padding: 6px 14px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #55E5D1; }
.welcome h1 { color: #fff; font-size: clamp(27px, 3.3vw, 34px); margin: 14px 0 8px; }
.welcome h1 span { color: var(--teal); }
.welcome p { color: #E5F1FF; margin: 0 0 14px; font-size: 14px; }
.attempts-card { display: flex; gap: 12px; align-items: center; background: #fff; color: var(--ink); border: 1px solid #DCEAF5; border-radius: 12px; padding: 12px 16px; max-width: 290px; }
.attempts-icon { width: 38px; height: 38px; border-radius: 12px; background: #E2F6F2; color: #087F70; display: grid; place-items: center; font-weight: 800; }
.attempts-card b { font-size: 22px; display: block; line-height: 1.1; }
.footer .visits { margin-top: 8px; font-size: 13px; opacity: .9; }
.footer .visits b { color: #5EEAD4; }
.attempts-card small { font-size: 11px; }
.subject-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.subject-tile { display: block; min-height: 145px; border-radius: 13px; background: #fff; color: var(--ink); box-shadow: 0 5px 14px rgba(0, 25, 60, .14); overflow: hidden; transition: transform .15s; }
.subject-tile:hover { transform: translateY(-3px); }
.subject-tile .art { height: 56px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 24px; font-weight: 800; color: #12365B; letter-spacing: 1px; white-space: nowrap; overflow: hidden; }
.subject-tile.maths .art { background: #BDF5E4; } .subject-tile.english .art { background: #E3D8FF; }
.subject-tile.evs .art { background: #FFE58C; } .subject-tile.science .art { background: #BDE7FF; }
/* Intermediate (XI–XII, JEE and NEET): one wide tile under the four subjects */
.subject-tile.inter { grid-column: 1 / -1; min-height: 0; display: flex; align-items: stretch; }
.subject-tile.inter .art { background: #FFD9C2; height: auto; min-width: 130px; padding: 0 14px; }
.subject-tile.inter .body { flex: 1; }
.subject-tile .body { padding: 9px 12px 12px; }
.subject-tile h3 { margin: 0; font-size: 15px; color: #12365B; }
.subject-tile small { display: block; font-size: 11px; margin: 2px 0 8px; }
@media (max-width: 1200px) { .welcome { grid-template-columns: 1fr; } }
@media (max-width: 850px) { .subject-tiles { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Home: class cards ---------- */
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .class-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 560px) { .class-grid { grid-template-columns: 1fr; } }
.class-card { background: #fff; border: 2px solid #A9C7E4; border-radius: 20px; box-shadow: 0 6px 18px rgba(15, 55, 95, .12); padding: 0 0 12px; overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.class-card:hover { border-color: #147FD1; transform: translateY(-3px); box-shadow: 0 12px 26px rgba(15, 55, 95, .18); }
.class-top { height: 84px; border-radius: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 18px; font-size: 28px; }
.class-grid > :nth-child(5n+1) .class-top { background: #FFB9D8; } .class-grid > :nth-child(5n+2) .class-top { background: #FFD09A; }
.class-grid > :nth-child(5n+3) .class-top { background: #9FD8FF; } .class-grid > :nth-child(5n+4) .class-top { background: #9FE8BC; }
.class-grid > :nth-child(5n) .class-top { background: #CEB4FF; }
.class-top .arrow { width: 38px; height: 38px; border-radius: 50%; background: var(--accent, var(--blue)); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; box-shadow: 0 3px 8px rgba(0, 0, 0, .18); }
.class-card h3 { margin: 18px 20px 6px; font-size: 27px; line-height: 1.2; font-weight: 800; letter-spacing: -.015em; color: #0B2F57; }
.class-card h3 .cshort { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 2px 10px; border-radius: 999px; background: var(--accent, #168EEA); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .04em; }
@media (max-width: 1180px) { .class-card h3 { font-size: 24px; } }
.class-card p { margin: 0 20px 14px; font-size: 16.5px; line-height: 1.5; color: #3F5E80; }
.class-card .smalltag { display: inline-flex; align-items: center; gap: 6px; margin: 0 20px 8px; padding: 8px 18px; border-radius: 999px; background: #E2F6F3; font-size: 16px; font-weight: 700; letter-spacing: .01em; color: #00605B; }
.class-card .smalltag::after { content: '›'; font-size: 20px; line-height: 1; }
.class-card .smalltag:hover { background: #C9EEE9; }
.subject-count { display: flex; justify-content: space-between; align-items: center; margin: 0 12px; padding: 14px 8px; border-top: 1px solid #DCE8F4; border-radius: 10px; font-size: 19px; font-weight: 700; color: #123B66; transition: background .12s; }
.subject-count span:last-child { font-size: 17px; font-weight: 600; color: #4F6D8D; font-variant-numeric: tabular-nums; }
.subject-count:hover { background: #EEF6FD; }
.subject-count:hover span:last-child { color: #0B6CB5; }
.subject-count:first-of-type { margin-top: 14px; }

/* ---------- Home: features, plans, callout, footer ---------- */
.feature-grid, .plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 850px) { .feature-grid, .plan-grid { grid-template-columns: 1fr; } }
.feature, .plan-card { background: #fff; border: 1px solid #CBDFF2; border-radius: 18px; padding: 22px; box-shadow: 0 8px 22px rgba(8, 43, 89, .09); }
.plan-card { display: flex; flex-direction: column; align-items: flex-start; }
.plan-card .btn { margin-top: auto; }
.feature-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: #E1F4FF; border: 1px solid #C9E8FB; }
.feature h3, .plan-card h3 { margin: 14px 0 6px; color: #0B3567; font-size: 17px; }
.feature p, .plan-card p { color: #496582; font-size: 13px; line-height: 1.7; margin: 0 0 12px; }
.callout { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(120deg, #082B59 0%, #124B85 100%); border: 1px solid #2D679C; border-radius: 24px; padding: 24px 28px; color: #fff; }
.callout h2 { color: #fff; margin: 0 0 4px; }
.callout p { margin: 0; color: #D8E8FA; font-size: 13px; max-width: 640px; }
.footer { background: #082B59; color: #EAF3FF; border-top: 4px solid #22B8D5; padding: 28px 16px 24px; text-align: center; position: relative; z-index: 2; }
.footer .org { font-size: 18px; font-weight: 800; letter-spacing: .4px; color: #fff; }
.footer a { color: #6DE4DF; }
.footer .contact a { color: #fff; }
.footer .copy { margin-top: 16px; padding-top: 13px; border-top: 1px solid #31577E; font-size: 11px; color: #C8D8EB; }

/* ---------- Skills page ---------- */
.subject-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; margin-bottom: 12px; }
.subject-tabs a { text-align: center; padding: 9px; border-radius: 10px; font-weight: 700; color: var(--ink); border: 2px solid transparent; }
.subject-tabs a.active { background: #EAF4FF; border-color: var(--blue); color: var(--navy); }
.banner { background: linear-gradient(110deg, #07336A, #0879BD); color: #fff; border-radius: 18px; padding: 20px 22px; margin-bottom: 12px; }
.banner h1 { color: #fff; margin: 0 0 4px; }
.banner p { margin: 0; color: #DCEEFF; font-size: 14px; }
.class-tabs { display: flex; flex-wrap: wrap; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 14px; }
.class-tabs a { padding: 6px 12px; border-radius: 9px; border: 2px solid #C6DDF2; background: #F4FAFF; color: var(--ink); font-weight: 700; font-size: 13px; }
.class-tabs a.mine { border-color: var(--gold); }
.class-tabs a.active { background: var(--gold); border-color: #F1A92B; color: #12365D; }
/* IXL-style class rail: coloured circles, the full class name slides out on hover */
.skills-layout { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start; }
.skills-main { min-width: 0; position: relative; z-index: 1; }
.class-rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 7px; z-index: 30; }
.rail-item { position: relative; display: block; width: 52px; height: 52px; text-decoration: none; }
.rail-dot { position: relative; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 800; font-size: 19px; border: 3px solid var(--c); box-shadow: 0 3px 8px rgba(0, 0, 0, .18); transition: transform .15s; }
.rail-name { position: absolute; left: 0; top: 0; z-index: 1; height: 52px; display: flex; align-items: center; padding: 0 22px 0 64px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 700; font-size: 17px; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); opacity: 0; transform: scaleX(.3); transform-origin: left center; pointer-events: none; transition: opacity .15s, transform .18s; }
.rail-item:hover .rail-name, .rail-item:focus-visible .rail-name { opacity: 1; transform: scaleX(1); }
.rail-item:hover .rail-dot { transform: scale(1.06); }
.rail-item.active .rail-dot { background: #fff; color: var(--c); box-shadow: 0 0 0 3px var(--c), 0 4px 10px rgba(0, 0, 0, .2); }
.rail-item.mine .rail-dot::after { content: ''; position: absolute; right: -2px; top: -2px; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
@media (max-width: 760px) {
  .skills-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .class-rail { position: static; flex-direction: row; overflow-x: auto; padding: 4px 2px 8px; gap: 8px; scrollbar-width: thin; }
  .rail-item, .rail-dot { width: 44px; height: 44px; flex: none; font-size: 16px; }
  .rail-name { display: none; }
}
.chapters { columns: 2 360px; column-gap: 16px; }
.chapters .card { break-inside: avoid; padding: 0; overflow: hidden; }
/* topic page: classes in reading order, left to right */
.chapters.xp-classes { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.chapters.xp-classes .card { margin: 0; scroll-margin-top: 90px; }
.chapters .card h3 { margin: 0; padding: 12px 16px; background: linear-gradient(90deg, #E3FBF4, #F0F8FF); font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.chapters .card .skill-row { padding: 9px 16px; }
.unlimited .card h3 { background: linear-gradient(90deg, #FFF1C9, #FFF9E8); }
.skill-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .4rem; border-bottom: 1px solid #EAF1F8; color: var(--ink); }
.skill-row:last-child { border-bottom: 0; }
a.skill-row:hover { background: #F2F9FF; }
.skill-row .code { font-size: 12px; font-weight: 700; color: var(--blue-dark); min-width: 4.4rem; }
.skill-row .title { flex: 1; font-size: 14px; }
/* Class skills page: one IXL-style list in columns — coloured category headings, "A.1 Name the shape" lines */
.ixl-intro { color: #4A6782; font-size: 13.5px; margin: 4px 2px 14px; max-width: 900px; }
.ixl-cols { columns: 3 250px; column-gap: 34px; background: #fff; border: 1px solid #DCE8F3; border-radius: 16px; padding: 18px 22px 6px; box-shadow: 0 2px 8px rgba(15, 55, 95, .06); }
.ixl-cat { break-inside: avoid; margin-bottom: 18px; }
.ixl-cat h3 { color: var(--c); font-size: 18px; font-weight: 750; margin: 0 0 4px; }
.ixl-cat .skill-row { gap: 6px; padding: 2px 0; border: 0; align-items: baseline; }
.ixl-cat .skill-row .code { min-width: 2.4rem; font-size: 13px; color: var(--navy); }
.ixl-cat .skill-row .title { font-size: 14px; color: #0B5B9C; }
.ixl-cat .skill-row:hover .title { text-decoration: underline; }
.ixl-cat .skill-row .score-pill { font-size: 10px; padding: 0 6px; }
.skill-row .adv { font-size: 10px; background: #F3E8FF; color: #6D28D9; border-radius: 6px; padding: 1px 6px; }
/* exam level of Intermediate skills */
.exam-tag { flex: none; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 1px 6px; white-space: nowrap; background: #E2E8F0; color: #334155; }
.exam-tag.jee-main, .exam-tag.jee-neet { background: #DBEAFE; color: #1D4ED8; }
.exam-tag.jee-adv { background: #FEE2E2; color: #B91C1C; }
.exam-tag.neet { background: #DCFCE7; color: #15803D; }
.due { font-size: 12px; color: #B45309; font-weight: 700; }
.score-pill { min-width: 2.7rem; text-align: center; border-radius: 999px; padding: .1rem .5rem; font-weight: 800; font-size: 13px; background: var(--cell-none); }
.score-pill.learning { background: var(--cell-1); } .score-pill.practising { background: var(--cell-2); }
.score-pill.strong { background: var(--cell-3); } .score-pill.challenge { background: var(--cell-4); }
.score-pill.mastered { background: var(--cell-5); color: #fff; }

/* ---------- Practice ---------- */
/* taking a skill (practice screen): soft sky-blue to mint gradient, no clouds */
body[data-page="practice"] { background: linear-gradient(180deg, #95DEFA 0, #A0E4FD 20%, #A8E8FE 40%, #ABE9FF 45%, #A9E9FA 50%, #A5E9F1 60%, #A1E8E6 70%, #9EE8DC 80%, #A1E8D2 90%, #A3E8C8 100%) fixed; }
html:has(body[data-page="practice"]) { background: #A3E8C8; }
.practice { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 14px; align-items: start; }
@media (max-width: 760px) { .practice { grid-template-columns: 1fr; } .hud { order: -1; } }
.qcard { background: #fff; border: 3px solid #A4C8E8; border-radius: 18px; box-shadow: 0 7px 0 #D2E5F4, 0 14px 26px #0A31530D; padding: 20px; min-height: 340px; }
.qhead { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.qhead h1 { font-size: 20px; margin: 4px 0; }
.tag { display: inline-block; border-radius: 999px; padding: .15rem .65rem; font-size: 12px; font-weight: 700; background: #FFEDB8; border: 1px solid #F1C14C; color: #6B4E00; white-space: nowrap; }
.tag.bad { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.tag.warn { background: #FFEDB8; }
.progressbar { height: 10px; background: #D8E8F6; border-radius: 999px; overflow: hidden; margin: 12px 0 16px; }
.progressbar span { display: block; height: 100%; background: linear-gradient(90deg, #08A97C, #13B6D1, #8156D9); transition: width .3s; }
.prompt-row { display: flex; gap: 10px; align-items: start; justify-content: space-between; }
.qbody { font-size: 18px; color: #0B2E57; }
/* powers and subscripts sit on the line without making it taller */
sup, sub { font-size: .72em; line-height: 0; }
.choice .cap .capi { display: inline; }
.speak { width: 36px; height: 36px; border-radius: 50%; background: #E4EFFB; color: #0B5B9C; border: 0; padding: 0; flex: none; font-size: 16px; }
.visual { border: 3px solid #8CC8ED; background: linear-gradient(135deg, #E6F7FF, #FFF4D9); border-radius: 16px; padding: 12px; margin: 12px 0; display: grid; place-items: center; min-height: 90px; }
.visual svg { max-width: 100%; height: auto; max-height: 220px; }
.big { font-size: 30px; font-weight: 700; margin: .75rem 0; text-align: center; }
.pics { font-size: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; margin: .5rem 0; }
.pics span { letter-spacing: .15em; }
.groups { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin: .5rem 0; }
.groups > div { border: 2px dashed #B8D6EE; border-radius: 12px; padding: .5rem 1rem; }
.answer { margin: 14px 0; }
.answer input { font-size: 22px; width: 13rem; text-align: center; border-width: 2px; border-color: #8BBCE2; }
.typed-box { background: linear-gradient(135deg, #F0FAFF, #FFF9E9); border-radius: 14px; padding: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice {
  display: flex; flex-direction: column; align-items: stretch; padding: 0; overflow: hidden;
  background: #fff; border: 2px solid #A9DFFF; border-radius: 16px; box-shadow: 0 3px 0 #D9EAF6; color: #0B2E57; font-weight: 600; font-size: 17px; min-height: 64px;
}
.choice:hover:not(:disabled) { border-color: #0A8ACA; transform: translateY(-1px); }
.choice:disabled { opacity: 1; cursor: default; }
.choice:disabled:not(.right):not(.wrong) { opacity: .6; }
.choice .opic { display: grid; place-items: center; background: #F1F8FF; min-height: 120px; padding: 8px; }
.choice .opic svg { max-height: 100px; max-width: 100%; }
.choice .cap .pic { width: 1.6em; height: 1.6em; }
/* an answer button with one picture ("Elephant"): big picture above the word */
.choice .cap:has(> .pic:only-of-type) { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; font-size: 19px; }
.choice .cap > .pic:only-of-type { width: 150px; height: 150px; }
@media (max-width: 560px) { .choice .cap > .pic:only-of-type { width: 104px; height: 104px; } }
.choice .cap { padding: 12px 10px; background: linear-gradient(110deg, #EEFAFF, #E6F7FF); text-align: center; flex: 1; display: grid; place-items: center; }
.choice.right { border-color: var(--green); box-shadow: 0 3px 0 #BBF7D0; }
.choice.right .cap { background: #DCFCE7; }
.choice.wrong { border-color: #F97316; }
.choice.wrong .cap { background: #FFEDD5; }
/* Picture options: big pictures, the picture itself is the button */
.pic-choices { gap: 16px; }
.pic-choices.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pic-choices.n4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice.pic-choice { border-width: 3px; border-radius: 20px; box-shadow: 0 6px 16px rgba(11, 61, 120, .12); transition: transform .15s, box-shadow .15s, border-color .15s; }
.choice.pic-choice:hover:not(:disabled) { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 24px rgba(11, 61, 120, .2); border-color: #FFB703; }
/* the LKG pictures are drawn on white, so the card is white too and the picture blends in */
.choice.pic-choice .opic { min-height: 200px; padding: 14px; background: #fff; }
.visual:has(.photo-q) { background: #fff; border-color: #BFE3F7; }
.choice.pic-choice .opic svg { max-height: 170px; }
.choice.pic-choice .mxv-opt { width: 180px; height: 160px; max-width: 100%; }
.choice.pic-choice .mxv-photo img { border-radius: 0; }
.choice.pic-choice .photo-o { max-height: 180px; width: auto; max-width: 100%; object-fit: contain; transition: transform .15s; }
.choice.pic-choice:hover:not(:disabled) .photo-o { transform: scale(1.06); }
.choice.pic-choice .cap { font-size: 19px; text-transform: capitalize; }
.choice.pic-choice.right { border-color: var(--green); box-shadow: 0 0 0 4px #BBF7D0, 0 8px 18px rgba(22, 101, 52, .2); }
.choice.pic-choice.wrong { border-color: #F97316; box-shadow: 0 0 0 4px #FFEDD5; }
/* IXL-style feedback: "That's right!" card, and "Sorry, incorrect…" with review + solve */
.fb-right { --praise: #7CB342; display: inline-flex; align-items: center; gap: 14px; margin: 18px 0 8px; padding: 16px 28px 16px 20px; border: 3px solid var(--praise); border-radius: 6px;
  background: color-mix(in srgb, var(--praise) 8%, #fff); animation: pop .25s ease-out; }
.fb-right .tick { font-size: 54px; line-height: 1; color: var(--praise); font-weight: 900; }
.fb-right b { font-size: 30px; color: var(--praise); font-weight: 800; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.fb-wrong { animation: pop .2s ease-out; }
.fb-wrong .sorry { font-size: 30px; font-weight: 600; color: #0FA3D8; margin: 6px 0 4px; }
.fb-wrong .lbl { color: #0B5B9C; font-weight: 700; font-size: 15px; margin: 8px 0 6px; }
.fb-wrong .gotit-row { display: flex; justify-content: flex-end; margin: 10px 0; }
.fb-wrong .gotit-row.left { justify-content: flex-start; }
/* MXL colours (navy, blue, cyan, gold) rather than IXL's green */
.fb-wrong .gotit { background: linear-gradient(135deg, #0B6FB8, #082B5A); border: 0; color: #fff; min-width: 120px; box-shadow: 0 4px 0 #061F42; }
.fb-wrong .gotit:hover { background: linear-gradient(135deg, #1287D8, #0B3D78); }
.fb-wrong .exp-h { color: var(--navy); font-size: 22px; margin: 14px 0 8px; }
.exp-sec { position: relative; border: 1px solid #D5D0EE; border-radius: 4px; padding: 14px 16px 14px 38px; margin: 0 0 10px; background: #fff; }
.exp-sec .tab { position: absolute; left: -6px; top: 10px; writing-mode: vertical-rl; transform: rotate(180deg); padding: 10px 4px; border-radius: 0 3px 3px 0; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.exp-sec.review .tab { background: #0FA3B1; }
.exp-sec.solve .tab { background: #F2A900; color: #082B5A; }
.exp-sec.review { border-color: #BFE3EA; }
.exp-sec.solve { border-color: #F3DFA6; }
.exp-sec .qbody { margin-bottom: 8px; }
.exp-sec .pick-pic { pointer-events: none; }
.exp-sec .steps { margin: 6px 0; padding-left: 1.3rem; }
.exp-sec .steps li { margin: 6px 0; }
.mchoices { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.mchoice { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 6px 12px; border: 1px solid #C9D6E3; border-radius: 4px; background: #fff; color: #0B2E57; font-weight: 600; font-size: 15px; }
.mchoice.sel { border: 3px solid #1E88E5; background: #EAF4FF; padding: 4px 10px; }
.mchoice .opic { display: grid; place-items: center; }
.mchoice .opic img, .mchoice .opic svg, .mchoice .opic .mxv-opt { max-height: 70px; max-width: 90px; width: auto; height: auto; }
.mchoice.has-pic { justify-content: flex-end; min-height: 80px; }
.mchoice .opic > .pic { width: 56px; height: 56px; }
.mchoice .opic span[style] { zoom: .45; }
.mchoice .cap .pic { width: 1.4em; height: 1.4em; }
/* groups in the question picture that are the answer buttons (practice.js tapGroups) */
.mxv-group.tap-group { cursor: pointer; padding: 12px; border: 3px solid #A9DFFF; border-radius: 18px; background: #fff; box-shadow: 0 6px 16px rgba(11, 61, 120, .12); transition: transform .15s, border-color .15s; }
.mxv-group.tap-group:hover, .mxv-group.tap-group:focus-visible { transform: translateY(-3px); border-color: #FFB703; outline: none; }
/* wrong answer: the child's choice (red ✗) beside the correct one (green ✓), and why the choice is wrong */
.ans-pair { display: flex; flex-wrap: wrap; gap: 18px 34px; margin: 6px 0 4px; }
.fb-wrong .lbl.bad { color: #C2410C; }
.mchoice.one { position: relative; min-width: 120px; padding: 10px 16px; border-width: 3px; font-size: 17px; }
.mchoice.one .opic img, .mchoice.one .opic svg, .mchoice.one .opic .mxv-opt { max-height: 110px; max-width: 140px; }
.mchoice.one.bad { border-color: #F97316; background: #FFF4EC; }
.mchoice.one.ok { border-color: #16A34A; background: #F0FDF4; }
.mchoice.one .mark { position: absolute; top: -12px; right: -12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.mchoice.one.bad .mark { background: #F97316; }
.mchoice.one.ok .mark { background: #16A34A; }
.why-not { margin-top: 10px; padding: 10px 14px; border-left: 5px solid #F97316; background: #FFF7ED; border-radius: 8px; }
.why-not b { color: #C2410C; }
.why-not p { margin: 4px 0 0; }
.why-fig { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin-top: 10px; padding: 10px; background: #fff; border-radius: 10px; }
.why-fig svg { max-width: 100%; height: auto; }
.why-fig figure { margin: 0; text-align: center; font-size: 14px; color: #334155; }
.ans-box { display: inline-block; min-width: 60px; padding: 6px 14px; border: 3px solid #1E88E5; border-radius: 4px; background: #EAF4FF; font-weight: 700; font-size: 18px; }
/* Position scenes (LKG): an open cardboard box, and shelves for top / middle / bottom */
.qbody:has(.scene) { flex: 1; min-width: 0; }
.scene.scene-box { gap: 64px; padding-top: 48px; }
.scene { display: flex; align-items: flex-end; justify-content: center; gap: 28px; margin: 16px auto 6px; padding: 18px 24px; background: #fff; border: 3px solid #BFE3F7; border-radius: 18px; max-width: 560px; }
.scene .pic { width: 96px; height: 96px; }
.scene-box .box { position: relative; width: 170px; height: 130px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px;
  background: linear-gradient(180deg, #A86F3A 0 18%, #C8925A 18%); border: 4px solid #7A4A1E; border-top: 0; border-radius: 4px 4px 10px 10px; box-shadow: 0 8px 14px rgba(90, 55, 20, .25); }
.scene-box .box::before, .scene-box .box::after { content: ''; position: absolute; top: -26px; width: 70px; height: 30px; background: #D7A56B; border: 4px solid #7A4A1E; }
.scene-box .box::before { left: -40px; transform: skewX(35deg); border-right: 0; }
.scene-box .box::after { right: -40px; transform: skewX(-35deg); border-left: 0; }
.scene-box .box .in { position: relative; z-index: 1; }
.scene-box .box .front { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; z-index: 2; background: linear-gradient(180deg, #D6A064, #C08447); border-top: 4px solid #7A4A1E; border-radius: 0 0 8px 8px; }
.scene-box .out { padding-bottom: 4px; }
.scene-shelf { flex-direction: column; align-items: center; gap: 0; width: 240px; }
.scene-shelf .shelf { width: 100%; display: flex; justify-content: center; padding: 6px 0 2px; border-bottom: 10px solid #8B5A2B; border-radius: 0 0 4px 4px; box-shadow: 0 4px 0 #C49A6C; margin-bottom: 8px; }
.scene-shelf .pic { width: 84px; height: 84px; }
/* A/B pictures inside the question that are tapped directly */
.qbody:has(.pick-row) { flex: 1; min-width: 0; }
.groups.pick-row { display: flex; width: 100%; justify-content: center; gap: 22px; margin: 14px 0 4px; }
.groups.pick-row > .pick-pic { display: grid; place-items: center; min-width: 190px; min-height: 170px; padding: 16px; border: 3px solid #A9DFFF; border-style: solid; border-radius: 20px; background: #fff; box-shadow: 0 6px 16px rgba(11, 61, 120, .12); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pick-pic:hover:not(.done), .pick-pic:focus-visible { transform: translateY(-4px) scale(1.02); border-color: #FFB703; box-shadow: 0 12px 24px rgba(11, 61, 120, .2); outline: none; }
.pick-pic.done { cursor: default; }
.pick-pic.right { border-color: var(--green) !important; box-shadow: 0 0 0 4px #BBF7D0; }
.pick-pic.wrong { border-color: #F97316 !important; box-shadow: 0 0 0 4px #FFEDD5; }
.pick-pic .pics { justify-content: center; }
@media (max-width: 560px) { .groups.pick-row > .pick-pic { min-width: 0; flex: 1; min-height: 130px; } }
.ans-pic { display: block; margin: 4px 0; }
.ans-pic > span[style] { zoom: .5; }
.ans-pic .photo-o { max-height: 110px; margin: 0; }
@media (max-width: 560px) {
  .pic-choices.n3, .pic-choices.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice.pic-choice .opic { min-height: 140px; }
  .choice.pic-choice .photo-o { max-height: 120px; }
}
.hints .hint { background: var(--warn-bg); border-left: 4px solid var(--gold); padding: .55rem .85rem; border-radius: 8px; margin-top: .5rem; }
.fb { margin-top: 14px; padding: 12px 14px; border-radius: 14px; }
.fb.ok { background: var(--ok-bg); border: 2px solid var(--ok-line); font-weight: 800; font-size: 18px; color: #166534; }
.fb.bad { background: var(--bad-bg); border: 2px solid var(--bad-line); }
.fb .ans { font-size: 18px; }
.explain { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .65rem .9rem; margin: .5rem 0; }
.explain .visual { margin: 8px 0 0; }
.pts { background: var(--gold); color: #1C1300; border-radius: 999px; padding: 0 .5rem; font-size: 13px; }
.hud { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) { .hud { position: static; display: grid; grid-template-columns: repeat(3, 1fr); } }
.hud-box { border-radius: 12px; overflow: hidden; background: #F1F8FF; border: 1px solid #CFE3F7; text-align: center; }
.hud-box small { display: block; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 5px 4px; }
.hud-box b { display: block; font-size: 20px; padding: 6px 4px; color: var(--navy); }
.hud-box.answered small { background: #0862AD; }
.hud-box.time small { background: #8156D9; }
.hud-box.score small { background: var(--gold); color: #12365D; }
.hud-box .band { display: block; font-size: 11px; color: var(--muted); padding: 0 4px 6px; }
.bar { height: 8px; background: var(--cell-none); border-radius: 999px; overflow: hidden; margin: .3rem 6px; min-width: 60px; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #0EA5E9, #10B981); }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .9em; margin: 0 .15em; }
.frac span:first-child { border-bottom: 2px solid currentColor; padding: 0 .2em; }
.matrix { display: inline-table; border-left: 2px solid currentColor; border-right: 2px solid currentColor; border-radius: 6px; border-collapse: separate; margin: 0 .3rem; vertical-align: middle; }
.matrix td { padding: .15rem .6rem; text-align: center; }
.shape { display: inline-block; background: #13B6D1; }
.shape.circle { width: 90px; height: 90px; border-radius: 50%; }
.shape.square { width: 90px; height: 90px; }
.shape.rect { width: 150px; height: 80px; }
.shape.triangle { width: 0; height: 0; background: none; border-left: 55px solid transparent; border-right: 55px solid transparent; border-bottom: 95px solid #13B6D1; }
/* Pictures returned by api/visuals.php */
.mxv { display: inline-flex; align-items: center; justify-content: center; max-width: 100%; }
.mxv svg { filter: drop-shadow(0 3px 2px rgba(20, 50, 90, .14)); }
.mxv-svg { display: block; width: 100%; height: auto; }
.mxv-q, .mxv-explain { width: 100%; max-width: 520px; margin: 0 auto; }
.mxv-q .mxv-board { max-width: 340px; }
.mxv-opt { width: 96px; height: 72px; }
.mxv-opt .mxv-svg, .mxv-opt img { width: 100%; height: 100%; object-fit: contain; }
.mxv-photo img { display: block; max-width: 100%; height: auto; border-radius: 12px; }
.mxv-fallback[hidden] { display: none; }
/* Counting: tap each picture to tick it off (practice.js tapToCount) */
.tapcount { position: relative; cursor: pointer; }
.tapcount:hover:not(.counted) { filter: drop-shadow(0 0 4px #1EA7E1); }
.tapcount.counted > img, .tapcount.counted > svg, img.tapcount.counted { opacity: .55; }
.tapcount.counted::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px;
  border-radius: 50%; background: #2E9E4F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
img.tapcount.counted { outline: 4px solid #2E9E4F; outline-offset: -4px; border-radius: 12px; }
/* Single letters as answer choices: big enough to see which way round they are */
.glyph-choices .choice .cap { font-size: 56px; line-height: 1.1; font-weight: 600; font-family: Arial, 'Segoe UI Symbol', sans-serif; }
.glyph-choices .choice { min-height: 96px; }
/* Poem or passage lines under a question's instruction */
.passage { margin: 10px 0 2px; padding: 10px 16px; border-left: 4px solid #1EA7E1; background: #F3F9FE; border-radius: 0 10px 10px 0;
  font-size: .92em; font-weight: 500; line-height: 1.6; color: #1C3550; width: fit-content; max-width: 100%; }
.tap-tip { margin-top: 8px; font-size: 13px; color: #5B7894; }
/* Round number buttons for counting answers, like IXL's 1 2 3 */
.choices.num-choices { display: flex; flex-wrap: wrap; gap: 10px; padding: 10px 12px; background: #EEF4FB; border-radius: 16px; width: fit-content; }
.num-choices .choice { width: 60px; height: 60px; min-height: 0; border-radius: 50%; border: 0; background: linear-gradient(180deg, #4A9BF2, #1565C0); box-shadow: 0 4px 0 #0D47A1; color: #fff; font-size: 24px; }
.num-choices .choice .cap { background: none; padding: 0; color: #fff; }
.num-choices .choice:hover:not(:disabled) { transform: translateY(-2px); background: linear-gradient(180deg, #64ACF5, #1E74D0); }
/* Race track for first / second / last (c01-ordinal) */
.race { display: flex; align-items: flex-end; gap: 14px; margin: 14px 0 6px; padding: 14px 16px 10px; width: fit-content; max-width: 100%; overflow-x: auto;
  background: #fff; border: 3px solid #BFE3F7; border-bottom: 14px solid #D9B98A; border-radius: 18px; }
.race .pic { width: 96px !important; height: 96px !important; margin: 0 !important; }
.race-flag .pic { width: 64px !important; height: 80px !important; }
.racer { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.racer b { min-width: 26px; height: 26px; border-radius: 13px; background: #0B6FB8; color: #fff; display: grid; place-items: center; font-size: 14px; }
.racer.on { outline: 4px solid #22C55E; outline-offset: 2px; border-radius: 14px; }
.racer.on b { background: #16A34A; }
@media (max-width: 560px) { .race { gap: 8px; padding: 10px; } .race .pic { width: 58px !important; height: 58px !important; } .race-flag .pic { width: 40px !important; height: 52px !important; } }
/* Skill preview card shown while the mouse rests on a skill (skill-preview.js) */
.skill-preview { position: fixed; z-index: 70; width: min(420px, 90vw); max-height: 80vh; overflow: hidden; background: #fff; border: 2px solid #8FD3F4; border-radius: 12px;
  box-shadow: 0 16px 36px rgba(6, 35, 76, .28); pointer-events: none; animation: pop .15s ease-out; }
.skill-preview[hidden] { display: none; }
.sp-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-bottom: 1px solid #E3EEF8; color: #4A6782; font-size: 13px; font-weight: 700; }
.sp-dots { display: flex; gap: 4px; }
.sp-dots i { width: 9px; height: 9px; border-radius: 50%; background: #D3DEE9; }
.sp-dots i:first-child { background: #1EA7E1; }
.sp-body { padding: 10px 14px 14px; }
.sp-body .qbody { font-size: 16px; margin-bottom: 8px; }
.sp-body .visual { padding: 6px; min-height: 0; margin: 8px 0; }
.sp-body .visual svg, .sp-body .visual img { max-height: 150px; }
.sp-body .mxv-named img { width: 90px; height: 90px; }
.sp-body .mxv-named.many img { width: 40px; height: 40px; }
.sp-body .qbody .pic { width: 40px; height: 40px; }
.sp-empty { min-width: 90px; }
/* photos of the things a question names (api/visuals.php mxv_named_photos) */
.mxv-photos { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.mxv-named { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; max-width: 420px; }
.mxv-named img { width: 170px; height: 170px; object-fit: contain; }
.mxv-named.many img { width: 84px; height: 84px; }
.mxv-named small { flex-basis: 100%; text-align: center; font-weight: 700; color: var(--navy); text-transform: capitalize; }
@media (max-width: 560px) { .mxv-named img { width: 110px; height: 110px; } .mxv-named.many img { width: 46px; height: 46px; } }
.photo-q { display: block; max-width: min(100%, 560px); max-height: 300px; width: auto; height: auto; margin: 0 auto; border-radius: 12px; background: #fff; }
.photo-o { display: block; max-width: 100%; max-height: 110px; margin: 0 auto; }
/* Emoji replaced by drawings (assets/js/pictures.js) */
.pic { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -.25em; }
.pic svg { width: 100%; height: 100%; display: block; }
.pic img.photo { width: 100%; height: 100%; display: block; object-fit: contain; border-radius: 8px; }
.pics .pic, .big .pic { width: 1.6em; height: 1.6em; }
/* In questions and answers, pictures are picture-book size, not text size */
.qbody .pic, .exp-sec .pic, .choice .cap .pic, .mchoice .cap .pic { width: 76px; height: 76px; vertical-align: middle; margin: 4px; }
/* a picture whose size the question sets on purpose (big vs small) keeps that size */
.qbody span[style*="font-size"] > .pic, .exp-sec span[style*="font-size"] > .pic, .ans-pic span[style*="font-size"] > .pic { width: 1.25em; height: 1.25em; }
.qbody .pics, .choice .pics { gap: 8px 10px; font-size: 1rem; justify-content: center; }
.qbody .pics span, .choice .pics span { display: inline-flex; flex-wrap: wrap; gap: 6px; letter-spacing: 0; justify-content: center; }
.qbody .pics .pic, .choice .pics .pic { width: 84px; height: 84px; margin: 0; }
.choice .cap { flex-wrap: wrap; }
.choice .cap:has(.pics) { padding: 14px 10px; }
.groups > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; min-height: 90px; background: #fff; }
@media (max-width: 560px) {
  .qbody .pic, .choice .cap .pic { width: 44px; height: 44px; }
  .qbody .pics .pic, .choice .pics .pic { width: 46px; height: 46px; }
}
.subject-tile .art .pic, .class-top .pic { width: 34px; height: 34px; flex: none; }
.class-top > span:first-child { display: flex; gap: 4px; align-items: center; }
.sorry { font-weight: 800; color: #9A3412; margin: 0 0 8px; }
.answers-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.answers-compare > div { background: #fff; border: 1px solid #F5C9B8; border-radius: 10px; padding: 8px 10px; }
.answers-compare small { display: block; color: var(--muted); font-size: 12px; }
.answers-compare .given { color: #B45309; font-size: 18px; text-decoration: line-through; text-decoration-color: rgba(180, 83, 9, .5); }
.answers-compare .ans { color: #15803D; font-size: 18px; }
.explain h4 { margin: 0 0 6px; color: var(--navy); }
.steps { margin: 6px 0 8px; padding-left: 1.3rem; }
.steps li { margin: 4px 0; }
.explain .final { font-weight: 600; }
.example-card { margin-top: 12px; border: 2px dashed #8CC8ED; background: #F4FBFF; border-radius: 14px; padding: 12px 14px; }
.example-card .ex-head { font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.award-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.award { background: #fff; border: 2px solid #D5E5F2; border-radius: 16px; padding: 12px; text-align: center; }
.award .medal-pic { width: 54px; height: 54px; margin: 0 auto 6px; }
.award .medal-pic .pic { width: 54px; height: 54px; }
.award.earned { border-color: #F1C14C; background: linear-gradient(160deg, #FFF8E1, #fff); }
.award:not(.earned) .medal-pic { filter: grayscale(1); opacity: .45; }
.award b { display: block; color: var(--navy); }
.award small { display: block; }
.certificate { width: min(720px, 100%); margin: 0 auto; background: #fff; border: 10px double #0B3D78; border-radius: 12px; padding: 30px; text-align: center; }
.certificate h2 { font-size: 30px; margin: 6px 0; color: #0B3D78; }
.certificate .who { color: #082B5A; font-size: 26px; font-weight: 800; border-bottom: 2px solid #F1C14C; display: inline-block; padding: 0 20px 4px; }
.certificate .skill { font-size: 20px; font-weight: 700; color: #0876C8; }
@media print { body.printing > *:not(.overlay) { display: none !important; } .overlay { position: static; background: none; } .overlay .no-print { display: none; } }
.limit-card { text-align: center; padding: 20px; }
.limit-card .big-emoji { font-size: 46px; }

/* ---------- Overlays, tables, teacher, admin ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4, 25, 50, .5); display: grid; place-items: center; z-index: 50; padding: 16px; }
.celebrate, .dialog { max-width: 440px; text-align: center; }
.dialog { text-align: left; }
.medal { font-size: 4rem; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.table th, .table td { padding: .5rem .55rem; border-bottom: 1px solid #E5EEF7; vertical-align: middle; }
.table tr.me { background: #FFF6DA; font-weight: 700; }
.table tr.inactive { opacity: .5; }
.bad-row { background: #FFF1F1; }
.bad-text { color: #B91C1C; }
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .55rem 1rem; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.active { color: var(--navy); border-color: var(--blue); }
.class-card-t { display: flex; gap: .8rem; align-items: center; color: var(--ink); }
.class-card-t > div:last-child { flex: 1 1 0; min-width: 0; }
/* My classes: the class label (LKG, UKG, I ... XII + section) gets one fixed-width column, so it never runs into the text and the text starts at the same place in every card */
.big-level { flex: 0 0 5.4rem; width: 5.4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .2rem; font-size: 28px; line-height: 1.15; font-weight: 800; color: var(--blue-dark); white-space: nowrap; overflow: hidden; }
.big-level small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 15px; margin-left: 0; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.heat th { font-weight: 600; text-align: left; white-space: nowrap; padding-right: .5rem; }
.heat thead th { height: 6.5rem; vertical-align: bottom; }
.heat thead th span { writing-mode: vertical-rl; transform: rotate(180deg); }
.heat td { width: 2.3rem; height: 1.9rem; text-align: center; border-radius: 4px; font-weight: 700; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: 12px; margin-bottom: .5rem; }
.legend span { display: inline-block; width: 1rem; height: 1rem; border-radius: 3px; margin-left: .5rem; }
.trouble { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; }
.trouble .btn { grid-column: 2; grid-row: 1 / span 2; }
.live.help { border-color: #DC2626; box-shadow: 0 0 0 2px #FCA5A5; }
.pick h4 { margin: .75rem 0 .25rem; color: var(--navy); }
.hbar { display: grid; grid-template-columns: 7rem 1fr 3rem; gap: .5rem; align-items: center; margin: .3rem 0; }
.hbar .track { height: 12px; background: var(--cell-none); border-radius: 999px; overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: linear-gradient(90deg, #13B6D1, #168EEA); }
.sec { display: flex; gap: .5rem; margin: .3rem 0; }
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.slip { border: 1px dashed var(--muted); border-radius: 8px; padding: .6rem; font-size: 14px; }
.greet { font-size: 26px; }
.goal { display: flex; gap: 1rem; align-items: center; }
.ring { --p: 0; width: 84px; height: 84px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#13B6D1 calc(var(--p) * 1%), var(--cell-none) 0); }
.ring span { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.ring small { font-size: 11px; }
.dash-hero { background: linear-gradient(115deg, #062B5D, #0B3F79); color: #fff; border-radius: 20px; padding: 20px 22px; margin-bottom: 16px; }
.dash-hero h1 { color: #fff; margin: 0; }
.dash-hero p { margin: 4px 0 0; color: #D8E8FA; }
.stat-card { border-top: 4px solid #2376DC; }
.cards3 > .stat-card:nth-child(2) { border-top-color: #10A675; }
.cards3 > .stat-card:nth-child(3) { border-top-color: #F59E0B; }
.cards3 > .stat-card:nth-child(4) { border-top-color: #8B5CF6; }

/* ---------- Auth ---------- */
/* ---------- Change password (account.js) ---------- */
.pw-card { max-width: 480px; margin: 28px auto; }
.pw-card h1 { margin: 0 0 .2rem; }
.pw-field { display: block; position: relative; margin-top: .3rem; }
.pw-field input { margin-top: 0; padding-right: 3rem; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem; min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: #58749A; box-shadow: none; cursor: pointer; }
.pw-eye:hover { color: var(--blue); background: #EEF6FF; }
.pw-eye:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.pw-eye svg { display: block; }
.pw-meter { height: 8px; border-radius: 99px; background: #E3EEF8; overflow: hidden; margin: .5rem 0 .25rem; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 99px; background: #E25555; transition: width .2s, background .2s; }
.pw-meter[data-s="1"] span { width: 34%; background: #E25555; }
.pw-meter[data-s="2"] span { width: 67%; background: #F0A92B; }
.pw-meter[data-s="3"] span { width: 100%; background: #2FAE66; }
.pw-rules { list-style: none; margin: .6rem 0; padding: 0; font-size: 13.5px; }
.pw-rules li { position: relative; padding: .1rem 0 .1rem 1.5rem; color: var(--muted); }
.pw-rules li::before { content: '○'; position: absolute; left: 0; }
.pw-rules li.ok { color: #177A45; font-weight: 600; }
.pw-rules li.ok::before { content: '✓'; }
.pw-msg { font-weight: 600; }
.pw-ok { background: #E8F8EE; border-color: #A9DFBF; color: #145A32; font-weight: 600; }
#pwGo { margin-top: .4rem; }

.auth { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(145deg, #78D7FF, #EAF8FF 65%, #D9F6E3); }
.auth-card { width: min(400px, 100%); background: #fff; border-radius: 24px; padding: 28px; box-shadow: 0 18px 40px rgba(8, 43, 89, .18); }
.auth-card .brandmark { width: 56px; height: 56px; font-size: 18px; margin: 0 auto 8px; background: linear-gradient(145deg, #00C8B8, #079FBA); }
.auth-card h2 { text-align: center; }
.auth-card .btn-signin { width: 100%; background: #FFC94D; color: #082B5A; border: 0; border-radius: 12px; padding: 12px; font-weight: 800; margin-top: 8px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #082B59; color: #fff; padding: .7rem 1.2rem; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast.error { background: #B91C1C; }
.toast.ok { background: #15803D; }

@media print {
  .topbar, .no-print, .toolbar, .footer, .side-art, .landscape { display: none !important; }
  .card { box-shadow: none; border: 0; }
  body { background: #fff; }
}

/* LKG picture skills (lkg-pictures.js) */
/* --o is the size of one picture: as big as --max, smaller on phones so --per pictures fit in a row */
.prompt-row:has(.lk) { position: relative; display: block; }
.prompt-row:has(.lk) > .speak { position: absolute; top: 0; right: 0; }
.qbody:has(.lk) { min-width: 0; }
.lk .lk-say { margin: 2px 46px 12px 0; font-size: 21px; font-weight: 600; line-height: 1.45; color: #0B2E57; }
.lk-set { --per: 5; --max: 124px; --o: min(var(--max), calc((100vw - var(--pad, 92px) - (var(--per) - 1) * 10px) / var(--per))); }
.lk-o { position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: bottom; }
.lk-o > .pic, .lk-it > .pic, .lk-z > .pic { width: var(--o, 92px); height: var(--o, 92px); margin: 0; }
.lk-o .pic img.photo, .lk-it .pic img.photo, .lk-z .pic img.photo { border-radius: 10px; box-shadow: none; object-fit: contain; }
.lk-n { position: absolute; right: -7px; bottom: -7px; z-index: 2; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: #0B6FB8; color: #fff;
  font: 800 15px/26px system-ui, sans-serif; font-style: normal; text-align: center; box-shadow: 0 0 0 2px #fff; }
.lk-n.q { background: #F59E0B; }
.lk-dim { opacity: .3; filter: grayscale(.6); }
.lk-hl > .pic, .lk-o.lk-hl > .lk-sh, .lk-o.lk-hl > .lk-z { outline: 4px solid #22C55E; outline-offset: 3px; border-radius: 18%; }
/* layouts: neat rows of 5, two rows, scattered (never overlapping), dice dots */
.lk-rows { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 10px auto; }
.lk-line { display: flex; gap: 10px; justify-content: center; }
.lk-grid2 { display: grid; grid-template-columns: repeat(var(--c), var(--o)); gap: 16px 10px; justify-content: center; margin: 10px auto; }
.lk-scatter { --max: 110px; position: relative; width: min(calc(var(--cols) * (var(--o) + 40px)), calc(100vw - var(--pad, 92px))); max-width: 100%; height: calc(var(--rows) * (var(--o) + 22px)); margin: 10px auto; }
.lk-scatter > .lk-o { position: absolute; }
.lk-dice { display: grid; grid-template-columns: repeat(3, var(--o)); grid-template-rows: repeat(3, var(--o)); gap: 4px; justify-content: center; width: max-content;
  margin: 10px auto; padding: 12px; background: #fff; border: 3px solid #CFE3F7; border-radius: 24px; --max: 70px; }
.lk-dot { display: block; width: calc(var(--o) * .76); height: calc(var(--o) * .76); border-radius: 50%; background: var(--d);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .16), 0 2px 4px rgba(8, 43, 89, .2); }
.lk-sh { display: block; width: calc(var(--o, 90px) * var(--k, 1)); height: calc(var(--o, 90px) * var(--k, 1)); }
.lk-sh svg { display: block; width: 100%; height: 100%; overflow: visible; }
.lk-z { display: inline-flex; }
.lk-z > .pic { width: calc(var(--o, 92px) * var(--z, 1)); height: calc(var(--o, 92px) * var(--z, 1)); }
.lk-show { display: flex; justify-content: center; margin: 14px 0 6px; --o: 150px; }
.lk-show .lk-sh { --o: 100px; }
.lk-target { display: flex; justify-content: center; margin: 4px 0 2px; --o: 124px; }
.lk-target > .lk-o { padding: 10px; border: 3px dashed #F59E0B; border-radius: 20px; background: #FFFBEB; }
/* ten frame */
.lk-tf { --max: 92px; --c: min(var(--max), calc((100vw - var(--pad, 92px) - 24px) / 5)); display: grid; grid-template-columns: repeat(5, var(--c)); grid-auto-rows: var(--c);
  gap: 4px; width: max-content; margin: 10px auto; padding: 4px; background: #0B5B9C; border-radius: 10px; }
.lk-tf > span { display: grid; place-items: center; background: #fff; border-radius: 4px; }
.lk-tf .lk-o { --o: calc(var(--c) * .8); }
.lk-tf .lk-n { right: -4px; bottom: -4px; min-width: 20px; height: 20px; font-size: 12px; line-height: 20px; }
/* number track and big numeral */
.lk-track { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.lk-track b { min-width: 46px; height: 52px; display: grid; place-items: center; border: 3px solid #A9DFFF; border-radius: 12px; background: #fff; font-size: 24px; color: #0B2E57; }
.lk-track b.on { background: #FFEDB8; border-color: #F1C14C; }
.lk-track b.q { border-style: dashed; border-color: #F59E0B; color: #F59E0B; background: #FFFBEB; }
.lk-track b.ok { border-color: #22C55E; background: #DCFCE7; }
.lk-numrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px; }
.lk-big { font-size: 72px; font-weight: 800; line-height: 1; color: #0B5B9C; min-width: 90px; text-align: center; padding: 10px 14px; background: #fff; border: 3px solid #A9DFFF; border-radius: 20px; }
/* answer buttons: big numbers, picture buttons */
#stage:has(.lk-num) .choices:not(.num-choices) { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
#stage:has(.lk-num) .choices:not(.num-choices) .choice .cap { font-size: 30px; font-weight: 800; padding: 14px 8px; }
#stage:has(.lk) .lk-o.tapcount.counted > * { opacity: .55; }
#stage:has(.lk) .choices:not(.num-choices):has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#stage:has(.lk-pc) .choices { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
/* tap-the-group cards */
.groups.lk-g .lk-set { --pad: 132px; }
.groups.lk-g .lk-set { --max: 96px; }
.groups.lk-g.lk-one .lk-o { --o: 140px; }
.groups.lk-g.lk-one .lk-sh { --o: 90px; }
.groups.pick-row.lk-one > .pick-pic { min-width: 190px; min-height: 190px; }
.groups.lk-g .lk-tf { --max: 64px; }
.groups.lk-g.lk-base { align-items: stretch; }
.groups.pick-row.lk-base > .pick-pic { place-items: end center; }
.groups.lk-lens { flex-direction: column; align-items: stretch; }
.groups.pick-row.lk-lens > .pick-pic { place-items: center start; justify-content: stretch; grid-template-columns: 100%; min-height: 0; min-width: 0; padding: 14px 16px; }
.lk-lenbox { display: block; width: 100%; max-width: 520px; }
.lk-lenbox svg { display: block; height: auto; }
/* explanation copies */
.lk-exv { margin-top: 8px; }
.lk-exv .lk-set, .exp-sec .lk-set, .example-card .lk-set { --pad: 170px; --max: 84px; }
.lk-ex { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; margin: 10px 0; }
.lk-ex.lk-lens { flex-direction: column; align-items: stretch; }
.lk-ex.lk-base { align-items: flex-end; }
.lk-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 14px 10px; background: #fff; border: 3px solid #CFE3F7; border-radius: 18px; }
.lk-ex.lk-lens .lk-card { align-items: flex-start; }
.lk-card.ok { border-color: #22C55E; box-shadow: 0 0 0 4px #BBF7D0; }
.lk-card > .lk-tag { position: absolute; top: -12px; left: 12px; padding: 0 9px; border-radius: 10px; background: #0B6FB8; color: #fff; font-size: 14px; line-height: 22px; }
.lk-card.ok > .lk-tag { background: #16A34A; }
.lk-ex.lk-one .lk-o { --o: 104px; }
.lk-val { font-size: 20px; color: #0B2E57; }
.lk-card > .lk-o { --o: 108px; }
.lk-card > .pic { width: 108px; height: 108px; margin: 0; }
/* coins */
.lk-coin { display: block; width: calc(var(--o, 84px) * var(--k, 1)); height: calc(var(--o, 84px) * var(--k, 1)); }
.lk-coin img.money { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 2px 3px rgba(60, 40, 0, .3)); }
.lk-coin img.money[hidden], .lk-coinsvg[hidden] { display: none; }
.lk-coinsvg { display: block; width: 100%; height: 100%; }
.lk-coinsvg svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(60, 40, 0, .3)); }
.lk-show .lk-coin { --o: 90px; }
/* comparing: needs and pairs */
.lk-pairs { display: grid; grid-template-columns: repeat(var(--cols), var(--o)); gap: 10px; justify-content: center; margin: 10px auto; --max: 108px; }
.lk-pcol { display: flex; flex-direction: column; align-items: center; }
.lk-blank { width: var(--o); height: var(--o); }
.lk-link { width: 4px; height: 26px; margin: 4px 0; border-radius: 2px; }
.lk-link.on { background: #22C55E; }
.lk-miss > .pic { outline: 4px dashed #F97316; outline-offset: 3px; border-radius: 18%; }
.lk-extra { opacity: .55; }
.lk-stackv { display: flex; flex-direction: column; align-items: center; }
.lk-sep { width: min(100%, 420px); border-top: 3px dashed #CFE3F7; margin: 4px 0; }
/* positions: box, table, column, shelves, line, left-middle-right */
.lk-it { display: inline-flex; }
.scene .lk-it > .pic { width: 118px; height: 118px; }
.scene-shelf.lk-shelf .lk-it > .pic { width: 104px; height: 104px; }
.lk-tscene { display: flex; align-items: flex-end; justify-content: center; gap: 20px; margin: 16px auto 6px; padding: 18px 16px 0; background: #fff; border: 3px solid #BFE3F7; border-radius: 18px; max-width: 560px;
  --o: min(92px, calc((100vw - 150px) / 3)); }
.lk-table { width: min(260px, calc(var(--o) * 2.6)); display: flex; flex-direction: column; align-items: center; }
.lk-ontop { padding-bottom: 2px; }
.lk-board { width: 100%; height: 18px; border-radius: 6px; background: linear-gradient(180deg, #B07A45, #7A4A1E); box-shadow: 0 3px 0 #5C3714; }
.lk-under { position: relative; width: 88%; display: flex; justify-content: space-between; align-items: flex-end; padding-top: 18px; border-bottom: 8px solid #CFE3F7; }
.lk-leg { width: 14px; align-self: stretch; margin-top: -18px; background: linear-gradient(90deg, #8B5A2B, #6B4220); border-radius: 0 0 4px 4px; }
.lk-side { border-bottom: 8px solid #CFE3F7; }
.lk-colsc { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 12px auto; padding: 14px; width: max-content; background: #fff; border: 3px solid #BFE3F7; border-radius: 18px; --o: 84px; }
.lk-linesc { display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 14px auto; padding: 18px 14px; background: #fff; border: 3px solid #BFE3F7; border-bottom: 10px solid #A5D6A7; border-radius: 18px; max-width: 600px;
  --o: min(92px, calc((100vw - 150px) / 4.4)); }
.lk-gap { flex: 1; min-width: calc(var(--o) * .6); max-width: 140px; }
.lk-lr { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 10px; margin: 14px auto; padding: 18px 14px 12px; max-width: 520px; background: #fff; border: 3px solid #BFE3F7; border-radius: 18px;
  --o: min(104px, calc((100vw - 150px) / 3.3)); }
.lk-lrc { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lk-pill { padding: 2px 14px; border-radius: 999px; background: #E0F2FE; color: #0B5B9C; font-size: 16px; }
/* patterns */
.lk-pat { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 10px; margin: 10px auto 14px; padding: 14px; background: #fff; border: 3px solid #CFE3F7; border-radius: 18px; --max: 96px; --pad: 130px; }
.lk-q { display: grid; place-items: center; width: var(--o); height: var(--o); border: 3px dashed #F59E0B; border-radius: 16px; background: #FFFBEB; color: #F59E0B; font-size: calc(var(--o) * .5); font-weight: 800; }
.lk-pat .lk-sh, .groups.lk-g.lk-one .lk-sh { --k: .85; }
.groups.lk-g.lk-sizes .lk-o { --o: 140px; }
.lk-pat.lk-sizes { --max: 104px; --per: 4.5; }
.groups.pick-row.lk-sizes > .pick-pic { place-items: end center; }
/* size: towers, strips, balance */
.lk-tower { display: flex; flex-direction: column-reverse; align-items: center; }
.lk-tower i { display: block; width: min(52px, calc((100vw - 200px) / 4)); height: min(30px, calc((100vw - 200px) / 7)); border: 2px solid rgba(0, 0, 0, .25); border-radius: 5px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .14); }
.lk-strip { display: block; height: 150px; width: calc(var(--w) * min(110px, calc((100vw - 220px) / 3))); border-radius: 4px; background: var(--c); border: 2px solid var(--cd); }
.lk-strip.ribbon { background: repeating-linear-gradient(180deg, var(--c) 0 14px, color-mix(in srgb, var(--c) 70%, #fff) 14px 20px); }
.lk-strip.road { background: linear-gradient(90deg, #616161 0 calc(50% - 2px), #fff calc(50% - 2px) calc(50% + 2px), #616161 calc(50% + 2px)); border-color: #424242; }
.lk-strip.river { background: repeating-linear-gradient(170deg, #4FC3F7 0 10px, #29B6F6 10px 20px); border-color: #0288D1; }
.lk-bal { position: relative; width: min(100%, 380px); height: calc(var(--o) + 130px); margin: 10px auto; --o: min(96px, calc((100vw - 150px) / 3)); }
.lk-beam { position: absolute; left: 8%; right: 8%; top: calc(var(--o) + 30px); height: 10px; border-radius: 5px; background: #6D4C41; transform: rotate(var(--t)); }
.lk-pan { position: absolute; bottom: 8px; transform: rotate(calc(var(--t) * -1)); transform-origin: 50% 100%; display: flex; flex-direction: column; align-items: center; }
.lk-pan::after { content: ''; display: block; width: calc(var(--o) + 24px); height: 12px; margin-top: 2px; border-radius: 0 0 40px 40px; background: #B0BEC5; border: 2px solid #78909C; }
.lk-pan.l { left: calc(var(--o) * -0.4); }
.lk-pan.r { right: calc(var(--o) * -0.4); }
.lk-post { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 0; height: 0; border-left: 34px solid transparent; border-right: 34px solid transparent; border-bottom: 86px solid #8D6E63; }
.lk-post::after { content: ''; position: absolute; left: -48px; top: 86px; width: 96px; height: 10px; border-radius: 5px; background: #6D4C41; }
.lk-sc .lk-it > .pic { width: 112px; height: 112px; }
@media (max-width: 560px) {
  .lk .lk-say { font-size: 19px; }
  .groups.lk-g.lk-stack { flex-direction: column; align-items: stretch; }
  .groups.lk-g.lk-stack .lk-set { --pad: 126px; }
  .groups.pick-row.lk-one > .pick-pic { min-width: 0; min-height: 110px; padding: 10px; }
  .groups.lk-g.lk-one .lk-o { --o: 96px; }
  .groups.lk-g.lk-one .lk-sh { --o: 66px; }
  .groups.lk-g.lk-sizes .lk-o { --o: 64px; }
  .groups.pick-row.lk-one { gap: 10px; }
  .lk-ex.lk-stack { flex-direction: column; align-items: stretch; }
  .lk-ex.lk-one .lk-o { --o: 76px; }
  .scene.scene-box.lk-sc { gap: 26px; padding: 40px 8px 12px; }
  .lk-sc .lk-it > .pic { width: 72px; height: 72px; }
  .scene-box.lk-sc .box { width: 116px; height: 96px; }
  .scene-box.lk-sc .box::before, .scene-box.lk-sc .box::after { width: 44px; top: -22px; height: 24px; }
  .scene-box.lk-sc .box::before { left: -26px; }
  .scene-box.lk-sc .box::after { right: -26px; }
  .scene-box.lk-sc .box .front { height: 40px; }
  #stage:has(.lk-pc) .choices { grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
  #stage:has(.lk-pc) .choice .cap > .pic:only-of-type { width: 72px; height: 72px; }
  #stage:has(.lk-pc) .choice .cap { font-size: 16px; padding: 10px 6px; }
  .lk-big { font-size: 56px; min-width: 70px; }
  .groups.lk-g.lk-one .lk-coin { width: 96px; height: 96px; }
  .groups.lk-g.lk-one:has(.lk-coin) { flex-wrap: wrap; }
  .groups.lk-g.lk-one:has(.lk-coin) > div { flex: 1 1 40%; }
}
/* LKG/UKG bank pictures */
/* picture answers: the picture shrinks to the tile on narrow screens instead of being cut off */
.choice.pic-choice .opic { grid-template-columns: minmax(0, 1fr); }
.choice.pic-choice .opic > .mxv-opt { justify-self: center; }
/* counting groups ("Imran: 5 ? Priya: 5"): never wider than the card */
.visual .mxv-groups, .visual .mxv-board { max-width: 100%; height: auto; }
/* counting pictures: one real object per picture, at least 80px, in neat rows of 5 */
.mxv-named.many.mxv-group img { width: 80px; height: 80px; object-fit: contain; }
.mxv-named.many.mxv-count { max-width: 450px; gap: 6px; }
.mxv-named.many.mxv-count img.mxv-gone { opacity: .3; filter: grayscale(1); outline: 3px dashed #dc2626; outline-offset: -3px; border-radius: 10px; }
/* two groups side by side ("Imran: 5  ?  Priya: 5"); groups in rows of 3 */
.mxv-2g { align-items: center; gap: 12px 10px; flex-wrap: nowrap; }
.mxv-2g .mxv-group { flex: 0 1 264px; max-width: 264px; }
.mxv-2g .mxv-named.many.mxv-group.mxv-many10 img { width: 52px; height: 52px; } /* a pile of more than ten beside another group: smaller, so both stay in view */
.mxv-2g .mxv-vs { font-size: 34px; font-weight: 800; color: #0f766e; min-width: 28px; text-align: center; }
/* groups as the answers to tap: two big group tiles, word answers ("Same number") full width under them */
.pic-choices:has(.mxv-gopt) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pic-choices:has(.mxv-gopt) > .choice:not(.pic-choice) { grid-column: 1 / -1; }
.choice .opic:has(.mxv-gopt) { min-height: 120px; }
.mxv-gopt .mxv-group { max-width: 264px; }
.mxv-gopt .mxv-group.mxv-many10 img { width: 56px; height: 56px; }
@media (max-width: 560px) {
  .mxv-named.many.mxv-count { max-width: 264px; }
  .mxv-named.many.mxv-group img { width: 80px; height: 80px; }
  .pic-choices:has(.mxv-gopt) { grid-template-columns: minmax(0, 1fr); }
  .mxv-2g { flex-wrap: wrap; }
  .mxv-gopt .mxv-group.mxv-many10 img { width: 48px; height: 48px; }
}
/* Teacher diagrams (explain-figs.js) */
.why-fig { justify-content: center; align-items: stretch; gap: 12px; }
.why-fig .xf { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; margin: 0; padding: 10px 12px 8px; max-width: 360px; border: 2px solid #E2E8F0; border-radius: 12px; background: #fff; }
.why-fig .xf.xf-wide { flex: 1 1 300px; max-width: 420px; }
.why-fig .xf-ok { border-color: #16A34A; background: #F0FDF4; }
.why-fig .xf-bad { border-color: #F97316; background: #FFF7ED; }
.why-fig .xf-mark { position: absolute; top: -11px; right: -11px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 14px; color: #fff; }
.why-fig .xf-ok .xf-mark { background: #16A34A; }
.why-fig .xf-bad .xf-mark { background: #F97316; }
.why-fig figcaption { font-size: 14px; font-weight: 700; color: #1F2937; text-align: center; line-height: 1.3; }
.why-fig .xf-shape { width: 140px; height: auto; }
.why-fig .xf-line-svg, .why-fig .xf-bars { width: 100%; max-width: 400px; height: auto; }
.why-fig .xf-vbars { max-width: 220px; }
.why-fig .xf-coin { width: 76px; height: 76px; }
.why-fig .xf-jug { width: 70px; height: auto; }
.why-fig .xf-row { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.why-fig .xf-line { display: flex; gap: 4px; justify-content: center; }
.why-fig .xf-c { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; min-width: 46px; }
.why-fig .xf-c > b { font-size: 13px; font-weight: 800; color: #fff; background: #1E88E5; border-radius: 10px; min-width: 20px; padding: 0 5px; line-height: 18px; text-align: center; }
.why-fig .xf-c.xf-gone .xf-o { opacity: .35; }
.why-fig .xf-c.xf-gone > b { background: #F97316; }
.why-fig .xf-o { display: inline-grid; place-items: center; }
.why-fig .xf-o > .pic, .why-fig .xf-o > svg, .why-fig .xf-o .lk-sh, .why-fig .xf-o .lk-coin { width: 46px !important; height: 46px !important; margin: 0 !important; font-size: 0; }
.why-fig .xf-o .lk-dot { width: 26px; height: 26px; }
.why-fig .xf-small .xf-o > .pic, .why-fig .xf-small .xf-o > svg { width: 34px !important; height: 34px !important; }
.why-fig .xf-grp { min-width: 120px; }
.why-fig .xf-tag { font-size: 14px; color: #0B3D78; background: #E3F2FD; border-radius: 6px; padding: 0 8px; }
.why-fig .xf-num { font-size: 26px; font-weight: 900; color: #0B3D78; line-height: 1; }
.why-fig .xf-op { font-size: 30px; font-weight: 900; color: #0B3D78; }
.why-fig .xf:has(> .xf-op) { border: 0; background: transparent; padding: 0; justify-content: center; }
.why-fig .xf-seq { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.why-fig .xf-seq b { min-width: 40px; padding: 4px 8px; border: 2px solid #1E88E5; border-radius: 8px; font-size: 18px; text-align: center; color: #0B3D78; background: #E3F2FD; }
.why-fig .xf-seq b.on { border-color: #16A34A; background: #DCFCE7; color: #166534; }
.why-fig .xf-seq i { font-style: normal; font-size: 13px; font-weight: 800; color: #E8590C; }
.why-fig .xf-seq i::after { content: ' →'; }
.why-fig .xf-seq i.lt { font-size: 20px; color: #0B3D78; }
.why-fig .xf-seq i.lt::after { content: ''; }
.why-fig .xf-pos { flex-wrap: wrap; }
.why-fig .xf-col { border-collapse: collapse; font-size: 20px; font-weight: 800; color: #0B3D78; font-family: Arial, sans-serif; }
.why-fig .xf-col td { width: 34px; height: 30px; text-align: center; }
.why-fig .xf-col .xf-h td { font-size: 13px; color: #fff; background: #1E88E5; }
.why-fig .xf-col .xf-h td:first-child { background: transparent; }
.why-fig .xf-col .xf-carry td { font-size: 13px; color: #E8590C; height: 18px; }
.why-fig .xf-col .xf-res td { border-top: 3px solid #0B3D78; color: #166534; }
.why-fig .xf-sz { justify-content: flex-end; }
.why-fig .xf-size .pic { width: calc(64px * var(--z, 1)) !important; height: calc(64px * var(--z, 1)) !important; margin: 0 !important; }
.why-fig .xf-bal { display: flex; flex-direction: column; align-items: center; width: 220px; max-width: 100%; }
.why-fig .xf-pans { display: flex; justify-content: space-between; width: 86%; }
.why-fig .xf-beam { width: 100%; height: 7px; border-radius: 4px; background: #0B3D78; transform: rotate(-10deg); margin: 2px 0 4px; }
.why-fig .xf-post { width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 26px solid #6D4C41; margin-top: -6px; }
.why-fig .xf-labs { display: flex; justify-content: space-between; width: 100%; font-size: 13px; font-weight: 800; color: #0B3D78; }
.why-fig .xf-labs em { font-style: normal; }
.why-fig .xf-pan { display: flex; flex-direction: column; align-items: center; font-size: 13px; font-weight: 700; }
.why-fig .xf-pan.down { transform: translateY(20px); }
.why-fig .xf-pan.up { transform: translateY(-14px); }
.why-fig .xf-pan em { font-style: normal; }
.why-fig .xf-pan .pic { width: 52px !important; height: 52px !important; margin: 0 !important; }
.why-fig .xf-pos { display: flex; gap: 10px; align-items: flex-end; justify-content: center; }
.why-fig .xf-pos.xf-pcolv { flex-direction: column; align-items: center; gap: 4px; }
.why-fig .xf-pos .pic { width: 46px !important; height: 46px !important; margin: 0 !important; }
.why-fig .xf-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 10px; border: 2px solid transparent; }
.why-fig .xf-cell.ok { border-color: #16A34A; background: #F0FDF4; }
.why-fig .xf-box.ok, .why-fig .xf-box.bad { border-color: #8D6E63; outline: 3px solid #16A34A; outline-offset: 3px; }
.why-fig .xf-box.bad { outline-color: #F97316; }
.why-fig .xf-cell.bad { border-color: #F97316; background: #FFF7ED; }
.why-fig .xf-pos em { font-style: normal; font-size: 13px; font-weight: 800; color: #0B3D78; }
.why-fig .xf-box { display: flex; flex-direction: column; align-items: center; padding: 6px 12px; border: 4px solid #8D6E63; border-top-style: dashed; border-radius: 4px 4px 10px 10px; background: #FFF3E0; }
.why-fig .xf-outside { display: flex; flex-direction: column; align-items: center; }
.why-fig .xf-o.hl { outline: 3px solid #16A34A; outline-offset: 2px; border-radius: 10px; }
.why-fig .xf-tablesc { flex-direction: column; align-items: center; gap: 0; }
.why-fig .xf-tab { display: block; width: 140px; height: 10px; background: #8D6E63; border-radius: 4px; margin: 2px 0; }
.why-fig .xf-big .pic, .why-fig .xf-big > svg { width: 64px !important; height: 64px !important; margin: 0 !important; }
.why-fig .xf-big .lk-sh, .why-fig .xf-big .lk-coin { width: 64px !important; height: 64px !important; }
.why-fig .xf-pat { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.why-fig .xf-unit { display: inline-flex; gap: 2px; padding: 3px; border: 2px dashed #1E88E5; border-radius: 8px; }
.why-fig .xf-unit .pic, .why-fig .xf-unit .lk-sh, .why-fig .xf-unit .lk-z { width: 34px !important; height: 34px !important; margin: 0 !important; }
.why-fig .xf-unit .lk-z .pic { width: calc(34px * var(--z, 1)) !important; height: calc(34px * var(--z, 1)) !important; }
.why-fig .xf-unit .xf-o.hl { outline: 3px solid #16A34A; outline-offset: 1px; border-radius: 6px; background: #DCFCE7; }
.why-fig .xf-boxsc { gap: 26px; }
.why-fig .xf-bignum { font-size: 56px; line-height: 1.1; font-weight: 900; color: #0B3D78; font-family: Arial, Helvetica, sans-serif; min-width: 60px; text-align: center; }
.why-fig .xf-pv { max-width: 100%; height: auto; }
.why-fig .xf-letter { font-size: 26px; font-weight: 900; color: #0B3D78; padding: 0 3px; font-family: Arial, Helvetica, sans-serif; }
.why-fig .nline { margin: 0 !important; }
.why-fig .lk-tf { --max: 40px; --pad: 300px; }
.why-fig .lk-set:not(.lk-tf) { --max: 40px; }@media (max-width: 560px) {
  .why-fig { gap: 10px; padding: 6px; }
  .why-fig .xf { padding: 8px 6px 6px; max-width: 100%; }
  .why-fig .xf-shape { width: 100%; max-width: 110px; }
  .why-fig .xf:not(.xf-wide) { flex: 1 1 40%; min-width: 0; }
  .why-fig .xf-mark { top: -9px; right: -7px; width: 20px; height: 20px; font-size: 12px; }
  .why-not { padding: 8px 10px; }
  .why-fig .xf-c { min-width: 38px; }
  .why-fig .xf-o > .pic, .why-fig .xf-o > svg, .why-fig .xf-o .lk-sh, .why-fig .xf-o .lk-coin { width: 36px !important; height: 36px !important; }
  .why-fig .xf-grp { min-width: 0; flex: 1 1 130px; }
  .why-fig figcaption { font-size: 12px; }
}

/* Class I–II pictures */
/* ten-rods and unit cubes (place value): a compact picture, not a full-width one */
.mxv-q .mxv-tens, .mxv-explain .mxv-tens, .mxv-q:has(> svg.mxv-tens), .mxv-explain:has(> svg.mxv-tens) { max-width: 280px; margin: 0 auto; }

/* ---------- Multi-school portal (portal.js) ---------- */
.rk { display: inline-block; border-radius: 999px; padding: .1rem .6rem; font-size: 12px; font-weight: 700; border: 1px solid transparent; line-height: 1.35; max-width: 260px; }
.rk.good { background: #DCFCE7; border-color: #86EFAC; color: #166534; }
.rk.ok { background: #E0F2FE; border-color: #7DD3FC; color: #075985; }
.rk.warn { background: #FFEDB8; border-color: #F1C14C; color: #6B4E00; }
.rk.bad { background: #FEE2E2; border-color: #FCA5A5; color: #991B1B; }
.rk.muted { background: #F1F5F9; border-color: #CBD5E1; color: #475569; }
.rk.master { background: linear-gradient(90deg, #FFE08A, #FFC940); border-color: #E0A800; color: #6B4500; }
.chip { display: inline-block; background: #EEF6FF; border: 1px solid #CFE3F7; border-radius: 999px; padding: .1rem .6rem; font-size: 12px; margin: 2px 2px 2px 0; }
.chip button { padding: 0 .3rem; min-height: 0; }
.badge { display: inline-block; min-width: 1.3rem; border-radius: 999px; background: #EF4444; color: #fff; font-size: 11px; padding: 0 .35rem; margin-left: .25rem; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .6rem 1rem; margin-bottom: .75rem; }
.form-grid label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: 14px; }
.form-grid label.check { flex-direction: row; }
.dialog.wide { width: min(760px, 100%); max-height: 90vh; overflow: auto; }
.sec { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .35rem 0; }
.small-list { margin: .25rem 0 .75rem 1.1rem; font-size: 14px; }
.pick-students { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .25rem 0 .75rem; max-height: 180px; overflow: auto; }
.hw { border-bottom: 1px solid #EAF1F8; padding: .6rem 0; }
.hw:last-child { border-bottom: 0; }
.hw-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.hw-head .muted { flex: 1; font-size: 13px; }
.hw details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: .25rem 0; }
.alert-row { padding: .45rem .6rem; border-left: 4px solid #CBD5E1; margin: .3rem 0; background: #F8FAFC; border-radius: 0 8px 8px 0; font-size: 14px; }
.alert-row.new { background: #FFFBEB; }
.alert-row.homework { border-left-color: #2376DC; } .alert-row.done, .alert-row.mastered { border-left-color: #16A34A; } .alert-row.remedial { border-left-color: #DC2626; }
.vbars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 18px; }
.vbars .vb { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.vbars .vb span { width: 70%; min-height: 2px; background: linear-gradient(180deg, #13B6D1, #168EEA); border-radius: 4px 4px 0 0; }
.vbars .vb small { font-size: 10px; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.vbars .vb b { position: absolute; top: 0; font-size: 11px; color: var(--navy); }
.nowrap { white-space: nowrap; }
.vbars .vb:not(:nth-last-child(5n+1)) small { visibility: hidden; }
.toolbar label.inline { display: flex; gap: .35rem; align-items: center; font-weight: 600; font-size: 14px; }
/* Trends: before and after (portal.js trendSection, trendsTab) */
.ba-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ba-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.ba-card h3 { margin: 0 0 6px; font-size: 15px; }
.ba-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ba-row small { display: block; color: var(--muted); font-size: 12px; }
.ba-row b { font-size: 26px; color: var(--navy); }
.ba-arrow { font-size: 22px; color: var(--muted); }
.chg { display: inline-block; font-weight: 800; border-radius: 999px; padding: .1rem .6rem; background: #F1F5F9; color: #475569; }
.chg.up { background: #DCFCE7; color: #166534; }
.chg.down { background: #FEE2E2; color: #991B1B; }
.trend-chart { width: 100%; max-width: 760px; height: auto; display: block; }
.trend-chart .grid { stroke: #E2E8F0; }
.trend-chart .gl { font-size: 10px; fill: #94A3B8; }
.trend-chart .line { fill: none; stroke: #168EEA; stroke-width: 3; stroke-linejoin: round; }
.trend-chart .dot { fill: #fff; stroke: #168EEA; stroke-width: 3; }
.trend-chart .val { font-size: 11px; font-weight: 700; fill: var(--navy); text-anchor: middle; }
.trend-chart .wk { font-size: 11px; fill: var(--muted); text-anchor: middle; }
.trend-chart .qn { font-size: 10px; fill: #94A3B8; text-anchor: middle; }
.spark path { fill: none; stroke: #168EEA; stroke-width: 2; }
.spark circle { fill: #168EEA; }
/* Leaderboards and certificates (portal.js leaderboardView) */
.lb-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.lb-table tr.me td { background: #FFFBEB; }
.medal { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: #E2E8F0; color: #334155; }
.medal.m1 { background: linear-gradient(135deg, #FFE08A, #F5B700); color: #5B3B00; }
.medal.m2 { background: linear-gradient(135deg, #F1F5F9, #A8B4C4); color: #1F2937; }
.medal.m3 { background: linear-gradient(135deg, #F6C9A0, #C27C3E); color: #3F1F00; }
.board-top { background: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--shadow); display: flex; gap: .6rem 1.2rem; flex-wrap: wrap; align-items: center; font-size: clamp(14px, 1.2vw, 20px); }
.board-top b.ttl { color: var(--navy); }
.certificate { background: #fff; border: 10px double #C9A227; border-radius: 6px; padding: 36px 40px; margin: 0 auto 24px; max-width: 760px; text-align: center; color: #10345F; page-break-after: always; break-after: page; }
.certificate h1 { font-size: 34px; margin: .3rem 0 1rem; color: #07366B; }
.certificate .cert-brand { font-weight: 700; letter-spacing: .06em; color: #168EEA; font-size: 11px; margin-top: 18px; }
.certificate .cert-school { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.certificate .cert-school img { max-height: 90px; max-width: 220px; object-fit: contain; }
.certificate .cert-school span { font-size: 24px; font-weight: 800; color: #07366B; letter-spacing: .02em; }
.logo-row { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.logo-prev img { max-height: 70px; max-width: 180px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.certificate .cert-name { font-size: 32px; font-weight: 800; border-bottom: 2px solid #C9A227; display: inline-block; padding: 0 1.5rem .2rem; margin: .3rem 0 .6rem; }
.certificate .cert-sign { display: flex; justify-content: space-between; margin-top: 48px; }
.certificate .cert-sign span { border-top: 1px solid #94A3B8; padding-top: 4px; min-width: 160px; font-size: 13px; color: #475569; }
/* Support tab (portal.js supportTab) */
.support-row { border: 1px solid var(--line); border-left: 5px solid #EF4444; border-radius: 10px; padding: .6rem .85rem; margin: .6rem 0; background: #fff; }
.support-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .3rem; }
.support-item { display: flex; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; padding: .45rem 0; border-top: 1px dashed #E2E8F0; font-size: 14px; }
.support-item .title { flex: 1 1 260px; }
.support-item .easier { font-size: 13px; }
.support-item .lower-wrap { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; }
.lower-line { display: flex; flex-wrap: wrap; gap: .25rem .6rem; align-items: center; margin-top: .3rem; }
.lower-line small { max-width: 38ch; }
.alert-row.improved { border-left-color: #16A34A; } .alert-row.recheck { border-left-color: #DC2626; }
/* Guest free try finished (practice.js showGuestLimit) */
.limit-over { display: inline-block; margin: 0 0 .4rem; padding: .3rem .9rem; border-radius: 999px; background: #FEE2E2; border: 1px solid #FCA5A5; color: #991B1B; font-weight: 800; font-size: 15px; }
/* Name search with suggestions (portal.js personSearch) */
.search-wrap { position: relative; display: inline-block; flex: 1 1 280px; min-width: 0; }
.search-wrap input { width: 100%; }
.find-card .search-wrap { display: block; max-width: 640px; }
.suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(6, 53, 96, .16); max-height: 360px; overflow: auto; padding: 4px; }
.suggest .sg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: .5rem .65rem; min-height: 0; color: var(--ink); cursor: pointer; }
.suggest .sg span { font-size: 12.5px; color: var(--muted); }
.suggest .sg:hover, .suggest .sg.on { background: #EAF4FF; }
.suggest .sg-none { padding: .6rem .7rem; color: var(--muted); font-size: 14px; }
/* Attempt history (portal.js attemptsPage) */
.att-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.att-stats .stat-card { min-height: 0; }
@media (max-width: 600px) {
  .att-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .att-stats .stat-card { padding: 12px; }
  .att-stats .stat { font-size: 26px; }
}
.cards3 > .stat-card.low { border-top-color: #DC2626; }
.cards3 > .stat-card.high { border-top-color: #16A34A; }
.att-notes { margin: .25rem 0 1rem 1.1rem; line-height: 1.6; }
.att-chart { display: block; width: 100%; max-width: 900px; height: auto; max-height: 260px; }
.att-chart text.in { fill: #fff; }
.att-chart .axis { stroke: #CBD5E1; }
.att-chart .ab rect { fill: #168EEA; }
.att-chart .ab.low rect { fill: #EF4444; }
.att-chart .ab.high rect { fill: #16A34A; }
.att-chart text { font-size: 11px; fill: var(--navy); font-weight: 700; }
.att-chart text.lab { fill: var(--muted); font-weight: 600; }
.att-chart .sline { fill: none; stroke: #F59E0B; stroke-width: 2.5; }
.att-chart .sdot { fill: #fff; stroke: #F59E0B; stroke-width: 2; }
.att-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.att-key > span { white-space: nowrap; }
.att-key .k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: .3rem; }
.att-key .k-marks { background: #168EEA; } .att-key .k-low { background: #EF4444; } .att-key .k-high { background: #16A34A; }
.att-key .k-score { height: 3px; background: #F59E0B; vertical-align: 3px; }
.att { border: 1px solid var(--line); border-left: 5px solid #93C5FD; border-radius: 10px; margin: .5rem 0; background: #fff; }
.att.low { border-left-color: #EF4444; }
.att.high { border-left-color: #16A34A; }
.att summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; align-items: center; padding: .65rem .85rem; font-size: 14px; }
.att summary .att-no { font-weight: 800; color: var(--navy); min-width: 9.5rem; }
.att summary .att-when { color: var(--muted); min-width: 10.5rem; }
.att .up { color: #15803D; font-weight: 800; }
.att .down { color: #B91C1C; font-weight: 800; }
.att-body { padding: 0 .85rem .85rem; border-top: 1px solid #EAF1F8; }
.att-strip { display: flex; flex-wrap: wrap; gap: 4px; margin: .7rem 0; }
.att-strip span { width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; }
.att-strip .ok { background: #16A34A; }
.att-strip .no { background: #EF4444; }
/* Attempts review: every question with the answer given, the right answer and the explanation */
.att-qs { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .6rem; }
.att-q { border: 1px solid #E2E8F0; border-left: 4px solid #CBD5E1; border-radius: 10px; padding: .55rem .75rem; font-size: 14px; background: #fff; }
.att-q.ok { border-left-color: #16A34A; background: #FAFFFB; }
.att-q.no { border-left-color: #EF4444; background: #FFFAFA; }
.att-qh { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .2rem; }
.att-badge { border-radius: 999px; padding: .05rem .6rem; font-size: 12px; font-weight: 800; }
.att-badge.ok { background: #DCFCE7; color: #166534; }
.att-badge.no { background: #FEE2E2; color: #991B1B; }
.att-qt { margin: .15rem 0 .3rem; line-height: 1.45; white-space: pre-line; }
.att-ans { margin: .15rem 0; }
.att-ans b.no { color: #B91C1C; }
.att-ans b.ok { color: #15803D; }
.att-exp { margin-top: .3rem; padding: .4rem .65rem; background: #F0F7FF; border-left: 3px solid #3B82F6; border-radius: 0 8px 8px 0; font-size: 13.5px; line-height: 1.5; color: #1E3A5F; }
.att-exp b { color: #1D4ED8; }
.att-exp.none { background: none; border-left-color: #CBD5E1; color: #64748B; font-style: italic; }
.att-all[data-f="wrong"] .att-q.ok { display: none; }
.att-allright { display: none; }
.att-all[data-f="wrong"] .att-allright { display: block; }
.seg { display: inline-flex; border: 1px solid #BFD8F2; border-radius: 999px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: .35rem .9rem; font-size: 13px; font-weight: 700; color: var(--navy); cursor: pointer; border-radius: 0; box-shadow: none; min-height: 0; }
.seg button.on { background: var(--blue); color: #fff; }
/* Parent dashboard */
.pd-child { margin: .4rem 0 .2rem; }
.pd-child h2 { margin: 0; }
.pd-child p { margin: 0; }
.pd-sec h2 { margin-bottom: .2rem; }
.pd-sec .pf-grid { margin: .6rem 0; }
.pd-subs { margin: .2rem 0 .6rem; }
.pd-mean { margin: .3rem 0 0; padding: .55rem .8rem; background: #F0F7FF; border-radius: 10px; line-height: 1.5; }
.pd-band { color: var(--c); font-size: 13px; }
.pd-group { margin: .9rem 0 .3rem; }
.pd-group h3 { margin: 0 0 .25rem; font-size: 16px; color: var(--navy); }
.pd-empty { padding: .8rem; background: #F7FBFF; border-radius: 10px; color: #475569; margin: .5rem 0 0; }
.pd-tags { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; margin-left: auto; }
.pd-hw.overdue { background: #FFF7F7; }
.pd-find { max-width: 240px; }
#pdHw[data-v="subject"] .pd-v-date, #pdHw[data-v="date"] .pd-v-subject { display: none; }

/* parent: the two options */
.pd-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin: .8rem 0 1rem; }
.pw-sub { margin: .2rem 0 .6rem; }
.pw-row { cursor: default; }
.pd-mode { position: relative; display: flex; gap: .9rem; align-items: center; padding: 1rem 1.15rem; border: 2px solid #D6E6F5; border-radius: 16px; background: #fff; color: var(--navy); text-decoration: none; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; min-width: 0; }
.pd-mode:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(6, 53, 96, .14); }
.pd-mode.on { background: linear-gradient(135deg, #0B6FB8, #168EEA); border-color: transparent; color: #fff; }
.pd-ic { font-size: 32px; line-height: 1; flex: none; }
.pd-mt { min-width: 0; }
.pd-mode b { display: block; font-size: 19px; }
.pd-mode small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.pd-mode.on small { color: rgba(255, 255, 255, .92); }
.pd-over { color: #B91C1C; font-weight: 800; }
.pd-mode.on .pd-over { color: #FECACA; }
.pd-badge { margin-left: auto; flex: none; min-width: 30px; height: 30px; padding: 0 .55rem; border-radius: 999px; display: grid; place-items: center; background: #F59E0B; color: #fff; font-style: normal; font-weight: 800; }
.pd-badge.bad { background: #DC2626; }
.pd-alerts { display: grid; gap: .5rem; margin: .6rem 0; }
.pd-alert { padding: .6rem .9rem; border-radius: 10px; border-left: 5px solid; font-weight: 600; line-height: 1.5; }
.pd-alert.bad { background: #FEF2F2; border-color: #DC2626; color: #7F1D1D; }
.pd-alert.warn { background: #FFFBEB; border-color: #F59E0B; color: #78350F; }
.pd-alert.info { background: #EFF6FF; border-color: #3B82F6; color: #1E3A8A; }
.pd-alert.good { background: #F0FDF4; border-color: #16A34A; color: #14532D; }
.rk.new { background: #EDE9FE; border-color: #C4B5FD; color: #5B21B6; }
/* parent: result trends and the review report */
.pr-verdict.up { background: #F0FDF4; }
.pr-verdict.down { background: #FEF2F2; }
.pr-days { display: grid; grid-template-columns: repeat(14, minmax(38px, 1fr)); gap: 6px; align-items: end; min-width: 560px; margin-top: 8px; }
.pr-day { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.pr-val { font-size: 12px; font-weight: 700; color: var(--navy); }
.pr-barwrap { width: 100%; height: 110px; display: flex; align-items: flex-end; background: #F1F6FB; border-radius: 8px; overflow: hidden; }
.pr-barwrap i { display: block; width: 100%; min-height: 3px; border-radius: 8px 8px 0 0; background: #94A3B8; }
.pr-barwrap i.hi { background: linear-gradient(180deg, #34D399, #16A34A); }
.pr-barwrap i.mid { background: linear-gradient(180deg, #3B9CF0, #0B6FB8); }
.pr-barwrap i.lo { background: linear-gradient(180deg, #F87171, #DC2626); }
.pr-day b { font-size: 12px; color: var(--navy); }
.pr-day.today b { color: #EA7A0C; }
.pr-day small { font-size: 11px; }
.pr-day em { font-style: normal; font-size: 11px; color: var(--muted); min-height: 14px; }
.pr-sum { margin: .3rem 0; }
.pr-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .5rem 0; }
.pr-toolbar select, .pr-toolbar input { max-width: 260px; }
.pr-dayhead { margin: 1.1rem 0 .15rem; font-size: 15px; color: var(--navy); }
.pr-sk { flex: 1 1 15rem; min-width: 0; }
.pr-more { margin-top: .6rem; text-align: center; }
@media (max-width: 640px) {
  .pd-modes { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pd-mode { padding: .7rem .8rem; flex-direction: column; align-items: flex-start; gap: .3rem; }
  .pd-ic { font-size: 26px; }
  .pd-mode b { font-size: 16px; }
  .pd-mode small { font-size: 12px; }
  .pd-badge { position: absolute; top: 8px; right: 8px; margin: 0; }
}
@media (max-width: 560px) {
  .pd-sec .skill-row { flex-wrap: wrap; }
  .pd-tags { justify-content: flex-start; margin-left: 0; width: 100%; }
  .att-all .row-head, .pd-sec .row-head { flex-wrap: wrap; gap: .5rem; }
}
/* Class Live Board (portal.js liveBoard): full screen on the classroom panel */
body[data-page="board"] .topbar, body[data-page="board"] .footer, body[data-page="board"] .landscape, body[data-page="board"] .side-art { display: none; }
body[data-page="board"] main#view { max-width: none; width: 100%; padding: 18px 24px; margin: 0; }
body[data-page="board"] { background: #EAF6FF; }
.board-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 14px; }
.board-head h1 { margin: 0; font-size: clamp(26px, 2.6vw, 44px); color: var(--navy); }
.board-head p { margin: .2rem 0 0; color: var(--muted); font-size: clamp(14px, 1.2vw, 20px); }
.board-tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.board-tools select { max-width: 380px; }
.board-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.board-stats > div { background: #fff; border-radius: 14px; padding: 12px 16px; border-top: 5px solid #168EEA; box-shadow: var(--shadow); }
.board-stats > div.bad { border-top-color: #DC2626; background: #FFF5F5; }
.board-stats > div.good { border-top-color: #16A34A; }
.board-stats b { display: block; font-size: clamp(28px, 3vw, 52px); line-height: 1.1; color: var(--navy); }
.board-stats b small { font-size: .5em; color: var(--muted); }
.board-stats span { color: var(--muted); font-size: clamp(13px, 1.1vw, 18px); font-weight: 600; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(220px, 17vw, 320px), 1fr)); gap: 14px; }
.bcard { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 16px; padding: 14px 16px; border: 3px solid #BFDBFE; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.bcard:hover { text-decoration: none; border-color: #168EEA; }
.bcard.quiet { opacity: .6; border-style: dashed; }
.bcard.help { border-color: #EF4444; background: #FFF5F5; animation: bpulse 1.6s ease-in-out infinite; }
.bcard.mastered { border-color: #16A34A; background: #F0FDF4; }
@keyframes bpulse { 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, .25); } }
@media (prefers-reduced-motion: reduce) { .bcard.help { animation: none; } }
.bname { font-size: clamp(20px, 1.7vw, 30px); font-weight: 800; color: var(--navy); line-height: 1.15; }
.bskill { font-size: clamp(12px, .95vw, 16px); color: var(--muted); min-height: 2.4em; }
.bnums { display: flex; justify-content: space-between; align-items: baseline; font-size: clamp(14px, 1.1vw, 19px); }
.bmarks { font-size: clamp(24px, 2.1vw, 38px); font-weight: 800; color: var(--navy); }
.bdots { display: flex; gap: 4px; min-height: 14px; }
.bdots i { width: 14px; height: 14px; border-radius: 50%; }
.bdots i.ok { background: #16A34A; } .bdots i.no { background: #EF4444; }
.bscore { height: 10px; background: #E2E8F0; border-radius: 99px; overflow: hidden; }
.bscore span { display: block; height: 100%; background: linear-gradient(90deg, #13B6D1, #168EEA); border-radius: 99px; }
.bfoot { display: flex; justify-content: space-between; font-size: clamp(12px, .95vw, 16px); color: var(--muted); }
.btags { display: flex; gap: 4px; flex-wrap: wrap; min-height: 22px; }
.btags .rk { font-size: clamp(12px, 1vw, 16px); }
.board-empty { font-size: 22px; color: var(--muted); text-align: center; padding: 3rem 1rem; background: #fff; border-radius: 16px; }
.board-idle { margin-top: 16px; font-size: clamp(14px, 1.1vw, 19px); color: var(--muted); background: #fff; border-radius: 12px; padding: 10px 14px; }
@media (max-width: 700px) { .board-stats { grid-template-columns: repeat(2, 1fr); } body[data-page="board"] main#view { padding: 12px; } }
/* ---------- Enquiry form (enquiry.js) ---------- */
.kind-toggle { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.req { color: #DC2626; }
.bad-input { border-color: #DC2626 !important; background: #FFF5F5; }
.small { font-size: 13px; }
.enq-done { text-align: center; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: .75rem 0 1rem; }
.price { border: 2px solid #CFE3F7; border-radius: 14px; padding: .8rem; background: #fff; display: flex; flex-direction: column; gap: .2rem; }
.price span { font-size: 26px; font-weight: 800; color: var(--navy); }
.price small { color: #166534; font-weight: 700; }
.price.all { border-color: #F5B700; background: #FFF9E6; }

/* ---------- Performance page: cards in the style of the school's CBT dashboard (performance.js) ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.pf-grid.pf-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pf-grid.pf-bands { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pf-card { background: #fff; border: 1px solid #E3EDF6; border-left: 6px solid var(--c, #2563EB); border-radius: 14px; padding: 13px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-card small { font-size: 13px; font-weight: 700; color: var(--muted); }
.pf-card b { font-size: 32px; line-height: 1.15; color: var(--c, #2563EB); font-weight: 800; overflow-wrap: anywhere; }
.pf-card span { font-size: 12.5px; color: var(--muted); }
.pf-h { font-size: 18px; margin: 18px 0 10px; color: var(--navy); }
.pf-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 12px; }
.pf-class { background: var(--bg); color: var(--fg); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; text-decoration: none; }
a.pf-class:hover { filter: brightness(.97); text-decoration: none; }
.pf-cap { font-size: 24px; line-height: 1; }
.pf-big { font-size: 40px; font-weight: 850; line-height: 1.05; }
.pf-big small { font-size: 18px; font-weight: 800; margin-left: 6px; opacity: .8; }
.pf-class > b { font-size: 15px; }
.pf-meta { font-size: 13px; opacity: .92; }
.pf-meta b { font-size: 14px; }
.pf-stack { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: rgba(255, 255, 255, .65); }
.pf-stack i { display: block; height: 100%; }
.pf-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pf-sub { background: rgba(255, 255, 255, .78); color: var(--fg); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.pf-sub b { font-weight: 850; }
.pf-sub:hover { background: #fff; text-decoration: none; }
@media (max-width: 900px) {
  .pf-grid, .pf-grid.pf-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .pf-grid { gap: 10px; }
  .pf-grid.pf-bands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-card { padding: 11px 12px; }
  .pf-card b { font-size: 26px; }
  .pf-class-grid { grid-template-columns: 1fr; }
}
.pf-class .pf-open { color: inherit; text-decoration: none; border-bottom: 2px solid currentColor; }
.pf-class .pf-open:hover { text-decoration: none; opacity: .8; }

/* Performance page v2: clickable level cards, 7-day trend, student list */
button.pf-card { font: inherit; text-align: left; cursor: pointer; width: 100%; display: flex; align-items: stretch; justify-content: flex-start; }
button.pf-card small, button.pf-card span { font-weight: 400; }
button.pf-card small { font-weight: 700; }
.pf-click { transition: transform .12s, box-shadow .12s; }
.pf-click:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(6, 53, 96, .12); }
.pf-click.on { background: color-mix(in srgb, var(--c) 10%, #fff); outline: 2px solid var(--c); }
.pf-view { margin-top: 6px; align-self: flex-start; background: rgba(255, 255, 255, .8); border-color: transparent; color: var(--fg); padding: .3rem .8rem; font-size: 13px; }
.pf-view:hover { background: #fff; }
.pf-trend { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; margin-top: 8px; }
.pf-day { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.pf-day .pf-val { font-size: 13px; font-weight: 700; color: var(--navy); }
.pf-barwrap { width: 100%; height: 120px; display: flex; align-items: flex-end; background: #F1F6FB; border-radius: 8px; overflow: hidden; }
.pf-barwrap i { display: block; width: 100%; min-height: 3px; background: linear-gradient(180deg, #3B9CF0, #0B6FB8); border-radius: 8px 8px 0 0; }
.pf-day.today .pf-barwrap i { background: linear-gradient(180deg, #F59E0B, #EA7A0C); }
.pf-day b { font-size: 13px; color: var(--navy); }
.pf-day small { font-size: 12px; }
.pf-day em { font-style: normal; font-size: 12px; color: var(--muted); }
.pf-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 12px; }
.pf-filters input[type=search] { flex: 1 1 240px; min-width: 0; }
.pf-table th[data-sort], .sort-table th[data-sort] { cursor: pointer; white-space: nowrap; user-select: none; }
.pf-table th[data-sort]::after, .sort-table th[data-sort]::after { content: ' ↕'; opacity: .35; }
.pf-table th[aria-sort=ascending]::after, .sort-table th[aria-sort=ascending]::after { content: ' ▲'; opacity: 1; color: var(--blue-dark); }
.pf-table th[aria-sort=descending]::after, .sort-table th[aria-sort=descending]::after { content: ' ▼'; opacity: 1; color: var(--blue-dark); }
.sort-table th[data-sort]:hover { color: var(--blue-dark); }
.pf-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); border: 1px solid color-mix(in srgb, var(--c) 45%, #fff); }
.pf-table .pf-rm { max-width: 340px; min-width: 220px; }
.pf-table .pf-rm-m { display: none; margin-top: 2px; }
/* skills a student needs help in: subject, skill and best score (red below 50, orange 50 to 69) */
.pf-weak ul { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 4px; }
.pf-weak li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; line-height: 1.35; padding: 3px 8px; border-radius: 8px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); text-align: left; }
.pf-weak li.rem { --c: #DC2626; }
.pf-weak li.sup { --c: #F97316; }
.pf-weak li em { font-style: normal; font-weight: 800; color: var(--c); white-space: nowrap; }
.pf-weak-h { display: block; font-weight: 700; color: var(--navy); }
.pf-guide { border-left: 6px solid var(--c, #94A3B8); }
.pf-guide p { margin: 0 0 .4rem; font-size: 16px; }
.pf-sortsel { display: none; }
@media (max-width: 900px) {
  .pf-table .pf-rm { display: none; }
  .pf-table .pf-rm-m { display: block; }
}
/* phones: each student is a small card instead of a wide table row */
@media (max-width: 700px) {
  .pf-sortsel { display: inline-block; }
  .pf-filters select, .pf-filters input[type=search] { flex: 1 1 100%; }
  .pf-table, .pf-table tbody { display: block; }
  .pf-table thead { display: none; }
  .pf-table tr { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name avg" "cls lvl" "last act" "rm rm"; gap: 4px 10px; align-items: center; border: 1px solid #E3EDF6; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: #fff; }
  .pf-table td { border: 0; padding: 0; }
  .pf-table .c-name { grid-area: name; }
  .pf-table .c-avg { grid-area: avg; justify-self: end; font-size: 22px; }
  .pf-table .c-cls { grid-area: cls; color: var(--muted); font-size: 14px; }
  .pf-table .c-lvl { grid-area: lvl; justify-self: end; }
  .pf-table .c-last { grid-area: last; color: var(--muted); font-size: 13px; }
  .pf-table .c-act { grid-area: act; justify-self: end; }
  .pf-table .c-q, .pf-table .c-wk { display: none; }
  .pf-table .pf-rm { display: block; grid-area: rm; max-width: none; padding-top: 4px; border-top: 1px dashed #E3EDF6; }
  .pf-table .pf-rm-m { display: none; }
  .pf-table tr td[colspan] { display: block; grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .pf-trend { gap: 4px; }
  .pf-barwrap { height: 90px; }
  .pf-day .pf-val { font-size: 11px; }
}
#pfStudents { scroll-margin-top: 110px; }

/* Student dashboard: next-step button in the hero, this-week strip */
.dash-hero.with-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hero-cta { flex-direction: column; align-items: flex-start; gap: 2px; max-width: min(340px, 100%); padding: .6rem 1.2rem; }
.hero-cta span { font-size: 16px; font-weight: 800; }
.hero-cta small { color: #12365D; opacity: .85; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; margin-top: 6px; }
.weekstrip .wd { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.weekstrip .dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--cell-none); color: var(--navy); border: 2px solid transparent; }
.weekstrip .wd.ok .dot { background: #10A675; color: #fff; }
.weekstrip .wd.today .dot { border-color: var(--blue); box-shadow: 0 0 0 3px #CFE6FA; }
.weekstrip .wd.future .dot { background: #F4F8FC; }
.weekstrip small { font-size: 12px; }
.weekstrip .wd.today small { color: var(--navy); font-weight: 700; }
@media (max-width: 520px) { .weekstrip .dot { width: 34px; height: 34px; font-size: 13px; } .hero-cta { width: 100%; max-width: none; } }
.skill-row .hw-meta { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
@media (max-width: 520px) {
  .skill-row:has(.hw-meta) { flex-wrap: wrap; }
  .skill-row .hw-meta { order: 4; flex: 1 0 100%; justify-content: flex-start; padding-left: calc(4.4rem + .75rem); }
}
/* student dashboard on phones: goal card full width, the three small stats in one row */
@media (max-width: 520px) {
  .cards4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .cards4 > .goal { grid-column: 1 / -1; }
  .cards4 > .stat-card:not(.goal) { padding: 12px 8px; text-align: center; }
  .cards4 > .stat-card:not(.goal) .stat { font-size: 22px; }
  .cards4 > .stat-card:not(.goal) h3 { font-size: 12px; margin: 2px 0 0; }
  .cards4 > .stat-card:not(.goal) p { font-size: 11px; margin: 2px 0 0; }
  .cards4 .hide-m { display: none; }
}

/* One management with several schools (branches): the school switcher in the top bar and the "My schools" cards */
.school-switch {
  max-width: 200px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .48); color: #fff; border-radius: 7px;
  padding: 7px 10px; font-size: 13px; font-weight: 600; cursor: pointer; text-overflow: ellipsis;
}
.school-switch:hover { background: rgba(255, 255, 255, .2); }
.school-switch option { color: #0F172A; background: #fff; }
.br-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.br-card { background: #fff; border: 1px solid #E2E8F0; border-top: 4px solid #2563EB; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.br-card.here { border-top-color: #16A34A; background: #F7FEF9; }
.br-card.off { border-top-color: #94A3B8; opacity: .75; }
.br-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.br-head b { display: block; font-size: 16px; line-height: 1.25; }
.br-head small { color: #64748B; }
.br-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.br-nums span { font-size: 11px; color: #64748B; line-height: 1.2; }
.br-nums b { display: block; font-size: 18px; color: #0F172A; }
.br-card .pf-stack { background: #E2E8F0; }
.br-bands { display: flex; gap: 5px; flex-wrap: wrap; }
.br-bands span { background: var(--c); color: #fff; border-radius: 999px; min-width: 28px; padding: 1px 9px; font-size: 12px; font-weight: 700; text-align: center; }
.br-bands span.none { background: #94A3B8; }
.br-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.ex-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; margin: 6px 0 10px; }
@media (max-width: 860px) { .school-switch { max-width: 100%; width: 100%; } }
@media (max-width: 420px) { .br-nums { grid-template-columns: repeat(2, 1fr); } }

/* parent: neat details */
.pd-prog { display: block; height: 7px; background: #E5EEF7; border-radius: 99px; overflow: hidden; margin: .35rem 0 .15rem; max-width: 280px; }
.pd-prog i { display: block; height: 100%; background: linear-gradient(90deg, #3B9CF0, #0B6FB8); border-radius: 99px; }
.pd-prog i.full { background: #16A34A; }
.pd-hw.overdue .pd-prog i { background: linear-gradient(90deg, #F87171, #DC2626); }
.pr-charthead { margin-top: 1rem; }
.pr-charthead h3 { margin: 0; }
#prChart[data-v="days"] .pr-v-weeks, #prChart[data-v="weeks"] .pr-v-days { display: none; }
.pr-how { margin-top: .8rem; color: var(--muted); font-size: 13.5px; }
.pr-how summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.pr-how p { margin: .4rem 0 0; line-height: 1.5; }
.dash-hero p { margin-top: .2rem; }

/* parent: this week, teacher message, needs revision, print, menu badge */
.pr-week { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: center; margin: .5rem 0 .6rem; padding: .6rem .85rem; background: #F7FBFF; border: 1px solid #DCEAF5; border-radius: 12px; }
.pr-week b { color: var(--navy); }
.pr-week > span b { font-size: 18px; }
.pr-week small { flex-basis: 100%; }
.pr-notes { background: #FFFBEB; border-color: #F5DD9B; }
.pr-notes blockquote { margin: .4rem 0; padding: .1rem .9rem; border-left: 4px solid #F59E0B; font-size: 16px; line-height: 1.55; color: #4A3200; white-space: pre-line; }
.pr-notes blockquote footer { margin-top: .3rem; font-size: 13px; color: #7A5A12; }
.pd-dot { font-style: normal; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; margin-left: .3rem; border-radius: 99px; background: #F59E0B; color: #fff; font-size: 12px; font-weight: 800; }
.pd-dot.bad { background: #DC2626; }
.nav-badge { font-style: normal; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 .35rem; margin-left: .45rem; border-radius: 99px; background: #F59E0B; color: #fff; font-size: 12px; font-weight: 800; vertical-align: 1px; }
.nav-badge.bad { background: #DC2626; }
.pr-printhead { display: none; }
@media print {
  body[data-page="results"] .dash-hero, body[data-page="results"] .pd-modes, body[data-page="results"] #prReview, body[data-page="results"] .pr-how,
  body[data-page="results"] #prChartSeg, body[data-page="results"] .pr-print { display: none !important; }
  body[data-page="results"] .pr-printhead { display: block; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid #0B6FB8; }
  body[data-page="results"] .pr-printhead h1 { margin: 0 0 2px; font-size: 22px; color: #063560; }
  body[data-page="results"] .pr-printhead p { margin: 0; font-size: 13px; }
  body[data-page="results"] #prChart .pr-v { display: block !important; }
  body[data-page="results"] .card { border: 1px solid #CBD5E1; box-shadow: none; margin: 0 0 10px; }
  body[data-page="results"] .pr-notes, body[data-page="results"] .pf-card, body[data-page="results"] .ba-card { break-inside: avoid; }
  body[data-page="results"] .pf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  body[data-page="results"] .pf-card b { font-size: 24px; }
  body[data-page="results"] .ba-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  body[data-page="results"] .pr-barwrap { height: 80px; }
  body[data-page="results"] .pr-days { min-width: 0; }
  body[data-page="results"] * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* skills to practise again (student Home and My progress): on a phone the tag drops under the skill name */
.hl-row .rk { white-space: nowrap; }
@media (max-width: 600px) {
  .hl-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "code title pill" ". tag tag"; align-items: center; gap: 4px 10px; }
  .hl-row .code { grid-area: code; min-width: 0; }
  .hl-row .title { grid-area: title; }
  .hl-row .rk { grid-area: tag; justify-self: start; }
  .hl-row .score-pill { grid-area: pill; }
}
.pf-weak li em { text-align: right; line-height: 1.15; }
.pf-weak li em small { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); }

/* Assign homework on a student's report (teacher, principal, correspondent) */
.assign-box { margin-top: 1rem; padding: 1rem; border: 1px dashed #A9CDEE; border-radius: 14px; background: #F4FAFF; }
.assign-box h3 { margin: 0 0 .15rem; color: var(--navy); }
.assign-box h4 { margin: .6rem 0 .25rem; color: var(--navy); }
.assign-box .a-sel { margin: .4rem 0; }
.assign-box .check { display: flex; margin: .2rem 0; flex-wrap: wrap; }
.assign-box details { margin: .4rem 0 .8rem; }
.assign-box summary { cursor: pointer; font-weight: 600; color: var(--blue, #1769c9); margin-bottom: .4rem; }

/* Teachers page (correspondent): class x subject grid */
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; align-items: start; }
.tc-card { padding: .8rem .9rem; margin: 0; }
.tc-card h3 { margin: 0 0 .5rem; }
.tc-row { display: grid; grid-template-columns: minmax(96px, 7.5rem) 1fr; gap: .25rem .6rem; align-items: center; padding: .4rem 0; border-top: 1px solid #E5EEF7; }
.tc-row:first-of-type { border-top: 0; }
.tc-sub { font-weight: 700; font-size: 13px; color: var(--navy); }
.tc-who { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 28px; }
.tc-row select { grid-column: 2; max-width: 100%; padding: .3rem .5rem; font-size: 13px; }
.tc-who .chip { margin: 0; display: inline-flex; align-items: center; gap: 2px; }
.chip.off { opacity: .55; text-decoration: line-through; }
@media (max-width: 480px) { .tc-grid { grid-template-columns: 1fr; } .tc-row { grid-template-columns: 1fr; } .tc-row select { grid-column: 1; } }
.dialog.tc-dialog { width: min(720px, 100%); max-width: 720px; }
.toolbar label.inline.nw { white-space: nowrap; }
.tc-check { display: flex; gap: .5rem; align-items: center; font-weight: 600; font-size: 14px; margin: .4rem 0; }
.tc-check input { flex: none; width: auto; }
/* Promote students page (correspondent) */
.pm-table td { vertical-align: top; }
.pm-table .sec { margin: 0; flex-wrap: nowrap; }
.pmStu summary { cursor: pointer; font-size: 13px; }
.pm-list { max-height: 220px; overflow: auto; margin-top: .4rem; padding: .3rem .5rem; border: 1px solid #E5EEF7; border-radius: 8px; background: #fff; }
.pm-list .tc-check { margin: .15rem 0; font-weight: 500; }

/* Suggested homework (class view) */
.sg-card { border-left: 5px solid #F1C14C; }
.sg-head { display: flex; gap: .4rem .8rem; align-items: center; flex-wrap: wrap; margin-bottom: .4rem; }
.sg-who { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .4rem .8rem; }
.sg-stu { display: flex; gap: .55rem; align-items: flex-start; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; background: #fff; font-weight: 500; cursor: pointer; }
.sg-stu input { display: inline-block; width: auto; margin: .2rem 0 0; flex: none; }
.sg-stu > span { min-width: 0; }
.sg-why { margin: .25rem 0 0; padding-left: 1.1rem; font-size: 12.5px; color: var(--muted); }
.sg-act { display: flex; gap: .6rem 1rem; align-items: center; flex-wrap: wrap; margin-top: .7rem; padding-top: .6rem; border-top: 1px dashed #E2E8F0; }
.sg-act label.inline { display: flex; gap: .35rem; align-items: center; margin: 0; font-weight: 600; font-size: 14px; }
.sg-act label.inline input { display: inline-block; width: auto; margin: 0; }
.sg-act label.inline input.short { width: 5rem; }
.sg-banner { display: flex; gap: .5rem 1rem; align-items: center; flex-wrap: wrap; }
.sg-banner .btn { margin-left: auto; }

.sg-watch .sg-w { display: flex; gap: .3rem .7rem; align-items: center; flex-wrap: wrap; padding: .4rem 0; border-top: 1px dashed #E2E8F0; font-size: 14px; }

/* Teachers: one teacher for all sections; Parents page */
.tc-bulk { margin: 0 0 .8rem; }
.tc-bulk h3 { margin: 0 0 .3rem; }
.tc-bulk .toolbar select { min-width: 9rem; }
.pc-find { margin-top: .5rem; }
.pc-find input { flex: 1 1 14rem; min-width: 10rem; }
.pc-found { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; max-height: 180px; overflow: auto; padding: .3rem; border: 1px solid #E5EEF7; border-radius: 8px; background: #fff; }
.pc-found .kAdd { text-align: left; }
#fKids .chip { margin: 0 .3rem .3rem 0; }
.sg-opts { display: flex; gap: .5rem 1.2rem; align-items: center; flex-wrap: wrap; margin: .6rem 0 .3rem; }
.sg-opts label.inline, .sg-intro label.inline { display: inline-flex; gap: .4rem; align-items: center; margin: 0 1rem .3rem 0; font-weight: 600; font-size: 14px; }
.sg-opts label.inline select, .sg-intro label.inline select { width: auto; min-width: 12rem; }
.sg-pick { margin-left: auto; font-size: 13px; color: var(--muted); }
.sg-pick .link { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 700; cursor: pointer; min-height: 0; box-shadow: none; font-size: 13px; }
.sg-st { border-left-color: #6FB1E8; }
.sg-student { margin-bottom: 1rem; }

/* Classwork: dates for students, day groups for teachers */
.cw-days { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }
.cw-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 5rem; padding: .45rem .85rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--navy); font-weight: 800; line-height: 1.2; text-decoration: none; }
.cw-chip small { font-weight: 600; color: var(--muted); font-size: 12px; }
.cw-chip:hover { border-color: var(--blue); }
.cw-chip.on { border-color: var(--blue); background: #EAF4FF; }
.cw-date { display: inline-flex; gap: .4rem; align-items: center; margin: 0 0 0 auto; font-weight: 700; font-size: 14px; color: var(--navy); }
.cw-date input { width: auto; margin: 0; }
.flt { display: grid; gap: .7rem; }
.flt-dates { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.flt-dates label { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; font-size: 14px; color: var(--navy); }
.flt-dates input[type=date] { width: auto; margin: 0; }
.flt-quick, .flt-status { display: flex; flex-wrap: wrap; gap: .4rem; }
.flt-quick .cw-chip { min-width: 0; padding: .3rem .7rem; font-size: 13px; }
.flt-status .cw-chip { min-width: 6.5rem; }
.hw-late { color: #C0392B; font-weight: 800; }
.cw-row .cw-note { display: block; margin-top: .15rem; color: var(--muted); font-weight: 500; }
.cw-card { border-left: 5px solid #6FB1E8; }
.cw-day { margin: 1rem 0 .4rem; }
.cw-day small { font-weight: 500; }
.cw-item { margin-bottom: .6rem; }

/* ---------- Help (User manual): the link at the top right and the manual page ---------- */
.helpbtn { background: #FFC94D; border-color: #FFC94D; color: #082B5A; }
.nav > .helpbtn { flex: none; padding: 6px 10px; font-size: 12.5px; }
.nav:has(> .helpbtn) .brand { min-width: 200px; }
.helpbtn:hover { background: #FFD670; }
.navbtn.helpbtn.active { background: #fff; border-color: #fff; }
.home-search.with-help { width: min(230px, 17vw); }
.help-mini { display: none; margin-left: auto; align-items: center; background: #FFC94D; color: #082B5A; border: 1px solid #FFC94D; border-radius: 7px; padding: 8px 11px; font-size: 13px; font-weight: 700; }
.help-mini + .menu-toggle { margin-left: 0; }
@media (max-width: 860px) { .help-mini { display: inline-flex; } .nav > .helpbtn { display: none; } }

/* the manual can be read only: no selecting, dragging or touch-and-hold menu */
.manual { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.manual img, .manual a { -webkit-user-drag: none; user-drag: none; }
.manual input[type="search"] { -webkit-user-select: text; user-select: text; }
.man-wm { position: fixed; inset: 0; z-index: 80; pointer-events: none; background-repeat: repeat; background-size: 360px 200px; }
.man-cover { display: none; position: fixed; inset: 0; z-index: 90; cursor: pointer; align-items: center; justify-content: center; text-align: center; padding: 24px; background: rgba(8, 43, 90, .4); color: #fff; font-size: 19px; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.manual.covered .man-cover { display: flex; }
.manual.covered > *:not(.man-cover):not(.man-wm) { filter: blur(16px); pointer-events: none; }
.man-bar { font-size: 12.5px; color: #6B5A1E; background: #FFF8E1; border: 1px solid #F3DFA2; border-radius: 10px; padding: 7px 12px; margin-bottom: 12px; }
@media print {
  body.manual-on > * { display: none !important; }
  body.manual-on::before { content: attr(data-noprint); display: block; font: 700 22px Arial, sans-serif; padding: 48px; }
}

.man-hero h1 { margin: 0 0 .2rem; }
.man-for { margin: 0 0 .4rem; font-weight: 700; color: var(--navy); }
.man-hero input[type="search"] { width: min(520px, 100%); margin-top: .5rem; }
.man-index { columns: 2 340px; column-gap: 30px; }
.man-count { column-span: all; margin: 0 0 .6rem; }
.man-group { break-inside: avoid; margin: 0 0 16px; }
.man-group h3 { text-transform: uppercase; letter-spacing: .6px; font-size: 12.5px; color: var(--blue-dark); border-bottom: 2px solid #D5E5F2; padding-bottom: 4px; margin-bottom: 6px; }
.man-link { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; color: var(--navy); font-weight: 650; line-height: 1.3; }
.man-link:hover { background: #EAF4FF; }
.man-link.on { background: var(--navy); color: #fff; }
.man-n { flex: none; min-width: 1.8em; height: 1.8em; display: inline-grid; place-items: center; border-radius: 999px; background: #E1EFFC; color: var(--navy); font-size: 12px; font-weight: 800; }
.man-link.on .man-n { background: #fff; }
.man-wrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.man-side { position: sticky; top: 82px; max-height: calc(100vh - 100px); overflow: auto; background: #fff; border: 1px solid #D5E5F2; border-radius: 16px; padding: 12px; }
.man-side h2 { font-size: 15px; margin: 0 0 .5rem; }
.man-back { margin-bottom: .6rem; }
.man-crumb { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.man-art h1 { margin-top: .2rem; }
.man-body p, .man-body li { font-size: 16px; line-height: 1.7; }
.man-body p { margin: .6rem 0; }
.man-body ol, .man-body ul { padding-left: 1.5rem; margin: .5rem 0; }
.man-body li { margin: .4rem 0; }
.man-body b { color: var(--navy); }
.man-note { background: #FFF8E1; border-left: 4px solid #F1A92B; border-radius: 8px; padding: 10px 14px; margin: .9rem 0; font-size: 15px; line-height: 1.6; }
.man-go { margin: 1.2rem 0 0; }
.man-pn { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #E5EEF7; }
@media (max-width: 860px) {
  .man-wrap { grid-template-columns: minmax(0, 1fr); }
  .man-side { display: none; }
  .man-index { columns: 1; }
}

/* Delete buttons (Accounts: delete a student) */
button.ghost.danger-text { color: #991B1B; border-color: #FCA5A5; }
button.ghost.danger-text:hover { background: #FEE2E2; }
button.primary.danger { background: #B91C1C; border-color: #B91C1C; color: #fff; }
button.primary.danger:hover { background: #991B1B; }
.selbar { margin: 6px 0 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 34px; }
.selcol { width: 34px; text-align: center; }
.selcol input { width: 18px; height: 18px; cursor: pointer; }
.bd-sec { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 8px; font-weight: 600; }
.bd-names { display: flex; flex-wrap: wrap; gap: 6px; }
.bd-confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; }
.bd-confirm input { max-width: 160px; }

/* Access page (super admin): which options each school's accounts can see */
.acc-group { margin: 1.1rem 0; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.acc-group h3 { margin: 0; font-size: 1rem; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem .9rem; margin-top: .7rem; }
.acc-opt { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 14px; padding: .35rem .5rem; border-radius: 8px; cursor: pointer; }
.acc-opt:hover { background: #F1F7FE; }
.acc-opt input { width: 18px; height: 18px; min-height: 0; flex: none; margin: 0; padding: 0; }
@media (max-width: 560px) { .acc-grid { grid-template-columns: 1fr; } .acc-group { padding: .75rem .7rem; } }

/* ---------- Teach: lesson plans for teachers ---------- */
.tc-intro h1, .tc-head h1 { margin: 0 0 6px; font-size: 24px; color: var(--navy); }
.tc-intro p { max-width: 78ch; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 14px; }
.tc-class h3 { margin: 0 0 10px; color: var(--navy); }
.tc-subjects { display: flex; flex-wrap: wrap; gap: 8px; }
.tc-subjects .btn, .tc-actions .btn { display: inline-block; background: #fff; border: 1.5px solid var(--blue); color: var(--blue-dark); border-radius: 10px; padding: 7px 14px; font-weight: 700; cursor: pointer; }
.tc-subjects .btn:hover, .tc-actions .btn:hover { background: var(--blue); color: #fff; }
.tc-soon { text-align: center; }
.crumbs { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.tc-tabs { display: flex; gap: 6px; margin: 8px 0 12px; flex-wrap: wrap; }
.tc-tabs a, .tc-tabs span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 700; color: var(--blue-dark); background: #fff; }
.tc-tabs a.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.tc-tabs span.off { color: #9AAFC7; background: #F4F8FC; cursor: not-allowed; }
.tc-find { width: 100%; max-width: 360px; }
.tc-group h3 { margin: 0 0 6px; color: var(--navy); }
.tc-row .pill.soon { background: #F1F5F9; color: #64748B; }
.tc-row.tc-none .title { color: var(--muted); }
.tc-head .tc-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.tc-head .code { background: #EAF7FF; color: #075C9C; border-radius: 8px; padding: 2px 9px; font-weight: 700; font-size: 13px; }
.tc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.tc-meta span { background: #F1F6FC; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 13px; color: var(--ink); }
.tc-meta .tc-per { background: #FFF4D6; border-color: #F1C14C; color: #6B4E00; font-weight: 700; }
.tc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tc-goal { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 22px; }
.tc-goal h3, .tc-three h3 { margin: 0 0 4px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--blue-dark); }
.tc-goal p, .tc-three p { margin: 0 0 8px; }
.tc-goal ul { margin: 0; padding-left: 18px; }
.tc-words { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-words span { background: #E8FFF2; border: 1px solid var(--ok-line); border-radius: 6px; padding: 1px 9px; font-size: 13px; }
.tc-steps-card h2, .tc-page h2 { margin: 0 0 10px; color: var(--navy); font-size: 20px; }
.tc-step { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.tc-step:first-of-type { border-top: 0; }
.tc-no { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; display: grid; place-items: center; }
.tc-body { flex: 1; min-width: 0; }
.tc-body h3 { margin: 2px 0 4px; font-size: 16px; color: var(--navy); }
.tc-body h3 small { font-weight: 600; color: var(--muted); margin-left: 6px; }
.tc-body p, .tc-body ol { margin: 0; }
.tc-body ol { padding-left: 20px; }
.tc-body li { margin-bottom: 5px; }
.tc-mist { width: 100%; border-collapse: collapse; }
.tc-mist th { text-align: left; background: #F1F6FC; padding: 8px 10px; font-size: 13px; }
.tc-mist td { vertical-align: top; padding: 8px 10px; border-top: 1px solid var(--line); }
.tc-mist td:first-child { width: 42%; background: #FFF8F6; }
.tc-three { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 22px; }
.tc-q { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; background: #FBFDFF; break-inside: avoid; }
.tc-qn { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--blue-dark); }
.tc-qt { font-size: 16px; font-weight: 600; margin: 3px 0 6px; }
.tc-opts { margin: 0 0 6px; padding-left: 24px; columns: 2; }
.tc-opts li { break-inside: avoid; }
.tc-ans { background: #E8FFF2; border: 1px solid var(--ok-line); border-radius: 10px; padding: 7px 12px; }
.tc-steps { margin: 4px 0 0; padding-left: 20px; }
.tc-why { margin-top: 3px; color: #1F5136; }
.tc-vis svg, .tc-vis img { max-width: 100%; height: auto; }
.tc-hide .tc-ans { display: none; }
.tc-nav { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0 20px; }
.tc-nav a { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; font-weight: 600; max-width: 48%; }
.btn.small { padding: 3px 10px; font-size: 12px; border-radius: 8px; border: 1.5px solid var(--blue); background: #fff; color: var(--blue-dark); cursor: pointer; font-weight: 700; margin-left: 6px; }
@media (max-width: 640px) { .tc-opts { columns: 1; } .tc-mist td:first-child { width: auto; } }
@media print {
  body[data-page="teach"] .card { box-shadow: none; border: 1px solid #bbb; break-inside: avoid; }
  body[data-page="teach"] .tc-hide:not(.tc-ex) .tc-ans { display: block; }
  body[data-page="teach"] * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Teach: the textbook page */
.tc-head .tc-tabs { margin: 4px 0 10px; }
.tc-bk { background: #E8FFF2; color: #1F5136; border: 1px solid var(--ok-line); }
.tc-learn h2 { margin: 0 0 8px; }
.tc-learn p { font-size: 17px; line-height: 1.6; margin: 0 0 10px; max-width: 72ch; }
.tc-remember { background: #FFF9E0; border: 2px solid #F1C14C; }
.tc-remember h3 { margin: 0 0 6px; color: #6B4E00; font-size: 16px; text-transform: uppercase; letter-spacing: .05em; }
.tc-remember ul { margin: 0; padding-left: 20px; }
.tc-remember li { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.tc-words-card { padding-bottom: 6px; }
.tc-words-card h3 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--blue-dark); }
.tc-book .tc-q .tc-ans { display: block; }
.tc-book .tc-hide .tc-ans { display: none; }

/* ---------- Exams (computer-based tests) ---------- */
.ex-sub { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.ex-count { width: 80px; }
.ex-cat { margin: 4px 0; }
.ex-cat summary { cursor: pointer; padding: 4px 0; }
.ex-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; padding: 6px 0 8px 22px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; background: #fff; }
.mix-grid { align-items: end; }
.own-q { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: #FBFEFF; }
.own-q textarea { width: 100%; }
.own-opts, .own-pairs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.own-opt { display: inline-flex; gap: 6px; align-items: center; }
.own-opt input:not([type=radio]) { min-width: 180px; }
.own-pair { display: flex; gap: 6px; align-items: center; }
.ex-q { border-top: 1px dashed var(--line); padding: 10px 0; }
.ex-q .row-head span { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-qtext { font-weight: 600; margin: 4px 0 6px; white-space: pre-wrap; }
.ex-opts { margin: 4px 0 6px 18px; }
.ex-opts li.ok { color: #166534; font-weight: 700; }
.ex-opts li.bad { color: #991B1B; text-decoration: line-through; }
.ex-match td.ok { color: #166534; font-weight: 700; }
.ex-match td.bad { color: #991B1B; }
.ex-steps { background: #F0F9FF; border-left: 4px solid var(--blue); border-radius: 8px; padding: 6px 12px; margin-top: 6px; }
.ex-steps ol { margin: 4px 0 0 18px; }
.ex-bar { display: inline-block; width: 140px; height: 10px; background: #E2E8F0; border-radius: 6px; vertical-align: middle; overflow: hidden; }
.ex-bar i { display: block; height: 100%; background: var(--blue); }
.ex-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-left: 5px solid #16A34A; }
b.up { color: #166534; } b.down { color: #991B1B; }
.btn.danger, button.danger { color: #991B1B; border-color: #FCA5A5; }

/* the exam screen: the site header and footer go away, the test fills the window */
body.cbt-mode .topbar, body.cbt-mode .footer, body.cbt-mode .side-art, body.cbt-mode .landscape { display: none !important; }
body.cbt-mode { background: #EEF3FA !important; }
body.cbt-mode main#view { max-width: none; padding: 0; margin: 0; }
.cbt-instr { max-width: 760px; margin: 24px auto; background: #fff; border-radius: 6px; padding: 0 22px 22px; box-shadow: 0 2px 10px rgba(16, 52, 95, .12); font-size: 14px; }
.cbt-head { background: #5B4CC4; color: #fff; margin: 0 -22px 14px; padding: 12px 22px; border-radius: 6px 6px 0 0; display: flex; flex-direction: column; }
.cbt-head b { font-size: 17px; }
.cbt-instr ol li { margin-bottom: 8px; line-height: 1.5; }
.cbt-legend { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.cbt-legend span { display: flex; gap: 8px; align-items: center; }
.cbt-agree { display: flex; gap: 10px; align-items: center; border: 1px solid #CBD5E1; border-radius: 6px; padding: 10px 12px; margin: 14px 0; }
.cbt-pw { display: block; margin: 12px 0; font-weight: 600; }
.cbt-pw input { width: 120px; font-size: 20px; letter-spacing: .3em; text-align: center; margin-left: 8px; }
.cbt-start { display: flex; gap: 14px; align-items: center; }
.cbt { position: relative; max-width: 1200px; margin: 16px auto; background: #fff; border: 1px solid #C9D6E6; user-select: none; -webkit-user-select: none; overflow: hidden; }
.cbt-wm { position: absolute; inset: 0; pointer-events: none; display: flex; flex-wrap: wrap; gap: 60px 90px; padding: 30px; transform: rotate(-18deg) scale(1.3); opacity: .07; font-size: 13px; color: #0B3D78; z-index: 0; overflow: hidden; }
.cbt > *:not(.cbt-wm):not(.cbt-modal) { position: relative; z-index: 1; }
.cbt-top { background: #1E4E8C; color: #fff; font-weight: 800; padding: 9px 14px; font-size: 14px; letter-spacing: .02em; }
.cbt-main { display: grid; grid-template-columns: 1fr 240px; min-height: 520px; }
.cbt-left { display: flex; flex-direction: column; border-right: 1px solid #DDE5F0; }
.cbt-bar { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-bottom: 1px solid #E5ECF5; font-size: 13px; }
.cbt-bar.small { font-size: 12px; }
#tLeft { font-variant-numeric: tabular-nums; }
#tLeft.low { color: #DC2626; }
.cbt-secs { display: flex; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #E5ECF5; flex-wrap: wrap; }
.cbt-sec { background: #EEF4FB; border: 1px solid #C9D6E6; color: #1E4E8C; border-radius: 3px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.cbt-sec.on { background: #1565C0; color: #fff; border-color: #1565C0; }
.cbt-q { padding: 14px 18px; flex: 1; font-size: 15px; }
.cbt-qtext { margin-bottom: 14px; white-space: pre-wrap; line-height: 1.5; }
.cbt-opts { display: flex; flex-direction: column; gap: 10px; }
.cbt-opt { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.cbt-opt:hover { background: #F3F7FC; }
.cbt-opt span:first-of-type { color: #64748B; }
.cbt-match { border-collapse: collapse; margin: 6px 0; }
.cbt-match th, .cbt-match td { border: 1px solid #D5DFEB; padding: 6px 10px; text-align: left; }
.cbt-btns { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 14px; border-top: 1px solid #E5ECF5; align-items: center; }
.cbt-grow { flex: 1; }
.cbt-btn { border: 1px solid transparent; border-radius: 3px; padding: 8px 14px; font-weight: 700; font-size: 13px; cursor: pointer; color: #fff; }
.cbt-btn.green { background: #2E7D32; } .cbt-btn.orange { background: #EF6C00; } .cbt-btn.blue { background: #1565C0; }
.cbt-btn.light { background: #fff; color: #1F2937; border-color: #B8C4D3; }
.cbt-btn:disabled { opacity: .55; cursor: not-allowed; }
.cbt-palbtn { display: none; }
.cbt-right { background: #F7FAFE; font-size: 12px; }
.cbt-cand { display: flex; gap: 10px; align-items: center; padding: 12px; border-bottom: 1px solid #E5ECF5; font-size: 14px; }
.cbt-avatar { width: 38px; height: 38px; border-radius: 4px; background: #DDE5EF; display: grid; place-items: center; }
.cbt-right .cbt-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 6px; padding: 10px 12px; }
.cbt-right .cbt-legend span:last-child { grid-column: 1 / -1; }
.cbt-sechead { background: #1E4E8C; color: #fff; font-weight: 700; padding: 7px 12px; }
.cbt-paltitle { padding: 8px 12px 0; color: #475569; }
.cbt-pal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px 12px 16px; }
.pal { display: inline-grid; place-items: center; min-width: 34px; height: 30px; font-size: 12px; font-weight: 700; font-style: normal; border: 1px solid #94A3B8; background: #fff; color: #1F2937; border-radius: 3px; cursor: pointer; }
i.pal { min-width: 26px; height: 24px; cursor: default; }
.pal.na { background: #E4572E; border-color: #C2410C; color: #fff; clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%); }
.pal.a { background: #2E9E44; border-color: #15803D; color: #fff; clip-path: polygon(0 28%, 50% 0, 100% 28%, 100% 100%, 0 100%); }
.pal.m { background: #6D3FD1; border-color: #5B21B6; color: #fff; border-radius: 50%; min-width: 30px; }
.pal.am { background: #6D3FD1; border-color: #5B21B6; color: #fff; border-radius: 50%; min-width: 30px; box-shadow: inset -6px -6px 0 -3px #22C55E; }
.pal.cur { outline: 2px solid #F59E0B; outline-offset: 2px; }
.cbt-modal { position: fixed; inset: 0; background: rgba(4, 25, 50, .55); display: grid; place-items: center; z-index: 60; padding: 16px; }
.cbt-modal[hidden] { display: none; }
.ex-find { width: 260px; max-width: 100%; margin: 0; }
/* exam reports */
.ex-tabs { flex-wrap: wrap; gap: 6px; }
.ex-tabs .btn.small { margin-left: 0; padding: 7px 14px; font-size: 13px; }
.lb-tabs .btn.small.primary { background: var(--blue); color: #fff; }
.ex-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.ex-kpis div { background: #F3F7FC; border: 1px solid #DDE5F0; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.ex-kpis b { font-size: 24px; color: #0B3D78; }
.ex-kpis span { font-size: 12px; color: #475569; }
.ex-band { display: grid; grid-template-columns: 90px 1fr 36px; gap: 10px; align-items: center; margin: 8px 0; font-size: 14px; }
.ex-bar.wide { width: 100%; height: 14px; }
.ex-bar i.b0 { background: #15803D; } .ex-bar i.b1 { background: #22C55E; } .ex-bar i.b2 { background: #3B82F6; } .ex-bar i.b3 { background: #F59E0B; } .ex-bar i.b4 { background: #DC2626; }
.ex-pct { display: inline-block; min-width: 44px; text-align: center; padding: 2px 6px; border-radius: 6px; font-weight: 700; font-size: 13px; }
.ex-pct.hi { background: #DCFCE7; color: #166534; } .ex-pct.mid { background: #FEF3C7; color: #92400E; } .ex-pct.lo { background: #FEE2E2; color: #991B1B; }
.ex-rank { margin: 0; padding-left: 22px; }
.ex-rank li { padding: 4px 0; border-bottom: 1px dashed #E2E8F0; }
.ex-rank li { display: list-item; }
.ex-rank li > span { display: inline-block; min-width: 60%; }
.ex-stu { margin-top: 16px; border-top: 2px solid #DDE5F0; padding-top: 10px; }
button.linkish { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; text-align: left; width: auto; }
button.linkish:hover { text-decoration: underline; }
#rFind { width: 200px; margin: 0; }
tr[hidden] { display: none; }
@media print { .ex-tabs, .hero-cta { display: none !important; } .card { break-inside: avoid; } }
/* top / average / remedial groups */
.ex-gcount { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.ex-gbox { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; text-align: left; width: auto; color: #1F2937; }
.ex-gbox b { font-size: 24px; }
.ex-gbox span { font-size: 12px; }
.ex-gbox.g-top, .ex-grp.g-top, .ex-mygroup.g-top { background: #F0FDF4; } .ex-gbox.g-top.on { border-color: #16A34A; }
.ex-gbox.g-average, .ex-grp.g-average, .ex-mygroup.g-average { background: #FFFBEB; } .ex-gbox.g-average.on { border-color: #D97706; }
.ex-gbox.g-remedial, .ex-grp.g-remedial, .ex-mygroup.g-remedial { background: #FEF2F2; } .ex-gbox.g-remedial.on { border-color: #DC2626; }
.ex-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ex-grp { border-radius: 10px; padding: 10px 12px; }
.ex-grp h3 { margin: 0 0 6px; font-size: 15px; }
@media (max-width: 760px) { .ex-groups, .ex-gcount { grid-template-columns: 1fr; } }
/* the response sheet (prints on A4) */
.sheet { background: #fff; max-width: 900px; margin: 0 auto 20px; padding: 22px 26px; border: 1px solid #DDE5F0; border-radius: 10px; color: #111827; }
.sheet-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 3px solid #1E4E8C; padding-bottom: 10px; margin-bottom: 12px; }
.sheet-head h1 { margin: 2px 0; font-size: 22px; color: #1E4E8C; }
.sheet-head p { margin: 0; }
.sheet-score { text-align: right; display: flex; flex-direction: column; gap: 4px; }
.sheet-score b { font-size: 26px; color: #0B3D78; }
.sheet-info { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 14px; }
.sheet-info th, .sheet-info td { border: 1px solid #D5DFEB; padding: 6px 8px; text-align: left; }
.sheet-info th { background: #F3F7FC; width: 16%; font-weight: 700; }
.sheet-q { border: 1px solid #DDE5F0; border-left: 5px solid #94A3B8; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; break-inside: avoid; }
.sheet-q.right { border-left-color: #16A34A; } .sheet-q.wrong { border-left-color: #DC2626; } .sheet-q.blank { border-left-color: #D97706; }
.sheet-opts { margin: 6px 0; padding-left: 26px; }
.sheet-opts li.ok { color: #166534; font-weight: 700; } .sheet-opts li.bad { color: #991B1B; font-weight: 700; }
.sheet-ans { border-collapse: collapse; font-size: 14px; margin: 6px 0; }
.sheet-ans th, .sheet-ans td { border: 1px solid #E2E8F0; padding: 4px 8px; text-align: left; vertical-align: top; }
.sheet-ans th { background: #F8FAFC; white-space: nowrap; }
.sheet-foot { border-top: 1px solid #DDE5F0; padding-top: 8px; margin-top: 14px; text-align: center; }
@media print {
  body:has(.sheet) .crumbs, body:has(.sheet) .dash-hero { display: none !important; }
  .sheet { border: 0; padding: 0; max-width: none; margin: 0; }
  .sheet .rk { border: 1px solid currentColor; }
  @page { size: A4; margin: 12mm; }
}
.ex-skills label[hidden], .ex-cat[hidden] { display: none; }
.ex-locked { background: #EFF6FF; border-left: 4px solid var(--blue); }
/* results first: cards of classes / sections / subjects, trend lines, the PTM report */
.ex-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 10px 0; }
.ex-ccard { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 1px solid #DDE5F0; border-top: 4px solid var(--blue); border-radius: 12px; background: #fff; color: #1F2937; text-align: left; text-decoration: none; cursor: pointer; width: auto; font: inherit; box-shadow: var(--shadow); }
.ex-ccard:hover { border-color: var(--blue); text-decoration: none; }
.ex-ccard.on { outline: 3px solid var(--blue); outline-offset: 1px; }
.ex-ccard .small { padding: 0; font-size: 12px; }
.ex-ccard .t { font-weight: 700; color: #0B3D78; font-size: 15px; }
.ex-ccard .big { font-size: 28px; line-height: 1.1; color: #0B3D78; }
.ex-ccard:has(.big.hi) { border-top-color: #16A34A; } .ex-ccard:has(.big.mid) { border-top-color: #D97706; } .ex-ccard:has(.big.lo) { border-top-color: #DC2626; }
.big.hi, .ex-kpis b.hi { color: #15803D; } .big.mid, .ex-kpis b.mid { color: #B45309; } .big.lo, .ex-kpis b.lo { color: #B91C1C; }
.ex-crow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-spark { width: 100%; height: 30px; display: block; }
.ex-spark polyline { fill: none; stroke: var(--blue); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ex-spark.none { height: 30px; }
.ex-gmini { display: inline-flex; gap: 4px; }
.ex-chg { font-size: 13px; color: #475569; white-space: nowrap; }
.ex-chg.up { color: #15803D; } .ex-chg.down { color: #B91C1C; }
.ex-chart { margin: 8px 0 14px; }
.ex-chart svg { width: 100%; max-width: 760px; height: auto; display: block; }
.ex-chart .tg { stroke: #E2E8F0; } .ex-chart .tg.pass { stroke: #DC2626; stroke-dasharray: 4 4; }
.ex-chart .ax { font-size: 11px; fill: #64748B; }
.ex-chart .v { font-size: 11px; font-weight: 700; fill: #0B3D78; }
.ex-chart .tl { fill: none; stroke-width: 2.5; }
.ex-chart .s0 .tl { stroke: #168EEA; } .ex-chart .s0 circle { fill: #168EEA; }
.ex-chart .s1 .tl { stroke: #94A3B8; stroke-dasharray: 6 4; } .ex-chart .s1 circle { fill: #94A3B8; }
.ex-chart figcaption { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #475569; }
.ex-chart figcaption span { display: inline-flex; align-items: center; gap: 6px; }
.ex-chart .k { display: inline-block; width: 18px; height: 0; border-top: 3px solid #168EEA; }
.ex-chart .k.s1 { border-top: 3px dashed #94A3B8; } .ex-chart .k.pass { border-top: 2px dashed #DC2626; }
.ex-mygroup { border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.ex-mygroup p { margin: 0; }
.ptm h2 { font-size: 17px; color: #1E4E8C; margin: 16px 0 6px; }
.ptm .ptm-t { font-size: 13px; }
.ptm .ex-spark { width: 90px; }
.ptm-notes-auto { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.ptm-notes-auto p { margin: 4px 0; }
.ptm-remarks { margin-top: 16px; }
.ptm-lines { height: 96px; background: repeating-linear-gradient(transparent 0 31px, #CBD5E1 31px 32px); }
.ptm-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.ptm-sign span { border-top: 1px solid #64748B; padding-top: 4px; text-align: center; font-size: 13px; color: #334155; }
.ptm-page + .ptm-page { margin-top: 24px; }
@media print { .ptm-page { break-after: page; } .ptm-page:last-child { break-after: auto; } .ptm-page + .ptm-page { margin-top: 0; } .ptm .ex-kpis div { border: 1px solid #CBD5E1; } .ex-chart svg { max-width: 100%; } body:has(.ptm) .lb-tabs, body:has(.ptm) .toolbar { display: none !important; } }
/* the test covers the whole screen (like the NTA screen): the question and the palette scroll on their own */
body.cbt-mode .cbt { position: fixed; inset: 0; z-index: 50; max-width: none; margin: 0; border: 0; display: flex; flex-direction: column; }
body.cbt-mode .cbt-main { flex: 1; min-height: 0; }
body.cbt-mode .cbt-left { min-height: 0; }
body.cbt-mode .cbt-q { overflow: auto; }
body.cbt-mode .cbt-right { overflow: auto; }
.cbt-dialog { background: #fff; border-radius: 8px; padding: 16px 18px; width: min(760px, 100%); max-height: 90vh; overflow: auto; }
/* LKG to Class V: the same test, bigger and simpler */
.cbt.kids .cbt-q { font-size: 20px; }
.cbt.kids .cbt-opt { font-size: 20px; padding: 10px 12px; border: 2px solid #DDE5F0; border-radius: 12px; }
.cbt.kids .cbt-opt input { width: 22px; height: 22px; }
.cbt.kids .cbt-btn { font-size: 16px; padding: 12px 18px; border-radius: 10px; }
/* phones: the question panel opens from the "Questions" button */
@media (max-width: 760px) {
  .cbt { margin: 0; border: 0; }
  .cbt-main { grid-template-columns: 1fr; }
  .cbt-right { display: none; border-top: 1px solid #DDE5F0; }
  .cbt-right.show { display: block; }
  body.cbt-mode .cbt-main { overflow: auto; }
  .cbt-palbtn { display: inline-block; }
  .cbt-bar { flex-wrap: wrap; }
  .cbt-instr { margin: 0; border-radius: 0; }
  .ex-skills { grid-template-columns: 1fr; }
}
/* tick boxes and radio buttons inside exam labels stay small, next to their text */
.cbt-agree input, .chip input, .own-opt input[type=radio], .cbt-opt input, .ex-cat input, .ex-skills input, .own-opts input[type=radio], .ex-sub label.inline input[type=checkbox] { display: inline-block; width: auto; margin: 0; flex: none; }
.own-opt input:not([type=radio]) { display: inline-block; width: auto; margin: 0; }
.own-pair input { display: inline-block; width: 220px; max-width: 42vw; margin: 0; }
.ex-sub label.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.ex-sub label.inline input[type=number] { display: inline-block; width: 80px; margin: 0; }
.cbt-agree { font-weight: 600; }
.cbt-pw input { display: inline-block; }
.cbt-match select { display: inline-block; width: auto; min-width: 160px; margin: 0; }

/* Achievement Board: the signed-in student's own name, green and a little bolder */
.lb-table tr.me td:nth-child(2), .lb-table tr.me td:nth-child(2) a { color: #15803D; font-weight: 800; }

/* GRID-THEME-START */
/* Every table and list: grid lines on rows and columns, colourful header that stays visible while scrolling, the signed-in user's row in its own colour */
:root{--grid:#9FB3EA;--grid-soft:#C3D1F4;--ink2:#14275A}
.table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;line-height:1.4;color:var(--ink2);background:#fff;border:1.5px solid var(--grid);border-radius:12px;font-variant-numeric:tabular-nums}
.table th,.table td{padding:.6rem .8rem;border-right:1px solid var(--grid-soft);border-bottom:1px solid var(--grid-soft);vertical-align:middle}
.table th:last-child,.table td:last-child{border-right:0}
.table tbody tr:last-child>td,.table tbody tr:last-child>th{border-bottom:0}
.table thead th,.table:not(:has(>thead)) tr:first-child>th{position:sticky;top:var(--nav-h,82px);z-index:5;background:linear-gradient(180deg,#3F5FE0,#2B3FB5);color:#fff;font-size:12.5px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;text-align:left;white-space:nowrap;border-right:1px solid rgba(255,255,255,.3);border-bottom:2px solid #1B2A85}
.table thead th:last-child{border-right:0}
.table thead tr:first-child>th:first-child{border-top-left-radius:10px}
.table thead tr:first-child>th:last-child{border-top-right-radius:10px}
.table tbody th{background:#E3EAFF;color:#14307A;font-weight:700}
.table tbody tr:nth-child(odd){background:#EDF3FF}
.table tbody tr:nth-child(even){background:#F8F2FF}
.table tbody tr:hover{background:#D9E6FF}
.table td a{color:#1D4ED8;font-weight:700}
.table tbody tr.me>td:not(#_),.table tbody tr.me>th:not(#_){background:#D8F6E3;color:#0F5132;font-weight:800;border-bottom-color:#7ED3A0}
.table tbody tr.me>td:first-child:not(#_){box-shadow:inset 6px 0 0 #16A34A}
.scroll-x.tfx{max-height:var(--tfx-h,74vh);overflow:auto}
.card.scroll-x.tfx{padding-top:0;border-top:14px solid #fff}
.scroll-x.tfx:not(.xfit) .table thead th,.scroll-x.tfx:not(.xfit) .table:not(:has(>thead)) tr:first-child>th{top:0}
.scroll-x.tfx.xfit{overflow:visible;max-height:none}
.overlay .table thead th{top:0}
.lb-table tbody tr:has(.medal.m1)>td{background:#FFEFB0}
.lb-table tbody tr:has(.medal.m2)>td{background:#E4EAF5}
.lb-table tbody tr:has(.medal.m3)>td{background:#FADBC2}
.lb-table td b{display:inline-block;min-width:2.7rem;padding:.12rem .65rem;border-radius:999px;background:#2F5BE0;color:#fff;text-align:center;font-weight:800}
.lb-table tr.me td b{background:#16A34A}
.lb-table small{color:#3B4A7A;font-weight:600}
section.card>h2{display:flex;align-items:center;gap:.55rem;font-size:19px;font-weight:800;color:#14307A}
section.card>h2::before{content:"";width:6px;height:1.15em;border-radius:4px;background:linear-gradient(180deg,#2F5BE0,#7C3AED);flex:none}
.cw-row,.card>.skill-row{display:flex;align-items:stretch;gap:0;padding:0;background:#fff;border:1px solid var(--grid);margin-top:-1px;font-size:14px;color:var(--ink2)}
.cw-row:nth-child(odd),.card>.skill-row:nth-child(odd){background:#EDF3FF}
.cw-row:nth-child(even),.card>.skill-row:nth-child(even){background:#F8F2FF}
a.cw-row:hover,a.skill-row:hover{background:#D9E6FF}
.chapters .card>.skill-row{padding:0}
.cw-row>*:not(.btn):not(button):not(.title),.card>.skill-row>*:not(.btn):not(button):not(.title){padding:.6rem .85rem;display:flex;align-items:center;gap:.3rem;border-left:1px solid var(--grid-soft);margin:0}
.cw-row>:first-child,.card>.skill-row>:first-child{border-left:0}
.cw-row>.title,.card>.skill-row>.title{display:block;flex:1;min-width:0;padding:.6rem .85rem;font-weight:600;font-size:14.5px;line-height:1.45}
.cw-row>.code,.card>.skill-row>.code{flex:0 0 6.2rem;background:#E3EAFF;color:#1E3A8A;font-weight:800;justify-content:center}
.cw-row>.rk,.card>.skill-row>.rk{flex:0 0 9.5rem;justify-content:center;border-radius:0;font-weight:800}
.cw-row>.score-pill,.card>.skill-row>.score-pill{flex:0 0 5.2rem;justify-content:center;border-radius:0;font-weight:800;font-size:15px}
.card>.skill-row>span:not([class]){flex:0 0 7rem;justify-content:center;background:#F0F4FF;font-weight:700}
.alert-row{display:flex;align-items:center;gap:.8rem;padding:0 .8rem 0 0;border:1px solid var(--grid);border-left:6px solid #94A3B8;margin:-1px 0 0;background:#fff;border-radius:0;font-size:14px;color:var(--ink2)}
.alert-row>.muted{align-self:stretch;display:flex;align-items:center;padding:.5rem .8rem;min-width:7.5rem;background:#E3EAFF;border-right:1px solid var(--grid-soft);font-weight:700;color:#334377}
.cards3>.card{border-top:4px solid #2F5BE0}
.cards3>.card:nth-child(2){border-top-color:#7C3AED}
.cards3>.card:nth-child(3){border-top-color:#0EA5A4}
@media (max-width:640px){
.table th,.table td{padding:.5rem .55rem}
.cw-row>.code,.card>.skill-row>.code{flex-basis:4.4rem}
.cw-row>.rk,.card>.skill-row>.rk{flex-basis:5.6rem;font-size:12px}
.cw-row>.score-pill,.card>.skill-row>.score-pill{flex-basis:3.6rem}
.card>.skill-row>span:not([class]){flex-basis:4.6rem}
.alert-row>.muted{min-width:5.6rem}
}
@media print{.table thead th{position:static}.scroll-x.tfx{max-height:none;overflow:visible}}
.cw-row>.rk,.card>.skill-row>.rk{border:0;border-left:1px solid var(--grid-soft)}
.gh{background:linear-gradient(180deg,#3F5FE0,#2B3FB5)!important;border-color:#1B2A85!important;color:#fff;border-radius:10px 10px 0 0;margin-top:0!important;pointer-events:none}
.gh>*{background:transparent!important;color:#fff!important;border-color:rgba(255,255,255,.3)!important;border-radius:0!important;font-size:12.5px!important;font-weight:800!important;letter-spacing:.5px;text-transform:uppercase}
/* GRID-THEME-END */

/* WHO-BADGE-START */
/* Signed-in name: big, coloured badge with the first letter in a round avatar */
.topbar .who{order:99;margin-left:auto;display:inline-flex;align-items:center;gap:.65rem;max-width:100%;padding:.3rem 1.3rem .3rem .35rem;border:2.5px solid transparent;border-radius:999px;background:linear-gradient(135deg,#FFE27A,#FFB300) padding-box,linear-gradient(135deg,#22D3EE,#8B5CF6,#F472B6) border-box;color:#0B2E6B;font-size:22px;font-weight:800;letter-spacing:.2px;line-height:1.2;white-space:nowrap;box-shadow:0 6px 18px rgba(0,0,0,.35)}
.topbar .who::before{content:attr(data-i);flex:none;width:2.3rem;height:2.3rem;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#0B2E6B,#2F5BE0);color:#FFE27A;font-size:1.15rem;font-weight:900}
@media (max-width:640px){.topbar .who{font-size:16px}.topbar .who::before{width:1.9rem;height:1.9rem;font-size:.95rem}}
/* WHO-BADGE-END */

/* PROGRESS-START */
/* Skills progress / assigned work summary cards */
.pg-card .pg-table th,.pg-card .pg-table td{text-align:center}
.pg-card .pg-table th:first-child,.pg-card .pg-table td:first-child{text-align:left}
.pg-pill{display:inline-block;min-width:2.6rem;padding:.18rem .75rem;border-radius:999px;font-weight:800;font-size:15px}
.pg-pill.pend{background:#FFE7A8;color:#7A4B00}
.pg-pill.prog{background:#CFE0FF;color:#173A94}
.pg-pill.done{background:#BFF0D0;color:#0B6234}
.pg-bar{display:inline-block;vertical-align:middle;width:120px;max-width:40vw;height:11px;margin-right:.5rem;border-radius:99px;background:#D6E0FA;overflow:hidden}
.pg-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#4ADE80,#16A34A)}
.pg-table tr.pg-all>td{background:#FFF1B8;font-size:15px}
.pg-card .pg-table thead th:nth-child(3){background:linear-gradient(180deg,#F5A524,#D9830B)}
.pg-card .pg-table thead th:nth-child(4){background:linear-gradient(180deg,#4F7BF0,#2D4FC9)}
.pg-card .pg-table thead th:nth-child(5){background:linear-gradient(180deg,#34C16B,#168A47)}
/* PROGRESS-END */
/* ATT-PDF-START */
.row-head .att-pdf{margin-left:auto;white-space:nowrap}
.att summary .att-pdf1{margin-left:auto;white-space:nowrap;padding:.3rem .75rem;font-size:12px;font-weight:700}
/* ATT-PDF-END */

/* SORT-START */
th.srt, .gh .srt { cursor: pointer; user-select: none; }
th.srt { white-space: nowrap; }
th.srt::after, .gh .srt::after { content: ' ↕'; opacity: .55; font-size: .9em; }
th.srt[data-sd="asc"]::after, .gh .srt[data-sd="asc"]::after { content: ' ▲'; opacity: 1; }
th.srt[data-sd="desc"]::after, .gh .srt[data-sd="desc"]::after { content: ' ▼'; opacity: 1; }
th.srt:hover, .gh .srt:hover { text-decoration: underline; }
th.srt:focus-visible, .gh .srt:focus-visible { outline: 2px solid #FDE047; outline-offset: -2px; }
@media print { th.srt::after, .gh .srt::after { content: none; } }
/* SORT-END */

/* ALERT-TAGS-START */
.al-sub, .al-type { flex: none; display: inline-block; padding: .14rem .65rem; border-radius: 999px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; text-align: center; border: 1.5px solid; }
.al-sub { min-width: 8.2rem; background: #EEF2FF; color: #3730A3; border-color: #C7D2FE; }
.al-s-m { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.al-s-e { background: #DBEAFE; color: #1D4ED8; border-color: #93C5FD; }
.al-s-s { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.al-s-p { background: #F3E8FF; color: #7E22CE; border-color: #D8B4FE; }
.al-s-k { background: #FFE4E6; color: #BE123C; border-color: #FDA4AF; }
.al-s-b { background: #D1FAE5; color: #047857; border-color: #6EE7B7; }
.al-s-z { background: #FFEDD5; color: #C2410C; border-color: #FDBA74; }
.al-sub.none { background: #F1F5F9; color: #64748B; border-color: #CBD5E1; }
.al-type { min-width: 5.9rem; }
.al-hw { background: #2563EB; color: #fff; border-color: #1D4ED8; }
.al-cw { background: #7C3AED; color: #fff; border-color: #6D28D9; }
.al-pr { background: #F1F5F9; color: #475569; border-color: #CBD5E1; }
.al-text { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) { .alert-row { flex-wrap: wrap; padding: .4rem .6rem; } .al-text { flex-basis: 100%; } }
.pg-table th small.pg-crit { display: inline-block; margin-top: 3px; padding: 1px 9px; border-radius: 999px; background: rgba(0, 0, 0, .25); color: #fff !important; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; text-transform: none; opacity: 1; }
/* ALERT-TAGS-END */

/* ALERT-TABLE-START */
.al-table td { vertical-align: middle; }
.al-table td:first-child { white-space: nowrap; font-weight: 700; color: #334377; }
.al-table tr.al-new td:first-child { font-weight: 800; color: #14275A; }
.al-table td:nth-child(2), .al-table td:nth-child(3), .al-table td:nth-child(5) { white-space: nowrap; }
.al-table .al-ev { display: block; margin-top: 1px; color: #64748B; font-size: 11.5px; font-weight: 600; }
.al-table tr.al-mastered > td:first-child, .al-table tr.al-done > td:first-child, .al-table tr.al-improved > td:first-child { box-shadow: inset 5px 0 0 #16A34A; }
.al-table tr.al-homework > td:first-child { box-shadow: inset 5px 0 0 #2376DC; }
.al-table tr.al-remedial > td:first-child, .al-table tr.al-recheck > td:first-child { box-shadow: inset 5px 0 0 #DC2626; }
.al-table .al-st { display: inline-block; padding: .14rem .7rem; border-radius: 999px; font-size: 11.5px; font-weight: 800; border: 1.5px solid; }
/* NS-RED-START */
.al-table .al-ns { background: #DC2626; color: #fff; border-color: #B91C1C; font-weight: 800; }
/* NS-RED-END */
.al-table .al-ip { background: #DBEAFE; color: #1D4ED8; border-color: #93C5FD; }
.al-table .al-cp { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.al-table .al-best { margin-left: .45rem; font-size: 12px; font-weight: 800; color: #334377; }
/* ALERT-TABLE-END */

/* LATEST-COLS-START */
.al-sub { min-width: 6.4rem; }
.lw-table th, .lw-table td { padding: .5rem .4rem; }
.lw-table th { font-size: .74rem; }
.lw-table td.lw-skill { min-width: 0; }
.lw-table .al-sub, .lw-table .al-type { min-width: 0; padding: .12rem .5rem; }
.lw-table td:nth-child(1) { width: 6.2rem; }
.lw-table td:nth-child(5) { white-space: nowrap; }
.lw-table td:last-child .btn { padding: .2rem .55rem; }
/* LATEST-COLS-END */
/* CW-ROW-START */
.al-table tr.al-classwork > td:first-child { box-shadow: inset 5px 0 0 #7C3AED; }
/* CW-ROW-END */

/* Achievement Board (student): the rank in the class and the Learning Points of the week, on the left of the name in the menu bar */
.topbar .statchips { order: 98; margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.topbar .statchips + .who { margin-left: 0 }
.statchip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: .92rem; text-decoration: none; white-space: nowrap; color: #0a2a52; background: #fff3c4; border: 2px solid #ffc83d; box-shadow: 0 2px 0 rgba(0, 0, 0, .15) }
.statchip.rank { background: #dff0ff; border-color: #7cc0ff }
.statchip small { font-weight: 700; opacity: .7; font-size: .72rem }
.statchip:hover { transform: translateY(-1px); text-decoration: none }

/* the student's name is a drop-down button: Achievement Board, Awards, Change password */
.topbar .who.has-menu { cursor: pointer; user-select: none }
.topbar .who.has-menu::after { content: '▾'; margin-left: .5rem; font-size: .8em; opacity: .85 }
.usermenu { position: fixed; z-index: 1200; min-width: 240px; background: #fff; border: 2px solid #cfe3ff; border-radius: 16px; box-shadow: 0 14px 34px rgba(8, 43, 90, .38); padding: 8px }
.usermenu a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; color: #082B5A; font-weight: 800; font-size: .98rem; text-decoration: none }
.usermenu a:hover, .usermenu a.active { background: #e4f1ff }
.usermenu button.out { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-radius: 10px; background: none; color: #b42318; font: inherit; font-weight: 800; font-size: .98rem; text-align: left; cursor: pointer }
.usermenu button.out:hover { background: #fdecea }
.usermenu hr.sep { border: 0; border-top: 1px solid #dbe8f8; margin: 6px 4px }

/* Achievement Board (student): a wider menu bar so the rank, points and name fit in one row */
.nav:has(.statchips) { width: min(1760px, calc(100% - 32px)) }

/* TABS-BIG-START class page tabs (Students, Support, Suggested homework, Homework, Classwork, Live class...): bigger, clearly clickable tab buttons */
.tabs { gap: .55rem; border-bottom: 0; margin-bottom: 1.1rem }
.tabs a { display: inline-flex; align-items: center; padding: .75rem 1.4rem; font-size: 1.08rem; font-weight: 800; line-height: 1.2; color: #082b5a; background: linear-gradient(135deg, #ffe27a, #ffc83d); border: 2px solid #f0a800; border-radius: 14px; margin-bottom: 0; box-shadow: 0 2px 0 rgba(8, 43, 90, .12); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s }
.tabs a:hover { background: linear-gradient(135deg, #fff0a8, #ffd34d); border-color: #d98f00; transform: translateY(-2px); box-shadow: 0 5px 12px rgba(8, 43, 90, .18) }
.tabs a.active { color: #fff; background: linear-gradient(135deg, #2f5be0, #0b2e6b); border-color: #0b2e6b; box-shadow: 0 5px 14px rgba(11, 46, 107, .4) }
.tabs a:focus-visible { outline: 3px solid #ffc83d; outline-offset: 2px }
/* TABS-BIG-END */
