/* Poppins (SIL OFL), self-hosted so no visitor data goes to Google; same font as the main site header. */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/poppins-400-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/poppins-400-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/poppins-500-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/poppins-500-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/poppins-600-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/poppins-600-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/poppins-700-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/poppins-700-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Nunito (SIL OFL), the round friendly font of the lessons (Math Explorer), self-hosted, for the topic pages. */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/nunito-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/nunito-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/nunito-latin-800.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url(/assets/fonts/nunito-latin-ext-800.woff2) format('woff2'); unicode-range: U+0100-02AF,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
/* class.interactivelessons.nl. Colours and controls as in Math Explorer: the site (apps_site/site.css), the BBB plugin
   (theme.ts) and the applets (mx.css buttons, mx.js PAL colours). A class colour comes in as --ink (tone) and --fill (light). */
:root {
  --primary: #0f70d7; --primary-dark: #0c57a7; --text: #1c2733; --muted: #5b6877; --border: #d6dde5;
  --bg: #f5f7fa; --card: #fff; --active: #e8f1fc;
  --soft: #e4eefb; --soft-hover: #d6e5f8; --soft-border: #c3d9f3; --soft-text: #1f5fab;
  --danger: #c92a2a; --danger-fill: #ffe3e3; --ok: #2b8a3e; --ok-fill: #d3f9d8; --amber: #ffb020;
  --ink: #1971C2; --fill: #D0EBFF;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
a { color: var(--primary); }
h1, h2 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
p { margin: 0 0 12px; }

/* top bar: the same header as the main site (white, Poppins, teal links, logo image, language and account icons) */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand img { display: block; }

.page { flex: 1; width: 100%; max-width: var(--cw); margin: 0 auto; padding: 28px 16px 40px; }
.narrow .page { max-width: 520px; }

/* controls: buttons as the applet buttons (mx-btn) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px;
  font: 600 14.5px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; border-radius: 8px; border: 1px solid var(--soft-border);
  background: var(--soft); color: var(--soft-text); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { background: var(--soft-hover); border-color: #a9c8ee; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .link:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #1971C2; outline-offset: 2px; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.ghost { background: #fff; border-color: #dbe3ec; color: #475569; }
.btn.ghost:hover { background: #f4f7fb; }
.btn.danger { background: #fff; border-color: #ffa8a8; color: var(--danger); }
.btn.danger:hover { background: var(--danger-fill); }
.btn.big { height: 48px; padding: 0 24px; font-size: 16px; border-radius: 10px; }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn.copied { background: var(--ok-fill); border-color: #8ce99a; color: var(--ok); }
.link { font: inherit; font-size: 14px; color: var(--primary); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.danger-text { color: var(--danger) !important; }

input[type=text], input[type=email], input[type=password], input:not([type]), textarea {
  font: inherit; width: 100%; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
input:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; }
label, .label { font-weight: 600; font-size: 14px; }
.mono, code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
input.mono { font-size: 13px; color: #334155; background: var(--bg); }
.stack { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.stack .btn { align-self: flex-start; margin-top: 6px; }
.hint { color: var(--muted); font-size: 13.5px; }
.center { text-align: center; }
.error { color: var(--danger); font-weight: 600; font-size: 14px; margin: 4px 0 0; }
.lead { font-size: 17px; color: #334155; }

/* the applet tag: a coloured label */
.tag { display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: .03em; padding: 3px 10px; border-radius: 4px;
  color: var(--ink); background: var(--fill); white-space: nowrap; line-height: 1.35; vertical-align: middle; }
.tag.big { font-size: 15px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; }

.panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; margin-bottom: 18px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; font-weight: 600; font-size: 14px;
  background: var(--ok-fill); color: var(--ok); border: 1px solid #b2f2bb; }
.flash.error { background: var(--danger-fill); color: var(--danger); border-color: #ffc9c9; }

/* palette dots (the amber points of the Math Explorer icon, in the applet colours) */
.dots { display: flex; gap: 10px; padding: 0; margin: 18px 0 0; list-style: none; }
.dots li { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); }
.dots.pulse { justify-content: center; margin: 22px 0 18px; }
.dots.pulse li { animation: bob 1.4s ease-in-out infinite; }
.dots.pulse li:nth-child(2) { animation-delay: .15s; } .dots.pulse li:nth-child(3) { animation-delay: .3s; } .dots.pulse li:nth-child(4) { animation-delay: .45s; }
@keyframes bob { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .dots.pulse li, .live::before { animation: none !important; } }

/* the class code box */
.join-code h2 { margin-bottom: 14px; }
.join-code form { display: flex; flex-direction: column; gap: 10px; }
.code-input { font: 700 30px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; letter-spacing: .18em; text-align: center;
  text-transform: uppercase; padding: 14px 10px !important; border-width: 2px !important; }
.code-input::placeholder { color: #c3ccd6; }
.join-code .btn { width: 100%; }

/* my classes */
.pagehead { margin-bottom: 18px; }
.pagehead h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 0; }
.back { display: inline-flex; gap: 6px; color: var(--primary); text-decoration: none; font-weight: 600; font-size: 14px; }
.back span { font-size: 20px; line-height: .9; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.class-card { display: flex; flex-direction: column; gap: 10px; min-height: 132px; padding: 16px 18px; border-radius: 12px; text-decoration: none;
  color: var(--text); background: var(--fill); border: 1.5px solid transparent; box-shadow: inset 0 4px 0 var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .1s; }
a.class-card:hover, a.class-card:focus-visible { border-color: var(--ink); box-shadow: inset 0 4px 0 var(--ink), 0 4px 14px rgba(28, 39, 51, .12); outline: none; }
.class-card .tag { background: #fff; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; }
.cc-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.cc-name { font-size: 19px; font-weight: 700; line-height: 1.25; flex: 1; }
.cc-meta { font-size: 13px; color: #475569; }
.class-card.new { background: #fff; border: 1.5px dashed #b9c6d4; box-shadow: none; }
.class-card.new .cc-name { flex: none; font-size: 16px; }
.class-card.new .btn { align-self: flex-start; }
.class-card.new { gap: 12px; }
.class-card.new .swatches { gap: 6px; }
.class-card.new .swatch { width: 20px; height: 20px; }
.class-card.new .swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--fill), 0 0 0 3.5px var(--ink); }
.class-card.new .swatch:has(input:checked)::after { width: 4px; height: 8px; border-width: 0 2px 2px 0; }
.cc-lines { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: #3b4a5c; }
.cc-line { display: flex; align-items: center; gap: 7px; line-height: 1.3; }
.cc-line > svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--ink); }
.cc-open { margin-top: auto; padding-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
a.class-card:hover .cc-open { text-decoration: underline; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); cursor: pointer;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px transparent; transition: box-shadow .12s; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--fill), 0 0 0 5px var(--ink); }
.swatch:has(input:checked)::after { content: ""; position: absolute; left: 50%; top: 45%; width: 6px; height: 12px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: translate(-50%, -50%) rotate(45deg); }
.swatch:has(input:focus-visible) { outline: 2px solid #1971C2; outline-offset: 5px; }

/* the two kinds of lessons */
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid #d6dde5; border-radius: 10px;
  background: #fff; cursor: pointer; transition: border-color .12s, background .12s; }
.kind.locked { opacity: .55; }
.kind.locked input { cursor: not-allowed; }
.kind input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kind:has(input:checked) { border-color: #0f70d7; background: #e8f1fc; box-shadow: 0 0 0 1px #0f70d7; }
.kind:has(input:focus-visible) { outline: 2px solid #1971C2; outline-offset: 2px; }
.kind-icon { flex: none; display: inline-flex; width: 34px; height: 34px; border-radius: 9px; align-items: center; justify-content: center;
  background: #f1f4f8; color: #475569; }
.kind:has(input:checked) .kind-icon { background: #0f70d7; color: #fff; }
.kind svg, .cc-kind svg, .kind-line svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kind-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kind-text strong { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.kind-text small { font-size: 13px; font-weight: 400; color: #5b6877; line-height: 1.4; }
.kinds.compact { gap: 6px; }
.kinds.compact .kind { padding: 7px 8px; gap: 7px; align-items: center; }
.kinds.compact .kind-icon { width: 26px; height: 26px; border-radius: 7px; }
.kinds.compact .kind svg { width: 16px; height: 16px; }
.kinds.compact .kind-text strong { font-size: 13px; }
.cc-kind { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.cc-kind svg { width: 15px; height: 15px; vertical-align: -3px; }
.kind-line { display: inline-flex; align-items: center; gap: 6px; }
.tier-change { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.tier-change form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.tier-change .hint { font-size: 13.5px; }
.kind-note { margin: 6px 0 0; font-size: 14px; color: #475569; }
.kind-note .kind-line svg { width: 18px; height: 18px; vertical-align: -4px; }
.kind-note a { margin-left: 4px; }

/* live badge */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #c92a2a; background: #fff; border: 1px solid #ffc9c9; border-radius: 999px; padding: 2px 9px 2px 8px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fa5252; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* one class */
.lesson { display: flex; align-items: center; gap: 18px 28px; justify-content: space-between; flex-wrap: wrap;
  background: var(--fill); border-color: transparent; box-shadow: inset 4px 0 0 var(--ink); }
.lesson-main { flex: 1 1 320px; min-width: 0; }
.lesson-state { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; color: #1e293b; margin: 0; }
.lesson.is-live { background: #fff; border-color: var(--ink); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; justify-content: flex-end; }
.actions form { margin: 0; }
.cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
.cols .panel { margin-bottom: 0; }
.share { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 8px; }
.share-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 10px; }
.code-big { font-size: 26px; font-weight: 700; letter-spacing: .14em; color: var(--ink); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }
.count { display: inline-block; font-size: 13px; color: var(--muted); background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 0 9px; vertical-align: middle; margin-left: 4px; }
.add-pupils { margin-top: 16px; }

/* pupil pages */
.join { padding: 0; overflow: hidden; }
.join-head { background: var(--fill); padding: 22px 24px 18px; box-shadow: inset 0 4px 0 var(--ink); }
.join-head .tag { background: #fff; }
.join-head h1 { margin: 10px 0 4px; font-size: 26px; }
.join-head .hint { margin: 0; }
.join form, .waiting > p, .waiting > a { margin-left: 24px; margin-right: 24px; }
.join form { padding: 20px 0 24px; }
.join form .btn { align-self: stretch; }
.big-input { font-size: 20px !important; padding: 12px 14px !important; }
.hello { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.waiting { text-align: center; padding-bottom: 24px; }
.waiting .join-head { text-align: left; }
.waiting .lead { font-weight: 700; margin-bottom: 6px; }
.waiting > a { display: inline-block; margin-top: 4px; }

/* message page */
.message { text-align: center; padding: 30px 24px; }
.msg-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--primary); }
.message.done .msg-icon { background: var(--ok-fill); color: var(--ok); }
.msg-icon svg { width: 30px; height: 30px; }

@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; }
  .cols .panel { margin-bottom: 0; }
}
@media (max-width: 600px) {
  .page { padding: 18px 16px 30px; }
  .panel { padding: 18px 16px; }
  .panel.join { padding: 0; }
  .share-row { grid-template-columns: 1fr auto; }
  .share-row .label { grid-column: 1 / -1; }
}

/* ---------- site header ---------- */
:root { --teal: #024e64; --green: #63c76a; --cw: 100%; }
/* page, header and footer share the container widths of the main site (Bootstrap steps) */
@media (min-width: 576px) { :root { --cw: 540px; } }
@media (min-width: 768px) { :root { --cw: 720px; } }
@media (min-width: 992px) { :root { --cw: 960px; } }
@media (min-width: 1200px) { :root { --cw: 1140px; } }
@media (min-width: 1400px) { :root { --cw: 1320px; } }
.bar { position: sticky; top: 0; z-index: 10; background: #fff; font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.bar-in { display: flex; align-items: center; gap: 4px; height: 70px; margin: 0 auto; padding: 0 16px; max-width: var(--cw); }

.hbrand { display: flex; align-items: center; margin-right: 28px; flex: none; text-decoration: none; }
.hbrand img { display: block; }
.hbrand .logo { display: none; height: 56px; width: auto; }
.hbrand .logo-c { height: 36px; width: auto; }
/* inside pages: the round logo only, as on the inner pages of the main site (the full logo is for the home page) */
.bar.inner { border-bottom: 1px solid #dee2e6; }
.bar.inner .hbrand .logo { display: none !important; }
.bar.inner .hbrand .logo-c { display: block !important; height: 56px; }
.nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav > a { color: var(--teal); text-decoration: none; font-weight: 700; font-size: 17px; padding: 8px; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav > a:hover { color: var(--green); }
.nav > a[aria-current] { border-bottom-color: var(--green); }
.nav .panel-only { display: none; }
.bar-end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.cta { display: inline-block; background: var(--teal); color: #fff; font-family: inherit; font-weight: 500; font-size: 15px; text-decoration: none; padding: 8px 24px; border-radius: 50px; white-space: nowrap; }
.cta:hover { background: #013a4b; color: #fff; }
.head-cta { margin-left: 8px; }
.dd { position: relative; }
.dd > summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; color: #1d2125; font-size: 15px; font-weight: 500; padding: 6px 8px; border-radius: 8px; }
.dd > summary::-webkit-details-marker { display: none; }
.dd > summary:hover { color: var(--teal); }
.dd svg { flex: none; fill: var(--teal); }
.ic-lang { width: 19px; height: 15px; }
.ic-user { width: 27px; height: 27px; }
.chev { width: 10px; height: 6px; fill: none !important; color: #1d2125; }
.user-link { display: grid; place-items: center; padding: 6px 8px; border-radius: 8px; }
.user-link svg { fill: var(--teal); }
.user-dd > summary { padding: 6px 8px; }
.user-dd, .user-link { margin-right: -4px; }
.dd-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px; background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 28px rgba(28, 39, 51, .14); padding: 6px; z-index: 20; display: flex; flex-direction: column; }
.dd-menu.right { left: auto; right: 0; }
.lang-dd .dd-menu { left: auto; right: 0; }
.dd-menu a, .dd-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; font-size: 15px; font-weight: 400; color: #1d2125;
  padding: 7px 12px; border-radius: 6px; text-decoration: none; cursor: pointer; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--active); color: var(--teal); }
.dd-menu a[aria-current] { font-weight: 600; color: var(--teal); }
.dd-menu form { margin: 0; }
.dd-who { padding: 7px 12px 8px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-btn { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 40px; height: 40px; padding: 8px 6px; margin-right: 6px; border: 0; background: none; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: var(--teal); border-radius: 2px; }
@media (min-width: 1200px) {
  .hbrand .logo { display: block; }
  .hbrand .logo-c { display: none; }
  .hbrand { margin-right: 36px; }
}
/* desktop: the full logo (round mark + name) on every page, inner pages included */
@media (min-width: 1200px) {
  .bar.inner .hbrand:not(.own) .logo { display: block !important; }
  .bar.inner .hbrand:not(.own) .logo-c { display: none !important; }
}

/* trial / subscription band under the bar */
.band { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 9px 16px; font-size: 14px; font-weight: 600; text-align: center; }
.band a { font-weight: 700; }
.band.trial { background: var(--active); color: var(--soft-text); border-bottom: 1px solid var(--soft-border); }
.band.expired { background: var(--danger-fill); color: var(--danger); border-bottom: 1px solid #ffc9c9; }
.band.expired a { color: var(--danger); }

/* ---------- wide pages (start page, pricing...): full-width sections ---------- */
.wide .page { max-width: none; padding: 0; }
.wide .page > .flash { max-width: var(--cw); padding: 0 16px; margin: 18px auto 0; }
.wrap { max-width: var(--cw); margin: 0 auto; padding: 0 16px; }
.narrow-wrap { max-width: var(--cw); }
/* long text stays readable inside the wide page */
.qa > p, .acc-body p, .legal p, .legal li { max-width: 900px; }
.section { padding: 64px 0; }
.section.top { padding-top: 40px; }
.section.alt { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 32px; letter-spacing: -.01em; text-align: center; margin: 0 0 10px; }
.section-lead { font-size: 17.5px; color: #475569; text-align: center; max-width: 660px; margin: 0 auto 34px; }
.section-title.left, .section-lead.left { text-align: left; margin-left: 0; }
h3 { font-size: 17px; margin: 0 0 6px; }

.hero2 { padding: 48px 0 0; background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); }
.hero2-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.hero2 h1 { font-size: 46px; line-height: 1.12; letter-spacing: -.02em; margin: 16px 0 16px; }
.hero2 .lead { font-size: 18.5px; color: #475569; max-width: 600px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }
.hero2 .join-code { box-shadow: 0 10px 30px rgba(28, 39, 51, .08); }
.hero2 .join-code h2 { margin: 10px 0 14px; font-size: 22px; }
.hero2 .join-code .hint { margin: 12px 0 0; text-align: center; }
.shot { margin: 44px auto 0; padding-bottom: 0; text-align: center; }
.shot-frame { background: #1c2733; border-radius: 14px 14px 0 0; padding: 30px 10px 0; position: relative; box-shadow: 0 -2px 40px rgba(15, 112, 215, .12); }
.shot-frame img { display: block; width: 100%; height: auto; border-radius: 6px 6px 0 0; }
.shot-dots { position: absolute; left: 16px; top: 11px; display: flex; gap: 6px; }
.shot-dots i { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.shot-dots i:nth-child(1) { background: #fa5252; } .shot-dots i:nth-child(2) { background: #fcc419; } .shot-dots i:nth-child(3) { background: #51cf66; }
.shot figcaption { display: none; }

.numbers { background: #1c2733; color: #fff; padding: 26px 0; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.numbers strong { display: block; font-size: 34px; line-height: 1.1; color: #fff; }
.numbers div:nth-child(1) strong { color: #74c0fc; } .numbers div:nth-child(2) strong { color: #8ce99a; }
.numbers div:nth-child(3) strong { color: #ffc078; } .numbers div:nth-child(4) strong { color: #b197fc; }
.numbers span { font-size: 14px; color: #cbd5e1; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: inset 0 4px 0 var(--ink); }
.step-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--fill); color: var(--ink); font-weight: 800; font-size: 19px; margin-bottom: 14px; }
.steps p { color: #475569; margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.features.four { grid-template-columns: repeat(4, 1fr); }
.feature { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.section.alt .feature { background: var(--bg); border-color: #e3e8ee; }
.feature p { color: #475569; margin: 0; font-size: 14.5px; }
.f-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--fill); color: var(--ink); margin-bottom: 14px; }
.f-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.f-dot { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); margin-bottom: 14px; box-shadow: 0 0 0 5px var(--fill); }

.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.applet { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.applet:hover { box-shadow: 0 8px 24px rgba(28, 39, 51, .1); transform: translateY(-2px); }
.applet img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--border); }
.applet figcaption { padding: 12px 14px 14px; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.applet figcaption span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 3px; }

.price-teaser { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.price-mini { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 14px; }
.price-mini div { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 22px; text-align: center; }
.price-mini div.best { background: #ebfbee; border-color: #8ce99a; }
.price-mini strong { display: block; font-size: 30px; }
.price-mini b { display: block; font-size: 15px; margin-bottom: 6px; }
.price-mini small { display: block; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.price-mini span { color: var(--muted); font-size: 14px; }
.price-mini em { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: #2f9e44; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }

/* accordion: one soft style for every page (class page, account, FAQ) */
.accs { display: flex; flex-direction: column; gap: 10px; }
.acc, .qa { background: #fff; border: 1px solid #dbe5f0; border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.acc:hover, .qa:hover { border-color: #c3d9f3; }
.acc[open], .qa[open] { border-color: #c3d9f3; box-shadow: 0 1px 6px rgba(15, 112, 215, .07); }
.acc > summary, .qa > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; position: relative;
  padding: 14px 18px; font-weight: 700; font-size: 16px; background: #f6f9fd; transition: background .15s; }
.acc > summary::-webkit-details-marker, .qa > summary::-webkit-details-marker { display: none; }
.acc > summary:hover, .qa > summary:hover { background: #eef4fb; }
.acc[open] > summary, .qa[open] > summary { background: #eef4fb; border-bottom: 1px solid #dbe5f0; }
.acc > summary:focus-visible, .qa > summary:focus-visible { outline: 2px solid #1971C2; outline-offset: -2px; }
.acc-icon { flex: none; display: inline-flex; width: 30px; height: 30px; border-radius: 9px; align-items: center; justify-content: center;
  background: var(--soft); color: var(--soft-text); }
.acc-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acc-title { flex: 0 1 auto; }
.acc > summary .count { margin-left: 0; background: #fff; }
.acc-chev, .qa > summary::after { flex: none; margin-left: auto; width: 9px; height: 9px; border: solid #6b7c93; border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.acc[open] > summary .acc-chev, .qa[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.qa > summary::after { content: ""; }
.acc-body { padding: 18px 20px 20px; }
.acc-body > :last-child { margin-bottom: 0; }
.qa > p { padding: 14px 18px 16px; margin: 0; color: #475569; }
.acc-danger { border-color: #f3d4d4; }
.acc-danger:hover, .acc-danger[open] { border-color: #f0bcbc; box-shadow: none; }
.acc-danger > summary { background: #fdf6f6; color: #a61e1e; }
.acc-danger > summary:hover, .acc-danger[open] > summary { background: #fbeeee; border-bottom-color: #f3d4d4; }
.acc-danger .acc-icon { background: #ffe3e3; color: #c92a2a; }
.acc-danger .acc-chev { border-color: #c98a8a; }
.acc-body .stack { max-width: 520px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { vertical-align: middle; }
.row-actions form { display: inline-block; margin: 0 0 0 4px; }
/* account page */
.sub-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; margin-bottom: 14px; border-radius: 12px;
  background: var(--fill); border: 1.5px solid transparent; box-shadow: inset 0 4px 0 var(--ink); }
.sub-hero .tag { background: #fff; }
.sub-hero p { flex: 1 1 260px; margin: 0; font-size: 15px; }
.sub-hero .btn { margin-left: auto; }
.set-grid.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.set-card .stat-value { margin: 0; font-size: 18px; font-weight: 700; }
.set-card .stat-value.plain { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.set-card form { margin: 0; }
.set-card input:not([type=checkbox]), .set-card select { width: 100%; box-sizing: border-box; background: #fff; }
.set-card.has-error input { border-color: #ff8787; }
.set-card .error { margin: 0; font-size: 13.5px; }
.set-card.danger { background: #fff6f6; border-color: #f3d4d4; }
.set-card.danger .acc-icon { background: #ffe3e3; color: #c92a2a; }
.set-grid.invoices { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
a.set-card.inv { flex-direction: row; align-items: center; gap: 12px; text-decoration: none; color: var(--text); transition: border-color .15s, box-shadow .15s; }
a.set-card.inv:hover, a.set-card.inv:focus-visible { border-color: #9dc2ee; box-shadow: 0 2px 8px rgba(15, 112, 215, .1); outline: none; }
.inv-text { display: flex; flex-direction: column; min-width: 0; }
.inv-text strong { font-size: 15px; }
.inv-text small { font-size: 13px; color: var(--muted); }
.inv-amount { margin-left: auto; font-weight: 700; font-size: 16px; }
/* the list of personal links: one small card per pupil */
.pupil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin: 8px 0 14px; }
.pupil-card { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; background: #f4f9ff; border: 1px solid #d9e7f7; border-radius: 12px; }
.pc-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pc-initial { flex: none; display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--soft); color: var(--soft-text); font-size: 13px; font-weight: 700; }
.pupil-card .pname { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.pupil-card input.mono { background: #fff; width: 100%; box-sizing: border-box; }
.pc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.pc-actions form { margin: 0; }
/* settings: small cards side by side */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; margin-bottom: 16px; grid-auto-flow: dense; }
.set-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; background: #f4f9ff; border: 1px solid #d9e7f7; border-radius: 12px; }
.set-card h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 14.5px; font-weight: 700; }
.set-card .acc-icon { width: 26px; height: 26px; border-radius: 8px; }
.set-card .acc-icon svg { width: 16px; height: 16px; }
.set-card .check { margin: 0; }
.set-card textarea { width: 100%; box-sizing: border-box; }
.set-card input[type=file] { width: 100%; box-sizing: border-box; }
.set-card .hint { margin: 0; font-size: 13px; }
.set-card .kinds { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.set-card select { width: 100%; }
.set-card .cur-pick select { flex: 1 1 180px; }
@media (min-width: 640px) { .set-card.wide { grid-column: span 2; } }
.acc-body .add-pupils { margin-top: 18px; }
.faq-short { max-width: var(--cw); }
.faq-group { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 30px 0 12px; }
.note-box { background: var(--active); border: 1px solid var(--soft-border); border-radius: 10px; padding: 14px 18px; margin: 22px 0; }

.cta-band { background: linear-gradient(135deg, #0f70d7 0%, #0c57a7 100%); color: #fff; text-align: center; padding: 56px 0; }
.cta-band h2 { font-size: 30px; margin-bottom: 8px; }
.cta-band p { color: #d0ebff; font-size: 17px; margin-bottom: 22px; }
.btn.light { background: #fff; color: var(--primary-dark); border-color: #fff; }
.btn.light:hover { background: #e7f5ff; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 20px; align-items: stretch; margin-bottom: 34px; }
.plans[style*="--n:1"] { max-width: 420px; margin-inline: auto; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1.5px solid var(--border); border-radius: 16px; padding: 28px 24px; box-shadow: inset 0 5px 0 var(--ink); }
.plan.best { border-color: var(--ink); box-shadow: inset 0 5px 0 var(--ink), 0 10px 30px rgba(47, 158, 68, .15); }
.plan h2 { color: var(--ink); font-size: 18px; margin: 4px 0 0; }
.plan .price { margin: 4px 0 0; }
.plan .price strong { font-size: 38px; letter-spacing: -.02em; }
.plan .price span { color: var(--muted); }
.plan .hint { flex: 1; }
.plan .btn, .plan form .btn { width: 100%; }
.plan form { margin: 0; }
.plan-for { margin: 0 0 6px; color: var(--muted); font-size: 14.5px; min-height: 2.8em; }
.plan .per-note { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.plan .checks { margin: 18px 0 0; flex: 1; }
.plan .checks li { font-size: 14.5px; }
.plan .on-request { font-size: 30px !important; }
.plan .link.center { align-self: center; margin-top: 10px; }
.plan > .per { display: flex; flex-direction: column; }
body:has(.period-switch input[value="month"]:checked) .per-year,
body:has(.period-switch input[value="year"]:checked) .per-month { display: none; }
.period-switch { display: flex; justify-content: center; width: max-content; max-width: 100%; margin: 0 auto 30px; padding: 4px; gap: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px; }
.period-switch label { position: relative; cursor: pointer; }
.period-switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.period-switch span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); }
.period-switch em { font-style: normal; font-size: 12px; font-weight: 700; color: #2f9e44; background: #ebfbee; padding: 2px 8px; border-radius: 999px; }
.period-switch input:checked + span { background: #0f70d7; color: #fff; }
.period-switch input:checked + span em { background: #fff; }
.period-switch input:focus-visible + span { outline: 2px solid #1971C2; outline-offset: 2px; }
.custom-offer { display: flex; align-items: center; justify-content: space-between; gap: 18px 30px; flex-wrap: wrap; margin: -10px 0 30px;
  padding: 22px 26px; background: #fff; border: 1.5px solid var(--border); border-radius: 16px; box-shadow: inset 5px 0 0 var(--ink); }
.custom-offer h2 { color: var(--ink); font-size: 18px; margin: 0 0 4px; }
.custom-offer > div:first-child { flex: 1 1 420px; }
.custom-offer p { margin: 0; color: var(--muted); max-width: 620px; }
.custom-actions { display: flex; align-items: center; gap: 16px; }
.ribbon { position: absolute; top: -12px; right: 20px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.included { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px 28px; margin-bottom: 18px; }
.included h2 { font-size: 18px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.included .checks { grid-template-columns: repeat(2, 1fr); margin: 0; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #d3f9d8; }
.checks li::after { content: ""; position: absolute; left: 7px; top: 6px; width: 5px; height: 9px; border: solid #2f9e44; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.signup-pitch .checks { margin-top: 10px; }

/* forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field .error { margin: 0; font-size: 13.5px; }
.field.has-error input, .field.has-error textarea { border-color: #ff8787; }
.field .hint { font-size: 12.5px; }
select { font: inherit; padding: 9px 10px; border: 1.5px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check a { font-weight: 600; }

/* account */
.sub-card .sub-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 15px; }
.sub-card form { margin: 0 0 10px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list td, .list th { padding: 8px 6px; border-bottom: 1px solid #eef2f6; text-align: left; vertical-align: top; }
.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.list .num { text-align: right; white-space: nowrap; }
.accs-narrow { max-width: 860px; }

/* admin */
.pagehead.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 22px; }
.kpis div { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: inset 4px 0 0 var(--ink); }
.kpis strong { display: block; font-size: 24px; }
.kpis span { color: var(--muted); font-size: 13px; }
.search-row { display: flex; gap: 8px; margin-bottom: 14px; max-width: 520px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 6px 10px; }
.admin-list tr.off { opacity: .5; }
.admin-list select { padding: 5px 6px; font-size: 13px; }
.admin-list .row-actions form { display: flex; gap: 4px; }
.msg-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.msg-body { white-space: normal; }
.msg.handled { opacity: .6; }

/* legal pages */
.legal h1 { font-size: 32px; }
.legal .acc-body { font-size: 15.5px; }
.legal .acc-body ul { margin: 0 0 12px; padding-left: 22px; }
.legal .acc-body .legal-table { margin: 6px 0 12px; }
.acc-tools { margin: 18px 0 10px; font-size: 14px; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--primary-dark); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.legal li { margin-bottom: 6px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-table th { background: var(--bg); }

/* footer: dark like the footer of the main site (Poppins, big white headings, soft white links, yellow cap) */
.foot { background: #201f1e; color: #fff; font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5; }
.foot-top { padding: 100px 0 50px; }
.foot-cols { max-width: var(--cw); margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px 40px; }
.foot-brand { flex: 0 0 372px; }
.foot-cols nav { display: flex; flex-direction: column; gap: 15px; align-items: flex-start; }
.foot-cols h3 { font-size: 26px; font-weight: 400; letter-spacing: 1.2px; line-height: 1.4; margin: 10px 0 10px; color: #fff; }
.foot-cols nav a, .foot-addr a { color: #fff; opacity: .8; text-decoration: none; }
.foot-cols nav a:hover, .foot-addr a:hover { opacity: 1; color: var(--green); }
.foot-name { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 22px; font-weight: 600; text-transform: uppercase; line-height: 1.3; }
.foot-name img { display: block; flex: none; }
.foot-name span { white-space: nowrap; }
@media (min-width: 1001px) and (max-width: 1199px) { .foot-brand { flex-basis: 312px; } .foot-name { font-size: 18px; } }
.foot-name + .foot-addr { margin-top: 12px; }
.foot-addr { display: flex; gap: 10px; opacity: .8; margin-top: 22px; }
.foot-cols nav a.foot-yt, .foot-yt { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: #fff; opacity: .8; text-decoration: none; }
.foot-yt:hover { opacity: 1; color: var(--green); }
.foot-addr svg { flex: none; color: var(--green); margin-top: 4px; }
.foot-bottom { background: #201f1e; max-width: none; margin: 0; padding: 10px 16px 40px; text-align: center; font-size: 14px; display: block; border-top: 0; }
.foot-bottom a { color: #fff; opacity: .8; }
.foot-kvk { color: #999; margin-top: 2px; }
.pay-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.pay-badge { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 10px; border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1; color: #fff; letter-spacing: .2px; }
.pay-badge.ideal { background: #cc0066; }
.pay-badge.paypal { background: #0070ba; }
.pay-badge.card { background: #4b5563; padding: 0 8px; }
.pay-badge.sepa { background: #003399; }
.foot.small .foot-bottom { padding: 26px 16px; }

/* invoice */
.invoice-page { background: var(--bg); }
.invoice-tools { max-width: 800px; margin: 20px auto 10px; padding: 0 16px; display: flex; justify-content: space-between; align-items: center; }
.invoice { max-width: 800px; margin: 0 auto 40px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 44px 48px; }
.inv-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.inv-co { text-align: right; font-size: 13.5px; color: #475569; }
.inv-meta { display: flex; justify-content: space-between; gap: 20px; margin: 10px 0 30px; font-size: 14.5px; }
.inv-meta table td { padding: 2px 0 2px 18px; }
.inv-meta table td:first-child { color: var(--muted); padding-left: 0; }
.paid { color: var(--ok); }
.inv-lines { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 18px; }
.inv-lines th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--text); padding: 8px 6px; }
.inv-lines td { padding: 10px 6px; border-bottom: 1px solid var(--border); }
.inv-lines .num { text-align: right; white-space: nowrap; }
.inv-lines tfoot td { border-bottom: 0; }
.inv-lines tr.total td { font-weight: 800; font-size: 17px; border-top: 2px solid var(--text); }
@media print {
  .invoice-tools { display: none; }
  .invoice-page { background: #fff; }
  .invoice { border: 0; padding: 0; margin: 0; max-width: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 991px) {
  .menu-btn { display: flex; }
  .hbrand { margin-right: 0; }
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; margin: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px 16px; box-shadow: 0 10px 20px rgba(28, 39, 51, .08); }
  body[data-menu-open] .nav { display: flex; }
  .nav > a { padding: 11px 8px; border-bottom: 0; }
  .nav > a[aria-current] { background: var(--active); border-radius: 8px; }
  .nav .panel-only { display: block; }
  .nav .cta { text-align: center; margin-top: 8px; color: #fff; }
  .head-cta { display: none; }
}
@media (max-width: 1000px) {
  .hero2-grid, .price-teaser, .two-col { grid-template-columns: 1fr; gap: 28px; }
  .hero2 h1 { font-size: 36px; }
  .features, .showcase, .plans { grid-template-columns: repeat(2, 1fr); }
  .features.four { grid-template-columns: repeat(2, 1fr); }
  .foot-cols > * { flex: 1 1 40%; }
  .foot-top { padding: 60px 0 30px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 44px 0; }
  .hero2 { padding-top: 28px; }
  .hero2 h1 { font-size: 30px; }
  .section-title { font-size: 25px; }
  .numbers-grid, .steps, .features, .features.four, .showcase, .plans, .included .checks, .price-mini { grid-template-columns: 1fr; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .foot-cols > * { flex: 1 1 100%; }
  .foot-name { font-size: 18px; }
  .invoice { padding: 24px 18px; }
  .inv-head, .inv-meta { flex-direction: column; }
  .inv-co { text-align: left; }
}
@media (max-width: 359px) { .foot-name span { white-space: normal; } }
.nowrap { white-space: nowrap; }

/* teacher guide */
.guide { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-direction: column; gap: 22px; }
.guide li { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; position: relative; }
.guide li::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ink); z-index: 1; }
.guide-text { padding: 22px 24px 14px; }
@media (min-width: 992px) {
  .guide li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; }
  .guide-text { padding: 30px 32px; }
  .guide li img { border-top: 0; border-left: 1px solid var(--border); }
  .guide li:nth-child(even) .guide-text { order: 2; }
  .guide li:nth-child(even) img { border-left: 0; border-right: 1px solid var(--border); }
  ol.guide li:nth-child(2) img { align-self: stretch; width: 100%; height: auto; padding: 0; margin: 0; border: 0; object-fit: none; object-position: center; background: var(--bg); }
}
.guide-text .step-n { float: left; margin: 0 14px 0 0; }
.guide-text h2 { font-size: 19px; margin: 8px 0 10px; }
.guide-text p { clear: both; color: #475569; margin: 0; }
.guide img { display: block; width: 100%; height: auto; border-top: 1px solid var(--border); background: var(--bg); }
.guide li:nth-child(2) img { width: auto; max-width: 100%; margin: 0 auto; border: 0; padding: 0 24px 22px; background: none; }
/* first steps on My classes */
.first-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 22px; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.first-steps h2 { grid-column: 1 / -1; font-size: 17px; margin: 0; }
.first-steps div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #475569; }
.first-steps .step-n { flex: none; width: 30px; height: 30px; font-size: 15px; margin: 0; }
.first-steps div.done { opacity: .55; text-decoration: line-through; }
.first-steps a.link { grid-column: 1 / -1; justify-self: start; padding: 0; }
@media (max-width: 640px) { .first-steps { grid-template-columns: 1fr; } }

.cur-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.cur-pick select { flex: 1 1 200px; min-width: 0; }
input[type=file] { font: inherit; font-size: 14px; padding: 8px; background: #f6f9fd; border: 1px dashed #b9cfe8; border-radius: 8px; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; font-size: 13.5px; margin-right: 10px; padding: 5px 12px; border: 1px solid var(--soft-border); border-radius: 7px; background: var(--soft); color: var(--soft-text); cursor: pointer; }

/* spacing of the FAQ accordions and the button below them */
.qa { margin: 0 0 10px; }
.qa + p.center { margin-top: 26px; }
.faq-short .section-title { margin-bottom: 26px; }

/* admin: payments page */
.head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-opts { display: grid; gap: 10px; }
.mode-opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: #fff; }
.mode-opt:hover { border-color: #c3d9f3; }
.mode-opt:has(input:checked) { border-color: #1971C2; background: #eef4fb; }
.mode-opt input { margin-top: 4px; }
.mode-opt strong { display: block; }
.mode-opt .hint { display: block; }
.note-box.ok { border-color: #8ce99a; background: #ebfbee; }
.note-box.bad { border-color: #ffc9c9; background: #fff5f5; }
.acc-body .field + .field { margin-top: 12px; }
.acc-body .row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* pricing: comparison table */
.compare { margin: -6px 0 30px; }
.compare h2 { font-size: 18px; margin: 0 0 12px; }
.compare-table th { color: var(--ink, var(--text)); text-align: center; }
.compare-table td { text-align: center; }
.compare-table td:first-child, .compare-table th:first-child { text-align: left; color: var(--muted); font-weight: 500; }
.note-box.warn { border-color: #ffd8a8; background: #fff9db; }
.btn.disabled { opacity: .45; pointer-events: none; }
.strong-link { font-weight: 700; color: var(--text); text-decoration: none; }
.strong-link:hover { color: var(--primary); text-decoration: underline; }

/* admin: one teacher's own limits */
.lim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.lim-grid .field { margin: 0 !important; }
.lim-grid .field > span:first-child { font-weight: 600; font-size: 14px; }

/* admin: the plan editor */
.pl-wrap { max-width: 1440px; }
.pl-head { gap: 12px; flex-wrap: wrap; align-items: center; }
.pl-head h1 { margin-right: auto; }
.pl-head form { margin: 0; }
.pl-status { font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: #f1f3f5; color: #495057; }
.pl-status.ok { background: #e7f5ff; color: #1864ab; }
.pl-status.saving { background: #fff4e6; color: #d9480f; }
.pl-status.error { background: #fff5f5; color: #c92a2a; }
.pl-problems .note-box { margin: 8px 0; padding: 9px 14px; font-size: 14px; }
.pl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; margin-top: 14px; }
.pl-editor { padding: 0 18px 18px; }
.pl-preview { position: sticky; top: 12px; padding: 0; overflow: hidden; }
.pl-preview iframe { display: block; width: 100%; height: calc(100vh - 90px); min-height: 520px; border: 0; background: #fff; }
.pl-pv-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #f8fafc; font-size: 14px; }
.pl-pv-bar .check { margin: 0; }
.pl-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 -18px 16px; padding: 0 12px; }
.pl-tabs button { border: 0; background: none; padding: 13px 12px; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; }
.pl-tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.pl-group { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 8px; }
.pl-list { display: flex; flex-direction: column; gap: 6px; }
.pl-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.pl-row:hover { border-color: #c3d9f3; }
.pl-row.on { border-color: #1971C2; background: #eef4fb; }
.pl-row:focus-visible { outline: 2px solid #1971C2; outline-offset: 2px; }
.pl-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.pl-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-price { white-space: nowrap; }
.pl-move { display: flex; flex-direction: column; }
.pl-move button { border: 0; background: none; padding: 0 4px; font-size: 10px; line-height: 1.2; color: #6b7c93; cursor: pointer; }
.pl-move button:hover { color: var(--primary); }
.pl-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
.tag.sys { --ink: #1864ab; --fill: #e7f5ff; font-size: 11px; }
.tag.info { --ink: #2b8a3e; --fill: #ebfbee; font-size: 11px; }
.tag.hid { --ink: #d9480f; --fill: #fff4e6; font-size: 11px; }
.tag.closed { --ink: #c92a2a; --fill: #fff5f5; font-size: 11px; }
.tag.new { --ink: #5f3dc4; --fill: #f3f0ff; font-size: 11px; }
.tag.ok { --ink: #2b8a3e; --fill: #ebfbee; font-size: 11px; }
.pl-edit-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.pl-edit-head h2 { font-size: 18px; margin: 0; color: var(--ink); }
.pl-acc { margin-bottom: 10px; }
.pl-acc .acc-body { display: grid; gap: 12px; }
.pl-acc .acc-body > * { margin: 0; }
.pl-acc .field { display: grid; gap: 4px; margin: 0; }
.pl-acc .field > span:first-child { font-weight: 600; font-size: 14px; }
.pl-def-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-langs { display: inline-flex; border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.pl-langs button { border: 0; background: #fff; padding: 4px 11px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.pl-langs button + button { border-left: 1px solid var(--border); }
.pl-langs button[aria-pressed="true"] { background: var(--primary); color: #fff; }
.pl-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.pl-eur { position: relative; display: block; }
.pl-eur::before { content: "€"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pl-eur input { padding-left: 26px; }
.pl-calc { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pl-var { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.pl-var code, .pl-acc code { font-size: 12px; color: var(--muted); }
.pl-var-name strong { font-size: 14px; }
.pl-unl { display: flex; gap: 10px; align-items: center; }
.pl-unl input[type=number] { flex: 1; min-width: 0; }
.pl-unl .check { margin: 0; white-space: nowrap; font-size: 13px; }
.pl-def { background: #f4f8fd; border: 1px solid #dbe5f0; border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; }
.pl-line { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.pl-line input { flex: 1; min-width: 0; }
.pl-link { display: flex; gap: 6px; align-items: center; }
.pl-link input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.pl-langlist { display: grid; gap: 6px; }
.pl-diff { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.pl-diff li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.pl-diff .tag { flex: none; min-width: 74px; text-align: center; }
.preview-band { background: #fff4e6; color: #d9480f; text-align: center; font-weight: 600; font-size: 13px; padding: 6px 12px; }
@media (max-width: 1100px) {
  .pl-grid { grid-template-columns: minmax(0, 1fr); }
  .pl-preview { position: static; }
  .pl-preview iframe { height: 80vh; }
}
@media (max-width: 560px) {
  .pl-var { grid-template-columns: minmax(0, 1fr) auto; }
  .pl-var-name { grid-column: 1 / -1; }
}
.pl-acc label.field, .pl-acc .mode-opt, .lim-grid .field { font-weight: 400; }
.pl-acc .field input, .pl-acc .field textarea, .pl-acc .field select, .lim-grid input { font-weight: 400; }
.mode-opt .hint { font-weight: 400; }
.contact .teachers-field { display: none; }
.contact form:has(#f-topic option[value="school"]:checked) .teachers-field,
.contact form:has(#f-topic option[value="custom"]:checked) .teachers-field { display: block; }

/* schools: forms, the offer, the school page, the admin's school page */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .field, .acc-body .form-grid .field + .field { margin: 0 0 12px; justify-content: flex-start; }
.form-grid input:not([type=checkbox]):not([type=radio]), .form-grid select { height: 44px; }
/* number, date and select fields look and size exactly like the text fields */
.form-grid input[type=number], .form-grid input[type=date], .form-grid input[type=tel], .form-grid input[type=url], .form-grid select,
.field input[type=number], .field input[type=date], .field select {
  font: inherit; width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--text); }
.form-grid input[type=number]:focus, .form-grid input[type=date]:focus, .form-grid select:focus { border-color: var(--primary); }
.offer-card { background: #fff; border: 1.5px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: inset 0 5px 0 var(--ink); margin-bottom: 22px; }
.offer-head h2 { color: var(--ink); margin: 0 0 4px; font-size: 22px; }
.offer-sum { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.offer-sum td { padding: 7px 0; border-bottom: 1px solid var(--border); }
.offer-sum td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.offer-sum tr.total td { font-weight: 700; font-size: 17px; border-bottom: 0; }
.offer-form h2 { margin-top: 0; }
.offer-form .check { margin: 10px 0; }
.offer-form .btn.big { margin-top: 12px; }
.invite-panel h2 { font-size: 18px; margin-top: 22px; }
.invite-panel .check { margin: 12px 0; }
.invite-opts { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 16px; }
.invite-opts .check { margin: 0; }
.invite-opts select { width: auto; }
.two-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 16px 0; }
.two-forms form { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.two-forms h3 { margin: 0 0 8px; font-size: 15px; }
.member-dd { display: inline-block; position: relative; }
.member-dd > summary { list-style: none; cursor: pointer; }
.member-dd > summary::-webkit-details-marker { display: none; }
.member-dd .dd-menu { display: grid; gap: 10px; min-width: 240px; padding: 12px; text-align: left; white-space: normal; z-index: 20; }
.member-dd .dd-menu form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.member-dd .dd-menu .check { margin: 0; }
.member-dd .dd-menu input[name=reason] { flex: 1 1 140px; }
table.members td { vertical-align: top; }
.small-num { width: 80px !important; display: inline-block; }
.check.inline { display: inline-flex; margin: 0 8px 0 0; }
.pl-actions form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.timeline li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 14px; flex-wrap: wrap; }
.timeline details { flex: 1 1 300px; min-width: 0; }
.timeline summary { cursor: pointer; }
.timeline .ev-body { white-space: pre-wrap; font: 13px/1.5 system-ui, sans-serif; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 8px 0 4px; max-height: 360px; overflow: auto; }
.tag.ev { font-size: 11px; --ink: #495057; --fill: #f1f3f5; }
.timeline .ev-owner .tag.ev { --ink: #1864ab; --fill: #e7f5ff; }
.timeline .ev-school .tag.ev, .timeline .ev-teacher .tag.ev { --ink: #2b8a3e; --fill: #ebfbee; }
.renew-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin-top: 14px; }
@media (max-width: 720px) {
  .form-grid, .form-grid.three, .two-forms { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- topic pages (/topics): the look of the applets' own information pages (mx.css .mx-icard), on a scrolling page ---------- */
.topic .crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.topic .crumbs a { color: var(--muted); text-decoration: none; }
.topic .crumbs a:hover { text-decoration: underline; }
.topic-title { font-size: 34px; letter-spacing: -.01em; color: #4c86bf; margin: 0 0 8px; text-align: left; }
.topic-lead { font-size: 17px; color: #475569; max-width: 820px; margin: 0 0 22px; }
.topic-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.itab { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 19px; border: 2px solid var(--tc); color: var(--td); background: #fff;
  font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; }
.itab.sum { --tc: #6ea8dc; --td: #3f7fbf; --tn: #dcebf9; } .itab.ex { --tc: #ab8fda; --td: #7a52c7; --tn: #ece3fa; }
.itab.goal { --tc: #f0a468; --td: #d97b2d; } .itab.how { --tc: #6cbe8b; --td: #3a9a62; }
.itab.sum, .itab.ex { background: #fff; } .itab.sum.on, .itab.ex.on { background: var(--tn); } .itab.sum:hover, .itab.ex:hover { filter: brightness(.97); }
.itab.lock { background: #fff; border-style: dashed; opacity: .72; }
.itab.lock:hover { opacity: 1; } .itab.lock i { font-style: normal; font-size: 12px; }
.topic-sheet { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 8px 28px 30px; }
.topic-h { font-size: 24px; margin: 28px 0 14px; scroll-margin-top: 80px; }
.topic-head { display: flex; align-items: center; gap: 10px; }
.topic-head .topic-h { margin-right: auto; }
.topic-sheet + .topic-sheet { margin-top: 22px; }
.topic-h.info-sum { color: #6ea8dc; } .topic-h.info-ex { color: #ab8fda; }
.igrid { display: flex; flex-direction: column; gap: 14px; }
.icard { --cb: #f8f9fa; --cbd: #eef0f2; --fx: #e3e7eb; --fe: #868e96; font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.icard.def { --cb: #f1f7fd; --cbd: #d6e7f8; --ic: #5b93c9; --fx: #c9ddf2; --fe: #5b93c9; }
.icard.rule { --cb: #f3faf5; --cbd: #d3eedc; --ic: #4fa570; --fx: #c2e5ce; --fe: #4fa570; }
.icard.tip { --cb: #fff8f2; --cbd: #fce6d6; --ic: #de7f3c; --fx: #f5dd8c; --fe: #c4951f; }
.icard.warn { --cb: #fff4f4; --cbd: #f9d5d5; --ic: #db6e6e; --fx: #f2c4c4; --fe: #d06262; }
.icard.edge { --cb: #f7f3ff; --cbd: #e3d9fb; --ic: #9077d6; --fx: #d8ccf7; --fe: #8a6fd1; }
.igrid .icard { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.igrid .icard.withex { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.icard .main { background: var(--cb); border: 2px solid var(--cbd); border-radius: 14px; padding: 12px 16px 14px; }
.icard .main .lb { float: right; display: flex; align-items: center; gap: 6px; margin: 3px 0 0 12px; padding: 1px 9px; border-radius: 9px; background: rgba(255,255,255,.85);
  color: var(--ic); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.icard .main .h { color: var(--ic); font-size: 19px; font-weight: 800; line-height: 1.3; margin: 0 0 6px; }
.icard .icex { background: #fffcf0; border: 2px solid #faedc4; border-radius: 14px; padding: 10px 14px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.icard .icex .lb { color: #d08a1e; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 3px; }
.il { display: block; } .il + .il { margin-top: 5px; }
.icard .katex { white-space: nowrap; font-size: 1.05em; }
.icard .m { display: inline-block; max-width: 100%; vertical-align: middle; }
.icard .katex-display, .icard .katex { background: #fff; border: 1.5px solid var(--fx); border-radius: 7px; padding: .12em .32em; margin: .06em 0; display: inline-block; }
.icard .katex.bare { background: none; border: 0; padding: 0; }
.exgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.icard.iex { background: #f8f9fa; border: 2px solid #eef0f2; border-radius: 14px; padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.iex .lv { padding: 2px 12px; border-radius: 10px; font-weight: 800; font-size: 14px; }
.iex .lv.easy { background: #ddf3e4; color: #3e9a61; } .iex .lv.medium { background: #ffebcc; color: #cc8a2e; } .iex .lv.hard { background: #ffe0e0; color: #d35f5f; }
.iex .q { font-size: 18px; font-weight: 700; }
.sol { width: 100%; }
.sol summary { display: inline-block; padding: 4px 13px; border-radius: 12px; border: 2px solid #ab8fda; color: #7a52c7; background: #fff; font-weight: 800; font-size: 15px; cursor: pointer; list-style: none; }
.sol summary::-webkit-details-marker { display: none; }
.sol[open] summary { background: #ece3fa; }
.sol .steps { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.sol .ans { margin-top: 8px; padding: 4px 12px; border-radius: 10px; background: #ece3fa; color: #7a52c7; font-weight: 800; display: inline-block; }
.inote { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; color: #b8892a; font-size: 16px; font-weight: 700; }
.inote svg { flex: none; margin-top: 3px; }
.topic-tools { margin: 34px 0 0; padding: 24px 28px 26px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.topic-cta { margin: 18px 0 10px; }
.topic-cta .cta-box { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } .topic-cta .cta-box p { margin: 0; flex: 1 1 260px; }
.tool-list { columns: 2; column-gap: 24px; margin: 0; padding-left: 20px; color: #334155; }
.tool-list li { margin: 0 0 4px; break-inside: avoid; }
.cta-box { background: var(--active); border-radius: 14px; padding: 18px 20px; }
.cta-box p { color: #475569; margin: 6px 0 14px; }
.topic-related ul, .topic-index { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 28px; }
.topic-related li, .topic-index li { margin: 0 0 6px; break-inside: avoid; }
/* "More in …": two zebra lists side by side, no underlines */
.topic-related .zebra-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.topic-related ul { columns: auto; display: block; align-self: start; }
.topic-related li { margin: 0; }
.topic-related li:nth-child(odd) { background: #f3f7fc; }
.topic-related li a { display: flex; align-items: baseline; gap: 10px; padding: 5px 14px; color: var(--text); font-weight: 600; text-decoration: none; transition: background .12s, color .12s; }
.topic-related li a::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); opacity: .55; transform: translateY(-2px); }
.topic-related li a:hover, .topic-related li a:focus-visible { background: var(--soft); color: var(--soft-text); outline: none; }
@media (max-width: 860px) {
  .igrid .icard.withex, .exgrid { grid-template-columns: minmax(0, 1fr); }
  .topic-sheet { padding: 4px 14px 22px; } .topic-title { font-size: 28px; }
  .tool-list, .topic-index { columns: 1; }
  .topic-related .zebra-cols { grid-template-columns: 1fr; gap: 0; }
}

/* the "About" menu in the top bar (desktop: a dropdown like the language menu; small screens: its links are listed in the opened menu) */
.nav > .nav-dd > summary { color: var(--teal); font-weight: 700; font-size: 17px; padding: 8px; border-radius: 0; border-bottom: 2px solid transparent; }
.nav > .nav-dd > summary:hover { color: var(--green); }
.nav-dd.on > summary { border-bottom-color: var(--green); }
.nav-dd .chev { color: var(--teal); }
.nav-dd .dd-menu { min-width: 200px; }
.nav-dd .dd-menu a { font-weight: 500; }
@media (max-width: 991px) { .nav > .nav-dd { display: none; } }

/* ---------- topic pages: menu on the left (as the Math Explorer web app), cards, the sheet of the exercises ---------- */
.tapp, .tapp button, .tapp input, .tapp select, .tapp summary { font-family: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.tapp .katex { font-family: KaTeX_Main, "Times New Roman", serif; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 10px; }
.tcard { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.tcard:hover, a.tcard:focus-visible { border-color: var(--primary); box-shadow: 0 2px 10px rgba(15, 112, 215, .15); outline: none; }
.tcard img { width: 100%; height: auto; aspect-ratio: 404 / 251; object-fit: contain; background: #fff; border-bottom: 1px solid var(--border); display: block; }
.tcard .ttitle { padding: 8px 10px 10px; font-size: 15px; font-weight: 800; line-height: 1.3; }
.tcard .tmeta { padding: 0 10px 10px; margin-top: -4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.tgrid.tools { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 14px; }
.tnew { container-type: inline-size; }
@container (min-width: 0px) { .tnew .tgrid.tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 520px) { .tnew .tgrid.tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 800px) { .tnew .tgrid.tools { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 1100px) { .tnew .tgrid.tools { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tlisthead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.tlisthead h1 { margin: 0; font-size: 24px; text-align: left; }
.tcount { color: var(--muted); font-size: 13px; font-weight: 600; }
.tsub { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 8px; font-weight: 800; }
.tempty { color: var(--muted); padding: 24px 4px; }
.tcat { margin-bottom: 18px; }
.tcathead, .tghead { display: flex; align-items: center; gap: 10px; width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; background: none; border: 0; }
.tcathead { padding: 4px 0 12px; }
.tcathead h1 { margin: 0; font-size: 24px; text-align: left; }
.tchev { flex: none; width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.open > .tcathead .tchev, .open > .tghead .tchev { transform: rotate(90deg); }
.tcat:not(.open) > .tgroups { display: none; }
.tgroups { display: grid; gap: 10px; }
.tgroup { background: #fff; border: 1px solid #dbe5f0; border-radius: 12px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.tgroup:hover { border-color: #c3d9f3; }
.tgroup.open { border-color: #c3d9f3; box-shadow: 0 1px 6px rgba(15, 112, 215, .07); }
.tghead { padding: 13px 16px; }
.tghead:hover, .tgroup.open > .tghead { background: #eef4fb; }
.tgroup.open > .tghead { border-bottom: 1px solid #dbe5f0; }
.tghead:focus-visible, .tcathead:focus-visible { outline: 2px solid #1971C2; outline-offset: -2px; }
.tgtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tgname { font-size: 16.5px; font-weight: 800; }
.tgpeek { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tgroup.open .tgpeek { display: none; }
.tgn { flex: none; font-size: 12.5px; font-weight: 700; color: var(--soft-text); background: var(--soft); border-radius: 999px; padding: 3px 10px; }
.tgbody { padding: 14px 16px 6px; }
.tgrid-topics { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tthumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #e9eef4; border-bottom: 1px solid var(--border); }
.tthumb { position: relative; display: block; background: #fff; }
.tcard .tthumb img { border-bottom: 0; }
.tthumbs:has(.tthumb:only-child) { grid-template-columns: 1fr; }
.tmore { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(28, 39, 51, .55); color: #fff; font-weight: 800; font-size: 18px; }
.tcard-topic .ttitle { padding-top: 10px; }
.tloading { color: var(--muted); padding: 8px 2px 14px; }
.tglinks { margin: 0; padding: 10px 16px 14px 36px; }

.tapp { display: flex; align-items: flex-start; position: relative; background: var(--bg); min-height: calc(100vh - 70px); font-size: 15px; line-height: 1.45; }
.tside { flex: none; width: 340px; position: sticky; top: 70px; height: calc(100vh - 70px); display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--border); overflow: hidden; transition: width .18s ease; z-index: 6; }
.tapp.noside .tside { display: none; }
.tside .side-tools { flex: none; padding: 12px 10px 8px; border-bottom: 1px solid var(--border); }
.srow { display: flex; align-items: center; gap: 8px; }
.tside #tsearch { flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; }
.tside .tree { flex: 1; overflow-y: auto; padding: 0 12px 16px; font-size: 14px; }
.tmain { flex: 1; min-width: 0; padding: 16px 20px 28px; }
.tscrim { display: none; }
.tapp .icon { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); cursor: pointer; padding: 0; }
.tapp .icon:hover { border-color: var(--primary); color: var(--primary); }
.tapp .icon svg { width: 20px; height: 20px; fill: none; }
.tapp .frow { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.tapp .fsel { flex: 1; min-width: 0; padding: 7px 6px; font: inherit; font-size: 13px; color: #334155; background: #fff; border: 1.5px solid #b9d3f2; border-radius: 6px; cursor: pointer; }
.tapp .fsel.on { color: #1f5fab; font-weight: 600; background: #e3edfb; border-color: #8fb5e8; }
.tapp .fx { flex: none; width: 26px; height: 30px; padding: 0; font: inherit; font-size: 17px; line-height: 1; color: var(--muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.tapp .fx:hover { background: var(--bg); } .tapp .fx-space { flex: none; width: 26px; }
.tapp .fstart { position: relative; display: flex; align-items: center; margin-top: 8px; border-radius: 8px; cursor: pointer; background: #e3edfb; border: 1.5px solid #8fb5e8; color: #1f5fab; box-shadow: 0 1px 2px rgba(31, 95, 171, .12); }
.tapp .fstart svg { position: absolute; left: 10px; width: 16px; height: 16px; pointer-events: none; }
.tapp .fadd { flex: 1; min-width: 0; appearance: none; -webkit-appearance: none; cursor: pointer; padding: 9px 12px 9px 34px; font: inherit; font-size: 13.5px; font-weight: 700; color: #1f5fab; background: transparent; border: 0; border-radius: 8px; }
.tapp .finfo { display: flex; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); } .tapp .finfo span { flex: 1; }
.tapp .link { font: inherit; font-size: 12.5px; color: #1f5fab; background: none; border: 0; padding: 2px 0; cursor: pointer; }
.tapp .trow { display: flex; align-items: stretch; }
.tapp .trow .tg { flex: none; display: grid; place-items: center; width: 30px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; }
.tapp .trow .tg svg { width: 13px; height: 13px; transition: transform .12s; fill: none; } .tapp .trow.open .tg svg { transform: rotate(90deg); }
.tapp .trow .tl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; padding: 0 10px 0 12px; }
.tapp .trow .tg + .tl { padding-left: 0; }
.tapp .trow .tname { flex: 1; min-width: 0; } .tapp .trow .n { font-size: 12px; font-weight: 500; color: var(--muted); }
.tapp .tbox { margin-top: 8px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; } .tapp .tbox.open { border-color: var(--primary); }
.tapp .trow.l1 { min-height: 42px; font-weight: 600; color: #334155; } .tapp .tbox.open > .trow.l1 { background: var(--active); }
.tapp .trow .tl:hover .tname { text-decoration: underline; }
.tapp .titems { padding: 2px 8px 6px; }
.tapp .titem { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin-top: 3px; border-radius: 6px; color: #334155; text-decoration: none; font-size: 13px; line-height: 1.3; border: 1px solid transparent; }
.tapp .titem:hover { background: var(--bg); text-decoration: underline; }
.tapp .titem.on { background: var(--active); border-color: var(--primary); color: var(--primary-dark); font-weight: 600; }
.topic-inner { margin: 0 auto; }
.topic-title { margin: 6px 0 14px; }
.topic-card { margin-top: 20px; padding: 22px 28px 24px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.topic-card h2 { margin: 0 0 12px; font-size: 20px; }
.topic-tools { margin-top: 22px; }
.topic-years p { margin: 0 0 6px; color: #475569; font-weight: 600; }
.topic-years strong { color: #1c2733; }

/* the practice sheet: the exercise printed on squared paper that covers the whole area; the pen writes over it */
.practice-head { display: flex; align-items: center; gap: 10px; }
.practice-head .topic-h { margin-right: auto; }
.pen-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #dee2e6; background: #fff; color: #868e96; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pen-btn:hover { background: #f8f9fa; } .pen-btn[aria-pressed="true"] { background: #e7f5ff; border-color: #74c0fc; color: #1971c2; }
.practice-on .exgrid { display: block; }
.practice-on .exgrid.paper { position: relative; min-height: 0; flex: 1 0 auto; border: 1.5px solid #dee2e6; border-radius: 14px; background-color: #fff; overflow: hidden;
  background-image: linear-gradient(#eef2f6 1px, transparent 1px), linear-gradient(90deg, #eef2f6 1px, transparent 1px); background-size: 24px 24px; display: flex; flex-direction: column; }
.practice-on .icard.iex { background: transparent; border: 0; padding: 18px 24px 24px; font-size: 20px; }
.practice-on .icard.iex[hidden] { display: none; }
.practice-on .iex .q { font-size: 22px; }
.paper-title { position: absolute; left: 18px; top: 10px; font-weight: 800; color: #adb5bd; font-size: 14px; pointer-events: none; z-index: 1; }
.practice-on .sol { position: relative; z-index: 7; }
.sh-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.sh-layer.on { pointer-events: auto; touch-action: none; }
.sh-svg { position: absolute; left: 0; top: 0; overflow: hidden; }
.sh-barwrap { position: sticky; bottom: 14px; height: 0; z-index: 8; display: flex; justify-content: center; align-items: flex-end; margin-top: auto; }
.sh-barwrap[hidden] { display: none; }
.sh-bar { position: relative; display: flex; align-items: center; gap: 4px; padding: 5px 8px; background: #fff; border: 1.5px solid #e3e7ec; border-radius: 999px; box-shadow: 0 4px 16px rgba(30,41,59,.14); max-width: calc(100% - 16px); flex-wrap: nowrap; }
.sh-t { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #495057; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sh-t:hover { background: #f1f3f5; } .sh-t.on { background: #e7f5ff; box-shadow: inset 0 0 0 2px #74c0fc; } .sh-t:disabled { opacity: .35; cursor: default; background: transparent; }
.sh-t .dot { width: 18px; height: 18px; border-radius: 50%; display: block; } .sh-t .wid { display: block; border-radius: 50%; }
.sh-del { color: #e03131; }
.sh-sep { width: 1.5px; height: 22px; background: #e3e7ec; margin: 0 4px; }
.sh-grip { display: flex; align-items: center; justify-content: center; width: 18px; height: 36px; margin-right: 2px; color: #adb5bd; cursor: grab; touch-action: none; } .sh-grip:active { cursor: grabbing; color: #495057; }
.sh-pop { position: absolute; bottom: calc(100% + 10px); right: 40px; display: flex; flex-direction: column; gap: 4px; padding: 6px 8px; background: #fff; border: 1.5px solid #e3e7ec; border-radius: 18px; box-shadow: 0 6px 18px rgba(30,41,59,.16); }
.sh-pop-row { display: flex; gap: 4px; justify-content: center; } .sh-pop-row + .sh-pop-row { border-top: 1px solid #eef1f4; padding-top: 4px; }
.pr-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.pr-arrow { width: 42px; height: 42px; border-radius: 50%; border: 2px solid #ab8fda; background: #fff; color: #7a52c7; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pr-arrow:hover:not(:disabled) { background: #ece3fa; } .pr-arrow:disabled { opacity: .35; cursor: default; }
.pr-count { min-width: 140px; text-align: center; font-weight: 800; color: #868e96; }

@media (max-width: 900px) {
  .tside { position: fixed; inset: 70px 0 0 0; z-index: 8; height: auto; width: auto; border-right: 0; }
  .tapp:not(.menu-open) .tside { display: none; }
  .tapp.menu-open .tside { height: calc(100vh - 70px); height: calc(100dvh - 70px); }
  .tmain { padding: 12px; }
  .tgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .practice-on .exgrid.paper { min-height: 460px; } .practice-on .icard.iex { padding: 14px 14px 18px; }
  .sh-bar { flex-wrap: wrap; justify-content: center; border-radius: 22px; }
}

/* the lesson panel: summary and exercises fill the screen area of the page, turned with forward / back buttons (topic.js) */
.topic-panel { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 14px 22px 12px; }
.topic-panel .topic-title { font-size: 24px; margin: 12px 0 10px; text-align: left; color: #6ea8dc; }
.topic-panel.view-ex .topic-title { color: #ab8fda; }
.panel-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel-head .pen-btn { margin-left: auto; }
.panel-sec { margin-top: 4px; }
.panel-on { height: calc(100vh - 70px - 32px); min-height: 540px; display: flex; flex-direction: column; }
.panel-on .panel-body { flex: 1; min-height: 0; position: relative; }
.panel-on .panel-sec { height: 100%; overflow: hidden; margin: 0; }
.panel-on .panel-sec[hidden] { display: none; }
.panel-on .panel-sec .topic-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.panel-on .practice { overflow-y: auto; display: flex; flex-direction: column; }
.panel-on .pr-nav { flex: none; margin-top: 8px; padding-top: 2px; }
.panel-on .igrid .icard[hidden] { display: none; }
@media (max-width: 900px) { .topic-panel { padding: 12px 12px 10px; } .panel-on { height: calc(100vh - 70px - 24px); } }

/* square corners for the big background cards, as in the Math Explorer web app; the pen's tools sit in the tab row, after the tabs */
.topic-panel, .topic-card, .topic-cta .cta-box { border-radius: 0; }
.panel-head { position: relative; z-index: 9; }
.sh-slot { display: inline-flex; } .sh-slot[hidden] { display: none; }
.sh-bar[hidden] { display: none; }
.sh-bar.docked { box-shadow: none; max-width: none; padding: 2px 8px; }
.sh-bar.docked .sh-pop { bottom: auto; top: calc(100% + 8px); right: auto; left: 60px; z-index: 12; }

/* the pen and the highlighter show a small pencil, its tip on the point (as in the applets) */
.sh-layer.on.draw { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 21l1.3-4.8L15.8 4.7a2.1 2.1 0 0 1 3 0l.5.5a2.1 2.1 0 0 1 0 3L7.8 19.7z' fill='%23fff' stroke='%23fff' stroke-width='3.5' stroke-linejoin='round'/%3E%3Cpath d='M3 21l1.3-4.8L15.8 4.7a2.1 2.1 0 0 1 3 0l.5.5a2.1 2.1 0 0 1 0 3L7.8 19.7z' fill='%23fff' stroke='%23343A40' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M14 6.5l3.5 3.5' stroke='%23343A40' stroke-width='1.5'/%3E%3Cpath d='M3 21l.8-2.9 2.1 2.1z' fill='%23343A40'/%3E%3C/svg%3E") 3 21, crosshair; }
.sh-layer.on.sel { cursor: default; }

.iex .q .lv { display: inline-block; margin-left: 10px; vertical-align: middle; position: relative; top: -2px; }
/* the subject row (Mathematics, later Geometry …) above its groups, as in the web app */
.tapp .trow.l0 { margin-top: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #334155; font-size: 15px; font-weight: 700; min-height: 46px; }
.tapp .trow.l0.open { background: #dfeafa; border-color: #b9d3f2; color: #1f5fab; }
.tapp .trow.l0.open .n { color: #5b88c4; }
.tapp .trow.l0 .tl { padding-left: 14px; } .tapp .trow.l0 .tg + .tl { padding-left: 0; }
.tapp .trow.l0 .tl:hover .tname { text-decoration: underline; }
.tapp .tree > .tbox:first-of-type { margin-top: 8px; }

/* the tools page: the web app fills the page under the top bar, no footer */
.apps-page .page { max-width: none; padding: 0; }
.apps-page .foot { display: none; }
.apps-frame { display: block; width: 100%; height: calc(100vh - 70px); height: calc(100dvh - 70px); border: 0; background: var(--bg); }

/* the topics menu button: far left of the header, as high as the header */
.bar.has-side { display: flex; align-items: stretch; }
.bar.has-side .bar-in { flex: 1; min-width: 0; }
.side-btn { flex: none; width: 56px; display: grid; place-items: center; padding: 0; margin: 0; background: #fff; color: var(--teal); border: 0; border-right: 1px solid #dee2e6; cursor: pointer; }
.side-btn:hover { background: var(--soft); color: var(--soft-text); }
.side-btn svg { width: 26px; height: 26px; }
.side-btn:focus-visible { outline: 2px solid #1971C2; outline-offset: -3px; }

/* full screen button of the lesson panel (topic.js): after the pen button, always at the right end of the tab row */
.panel-head .fs-btn { flex: none; width: 40px; height: 40px; margin-left: 8px; border-radius: 50%; border: 2px solid #dee2e6; background: #fff; color: #495057; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.panel-head .pen-btn[hidden] + .fs-btn { margin-left: auto; }
.panel-head .fs-btn:hover { background: #f8f9fa; border-color: #adb5bd; }
.fs-btn .fs-out, .is-full .fs-btn .fs-in { display: none; } .is-full .fs-btn .fs-out { display: block; }
.topic-panel.is-full { height: 100vh; height: 100dvh; max-height: none; min-height: 0; border: 0; padding: 14px 22px 12px; overflow: auto; }
.topic-panel.fs-fake { position: fixed; inset: 0; z-index: 1000; width: auto; }
html.panel-full, html.panel-full body { overflow: hidden; }
.warn-text { color: #c92a2a; }

/* pricing chooser: classroom yes/no and the online size pick one plan (pure CSS, see views/pricing.php) */
.chooser { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 36px; margin: 0 auto 26px; }
.chooser fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.chooser legend { float: left; width: 100%; text-align: center; padding: 0; margin: 0 0 8px; font-weight: 700; font-size: 14.5px; color: var(--muted); }
.chooser label { position: relative; cursor: pointer; }
.chooser input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chooser span { display: inline-flex; align-items: center; padding: 9px 16px; border: 1.5px solid #d6dde5; border-radius: 999px; background: #fff; font-weight: 600; font-size: 15px; }
.chooser input:checked + span { background: #0f70d7; border-color: #0f70d7; color: #fff; }
.chooser input:focus-visible + span { outline: 2px solid #1971C2; outline-offset: 2px; }
.composer.plans { max-width: 420px; margin-inline: auto; }
.composer-none { margin: 0 0 20px; }
.contact .ref-field { display: none; }
.contact form:has(#f-topic option[value="school"]:checked) .ref-field,
.contact form:has(#f-topic option[value="custom"]:checked) .ref-field { display: block; }

/* referral box on the account page */
.ref-link { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 14px; }
.ref-link code { flex: 1 1 260px; min-width: 0; padding: 10px 12px; background: #f1f5f9; border: 1px solid #d6dde5; border-radius: 9px; overflow-wrap: anywhere; font-size: 14px; }
.ref-rules { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.ref-rules li { margin: 4px 0; }
.ref-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 9px; background: #ebfbee; color: #1f6b30; font-size: 14.5px; }

/* pupil members */
.kv { border-collapse: collapse; margin: 0 0 14px; }
.kv th { text-align: left; padding: 4px 18px 4px 0; color: var(--muted); font-weight: 600; }
.kv td { padding: 4px 0; }
.sub-h { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.member-cards { margin-bottom: 18px; }
.crumbs { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.section.top.play-sec { padding-top: 12px; padding-bottom: 20px; }
/* the application fills the window below the top bar (no page scroll for it); the hint and the demo note come below, reachable by scrolling.
   Phones keep the application's own proportions (it is wide); the full screen button gives them the whole window. */
.play-sec .wrap { max-width: none; padding: 0 12px; }
.play-sec .wrap > :not(.play-frame):not(.sr) { max-width: var(--cw); margin-left: auto; margin-right: auto; }
.play-frame { width: 100%; height: calc(100vh - 70px - 24px); height: calc(100dvh - 70px - 24px); min-height: 420px; background: #fff; border: 1.5px solid var(--border); border-radius: 14px; overflow: hidden; margin: 0 auto 12px; }
.play-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.locked-panel { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.locked-panel > div { flex: 1 1 320px; }
.locked-pic { width: 260px; max-width: 100%; border-radius: 10px; filter: grayscale(.7) blur(1.5px); }
.cta-row.center-row { justify-content: center; margin: 18px 0 26px; }
.free-list { list-style: none; margin: 8px 0 12px; padding: 0; }
.free-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eef1f5; }
.free-list form { margin: 0; flex: none; }
.inline-form { display: inline; margin-left: 12px; }
.tbadge { position: absolute; top: 8px; left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #D3F9D8; color: #1f6b30; }
.tbadge.plus { background: #E5DBFF; color: #5a36c8; }
.tcard { position: relative; }
.member-initial { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: #E5DBFF; color: #5a36c8; font-weight: 800; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- audience pages (start page, pupils, teachers, schools): doors, split sections, windows, access table ---------- */
.doors-section { padding-top: 56px; }
.doors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.door { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; text-decoration: none; color: var(--text);
  box-shadow: inset 0 5px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.door:hover, .door:focus-visible { transform: translateY(-3px); box-shadow: inset 0 5px 0 var(--ink), 0 12px 28px rgba(28, 39, 51, .12); outline: none; }
.door h3 { font-size: 19px; margin: 0 0 4px; }
.door-text { color: #475569; margin: 0 0 14px; font-weight: 600; }
.door .checks { flex: 1; margin-bottom: 20px; font-size: 14.5px; }
.door-btn { width: 100%; justify-content: space-between; background: var(--fill); border-color: transparent; color: var(--ink); font-weight: 700; }
.door:hover .door-btn, .door:focus-visible .door-btn { background: var(--ink); color: #fff; }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.split.rev { grid-template-columns: 1.15fr 1fr; }
.split.rev .split-text { order: 2; }
.split-text h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.01em; margin: 12px 0 12px; }
.split-text p { color: #475569; font-size: 17px; margin: 0 0 14px; }
.split-text .checks { margin-bottom: 22px; }
.win { margin: 0; background: #e9eef5; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 40px rgba(28, 39, 51, .12); overflow: hidden; position: relative; padding-top: 26px; }
.win-dots { position: absolute; left: 12px; top: 9px; display: flex; gap: 5px; }
.win-dots i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.win-dots i:nth-child(1) { background: #fa5252; } .win-dots i:nth-child(2) { background: #fcc419; } .win-dots i:nth-child(3) { background: #51cf66; }
.win img { display: block; width: 100%; height: auto; background: #fff; }
.win.dark { background: #1c2733; border-color: #1c2733; }
.center-head { text-align: center; }
.center-head .tag { margin-bottom: 12px; }
.center-tag { display: block; width: fit-content; margin: 0 auto 12px; }
.after { margin-top: 28px; }
.tbadge-inline { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: #d3f9d8; color: #1f6b30; vertical-align: middle; margin-left: 4px; text-transform: none; letter-spacing: 0; }
.tbadge-inline.plus { background: #e5dbff; color: #5a36c8; }
.soon-chip { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #fff3bf; color: #8a5a00; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.steps.four { grid-template-columns: repeat(4, 1fr); }
.steps li { position: relative; }
.steps li .btn { margin-top: 16px; }
.step-badge { position: absolute; top: 24px; right: 20px; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--fill); color: var(--ink); }
.try-panel .checks { margin: 12px 0 18px; }
.try-panel .btn { width: 100%; }
.try-panel .hint { margin: 12px 0 0; text-align: center; }
.tgrid.sample { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tgrid.sample .ttitle { font-size: 16px; }
.referral { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px 30px; }
.referral h2 { font-size: 24px; margin: 0 0 8px; letter-spacing: -.01em; }
.referral p { margin: 0 0 6px; color: #475569; }
.referral .f-icon { width: 68px; height: 68px; border-radius: 18px; margin: 0; }
.referral .f-icon svg { width: 34px; height: 34px; }

.matrix-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 4px 18px rgba(28, 39, 51, .06); }
.matrix { width: 100%; border-collapse: collapse; min-width: 780px; font-size: 14.5px; }
.matrix thead th { padding: 14px 10px; text-align: center; background: var(--fill); color: var(--ink); border-left: 2px solid #fff; vertical-align: bottom; width: 13%; }
.matrix thead th:first-child { background: #fff; border-left: 0; }
.matrix thead th b { display: block; font-size: 15.5px; }
.matrix thead th small { display: block; font-size: 12px; font-weight: 600; opacity: .85; }
.matrix tbody th { text-align: left; font-weight: 600; padding: 12px 16px; border-top: 1px solid var(--border); }
.matrix td { text-align: center; border-top: 1px solid var(--border); border-left: 1px solid #eef2f7; padding: 10px; }
.matrix td.y svg { width: 22px; height: 22px; stroke: #2b8a3e; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.matrix td.n { color: #b8c2cf; font-weight: 700; }
.matrix td.soon em { font-style: normal; font-size: 12px; font-weight: 700; background: #fff3bf; color: #8a5a00; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.matrix tbody tr:nth-child(even) { background: #fafbfd; }
.matrix .price-row th, .matrix .price-row td { background: #f1f5f9; font-weight: 800; font-size: 14px; }
.hint.center { text-align: center; max-width: none; }

@media (max-width: 991px) {
  .doors, .steps.four { grid-template-columns: repeat(2, 1fr); }
  .split, .split.rev { grid-template-columns: 1fr; gap: 28px; }
  .split.rev .split-text { order: 0; }
  .referral { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .doors, .steps.four, .tgrid.sample { grid-template-columns: 1fr; }
  .split-text h2 { font-size: 25px; }
  .tgrid.sample { grid-template-columns: repeat(2, 1fr); }
}
.door .checks { align-content: start; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 14px; }
.foot-legal a { text-decoration: none; }
.foot-legal a:hover { opacity: 1; color: var(--green); }
.price-mini strong { white-space: nowrap; }
.cta-band .btn.big { height: auto; min-height: 48px; padding: 10px 22px; text-align: center; }
@media (max-width: 575px) { .cta-band .cta-row .btn { flex: 1 1 100%; } }
.hero-points { margin: 4px 0 6px; gap: 11px; font-size: 17.5px; max-width: 620px; }
.hero-points li { padding-left: 34px; color: #334155; }
.hero-points li::before { width: 22px; height: 22px; top: 1px; }
.hero-points li::after { left: 8px; top: 5px; width: 6px; height: 11px; }
.hero-points { margin-bottom: 0; }
.hero-home { padding-bottom: 52px; }

.doors { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 991px) { .doors { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
.foot-note { margin: 22px 0 14px; }

/* ---------- figures of the topic pages (drawn by Math Explorer's lib/fig.js, pre-rendered as SVG; they hold no words) ---------- */
.mx-fig { --fg-bg: #FFFFFF; --fg-ink: #26303C; --fg-mu: #7C8796; --fg-grid: #DDE2E8; --fg-hi: #D9480F; --fg-bl: #1C6DD0; --fg-gr: #2B8A3E; --fg-hi-t: #C2410C; --fg-bl-t: #1558AD; --fg-gr-t: #237032;
  display: block; flex: 0 0 auto; max-width: 100%; box-sizing: border-box; background: var(--fg-bg); border: 1.5px solid #E3E7EB; border-radius: 12px; padding: 2px; line-height: 0; margin: 10px auto 2px; }
.mx-fig svg { display: block; width: 100%; height: auto; max-height: 260px; overflow: visible; }
.mx-fig svg * { vector-effect: none; }
.mx-fig .k, .mx-fig .hi, .mx-fig .bl, .mx-fig .gr, .mx-fig .mu, .mx-fig .gd, .mx-fig .shp { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mx-fig .k { stroke: var(--fg-ink); } .mx-fig .hi { stroke: var(--fg-hi); } .mx-fig .bl { stroke: var(--fg-bl); } .mx-fig .gr { stroke: var(--fg-gr); }
.mx-fig .mu { stroke: var(--fg-mu); stroke-width: 1.6; } .mx-fig .gd { stroke: var(--fg-grid); stroke-width: 1.2; }
.mx-fig .shp { stroke: var(--fg-hi); stroke-width: 11; opacity: .2; }
.mx-fig .w { stroke-width: 3; } .mx-fig .w2 { stroke-width: 3.6; } .mx-fig .w3 { stroke-width: 6; opacity: .55; } .mx-fig .ds { stroke-dasharray: 5 4; }
.mx-fig .fk { fill: var(--fg-ink); fill-opacity: .06; stroke: none; } .mx-fig .fhi { fill: var(--fg-hi); fill-opacity: .24; stroke: none; }
.mx-fig .fs0 { fill: var(--fg-ink); fill-opacity: .03; stroke: none; } .mx-fig .fs1 { fill: var(--fg-ink); fill-opacity: .08; stroke: none; } .mx-fig .fs2 { fill: var(--fg-ink); fill-opacity: .15; stroke: none; } .mx-fig .dm { fill: var(--fg-mu); stroke: none; }
.mx-fig .fbl { fill: var(--fg-bl); fill-opacity: .2; stroke: none; } .mx-fig .fgr { fill: var(--fg-gr); fill-opacity: .2; stroke: none; } .mx-fig .fw { fill: var(--fg-bg); }
.mx-fig text { font: 800 14px/1 Nunito, 'Segoe UI', Arial, sans-serif; text-anchor: middle; dominant-baseline: central; fill: var(--fg-ink); stroke: var(--fg-bg); stroke-width: 3.5px; paint-order: stroke; stroke-linejoin: round; }
.mx-fig text.xhi { fill: var(--fg-hi-t); } .mx-fig text.xbl { fill: var(--fg-bl-t); } .mx-fig text.xgr { fill: var(--fg-gr-t); } .mx-fig text.xmu { fill: var(--fg-mu); font-weight: 700; }
.mx-fig .ak, .mx-fig .dk { fill: var(--fg-ink); stroke: none; } .mx-fig .ahi { fill: var(--fg-hi); stroke: none; } .mx-fig .abl { fill: var(--fg-bl); stroke: none; } .mx-fig .agr { fill: var(--fg-gr); stroke: none; }
.mx-fig .dothi { fill: var(--fg-hi); stroke: var(--fg-bg); stroke-width: 2; } .mx-fig .dotbl { fill: var(--fg-bl); stroke: var(--fg-bg); stroke-width: 2; } .mx-fig .dotgr { fill: var(--fg-gr); stroke: var(--fg-bg); stroke-width: 2; }
.mx-fig .openhi { fill: var(--fg-bg); stroke: var(--fg-hi); stroke-width: 3; } .mx-fig .openbl { fill: var(--fg-bg); stroke: var(--fg-bl); stroke-width: 3; } .mx-fig .opengr { fill: var(--fg-bg); stroke: var(--fg-gr); stroke-width: 3; }
.mx-fig.wide { width: 100% !important; max-width: 560px; }
.sol .steps .mx-fig { margin: 6px 0 4px; }

/* a hero whose heading comes first (no tag above it): no gap on top, and the text starts level with the code box */
.hero2-text > h1:first-child { margin-top: 0; }
.hero-home .hero2-grid { align-items: start; }

/* the "Try it free" button of the start page opens a small menu */
.cta-dd { margin-left: 8px; }
.cta-dd > summary.cta { padding: 8px 24px; color: #fff; gap: 0; }
.cta-dd > summary.cta:hover { background: #013a4b; color: #fff; }
.cta-dd .dd-menu { min-width: 210px; }

/* the start of the topic pages (topics_home.php) */
.thome h1 { margin: 0 0 6px; font-size: 30px; text-align: left; }
.thome-lead { margin: 0 0 20px; color: var(--muted); font-size: 16px; }
.tbig { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px 22px; align-items: center; background: #fff; border: 1px solid #dbe5f0; border-radius: 14px; padding: 20px 22px; margin-bottom: 14px; }
.tbig-icon { grid-row: 1 / span 1; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: #D0EBFF; color: #1971C2; }
.tbig-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tbig:nth-of-type(2) .tbig-icon { background: #E5DBFF; color: #7048E8; }
.tbig-body h2 { margin: 0 0 2px; font-size: 24px; }
.tbig-body h2 a { color: inherit; text-decoration: none; }
.tbig-body h2 a:hover { color: var(--teal); }
.tchips { display: flex; flex-wrap: wrap; gap: 6px; }
.tchips a { font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: #eef1f5; color: #334155; text-decoration: none; }
.tchips a:hover { background: #dfe5ec; color: #1d2125; }
.tstats { display: flex; gap: 10px; }
.tstats div { display: flex; flex-direction: column; align-items: center; min-width: 92px; padding: 10px 12px; border: 1.5px solid #a9dbb7; border-radius: 12px; }
.tstats svg { width: 22px; height: 22px; margin-bottom: 4px; fill: none; stroke: #2f9e44; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tstats b { font-size: 24px; line-height: 1.1; }
.tstats span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.thome-sec { margin-top: 14px; background: #fff; border: 1px solid #dbe5f0; border-radius: 14px; padding: 20px 22px 18px; }
.thome-sec h2 { margin: 0 0 4px; font-size: 22px; }
.thome-sec > p { margin: 0 0 4px; color: var(--muted); }
.thome-act { margin-top: 14px !important; }
.thome-sec.plus-note { background: #E5DBFF; border-radius: 12px; padding: 14px 18px; }
.thome-sec.plus-note > p { color: #3b2a8c; margin: 0; }
.tbadge.demo { background: #FFF3BF; color: #8a5a00; }
.tpick { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.apps-wrap { position: relative; }
.apps-page .apps-frame { height: calc(100vh - 70px); height: calc(100dvh - 70px); }
.filter-line { display: flex; align-items: flex-start; gap: 8px; }
.filter-line #tfilters { flex: 1; min-width: 0; }
.tover { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-top: 8px; border-radius: 8px; background: #fff; border: 1.5px solid #b9d3f2; color: #1f5fab; }
.tover svg { width: 20px; height: 20px; }
.tover:hover { background: #e3edfb; border-color: #8fb5e8; }
.tover.on { background: #e3edfb; border-color: #8fb5e8; }
.demo-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.demo-note p { margin: 0; flex: 1 1 280px; }
@media (max-width: 1100px) { .tbig { grid-template-columns: 64px 1fr; } .tstats { grid-column: 1 / -1; } }
/* phones: the icon sits beside the title, the chips and the three number boxes use the full width of the card */
@media (max-width: 640px) {
  .tbig { grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; padding: 16px 14px; }
  .tbig-icon { width: 48px; height: 48px; border-radius: 13px; }
  .tbig-icon svg { width: 26px; height: 26px; }
  .tbig-body { display: contents; }
  .tbig-body h2 { grid-column: 2; grid-row: 1; align-self: center; margin: 0; font-size: 22px; }
  .tbig .tpick, .tbig .tchips { grid-column: 1 / -1; }
  .tbig .tpick { margin: 6px 0 4px; }
  .tstats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
  .tstats div { min-width: 0; padding: 8px 4px; text-align: center; }
  .tstats b { font-size: 22px; }
  .tstats span { font-size: 12px; overflow-wrap: anywhere; hyphens: auto; }
  .thome-sec { padding: 16px 14px 14px; }
  .thome-sec h2 { font-size: 20px; }
  .thome-act .btn { display: flex; margin-bottom: 8px; }
  .tgrid-topics { grid-template-columns: minmax(0, 1fr); }
}

/* sign-up and contact pages: a tinted card on the left, a compact form on the right */
.signup, .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: stretch; }
.section.top:has(.signup), .section.top:has(.contact) { padding-top: 26px; padding-bottom: 26px; }
.pitch-card { position: relative; overflow: hidden; display: flex; flex-direction: column; border-radius: 18px; padding: 30px 30px 26px;
  background: color-mix(in srgb, var(--fill) 42%, #fff); border: 1px solid color-mix(in srgb, var(--fill) 80%, #fff); }
.pitch-ghost { position: absolute; right: -26px; bottom: -30px; width: 210px; height: 210px; opacity: .13; pointer-events: none; }
.pitch-ghost svg { width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.pitch-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: #fff; color: var(--ink); margin-bottom: 16px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ink) 18%, transparent); }
.pitch-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pitch-card h1 { font-size: 29px; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 8px; }
.pitch-lead { font-size: 16px; color: #475569; margin: 0 0 20px; }
.pitch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }
.pitch-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; }
.pitch-list .pi { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--ink); }
.pitch-list .pi svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pitch-foot { position: relative; margin: auto 0 0; padding-top: 18px; font-size: 13.5px; color: #475569; }

.form-card { padding: 20px 24px 18px; margin-bottom: 0; border-radius: 18px; }
.form-card h2 { margin: 0 0 10px; font-size: 21px; }
.form-card .stack { gap: 9px; }
.form-card .fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; align-items: start; }
.contact form:not(:has(#f-topic option[value="school"]:checked)):not(:has(#f-topic option[value="custom"]:checked)) .fgrid.opt { display: none; }
.form-card .field { gap: 3px; }
.form-card label { font-size: 13px; font-weight: 600; color: #3b4756; }
.form-card .field input:not([type=checkbox]), .form-card .field select, .form-card .field textarea {
  height: 38px; padding: 6px 11px; font-size: 15px; font-weight: 400; border: 1px solid #d9e0e8; border-radius: 9px; background: #fcfdfe; box-shadow: none; }
.form-card .field textarea { height: auto; padding: 8px 11px; }
.form-card .field input:focus, .form-card .field select:focus, .form-card .field textarea:focus {
  outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(15, 112, 215, .12); }
.form-card .field.has-error input, .form-card .field.has-error textarea, .form-card .field.has-error select { border-color: #ff8787; }
.form-card .field .hint, .form-card .hint.tight { display: block; font-size: 12px; line-height: 1.35; margin: 0; }
.form-card .sub-h { margin: 4px 0 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.form-card .check { margin-top: 2px; font-size: 13.5px; }
.form-card .check input { width: 16px; height: 16px; }
.form-card .stack .btn { align-self: stretch; margin-top: 4px; height: 44px; }
.form-card .login-line { margin: 0; font-size: 13.5px; }
.form-card .stack > .hint:last-child { text-align: center; }
@media (max-width: 900px) { .signup, .contact { grid-template-columns: 1fr; } .pitch-card { padding: 24px 20px 20px; } }
@media (max-width: 560px) { .form-card .fgrid { grid-template-columns: 1fr; } .form-card { padding: 18px 16px; } }
.form-card label.check { font-weight: 400; color: var(--text); }

/* the heading beside the icon in the card; the student form in two columns with a line between them */
.pitch-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pitch-head .pitch-icon { margin: 0; flex: none; }
.pitch-head h1 { margin: 0; font-size: 26px; }
.form-card .fsplit { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr); gap: 0 22px; }
.form-card .fcol { display: flex; flex-direction: column; gap: 9px; }
.form-card .fdiv { background: #e3e8ee; }
.form-card .fcol .fgrid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.form-card .fcol .sub-h { margin-top: 2px; }
@media (max-width: 760px) { .form-card .fsplit { grid-template-columns: 1fr; gap: 9px; } .form-card .fdiv { height: 1px; } }
[data-for][hidden] { display: none !important; }
.form-card .fcol .fcol { gap: 9px; }
.form-card .group { margin-top: 2px; }
.form-card .fgrid.group { grid-template-columns: 1fr 1fr; }
.form-card .fcol .field.has-error .check { color: var(--danger); }

/* Cookie question for Google Analytics (consent.js) and its footer link. Accept and Decline look the same on purpose. */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; box-shadow: 0 8px 28px rgba(28, 39, 51, .2); font-size: 14px; }
.cookie-bar p { margin: 0; flex: 1 1 320px; }
.cookie-bar a { color: var(--primary-dark); font-weight: 600; }
.cookie-btns { display: flex; gap: 8px; }
.foot-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; opacity: .8; cursor: pointer; }
.foot-link:hover { opacity: 1; color: var(--green); }

/* the menu button of the left panel is the hamburger at the far left of the top bar on every screen size (no floating pill any more) */
.side-btn .ico-list, .side-btn .side-lbl { display: none; }
/* the close button of the full screen topics menu (narrow screens only) */
.tclose { display: none; flex: none; width: 40px; height: 40px; padding: 0; place-items: center; border-radius: 50%; border: 0; background: #e9eef4; color: #334155; cursor: pointer; }
.tclose svg { width: 20px; height: 20px; }
.tclose:hover { background: #dbe3ec; }
@media (max-width: 900px) { .tclose { display: grid; } }
/* narrow screens: the hamburger at the far left opens the menu of the current section (as on the desktop); the site's own menu button (Topics, My classes ...) moves to
   the right end of the bar and shows three dots, so the two cannot be mistaken for each other */
@media (max-width: 991px) {
  .bar.has-side .side-btn { width: 52px; }
  .bar.has-side .menu-btn { order: 20; flex-direction: row; align-items: center; justify-content: center; gap: 4px; margin: 0 0 0 2px; padding: 0; width: 38px; }
  .bar.has-side .menu-btn span { width: 5px; height: 5px; border-radius: 50%; }
  .bar.has-side .bar-in { padding: 0 8px 0 10px; }
  .bar.has-side .hbrand { margin-right: 8px; }
}
@media (max-width: 480px) { .bar.has-side .hbrand .logo-c { height: 32px; } }

/* phones: the lesson panel of a topic page. The pen's tools stay closed until the pen button is pressed, the tab row is one line,
   the topics menu lies over the page (above the bottom bar). Desktop and tablets are not touched. */
@media (max-width: 900px) {
  .tside { z-index: 45; }   /* over the tab row (9) and the pen's panels (12) */
}
@media (max-width: 640px) {
  .panel-on { height: calc(100vh - 70px - 16px); height: calc(100dvh - 70px - 16px); min-height: 0; }
  .topic-panel { padding: 8px 8px 6px; }
  .topic-panel .topic-title { font-size: 19px; line-height: 1.2; margin: 8px 0 6px; }
  .panel-head { gap: 6px; }
  .panel-head .itab { height: 34px; padding: 0 10px; gap: 5px; font-size: 13.5px; }
  .panel-head .itab svg { width: 16px; height: 16px; }
  .panel-head .pen-btn, .panel-head .fs-btn { width: 36px; height: 36px; margin-left: 0; }
  .panel-head .pen-btn { margin-left: auto; }
  .panel-head .pen-btn[hidden] + .fs-btn { margin-left: auto; }
  .panel-head .sh-slot { order: 5; flex: 1 0 100%; }
  .sh-bar.docked { width: 100%; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 3px 6px; border-radius: 20px; }
  .sh-bar.docked .sh-t { width: 30px; height: 30px; }
  .sh-bar.docked { gap: 1px; }
  .sh-bar.docked .sh-close { display: none; }   /* the pen button of the row closes the tools */
  .sh-bar.docked .sh-sep { display: none; }
  .sh-bar.docked .sh-pop { left: 8px; }
  .panel-on .pr-nav { justify-content: flex-start; gap: 10px; margin-top: 6px; }
  .pr-arrow { width: 38px; height: 38px; }
  .pr-count { min-width: 56px; }
  .topic-panel.is-full { padding: 8px; }
  .is-full .pr-nav, .panel-on.is-full .pr-nav { justify-content: center; padding-right: 0; }
  .practice-on .icard.iex { padding: 12px 12px 16px; font-size: 18px; }
  /* a card taller than the page scrolls; long formulas break into lines instead of running out of the card */
  .panel-on #topic-sheet { overflow-y: auto; overscroll-behavior: contain; }
  .icard .katex, .icard .katex-display { white-space: normal; max-width: 100%; }
  .icard .katex-html { white-space: normal; }
  .icard .m { overflow-x: auto; }
}
@media (max-width: 420px) {
  .panel-head { gap: 4px; }
  .panel-head .itab { padding: 0 9px; font-size: 13px; }
  .panel-head .itab svg { display: none; }
  .panel-head .pen-btn, .panel-head .fs-btn { width: 34px; height: 34px; }
}
@media (max-width: 380px) {
  .sh-bar.docked .sh-t { width: 27px; height: 27px; }
  .sh-bar.docked { padding: 3px 4px; }
}
@media (max-width: 640px) {
  .practice-on .iex .q { font-size: 19px; }
}
/* landscape phones: the panel fills the whole screen height (the page is scrolled to it), the title only stays for screen readers */
@media (max-height: 500px) and (max-width: 950px) and (orientation: landscape) {
  .bar { position: static; }   /* no sticky header: the screen height is for the lesson */
  .tside, .tapp.menu-open .tside { inset: 0; height: 100vh; height: 100dvh; }
  .panel-on { height: calc(100vh - 12px); height: calc(100dvh - 12px); min-height: 0; }
  .topic-panel { padding: 6px 10px 4px; }
  .panel-on .topic-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
  .panel-head .itab { height: 34px; padding: 0 12px; font-size: 14px; }
  .panel-head .pen-btn, .panel-head .fs-btn { width: 36px; height: 36px; margin-left: 0; }
  .panel-head .pen-btn { margin-left: auto; }
  .panel-head .pen-btn[hidden] + .fs-btn { margin-left: auto; }
  .panel-on .pr-nav { justify-content: flex-start; gap: 10px; margin-top: 4px; }
  .pr-arrow { width: 36px; height: 36px; }
  .is-full .pr-nav, .panel-on.is-full .pr-nav { justify-content: center; padding-right: 0; }
  .sh-bar.docked .sh-t { width: 34px; height: 34px; }
}

/* the applet over the whole window (phones, asked for by the apps site inside the frame of /apps) */
.apps-page .apps-frame.turned { position: fixed; inset: 0; z-index: 2000; width: 100%; height: 100vh; height: 100dvh; background: #fff; }

/* /play on a phone: full window for the applet (portal.js turns the frame in portrait) */
.play-exit { display: none; }
.play-frame.turned { position: fixed; inset: 0; z-index: 2000; width: 100%; height: 100vh; height: 100dvh; max-height: none; min-height: 0; aspect-ratio: auto; margin: 0; border: 0; border-radius: 0; }
.play-frame.turned .play-exit { display: grid; place-items: center; position: absolute; z-index: 5; bottom: 4px; width: 28px; height: 28px; padding: 0; color: #475569; background: rgba(255, 255, 255, .85); border: 1px solid var(--border); border-radius: 50%; cursor: pointer; }
@media (orientation: portrait) { .play-frame.turned .play-exit { left: 4px; } }
@media (orientation: landscape) { .play-frame.turned .play-exit { right: 4px; } }
@media (max-width: 700px) { .play-frame { min-height: 0; height: auto; aspect-ratio: var(--ratio, 16 / 10); } .play-sec .wrap { padding: 0 10px; } }

/* admin panel: the tab bar, the groups, the user list */
.admin-tabs-wrap { background: #fff; border-bottom: 1px solid var(--border); }
.admin-tabs { max-width: var(--cw); margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid #cfe0f5; background: #eaf2fc;
  color: #164a82; font-size: 14.5px; font-weight: 500; text-decoration: none; }
.admin-tabs a:hover { background: #dbe9fa; }
.admin-tabs a.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.admin-tabs a .count { background: #fff; color: #164a82; margin: 0; }
.agroups { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.agroup { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; display: flex; flex-wrap: wrap; gap: 14px 34px; --gfill: #e8ebef; --gink: #495057; }
.agroup-blue { --gfill: #d0ebff; --gink: #1971C2; } .agroup-teal { --gfill: #c5f6fa; --gink: #0C8599; } .agroup-orange { --gfill: #ffe8cc; --gink: #E8590C; }
.agroup-green { --gfill: #d3f9d8; --gink: #2F9E44; } .agroup-violet { --gfill: #e5dbff; --gink: #7048E8; } .agroup-red { --gfill: #ffe3e3; --gink: #E03131; }
.agroup-head { flex: 0 0 260px; max-width: 100%; display: flex; gap: 12px; align-items: flex-start; }
.agroup-head .acc-icon { background: var(--gfill); color: var(--gink); }
.agroup-head h2 { margin: 0; font-size: 19px; }
.agroup-head h2 a { color: var(--text); text-decoration: none; }
.agroup-head h2 a:hover { text-decoration: underline; }
.agroup-head .hint { margin: 4px 0 0; }
.agroup-body { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 30px; align-content: start; }
.asec h3 { margin: 4px 0 4px; font-size: 14px; color: #1971C2; text-transform: uppercase; letter-spacing: .04em; }
.alinks { list-style: none; margin: 0; padding: 0; }
.alinks li { padding: 7px 0; border-bottom: 1px solid #edf0f4; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.alinks a { font-weight: 600; text-decoration: none; }
.alinks a:hover { text-decoration: underline; }
.alinks .hint { flex: 1 0 100%; font-size: 13px; }
.soon-link { color: #6b7a8c; font-weight: 600; }
.tag-soon { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px dashed #8a97a8; color: #4a5766; }
.agroups .agroup-body { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.kpis a { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; box-shadow: inset 4px 0 0 var(--ink); color: inherit; text-decoration: none; }
.kpis a:hover { border-color: #9dc2ee; }
.atabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.atabs a { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #cfdae8; background: #fff; color: #2c3a4a; font-weight: 500; text-decoration: none; }
.atabs a.on { background: #1c2733; border-color: #1c2733; color: #fff; font-weight: 600; }
.atabs .n { font-size: 12px; background: #e8edf3; color: #2c3a4a; border-radius: 999px; padding: 1px 8px; }
.atabs a.on .n { background: #fff; color: #1c2733; }
.afilters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.afilters .field { gap: 3px; }
.afilters .field > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.afilters .field.grow { flex: 1 1 240px; }
.afilters input, .afilters select { height: 38px; box-sizing: border-box; }
.achips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; font-size: 13.5px; }
.chip { display: inline-flex; gap: 6px; align-items: center; background: #eaf2fc; border: 1px solid #cfe0f5; color: #164a82; border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.chip:hover { background: #dbe9fa; }
.chip.seg { background: #f1f0fb; border-color: #d9d4f5; color: #4a2aa6; }
.achips .sep { margin-left: 8px; }
.segsave { display: inline-block; }
.segsave summary { list-style: none; cursor: pointer; }
.segsave summary::-webkit-details-marker { display: none; }
.segsave form { display: flex; gap: 6px; margin-top: 6px; }
.admin-list th.cb, .admin-list td.cb { width: 34px; padding-right: 0; }
.admin-list input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary); }
.sortlink { color: inherit; text-decoration: none; }
.sortlink:hover { color: var(--primary); }
.abulk { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 12px 0 4px; }
.abulk .field { margin: 0; }
.abulk select { height: 38px; }
.pager { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; justify-content: space-between; margin: 14px 0 28px; font-size: 14px; color: var(--muted); }
.pager .pages, .pager .per { display: inline-flex; gap: 4px; }
.pg { min-width: 32px; height: 32px; padding: 0 8px; box-sizing: border-box; border-radius: 8px; border: 1px solid #cfdae8; background: #fff; color: #2c3a4a; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.pg.on { background: #1c2733; border-color: #1c2733; color: #fff; }
.anote { background: #fff8e1; border: 1px solid #ecd9a0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.anote p { margin: 0 0 4px; }
.anote form { margin-top: 6px; }
.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin: 4px 0; }
.sub-title { font-size: 18px; margin: 26px 0 10px; }
.chg { margin-top: 4px; }
.row-actions.left { text-align: left; }
.row-actions.left form { margin: 0 8px 8px 0; }
@media (max-width: 640px) { .admin-tabs a { height: 34px; padding: 0 10px; font-size: 13.5px; } }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.kpis.sums { margin: 12px 0 14px; }
.logtail { margin: 0 0 8px; padding: 12px 14px; background: #1c2733; color: #e6edf5; border-radius: 10px; font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
form.trow { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.trow-en { font-size: 13px; color: var(--muted); margin-bottom: 6px; overflow-wrap: anywhere; }
.trow textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px 10px; border: 1px solid #c5d0dd; border-radius: 8px; resize: vertical; }
.trow-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.mailcols { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.mail-list { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 4px; }
.mail-list a { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; text-decoration: none; color: var(--text); }
.mail-list a:hover { background: #eef4fb; }
.mail-list a.on { background: #fff; border-color: #9dc2ee; box-shadow: 0 1px 6px rgba(15, 112, 215, .1); }
.mail-main { flex: 999 1 560px; min-width: 0; }
.mailframe { width: 100%; height: 560px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.code-area { width: 100%; box-sizing: border-box; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; padding: 10px 12px; border: 1px solid #c5d0dd; border-radius: 8px; }
.faq-admin-group { margin: 14px 0 4px; font-size: 15px; color: #1971C2; }

/* admin: retirements (classic applications replaced by HTML5 ones) */
.badge-count { background: #fff3bf; border-color: #f0d56a; color: #7a5b00; padding: 0 7px; font-size: 12px; font-weight: 700; }
.rt-summary { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 0 0 12px; font-weight: 600; }
.rt-summary .tag { margin-left: 10px; min-width: 22px; text-align: center; }
.rt-summary .tag:first-child { margin-left: 0; }
.rt-list { display: flex; flex-direction: column; gap: 12px; }
.rt-card { display: grid; grid-template-columns: 230px minmax(0, 1fr) 230px; gap: 22px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: inset 4px 0 0 #cfd6de; }
.rt-card.rt-hide { box-shadow: inset 4px 0 0 #e03131; }
.rt-card.rt-keep { box-shadow: inset 4px 0 0 #2F9E44; }
.rt-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.rt-old, .rt-dec { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.rt-pic { display: block; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; width: 100%; max-width: 210px; aspect-ratio: 404 / 251; margin-bottom: 8px; text-decoration: none; }
.rt-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rt-pic.sm { flex: none; width: 96px; margin: 0; }
.rt-nopic { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #f1f3f5; color: #adb5bd; font-size: 28px; }
.rt-title { line-height: 1.3; overflow-wrap: anywhere; }
.rt-id { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.rt-try { margin-top: 6px; font-weight: 600; font-size: 14px; }
.rt-repl { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rt-repl li { display: flex; gap: 12px; align-items: center; }
.rt-repl li > span { min-width: 0; overflow-wrap: anywhere; }
.rt-cov { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 4px 0; }
.rt-oc { font-size: 12px; color: var(--muted); }
.rt-note { margin: 4px 0; font-size: 14px; color: #334155; }
.rt-warn { margin: 6px 0 0; font-size: 13.5px; color: #8a5300; background: #fff8e1; border: 1px solid #ecd9a0; border-radius: 8px; padding: 6px 10px; }
.rt-radios { border: 0; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rt-opt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #d5dde6; border-radius: 8px; cursor: pointer; font-weight: 600; }
.rt-opt input { accent-color: var(--primary); width: 17px; height: 17px; margin: 0; }
.rt-opt:has(input:checked) { background: #eef4fb; border-color: #9dc2ee; }
.rt-opt-hide:has(input:checked) { background: #fff0f0; border-color: #f0a5a5; }
.rt-opt-keep:has(input:checked) { background: #ebfbee; border-color: #9fd9aa; }
.rt-who { margin: 0 0 8px; }
.rt-bar { position: sticky; bottom: 0; background: rgba(255, 255, 255, .95); border-top: 1px solid var(--border); padding: 12px 0; margin-top: 14px; align-items: center; }
@media (max-width: 900px) { .rt-card { grid-template-columns: 1fr; gap: 14px; } .rt-pic { max-width: 260px; } .rt-radios { flex-direction: row; flex-wrap: wrap; } }

/* application guides (/guides, the guide button of a class) */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.guide-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: inset 0 4px 0 #024e64; }
.guide-card h3 { margin: 2px 0 0; font-size: 22px; line-height: 1.2; }
.gc-kicker { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #024e64; }
.gc-sub { margin: 2px 0 6px; font-size: 14px; color: #3b4a5c; }
.gc-meta { margin: 0; font-size: 13px; color: var(--muted); }
.gc-lang { margin: 4px 0 0; font-size: 12.5px; color: #8a5a00; }
.gc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
/* school system + school year choice of a class (new-class form, class page) */
.cur-block { display: flex; flex-direction: column; gap: 10px; }
.cur-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 17px; }
.cur-title .acc-icon svg { width: 18px; height: 18px; }
.cur-badge { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; background: #e0f2e6; color: #1e6b34; }
.cur-why { margin: 0; font-size: 14px; color: #3b4a5c; max-width: 70ch; }
.cur-block .cur-pick { align-items: flex-end; }
.cur-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 220px; min-width: 0; }
.cur-field label { font-size: 13px; font-weight: 700; color: #334155; }
.cur-pick .cur-field select { flex: none; width: 100%; }
.cur-field .cur-label { font-size: 13px; font-weight: 700; color: #334155; }
.cur-field .cur-radios { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; min-height: 38px; }
.cur-field .cur-radios label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #334155; cursor: pointer; }
.cur-field .cur-radios input { width: 18px; height: 18px; margin: 0; accent-color: #1f5fab; }
.cur-empty { margin: 0; padding: 8px 12px; font-size: 13.5px; border-radius: 8px; background: #fff7e0; border: 1px solid #f1dc9a; color: #6b5200; }
.cur-panel { margin-top: 18px; border-left: 4px solid #1971C2; }
.cur-panel.is-empty { background: #fbfdff; border-left-color: #f0b429; }
.cur-panel .btn { margin-top: 14px; }
.class-card.new { grid-column: 1 / -1; max-width: 640px; }
.cur-block.compact { gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.cur-block.compact .cur-title { font-size: 15px; }
.cur-block.compact .cur-why { font-size: 13px; }
.cur-block.compact .cur-empty { font-size: 12.5px; }
.class-guide { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }
.guide-btn svg, .btn .btn-ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pagehead.row .btn { flex: none; }

/* a site with its own name (not the classic logo picture, which has the name written in it): round logo + the name as text */
.hbrand.own .logo { display: none !important; }
.hbrand.own .logo-c { display: block !important; }
.hbrand .word { margin-left: 10px; font-family: Poppins, system-ui, sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -.01em; color: #1550b5; white-space: nowrap; line-height: 1; }
@media (max-width: 719px) { .hbrand .word { display: none; } }

/* ---------- the shell of the teacher's three sections: Lecture notes | Applications | Guides (layout.php, topics_menu.php, shell.js) ----------
   ONE top bar: the menu button at the far left (.side-btn), the switch (.ttabs-bar) between the main navigation and the language / account items.
   Below 1100 px the switch is icons only; on phones (below 700 px) it leaves the bar and becomes .ttabs-bottom, a fixed bar at the bottom. */
.ttabs { font-family: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: inline-flex; gap: 2px; padding: 3px; background: #e9eef4; border-radius: 999px; }
.ttabs a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 14.5px; line-height: 1.2; color: #334155; text-decoration: none; white-space: nowrap; }
.ttabs svg { display: none; width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ttabs a:hover:not([aria-current]) { background: #dbe3ec; }
.ttabs a[aria-current] { background: #fff; color: var(--teal); box-shadow: 0 1px 3px rgba(28, 39, 51, .14); }
.ttabs a:focus-visible { outline: 2px solid #1971C2; outline-offset: 2px; }
.bar .ttabs { flex: none; margin: 0 10px 0 6px; }
.ttabs-bottom { display: none; }
.apps-page .apps-frame, .guide-page .apps-frame { height: calc(100vh - 70px); height: calc(100dvh - 70px); }
.tmain.tmain-frame { padding: 0; }
/* Widths of the content next to the left menu (desktop, all three sections):
   - menu OPEN: the content fills the whole rest of the page (only the normal inner padding of .tmain);
   - menu FOLDED: the content stands in the same container as the top bar (width --cw, the bar's content starts after the 56 px menu button), so its left and
     right edges are the edges of the logo and of the switch. A guide frame (.tmain-frame) has its own layout and always fills the page. */
.thome, .topic-inner { max-width: none; }
@media (min-width: 901px) {
  .tapp.noside .tmain:not(.tmain-frame) {
    padding-left: max(20px, calc(56px + (100% - 56px - var(--cw)) / 2 + 16px));
    padding-right: max(20px, calc((100% - 56px - var(--cw)) / 2 + 16px));
  }
}
.guide-page .tapp { min-height: 0; }
@media (max-width: 1099px) {
  .bar .ttabs a { padding: 7px 13px; }
  .bar .ttabs .tt { display: none; }
  .bar .ttabs svg { display: block; }
}
@media (max-width: 699px) and (min-height: 501px) {   /* (a phone held sideways keeps the icons in the top bar: the screen height is for the page) */
  .bar .ttabs { display: none; }
  .ttabs-bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; gap: 0; padding: 0 0 env(safe-area-inset-bottom); border-radius: 0; background: #fff;
    border-top: 1px solid #dee2e6; box-shadow: 0 -2px 12px rgba(28, 39, 51, .08); }
  .ttabs-bottom a { flex: 1; flex-direction: column; justify-content: center; gap: 3px; height: 58px; padding: 0 4px; border-radius: 0; font-size: 12.5px; color: #475569; }
  .ttabs-bottom svg { display: block; width: 23px; height: 23px; }
  .ttabs-bottom a:hover:not([aria-current]) { background: #f3f6f9; }
  .ttabs-bottom a[aria-current] { background: #eef5f9; color: var(--teal); box-shadow: inset 0 3px 0 var(--teal); }
  .ttabs-bottom a:focus-visible { outline-offset: -3px; }
  /* room for the bar: page content and footer end above it, the cookie notice sits above it, the left menu panel ends above it, the framed pages get a shorter frame */
  body.has-bnav { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .has-bnav .tside, .has-bnav .tapp.menu-open .tside { bottom: calc(60px + env(safe-area-inset-bottom)); height: auto; }
  .has-bnav .cookie-bar { bottom: calc(58px + 12px + env(safe-area-inset-bottom)); }
  .has-bnav.apps-page { padding-bottom: 0; }
  .has-bnav .panel-on { height: calc(100vh - 70px - 16px - 58px - env(safe-area-inset-bottom)); height: calc(100dvh - 70px - 16px - 58px - env(safe-area-inset-bottom)); }
  .apps-page.has-bnav .apps-frame, .guide-page.has-bnav .apps-frame { height: calc(100vh - 70px - 58px - env(safe-area-inset-bottom)); height: calc(100dvh - 70px - 58px - env(safe-area-inset-bottom)); }
  .apps-page.has-bnav .apps-frame.turned { height: 100vh; height: 100dvh; }   /* the applet over the whole window covers the bar too */
}

/* the guide library, like the topics home */
.gl-cards h3 { margin: 18px 0 10px; font-size: 18px; }
.gl-cards h3:first-of-type { margin-top: 12px; }
.gl-n { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.gl-only { margin: 2px 0 0; color: var(--muted); font-weight: 600; }
.gl-mine { margin-top: 0; margin-bottom: 14px; }
.gl-mine h2 { margin-bottom: 12px; }
.gl-home .tempty { margin: 14px 0 0; }

/* the first items of the guide menu: back to the library (and to the class) */
.tapp .tback { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--teal);
  font-weight: 700; font-size: 14.5px; text-decoration: none; }
.tapp .tback:hover { background: var(--bg); }
.tapp .tback svg { width: 17px; height: 17px; flex: none; }
.tapp .tback span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tapp .tback + .trow.l0, .tapp .tback + .tback { margin-top: 8px; }

/* the switch made compact by shell.js (the bar was too tight) and moved into the left panel when even that did not fit */
.bar.compact .ttabs a { padding: 7px 13px; }
.bar.compact .ttabs .tt { display: none; }
.bar.compact .ttabs svg { display: block; }
.side-tools .ttabs.in-panel { display: flex; margin: 0 0 10px; }
.side-tools .ttabs.in-panel a { flex: 1; justify-content: center; padding: 7px 6px; font-size: 13.5px; }
.gl-hint { margin: 0 0 14px; max-width: 80ch; }

/* one container per school system on the guide library */
/* the country lists are light accordions (same look as .acc): the heading row is a button, the cards are folded away at first */
.gl-group { margin-top: 14px; padding: 0; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.gl-group:hover { border-color: #c3d9f3; }
.gl-group.open { border-color: #c3d9f3; box-shadow: 0 1px 6px rgba(15, 112, 215, .07); }
.gl-group .gl-h { margin: 0; font-size: 22px; }
.gl-toggle { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 16px 22px; font: inherit; color: inherit; text-align: left; background: #fff; border: 0; cursor: pointer; transition: background .15s; }
.gl-toggle:hover { background: #f6f9fd; }
.gl-group.open .gl-toggle { background: #fff; }
.gl-group.open .gl-toggle { border-bottom: 1px solid #dbe5f0; }
.gl-toggle:focus-visible { outline: 2px solid #1971C2; outline-offset: -2px; }
.gl-name { font-weight: 800; }
.gl-group .gl-n { margin-left: 0; font-size: 14px; }
.gl-group .gl-toggle .acc-chev { margin-left: auto; }
.gl-group.open .gl-toggle .acc-chev { transform: rotate(-135deg); margin-top: 4px; }
.gl-panel { padding: 16px 22px 20px; }
.gl-panel[hidden] { display: none; }
@media (max-width: 700px) { .gl-toggle { padding: 14px; } .gl-panel { padding: 14px 14px 16px; } .gl-group .gl-h { font-size: 20px; } }
.gl-only { margin: 0 0 12px; color: var(--muted); font-weight: 600; }

/* the sample applications on the start page are demos: each card is a link */
.applet.demo-sample a, .applet.demo-sample a:hover, .applet.demo-sample a:focus { display: block; color: inherit; text-decoration: none; }
.applet.demo-sample a:hover figcaption { color: var(--teal); }
.applet.demo-sample:hover { box-shadow: 0 4px 18px rgba(15, 112, 215, .16); transform: translateY(-2px); }
.applet.demo-sample a:focus-visible { outline: 3px solid #1971C2; outline-offset: -3px; }
.applet.demo-sample img { aspect-ratio: 404 / 251; object-fit: contain; background: #fff; }

/* the demo applications on the topics home: ONE row of picture cards (picture on top, title under it) that scrolls sideways with snapping; the round arrows scroll it
   (demo-carousel.js), nothing moves by itself. Cards per view follow the width of the row: 1.3 on phones, 2, 3, 4. */
.dcar { position: relative; margin-top: 12px; }
.dcar-view { container-type: inline-size; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 3px 2px 6px; }
.dcar-view::-webkit-scrollbar { display: none; }
.dcar-track { display: flex; gap: 14px; width: max-content; margin: 0; padding: 0; list-style: none; }
.dcar-track li { flex: none; width: 77cqw; scroll-snap-align: start; scroll-margin-left: 2px; }
@container (min-width: 520px) { .dcar-track li { width: calc((100cqw - 14px) / 2); } }
@container (min-width: 800px) { .dcar-track li { width: calc((100cqw - 28px) / 3); } }
@container (min-width: 1150px) { .dcar-track li { width: calc((100cqw - 42px) / 4); } }
.dcard { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.dcard:hover, .dcard:focus-visible { border-color: var(--primary); box-shadow: 0 2px 10px rgba(15, 112, 215, .15); outline: none; }
.dcard:focus-visible { outline: 2px solid #1971C2; outline-offset: 1px; }
.dcard img { display: block; width: 100%; height: auto; aspect-ratio: 404 / 251; object-fit: contain; background: #fff; border-bottom: 1px solid var(--border); }
.dcard .dtitle { padding: 9px 12px 11px; font-size: 15px; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dcar-btn { position: absolute; top: 50%; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px; margin-top: -21px; padding: 0; border: 1.5px solid #b9d3f2; border-radius: 50%; background: #fff; color: #1f5fab; box-shadow: 0 2px 10px rgba(28, 39, 51, .18); cursor: pointer; transition: opacity .15s, background .15s; }
.dcar-btn[hidden] { display: none; }
.dcar-btn.prev { left: -12px; } .dcar-btn.next { right: -12px; }
.dcar-btn:hover { background: #e3edfb; }
.dcar-btn:focus-visible { outline: 2px solid #1971C2; outline-offset: 2px; }
.dcar-btn svg { width: 22px; height: 22px; }
.dcar-btn[aria-disabled="true"] { opacity: .35; cursor: default; box-shadow: none; background: #f1f3f5; color: #868e96; border-color: #dee2e6; }
@media (max-width: 640px) { .dcar-btn { width: 36px; height: 36px; margin-top: -18px; } .dcar-btn.prev { left: -6px; } .dcar-btn.next { right: -6px; } }
@media (prefers-reduced-motion: reduce) { .dcar-view { scroll-behavior: auto; } }

/* ===== UI4: Applications for everybody, the badge in the trees, the topic panel ===== */
.tcard[hidden], .asub[hidden], .agrp[hidden], .tempty[hidden] { display: none; }
.tapp .titem > span:first-child { flex: 1; min-width: 0; }
/* the small number after a sub-topic: how many applications this visitor may open there */
.abadge { flex: none; margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: #e9eef4; color: #475569; font-size: 11.5px; font-weight: 700; line-height: 1.6; text-align: center; }
.tapp .titem.on .abadge, .tapp .aitem.on .abadge { background: #fff; color: var(--primary-dark); }
/* the Applications tree: a sub-topic opens to its applications */
.tapp .tlb { background: none; border: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.tapp .titem.asubrow { width: 100%; background: none; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.tapp .titem.asubrow:hover { background: var(--bg); text-decoration: none; }
.tapp .asubrow svg { width: 12px; height: 12px; flex: none; fill: none; transition: transform .12s; }
.tapp .asubrow.open svg { transform: rotate(90deg); }
.tapp .aitems { margin: 1px 0 6px 17px; padding-left: 6px; border-left: 2px solid #dbe5f0; }
.tapp .aitem { display: flex; align-items: center; gap: 6px; padding: 5px 8px; margin-top: 2px; border-radius: 6px; color: #334155; text-decoration: none; font-size: 12.5px; line-height: 1.3; border: 1px solid transparent; }
.tapp .aitem:hover { background: var(--bg); text-decoration: underline; }
.tapp .aitem.on { background: var(--active); border-color: var(--primary); color: var(--primary-dark); font-weight: 700; }
.tapp .aitem span:first-child { flex: 1; min-width: 0; }
.tapp .aitem.lk { opacity: .6; } .tapp .aitem.lk:hover, .tapp .aitem.lk:focus-visible { opacity: 1; }
.atag { flex: none; padding: 0 7px; border-radius: 999px; background: #D3F9D8; color: #1f6b30; font-size: 10.5px; font-weight: 800; line-height: 1.7; }
.atag.plus { background: #E5DBFF; color: #5a36c8; }
.tapp .alocksw { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #f1f5f9; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: #334155; cursor: pointer; }
.tapp .alocksw input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
/* applications this visitor may not open: dimmed, only drawn with "Show locked ones too" */
.tcard.lk { opacity: .55; } .tcard.lk:hover, .tcard.lk:focus-visible { opacity: 1; }
.apps-cat:not(.show-locked) .tcard.lk { display: none; }

/* the Applications page */
.ahero { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px 22px; align-items: center; margin-top: 0; }
.ahero .tbig-icon { grid-row: 1; }
.ahero h1 { margin: 0 0 4px; font-size: 26px; text-align: left; line-height: 1.2; }
.ahero-body > p { margin: 0; color: var(--muted); }
.ahero .thome-act { margin-top: 12px !important; }
.ahero-stats div { min-width: 116px; border-color: #dbe5f0; background: #f8fafc; text-align: center; }
.ahero-stats div.me { border-color: var(--primary); background: var(--active); }
.ahero-stats div.me b { color: var(--primary-dark); }
.asearch { position: relative; margin-top: 14px; }
.asearch svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; fill: none; stroke: #64748b; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.asearch input { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px 11px 42px; border: 1.5px solid #b9d3f2; border-radius: 12px; background: #fff; color: var(--text); }
.asearch input:focus-visible { outline: 2px solid #1971C2; outline-offset: 1px; }
.ahome .tempty { margin: 14px 2px 0; }
.agrp > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.agrp > summary::-webkit-details-marker { display: none; }
.agrp > summary::before { content: ''; flex: none; width: 9px; height: 9px; border-right: 3px solid #5b88c4; border-bottom: 3px solid #5b88c4; transform: rotate(-45deg); transition: transform .12s; margin: 0 4px 0 2px; }
.agrp[open] > summary::before { transform: rotate(45deg); }
.agname { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agcat { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.agtitle { font-size: 21px; font-weight: 800; line-height: 1.2; }
.agn { flex: none; font-size: 13px; font-weight: 700; color: #475569; background: #e9eef4; border-radius: 999px; padding: 2px 12px; }
.agrp > summary:focus-visible { outline: 2px solid #1971C2; outline-offset: 4px; border-radius: 6px; }
.asub { margin-top: 16px; }
.asub h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0; font-size: 16px; }
.asub-link { font-size: 12.5px; font-weight: 700; color: #1f5fab; text-decoration: none; }
.asub-link:hover { text-decoration: underline; }
.agrp .tgrid.tools { margin-top: 8px; }

/* an application inside the shell (/play/<id>) */
.aplay { max-width: none; }
.aback, .apps-back .aback { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 0 0 12px; padding: 9px 16px 9px 12px; border-radius: 999px; border: 1.5px solid #b9d3f2; background: #e3edfb; color: #1f5fab; font-weight: 800; font-size: 14.5px; line-height: 1.25; text-decoration: none; }
.aback[hidden], .apps-back[hidden] { display: none; }
.aback:hover { background: #d3e4fa; border-color: #8fb5e8; }
.aback:focus-visible { outline: 2px solid #1971C2; outline-offset: 2px; }
.aback svg { flex: none; width: 18px; height: 18px; }
.aback span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aplay .play-frame { height: calc(100vh - 70px - 16px - 46px - 28px); height: calc(100dvh - 70px - 16px - 46px - 28px); min-height: 380px; }
.aplay .panel { max-width: 920px; }
.aplay-title { margin: 0 0 12px; font-size: 24px; text-align: left; }
.aplay .hint { margin: 0 0 12px; }
@media (max-width: 700px) { .aplay .play-frame { min-height: 0; height: auto; aspect-ratio: var(--ratio, 16 / 10); } }
/* /apps/<application> for a teacher: a strip above the web app's frame */
.apps-back { display: flex; align-items: center; height: 46px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--border); }
.apps-back .aback { margin: 0; padding: 5px 14px 5px 10px; font-size: 13.5px; }
.apps-page .apps-wrap.has-back .apps-frame { height: calc(100vh - 70px - 46px); height: calc(100dvh - 70px - 46px); }
@media (max-width: 700px) {
  .apps-page.has-bnav .apps-wrap.has-back .apps-frame { height: calc(100vh - 70px - 46px - 58px - env(safe-area-inset-bottom)); height: calc(100dvh - 70px - 46px - 58px - env(safe-area-inset-bottom)); }
  .ahero { grid-template-columns: 48px minmax(0, 1fr); gap: 6px 14px; }
  .ahero .tbig-icon { width: 48px; height: 48px; border-radius: 13px; }
  .ahero .tbig-icon svg { width: 26px; height: 26px; }
  .ahero h1 { font-size: 21px; align-self: center; }
  .ahero-body { display: contents; }
  .ahero h1 { grid-column: 2; grid-row: 1; }
  .ahero-body > p, .ahero .thome-act { grid-column: 1 / -1; }
  .ahero .tstats { grid-column: 1 / -1; }
  .ahero-stats div { flex: 1; min-width: 0; padding: 8px 4px; }
  .ahero-stats span { font-size: 11.5px; }
  .agtitle { font-size: 18px; }
  .aback span { white-space: normal; }
  .aback { border-radius: 18px; }
}
/* the Applications tab and its panel on a topic page */
.itab.app { --tc: #f0a468; --td: #d97b2d; --tn: #ffe8cc; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; background: #fff; }
.itab.app:hover { filter: brightness(.97); } .itab.app[aria-expanded="true"] { background: var(--tn); }
.itab.app:focus-visible { outline: 2px solid #1971C2; outline-offset: 2px; }
.ap-scrim { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .3); opacity: 0; transition: opacity .2s; }
.ap-scrim.on { opacity: 1; } .ap-scrim[hidden] { display: none; }
.ap-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 101; width: clamp(420px, 54vw, 880px); max-width: 100vw; display: flex; flex-direction: column; background: #fff; box-shadow: -10px 0 34px rgba(15, 23, 42, .25);
  transform: translateX(100%); transition: transform .22s ease; font-family: Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ap-panel.on { transform: none; } .ap-panel[hidden] { display: none; }
.ap-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fff3e6; }
.ap-title { flex: 1; min-width: 0; margin: 0; font-size: 18px; line-height: 1.25; color: #b45f12; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.ap-close { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 2px solid #f0c9a2; background: #fff; color: #b45f12; cursor: pointer; font: inherit; font-weight: 800; font-size: 14.5px; }
.ap-close:hover { background: #ffe8cc; }
.ap-close:focus-visible, .ap-panel .tcard:focus-visible { outline: 2px solid #1971C2; outline-offset: 2px; }
.ap-close svg { width: 20px; height: 20px; flex: none; }
.ap-close .ap-ar, .ap-close .ap-ct { display: none; }
.ap-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.ap-list { padding: 14px; }
.ap-list .tgrid.tools { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@media (max-width: 640px) {
  .ap-panel { width: 100vw; }
  .ap-head { flex-wrap: wrap; padding: 8px 10px 8px; gap: 6px 8px; }
  .ap-close { order: -1; flex: 1 0 100%; width: auto; height: 44px; border-radius: 22px; justify-content: flex-start; padding: 0 16px 0 12px; background: #fff; }
  .ap-close .ap-x { display: none; } .ap-close .ap-ar, .ap-close .ap-ct { display: inline; }
  .ap-close .ap-ar { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) { .ap-panel, .ap-scrim { transition: none; } }
/* P1: the text blocks under the application on /play/<id> (what it teaches, how to use it, school years, similar applications, lecture notes) and the closed
   accordion "What the applications of this topic teach" on topic pages */
.apub-below { max-width: 960px; margin: 22px 0 0; }
.apub .topic-card h2 { font-size: 20px; }
.apub-goals ul, .apub-how ol { margin: 0; padding-left: 22px; }
.apub-goals li, .apub-how li { margin: 0 0 7px; }
.apub-how p { margin: 0 0 12px; }
.apub-tip { margin: 14px 0 0 !important; padding: 12px 16px; border-radius: 12px; background: #fff7e6; border: 1px solid #ffd8a8; }
.apub-fits p { margin: 0 0 6px; }
.apub-more .tgrid { margin-top: 12px; }
/* .apub-notes is NOT a .topic-card (no heading, just one link): a light centred call-to-action under a divider, not another empty-looking box */
.apub-notes { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); text-align: center; }
.apub-notes p { margin: 0; }
.apub-notes .btn { white-space: normal; max-width: 100%; height: auto; min-height: 48px; padding: 10px 24px; text-align: center; line-height: 1.35; }
.topic-teach { padding: 0; }
.teach-acc > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 18px 56px 18px 28px; position: relative; cursor: pointer; list-style: none; border-radius: 18px; }
.teach-acc > summary::-webkit-details-marker { display: none; }
.teach-acc > summary::after { content: ''; position: absolute; right: 26px; top: 50%; width: 10px; height: 10px; margin-top: -8px; border: solid #1f5fab; border-width: 0 3px 3px 0; transform: rotate(45deg); transition: transform .15s; }
.teach-acc[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.teach-acc > summary:hover { background: #f3f7fc; }
.teach-acc > summary:focus-visible { outline: 2px solid #1971C2; outline-offset: -2px; }
.teach-h { font-size: 20px; font-weight: 800; line-height: 1.25; }
.teach-n { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.teach-body { padding: 6px 28px 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 28px; }
.teach-app h3 { margin: 0 0 4px; font-size: 15.5px; line-height: 1.3; }
.teach-app h3 a { color: var(--primary); }
.teach-app ul { margin: 0; padding-left: 20px; font-size: 14.5px; color: #334155; }
.teach-app li { margin: 0 0 3px; }
@media (max-width: 640px) { .teach-acc > summary { padding: 14px 48px 14px 16px; } .teach-body { padding: 4px 16px 18px; } .teach-h { font-size: 18px; } }

/* UI6: the Applications page. The newest applications are a row (slider) under the numbers, its cards carry the access badge; each group is ONE card grid
   (4 columns on a wide column, fewer on narrow ones), and with "Show locked ones too" the groups show the sub-topic view instead. */
.dcard { position: relative; }
.dcard .tbadge { z-index: 1; }
.agrid[hidden], .asubs[hidden] { display: none; }
.agrp { container-type: inline-size; }
.agrp .tgrid.tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@container (min-width: 520px) { .agrp .tgrid.tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 760px) { .agrp .tgrid.tools { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.agrp .tgrid .ttitle { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* P2/P3 (2026-11-14): the application guides as pages for everybody. The left menu is the table of contents of the guide; the guide home, a theme page and
   the method page are server-rendered. The pieces cut from the built guide keep its class names with the prefix g- (src/guides_split.php), styled here. Every
   theme has its own accent colour (--acc --tint --tint2 --edge) from the built guide. */
.gtoc-name { margin: 12px 2px 0; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--muted); }
.tapp .gdot { flex: none; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--acc, #1971C2); }
.tapp .trow.l0[data-gt] .tl { padding-left: 4px; }
.tapp .trow.l0[data-gt] .tg + .tl { padding-left: 0; }
.tapp .trow.l0[data-gt] .tl .gdot { margin-left: 2px; }
.tapp .titem b { flex: none; min-width: 3.4em; font-size: 12px; color: var(--acc, #1f5fab); }
.tapp .titem[hidden], .tapp .trow[hidden], .tapp .tbox[hidden] { display: none; }
.tapp .tover-link { display: block; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #334155; font-size: 14px; font-weight: 700; text-decoration: none; }
.tapp .tover-link:hover { background: var(--bg); }
.tapp .tover-link.on { background: #dfeafa; border-color: #b9d3f2; color: #1f5fab; }
/* the engine's own main > * { max-width: 1120px; margin-left/right: auto } (screen.css) plus its main { padding: 22px 28px 56px }: the side
   gutter here matched 1100px/no side padding before, narrower and flusher to the edge than the real page. */
/* horizontal gutter only ever comes from .tmain (the page shell every section shares, padding 16px 20px 28px) - .gdoc used to add its own 28px
   on top of that, double-padding the page and narrowing the grid below its real width (fewer columns than the engine's own single-wrapper page
   at the same viewport). Vertical spacing stays (top/bottom, where there is no such duplication). */
.gdoc { max-width: 1120px; margin: 0 auto; padding: 0 0 56px; }
.gdoc h1 { margin: 0; text-align: left; }
.gcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.gcrumbs li + li::before { content: '›'; margin-right: 8px; color: #94a3b8; }
.gcrumbs a { color: var(--teal); text-decoration: none; font-weight: 700; }
.gcrumbs a:hover { text-decoration: underline; }
.glead { margin: 14px 0 0; max-width: 70ch; font-size: 16px; color: #334155; }
/* the hero: the engine's own screen.css .hero/.hero-art/.hero-text/.kicker/.hero-cur/.hero-grade/.hero-counts/.strip, values copied verbatim (font,
   size, weight, colour, spacing) - engine-g.css doesn't generate this (page-chrome, not .gbody content), so it stays hand-written here, but matched
   exactly rather than approximated. --sans/--teal: --teal is global (engine-g.css :root), --sans is .gbody-scoped there - given its own value here
   since .ghero sits outside any .gbody. */
.ghero { position: relative; overflow: hidden; padding: 40px 44px 38px; border-radius: 18px; color: #fff; background: linear-gradient(160deg, #035a73 0%, var(--teal, #024e64) 55%, #013c4e 100%); }
.ghero-art { position: absolute; right: 0; bottom: 0; width: 100%; height: 100%; opacity: .85; }
.ghero-text { position: relative; max-width: 36rem; }
.ghero p { margin: 0; }
.ghero h1 { font: 800 46px/1.05 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0 0 12px; color: #fff; }
.gkicker { font: 800 12.5px/1 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #a9e3c0; margin-bottom: 14px; }
.gcur { font: 700 18px/1.35 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #e6f2f5; }
.ggrade { display: inline-block; margin-top: 14px; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .17); font: 800 16px/1.2 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ghero .gcounts { margin-top: 16px; font: 700 15px/1.4 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #d3ecf1; }
.gstrip { display: flex; gap: 5px; margin-top: 22px; max-width: 15rem; }
.gstrip i { flex: 1; height: 7px; border-radius: 4px; background: var(--acc, #fff); }
.gnotice { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: #fff8e6; border: 1px solid #f1d98f; color: #6b4e00; }
.gnotice h2 { margin: 0 0 4px; font-size: 15px; }
.gnotice p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.gsec-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 24px 0 10px; }
.gsec-row .gsec { margin: 0; }
.gpdf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--teal, #024e64); color: #fff; font-weight: 800; font-size: 14.5px; text-decoration: none; }
.gpdf-btn:hover { background: #013c4e; }
.gsec { margin: 24px 0 10px; font-size: 22px; }
.gthemes { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.gthemes li[hidden] { display: none; }
/* the theme cards of the guide home and the theme page's own header: engine-g.css's .g-tbig/.g-tbig-icon/.g-tpick/.g-tchips/.g-tstats (generated), the
   engine's own look, reused verbatim (guides_split.php's icon_html/stats_html) instead of a hand-built equivalent. */
.gtheme-out { --acc: #475569; --tint: #f4f6f9; --edge: #d3dbe5; }
.g-tchips .gpart { background: var(--acc, #1971C2); border-color: var(--acc, #1971C2); color: #fff; }
.gchips { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 0; padding: 0; list-style: none; }
.gchips > span, .gchips > li { padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--edge, var(--border)); font-size: 12.5px; font-weight: 700; color: #334155; }
.gfoot { margin: 18px 0 0; font-size: 14.5px; color: #334155; }
.gfoot a { color: var(--teal); font-weight: 700; }
.gopen { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 18px; align-items: center; padding: 20px 22px; border-radius: 16px; background: var(--tint, #f4f7fb); border: 1.5px solid var(--edge, var(--border)); }
.gopen-plain { grid-template-columns: minmax(0, 1fr); }
.gopen h1 { font-size: 30px; line-height: 1.15; color: var(--acc, var(--text)); }
.gflead { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: #334155; }
.gframe { margin-top: 16px; padding: 18px 22px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.gframe h2 { margin: 0 0 8px; font-size: 18px; }
.golist { margin-top: 24px; }
.gframe .gchips { margin-top: 8px; }
.gcards { display: grid; gap: 16px; margin-top: 22px; }
.gmore { margin-top: 18px; }
/* the topic list of a theme page (an outcome's own card: engine-g.css's .g-ogrid/.g-ocard, generated - see the big comment below) plus the
   detail view it opens, portal-only concepts the engine itself does not have (its single built file switches "screens" with JS; here every
   theme is its own crawlable page, so the switch is a CSS :target, no script). godetail: hidden by default, shown (and the grid+heading
   hidden, via :has()) when the browser's address bar hash matches its id - a plain <a href="#id"> in the grid does the rest. */
/* engine-g.css scopes its whole design-system variable set (--ink, --line, --sans, the status colours, ...) to .gbody, the content wrapper, so it
   never leaks into the rest of the portal page. .g-tbig/.g-ogrid/.g-card sit OUTSIDE any .gbody here (on the home list and the theme page's own
   header/card grid) and still need them - but adding the class .gbody itself is the wrong fix: .gbody a { color: var(--brand-blue) } would then
   outrank .g-tbig's own (lower-specificity) ink colour, since the generator turned the engine's original bare "a {...}" into a classed one. Define
   the same variables again, directly on the three selectors that need them, nothing else from .gbody.
   The VALUES here are the guide engine's SCREEN look (redesign/guide/screen.css "body:not(.pdf)"), not the print/PDF ones .gbody itself and
   engine-g.css's :root carry (--sans Inter, serif-ish headings): on screen every guide page is Nunito, heavier (800) headings, a slightly
   different ink/line/page grey and a different link blue (--blue, folded into --brand-blue here since that is the variable engine-g.css's
   generated .gbody a rule actually reads) - gen_engine_css.py never picked up that whole "screen" media block, so it is repeated here by hand.
   .gdoc .gbody (higher specificity than engine-g.css's bare .gbody, so it wins regardless of load order) carries the same correction into the
   outcome/application content inside a card. */
.g-tbig, .g-ogrid, .g-card, .gdoc .gbody {
  --ink: #1c2733; --muted: #566474; --line: #dbe5f0; --paper: #fff; --page: #f5f7fa; --cream: #faf6ef;
  --sans: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: var(--sans);
  --brand-blue: #1f5fab;
  --blue: #1f5fab;
  --radius: 12px;
  --st-full-bg: #e1f3e6; --st-full-fg: #17602f;
  --st-partial-bg: #fdf0d3; --st-partial-fg: #7a4a00;
  --st-support-bg: #e4edf6; --st-support-fg: #2c4a6b;
  --st-none-bg: #eceff2; --st-none-fg: #4f5b68;
}
.gdoc .gbody h1, .gdoc .gbody h2, .gdoc .gbody h3, .gdoc .gbody h4 { font-family: var(--sans); font-weight: 800; letter-spacing: 0; }
/* .gbody resets every <ul>/<ol> to padding:0/list-style:none (engine-g.css); .g-ogrid and .g-tchips sit outside it, so the browser's own
   40px bullet-indent padding was still there, unnoticed under grid/flex display until the gutter fix above made it visible as a left gap. */
.g-ogrid, .g-tchips { padding: 0; list-style: none; }
.golist .g-ogrid { margin-top: 4px; }
.godetail { display: none; scroll-margin-top: 90px; }
.godetail:target { display: block; }
.golist:has(.godetail:target) > .g-ogrid, .golist:has(.godetail:target) > h2 { display: none; }
.gback { display: inline-block; margin-bottom: 14px; font-weight: 800; color: var(--acc, #1f5fab); text-decoration: none; }
.gback:hover { text-decoration: underline; }
.gotext { flex: 1 1 16rem; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
.gpn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.gpn a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.gpn a:hover { border-color: var(--primary); }
.gpn-next { text-align: right; } .gpn-home { text-align: center; }
.gpn-dir { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.gpn-t { font-size: 15px; font-weight: 800; color: var(--teal); }
.gpn-single { grid-template-columns: minmax(0, 1fr); }
/* the pieces of a card, from the built guide (class names with the prefix g-): GENERATED, not hand-written here any more (lane
   GUIDECSS1, 2026-11-15) - see /assets/guide/engine-g.css (linked by guide_theme.php, the only view that renders .gbody content) and
   redesign/plan/guide-css-unification.md for exactly what moved there and why, and for the few things below that stay here on purpose:
     - the accordion/<details> styling (.gbody details.../.g-ax/.g-persub > li below): guides_split.php's gs_inner() turns every
       accordion item into a native <details>/<summary>, a different box model from the standalone guide's own CSS-grid + JS accordion,
       so there is no shared CSS to generate - this one is only ever hand-written.
     - .gmeta .gpart (very bottom): the portal's own "part N of M" label, not guide engine CSS at all.
     - .g-bl.g-nap below: a sub-item with no application stays a plain <li> (gs_inner() only turns an item WITH an application into a
       <details>), so it never gets the generated .gbody details {...} box - this gives it the same box by hand (ACC_CSS's own .nap rule,
       ported here since gen_engine_css.py does not generate accordion CSS either, see above).
     - the picture of an application (.g-ap): guides_pages.php adds <img class="g-ap"> as the FIRST child of a .g-app row when it is
       served, the guide engine never emits it, so the generated column layout has no column for it - the rules below add one.
   engine-g.css is linked AFTER this file, so every rule here that must win over a generated one starts with .gbody. */
.gbody .g-subs.g-persub li.g-bl.g-nap { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); gap: 4px 10px; align-items: start; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfd; }
.gbody .g-subs.g-persub li.g-nap > span { font-weight: 500; }
.gbody .g-subs.g-persub li.g-nap .g-sbnone { margin: 0; padding: 0; border: 0; background: none; font-weight: 600; }
.gbody details { border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.gbody details > summary { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px 10px; padding: 10px 12px; cursor: pointer; font-size: 15px; font-weight: 600; line-height: 1.4; list-style: none; }
.gbody .g-gen > details > summary { font-weight: 700; }
.gbody details > summary::-webkit-details-marker { display: none; }
.gbody details > summary > * { flex: none; }
.gbody details > summary > .g-axt, .gbody details > summary > .g-dzt { flex: 1 1 auto; min-width: 0; }
.gbody details > summary > .g-cbadge { margin-left: auto; }
.gbody details > summary::after, .golist details > summary::after { content: ""; flex: none; width: 18px; height: 18px; margin: 2px 0 0 2px; background: var(--acc, #1f5fab); transition: transform .2s ease;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.gbody details[open] > summary::after, .golist details[open] > summary::after { transform: rotate(180deg); }
.gbody details[open] > summary { padding-bottom: 12px; background: var(--tint, #f4f7fb); border-radius: 10px 10px 0 0; }
.gbody .g-go::after { content: ""; flex: none; display: inline-block; width: 12px; height: 12px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11L11 5M6 5h5v5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 11L11 5M6 5h5v5'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (prefers-reduced-motion: reduce) { .gbody details > summary::after { transition: none; } }
.gbody details > summary:hover { background: var(--tint, #f4f7fb); }
/* .gdoc added to each selector only to outrank engine-g.css's .g-subs.g-persub .g-sapps { margin: 0 0 4px } (3 classes, so it otherwise beats
   this rule's 2 classes + 1 tag regardless of load order) - a per_sub outcome's application list was flush against its doelzin block's edges. */
.gdoc .gbody details > .g-applist, .gdoc .gbody details > .g-axs, .gdoc .gbody details > details, .gdoc .gbody details > p { margin: 12px 12px; }
/* each outcome's own "Previous topic"/"Next topic" nav (engine screen.css .pn/.pn-prev/.pn-next/...), portal-only concept (build_guide.py's own
   #/<id> links do not map onto the portal's split pages, so guide_theme.php rebuilds the href itself) - the look copied verbatim. */
.g-pn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.g-pn a { display: grid; gap: 4px; align-content: start; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-decoration: none; transition: border-color .14s, box-shadow .14s; }
.g-pn a:hover, .g-pn a:focus-visible { border-color: var(--blue); box-shadow: 0 2px 12px rgba(20, 40, 60, .10); }
.g-pn-next { text-align: right; grid-column: 2; }
.g-pn-dir { display: flex; align-items: center; gap: 8px; color: var(--blue); font: 800 13.5px/1.3 var(--sans); }
.g-pn-next .g-pn-dir { justify-content: flex-end; }
.g-pn-dir svg { width: 18px; height: 18px; }
.g-pn-code { font: 800 16px/1.3 var(--sans); }
.g-pn-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font: 600 13.5px/1.45 var(--sans); }
.g-pn-gap { display: none; }
.g-ax { list-style: none; }
.gbody .g-persub > li { display: block; }
.gbody .g-ap { width: 74px; height: auto; aspect-ratio: 404 / 251; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.gbody .g-app:has(> .g-ap) { grid-template-columns: 74px 7.8rem minmax(0, 1fr) auto auto; }
.gbody .g-app.g-app-s:has(> .g-ap), .gbody .g-app.g-app-c:has(> .g-ap) { grid-template-columns: 74px minmax(0, 1fr) auto; }
@media (max-width: 760px) {
  .gbody .g-app:has(> .g-ap) { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "p r r" "p m g"; }
  .gbody .g-app > .g-ap { grid-area: p; width: 56px; align-self: start; }
  /* the covered sub-items ("a · d · e ...") on a row of their own: with the role chip in one cell they overlapped it, and a long list, never wrapped, made the page scroll sideways */
  .gbody .g-app:has(> .g-letters) { grid-template-areas: "r r" "m g" "l l"; }
  .gbody .g-app:has(> .g-ap):has(> .g-letters) { grid-template-areas: "p r r" "p m g" "p l l"; }
  .gbody .g-app > .g-letters { grid-area: l; justify-self: start; white-space: normal; }
  .gbody .g-pill { flex-wrap: wrap; } .gbody .g-pill .g-letters { white-space: normal; }
  /* the compact rows (no role chip) place nothing by name: the generated rules give the sub-bullet row (app-s) that, the compact row (app-c) not */
  .gbody .g-app.g-app-s, .gbody .g-app.g-app-c { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: none; }
  .gbody .g-app.g-app-s:has(> .g-ap), .gbody .g-app.g-app-c:has(> .g-ap) { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .gbody .g-app.g-app-s > *, .gbody .g-app.g-app-c > * { grid-area: auto; }
}
@media (max-width: 760px) {
  .gbody .g-subs.g-persub li.g-bl.g-nap { padding: 10px 12px; }
  .gdoc { padding: 0 0 44px; }
  .ghero { padding: 20px 16px 18px; border-radius: 12px; } .ghero h1 { font-size: 26px; }
  .gopen { grid-template-columns: 1fr; padding: 16px; } .gopen h1 { font-size: 24px; }
  .gframe { padding: 14px 14px; }
  .gpn { grid-template-columns: 1fr; } .gpn-next, .gpn-home { text-align: left; }
}
.gmeta .gpart { background: var(--acc, #1971C2); border-color: var(--acc, #1971C2); color: #fff; }

/* the Topics link of the top bar with its submenu (nav_topics in layout.php): opens on hover or keyboard focus; on small screens the links are listed in the opened menu */
.nav-sub { position: relative; display: flex; align-items: center; }
.nav-sub > a { color: var(--teal); text-decoration: none; font-weight: 700; font-size: 17px; padding: 8px; white-space: nowrap; border-bottom: 2px solid transparent; }
.nav-sub > a:hover { color: var(--green); }
.nav-sub > a[aria-current] { border-bottom-color: var(--green); }
.nav-sub .sub-menu { display: none; top: 100%; left: 0; min-width: 200px; }
.nav-sub .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-sub:hover .sub-menu, .nav-sub:focus-within .sub-menu { display: flex; }
.nav-sub .sub-menu a { font-weight: 500; }
@media (max-width: 991px) {
  .nav-sub { display: block; }
  .nav-sub > a { display: block; padding: 11px 8px; border-bottom: 0; }
  .nav-sub > a[aria-current] { background: var(--active); border-radius: 8px; }
  .nav-sub .sub-menu, .nav-sub:hover .sub-menu { display: flex; position: static; min-width: 0; border: 0; box-shadow: none; padding: 0 0 4px 18px; background: none; }
  .nav-sub .sub-menu::before { display: none; }
  .nav-sub .sub-menu a { padding: 8px; font-size: 16px; }
}
