/* BioCardia portal: the same colours and fonts as dr-mibrahim.com (see the theme's biocardia.css). */

/* Dark is the default; light follows the device's setting, or the person's own choice
   (html[data-theme], set by the sun/moon button and remembered on the device). */
:root {
	--bc-ink: #070913;
	--bc-surface: #0E1122;
	--bc-card: #151933;
	--bc-line: #292B4D;
	--bc-text: #F1F5F9;
	--bc-text-2: #CBD5E1;
	--bc-muted: #94A3B8;
	--bc-accent: #EF4444;
	--bc-accent-dark: #B91C1C;
	--bc-good: #22C55E;
	--bc-violet: #A855F7;
	--bc-tint-1: rgba(255, 255, 255, .03);
	--bc-tint-2: rgba(255, 255, 255, .06);
	--bc-tint-3: rgba(255, 255, 255, .09);
	--bc-header: linear-gradient(90deg, #1f0d14, #0b0d1a 40%);
	--bc-tip: #1E2242;
	--bc-next-bg: rgba(7, 9, 19, .55);
	--bc-red-soft: #FCA5A5;
	--bc-red-text: #F87171;
	--bc-green-text: #4ADE80;
	--bc-yellow-text: #FACC15;
	--bc-sky-text: #7DD3FC;
	--bc-blue-text: #93C5FD;
	--bc-shadow: 0 10px 28px rgba(0, 0, 0, .35);
	--bc-scroll: rgba(148, 163, 184, .28);
	--bc-scroll-hover: rgba(148, 163, 184, .5);
	--bc-scheme: dark;
}
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) {
	--bc-ink: #F4F5FA;
		--bc-surface: #FFFFFF;
		--bc-card: #FFFFFF;
		--bc-line: #E2E5EF;
		--bc-text: #0F172A;
		--bc-text-2: #334155;
		--bc-muted: #5B6476;
		--bc-accent: #E5383B;
		--bc-accent-dark: #B91C1C;
		--bc-tint-1: rgba(15, 23, 42, .03);
		--bc-tint-2: rgba(15, 23, 42, .055);
		--bc-tint-3: rgba(15, 23, 42, .085);
		--bc-header: linear-gradient(90deg, #FDEAEA, #FFFFFF 42%);
		--bc-tip: #FFFFFF;
		--bc-next-bg: rgba(255, 255, 255, .85);
		--bc-red-soft: #B91C1C;
		--bc-red-text: #DC2626;
		--bc-green-text: #15803D;
		--bc-yellow-text: #A16207;
		--bc-sky-text: #0369A1;
		--bc-blue-text: #1D4ED8;
		--bc-shadow: 0 10px 28px rgba(15, 23, 42, .08);
		--bc-scroll: rgba(15, 23, 42, .2);
		--bc-scroll-hover: rgba(15, 23, 42, .36);
		--bc-scheme: light;
	}
}
:root[data-theme="light"] {
	--bc-ink: #F4F5FA;
	--bc-surface: #FFFFFF;
	--bc-card: #FFFFFF;
	--bc-line: #E2E5EF;
	--bc-text: #0F172A;
	--bc-text-2: #334155;
	--bc-muted: #5B6476;
	--bc-accent: #E5383B;
	--bc-accent-dark: #B91C1C;
	--bc-tint-1: rgba(15, 23, 42, .03);
	--bc-tint-2: rgba(15, 23, 42, .055);
	--bc-tint-3: rgba(15, 23, 42, .085);
	--bc-header: linear-gradient(90deg, #FDEAEA, #FFFFFF 42%);
	--bc-tip: #FFFFFF;
	--bc-next-bg: rgba(255, 255, 255, .85);
	--bc-red-soft: #B91C1C;
	--bc-red-text: #DC2626;
	--bc-green-text: #15803D;
	--bc-yellow-text: #A16207;
	--bc-sky-text: #0369A1;
	--bc-blue-text: #1D4ED8;
	--bc-shadow: 0 10px 28px rgba(15, 23, 42, .08);
	--bc-scroll: rgba(15, 23, 42, .2);
	--bc-scroll-hover: rgba(15, 23, 42, .36);
	--bc-scheme: light;
}
html { color-scheme: var(--bc-scheme); }

*, *::before, *::after { box-sizing: border-box; }

body.bc-portal {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: radial-gradient(1200px 600px at 50% -200px, rgba(239, 68, 68, .14), transparent 60%), var(--bc-ink);
	color: var(--bc-text);
	font: 16px/1.55 'Plus Jakarta Sans', system-ui, sans-serif;
}

a { color: var(--bc-text); }

.bc-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px clamp(16px, 4vw, 40px);
	border-bottom: 1px solid var(--bc-line);
	background: var(--bc-header);
}
.bc-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 18px Outfit, sans-serif; }
.bc-brand img { border-radius: 8px; }
.bc-brand em { font-style: normal; font-weight: 500; color: var(--bc-muted); }
.bc-user { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.bc-user span { color: var(--bc-muted); }
.bc-user a { text-decoration: none; font-weight: 600; }
.bc-user a:hover { color: var(--bc-accent); }

.bc-main { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: clamp(24px, 6vw, 64px) 16px; }
.bc-main--wide { max-width: 1240px; }

.bc-card {
	background: var(--bc-card);
	border: 1px solid var(--bc-line);
	border-radius: 20px;
	padding: clamp(20px, 5vw, 36px);
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.bc-card h1 { font: 700 clamp(24px, 4vw, 30px)/1.2 Outfit, sans-serif; margin: 0 0 12px; }
.bc-card p { margin: 0 0 14px; color: var(--bc-text-2); }

.bc-card-logo {
	display: block;
	width: 96px;
	height: 96px;
	margin: 0 auto 20px;
	border-radius: 50%;
	box-shadow: 0 0 0 4px var(--bc-card), 0 0 0 6px rgba(239, 68, 68, .45), 0 12px 32px rgba(0, 0, 0, .4);
}
.bc-card--centred > .bc-eyebrow, .bc-card--centred > h1 { text-align: center; }

.bc-pass { position: relative; }
.bc-pass input { padding-right: 48px !important; }
.bc-eye {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--bc-muted);
	cursor: pointer;
}
.bc-eye:hover, .bc-eye:focus-visible { color: var(--bc-text); background: var(--bc-tint-2); outline: none; }

.bc-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--bc-accent); margin: 0 0 8px; }

.bc-form { display: grid; gap: 16px; margin: 20px 0 8px; }
.bc-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.bc-form input[type="text"], .bc-form input:not([type]), .bc-form input[type="email"], .bc-form input[type="password"] {
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	color: var(--bc-text);
	background: var(--bc-surface);
	border: 1px solid var(--bc-line);
	border-radius: 12px;
}
.bc-form input:focus { outline: 2px solid var(--bc-accent); outline-offset: 1px; border-color: transparent; }
.bc-form .bc-check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--bc-muted); }
.bc-hint { font-size: 13px; color: var(--bc-muted) !important; margin: -6px 0 0 !important; }

.bc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 13px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--bc-accent);
	color: #fff;
	font: 700 16px 'Plus Jakarta Sans', sans-serif;
	text-decoration: none;
	cursor: pointer;
}
.bc-btn:hover { background: var(--bc-accent-dark); }

.bc-links { margin-top: 16px !important; font-size: 14px; }
.bc-links a { color: var(--bc-muted); }
.bc-links a:hover { color: var(--bc-text); }

.bc-notice { margin: 16px 0; padding: 12px 14px; border-radius: 12px; font-size: 14px; font-weight: 500; }
.bc-notice--good { background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .4); }
.bc-notice--bad { background: rgba(239, 68, 68, .12); border: 1px solid rgba(239, 68, 68, .45); }

/* ---------- Teacher dashboard ---------- */

.bc-dash { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.bc-side { display: grid; gap: 4px; position: sticky; top: 16px; }
.bc-side a { padding: 10px 14px; border-radius: 12px; text-decoration: none; font-weight: 600; color: var(--bc-text-2); }
.bc-side a:hover { background: var(--bc-tint-2); color: var(--bc-text); }
.bc-side a[aria-current="page"] { background: rgba(239, 68, 68, .14); color: var(--bc-text); box-shadow: inset 3px 0 0 var(--bc-accent); }
.bc-dash-main { min-width: 0; }
.bc-side a.bc-side-sub { padding: 7px 14px 7px 28px; font-size: 14px; font-weight: 500; color: var(--bc-muted); }
.bc-side a.bc-side-sub em { font-style: normal; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.bc-crumb { display: block; width: fit-content; margin: 0 0 12px; color: var(--bc-muted) !important; text-decoration: none; font-size: 14px; }
.bc-crumb:hover { color: var(--bc-text) !important; }

.bc-unit { margin: 0 0 16px; padding: 16px; border: 1px solid var(--bc-line); border-radius: 16px; background: var(--bc-surface); }
.bc-unit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 12px; }
.bc-unit-head .bc-input:not(.bc-input--small) { width: 260px; font-weight: 700; }
.bc-unit-delete { margin-top: 10px; }
.bc-grow { flex: 1; }
.bc-section-title { font-weight: 700; }
.bc-grip { cursor: grab; user-select: none; color: var(--bc-muted); font-size: 18px; line-height: 1; padding: 6px 4px; touch-action: none; }
.bc-grip:active { cursor: grabbing; }
.bc-classes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bc-class { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--bc-line); border-radius: 12px; background: var(--bc-card); }
.bc-class-name { flex: 1 1 260px; font-weight: 700; text-decoration: none; }
.bc-class-name:hover { color: var(--bc-accent); }
.bc-class-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--bc-muted); }
.bc-drag-ghost { opacity: .4; border-style: dashed; }
.bc-saving { opacity: .6; pointer-events: none; }
.bc-schedule .bc-inline-form { margin: 0 0 8px; }
.bc-admin-page input[type="time"] { padding: 9px 10px; font: inherit; color: var(--bc-text); background: var(--bc-surface); border: 1px solid var(--bc-line); border-radius: 10px; color-scheme: var(--bc-scheme); }

/* ---------- Student pages ---------- */

.bc-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 20px; }
.bc-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--bc-line); text-decoration: none; font-weight: 600; font-size: 14px; color: var(--bc-text-2); }
.bc-tabs a[aria-current="page"] { background: var(--bc-accent); border-color: var(--bc-accent); color: #fff; }
.bc-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 8px 0 24px; }
.bc-panel { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--bc-line); background: var(--bc-surface); }
.bc-panel h2 { font: 700 15px Outfit, sans-serif; margin: 0 0 10px; color: var(--bc-accent); text-transform: uppercase; letter-spacing: .08em; }
.bc-times { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.bc-student-section { margin: 0 0 12px; border: 1px solid var(--bc-line); border-radius: 16px; background: var(--bc-surface); }
.bc-student-section > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; font: 700 17px Outfit, sans-serif; list-style: none; }
.bc-student-section > summary::-webkit-details-marker { display: none; }
.bc-student-section > summary::after { content: '▾'; color: var(--bc-muted); transition: transform .2s; }
.bc-student-section[open] > summary::after { transform: rotate(180deg); }
.bc-student-section > summary .bc-hint { margin: 0 0 0 auto; font: 500 13px 'Plus Jakarta Sans', sans-serif; }
.bc-student-section .bc-classes { padding: 0 12px 12px; }
.bc-locked { color: var(--bc-muted); }

.bc-player { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 220px; border-radius: 14px; overflow: hidden; background: #000; margin: 8px 0 8px; }
.bc-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bc-player-cover { position: absolute; top: 0; right: 0; width: 72px; height: 64px; z-index: 2; }
.bc-player-mark { position: absolute; z-index: 3; pointer-events: none; color: rgba(255, 255, 255, .45); font: 600 clamp(12px, 2vw, 18px) 'Plus Jakarta Sans', sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); transition: left 1.2s ease, top 1.2s ease; white-space: nowrap; }
.bc-player-full { position: absolute; z-index: 4; left: 10px; top: 10px; opacity: .85; }
.bc-player:fullscreen { border-radius: 0; aspect-ratio: auto; }
.bc-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bc-note { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-surface); text-decoration: none; }
.bc-note:hover { border-color: rgba(239, 68, 68, .5); }
.bc-note-icon { font-size: 24px; }
.bc-profile th { width: 140px; color: var(--bc-muted); font-weight: 600; }

/* ---------- Flipbook ---------- */

.bc-book-title { font: 700 clamp(22px, 3.5vw, 28px)/1.2 Outfit, sans-serif; margin: 0 0 16px; }
.bc-book { user-select: none; -webkit-user-select: none; }
.bc-book-pages { width: 100%; max-width: 1000px; margin: 0 auto; }
.bc-book-status { text-align: center; color: var(--bc-muted) !important; padding: 48px 0; }
.bc-book-status--bad { color: var(--bc-red-text) !important; }
.bc-book-bar { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 16px 0 0; color: var(--bc-muted); font-size: 14px; }
.bc-book-bar[hidden] { display: none; }
.bc-book-bar { flex-wrap: wrap; }
.bc-book-gap { flex: 0 0 12px; }
.bc-book-pages { transition: opacity .3s ease, transform .3s ease; }
.bc-book-pages.bc-fading { opacity: 0; transform: scale(.98); }
.bc-book-pages--single { max-width: 580px; }

/* Zoom & write: the page fills the screen, the controls float over it. */
body.bc-ink-open { overflow: hidden; }
.bc-ink { position: fixed; inset: 0; z-index: 9999; background: var(--bc-ink); animation: bc-ink-in .2s ease; --ink-top: 116px; --ink-bottom: 112px; }
@keyframes bc-ink-in { from { opacity: 0; transform: scale(.98); } }
.bc-ink-stage { position: absolute; inset: 0; overflow: auto; display: grid; place-items: start center; padding: var(--ink-top) 12px var(--ink-bottom); }
.bc-ink-sheet { position: relative; margin: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); background: #fff; }
.bc-ink-sheet canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.bc-ink-pen { touch-action: none; }

.bc-ink-top, .bc-ink-bottom { position: absolute; left: 50%; transform: translateX(-50%); z-index: 3; display: grid; justify-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px); pointer-events: none; }
.bc-ink-top { top: 12px; }
.bc-ink-bottom { bottom: 14px; }
.bc-ink-pill { pointer-events: auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; padding: 6px; border-radius: 18px; background: rgba(14, 17, 34, .96); border: 1px solid var(--bc-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.bc-ink-pill--small { padding: 4px; border-radius: 14px; }
.bc-ink button { min-width: 36px; height: 36px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--bc-text); font: 600 13px "Plus Jakarta Sans", sans-serif; cursor: pointer; transition: background .15s; }
.bc-ink button:hover { background: var(--bc-tint-3); }
.bc-ink button.is-on { background: var(--bc-accent); color: #fff; }
.bc-ink-sep { width: 1px; height: 24px; margin: 0 4px; background: var(--bc-line); }
.bc-ink-colours { display: inline-flex; gap: 6px; padding: 0 4px; }
.bc-ink .bc-ink-colours button { min-width: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.bc-ink .bc-ink-colours button.is-on { background: var(--c); box-shadow: 0 0 0 2px var(--bc-surface), 0 0 0 4px #fff; }
.bc-ink-page, .bc-ink-zoom { min-width: 84px; text-align: center; font-size: 13px; font-weight: 600; color: var(--bc-text); }
.bc-ink-hint { padding: 0 8px; font-size: 12px; color: var(--bc-muted); }
.bc-ink-hint[hidden] { display: none; }
.bc-ink-corner { position: absolute; top: 12px; right: 12px; z-index: 4; display: flex; align-items: center; gap: 10px; }
.bc-ink-saved { font-size: 12px; color: var(--bc-muted); }
.bc-ink .bc-ink-close { background: var(--bc-accent); color: #fff; padding: 0 20px; box-shadow: 0 8px 20px rgba(239, 68, 68, .35); }
.bc-ink .bc-ink-close:hover { background: var(--bc-accent-dark); }
@media (max-width: 760px) { .bc-ink-top { top: 60px; } .bc-ink-saved { display: none; } .bc-ink-label { display: none; } .bc-ink button { padding: 0 10px; } }
.bc-table--flat { border-radius: 12px; }

.bc-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(148, 163, 184, .15); color: var(--bc-text-2); white-space: nowrap; }
.bc-badge--good { background: rgba(34, 197, 94, .15); color: var(--bc-green-text); }
.bc-badge--warn { background: rgba(234, 179, 8, .15); color: var(--bc-yellow-text); }
.bc-admin-page input[type="datetime-local"], .bc-admin-page input[type="url"] { padding: 10px 12px; font: inherit; font-size: 15px; color: var(--bc-text); background: var(--bc-surface); border: 1px solid var(--bc-line); border-radius: 10px; color-scheme: var(--bc-scheme); max-width: 100%; }
.bc-admin-page input[type="file"] { color: var(--bc-muted); font-size: 14px; }

.bc-admin-page h1 { font: 700 clamp(24px, 4vw, 30px)/1.2 Outfit, sans-serif; margin: 0 0 16px; display: inline-block; margin-right: 12px; }
.bc-admin-page h2 { font: 600 20px/1.3 Outfit, sans-serif; margin: 32px 0 12px; }
.bc-admin-page h3 { font: 600 16px Outfit, sans-serif; margin: 8px 0 0; color: var(--bc-accent); text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.bc-admin-page p { color: var(--bc-text-2); }
.bc-hint { color: var(--bc-muted) !important; font-size: 13px; margin: 6px 0 0; }
.bc-text-bad { color: var(--bc-red-text); }

.bc-input, .bc-admin-page select, .bc-admin-page textarea, .bc-admin-page input[type="number"], .bc-admin-page input[type="date"], .bc-admin-page input[type="text"], .bc-admin-page input[type="email"], .bc-admin-page input:not([type]) {
	padding: 10px 12px;
	font: inherit;
	font-size: 15px;
	color: var(--bc-text);
	background: var(--bc-surface);
	border: 1px solid var(--bc-line);
	border-radius: 10px;
	max-width: 100%;
	color-scheme: var(--bc-scheme);
}
.bc-input { width: 340px; }
.bc-input--small { width: 90px; }
.bc-admin-page textarea { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.bc-admin-page input:focus, .bc-admin-page select:focus, .bc-admin-page textarea:focus { outline: 2px solid var(--bc-accent); outline-offset: 1px; }

.bc-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--bc-line); border-radius: 14px; overflow: hidden; font-size: 14px; }
.bc-table th, .bc-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--bc-line); }
.bc-table thead th { background: var(--bc-surface); color: var(--bc-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.bc-table tbody tr:last-child td, .bc-table tbody tr:last-child th { border-bottom: 0; }
.bc-table tbody tr:hover { background: var(--bc-tint-1); }
.bc-table a { color: var(--bc-text); }
.bc-table code { background: var(--bc-surface); padding: 2px 6px; border-radius: 6px; }
.bc-actions { width: 1%; }
.bc-actions form { display: block !important; margin: 0 0 6px; }
.bc-actions .bc-btn { width: 100%; white-space: nowrap; }

.bc-fields { width: 100%; border-collapse: collapse; }
.bc-fields th { width: 210px; padding: 12px 16px 12px 0; text-align: left; vertical-align: top; font-size: 14px; font-weight: 600; }
.bc-fields td { padding: 8px 0; }

.bc-details { background: var(--bc-surface); border: 1px solid var(--bc-line); border-radius: 16px; padding: 4px 20px; margin: 16px 0; }
.bc-details summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--bc-text); }

.bc-btn--small { padding: 7px 14px; font-size: 13px; }
.bc-btn--ghost { background: transparent; border: 1px solid var(--bc-line); color: var(--bc-text); }
.bc-btn--ghost:hover { background: var(--bc-tint-2); }
.bc-btn--danger { background: transparent; border: 1px solid rgba(239, 68, 68, .5); color: var(--bc-red-text); }
.bc-btn--danger:hover { background: rgba(239, 68, 68, .15); }
.bc-notice p { margin: 0; color: inherit !important; }
.bc-notice--warn { background: rgba(234, 179, 8, .1); border: 1px solid rgba(234, 179, 8, .45); }
.bc-notice--info { background: rgba(168, 85, 247, .1); border: 1px solid rgba(168, 85, 247, .4); }

.bc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 8px; }
.bc-tile { display: grid; gap: 4px; padding: 18px; border-radius: 16px; background: var(--bc-surface); border: 1px solid var(--bc-line); text-decoration: none; }
.bc-tile strong { font: 800 32px/1 Outfit, sans-serif; }
.bc-tile span { color: var(--bc-muted); font-size: 14px; }
.bc-tile:hover { border-color: rgba(239, 68, 68, .5); }
.bc-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.bc-viewas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin: 0 0 20px; padding: 12px 16px; border-radius: 12px; background: var(--bc-accent-dark); color: #fff; font-size: 14px; }
.bc-viewas .bc-btn { background: #fff; color: var(--bc-accent-dark); }

@media (max-width: 800px) {
	.bc-dash { grid-template-columns: 1fr; gap: 16px; }
	.bc-side { position: static; display: flex; overflow-x: auto; }
	.bc-side a { white-space: nowrap; }
	.bc-fields th, .bc-fields td { display: block; width: auto; padding: 4px 0; }
	.bc-input { width: 100%; }
	.bc-table { display: block; overflow-x: auto; }
}

.bc-foot { padding: 20px; text-align: center; font-size: 13px; color: var(--bc-muted); }
.bc-foot a { color: var(--bc-muted); }

@media (max-width: 560px) {
	.bc-brand em { display: none; }
	.bc-user span { display: none; }
}

/* =====================================================================
   0.10: richer look — categories, avatars, student home, 12-hour boxes
   ===================================================================== */

/* Category colours: Explanation red, Solving violet, Revision amber. */
.bc-cat { --cat: var(--bc-accent); --cat-soft: rgba(239, 68, 68, .14); }
.bc-cat--solving { --cat: #A855F7; --cat-soft: rgba(168, 85, 247, .16); }
.bc-cat--revision { --cat: #F59E0B; --cat-soft: rgba(245, 158, 11, .16); }

/* Overall polish */
.bc-top { background: var(--bc-header); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 50; }
.bc-card { background: linear-gradient(180deg, var(--bc-tint-1), transparent 220px), var(--bc-card); }
.bc-btn { transition: transform .15s ease, background .15s ease, box-shadow .15s ease; box-shadow: 0 6px 18px rgba(239, 68, 68, .25); }
.bc-btn:hover { transform: translateY(-1px); }
.bc-btn--ghost, .bc-btn--danger { box-shadow: none; }
.bc-user-me { display: inline-flex; align-items: center; gap: 8px; color: var(--bc-muted); }
.bc-person { display: inline-flex; align-items: center; gap: 10px; }

/* Avatars */
.bc-avatar { display: inline-grid; place-items: center; flex: none; border-radius: 50%; object-fit: cover; color: #fff; font-family: Outfit, sans-serif; font-weight: 700; box-shadow: 0 0 0 2px var(--bc-tint-3); }

/* Student home: welcome banner */
.bc-hero { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 22px; margin: 0 0 22px; border-radius: 20px; overflow: hidden;
	background: radial-gradient(500px 220px at 0% 0%, rgba(239, 68, 68, .28), transparent 70%), radial-gradient(420px 220px at 100% 100%, rgba(168, 85, 247, .22), transparent 70%), var(--bc-surface);
	border: 1px solid var(--bc-line); }
.bc-hero h1 { margin: 0; }
.bc-hero-photo { box-shadow: 0 0 0 3px var(--bc-surface), 0 0 0 5px rgba(239, 68, 68, .6); }
.bc-hero-text { flex: 1 1 200px; }
.bc-hero-course { margin: 4px 0 0 !important; color: var(--bc-muted) !important; }
.bc-next { display: grid; gap: 2px; padding: 14px 18px; border-radius: 16px; background: var(--bc-next-bg); border: 1px solid rgba(239, 68, 68, .45); min-width: 210px; }
.bc-next-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bc-accent); }
.bc-next strong { font: 700 20px Outfit, sans-serif; }
.bc-next-in { color: var(--bc-red-soft); font-weight: 600; font-size: 14px; }
.bc-next.is-live { border-color: var(--bc-good); }
.bc-next.is-live .bc-next-in { color: var(--bc-green-text); }
.bc-next.is-live .bc-next-in::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #22C55E; animation: bc-pulse 1.4s infinite; }
@keyframes bc-pulse { 50% { opacity: .3; } }

.bc-block { margin: 0 0 22px; }
.bc-block-title { display: flex; align-items: center; gap: 8px; font: 700 18px Outfit, sans-serif; margin: 0 0 12px; }

/* Weekly timetable */
.bc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.bc-day { position: relative; display: grid; align-content: start; gap: 6px; min-height: 92px; padding: 12px 8px; border-radius: 14px; text-align: center; background: var(--bc-surface); border: 1px solid var(--bc-line); color: var(--bc-muted); }
.bc-day-name { font: 700 13px Outfit, sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.bc-day--on { background: linear-gradient(180deg, rgba(239, 68, 68, .22), rgba(239, 68, 68, .06)); border-color: rgba(239, 68, 68, .55); color: var(--bc-text); }
.bc-day--on .bc-day-name { color: var(--bc-red-soft); }
.bc-day-time { font: 700 15px Outfit, sans-serif; line-height: 1.2; }
.bc-day-time small { display: block; font: 500 11px "Plus Jakarta Sans", sans-serif; color: var(--bc-muted); }
.bc-day-off { opacity: .4; }
.bc-day--today { box-shadow: 0 0 0 2px var(--bc-text) inset; }
.bc-week + .bc-hint { margin: 14px 0 0 !important; padding: 10px 14px; border-radius: 12px; background: rgba(148, 163, 184, .08); font-size: 14px; color: var(--bc-text-2) !important; }
.bc-day-flag { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: var(--bc-text); color: var(--bc-ink); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

/* Coming up */
.bc-dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.bc-date-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: var(--bc-surface); border: 1px solid var(--bc-line); border-left: 4px solid var(--cat); }
.bc-date-tile { display: grid; place-items: center; width: 54px; height: 58px; flex: none; border-radius: 12px; background: var(--cat-soft); color: var(--cat); font-size: 12px; font-weight: 700; text-transform: uppercase; line-height: 1; }
.bc-date-tile b { font: 800 24px Outfit, sans-serif; }

/* Sections and class cards */
.bc-student-section { border-radius: 18px; background: var(--bc-surface); }
.bc-student-section > summary { font-size: 18px; }
.bc-student-section.bc-cat > summary { border-left: 4px solid var(--cat); border-radius: 18px 0 0 18px; }
.bc-count { margin-left: auto; min-width: 28px; padding: 2px 9px; border-radius: 999px; background: var(--bc-tint-3); font: 700 13px "Plus Jakarta Sans", sans-serif; text-align: center; color: var(--bc-muted); }
.bc-cards { list-style: none; margin: 0; padding: 0 12px 14px; display: grid; gap: 8px; }
.bc-class-card { border-radius: 14px; background: var(--bc-card); border: 1px solid var(--bc-line); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.bc-class-card:not(.is-locked):hover { transform: translateY(-2px); border-color: var(--cat); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.bc-card-link { display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-decoration: none; color: inherit; }
.bc-card-num { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--cat-soft); color: var(--cat); font: 800 18px Outfit, sans-serif; }
.bc-card-num--big { width: 64px; height: 64px; font-size: 28px; border-radius: 18px; }
.bc-card-body { display: grid; gap: 6px; flex: 1; min-width: 0; }
.bc-card-title { font-weight: 700; font-size: 16px; }
.bc-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-card-go { font-size: 22px; color: var(--bc-muted); }
.is-locked { opacity: .65; }
.bc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--cat-soft, rgba(148, 163, 184, .15)); color: var(--cat, var(--bc-text-2)); }
.bc-chip--plain { background: rgba(148, 163, 184, .12); color: var(--bc-text-2); }
.bc-chip--good { background: rgba(34, 197, 94, .15); color: var(--bc-green-text); }
.bc-chip--warn { background: rgba(234, 179, 8, .15); color: var(--bc-yellow-text); }

/* Class page */
.bc-class-head { display: flex; gap: 16px; align-items: center; margin: 0 0 18px; }
.bc-class-head h1 { margin: 8px 0 0; }
.bc-class-head .bc-chip { margin-right: 6px; }

/* Profile */
.bc-profile-card { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 20px; margin: 0 0 18px; border-radius: 18px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
.bc-photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 220px; }
.bc-photo-form .bc-hint { flex-basis: 100%; }
.bc-file { position: relative; overflow: hidden; cursor: pointer; }
.bc-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* 12-hour time boxes */
.bc-time12, .bc-datetime12 { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.bc-time12 b { color: var(--bc-muted); }
.bc-time12 select { padding: 8px 6px !important; }
.bc-admin-page input[type="date"] { padding: 9px 10px; font: inherit; color: var(--bc-text); background: var(--bc-surface); border: 1px solid var(--bc-line); border-radius: 10px; color-scheme: var(--bc-scheme); }

@media (max-width: 640px) {
	.bc-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.bc-day { min-height: 80px; }
	.bc-next { width: 100%; }
	.bc-hero { padding: 18px; }
}

/* =====================================================================
   0.11: centred menu, ? help, section navigator, chapters
   ===================================================================== */

/* Top bar: logo left, menu centred, me + log out right. */
.bc-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.bc-top .bc-brand { justify-self: start; }
.bc-top .bc-user { justify-self: end; }
.bc-menu { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bc-tint-1); border: 1px solid var(--bc-line); }
.bc-menu a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--bc-text-2); white-space: nowrap; transition: background .15s, color .15s; }
.bc-menu a:hover { background: var(--bc-tint-2); color: var(--bc-text); }
.bc-menu a[aria-current="page"] { background: var(--bc-accent); color: #fff; box-shadow: 0 6px 16px rgba(239, 68, 68, .3); }
.bc-user-me { text-decoration: none; padding: 4px 10px 4px 4px; border-radius: 999px; }
.bc-user-me:hover { background: var(--bc-tint-2); }
.bc-logout { font-size: 13px; }
@media (max-width: 960px) {
	.bc-top { grid-template-columns: 1fr auto; row-gap: 10px; }
	.bc-menu { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; border-radius: 16px; }
	.bc-menu a { padding: 8px 12px; }
}
@media (max-width: 560px) { .bc-user-me span { display: none; } }

/* "?" help: hover, focus or tap shows the explanation. */
.bc-help { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; background: rgba(148, 163, 184, .2); color: var(--bc-text-2); font: 700 11px "Plus Jakarta Sans", sans-serif; cursor: help; vertical-align: middle; }
.bc-help:hover, .bc-help:focus { background: var(--bc-accent); color: #fff; outline: none; }
.bc-help::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px); width: max-content; max-width: 280px; padding: 10px 12px; border-radius: 12px; background: var(--bc-tip); border: 1px solid var(--bc-line); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); color: var(--bc-text); font: 500 13px/1.45 "Plus Jakarta Sans", sans-serif; text-align: left; white-space: normal; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 60; }
.bc-help:hover::after, .bc-help:focus::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.bc-details > summary { cursor: pointer; font-weight: 700; padding: 12px 0; color: var(--bc-text); }
.bc-input--wide { width: 100%; max-width: 560px; }
.bc-input--mid { width: 200px; }
.bc-mono { font-family: ui-monospace, Consolas, monospace !important; }

/* Student home: section navigator on the left. */
.bc-learn { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.bc-learn-nav { position: sticky; top: 88px; display: grid; gap: 4px; padding: 10px; border-radius: 18px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
.bc-learn-nav a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--bc-text-2); }
.bc-learn-nav a:hover { background: var(--bc-tint-2); color: var(--bc-text); }
.bc-learn-nav a[aria-current] { background: rgba(239, 68, 68, .14); color: var(--bc-text); box-shadow: inset 3px 0 0 var(--bc-accent); }
.bc-learn-nav .bc-count { margin-left: auto; }
.bc-nav-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--cat, var(--bc-muted)); }
.bc-learn-main { min-width: 0; }
.bc-learn-main > * { scroll-margin-top: 90px; }
@media (max-width: 860px) {
	.bc-learn { grid-template-columns: 1fr; gap: 12px; }
	.bc-learn-nav { position: sticky; top: 112px; z-index: 20; display: flex; overflow-x: auto; padding: 6px; }
	.bc-learn-nav a { white-space: nowrap; }
}

/* Timetable and banner titles */
.bc-day-title { font-size: 11px; font-weight: 700; color: var(--bc-red-soft); line-height: 1.25; }
.bc-next-title { font: 700 18px Outfit, sans-serif; }
.bc-next-topic { font-weight: 700; color: var(--bc-text); }
.bc-next-when { color: var(--bc-muted); font-size: 14px; }
.bc-date-card { border-left-color: var(--bc-accent); }
.bc-date-card .bc-date-tile { background: rgba(239, 68, 68, .14); color: var(--bc-red-soft); }
.bc-date-card.is-next { border-color: rgba(239, 68, 68, .6); box-shadow: 0 8px 22px rgba(239, 68, 68, .15); }
.bc-date-topic { font-weight: 700; font-size: 14px; }

/* Class page: video, description, chapters */
.bc-class-layout { display: grid; gap: 22px; }
.bc-class-layout.has-chapters { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.bc-player #bc-yt, .bc-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bc-desc { margin: 18px 0; padding: 16px 18px; border-radius: 16px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
.bc-desc h2 { margin: 0 0 8px; font: 700 17px Outfit, sans-serif; }
.bc-desc p { margin: 0 0 10px; }
.bc-chapters { position: sticky; top: 88px; padding: 14px; border-radius: 16px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
.bc-chapters h2 { margin: 0 0 10px; font: 700 17px Outfit, sans-serif; }
.bc-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bc-chapters button, .bc-chapter-row { display: flex; gap: 10px; align-items: baseline; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--bc-text); font: 600 14px "Plus Jakarta Sans", sans-serif; text-align: left; }
.bc-chapters button { cursor: pointer; }
.bc-chapters button:hover { background: var(--bc-tint-2); }
.bc-chapters button.is-on { background: rgba(239, 68, 68, .14); }
.bc-chapter-time { flex: none; min-width: 52px; color: var(--bc-red-soft); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .bc-class-layout.has-chapters { grid-template-columns: 1fr; } .bc-chapters { position: static; } }

/* 0.11 — bulk class adder */
.bc-bulk-table { width: 100%; }
.bc-bulk-table td { padding: 6px 8px; vertical-align: middle; }
.bc-bulk-table .bc-input { width: 100%; box-sizing: border-box; }
.bc-bulk-table .bc-bulk-dur .bc-input { width: 80px; }
.bc-bulk-num { color: var(--bc-muted, #8a93a6); font-weight: 700; width: 32px; text-align: center; }
@media (max-width: 860px) {
	.bc-bulk-table thead { display: none; }
	.bc-bulk-table tr { display: grid; grid-template-columns: 32px 1fr 1fr; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--bc-line); }
	.bc-bulk-table td { padding: 0; }
	.bc-bulk-table td:nth-child(2), .bc-bulk-table td:nth-child(5) { grid-column: 2 / 4; }
	.bc-bulk-table td.bc-bulk-num { grid-row: span 3; }
}
.bc-bulk-table th:nth-child(2) { width: 34%; }
.bc-bulk-table th:nth-child(5) { width: 34%; }

/* 0.11.1 — typed durations and total hours */
.bc-dur-read { margin-left: 8px; font-size: 13px; color: var(--bc-muted, #8a93a6); }
.bc-dur-read.is-bad { color: #ff6b6b; }
.bc-total { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.bc-total span, .bc-nav-total span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--bc-tint-2); border: 1px solid var(--bc-line); font-size: 13px; font-weight: 600; }
.bc-nav-total { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.bc-sum-meta { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.bc-sum-hours { font-size: 13px; font-weight: 600; opacity: .8; }
@media (max-width: 860px) { .bc-nav-total { flex: 0 0 auto; margin: 0 6px 0 0; } }

/* 0.11.2 — sections the teacher makes */
.bc-add-section { margin: 0 0 14px; }
.bc-add-section > summary { cursor: pointer; font-weight: 700; }
.bc-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; max-height: 320px; overflow: auto; padding: 8px 2px; }
.bc-picker--row { display: flex; flex-wrap: wrap; max-height: none; overflow: visible; }
.bc-pick { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--bc-line); border-radius: 10px; cursor: pointer; font-size: 14px; }
.bc-pick:has(input:checked) { border-color: var(--bc-red, #e53935); background: rgba(229, 57, 53, .08); }
.bc-pick input { accent-color: var(--bc-red, #e53935); }
.bc-pick-classes { margin: 6px 0 10px; }
.bc-pick-classes > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--bc-muted, #8a93a6); }

/* 0.11.3 — pre-recorded only */
.bc-badge--rec, .bc-chip--rec { background: rgba(56, 189, 248, .14); color: var(--bc-sky-text); border-color: rgba(56, 189, 248, .35); }
.bc-pick--inline { display: inline-flex; }
.bc-bulk-rec { text-align: center; }
.bc-bulk-rec .bc-pick { border: 0; padding: 4px; }
.bc-only-phone { display: none; }
@media (max-width: 860px) {
	.bc-bulk-table td.bc-bulk-rec { grid-column: 2 / 4; text-align: left; }
	.bc-only-phone { display: inline; }
}

/* 0.11.5 — left menu: every class, folded by section, kept on the class page */
.bc-learn-nav { display: block; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.bc-nav-wrap > .bc-nav-toggle { display: none; }
.bc-nav-body { display: grid; gap: 4px; }
.bc-learn-nav .bc-nav-link { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--bc-text-2); }
.bc-nav-sec { border-radius: 12px; }
.bc-nav-sec > summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; cursor: pointer; list-style: none; font-weight: 700; font-size: 14px; color: var(--bc-text); }
.bc-nav-sec > summary::-webkit-details-marker { display: none; }
.bc-nav-sec > summary::after { content: '▸'; margin-left: 4px; font-size: 12px; opacity: .6; transition: transform .15s; }
.bc-nav-sec[open] > summary::after { transform: rotate(90deg); }
.bc-nav-sec > summary:hover { background: var(--bc-tint-2); }
.bc-nav-sec[open] > summary { background: var(--bc-tint-1); }
.bc-nav-sec-title { flex: 1; min-width: 0; }
.bc-nav-sec .bc-count { margin-left: 0; }
.bc-nav-sec ol { list-style: none; margin: 2px 0 6px; padding: 0 0 0 10px; display: grid; gap: 2px; border-left: 1px solid var(--bc-line); margin-left: 16px; }
.bc-learn-nav .bc-nav-class, .bc-learn-nav .bc-nav-jump { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: 10px; font-size: 13px; font-weight: 500; line-height: 1.35; text-decoration: none; color: var(--bc-text-2); }
.bc-learn-nav .bc-nav-jump { color: var(--bc-muted, #94A3B8); font-size: 12px; padding: 4px 10px; }
.bc-learn-nav .bc-nav-class:hover { background: var(--bc-tint-2); color: var(--bc-text); }
.bc-learn-nav .bc-nav-class.is-here { background: rgba(239, 68, 68, .16); color: var(--bc-text); box-shadow: inset 3px 0 0 var(--bc-accent); font-weight: 700; }
.bc-nav-class.is-locked { opacity: .55; }
.bc-nav-num { flex: 0 0 auto; min-width: 26px; padding: 1px 6px; border-radius: 7px; background: var(--bc-tint-2); font-size: 11px; font-weight: 700; text-align: center; }
.bc-nav-class.is-here .bc-nav-num { background: var(--bc-accent); color: #fff; }
.bc-learn--class { grid-template-columns: 260px minmax(0, 1fr); }
@media (max-width: 860px) {
	.bc-learn-nav { display: block; position: sticky; top: 104px; max-height: none; overflow: visible; padding: 0; background: transparent; border: 0; }
	.bc-nav-wrap { border-radius: 14px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
	.bc-nav-wrap > .bc-nav-toggle { display: flex; align-items: center; padding: 11px 14px; font-weight: 700; cursor: pointer; list-style: none; }
	.bc-nav-wrap > .bc-nav-toggle::-webkit-details-marker { display: none; }
	.bc-nav-wrap[open] > .bc-nav-body { max-height: 65vh; overflow-y: auto; padding: 0 8px 10px; }
	.bc-learn--class { grid-template-columns: 1fr; }
}

/* 0.12.0 — study tools inside the portal */
.bc-tool-page-head { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.bc-tool-page-head h1 { margin: 0; }
.bc-tool-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(239, 68, 68, .14); font-size: 22px; }
.bc-tool-host .bc-tool { max-width: none; margin: 0; }
.bc-nav-group { margin: 10px 12px 2px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bc-muted, #94A3B8); }

/* 0.12.1 — find an existing account, student codes, details page */
.bc-finder { margin: 6px 0 18px; padding: 14px; border-radius: 14px; border: 1px dashed var(--bc-line); background: var(--bc-tint-1); }
.bc-finder-label { display: block; font-weight: 700; margin: 0 0 8px; }
.bc-finder-results { display: grid; gap: 8px; margin-top: 10px; }
.bc-account { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
.bc-account.is-staff { opacity: .6; }
.bc-account-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bc-account-meta { font-size: 13px; color: var(--bc-muted, #94A3B8); overflow-wrap: anywhere; }
.bc-account-go { display: flex; gap: 6px; flex-wrap: wrap; }
.bc-existing-card { display: block; padding: 8px 12px; border-radius: 10px; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .35); font-weight: 600; margin-bottom: 4px; }
.bc-code { display: inline-block; min-width: 42px; padding: 2px 8px; border-radius: 8px; background: rgba(239, 68, 68, .14); color: var(--bc-text); font-family: Outfit, sans-serif; text-align: center; }
.bc-details-table { max-width: 760px; }
.bc-details-table th { width: 190px; }
.bc-copy { font-size: 14px; padding: 2px 8px; border-radius: 6px; background: var(--bc-tint-2); }
.bc-person--big { display: flex; align-items: center; gap: 14px; margin: 6px 0 14px; }
.bc-person--big h1 { margin: 0; }
@media (max-width: 640px) { .bc-account { flex-direction: column; align-items: stretch; } }

/* 0.13.0 — bulk adder scrolls sideways when it is wider than the screen */
.bc-scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; scrollbar-width: thin; }
.bc-scroll-x .bc-bulk-table { min-width: 1080px; }
@media (max-width: 860px) {
	.bc-scroll-x .bc-bulk-table { min-width: 0; }
}
.bc-transfer { margin: 0 0 14px; }
.bc-transfer > summary { cursor: pointer; font-weight: 700; }
.bc-transfer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.bc-transfer-grid form { padding: 14px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); }
.bc-transfer-grid h3 { margin: 0 0 6px; }
.bc-transfer-opts { display: flex; flex-wrap: wrap; gap: 6px; }

/* 0.13.0 — phones: the top menu shows every item at once (no sideways scroll), icon above a short label */
@media (max-width: 960px) {
	.bc-menu { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: visible; gap: 2px; padding: 3px; }
	.bc-menu a { flex-direction: column; justify-content: center; gap: 2px; padding: 6px 2px; border-radius: 12px; font-size: 11px; line-height: 1.2; white-space: normal; text-align: center; min-width: 0; }
	.bc-menu a span[aria-hidden] { font-size: 17px; line-height: 1; }
}

/* 0.14.1 — full-width pages (no boxed frame), smoother scrolling, the video always fits */
.bc-main, .bc-main--wide { max-width: none; padding: clamp(16px, 3vw, 32px) clamp(16px, 3vw, 40px) 40px; }
.bc-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.bc-card--centred { max-width: 440px; margin: clamp(8px, 4vw, 40px) auto 0; }
.bc-card-logo { box-shadow: 0 0 0 4px var(--bc-ink, #070913), 0 0 0 6px rgba(239, 68, 68, .45), 0 12px 32px rgba(0, 0, 0, .4); }
/* The blurred see-through header repainted on every scroll; a solid one is much lighter. */
.bc-top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bc-header); }
.bc-learn-nav { contain: content; overscroll-behavior: contain; }
.bc-nav-sec > summary::after { transition: none; }
/* Grid columns may shrink below their content, so nothing (the Drive video) pushes past the page edge. */
.bc-learn-main, .bc-class-layout > *, .bc-dash-main { min-width: 0; max-width: 100%; }
.bc-class-layout { grid-template-columns: minmax(0, 1fr); }
.bc-player { max-width: 100%; }
@media (max-width: 960px) {
	.bc-learn, .bc-learn--class, .bc-class-layout.has-chapters, .bc-dash { grid-template-columns: minmax(0, 1fr); }
}
.bc-kid { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 10px; border-radius: 999px; background: var(--bc-tint-2); text-decoration: none; font-size: 13px; }
.bc-parents-table { min-width: 760px; }

/* The fold-up "Classes menu" button is used up to the same width where the page becomes one column. */
@media (max-width: 960px) {
	.bc-learn-nav { display: block; position: sticky; top: 104px; z-index: 20; max-height: none; overflow: visible; padding: 0; background: transparent; border: 0; }
	.bc-nav-wrap { border-radius: 14px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
	.bc-nav-wrap > .bc-nav-toggle { display: flex; align-items: center; padding: 11px 14px; font-weight: 700; cursor: pointer; list-style: none; }
	.bc-nav-wrap > .bc-nav-toggle::-webkit-details-marker { display: none; }
	.bc-nav-wrap[open] > .bc-nav-body { max-height: 65vh; overflow-y: auto; padding: 0 8px 10px; }
}

/* 0.14.3 — "All Recorded Lessons" button; the classes menu as a full-screen panel on phones and tablets */
.bc-back-lessons { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 12px 22px; font-size: 16px; font-weight: 700; text-decoration: none; }
.bc-nav-drawer-head { display: none; }
@media (max-width: 960px) {
	.bc-back-lessons { width: 100%; justify-content: center; }
	.bc-nav-wrap[open] > .bc-nav-body {
		position: fixed; inset: 0; z-index: 200; max-height: none; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
		padding: 0 16px 32px; background: var(--bc-ink, #070913); border-right: 1px solid var(--bc-line);
		animation: bc-drawer-in .22s ease-out;
	}
	.bc-nav-wrap[open] .bc-nav-drawer-head {
		display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1;
		margin: 0 -16px 10px; padding: 14px 16px; background: var(--bc-ink, #070913); border-bottom: 1px solid var(--bc-line); font-size: 18px;
	}
	.bc-nav-close { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--bc-line); background: var(--bc-tint-2); color: var(--bc-text); font-size: 20px; cursor: pointer; }
	.bc-nav-wrap[open] .bc-nav-body .bc-nav-link, .bc-nav-wrap[open] .bc-nav-body .bc-nav-class { font-size: 16px; padding-top: 11px; padding-bottom: 11px; }
	.bc-nav-wrap[open] .bc-nav-body .bc-nav-sec > summary { font-size: 16px; padding-top: 12px; padding-bottom: 12px; }
	html.bc-drawer-open, html.bc-drawer-open body { overflow: hidden; }
	/* "contain" would trap the full-screen panel inside the menu bar */
	.bc-learn-nav, .bc-nav-wrap { contain: none; transform: none; }
	/* Above the site header while open (the menu bar's own layer sits below the header otherwise). */
	html.bc-drawer-open .bc-learn-nav, .bc-learn-nav:has(.bc-nav-wrap[open]) { z-index: 300; }
}
@keyframes bc-drawer-in { from { transform: translateX(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .bc-nav-wrap[open] > .bc-nav-body { animation: none; } }

/* 0.14.5: faster flipbook and Zoom & write. Solid toolbars (no blur over the page), a layer
   for finished marks under the pen layer, and real page elements in the book. */
.bc-ink-sheet .bc-ink-marks { pointer-events: none; }
.bc-ink-sheet canvas { contain: strict; }
.bc-ink-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: #64748B; font-size: 14px; background: #fff; }
.bc-ink-wait[hidden] { display: none; }
.bc-book-page { background: #fff; overflow: hidden; }
.bc-book-page img { display: block; width: 100%; height: 100%; object-fit: fill; pointer-events: none; -webkit-user-drag: none; }
.bc-book-page.is-loading::after { content: "Loading this page…"; position: absolute; inset: 0; display: grid; place-items: center; color: #94A3B8; font-size: 14px; }
.bc-badge--bad { background: rgba(239, 68, 68, .15); color: var(--bc-red-text); }
.bc-pages-note { margin: 12px 0; padding: 10px 14px; border-radius: 12px; background: rgba(234, 179, 8, .1); color: var(--bc-yellow-text); font-size: 14px; }
.bc-pages-note[hidden] { display: none; }
.bc-pages-sweep { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 8px; }

/* 0.15.1: Zoom & write. Undo and Clear in the main toolbar; the colours, zoom and page arrows
   float over the page; the page takes the whole screen below the main toolbar. Fingers on the
   page are handled by the viewer (drag with Move, pinch to zoom), not by the browser. */
.bc-ink-stage { touch-action: none; cursor: grab; overscroll-behavior: contain; }
.bc-ink-stage:active { cursor: grabbing; }
.bc-ink-top { gap: 6px; }
.bc-ink-pill--colours { padding: 4px 6px; }
.bc-ink-pill--colours .bc-ink-colours { padding: 0 2px; }
/* A zoomed page wider than the screen starts at its left edge (centred ones stay centred), so all of it can be reached. */
.bc-ink-stage { place-items: start; }
.bc-ink-top .bc-ink-pill:not(:first-child), .bc-ink-bottom .bc-ink-pill { background: rgba(14, 17, 34, .82); }

/* 0.16.0: the book fits the screen; its controls float over the bottom of the page as
   see-through icons; no One/Two pages switch on phones; no footer under the book. */
.bc-book { position: relative; }
.bc-book-pages { max-width: 1000px; }
.bc-book-bar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 20; margin: 0; gap: 4px; flex-wrap: nowrap; padding: 5px; border-radius: 999px; background: var(--bc-next-bg); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); color: #fff; }
.bc-book-bar button { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 700 22px/1 "Plus Jakarta Sans", sans-serif; cursor: pointer; }
.bc-book-bar button:hover { background: rgba(255, 255, 255, .14); }
.bc-book-bar .bc-book-view { font-size: 15px; letter-spacing: -2px; }
.bc-book-bar .bc-book-ink { background: rgba(239, 68, 68, .85); }
.bc-book-bar .bc-book-ink:hover { background: var(--bc-accent); }
.bc-book-count { min-width: 64px; text-align: center; font: 600 14px "Plus Jakarta Sans", sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.bc-main:has(.bc-book) + .bc-foot { display: none; }
.bc-main:has(.bc-book) { padding-bottom: 0; }
@media (max-width: 760px) {
	.bc-book-bar .bc-book-view { display: none; }
	.bc-main:has(.bc-book) .bc-book-title { font-size: 20px; margin-bottom: 10px; }
	.bc-main:has(.bc-book) .bc-crumb { margin-bottom: 4px; }
}

/* 0.16.0: panels on the cohort page keep a gap; copy-link buttons; class titles for the next two
   live classes; parent relation picker. */
.bc-panel + .bc-panel, .bc-details + .bc-panel, .bc-panel + .bc-details { margin-top: 12px; }
.bc-admin-page > details.bc-panel { margin: 12px 0; }
.bc-copy { margin-left: 6px; white-space: nowrap; }
.bc-copy.is-copied { color: var(--bc-green-text); border-color: rgba(74, 222, 128, .5); }
.bc-class .bc-copy { padding: 2px 10px; font-size: 12px; }
.bc-coming-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.bc-coming-field { display: grid; gap: 6px; }
.bc-coming-when { font-size: 13px; color: var(--bc-muted); }
.bc-coming-when strong { color: var(--bc-text); }
.bc-coming { display: grid; gap: 12px; max-width: 980px; }
.bc-coming-cohort { margin: 0; }
.bc-coming-cohort legend { padding: 0 6px; }
.bc-relation-pick select { padding: 6px 8px; border-radius: 10px; background: var(--bc-surface); color: var(--bc-text); border: 1px solid var(--bc-line); }

/* =====================================================================
   0.16.1: light theme, themed scrollbars, class rows in columns, phone admin menu, polish
   ===================================================================== */

/* Zoom & write, the book's floating controls and the study tools stay dark in both themes:
   they sit over pages or bring their own dark design. */
.bc-ink, .bc-book-bar {
	--bc-ink: #070913;
	--bc-surface: #0E1122;
	--bc-card: #151933;
	--bc-line: #292B4D;
	--bc-text: #F1F5F9;
	--bc-text-2: #CBD5E1;
	--bc-muted: #94A3B8;
	--bc-accent: #EF4444;
	--bc-accent-dark: #B91C1C;
	--bc-good: #22C55E;
	--bc-violet: #A855F7;
	--bc-tint-1: rgba(255, 255, 255, .03);
	--bc-tint-2: rgba(255, 255, 255, .06);
	--bc-tint-3: rgba(255, 255, 255, .09);
	--bc-header: linear-gradient(90deg, #1f0d14, #0b0d1a 40%);
	--bc-tip: #1E2242;
	--bc-next-bg: rgba(7, 9, 19, .55);
	--bc-red-soft: #FCA5A5;
	--bc-red-text: #F87171;
	--bc-green-text: #4ADE80;
	--bc-yellow-text: #FACC15;
	--bc-sky-text: #7DD3FC;
	--bc-blue-text: #93C5FD;
	--bc-shadow: 0 10px 28px rgba(0, 0, 0, .35);
	--bc-scroll: rgba(148, 163, 184, .28);
	--bc-scroll-hover: rgba(148, 163, 184, .5);
	--bc-scheme: dark;
}
.bc-book-bar { background: rgba(7, 9, 19, .55); }

/* Sun / moon switch: shows the mode it switches to. */
.bc-theme { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 999px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); color: var(--bc-text); cursor: pointer; transition: background .15s, transform .15s; }
.bc-theme:hover { background: var(--bc-tint-3); transform: rotate(12deg); }
.bc-theme:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
.bc-theme-moon { display: none; }
:root[data-theme="light"] .bc-theme-sun { display: none; }
:root[data-theme="light"] .bc-theme-moon { display: block; }
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) .bc-theme-sun { display: none; }
	:root:not([data-theme="dark"]) .bc-theme-moon { display: block; }
}

/* Light theme touches that tokens alone do not cover. */
:root[data-theme="light"] body.bc-portal { background: radial-gradient(1200px 600px at 50% -200px, rgba(229, 56, 59, .08), transparent 60%), var(--bc-ink); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) body.bc-portal { background: radial-gradient(1200px 600px at 50% -200px, rgba(229, 56, 59, .08), transparent 60%), var(--bc-ink); } }
.bc-class-card:not(.is-locked):hover, .bc-tile:hover { box-shadow: var(--bc-shadow); }
.bc-help::after { box-shadow: var(--bc-shadow); }
.bc-avatar { box-shadow: 0 0 0 2px var(--bc-tint-3); }

/* Themed scrollbars: thin, rounded, no white track, in both themes. */
* { scrollbar-width: thin; scrollbar-color: var(--bc-scroll) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bc-scroll); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--bc-scroll-hover); border: 2px solid transparent; background-clip: padding-box; }

/* Cohort page: each class row is the name, then fixed columns that line up from row to row. */
.bc-class { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; padding: 10px 14px; transition: border-color .15s, background .15s; }
.bc-class:not(:has(> .bc-grip)) { grid-template-columns: minmax(0, 1fr) auto; }
.bc-class:hover { border-color: rgba(239, 68, 68, .35); background: linear-gradient(90deg, var(--bc-tint-1), transparent 60%), var(--bc-card); }
.bc-class-name-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.bc-class-name { flex: 0 1 auto; overflow-wrap: anywhere; }
.bc-class-meta { display: grid; grid-template-columns: 76px 112px 148px 70px 110px 54px minmax(104px, max-content); align-items: center; gap: 8px; font-size: 13px; color: var(--bc-muted); }
.bc-slot { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.bc-slot > .bc-badge, .bc-slot > .bc-copy { width: 100%; justify-content: center; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.bc-slot--dur { font-variant-numeric: tabular-nums; }
.bc-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; line-height: 1.3; }
.bc-badge--cat { background: var(--cat-soft); color: var(--cat); }
.bc-badge--muted { background: transparent; border: 1px dashed var(--bc-line); color: var(--bc-muted); font-weight: 600; }
.bc-copy, .bc-btn--ghost.bc-copy { margin: 0; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(59, 130, 246, .45); background: rgba(59, 130, 246, .14); color: var(--bc-blue-text); font-size: 12px; font-weight: 700; box-shadow: none; }
.bc-copy:hover, .bc-btn--ghost.bc-copy:hover { background: rgba(59, 130, 246, .26); transform: none; }
.bc-copy.is-copied { border-color: rgba(34, 197, 94, .5); background: rgba(34, 197, 94, .15); color: var(--bc-green-text); }
h1 + p > .bc-copy, p > .bc-copy:first-child { font-size: 13px; padding: 6px 14px; }
@media (max-width: 1240px) {
	.bc-class { grid-template-columns: auto minmax(0, 1fr); }
	.bc-class:not(:has(> .bc-grip)) { grid-template-columns: minmax(0, 1fr); }
	.bc-class-meta { grid-column: -2 / -1; }
}
@media (max-width: 760px) {
	.bc-class-meta { display: flex; flex-wrap: wrap; gap: 6px; }
	.bc-slot:empty { display: none; }
	.bc-slot > .bc-badge, .bc-slot > .bc-copy { width: auto; }
}

/* Teacher dashboard on phones: the main items as a grid of buttons, each course's cohorts as a
   second row of chips below, so a cohort is one tap away. */
.bc-side-subs { display: contents; }
@media (max-width: 800px) {
	.bc-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; overflow: visible; }
	.bc-side > a { padding: 9px 6px; text-align: center; font-size: 14px; border: 1px solid var(--bc-line); background: var(--bc-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.bc-side > a[aria-current="page"] { box-shadow: none; background: var(--bc-accent); border-color: var(--bc-accent); color: #fff; }
	.bc-side-subs { order: 99; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 2px; border-top: 1px dashed var(--bc-line); }
	.bc-side-subs::before { content: "Cohorts"; flex-basis: 100%; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--bc-muted); }
	.bc-side a.bc-side-sub { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .08); color: var(--bc-text); font-size: 13px; font-weight: 600; }
	.bc-side a.bc-side-sub[aria-current="page"] { background: var(--bc-accent); border-color: var(--bc-accent); color: #fff; box-shadow: none; }
}

/* Spacing: headings, hints and paragraphs never touch what comes next. */
.bc-admin-page > p, .bc-admin-page > form, .bc-admin-page > .bc-table, .bc-admin-page > .bc-scroll-x { margin-bottom: 18px; }
.bc-admin-page p.bc-hint, .bc-learn-main p.bc-hint, .bc-block > p.bc-hint, .bc-panel p.bc-hint, .bc-details p.bc-hint { margin: 6px 0 14px !important; line-height: 1.5; }
.bc-admin-page h1 + .bc-notice, .bc-admin-page h1 + p { margin-top: 4px; }
.bc-admin-page h2 { margin: 36px 0 14px; padding-top: 4px; }
.bc-admin-page h2:first-child { margin-top: 0; }
.bc-admin-page .bc-eyebrow + h1 { margin-top: 0; }
.bc-details[open], .bc-panel[open] { padding-bottom: 16px; }
.bc-details > summary, .bc-panel > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
.bc-details > summary::-webkit-details-marker, .bc-panel > summary::-webkit-details-marker { display: none; }
.bc-details > summary::before, .bc-panel > summary::before { content: "▸"; color: var(--bc-muted); font-size: 12px; transition: transform .15s; }
.bc-details[open] > summary::before, .bc-panel[open] > summary::before { transform: rotate(90deg); }
.bc-details[open] > summary, .bc-panel[open] > summary { margin-bottom: 10px; }
.bc-panel > summary { cursor: pointer; font-weight: 700; padding: 2px 0; }
.bc-table + form, .bc-table + .bc-inline-form, .bc-table + p, .bc-scroll-x + form, .bc-tiles + h2, .bc-tiles + form { margin-top: 16px; }
.bc-inline-form + .bc-inline-form, .bc-inline-form + form, form + .bc-inline-form { margin-top: 10px; }
.bc-fields + p, .bc-fields + .bc-btn { margin-top: 14px; }
.bc-notice { line-height: 1.5; }
.bc-notice + * { margin-top: 14px; }
.bc-block-title { margin: 0 0 14px; }
.bc-block + .bc-block, .bc-student-section + .bc-block { margin-top: 26px; }
.bc-total { margin: 6px 0 16px; }
.bc-admin-page > .bc-btn + .bc-btn { margin-left: 6px; }
.bc-admin-page > .bc-btn { margin-bottom: 8px; }
.bc-unit { margin: 0 0 18px; }
.bc-unit-head { margin: 0 0 14px; }
.bc-desc p:last-child, .bc-panel p:last-child, .bc-details p:last-child { margin-bottom: 0; }
.bc-hero { margin-bottom: 26px; }
.bc-tabs { margin: 0 0 22px; }

/* A little more finish. */
.bc-btn:focus-visible, .bc-side a:focus-visible, .bc-menu a:focus-visible, .bc-copy:focus-visible { outline: 2px solid var(--bc-accent); outline-offset: 2px; }
.bc-tile { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--bc-tint-2), transparent 55%), var(--bc-surface); transition: border-color .15s, transform .15s, box-shadow .15s; }
.bc-tile:hover { transform: translateY(-2px); }
.bc-tile strong { color: var(--bc-text); }
.bc-table { background: var(--bc-card); }
.bc-table tbody tr:hover { background: var(--bc-tint-1); }
.bc-details, .bc-panel, .bc-unit, .bc-student-section, .bc-desc, .bc-chapters, .bc-hero, .bc-profile-card { box-shadow: 0 1px 0 var(--bc-tint-1) inset; }
.bc-unit { background: var(--bc-surface); }
.bc-input, .bc-admin-page select, .bc-admin-page textarea, .bc-admin-page input[type="number"], .bc-admin-page input[type="date"], .bc-admin-page input[type="text"], .bc-admin-page input[type="email"], .bc-admin-page input:not([type]), .bc-admin-page input[type="url"], .bc-admin-page input[type="time"], .bc-admin-page input[type="datetime-local"], .bc-form input { transition: border-color .15s, box-shadow .15s; }
.bc-input:hover, .bc-admin-page select:hover, .bc-admin-page textarea:hover { border-color: var(--bc-muted); }
.bc-user { gap: 12px; }
.bc-menu { background: var(--bc-tint-1); }
.bc-viewas { box-shadow: 0 8px 24px rgba(185, 28, 28, .25); }

.bc-brand { white-space: nowrap; }
@media (max-width: 1180px) { .bc-brand em { display: none; } }

/* 0.16.2: past papers, MCQ solving and flashcards in light mode too (inside the portal only;
   the main website keeps their dark look). Their own colour tokens get light values, and the
   few colours they set directly get light versions. */
:root[data-theme="light"] .bc-tool { --bc-ink: #FFFFFF; --bc-surface: #F6F7FB; --bc-card: #FFFFFF; --bc-line: #E2E5EF; --bc-text: #0F172A; --bc-muted: #5B6476; --bc-accent: #E5383B; --bc-accent-dark: #B91C1C; border: 1px solid #E2E5EF; box-shadow: 0 10px 28px rgba(15, 23, 42, .06); }
:root[data-theme="light"] .bc-tool .bc-btn-solve:hover { color: #fff; }
:root[data-theme="light"] .bc-why { background: rgba(15, 23, 42, .035); color: #334155; }
:root[data-theme="light"] .bc-why-note, :root[data-theme="light"] .bc-mcq-feedback p { color: #334155; }
:root[data-theme="light"] .bc-adder-status.is-bad, :root[data-theme="light"] .bc-cur-status.is-bad, :root[data-theme="light"] .bc-tool .bc-cur-tools .is-danger, :root[data-theme="light"] .bc-badge-state.is-low { color: #DC2626; }
:root[data-theme="light"] .bc-cur-video { background: rgba(15, 23, 42, .02); }
:root[data-theme="light"] #bcfc { --bg: #FFFFFF; --bg2: #F6F7FB; --card: #FFFFFF; --line: #E2E5EF; --ink: #0F172A; --mut: #5B6476; --hl: rgba(250, 204, 21, .38); --hlb: #EAB308; border: 1px solid #E2E5EF; box-shadow: 0 10px 28px rgba(15, 23, 42, .06); }
:root[data-theme="light"] #bcfc .ch { background: linear-gradient(160deg, #FFFFFF, #F6F7FB); }
:root[data-theme="light"] #bcfc .bar, :root[data-theme="light"] #bcfc .mk, :root[data-theme="light"] #bcfc .opt.sel { background: #EEF0F6; }
:root[data-theme="light"] #bcfc .stat, :root[data-theme="light"] #bcfc .chip:not(.on):not(.col), :root[data-theme="light"] #bcfc .dots button:not(.ok):not(.part):not(.bad), :root[data-theme="light"] #bcfc textarea, :root[data-theme="light"] #bcfc .opt:not(.sel):not(.right):not(.wrong), :root[data-theme="light"] #bcfc .model, :root[data-theme="light"] #bcfc .pts li:not(.on), :root[data-theme="light"] #bcfc .yours, :root[data-theme="light"] #bcfc .autobar.off { background: #F6F7FB; }
:root[data-theme="light"] #bcfc .card.back { border-color: #F2D6A2; background: linear-gradient(180deg, #FFFBF2, #FFFFFF); }
:root[data-theme="light"] #bcfc .tag, :root[data-theme="light"] #bcfc .mic .btn.on { color: #B91C1C; }
:root[data-theme="light"] #bcfc .yours { color: #334155; }
:root[data-theme="light"] #bcfc .tip { color: #854D0E; background: rgba(250, 204, 21, .12); border-color: rgba(202, 138, 4, .35); }
:root[data-theme="light"] #bcfc .tip.warn { color: #991B1B; background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .35); }
:root[data-theme="light"] #bcfc .autobar { color: #075985; }
:root[data-theme="light"] #bcfc .autotag { color: #0369A1; border-color: rgba(3, 105, 161, .4); }
:root[data-theme="light"] #bcfc .chip.col:not(.on) { background: color-mix(in srgb, var(--c) 10%, #FFFFFF); }
:root[data-theme="light"] #bcfc .chip.col.on { color: #FFFFFF; }
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) .bc-tool { --bc-ink: #FFFFFF; --bc-surface: #F6F7FB; --bc-card: #FFFFFF; --bc-line: #E2E5EF; --bc-text: #0F172A; --bc-muted: #5B6476; --bc-accent: #E5383B; --bc-accent-dark: #B91C1C; border: 1px solid #E2E5EF; box-shadow: 0 10px 28px rgba(15, 23, 42, .06); }
	:root:not([data-theme="dark"]) .bc-tool .bc-btn-solve:hover { color: #fff; }
	:root:not([data-theme="dark"]) .bc-why { background: rgba(15, 23, 42, .035); color: #334155; }
	:root:not([data-theme="dark"]) .bc-why-note, :root:not([data-theme="dark"]) .bc-mcq-feedback p { color: #334155; }
	:root:not([data-theme="dark"]) .bc-adder-status.is-bad, :root:not([data-theme="dark"]) .bc-cur-status.is-bad, :root:not([data-theme="dark"]) .bc-tool .bc-cur-tools .is-danger, :root:not([data-theme="dark"]) .bc-badge-state.is-low { color: #DC2626; }
	:root:not([data-theme="dark"]) .bc-cur-video { background: rgba(15, 23, 42, .02); }
	:root:not([data-theme="dark"]) #bcfc { --bg: #FFFFFF; --bg2: #F6F7FB; --card: #FFFFFF; --line: #E2E5EF; --ink: #0F172A; --mut: #5B6476; --hl: rgba(250, 204, 21, .38); --hlb: #EAB308; border: 1px solid #E2E5EF; box-shadow: 0 10px 28px rgba(15, 23, 42, .06); }
	:root:not([data-theme="dark"]) #bcfc .ch { background: linear-gradient(160deg, #FFFFFF, #F6F7FB); }
	:root:not([data-theme="dark"]) #bcfc .bar, :root:not([data-theme="dark"]) #bcfc .mk, :root:not([data-theme="dark"]) #bcfc .opt.sel { background: #EEF0F6; }
	:root:not([data-theme="dark"]) #bcfc .stat, :root:not([data-theme="dark"]) #bcfc .chip:not(.on):not(.col), :root:not([data-theme="dark"]) #bcfc .dots button:not(.ok):not(.part):not(.bad), :root:not([data-theme="dark"]) #bcfc textarea, :root:not([data-theme="dark"]) #bcfc .opt:not(.sel):not(.right):not(.wrong), :root:not([data-theme="dark"]) #bcfc .model, :root:not([data-theme="dark"]) #bcfc .pts li:not(.on), :root:not([data-theme="dark"]) #bcfc .yours, :root:not([data-theme="dark"]) #bcfc .autobar.off { background: #F6F7FB; }
	:root:not([data-theme="dark"]) #bcfc .card.back { border-color: #F2D6A2; background: linear-gradient(180deg, #FFFBF2, #FFFFFF); }
	:root:not([data-theme="dark"]) #bcfc .tag, :root:not([data-theme="dark"]) #bcfc .mic .btn.on { color: #B91C1C; }
	:root:not([data-theme="dark"]) #bcfc .yours { color: #334155; }
	:root:not([data-theme="dark"]) #bcfc .tip { color: #854D0E; background: rgba(250, 204, 21, .12); border-color: rgba(202, 138, 4, .35); }
	:root:not([data-theme="dark"]) #bcfc .tip.warn { color: #991B1B; background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .35); }
	:root:not([data-theme="dark"]) #bcfc .autobar { color: #075985; }
	:root:not([data-theme="dark"]) #bcfc .autotag { color: #0369A1; border-color: rgba(3, 105, 161, .4); }
	:root:not([data-theme="dark"]) #bcfc .chip.col:not(.on) { background: color-mix(in srgb, var(--c) 10%, #FFFFFF); }
	:root:not([data-theme="dark"]) #bcfc .chip.col.on { color: #FFFFFF; }
}

/* Cohort page: the class length is a bubble in the last column, at the far right of the row. */
.bc-class-meta { grid-template-columns: 76px 112px 148px 110px 54px 150px 84px; }
.bc-slot--dur > .bc-badge { width: 100%; justify-content: center; font-variant-numeric: tabular-nums; background: rgba(148, 163, 184, .14); color: var(--bc-text); }
.bc-slot--status > .bc-badge { max-width: 100%; }
/* Flashcards: the grey "All" and "Not tried" chips are set for a dark background; darker greys in light mode. */
:root[data-theme="light"] #bcfc .chip.col[data-f="all"], :root[data-theme="light"] #bcfc .chip.col[data-t="all"] { --c: #475569 !important; }
:root[data-theme="light"] #bcfc .chip.col[data-f="new"] { --c: #64748B !important; }
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) #bcfc .chip.col[data-f="all"], :root:not([data-theme="dark"]) #bcfc .chip.col[data-t="all"] { --c: #475569 !important; }
	:root:not([data-theme="dark"]) #bcfc .chip.col[data-f="new"] { --c: #64748B !important; }
}

/* 0.16.4: Zoom & write in full screen on phones and tablets (no page zoom can affect it). */
.bc-ink:fullscreen { width: 100vw; height: 100vh; background: var(--bc-ink); }
.bc-ink::backdrop { background: #070913; }

/* 0.17.0: web app and notifications — the home-page offer and the profile / Overview panel. */
.bc-push-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(239, 68, 68, .35); background: linear-gradient(90deg, rgba(239, 68, 68, .12), transparent 70%), var(--bc-surface); }
.bc-push-banner[hidden] { display: none; }
.bc-push-banner-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(239, 68, 68, .16); font-size: 20px; }
.bc-push-banner-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 14px; }
.bc-push-banner-text span { color: var(--bc-muted); font-size: 13px; line-height: 1.45; }
.bc-push-banner-close { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--bc-muted); font-size: 16px; cursor: pointer; }
.bc-push-banner-close:hover { background: var(--bc-tint-2); color: var(--bc-text); }
@media (max-width: 560px) { .bc-push-banner { flex-wrap: wrap; } .bc-push-banner-text { flex-basis: calc(100% - 100px); } .bc-push-banner > .bc-btn { margin-left: 52px; } }
.bc-push-panel { margin: 24px 0 0; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--bc-line); background: var(--bc-surface); max-width: 760px; }
.bc-push-panel h2 { margin: 0 0 8px !important; font: 700 18px Outfit, sans-serif; }
.bc-push-panel h3 { margin: 16px 0 6px; font: 700 15px Outfit, sans-serif; color: var(--bc-text); text-transform: none; letter-spacing: 0; }
.bc-push-state { margin: 0 0 10px !important; }
.bc-push-ok { color: var(--bc-green-text); }
.bc-push-kinds { display: grid; gap: 6px; margin: 12px 0 4px; padding: 0; border: 0; }
.bc-push-kinds legend { margin-bottom: 6px; }
.bc-push-install { margin-top: 12px; padding-top: 4px; border-top: 1px dashed var(--bc-line); }
.bc-push-install[hidden], .bc-push-panel [hidden] { display: none !important; }

/* 0.18.0: homework — lists, hand-in pages, results, marking. */
.bc-hw-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.bc-hw-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-surface); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.bc-hw-card:hover { border-color: rgba(239, 68, 68, .45); transform: translateY(-1px); }
.bc-hw-card.is-late { border-left: 4px solid var(--bc-accent); }
.bc-hw-card.is-todo { border-left: 4px solid #F59E0B; }
.bc-hw-card.is-returned { border-left: 4px solid var(--bc-good); }
.bc-hw-card-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bc-hw-card-main .bc-hint { margin: 0 !important; }
.bc-hw-state { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: rgba(148, 163, 184, .15); color: var(--bc-text-2); }
.bc-hw-state.is-todo { background: rgba(245, 158, 11, .15); color: var(--bc-yellow-text); }
.bc-hw-state.is-late, .bc-hw-state.is-closed { background: rgba(239, 68, 68, .15); color: var(--bc-red-text); }
.bc-hw-state.is-submitted, .bc-hw-state.is-marking { background: rgba(59, 130, 246, .15); color: var(--bc-blue-text); }
.bc-hw-state.is-returned { background: rgba(34, 197, 94, .15); color: var(--bc-green-text); }
.bc-hw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 6px; }
.bc-hw-head h1 { margin: 0 !important; }
.bc-hw-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 16px !important; color: var(--bc-text-2) !important; font-size: 14px; }
.bc-hw-meta a { color: var(--bc-text); }
.bc-hw-handin, .bc-hw-result { margin: 20px 0; padding: 18px; border-radius: 18px; border: 1px solid var(--bc-line); background: var(--bc-surface); }
.bc-hw-handin h2, .bc-hw-result h2 { margin: 0 0 8px; font: 700 18px Outfit, sans-serif; }
.bc-hw-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.bc-hw-progress { margin: 8px 0 !important; font-weight: 600; color: var(--bc-text) !important; }
.bc-hw-progress.is-bad { color: var(--bc-red-text) !important; }
.bc-hw-pages { list-style: none; margin: 12px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.bc-hw-pages li { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--bc-line); background: #fff; aspect-ratio: 3 / 4; }
.bc-hw-pages img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.bc-hw-pages button { padding: 0; border: 0; background: none; width: 100%; height: 100%; cursor: zoom-in; }
.bc-hw-page-no { position: absolute; left: 6px; top: 6px; min-width: 22px; padding: 1px 6px; border-radius: 8px; background: rgba(7, 9, 19, .75); color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.bc-hw-page-tools { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 4px; }
.bc-hw-page-tools button { width: 30px; height: 30px; border-radius: 9px; background: rgba(7, 9, 19, .75); color: #fff; font-size: 14px; cursor: pointer; }
.bc-hw-page-tools button:hover { background: var(--bc-accent); }
.bc-hw-inked { position: absolute; right: 6px; top: 6px; padding: 1px 6px; border-radius: 8px; background: var(--bc-accent); color: #fff; font-size: 12px; }
.bc-hw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 0 !important; }
.bc-hw-actions .bc-hint { margin: 0 !important; }
.bc-hw-total { color: var(--bc-green-text); }
.bc-hw-marks { max-width: 420px; margin: 10px 0; }
.bc-hw-marks input.is-bad { outline: 2px solid var(--bc-accent); }
.bc-hw-comment { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--bc-tint-1); border-left: 3px solid var(--bc-accent); }
.bc-hw-comment p { margin: 6px 0 0 !important; }
.bc-hw-marked { display: grid; gap: 12px; margin-top: 8px; }
.bc-hw-marked-page { width: 100%; max-width: 820px; height: auto; border-radius: 10px; background: #fff; box-shadow: var(--bc-shadow); }
.bc-mark-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.bc-mark-ways h2 { margin: 0 0 6px !important; font-size: 16px; color: var(--bc-text); text-transform: none; letter-spacing: 0; }
.bc-hw-part { margin-bottom: 6px; }

/* 0.18.1: one mark per hand-in; the −1 stamp and the marks-lost counter in Zoom & write. */
.bc-ink .bc-ink-stamp { min-width: 40px; color: #FCA5A5; font: 800 15px Outfit, sans-serif; border: 2px solid rgba(220, 38, 38, .7); border-radius: 999px; }
.bc-ink .bc-ink-stamp.is-on { background: #DC2626; color: #fff; border-color: #DC2626; }
.bc-ink-tally { padding: 6px 12px; border-radius: 999px; background: rgba(220, 38, 38, .9); color: #fff; font: 800 14px Outfit, sans-serif; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.bc-ink-tally:empty { display: none; }
.bc-mark-total { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px !important; font: 700 18px Outfit, sans-serif; }
.bc-mark-total .bc-mark-score { width: 110px; font: 800 22px Outfit, sans-serif; text-align: center; }
.bc-mark-total strong { font-size: 22px; }
.bc-mark-out { color: var(--bc-muted); font-weight: 600; font-size: 15px; }

/* 0.18.2: marking toolbar (pen thicknesses, "−1 stamp", redo), grades, the in-app file viewer. */
.bc-ink-widths { display: inline-flex; gap: 2px; padding: 0 2px; }
.bc-ink .bc-ink-widths button { min-width: 30px; padding: 0 6px; }
.bc-ink-widths i { display: block; width: 18px; height: var(--d); border-radius: 999px; background: currentColor; }
.bc-ink .bc-ink-widths button.is-on { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 2px #fff; color: #fff; }
.bc-ink--marking .bc-ink-stamp { padding: 0 12px; font-size: 14px; }
.bc-mark-grade { display: flex; align-items: center; gap: 10px; margin: 0 0 4px !important; min-height: 34px; }
.bc-mark-grade span { font: 800 20px Outfit, sans-serif; color: var(--bc-text); }
.bc-mark-grade b { display: inline-grid; place-items: center; min-width: 46px; height: 34px; padding: 0 10px; border-radius: 999px; background: var(--bc-accent); color: #fff; font: 800 18px Outfit, sans-serif; }
.bc-mark-grade small { color: var(--bc-muted); font-size: 13px; }
.bc-hw-scorecard { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 6px; }
.bc-hw-scorecard-label { width: 100%; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--bc-muted); }
.bc-hw-scorecard .bc-hw-total { font: 800 34px Outfit, sans-serif; }
.bc-hw-pct { font: 800 24px Outfit, sans-serif; color: var(--bc-text-2); }
.bc-hw-grade { display: inline-grid; place-items: center; min-width: 54px; height: 44px; padding: 0 12px; border-radius: 999px; background: var(--bc-good); color: #fff; font: 800 24px Outfit, sans-serif; }
.bc-hw-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px !important; }
.bc-hw-view { display: grid; gap: 12px; justify-items: center; }
.bc-hw-view canvas, .bc-hw-view img { width: 100%; max-width: 900px; height: auto; background: #fff; border-radius: 8px; box-shadow: var(--bc-shadow); }

/* 0.18.3: Zoom & write — large drawn icons, thicknesses on their own row, bigger colours. */
.bc-ink button { min-width: 48px; height: 48px; border-radius: 14px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 8px; }
.bc-ink-icon { width: 26px; height: 26px; flex: none; }
.bc-ink .bc-ink-label { font-size: 11px; font-weight: 600; line-height: 1; opacity: .85; }
.bc-ink button[data-tool], .bc-ink button[data-a="undo"], .bc-ink button[data-a="redo"], .bc-ink button[data-a="clear"] { height: 58px; min-width: 58px; }
.bc-ink-pill--tools { gap: 4px; padding: 6px; border-radius: 22px; }
.bc-ink .bc-ink-sep { height: 40px; }
.bc-ink .bc-ink-stamp { flex-direction: row; gap: 6px; padding: 0 14px 0 8px; border: 2px solid rgba(220, 38, 38, .75); border-radius: 18px; color: #FCA5A5; }
.bc-ink-stamp-dot { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 3px solid currentColor; font: 800 16px Outfit, sans-serif; }
.bc-ink-stamp-word { font: 800 15px Outfit, sans-serif; }
.bc-ink .bc-ink-stamp.is-on { background: #DC2626; border-color: #DC2626; color: #fff; }
.bc-ink .bc-ink-colours { gap: 10px; padding: 2px 6px; }
.bc-ink .bc-ink-colours button { width: 34px; height: 34px; min-width: 0; }
.bc-ink-pill--widths { gap: 4px; padding: 4px 6px; }
.bc-ink-pill--widths button { min-width: 64px; height: 48px; gap: 6px; }
.bc-ink-pill--widths i { display: block; width: 34px; height: var(--d); border-radius: 999px; background: currentColor; }
.bc-ink-pill--widths span { font: 700 11px "Plus Jakarta Sans", sans-serif; opacity: .8; }
.bc-ink .bc-ink-pill--widths button.is-on { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 2px #fff; }
.bc-ink .bc-ink-close { flex-direction: row; gap: 6px; height: 48px; padding: 0 18px; font-size: 15px; }
.bc-ink .bc-ink-close .bc-ink-icon { width: 22px; height: 22px; }
.bc-ink-bottom .bc-ink-pill button { height: 48px; min-width: 48px; }
.bc-ink-zoom, .bc-ink-page { font-size: 14px; }
@media (max-width: 760px) {
	.bc-ink .bc-ink-label { display: none; }
	.bc-ink button[data-tool], .bc-ink button[data-a="undo"], .bc-ink button[data-a="redo"], .bc-ink button[data-a="clear"] { height: 50px; min-width: 50px; padding: 0 6px; }
	.bc-ink-icon { width: 26px; height: 26px; }
	.bc-ink-pill--tools { justify-content: center; max-width: calc(100vw - 20px); }
	.bc-ink-top { top: 66px; }
}

/* 0.18.4: colours and thicknesses appear when wanted, with a smooth slide and fade. */
.bc-ink-pill--colours, .bc-ink-pill--widths { opacity: 0; visibility: hidden; pointer-events: none !important; transform: translateY(-10px) scale(.96); transition: opacity .22s ease, transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .26s; }
.bc-ink-pill--colours.is-open, .bc-ink-pill--widths.is-open { opacity: 1; visibility: visible; pointer-events: auto !important; transform: none; transition: opacity .22s ease, transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.bc-ink-pill--widths.is-open { transition-delay: .04s; }
@media (prefers-reduced-motion: reduce) { .bc-ink-pill--colours, .bc-ink-pill--widths { transition: none; } }

/* 0.18.5: the zoom and page controls fade away a second after the reader stops moving over the page. */
.bc-ink-bottom { transition: opacity .3s ease, transform .3s ease; }
.bc-ink-bottom:not(.is-shown) { opacity: 0; transform: translate(-50%, 8px); }
.bc-ink-bottom:not(.is-shown) .bc-ink-pill { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .bc-ink-bottom { transition: none; } }

/* ---------- 0.18.5: stickers, typed comments ---------- */
.bc-ink-pill--stickers { display: block; width: min(560px, calc(100vw - 20px)); padding: 8px; opacity: 0; visibility: hidden; pointer-events: none !important; transform: translateY(-10px) scale(.96); transition: opacity .22s ease, transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .26s; }
.bc-ink-pill--stickers.is-open { opacity: 1; visibility: visible; pointer-events: auto !important; transform: none; transition: opacity .22s ease, transform .26s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
@media (prefers-reduced-motion: reduce) { .bc-ink-pill--stickers { transition: none; } }
.bc-ink-sticker-tabs { display: flex; gap: 4px; margin-bottom: 8px; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.bc-ink .bc-ink-sticker-tabs button { flex: 1; height: 36px; border-radius: 9px; font: 700 13px "Plus Jakarta Sans", sans-serif; color: #cbd5e1; }
.bc-ink .bc-ink-sticker-tabs button.is-on { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: none; }
.bc-ink-sticker-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: min(42vh, 320px); overflow-y: auto; padding: 4px; }
.bc-ink .bc-ink-sticker-word { height: 40px; padding: 0 12px; border-radius: 999px; background: var(--bg, #334155); color: #fff; font: 700 13px "Plus Jakarta Sans", sans-serif; white-space: nowrap; }
.bc-ink .bc-ink-sticker-word.is-on, .bc-ink .bc-ink-sticker-pic button.is-on { box-shadow: 0 0 0 2px #0E1122, 0 0 0 4px #fff; }
.bc-ink-sticker-pic { position: relative; display: inline-flex; }
.bc-ink .bc-ink-sticker-pic > button:first-child { width: 64px; height: 64px; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, .92); }
.bc-ink-sticker-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bc-ink .bc-ink-sticker-del { position: absolute; top: -6px; right: -6px; width: 24px !important; min-width: 0 !important; height: 24px !important; padding: 0; border-radius: 50%; background: #B91C1C; color: #fff; font-size: 12px; line-height: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.bc-ink-sticker-add { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border: 2px dashed rgba(255, 255, 255, .35); border-radius: 12px; color: #fff; font: 700 12px "Plus Jakarta Sans", sans-serif; text-align: center; cursor: pointer; }
.bc-ink-sticker-add:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }
.bc-ink-sticker-add.is-busy { opacity: .5; pointer-events: none; }
.bc-ink-sticker-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bc-ink-sticker-empty { flex: 1 1 200px; align-self: center; color: #cbd5e1; font-size: 13px; line-height: 1.4; }
.bc-ink-textbox { position: absolute; z-index: 30; display: grid; gap: 8px; width: min(320px, calc(100vw - 24px)); padding: 10px; border-radius: 14px; background: rgba(14, 17, 34, .97); border: 1px solid var(--bc-line); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
.bc-ink-textbox textarea { width: 100%; min-height: 72px; resize: vertical; padding: 8px 10px; border-radius: 10px; border: 1px solid #3b3f66; background: #0b0e1c; color: #fff; font: 500 16px "Plus Jakarta Sans", sans-serif; }
.bc-ink-textbox textarea:focus { outline: 2px solid #fff; outline-offset: 1px; }
.bc-ink-textbox-row { display: flex; justify-content: flex-end; gap: 6px; }
.bc-ink .bc-ink-textbox-row button { height: 38px; padding: 0 16px; border-radius: 10px; font: 700 14px "Plus Jakarta Sans", sans-serif; color: #e2e8f0; background: rgba(255, 255, 255, .08); }
.bc-ink .bc-ink-textbox-row button.is-on { background: var(--bc-accent); color: #fff; box-shadow: none; }

/* ---------- 0.18.5: marking directory ---------- */
.bc-mark-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; color: var(--bc-muted); }
.bc-mark-crumbs a { color: var(--bc-muted); text-decoration: none; font-weight: 600; }
.bc-mark-crumbs a:hover { color: var(--bc-text); text-decoration: underline; }
.bc-mark-crumbs > span:last-child { color: var(--bc-text); font-weight: 700; }
.bc-mark-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.bc-mark-stat { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--bc-card); border: 1px solid var(--bc-line); color: var(--bc-text); text-decoration: none; }
.bc-mark-stat strong { font: 800 28px/1.1 Outfit, sans-serif; }
.bc-mark-stat span { color: var(--bc-muted); font-size: 13px; font-weight: 600; }
.bc-mark-stat.is-due { border-color: rgba(245, 158, 11, .55); background: linear-gradient(135deg, rgba(245, 158, 11, .14), transparent 70%), var(--bc-card); }
.bc-mark-stat.is-due strong { color: var(--bc-yellow-text); }
a.bc-mark-stat:hover { border-color: var(--bc-yellow-text); }
.bc-mark-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; }
.bc-mark-tools .bc-input { flex: 1 1 240px; max-width: 420px; margin: 0; }
.bc-mark-cohort { margin: 0 0 18px; }
.bc-mark-cohort h2 { margin: 0 0 8px !important; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--bc-muted); }
.bc-mark-folders, .bc-mark-rows { display: grid; gap: 6px; }
.bc-mark-folder, .bc-mark-row { display: grid; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bc-card); border: 1px solid var(--bc-line); color: var(--bc-text); text-decoration: none; transition: border-color .15s, background .15s; }
.bc-mark-folder:hover, .bc-mark-row:hover { border-color: var(--bc-muted); }
.bc-mark-folder[hidden], .bc-mark-row[hidden], .bc-mark-cohort[hidden] { display: none; }
.bc-mark-folder { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.bc-mark-folder.has-due { border-left: 4px solid #F59E0B; }
.bc-mark-folder-icon { font-size: 22px; }
.bc-mark-folder-main, .bc-mark-row-name { display: grid; gap: 1px; min-width: 0; }
.bc-mark-folder-main strong, .bc-mark-row-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-mark-folder-main .bc-hint, .bc-mark-row-name .bc-hint { margin: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-mark-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.bc-mark-count { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: rgba(148, 163, 184, .14); color: var(--bc-muted); }
.bc-mark-count.is-due { background: rgba(245, 158, 11, .18); color: var(--bc-yellow-text); }
.bc-mark-count.is-marking { background: rgba(59, 130, 246, .15); color: var(--bc-blue-text); }
.bc-mark-count.is-missing { background: rgba(239, 68, 68, .13); color: var(--bc-red-text); }
.bc-mark-count.is-clear { background: rgba(34, 197, 94, .15); color: var(--bc-green-text); }
.bc-mark-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 48px minmax(0, 1.1fr) auto auto; padding: 8px 14px; }
.bc-mark-row-when, .bc-mark-row-pages, .bc-mark-row-marker { font-size: 13px; color: var(--bc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-mark-row.is-submitted { border-left: 4px solid #F59E0B; }
.bc-mark-row.is-marking { border-left: 4px solid #3B82F6; }
.bc-mark-tabs { margin: 10px 0 12px; }
@media (max-width: 720px) {
	.bc-mark-summary { gap: 6px; }
	.bc-mark-stat { padding: 10px 12px; }
	.bc-mark-stat strong { font-size: 22px; }
	.bc-mark-stat span { font-size: 12px; }
	.bc-mark-folder { grid-template-columns: auto minmax(0, 1fr) auto; }
	.bc-mark-folder .bc-mark-counts { grid-column: 2 / 4; justify-content: flex-start; }
	.bc-mark-folder .bc-card-go { grid-row: 1; grid-column: 3; }
	.bc-mark-row { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 2px; }
	.bc-mark-row-when { grid-column: 1; grid-row: 2; }
	.bc-mark-row-pages { display: none; }
	.bc-mark-row-marker { grid-column: 2 / 4; grid-row: 2; text-align: right; }
	.bc-mark-row-result { grid-column: 2; grid-row: 1; }
	.bc-mark-row .bc-card-go { grid-column: 3; grid-row: 1; }
}

/* ---------- 0.18.5: what students are notified about ---------- */
.bc-push-kind-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 14px; color: var(--bc-text-2); }

/* 0.18.5: the longer toolbar sits under Done (and the mark tally) until the screen is wide enough for both. */
@media (max-width: 1360px) { .bc-ink-top { top: 70px; } }

/* 0.18.5: on phones the less-used tools sit in a "More" menu; on wider screens they stay in the row. */
.bc-ink-more, .bc-ink-more-menu { display: contents; }
.bc-ink .bc-ink-more-btn { display: none; }
@media (max-width: 760px) {
	.bc-ink-pill--tools { flex-wrap: nowrap; }
	.bc-ink-pill--tools > .bc-ink-sep { display: none; }
	.bc-ink-more { display: block; position: relative; order: 20; }
	.bc-ink .bc-ink-more-btn { display: inline-flex; height: 50px; min-width: 50px; padding: 0 6px; }
	.bc-ink .bc-ink-more-btn.is-on { background: var(--bc-accent); color: #fff; }
	.bc-ink-more.is-open .bc-ink-more-btn { background: rgba(255, 255, 255, .14); }
	.bc-ink-more-menu { position: absolute; top: calc(100% + 10px); right: -6px; z-index: 6; display: grid; gap: 2px; min-width: 190px; padding: 6px; border-radius: 16px; background: rgba(14, 17, 34, .98); border: 1px solid var(--bc-line); box-shadow: 0 14px 34px rgba(0, 0, 0, .55); opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.97); transform-origin: top right; transition: opacity .2s ease, transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .24s; }
	.bc-ink-more.is-open .bc-ink-more-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
	.bc-ink .bc-ink-more-menu button { flex-direction: row; justify-content: flex-start; gap: 12px; width: 100%; height: 48px; padding: 0 12px; border-radius: 11px; }
	.bc-ink .bc-ink-more-menu .bc-ink-label { display: inline; font-size: 15px; opacity: 1; }
	.bc-ink .bc-ink-stamp { padding: 0 4px; }
	.bc-ink .bc-ink-stamp-word { display: none; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .bc-ink-more-menu { transition: none; } }

/* 0.18.6: the tick sits beside the −1 stamp on phones too; slimmer buttons so the bar still fits. */
@media (max-width: 420px) {
	.bc-ink-pill--tools { gap: 2px; padding: 5px; }
	.bc-ink .bc-ink-pill--tools > button, .bc-ink .bc-ink-more-btn { min-width: 44px; height: 48px; padding: 0 3px; }
	.bc-ink .bc-ink-stamp-dot { width: 34px; height: 34px; font-size: 15px; }
}

/* ---------- 0.19.0: assistants ---------- */
.bc-assistants-table tr.is-off td { opacity: .6; }
.bc-assistants-table .bc-kid { display: inline-block; margin: 2px 4px 2px 0; }
.bc-assistant-page .bc-panel { margin: 0 0 16px; }
.bc-assistant-page .bc-panel h2 { margin-top: 0; }
.bc-assistant-page .bc-inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-cover { margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--bc-line); border-radius: 12px; background: var(--bc-card); }
.bc-cover legend { padding: 0 6px; }
.bc-cover:not(.is-on) .bc-cover-body { display: none; }
.bc-cover.is-on { border-color: var(--bc-accent); }
.bc-cover-body { display: grid; gap: 8px; padding-top: 4px; }
.bc-cover-students { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: rgba(148, 163, 184, .08); }
.bc-cover-students[hidden] { display: none; }
.bc-cover-students .bc-input { max-width: 320px; margin: 0; }
.bc-cover-tools { font-size: 13px; color: var(--bc-muted); }
.bc-link { padding: 0; border: 0; background: none; color: var(--bc-sky-text); font: inherit; font-weight: 600; cursor: pointer; }
.bc-link:hover { text-decoration: underline; }
.bc-cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; max-height: 360px; overflow-y: auto; }
.bc-cover-grid label[hidden] { display: none; }
.bc-replace { border-color: rgba(239, 68, 68, .35); }
.bc-mark-push { margin: 20px 0 0; padding: 10px 14px; border: 1px solid var(--bc-line); border-radius: 12px; background: var(--bc-card); }
.bc-mark-push summary { cursor: pointer; font-weight: 700; }
.bc-mark-push .bc-push-panel { margin-top: 10px; border: 0; padding: 0; background: none; box-shadow: none; }

/* ---------- 0.20.0: cover, marking report, past homework, editing an assistant ---------- */
.bc-kid--cover { background: rgba(59, 130, 246, .15); color: var(--bc-blue-text); }
.bc-kid--away { background: rgba(245, 158, 11, .15); color: var(--bc-yellow-text); }
.bc-cover-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; }
.bc-cover-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.bc-cover-add .bc-input { width: auto; margin: 0; }
.bc-cover-note { margin: 0 0 12px; }
.bc-mark-report { margin: 14px 0 20px; }
.bc-mark-report h3 { margin: 16px 0 6px; font-size: 15px; }
.bc-assistant-edit { margin-top: 12px; }
.bc-assistant-edit summary { cursor: pointer; font-weight: 700; }
.bc-past { margin: 14px 0 22px; }
.bc-past-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.bc-past-bulk .bc-btn, .bc-past-table .bc-btn { cursor: pointer; }
.bc-past-review { margin: 10px 0; padding: 12px; border-radius: 12px; border: 1px solid var(--bc-line); background: rgba(148, 163, 184, .06); }
.bc-past-review tr.is-unmatched td { background: rgba(239, 68, 68, .08); }
.bc-past-review select { max-width: 100%; }
.bc-past-progress { padding: 8px 12px; border-radius: 10px; background: rgba(59, 130, 246, .12); color: var(--bc-blue-text); font-weight: 600; }
.bc-past-progress.is-bad { background: rgba(239, 68, 68, .12); color: var(--bc-red-text); }
.bc-hw-state.is-none { background: rgba(148, 163, 184, .12); color: var(--bc-muted); }

/* ---------- 0.21.0: quizzes ---------- */
.bc-hw-state.is-soon { background: rgba(148, 163, 184, .14); color: var(--bc-text-2); }
.bc-hw-state.is-ready { background: rgba(168, 85, 247, .16); color: var(--bc-violet); }
.bc-hw-state.is-open { background: rgba(239, 68, 68, .16); color: var(--bc-red-text); }
.bc-hw-card.is-open { border-left: 4px solid var(--bc-accent); }
.bc-hw-card.is-ready { border-left: 4px solid var(--bc-violet); }
.bc-hw-card.is-soon { border-left: 4px solid var(--bc-line); }
.bc-hw-group { margin: 18px 0 8px !important; font-size: 15px; color: var(--bc-text); text-transform: none; letter-spacing: 0; }
.bc-quiz-clock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 10px 0; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-card); font-weight: 600; }
.bc-quiz-clock strong { font: 800 24px/1.1 Outfit, sans-serif; color: var(--bc-text); }
.bc-quiz-clock.is-ready { border-color: var(--bc-violet); }
.bc-quiz-clock.is-open { border-color: var(--bc-accent); }
.bc-quiz-clock.is-open strong { color: var(--bc-red-text); }
.bc-hw-kinds { margin: 4px 0 12px; }
.bc-markby { display: grid; gap: 8px; }
.bc-markby .bc-pick--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bc-markby .bc-input--small { width: 70px; margin: 0; }

/* ---------- 0.22.0: upload tracker, quiz timers, several classes, release ---------- */
.bc-up { margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-card); }
.bc-up.is-done { border-color: rgba(34, 197, 94, .5); }
.bc-up.is-bad { border-color: rgba(239, 68, 68, .55); }
.bc-up-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; font-size: 14px; }
.bc-up-head span { color: var(--bc-muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.bc-up-bar, .bc-up-file { display: block; height: 8px; border-radius: 999px; background: rgba(148, 163, 184, .18); overflow: hidden; }
.bc-up-bar i, .bc-up-file i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--bc-accent), #F97316); transition: width .25s ease; }
.bc-up.is-done .bc-up-bar i { background: var(--bc-good); }
.bc-up-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; max-height: 320px; overflow-y: auto; }
.bc-up-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; font-size: 13px; }
.bc-up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.bc-up-size { color: var(--bc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bc-up-file { grid-column: 1 / -1; height: 5px; }
.bc-up-state { grid-column: 1 / -1; color: var(--bc-muted); font-size: 12px; }
.bc-up-list li.is-wait { opacity: .65; }
.bc-up-list li.is-done .bc-up-file i { background: var(--bc-good); }
.bc-up-list li.is-done .bc-up-state { color: var(--bc-green-text); }
.bc-up-list li.is-bad .bc-up-state { color: var(--bc-red-text); font-weight: 700; }
.bc-hw-timer { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: rgba(148, 163, 184, .14); color: var(--bc-text-2); }
.bc-hw-timer.is-open { background: rgba(239, 68, 68, .16); color: var(--bc-red-text); }
.bc-hw-classes { display: grid; gap: 6px; max-width: 560px; }
.bc-hw-classes .bc-input { margin: 0; }
.bc-hw-classes-list { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; padding: 6px 8px; border: 1px solid var(--bc-line); border-radius: 10px; }
.bc-hw-classes-list label[hidden] { display: none; }
.bc-quiz-content { border-left: 4px solid var(--bc-violet); }
.bc-mark-release { margin: 16px 0 0; padding: 10px 14px; border: 1px dashed var(--bc-line); border-radius: 12px; }
.bc-mark-release summary { cursor: pointer; font-weight: 700; color: var(--bc-muted); }
a.bc-mark-stat:hover { border-color: var(--bc-muted); }
.bc-mark-order { margin: 10px 0 14px; padding: 10px 14px; border: 1px solid var(--bc-line); border-radius: 12px; background: var(--bc-card); }
.bc-mark-order summary { cursor: pointer; font-weight: 700; }
.bc-order-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 10px 0; padding: 0; list-style: none; }
.bc-order-list li { position: relative; display: grid; gap: 4px; padding: 6px; border-radius: 10px; border: 1px solid var(--bc-line); background: rgba(148, 163, 184, .06); }
.bc-order-list img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: #fff; }
.bc-order-no { font-weight: 800; font-size: 13px; }
.bc-order-no small { color: var(--bc-yellow-text); font-weight: 700; }
.bc-order-tools { display: flex; gap: 4px; }
.bc-order-tools button { flex: 1; height: 34px; border-radius: 8px; border: 1px solid var(--bc-line); background: var(--bc-surface); color: var(--bc-text); font-size: 16px; cursor: pointer; }
.bc-order-tools button:disabled { opacity: .35; cursor: default; }
.bc-mark-row-name .bc-hw-timer, .bc-mark-folder-main .bc-hw-timer { justify-self: start; margin-top: 3px; }

/* 0.22.2: every timer in red; "Not handed in" under All */
.bc-hw-timer, .bc-hw-timer.is-open { background: rgba(239, 68, 68, .16); color: var(--bc-red-text); }
.bc-mark-missing-title { margin: 14px 0 6px; font-size: 14px; color: var(--bc-muted); }

/* ---------- 0.23.0: parent dashboard ---------- */
.bc-child-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.bc-child-tab-photo { width: 24px; height: 24px; border-radius: 50%; }
.bc-child-head { display: flex; align-items: center; gap: 14px; margin: 16px 0 10px; }
.bc-child-head h2 { margin: 0 !important; font-size: 20px; text-transform: none; letter-spacing: 0; color: var(--bc-text); }
.bc-child-head .bc-hint { margin: 2px 0 0; }
.bc-child-photo { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.bc-child-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.bc-child-stat { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-card); }
.bc-child-stat strong { font: 800 26px/1.1 Outfit, sans-serif; color: var(--bc-text); }
.bc-child-stat strong small { font-size: 15px; color: var(--bc-muted); font-weight: 700; }
.bc-child-stat strong b { display: inline-grid; place-items: center; min-width: 34px; height: 26px; margin-left: 4px; padding: 0 8px; border-radius: 999px; background: var(--bc-accent); color: #fff; font-size: 15px; vertical-align: middle; }
.bc-child-stat span { color: var(--bc-muted); font-size: 13px; font-weight: 600; }
.bc-child-stat.is-bad strong { color: var(--bc-red-text); }
.bc-coming { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bc-coming-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bc-line); background: var(--bc-card); }
.bc-coming-item a { color: inherit; text-decoration: none; display: grid; gap: 2px; flex: 1; min-width: 0; }
.bc-coming-item > span:last-child { display: grid; gap: 2px; }
.bc-coming-item .bc-hint { margin: 0; font-size: 13px; }
.bc-coming-item .bc-hw-timer { justify-self: start; }
.bc-coming-icon { font-size: 18px; line-height: 1.4; }
.bc-coming-item.is-quiz { border-left: 4px solid var(--bc-violet); }
.bc-coming-item.is-live { border-left: 4px solid var(--bc-accent); }
.bc-parent-soon { opacity: .8; }
@media (max-width: 720px) {
	.bc-child-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.bc-child-stat strong { font-size: 22px; }
}

/* ---------- 0.24.0: parent dashboard visuals, Arabic, attendance ---------- */
.bc-parent { --t-blue: #3B82F6; --t-green: #16A34A; --t-red: #EF4444; --t-purple: #A855F7; --t-amber: #F59E0B; --t-teal: #0EA5A4; --t-grey: #94A3B8; }
.bc-parent[dir="rtl"], .bc-parent[dir="rtl"] h1, .bc-parent[dir="rtl"] h2, .bc-parent[dir="rtl"] strong, .bc-parent[dir="rtl"] .bc-btn { font-family: Cairo, "Plus Jakarta Sans", sans-serif; letter-spacing: 0; }
.bc-lang-switch { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.bc-lang-switch a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--bc-line); background: var(--bc-card); color: var(--bc-text); font-weight: 700; font-size: 14px; text-decoration: none; box-shadow: var(--bc-shadow); }
.bc-lang-switch a:hover { border-color: var(--t-blue); }
.bc-parent-hero { background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(168, 85, 247, .18) 55%, rgba(239, 68, 68, .14)), var(--bc-card) !important; }

/* chips */
.bc-pchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bc-pchip { --c: var(--t-grey); display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bc-pchip i { font-style: normal; }
.bc-pchip.is-blue { --c: var(--t-blue); } .bc-pchip.is-green { --c: var(--t-green); } .bc-pchip.is-red { --c: var(--t-red); }
.bc-pchip.is-purple { --c: var(--t-purple); } .bc-pchip.is-amber { --c: #D97706; } .bc-pchip.is-teal { --c: var(--t-teal); } .bc-pchip.is-grey { --c: var(--bc-muted); }

/* date box */
.bc-datebox { --c: var(--t-grey); flex: none; display: grid; justify-items: center; align-content: center; width: 58px; min-height: 64px; padding: 4px 2px; border-radius: 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, #fff 0%), color-mix(in srgb, var(--c) 70%, #000 10%)); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 35%, transparent); text-align: center; }
.bc-datebox strong { font: 800 22px/1.05 Outfit, Cairo, sans-serif; }
.bc-datebox small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; opacity: .92; line-height: 1.2; }
.bc-datebox.is-blue { --c: var(--t-blue); } .bc-datebox.is-red { --c: var(--t-red); } .bc-datebox.is-purple { --c: var(--t-purple); }
.bc-datebox.is-green { --c: var(--t-green); } .bc-datebox.is-amber { --c: var(--t-amber); } .bc-datebox.is-grey { --c: #64748B; }

/* summary tiles */
.bc-child-head { display: flex; align-items: center; gap: 14px; margin: 18px 0 12px; }
.bc-child-head h2 { margin: 0 !important; font-size: 21px; text-transform: none; letter-spacing: 0; color: var(--bc-text); }
.bc-child-photo { width: 58px; height: 58px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--bc-card), 0 0 0 5px var(--t-blue); }
.bc-ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 20px; }
.bc-ptile { --c: var(--t-grey); position: relative; display: grid; gap: 4px; padding: 14px 16px 16px; border-radius: 18px; overflow: hidden; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 20%, transparent), color-mix(in srgb, var(--c) 6%, transparent) 70%), var(--bc-card); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.bc-ptile::after { content: ""; position: absolute; inset-inline-end: -26px; top: -26px; width: 90px; height: 90px; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, transparent); }
.bc-ptile-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--c); color: #fff; font-size: 19px; box-shadow: 0 6px 14px color-mix(in srgb, var(--c) 40%, transparent); }
.bc-ptile strong { font: 800 30px/1.1 Outfit, Cairo, sans-serif; color: var(--bc-text); }
.bc-ptile strong small { font-size: 16px; color: var(--bc-muted); }
.bc-ptile strong b { display: inline-grid; place-items: center; min-width: 36px; height: 28px; margin-inline-start: 8px; padding: 0 9px; border-radius: 999px; background: var(--c); color: #fff; font-size: 16px; vertical-align: middle; }
.bc-ptile-label { color: var(--bc-text-2); font-size: 13px; font-weight: 700; }
.bc-ptile-bar { display: block; height: 7px; margin-top: 4px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); overflow: hidden; }
.bc-ptile-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.bc-ptile .bc-pchip { justify-self: start; }
.bc-ptile.is-blue { --c: var(--t-blue); } .bc-ptile.is-green { --c: var(--t-green); } .bc-ptile.is-red { --c: var(--t-red); }
.bc-ptile.is-purple { --c: var(--t-purple); } .bc-ptile.is-teal { --c: var(--t-teal); } .bc-ptile.is-grey { --c: #64748B; }

/* blocks */
.bc-pblock { margin: 0 0 22px; }
.bc-pblock-title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px !important; font: 800 18px Outfit, Cairo, sans-serif !important; color: var(--bc-text) !important; text-transform: none !important; letter-spacing: 0 !important; }
.bc-pblock-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 17px; }
.bc-pblock-icon.is-red { background: color-mix(in srgb, var(--t-red) 18%, transparent); }
.bc-pblock-icon.is-teal { background: color-mix(in srgb, var(--t-teal) 18%, transparent); }
.bc-pblock-icon.is-blue { background: color-mix(in srgb, var(--t-blue) 18%, transparent); }
.bc-pempty { padding: 16px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--t-blue) 40%, transparent); background: color-mix(in srgb, var(--t-blue) 6%, transparent); color: var(--bc-text-2); font-weight: 600; }

/* coming up */
.bc-pcoming-list, .bc-pwork-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bc-pcoming { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; background: var(--bc-card); border: 1px solid var(--bc-line); box-shadow: var(--bc-shadow); }
.bc-pcoming-main { display: grid; gap: 2px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.bc-pcoming-main strong { font-size: 15.5px; color: var(--bc-text); }
.bc-pcoming.is-live { border-inline-start: 5px solid var(--t-red); }
.bc-pcoming.is-quiz { border-inline-start: 5px solid var(--t-purple); }
.bc-pcoming.is-hw { border-inline-start: 5px solid var(--t-blue); }
.bc-pcoming .bc-hw-timer { justify-self: start; margin-top: 6px; }

/* work list */
.bc-pwork { --c: var(--t-grey); display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; background: var(--bc-card); border: 1px solid var(--bc-line); border-inline-start: 5px solid var(--c); color: inherit; text-decoration: none; box-shadow: var(--bc-shadow); transition: transform .15s ease, border-color .15s; }
.bc-pwork:hover { transform: translateY(-1px); border-color: var(--c); }
.bc-pwork.is-green { --c: var(--t-green); } .bc-pwork.is-blue { --c: var(--t-blue); } .bc-pwork.is-red { --c: var(--t-red); }
.bc-pwork.is-purple { --c: var(--t-purple); } .bc-pwork.is-amber { --c: var(--t-amber); }
.bc-pwork-main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bc-pwork-main strong { font-size: 15.5px; color: var(--bc-text); }
.bc-pscore { flex: none; display: grid; justify-items: center; gap: 1px; min-width: 68px; padding: 6px 8px; border-radius: 14px; background: color-mix(in srgb, var(--t-green) 14%, transparent); border: 1px solid color-mix(in srgb, var(--t-green) 35%, transparent); }
.bc-pscore strong { font: 800 18px/1 Outfit, sans-serif; color: var(--t-green); }
.bc-pscore b { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--t-green); color: #fff; font-size: 13px; }
.bc-pscore small { font-size: 11px; color: var(--bc-muted); font-weight: 700; }
.bc-parent[dir="rtl"] .bc-card-go { transform: scaleX(-1); }

/* attendance */
.bc-patt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px; border-radius: 18px; background: linear-gradient(150deg, color-mix(in srgb, var(--t-teal) 14%, transparent), transparent 70%), var(--bc-card); border: 1px solid color-mix(in srgb, var(--t-teal) 30%, transparent); }
.bc-pring { --p: 0; display: grid; place-items: center; align-content: center; width: 116px; height: 116px; border-radius: 50%; background: radial-gradient(closest-side, var(--bc-card) 76%, transparent 77% 100%), conic-gradient(var(--t-teal) calc(var(--p) * 1%), color-mix(in srgb, var(--t-teal) 15%, transparent) 0); }
.bc-pring strong { font: 800 26px/1 Outfit, sans-serif; color: var(--bc-text); }
.bc-pring small { font-size: 12px; font-weight: 700; color: var(--bc-muted); }
.bc-patt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.bc-patt-list li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
.bc-patt-list .bc-datebox { width: 46px; min-height: 52px; border-radius: 11px; }
.bc-patt-list .bc-datebox strong { font-size: 17px; }
.bc-patt-list li span { display: grid; gap: 1px; }
.bc-patt-list li strong { font-size: 14px; }
.bc-patt-list li.is-green strong { color: var(--t-green); } .bc-patt-list li.is-red strong { color: var(--t-red); } .bc-patt-list li.is-amber strong { color: #D97706; }
.bc-patt-list li small { font-size: 12px; color: var(--bc-muted); font-weight: 600; }

/* coming soon cards */
.bc-psoon { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0 0 20px; }
.bc-psoon-card { --c: var(--t-grey); display: grid; gap: 6px; padding: 16px; border-radius: 18px; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 75%), var(--bc-card); border: 1px dashed color-mix(in srgb, var(--c) 45%, transparent); }
.bc-psoon-card > span { font-size: 26px; }
.bc-psoon-card strong { font: 800 16px Outfit, Cairo, sans-serif; color: var(--bc-text); }
.bc-psoon-card small { color: var(--bc-text-2); font-weight: 600; }
.bc-psoon-card .bc-pchip { justify-self: start; }
.bc-psoon-card.is-amber { --c: var(--t-amber); } .bc-psoon-card.is-purple { --c: var(--t-purple); }
.bc-pmeta { margin: 6px 0 14px; }

@media (max-width: 720px) {
	.bc-ptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.bc-ptile { padding: 12px; }
	.bc-ptile strong { font-size: 24px; }
	.bc-ptile-icon { width: 32px; height: 32px; font-size: 16px; }
	.bc-patt { grid-template-columns: 1fr; justify-items: center; }
	.bc-patt-side { width: 100%; }
	.bc-pcoming, .bc-pwork { gap: 10px; padding: 8px 10px; }
	.bc-datebox { width: 52px; min-height: 58px; }
	.bc-pscore { min-width: 58px; }
}

/* attendance pages (staff) */
.bc-att-google { margin: 0 0 18px; }
.bc-att-google summary { cursor: pointer; font-weight: 800; }
.bc-att-steps { margin: 10px 0; padding-inline-start: 20px; line-height: 1.6; }
.bc-att-steps code { word-break: break-all; }
.bc-att-google-form, .bc-att-rules { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0; }
.bc-att-google-form label { display: grid; gap: 3px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); }
.bc-att-google-form .bc-input { margin: 0; min-width: 260px; }
.bc-att-rules .bc-input--small { width: 72px; margin: 0; }
.bc-att-cohort { margin: 0 0 20px; }
.bc-att-cohort h2 { margin: 0 0 8px !important; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--bc-muted); }
.bc-att-events { display: grid; gap: 6px; }
.bc-att-event { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bc-card); border: 1px solid var(--bc-line); border-inline-start: 4px solid var(--bc-line); color: var(--bc-text); text-decoration: none; }
.bc-att-event.is-meet { border-inline-start-color: #14B8A6; }
.bc-att-event.is-manual { border-inline-start-color: #3B82F6; }
.bc-att-event.is-none { border-inline-start-color: #F59E0B; }
.bc-att-event-main { display: grid; gap: 1px; min-width: 0; }
.bc-att-event-main .bc-hint { margin: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-att-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.bc-att-chip { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(148, 163, 184, .14); color: var(--bc-muted); white-space: nowrap; }
.bc-att-chip.is-present { background: rgba(34, 197, 94, .15); color: var(--bc-green-text); }
.bc-att-chip.is-late, .bc-att-chip.is-partial { background: rgba(245, 158, 11, .18); color: var(--bc-yellow-text); }
.bc-att-chip.is-absent { background: rgba(239, 68, 68, .14); color: var(--bc-red-text); }
.bc-att-chip.is-unmatched { background: rgba(168, 85, 247, .16); color: var(--bc-violet); }
.bc-att-match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 260px) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--bc-line); }
.bc-att-match-row .bc-input { margin: 0; }
.bc-att-match-name { display: grid; gap: 1px; }
.bc-att-match-name .bc-hint { margin: 0; font-size: 12px; }
.bc-att-status { margin: 0; min-width: 130px; font-weight: 700; }
.bc-att-status.is-present { color: var(--bc-green-text); }
.bc-att-status.is-late, .bc-att-status.is-partial { color: var(--bc-yellow-text); }
.bc-att-status.is-absent { color: var(--bc-red-text); }
.bc-att-status.is-changed { outline: 2px solid #F59E0B; }
@media (max-width: 720px) {
	.bc-att-event { grid-template-columns: minmax(0, 1fr) auto; }
	.bc-att-event .bc-att-chips { grid-column: 1 / -1; justify-content: flex-start; }
	.bc-att-match-row { grid-template-columns: 1fr; }
}

/* ---------- 0.25.0: attendance cards side by side (OL | AS), past classes ---------- */
.bc-att-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.bc-att-grid .bc-att-cohort { margin: 0; padding: 14px; border-radius: 18px; border: 1px solid var(--bc-line); background: var(--bc-card); box-shadow: var(--bc-shadow); }
.bc-att-cohort.is-ol { border-top: 5px solid #3B82F6; }
.bc-att-cohort.is-as { border-top: 5px solid #A855F7; }
.bc-att-cohort.is-al { border-top: 5px solid #F59E0B; }
.bc-att-grid .bc-att-cohort h2 { display: flex; align-items: center; gap: 8px; color: var(--bc-text) !important; font-size: 14px; }
.bc-att-level { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 8px; border-radius: 8px; color: #fff; font: 800 13px Outfit, sans-serif; letter-spacing: .03em; background: #64748B; }
.bc-att-cohort.is-ol .bc-att-level { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.bc-att-cohort.is-as .bc-att-level { background: linear-gradient(135deg, #A855F7, #7E22CE); }
.bc-att-cohort.is-al .bc-att-level { background: linear-gradient(135deg, #F59E0B, #B45309); }
.bc-att-add, .bc-att-edit { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--bc-line); }
.bc-att-add summary, .bc-att-edit summary { cursor: pointer; font-weight: 800; }
.bc-att-add-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 10px 0; padding-top: 8px; border-top: 1px solid var(--bc-line); }
.bc-att-add-form > strong { flex-basis: 100%; font-size: 13px; }
.bc-att-add-form label { display: grid; gap: 3px; font-size: 12px; font-weight: 700; color: var(--bc-text-2); }
.bc-att-add-form .bc-input { margin: 0; }
.bc-att-add-title { flex: 1 1 200px; }
.bc-att-grid .bc-att-events { max-height: 560px; overflow-y: auto; padding-inline-end: 2px; }
@media (max-width: 720px) { .bc-att-grid { grid-template-columns: 1fr; } }

/* ---------- 0.25.0: remarks, report cards (portal side) ---------- */
.bc-progress-tabs { margin: 4px 0 16px; }
.bc-pblock-icon.is-amber { background: color-mix(in srgb, #F59E0B 20%, transparent); }
.bc-pblock-icon.is-purple { background: color-mix(in srgb, #A855F7 18%, transparent); }
.bc-psoon-card .bc-pblock-title { margin-bottom: 6px !important; }
.bc-premark { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bc-surface); border: 1px solid var(--bc-line); border-inline-start: 4px solid #F59E0B; }
.bc-premark p { margin: 0 0 4px; font-weight: 600; color: var(--bc-text); }
.bc-premark cite { font-style: normal; font-size: 12px; font-weight: 700; color: #D97706; }
.bc-preports { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.bc-preports a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; background: var(--bc-surface); border: 1px solid var(--bc-line); color: inherit; text-decoration: none; }
.bc-preports a:hover { border-color: #A855F7; }
.bc-preports a > span { display: grid; flex: 1; min-width: 0; }
.bc-preports small { color: var(--bc-muted); font-weight: 600; }
.bc-preports .bc-datebox { width: 48px; min-height: 54px; }
.bc-remark-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.bc-week-nav { display: flex; align-items: center; gap: 10px; }
.bc-week-nav strong { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, #3B82F6 14%, transparent); color: #2563EB; }
.bc-remarks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.bc-remark-card { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--bc-card); border: 1px solid var(--bc-line); border-top: 4px solid #F59E0B; box-shadow: var(--bc-shadow); }
.bc-remark-card textarea { margin: 0; width: 100%; min-height: 64px; }
.bc-remark-who { display: flex; align-items: center; gap: 10px; }
.bc-remark-who > div { display: grid; gap: 3px; }
.bc-remark-photo { width: 40px; height: 40px; border-radius: 50%; }
.bc-remark-att { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.bc-remark-att i { width: 12px; height: 12px; border-radius: 4px; background: #94A3B8; }
.bc-remark-att i.is-present { background: #22C55E; } .bc-remark-att i.is-late, .bc-remark-att i.is-partial { background: #F59E0B; } .bc-remark-att i.is-absent { background: #EF4444; }
.bc-remark-att small { color: var(--bc-muted); font-size: 11px; }
.bc-remark-other { margin: 0; padding: 6px 10px; border-radius: 10px; background: var(--bc-surface); font-size: 13px; }
.bc-remarks-save { grid-column: 1 / -1; position: sticky; bottom: 12px; margin: 0; }
.bc-report-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.bc-report-issue form, .bc-report-sigform { display: grid; gap: 10px; }
.bc-report-issue label, .bc-report-sigform label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); }
.bc-report-issue .bc-input, .bc-report-sigform .bc-input { margin: 0; }
.bc-report-periods { display: flex; gap: 16px; }
.bc-report-students { border: 1px solid var(--bc-line); border-radius: 12px; padding: 8px 12px; }
.bc-report-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 10px; max-height: 220px; overflow-y: auto; margin-top: 6px; }
.bc-report-pick[hidden] { display: none; }
.bc-report-sigpreview { display: grid; justify-items: start; gap: 2px; margin: 0 0 12px; padding: 14px; border-radius: 14px; background: #fff; color: #0F172A; border: 1px solid var(--bc-line); }
.bc-report-sigpreview img { max-height: 50px; }
.bc-script { font: 400 32px/1 "Great Vibes", cursive; color: #1E3A8A; border-bottom: 1.5px solid #CBD5E1; padding-inline-end: 8px; }
.bc-report-sigpreview small { color: #64748B; }
.bc-verify { max-width: 520px; margin: 30px auto; text-align: center; }
.bc-verify form { justify-content: center; }
tr.is-off td { opacity: .55; }
@media (max-width: 860px) { .bc-report-grid { grid-template-columns: 1fr; } }
.bc-report-issue label[hidden], .bc-att-add-form[hidden] { display: none; }

/* ---------- 0.26.0: registers from class recordings ---------- */
.bc-att-rec { margin: 0 0 10px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(135deg, color-mix(in srgb, #0EA5A4 16%, transparent), color-mix(in srgb, #3B82F6 10%, transparent)), var(--bc-card); border: 1px solid color-mix(in srgb, #0EA5A4 35%, transparent); }
.bc-att-rec-head { display: flex; align-items: center; gap: 10px; }
.bc-att-rec-head > div { display: grid; flex: 1; min-width: 0; }
.bc-att-rec-head small { color: var(--bc-text-2); font-weight: 600; font-size: 12px; }
.bc-att-rec-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #0EA5A4; color: #fff; font-size: 18px; flex: none; }
.bc-att-rec-bar { display: block; height: 7px; margin-top: 8px; border-radius: 999px; background: color-mix(in srgb, #0EA5A4 18%, transparent); overflow: hidden; }
.bc-att-rec-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0EA5A4, #3B82F6); }
.bc-att-rec-problems { margin-top: 8px; font-size: 13px; }
.bc-att-rec-problems summary { cursor: pointer; font-weight: 700; color: var(--bc-red-text); }
.bc-att-rec-problems ul { margin: 6px 0; padding-inline-start: 18px; color: var(--bc-text-2); }

/* ---------- 0.27.0 ---------- */

/* Descriptions under a heading: readable size, and room before what follows. */
p.bc-hint { font-size: 15.5px !important; line-height: 1.55 !important; color: var(--bc-text-2) !important; margin: 10px 0 22px !important; max-width: 920px; }
.bc-att-match-row p.bc-hint, .bc-inline-form p.bc-hint { margin: 4px 0 8px !important; }

/* Attendance: matching, staff, delete requests */
.bc-att-tomatch { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(168, 85, 247, .45); background: linear-gradient(120deg, rgba(168, 85, 247, .16), transparent 70%); color: var(--bc-text); text-decoration: none; }
.bc-att-tomatch > span:first-child { font-size: 24px; }
.bc-att-tomatch span strong { display: block; color: var(--bc-violet); font-size: 15px; }
.bc-att-tomatch small { color: var(--bc-text-2); font-size: 13.5px; }
.bc-att-tomatch .bc-card-go { margin-left: auto; }
.bc-att-match-row { grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) 90px; }
.bc-att-match-row select.is-guess { border-color: #F59E0B; box-shadow: 0 0 0 2px rgba(245, 158, 11, .2); }
.bc-att-match-save { position: sticky; bottom: 10px; margin: 16px 0 0; }
.bc-att-match h2 .bc-att-chip { margin-left: 8px; vertical-align: middle; }
.bc-att-staff-list { display: flex; flex-wrap: wrap; gap: 10px; }
.bc-att-staff-chip { display: grid; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(20, 184, 166, .45); border-left: 5px solid #14B8A6; background: rgba(20, 184, 166, .1); }
.bc-att-staff-chip small { color: var(--bc-text-2); font-size: 13px; }
.bc-att-delreq { margin: 12px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); }
.bc-att-delreq > strong { color: var(--bc-red-text); }
.bc-att-delreq-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.bc-att-delreq-row > span { display: grid; margin-right: auto; }
.bc-att-delreq-row small { color: var(--bc-text-2); }
.bc-att-delreq-row form { margin: 0; }

/* Must-watch recordings */
.bc-badge--must, .bc-chip--must { background: rgba(245, 158, 11, .18) !important; color: var(--bc-yellow-text) !important; border: 1px solid rgba(245, 158, 11, .5); font-weight: 800; }

/* Notifications: switches in coloured groups */
.bc-push-legend { display: grid; gap: 2px; margin-bottom: 12px; font: 700 17px Outfit, sans-serif; color: var(--bc-text); }
.bc-push-legend span { font: 500 15px "Plus Jakarta Sans", sans-serif; color: var(--bc-text-2); }
.bc-push-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.bc-push-group { --c: #64748B; padding: 12px 14px 8px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-top: 4px solid var(--c); background: linear-gradient(170deg, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%); }
.bc-push-group h3 { margin: 0 0 8px; font: 700 16px Outfit, sans-serif; color: var(--c); }
.bc-push-group .bc-pick { margin: 0 0 6px; border-color: color-mix(in srgb, var(--c) 35%, transparent) !important; }
.bc-push-group.is-red { --c: #EF4444; } .bc-push-group.is-blue { --c: #3B82F6; } .bc-push-group.is-purple { --c: #A855F7; } .bc-push-group.is-teal { --c: #14B8A6; } .bc-push-group.is-amber { --c: #F59E0B; }

/* Notifications: who has them on */
.bc-push-who { margin-top: 26px; }
.bc-push-who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.bc-push-who-group { border: 1px solid var(--bc-line); border-radius: 16px; background: var(--bc-card); overflow: hidden; }
.bc-push-who-group > summary { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.bc-push-who-group > summary strong { font: 700 16px Outfit, sans-serif; }
.bc-push-who-count { display: flex; gap: 6px; }
.bc-push-who-count span { padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800; }
.bc-push-who-count .is-on { background: rgba(34, 197, 94, .16); color: var(--bc-green-text); }
.bc-push-who-count .is-off { background: rgba(239, 68, 68, .14); color: var(--bc-red-text); }
.bc-push-who-bar { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: rgba(239, 68, 68, .25); overflow: hidden; }
.bc-push-who-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22C55E, #4ADE80); }
.bc-push-who-group ul { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 6px; }
.bc-push-who-group li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; border-left: 4px solid; }
.bc-push-who-group li.is-on { border-color: #22C55E; background: rgba(34, 197, 94, .08); }
.bc-push-who-group li.is-off { border-color: #EF4444; background: rgba(239, 68, 68, .07); }
.bc-push-who-group li > span:nth-child(2) { display: grid; min-width: 0; }
.bc-push-who-group li small { color: var(--bc-text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.bc-push-who-chip { font-size: 12px; font-weight: 800; white-space: nowrap; }
.bc-push-who-group li.is-on .bc-push-who-chip { color: var(--bc-green-text); }
.bc-push-who-group li.is-off .bc-push-who-chip { color: var(--bc-red-text); }

/* View as */
.bc-viewas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.bc-viewas-quick, .bc-viewas-pick { padding: 16px; border-radius: 16px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); }
.bc-viewas-quick h3, .bc-viewas-pick h3 { margin: 0 0 12px; font: 700 17px Outfit, sans-serif; }
.bc-viewas-pick select { width: 100%; margin-bottom: 10px; }
.bc-viewas-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.bc-viewas-row > span { width: 64px; font-weight: 700; color: var(--bc-text-2); }
.bc-viewas-btn { --c: #64748B; position: relative; cursor: pointer; }
.bc-viewas-btn input { position: absolute; opacity: 0; pointer-events: none; }
.bc-viewas-btn span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--c) 55%, transparent); color: var(--c); font-weight: 800; background: color-mix(in srgb, var(--c) 10%, transparent); }
.bc-viewas-btn input:checked + span { background: var(--c); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 40%, transparent); }
.bc-viewas-btn input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
.bc-viewas-btn.is-blue { --c: #3B82F6; } .bc-viewas-btn.is-teal { --c: #14B8A6; } .bc-viewas-btn.is-amber { --c: #F59E0B; } .bc-viewas-btn.is-red { --c: #EF4444; } .bc-viewas-btn.is-purple { --c: #A855F7; } .bc-viewas-btn.is-green { --c: #22C55E; }
@media (max-width: 640px) { .bc-att-match-row { grid-template-columns: 1fr; } }

/* ---------- 0.28.0 ---------- */

/* Parent attendance list: the date box keeps white text (the row colour was turning it red on red). */
.bc-patt-list li .bc-datebox strong, .bc-patt-list li .bc-datebox small { color: #fff !important; }
.bc-patt-list li > span:last-child { display: grid; gap: 3px; }
.bc-patt-list li > span:last-child small { color: var(--bc-text-2); }

/* Parent: a title over the tiles, and a big language button */
.bc-ptiles-title { margin: 22px 0 12px; }
.bc-lang-switch { margin: 0 0 14px; }
.bc-lang-switch a { padding: 12px 24px; font-size: 18px; gap: 10px; border-width: 2px; border-color: var(--t-blue, #3B82F6); background: color-mix(in srgb, var(--t-blue, #3B82F6) 14%, var(--bc-card)); }
.bc-lang-switch a:hover { background: color-mix(in srgb, var(--t-blue, #3B82F6) 24%, var(--bc-card)); }
.bc-preports--all { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.bc-preports--all a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-card); color: var(--bc-text); text-decoration: none; }
.bc-preports--all a > span:nth-child(2) { display: grid; margin-inline-end: auto; }
.bc-preports--all small { color: var(--bc-text-2); }

/* Catching up on a missed live class */
.bc-catchup { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.bc-catchup.is-todo { background: rgba(245, 158, 11, .2); color: var(--bc-yellow-text); border: 1px solid rgba(245, 158, 11, .55); }
.bc-catchup.is-done { background: rgba(34, 197, 94, .16); color: var(--bc-green-text); }
.bc-catchup.is-missed { background: rgba(239, 68, 68, .16); color: var(--bc-red-text); }
.bc-catchup.is-wait { background: rgba(148, 163, 184, .16); color: var(--bc-text-2); }
.bc-catchup-box { margin: 16px 0; padding: 16px 18px; border-radius: 18px; border: 1px solid rgba(245, 158, 11, .5); border-left: 6px solid #F59E0B; background: linear-gradient(120deg, rgba(245, 158, 11, .16), transparent 70%); }
.bc-catchup-box h2 { margin: 0 0 4px; font: 700 19px Outfit, sans-serif; color: var(--bc-yellow-text); }
.bc-catchup-box p { margin: 0 0 10px; color: var(--bc-text-2); font-size: 15px; }
.bc-catchup-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bc-catchup-box li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bc-card); border: 1px solid var(--bc-line); }
.bc-catchup-box li a { display: grid; margin-right: auto; color: var(--bc-text); text-decoration: none; }
.bc-catchup-box li small { color: var(--bc-text-2); }
.bc-catchup-left { padding: 4px 12px; border-radius: 999px; background: #EF4444; color: #fff; font-weight: 800; font-size: 13px; }
.bc-remark-att i.is-makeup, .bc-att-status.is-makeup { background-color: #F59E0B; }

/* Report cards: the issue form laid out with flex, choices as tidy chips */
.bc-report-issue label.bc-pick, .bc-report-issue .bc-pick { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; width: auto; padding: 8px 14px; font-size: 14px; font-weight: 700; color: var(--bc-text); }
.bc-report-periods { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-report-students { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 10px 12px 12px; }
.bc-report-students legend { padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); }
.bc-report-pick { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow: auto; padding-top: 4px; }
.bc-report-pick[hidden] { display: none; }
.bc-report-issue .bc-inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }

/* Add a student: names from live classes */
.bc-meet-names { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; max-height: 280px; overflow: auto; }
.bc-meet-name { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); cursor: pointer; }
.bc-meet-name[hidden] { display: none; }
.bc-meet-name:has(input:checked) { border-color: #A855F7; background: rgba(168, 85, 247, .14); }
.bc-meet-name span { display: grid; }
.bc-meet-name small { color: var(--bc-text-2); font-size: 12px; }
.bc-meet-name em { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.bc-meet-name em.is-guest { background: rgba(148, 163, 184, .18); color: var(--bc-text-2); }
.bc-meet-name em.is-open { background: rgba(168, 85, 247, .18); color: var(--bc-violet); }
.bc-patt-list .bc-catchup { white-space: normal; font-size: 11.5px; line-height: 1.3; padding: 3px 8px; }

/* ---------- 0.29.0: layout clean-up on every page ---------- */

/* Buttons: every button looks like a button, and bigger. */
.bc-btn { min-height: 46px; padding: 12px 24px; font-size: 16px; }
.bc-btn--small { min-height: 40px; padding: 9px 18px; font-size: 14.5px; }
.bc-btn--ghost { border: 1.5px solid color-mix(in srgb, var(--bc-text) 30%, transparent); background: var(--bc-tint-2); color: var(--bc-text); }
.bc-btn--ghost:hover { background: var(--bc-tint-3); border-color: color-mix(in srgb, var(--bc-text) 50%, transparent); }
.bc-btn--danger { border-width: 1.5px; background: rgba(239, 68, 68, .1); }
.bc-crumb { display: inline-flex !important; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--bc-text) 28%, transparent); background: var(--bc-tint-2); color: var(--bc-text) !important; font-size: 15px; font-weight: 700; }
.bc-crumb:hover { background: var(--bc-tint-3); }
.bc-week-nav .bc-btn, .bc-week-nav a { white-space: nowrap; }

/* Checkboxes and radios: as wide as their text, side by side when there is room. */
.bc-portal label:has(> input[type="radio"]), .bc-portal label:has(> input[type="checkbox"]) {
	display: inline-flex; flex-direction: row; align-items: center; gap: 8px;
	width: fit-content; max-width: 100%; margin: 0 8px 8px 0; vertical-align: middle;
}
.bc-portal label:has(> input[type="radio"]) > *, .bc-portal label:has(> input[type="checkbox"]) > * { min-width: 0; }
.bc-portal label[hidden] { display: none !important; }
.bc-portal td > label:has(> input[type="checkbox"]):only-child { margin-bottom: 0; }

/* Two cards per row when several cards follow each other (one alone takes the whole row). */
.bc-admin-page, .bc-main--wide { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 20px; }
.bc-admin-page > *:not(h1):not(a):not(span):not(button):not(script):not(style):not(link),
.bc-main--wide > *:not(h1):not(a):not(span):not(button):not(script):not(style):not(link) { flex: 0 0 100%; min-width: 0; }
.bc-admin-page > .bc-crumb, .bc-main--wide > .bc-crumb { flex: 0 0 auto; margin-right: calc(100% - 300px); }
.bc-admin-page > .bc-panel:not(:has(table, .bc-att-grid, .bc-att-match, .bc-push-who-grid, .bc-push-groups, .bc-viewas-grid, .bc-remarks, .bc-report-grid)),
.bc-main--wide > .bc-panel:not(:has(table, .bc-att-grid, .bc-att-match, .bc-push-who-grid, .bc-push-groups, .bc-viewas-grid, .bc-remarks, .bc-report-grid)) { flex: 1 1 calc(50% - 10px); min-width: min(100%, 420px); }
.bc-admin-page > .bc-panel, .bc-main--wide > .bc-panel { margin-bottom: 20px; }

/* Facts as a list (an account's username, mobile, email…). */
.bc-facts { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 6px; }
.bc-facts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 12px; border-radius: 10px; background: var(--bc-tint-1); border-left: 3px solid var(--bc-accent); }
.bc-facts li > span { min-width: 190px; color: var(--bc-text-2); font-weight: 700; font-size: 14px; }
.bc-facts li > strong { font-weight: 600; }
.bc-facts small { color: var(--bc-text-2); font-weight: 500; }

/* Parent attendance: date and status side by side, the catch-up note across the bottom. */
.bc-patt-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.bc-patt-list li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; padding: 10px; }
.bc-patt-list li > span:last-of-type { display: grid; gap: 2px; }
.bc-patt-list li > .bc-catchup { grid-column: 1 / -1; display: flex; justify-content: center; width: auto; white-space: normal; text-align: center; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; line-height: 1.35; }

/* WhatsApp log-in message, always open */
.bc-wa-box { flex: 0 0 100%; margin: 16px 0; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(34, 197, 94, .45); border-left: 6px solid #22C55E; background: linear-gradient(120deg, rgba(34, 197, 94, .12), transparent 70%); }
.bc-wa-box h3 { margin: 0 0 4px; font: 700 18px Outfit, sans-serif; color: var(--bc-green-text); }
.bc-wa-text { display: block; width: 100%; max-width: 640px; min-height: 200px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.bc-wa-btn { background: #16A34A !important; color: #fff !important; }
.bc-wa-btn:hover { background: #15803D !important; }

/* Assistants: Classes page */
.bc-aclass-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.bc-aclass-form > label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); flex: 1 1 160px; }
.bc-aclass-form > label.bc-aclass-title { flex: 1 1 100%; }
.bc-aclass-form .bc-input { margin: 0; width: 100%; }
.bc-aclass-status { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.bc-aclass-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bc-aclass-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 12px; background: var(--bc-tint-1); border: 1px solid var(--bc-line); border-left: 5px solid var(--cat, var(--bc-accent)); }
.bc-aclass-list li > span:first-child { display: grid; margin-right: auto; }
.bc-aclass-list small { color: var(--bc-text-2); }
.bc-aclass-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 0.31.0 ---------- */

/* Parent attendance: never wider than its box; weeks one under the other, earlier week first */
.bc-patt { display: flex; gap: 18px; align-items: flex-start; }
.bc-patt-side { flex: 1 1 auto; min-width: 0; }
.bc-patt-week { margin-top: 14px; }
.bc-patt-week h3 { margin: 0 0 8px; font: 700 15px Outfit, Cairo, sans-serif; color: var(--bc-text-2); }
.bc-patt-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.bc-patt-dur { color: var(--bc-text) !important; font-weight: 700 !important; }
@media (max-width: 700px) { .bc-patt { flex-direction: column; align-items: center; } .bc-patt-side { width: 100%; } }

/* Parent tiles: six in two rows of three */
.bc-ptiles--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .bc-ptiles--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* First log-in: choose the language */
.bc-lang-choose { max-width: 560px; margin: 6vh auto; padding: 28px; text-align: center; border-radius: 22px; border: 1px solid var(--bc-line); background: var(--bc-surface); box-shadow: var(--bc-shadow); }
.bc-lang-choose h1 { font: 800 28px/1.4 Outfit, Cairo, sans-serif; margin: 12px 0 20px; }
.bc-lang-choose h1 span { font-family: Cairo, sans-serif; }
.bc-lang-choose-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 16px; }
.bc-lang-choose-btns .bc-btn { min-width: 180px; font-size: 20px; padding: 16px 28px; }
.bc-lang-choose p { color: var(--bc-text-2); font-size: 14px; }

/* Matched names */
.bc-names-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.bc-names { display: grid; gap: 8px; }
.bc-names-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(220px, 300px); align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bc-line); border-left: 5px solid #64748B; background: var(--bc-tint-1); }
.bc-names-row[hidden] { display: none; }
.bc-names-row.is-student { border-left-color: #3B82F6; } .bc-names-row.is-guest { border-left-color: #94A3B8; } .bc-names-row.is-staff { border-left-color: #14B8A6; } .bc-names-row.is-open { border-left-color: #A855F7; }
.bc-names-who { display: grid; min-width: 0; }
.bc-names-who small { color: var(--bc-text-2); overflow: hidden; text-overflow: ellipsis; }
.bc-names-tag { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.bc-names-tag.is-student { background: rgba(59, 130, 246, .16); color: var(--bc-blue-text); } .bc-names-tag.is-guest { background: rgba(148, 163, 184, .18); color: var(--bc-text-2); }
.bc-names-tag.is-staff { background: rgba(20, 184, 166, .16); color: #2DD4BF; } .bc-names-tag.is-open { background: rgba(168, 85, 247, .16); color: var(--bc-violet); }
.bc-names-row .bc-input { margin: 0; }
@media (max-width: 760px) { .bc-names-row { grid-template-columns: 1fr; } }

/* Parent page: link a child */
.bc-link-child-form { display: grid; gap: 10px; max-width: 560px; }
.bc-link-child-form select[size] { min-height: 160px; }

/* Students: genders */
.bc-genders > summary { cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 16px; }
.bc-genders-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.bc-genders-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); }
.bc-genders-row.is-missing { border-color: rgba(245, 158, 11, .55); }
.bc-genders-row strong { margin-right: auto; }
.bc-genders-row label { margin-bottom: 0 !important; }

/* WhatsApp message: English / Arabic */
.bc-wa-lang { display: flex; gap: 8px; margin: 0 0 10px; }
.bc-wa-text[dir="rtl"] { font-family: Cairo, sans-serif; font-size: 15px; }

/* 0.33.0: catch-ups page */
.bc-catchup-rule { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.bc-catchup-rule .bc-hint { margin: 0 !important; font-size: 14px !important; flex: 1 1 260px; }
.bc-cu-list { display: grid; gap: 8px; }
.bc-cu-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); border-left: 6px solid #64748B; background: var(--bc-tint-1); }
.bc-cu-row[hidden] { display: none; }
.bc-cu-row.is-todo { border-left-color: #F59E0B; } .bc-cu-row.is-done { border-left-color: #22C55E; } .bc-cu-row.is-missed { border-left-color: #EF4444; } .bc-cu-row.is-wait { border-left-color: #94A3B8; }
.bc-cu-who, .bc-cu-state { display: grid; gap: 3px; min-width: 0; }
.bc-cu-who small, .bc-cu-state small { color: var(--bc-text-2); }
.bc-cu-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.bc-cu-actions form { margin: 0; }
.bc-cu-more { display: flex; gap: 6px; align-items: center; }
.bc-cu-more .bc-input { margin: 0; width: auto; }
@media (max-width: 900px) { .bc-cu-row { grid-template-columns: 1fr; } .bc-cu-actions { justify-content: flex-start; } }

/* ---------- 0.34.0: Sales (admissions) ---------- */
.bc-sales-tabs { margin: 8px 0 12px; }
.bc-sales-search { margin: 0 0 14px; }
.bc-sales-search .bc-input { max-width: 360px; margin: 0; }
.bc-sales-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 10px; }
.bc-sales-card { --c: #64748B; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); border-left: 6px solid var(--c); background: var(--bc-surface); color: var(--bc-text); text-decoration: none; }
.bc-sales-card:hover { background: var(--bc-tint-2); }
.bc-sales-card.is-blue { --c: #3B82F6; } .bc-sales-card.is-purple { --c: #A855F7; } .bc-sales-card.is-amber { --c: #F59E0B; } .bc-sales-card.is-green { --c: #22C55E; } .bc-sales-card.is-grey { --c: #64748B; }
.bc-sales-card-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.bc-sales-card-main strong { font-size: 16px; }
.bc-sales-card-main small { color: var(--bc-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-sales-card .bc-pchips { justify-content: flex-end; max-width: 55%; }
.bc-sales-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; flex: 0 0 100%; }
.bc-sales-side { display: grid; gap: 14px; }
.bc-sales-side > .bc-panel, .bc-sales-grid > .bc-panel { margin: 0; }
.bc-sales-form { display: grid; gap: 10px; }
.bc-sales-form h3 { margin: 12px 0 0; font: 700 16px Outfit, sans-serif; color: var(--bc-text-2); }
.bc-sales-form > label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); width: auto !important; margin: 0 !important; }
.bc-sales-form .bc-input, .bc-sales-form select { margin: 0; width: 100%; }
.bc-sales-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bc-sales-row > span { min-width: 110px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); }
.bc-sales-row label { margin: 0 !important; }
.bc-sales-money .is-total { border-left-color: #22C55E; background: rgba(34, 197, 94, .12); }
.bc-sales-money .is-total strong { font: 800 20px Outfit, sans-serif; color: var(--bc-green-text); }
.bc-sales-pay form { display: grid; gap: 10px; }
.bc-sales-pay label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); }
.bc-sales-book { display: grid; grid-template-columns: 40px 120px 1fr; gap: 8px; align-items: center; }
.bc-sales-book .bc-input { margin: 0; }
.bc-sales-done { flex: 0 0 100%; border-color: rgba(34, 197, 94, .5); }
.bc-tool-page-head .bc-pchip { margin-left: 8px; }
@media (max-width: 900px) { .bc-sales-grid { grid-template-columns: 1fr; } .bc-sales-list { grid-template-columns: 1fr; } .bc-sales-card { flex-wrap: wrap; } .bc-sales-card .bc-pchips { max-width: none; justify-content: flex-start; } }
.bc-sales-form select, .bc-sales-pay select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--bc-line); background: var(--bc-surface); color: var(--bc-text); font: inherit; color-scheme: var(--bc-scheme); }
.bc-sales-list { grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); }
.bc-sales-card-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-sales-side .bc-wa-box { margin: 0; }

/* 0.35.0: link the form's questions */
.bc-links { flex: 0 0 100%; grid-column: 1 / -1; }
.bc-links h3 { margin: 16px 0 8px; font: 700 16px Outfit, sans-serif; color: var(--bc-text-2); }
.bc-links-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 8px; }
.bc-links-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(200px, 260px); align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); }
.bc-links-q { display: grid; min-width: 0; }
.bc-links-q small { color: var(--bc-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-links-arrow { color: var(--bc-accent); font-weight: 800; }
.bc-links-row .bc-input { margin: 0; }
.bc-links-again { margin: 14px 0 10px !important; }
.bc-sales-grid > .bc-links { grid-column: 1 / -1; }
@media (max-width: 700px) { .bc-links-list { grid-template-columns: 1fr; } .bc-links-row { grid-template-columns: 1fr; } .bc-links-arrow { display: none; } }

/* 0.35.2: setup folds, deleting applications, forgetting questions */
.bc-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.bc-fold > summary::-webkit-details-marker { display: none; }
.bc-fold > summary h2 { margin: 0 !important; }
.bc-fold > summary::after { content: '▾'; margin-left: auto; font-size: 18px; color: var(--bc-text-2); transition: transform .15s; }
.bc-fold:not([open]) > summary::after { transform: rotate(-90deg); }
.bc-fold[open] > summary { margin-bottom: 12px; }
.bc-links-row.has-forget { grid-template-columns: minmax(0, 1fr) auto auto minmax(200px, 260px); }
.bc-links-forget { margin: 0 !important; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(239, 68, 68, .4); color: var(--bc-red-text); cursor: pointer; }
.bc-links-forget:has(input:checked) { background: rgba(239, 68, 68, .18); }
.bc-sales-item { display: flex; align-items: stretch; gap: 6px; }
.bc-sales-item > .bc-sales-card { flex: 1 1 auto; min-width: 0; }
.bc-sales-tick { display: flex !important; align-items: center; margin: 0 !important; padding: 0 6px; border-radius: 10px; border: 1px solid var(--bc-line); cursor: pointer; }
.bc-sales-tick:has(input:checked) { border-color: #EF4444; background: rgba(239, 68, 68, .12); }
.bc-sales-bulk { margin: 0 0 10px; }
.bc-sales-del { margin: 0; text-align: right; }

/* ---------- 0.36.0: payments ---------- */
.bc-sales-top { margin: 0 0 16px; }
.bc-count.is-hot { background: #EF4444; color: #fff; }
.bc-pay-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 12px; }
.bc-pay-months { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.bc-pay-months span { display: grid; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); }
.bc-pay-months small { color: var(--bc-text-2); font-weight: 700; }
.bc-pay-months strong { font: 800 16px Outfit, sans-serif; color: var(--bc-green-text); }
.bc-pay-inst { display: grid; gap: 10px; }
.bc-pay-row { --c: #3B82F6; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); border-left: 6px solid var(--c); background: var(--bc-tint-1); }
.bc-pay-row.is-green { --c: #22C55E; } .bc-pay-row.is-red { --c: #EF4444; } .bc-pay-row.is-amber { --c: #F59E0B; } .bc-pay-row.is-grey { --c: #64748B; }
.bc-pay-row-main { display: grid; gap: 3px; margin-right: auto; min-width: 220px; }
.bc-pay-row-main strong { font: 800 17px Outfit, sans-serif; }
.bc-pay-row-main small { color: var(--bc-text-2); font-size: 13.5px; }
.bc-pay-act > summary { list-style: none; cursor: pointer; }
.bc-pay-act > summary::-webkit-details-marker { display: none; }
.bc-pay-act[open] { flex: 1 1 100%; order: 5; }
.bc-pay-form { display: grid; gap: 10px; max-width: 560px; margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--bc-surface); border: 1px solid var(--bc-line); }
.bc-pay-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); }
.bc-pay-form .bc-sales-row label { display: inline-flex; }
.bc-pay-form .bc-input { margin: 0; }
.bc-outbox { display: grid; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); gap: 14px; flex: 0 0 100%; }
.bc-outbox-item { margin: 0 !important; }
.bc-outbox-item .bc-wa-text { min-height: 160px; }
@media (max-width: 900px) { .bc-pay-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bc-outbox { grid-template-columns: 1fr; } }

/* 0.38.0: instalment and book buttons */
.bc-pay-buttons, .bc-book-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.bc-pay-buttons .bc-input--small { width: 130px; margin: 0; }
.bc-pay-row-main strong .bc-pchip { margin-left: 6px; vertical-align: middle; }
.bc-pay-add { margin-top: 10px; }
.bc-pay-clear { margin-top: 14px; text-align: right; }
.bc-pay-exc .bc-input { margin: 0; }
.bc-book-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); }
.bc-book-undo { margin: 0 0 10px; }
.bc-sales-card .bc-book-buttons { flex-basis: 100%; justify-content: flex-end; }
.bc-sales-list .bc-sales-card:has(.bc-book-buttons) { flex-wrap: wrap; }

/* 0.39.0: instalments all on show; books finished */
.bc-pay-row { display: grid; gap: 10px; }
.bc-pay-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bc-pay-row-head strong { font: 800 17px Outfit, sans-serif; }
.bc-pay-row-head small { color: var(--bc-text-2); }
.bc-pay-edit { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0; }
.bc-pay-edit label { display: grid; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--bc-text-2); width: auto !important; margin: 0 !important; }
.bc-pay-edit .bc-input { margin: 0; min-width: 0; width: 150px; }
.bc-pay-edit .bc-pay-note .bc-input { width: 220px; }
.bc-pay-edit-btns { display: flex; gap: 6px; }
.bc-pay-paid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding-top: 8px; border-top: 1px dashed var(--bc-line); }
.bc-pay-paid select.bc-input { width: auto; margin: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--bc-line); background: var(--bc-surface); color: var(--bc-text); }
.bc-pay-paid .bc-input--small { width: 140px; margin: 0; }
.bc-pay-file { display: inline-flex !important; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; border: 1px dashed var(--bc-line); font-size: 13px; cursor: pointer; margin: 0 !important; }
.bc-pay-file input { max-width: 190px; font-size: 12px; }
.bc-book-row.is-finished, .bc-sales-card.is-finished { opacity: .55; filter: grayscale(1); }

.bc-pay-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .bc-pay-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bc-pay-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 0.40.0: overview */
.bc-pay-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bc-stats-grand { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 12px; flex: 0 0 100%; }
.bc-stats-big { --c: #3B82F6; display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-top: 5px solid var(--c); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 75%); }
.bc-stats-big.is-green { --c: #22C55E; } .bc-stats-big.is-red { --c: #EF4444; }
.bc-stats-big small { font-weight: 800; color: var(--c); font-size: 14px; }
.bc-stats-big strong { font: 800 30px Outfit, sans-serif; }
.bc-stats-big span { color: var(--bc-text-2); font-size: 13.5px; }
.bc-stats-bar { display: block; height: 8px; border-radius: 999px; background: rgba(239, 68, 68, .25); overflow: hidden; }
.bc-stats-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22C55E, #4ADE80); }
.bc-stats-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; flex: 0 0 100%; }
.bc-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; flex: 0 0 100%; }
.bc-stats-grid > .bc-panel { margin: 0; }
.bc-stats-grid td.is-good { color: var(--bc-green-text); font-weight: 700; } .bc-stats-grid td.is-bad { color: var(--bc-red-text); font-weight: 700; }
.bc-stats-months { display: flex; align-items: flex-end; gap: 12px; min-height: 180px; }
.bc-stats-months > div { display: grid; justify-items: center; gap: 4px; flex: 1 1 0; max-width: 90px; }
.bc-stats-col { display: flex; align-items: flex-end; width: 100%; height: 130px; border-radius: 10px; background: var(--bc-tint-1); overflow: hidden; }
.bc-stats-col i { display: block; width: 100%; background: linear-gradient(180deg, #4ADE80, #16A34A); border-radius: 10px 10px 0 0; }
.bc-stats-months small { color: var(--bc-text-2); font-size: 12px; }
@media (max-width: 900px) { .bc-stats-grand, .bc-stats-grid { grid-template-columns: 1fr; } .bc-pay-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 0.40.2: the teacher's menu (7 items): one row on a computer, two rows of 4 and 3 on a phone */
@media (max-width: 960px) {
	.bc-menu--rows { grid-auto-flow: row; grid-template-columns: repeat(var(--bc-menu-cols, 4), minmax(0, 1fr)); grid-auto-columns: auto; gap: 3px; border-radius: 18px; }
}

/* 0.41.0: overview fits a phone; bookshops */
.bc-stats-grand { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.bc-stats-big.is-purple { --c: #A855F7; }
.bc-stats-big strong { font-size: clamp(22px, 5vw, 30px); overflow-wrap: anywhere; }
.bc-stats-grid > .bc-panel, .bc-stats-grand > * { min-width: 0; }
.bc-stats-cohorts { display: grid; gap: 10px; }
.bc-stats-cohort { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-tint-1); }
.bc-stats-cohort > small { color: var(--bc-text-2); }
.bc-stats-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bc-stats-nums span { display: grid; font: 800 16px Outfit, sans-serif; }
.bc-stats-nums span small { font: 700 12px 'Plus Jakarta Sans', sans-serif; color: var(--bc-text-2); }
.bc-stats-nums .is-good { color: var(--bc-green-text); } .bc-stats-nums .is-bad { color: var(--bc-red-text); }
.bc-facts li > span { min-width: min(190px, 45%); }
@media (max-width: 600px) { .bc-facts li { flex-direction: column; align-items: flex-start; } .bc-facts li > span { min-width: 0; } .bc-stats-months { gap: 6px; } }
.bc-shops { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 16px; flex: 0 0 100%; }
.bc-shop { margin: 0 !important; }
.bc-shop-bal { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0 0 12px; }
.bc-shop-bal span { --c: #3B82F6; display: grid; padding: 10px 12px; border-radius: 12px; border-top: 4px solid var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.bc-shop-bal .is-green { --c: #22C55E; } .bc-shop-bal .is-red { --c: #EF4444; }
.bc-shop-bal small { color: var(--bc-text-2); font-weight: 700; }
.bc-shop-bal strong { font: 800 17px Outfit, sans-serif; }
.bc-shop-forms { display: grid; gap: 8px; margin-bottom: 12px; }
.bc-shop-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.bc-shop-form .bc-input { margin: 0; width: auto; }
.bc-shop-form select.bc-input { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--bc-line); background: var(--bc-surface); color: var(--bc-text); }
.bc-shop-form > strong { min-width: 110px; }
.bc-shop-lines { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.bc-shop-lines li { --c: #64748B; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border-left: 4px solid var(--c); background: var(--bc-tint-1); }
.bc-shop-lines li.is-green { --c: #22C55E; } .bc-shop-lines li.is-red { --c: #EF4444; } .bc-shop-lines li.is-blue { --c: #3B82F6; } .bc-shop-lines li.is-teal { --c: #14B8A6; }
.bc-shop-lines li > span { display: grid; margin-right: auto; min-width: 0; }
.bc-shop-lines small { color: var(--bc-text-2); }
.bc-shop-lines form { margin: 0; }

/* 0.42.0: the teacher's side menu on tablets and phones: a Menu button, not floating over the page */
.bc-side-wrap { position: sticky; top: 16px; align-self: start; }
.bc-side-wrap .bc-side { position: static; }
.bc-side-toggle { display: none; }
@media (max-width: 1180px) {
	.bc-dash { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.bc-side-wrap { position: static; }
	.bc-side-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-surface); color: var(--bc-text); font: 600 15px 'Plus Jakarta Sans', sans-serif; cursor: pointer; }
	.bc-side-toggle strong { color: var(--bc-accent); }
	.bc-side-wrap:not(.is-open) .bc-side { display: none; }
	.bc-side-wrap.is-open .bc-side { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 8px; overflow: visible; }
	.bc-side-wrap.is-open .bc-side > a { padding: 10px 8px; text-align: center; border: 1px solid var(--bc-line); background: var(--bc-surface); }
}

/* 0.42.0: add the recording of the last class */
.bc-att-recask { display: grid; gap: 6px; margin: 10px 0; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(34, 197, 94, .5); border-left: 6px solid #22C55E; background: linear-gradient(120deg, rgba(34, 197, 94, .12), transparent 70%); }
.bc-att-recask > strong { font: 700 16px Outfit, sans-serif; color: var(--bc-green-text); }
.bc-att-recask > small { color: var(--bc-text-2); }
.bc-att-recask-form { display: grid; gap: 8px; }
.bc-att-recask-form label { display: grid; gap: 3px; font-size: 13px; font-weight: 700; color: var(--bc-text-2); width: auto !important; margin: 0 !important; }
.bc-att-recask-form .bc-input { margin: 0; }
@media (max-width: 1180px) {
	.bc-side-wrap.is-open .bc-side > :not(a) { grid-column: 1 / -1; }
}

/* 0.42.1: no double-tap zoom anywhere in the annotator */
.bc-ink, .bc-ink * { touch-action: manipulation; }
.bc-ink .bc-ink-stage, .bc-ink .bc-ink-pen { touch-action: none; }
.bc-ink { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.bc-ink input, .bc-ink textarea { -webkit-user-select: text; user-select: text; }

/* 0.42.1: tablets in portrait: admin tables become cards (no sideways scrolling), class rows wrap */
@media (max-width: 1180px) {
	.bc-class-meta { display: flex; flex-wrap: wrap; gap: 6px; }
	.bc-slot:empty { display: none; }
	.bc-slot > .bc-badge, .bc-slot > .bc-copy, .bc-slot--dur > .bc-badge { width: auto; }
}
.bc-kid { white-space: nowrap; }
@media (max-width: 1000px) {
	.bc-dash-main .bc-table.is-cards { display: block; overflow: visible; border: 0; background: none; border-radius: 0; }
	.bc-dash-main .bc-table.is-cards thead { display: none; }
	.bc-dash-main .bc-table.is-cards tbody { display: grid; gap: 10px; }
	.bc-dash-main .bc-table.is-cards tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 16px; padding: 14px 16px; border: 1px solid var(--bc-line); border-radius: 14px; background: var(--bc-card); }
	.bc-dash-main .bc-table.is-cards td, .bc-dash-main .bc-table.is-cards tbody th { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
	.bc-dash-main .bc-table.is-cards td[data-label]::before, .bc-dash-main .bc-table.is-cards tbody th[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bc-muted); }
	.bc-dash-main .bc-table.is-cards td:has(.bc-btn, button, form, select), .bc-dash-main .bc-table.is-cards td[colspan] { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
	.bc-dash-main .bc-table.is-cards td:has(.bc-btn, button, form, select)::before { width: 100%; }
	.bc-dash-main .bc-table.is-cards td:has(.bc-btn, button, form, select) > *, .bc-dash-main .bc-table.is-cards td form { margin: 0; }
	.bc-dash-main .bc-table.is-cards td .bc-btn { width: auto; }
}
@media (max-width: 1000px) {
	.bc-dash-main .bc-table.is-cards td.bc-actions { width: auto; }
	.bc-dash-main .bc-table.is-cards .bc-actions form { display: inline-block !important; margin: 0; }
	.bc-dash-main .bc-table.is-cards .bc-actions .bc-btn { width: auto; }
}

/* 0.42.3: the eraser's circle */
.bc-ink-rub { position: fixed; display: none; z-index: 30; pointer-events: none; border-radius: 50%; border: 1.5px solid rgba(124, 58, 237, .45); background: rgba(124, 58, 237, .05); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4); }
.bc-ink-rub.is-down { background: rgba(124, 58, 237, .09); }

/* 0.42.4: the S Pen button's Eraser hint */
.bc-ink-swap { position: fixed; left: 50%; top: 96px; transform: translate(-50%, -8px); z-index: 40; pointer-events: none; opacity: 0; transition: opacity .2s, transform .2s; background: #4C1D95; color: #fff; font-weight: 700; font-size: 18px; padding: 10px 18px; border-radius: 999px; box-shadow: 0 8px 24px rgba(76, 29, 149, .35); white-space: nowrap; }
.bc-ink-swap.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* 0.42.6: tool order, Tick and Deduct alike, tiny Undo / Redo bar, Clear question */
.bc-ink .bc-ink-pill--tools .bc-ink-stamp { flex-direction: column; gap: 2px; padding: 0 8px; border-radius: 14px; border: 2px solid rgba(220, 38, 38, .75); color: #FCA5A5; }
.bc-ink .bc-ink-pill--tools .bc-ink-stamp .bc-ink-stamp-dot { width: 27px; height: 27px; border-width: 2.5px; font-size: 13px; }
.bc-ink .bc-ink-pill--tools .bc-ink-stamp.is-on { background: #DC2626; border-color: #DC2626; color: #fff; }
.bc-ink .bc-ink-pill--tools button[data-tool="tick"] { border: 2px solid rgba(22, 163, 74, .8); color: #86EFAC; }
.bc-ink .bc-ink-pill--tools button[data-tool="tick"].is-on { background: #16A34A; border-color: #16A34A; color: #fff; }
.bc-ink-pill--history { gap: 2px; padding: 3px; border-radius: 12px; }
.bc-ink .bc-ink-pill--history button { height: 30px !important; min-width: 34px !important; padding: 0 6px; border-radius: 9px; }
.bc-ink .bc-ink-pill--history .bc-ink-icon { width: 17px; height: 17px; }
.bc-ink .bc-ink-pill--history .bc-ink-label { display: none; }
.bc-ink-ask { gap: 10px; padding: 10px 12px; color: #fff; font-weight: 700; font-size: 16px; }
.bc-ink-ask[hidden] { display: none; }
.bc-ink .bc-ink-ask button { flex-direction: row; height: 44px; padding: 0 16px; border-radius: 12px; font-weight: 800; font-size: 15px; }
.bc-ink .bc-ink-ask .bc-ink-ask-yes { background: #DC2626; color: #fff; }
.bc-ink .bc-ink-ask .bc-ink-ask-no { background: rgba(255, 255, 255, .12); color: #fff; }

/* the comment box shakes when another tool is pressed before Add or Cancel */
.bc-ink-textbox.is-nudge { animation: bc-ink-nudge .4s ease; box-shadow: 0 0 0 3px #F59E0B, 0 14px 34px rgba(0, 0, 0, .5); }
@keyframes bc-ink-nudge { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .bc-ink-textbox.is-nudge { animation: none; } }

/* the Eraser's size, 1x or 2x: shown the first time the Eraser is taken, or when it is tapped again */
.bc-ink-pill--erasesize { display: none; gap: 4px; padding: 4px 6px; }
.bc-ink-pill--erasesize.is-open { display: flex; animation: bc-ink-drop .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes bc-ink-drop { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
.bc-ink .bc-ink-pill--erasesize button { flex-direction: row; gap: 8px; min-width: 76px; height: 48px; padding: 0 12px; }
.bc-ink-pill--erasesize i { display: block; width: var(--d); height: var(--d); border-radius: 50%; border: 2px solid #C4B5FD; background: rgba(196, 181, 253, .2); }
.bc-ink-pill--erasesize span { font: 800 15px Outfit, sans-serif; }
.bc-ink .bc-ink-pill--erasesize button.is-on { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 2px #fff; color: #fff; }
@media (prefers-reduced-motion: reduce) { .bc-ink-pill--erasesize.is-open { animation: none; } }

/* 0.42.6: on tablets the zoom and page buttons are smaller with no words */
@media (max-width: 1366px) {
	.bc-ink-bottom .bc-ink-label { display: none; }
	.bc-ink-bottom .bc-ink-pill { padding: 3px; gap: 2px; border-radius: 13px; }
	.bc-ink .bc-ink-bottom .bc-ink-pill button { height: 36px; min-width: 36px; padding: 0 4px; border-radius: 10px; }
	.bc-ink-bottom .bc-ink-icon { width: 20px; height: 20px; }
	.bc-ink-bottom .bc-ink-zoom, .bc-ink-bottom .bc-ink-page { font-size: 12.5px; padding: 0 2px; }
}

/* ---------- Marked versions (0.43.0) ---------- */
.bc-mv { margin: 16px 0; border-color: color-mix(in srgb, var(--bc-violet) 40%, var(--bc-line)); }
.bc-mv h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px !important; font-size: 17px; color: var(--bc-text); text-transform: none; letter-spacing: 0; }
.bc-mv-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--bc-violet); color: #fff; font-size: 13px; }
.bc-mv-final { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bc-good) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bc-good) 45%, transparent); }
.bc-mv-final-row { display: inline-flex; align-items: center; gap: 8px; }
.bc-mv-final .bc-hint { flex-basis: 100%; margin: 0; }
.bc-mv-empty { color: var(--bc-muted); margin: 10px 0; }
.bc-mv-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.bc-mv-item { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--bc-line); border-radius: 14px; background: var(--bc-surface); }
.bc-mv-item.is-shown { border: 2px solid var(--bc-good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc-good) 18%, transparent); }
.bc-mv-badge { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-weight: 800; color: #fff; background: var(--bc-violet); }
.bc-mv-item.is-online .bc-mv-badge { background: #0EA5E9; }
.bc-mv-item.is-upload .bc-mv-badge { background: #F59E0B; }
.bc-mv-item.is-release .bc-mv-badge, .bc-mv-item.is-earlier .bc-mv-badge { background: #64748B; }
.bc-mv-item.is-shown .bc-mv-badge { background: var(--bc-good); }
.bc-mv-body { flex: 1; min-width: 0; }
.bc-mv-body p { margin: 0 0 6px; }
.bc-mv-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--bc-muted); font-size: 14px; }
.bc-mv-mark { font-weight: 800; color: var(--bc-text); }
.bc-mv-on { font-weight: 700; color: var(--bc-good); }
.bc-mv-comment { font-size: 14px; color: var(--bc-muted); }
.bc-mv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-mv-show { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.bc-mv-add { margin-top: 14px; padding: 10px 14px; border: 1px dashed var(--bc-line); border-radius: 12px; }
.bc-mv-add summary { cursor: pointer; font-weight: 700; }

/* ---------- Marking: three save buttons, on-page questions, versions (0.43.1) ---------- */
.bc-btn--violet { background: var(--bc-violet); color: #fff; }
.bc-btn--violet:hover, .bc-btn--violet:focus { background: #9333EA; color: #fff; }
.bc-btn--violet { box-shadow: 0 6px 18px rgba(168, 85, 247, .28); }
.bc-mark-do { gap: 10px; }
.bc-mark-ask { margin: 10px 0; padding: 12px 14px; border: 2px solid var(--bc-violet); border-radius: 14px; background: color-mix(in srgb, var(--bc-violet) 10%, transparent); }
.bc-mark-ask p { margin: 0 0 8px; }
.bc-mark-ask p:last-child { margin: 0; }
.bc-mv-final { margin: 16px 0 0; }
.bc-mv-grade { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.bc-mv-fields { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.bc-mv-fields p { margin: 0 0 8px; }
.bc-mv-add { margin: 12px 0 4px; border-style: solid; border-color: color-mix(in srgb, var(--bc-violet) 45%, var(--bc-line)); }
.bc-mv-edit { margin: 2px 0 6px; }
.bc-mv-edit summary { cursor: pointer; font-weight: 700; color: var(--bc-muted); font-size: 14px; }
.bc-mv-edit form { margin-top: 8px; }
a.bc-mv-who { color: inherit; text-decoration: underline; text-decoration-color: var(--bc-violet); text-underline-offset: 3px; }

/* ---------- Model answer / mark scheme, version front page, annotating versions (0.44.0) ---------- */
.bc-hw-answers { margin: 16px 0; padding: 14px 16px; border-radius: 16px; border: 2px solid color-mix(in srgb, var(--bc-good) 55%, var(--bc-line)); background: color-mix(in srgb, var(--bc-good) 8%, transparent); }
.bc-hw-answers.is-locked { border-color: var(--bc-line); background: var(--bc-surface); }
.bc-hw-answers h2 { margin: 0 0 4px; font-size: 18px; }
.bc-hw-answers-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; }
.bc-hw-ans-model { border-color: #0EA5E9 !important; }
.bc-hw-ans-scheme { border-color: var(--bc-good) !important; }
.bc-hw-answer-ups { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.bc-hw-answer-up { display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed var(--bc-line); border-radius: 12px; font-weight: 700; }
.bc-mv-viewing, .bc-mv-editing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bc-violet) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bc-violet) 45%, transparent); }
.bc-mv-viewing .bc-mv-badge, .bc-mv-editing .bc-mv-badge { width: 34px; height: 34px; border-radius: 10px; font-size: 14px; }
.bc-mv-cover { max-width: 820px; margin: 0 auto 16px; border-radius: 18px; overflow: hidden; background: #fff; color: #0F172A; box-shadow: var(--bc-shadow); }
.bc-mv-cover-band { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 18px 22px; background: #0B0E1C; border-bottom: 5px solid #DC2626; color: #fff; }
.bc-mv-cover-band strong { font-size: 22px; }
.bc-mv-cover-band span { color: #CBD5E1; font-size: 14px; }
.bc-mv-cover-band em { margin-left: auto; font-style: normal; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: #7C3AED; }
.bc-mv-cover-body { display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; padding: 20px 22px; }
.bc-mv-cover-body p { margin: 0 0 12px; }
.bc-mv-cover small { display: block; color: #64748B; font-weight: 700; font-size: 12px; letter-spacing: .06em; }
.bc-mv-cover b { display: block; font-size: 19px; }
.bc-mv-cover-name { font-size: 26px !important; }
.bc-mv-cover-who span { color: #475569; font-size: 14px; }
.bc-mv-cover-result { position: relative; min-width: 220px; padding: 14px 16px; border-radius: 16px; background: #F8FAFC; border: 1px solid #E2E8F0; }
.bc-mv-cover-result b { font-size: 30px; }
.bc-mv-cover-grade { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 26px; position: absolute; right: 14px; bottom: 14px; line-height: 1; }
.bc-mv-cover-grade small { color: #fff; font-size: 10px; }
.bc-mv-cover-grade.is-a { background: #15803D; } .bc-mv-cover-grade.is-mid { background: #D97706; } .bc-mv-cover-grade.is-u { background: #DC2626; }
.bc-mv-cover-comment { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #E2E8F0; }
@media (max-width: 600px) { .bc-mv-cover-body { grid-template-columns: 1fr; } }
.bc-mv-anno { margin: 8px 0; padding: 12px 14px; border-radius: 14px; border: 2px dashed var(--bc-violet); background: color-mix(in srgb, var(--bc-violet) 7%, transparent); }
.bc-mv-anno p { margin: 0 0 8px; }
.bc-mv-item.is-annotated .bc-mv-badge { background: #DB2777; }
.bc-ink-title { position: absolute; top: 12px; left: 12px; z-index: 4; max-width: min(46vw, 420px); padding: 6px 12px; border-radius: 99px; background: rgba(124, 58, 237, .92); color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
@media (max-width: 1360px) { .bc-ink-title { top: auto; bottom: 74px; left: 12px; } }

/* ---------- 0.45.0: the marked version's front page, an A4 sheet (same in light and dark) ---------- */
.bc-a4 { container-type: inline-size; width: min(820px, 100%); aspect-ratio: 210 / 297; margin: 0 auto 18px; display: flex; flex-direction: column; background: #fff; color: #0F172A; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); font-family: "Plus Jakarta Sans", Arial, sans-serif; }
.bc-a4 * { color: inherit; }
.bc-a4 small { display: block; color: #64748B; font-weight: 700; font-size: max(10px, 1.5cqw); letter-spacing: .08em; text-transform: uppercase; }
.bc-a4-band { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 4.2cqw 8cqw; background: #0B0E1C; border-bottom: .8cqw solid #DC2626; }
.bc-a4-band strong { display: block; color: #fff; font: 800 max(18px, 4.4cqw)/1.1 Outfit, "Plus Jakarta Sans", Arial, sans-serif; }
.bc-a4-band span { display: block; color: #CBD5E1; font-size: max(11px, 1.9cqw); margin-top: .6cqw; }
.bc-a4-band em { font-style: normal; font-weight: 800; color: #fff; background: #7C3AED; border-radius: 99px; padding: .8cqw 2.2cqw; font-size: max(11px, 1.9cqw); white-space: nowrap; }
.bc-a4-body { flex: 1; min-height: 0; padding: 5cqw 8cqw 2cqw; display: flex; flex-direction: column; gap: 2.6cqw; overflow: hidden; }
.bc-a4-field { margin: 0; }
.bc-a4-field b { display: block; color: #0F172A; font: 700 max(15px, 3cqw)/1.25 Outfit, "Plus Jakarta Sans", Arial, sans-serif; }
.bc-a4-field b.bc-a4-name { font-size: max(20px, 4.4cqw); font-weight: 800; }
.bc-a4-field span { display: block; color: #475569; font-size: max(12px, 1.9cqw); margin-top: .4cqw; }
.bc-a4-result { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; padding: 3cqw 4cqw; border-radius: 2cqw; background: #F8FAFC; border: 1px solid #E2E8F0; }
.bc-a4-result b { display: block; color: #0F172A; font-family: Outfit, "Plus Jakarta Sans", Arial, sans-serif; font-weight: 800; line-height: 1.1; }
.bc-a4-big { font-size: max(26px, 6.4cqw); margin-bottom: 1.6cqw; }
.bc-a4-mid { font-size: max(20px, 4.4cqw); }
.bc-a4-grade { flex: none; display: grid; place-items: center; align-content: center; width: max(76px, 18cqw); aspect-ratio: 1; border-radius: 50%; color: #fff; font: 800 max(28px, 6.6cqw)/1 Outfit, Arial, sans-serif; }
.bc-a4-grade small { color: #fff; font-size: max(8px, 1.3cqw); margin-top: .8cqw; }
.bc-a4-grade.is-a { background: #15803D; } .bc-a4-grade.is-mid { background: #D97706; } .bc-a4-grade.is-u { background: #DC2626; }
.bc-a4-facts { display: grid; grid-template-columns: auto 1fr; gap: .8cqw 3cqw; margin: 0; font-size: max(12px, 1.9cqw); }
.bc-a4-facts dt { color: #64748B; }
.bc-a4-facts dd { margin: 0; color: #0F172A; font-weight: 700; }
.bc-a4-comment p { margin: .8cqw 0 0; color: #0F172A; font-size: max(12px, 1.95cqw); line-height: 1.5; }
.bc-a4-foot { padding: 0 8cqw 4cqw; }
.bc-a4-signs { display: flex; gap: 4cqw; }
.bc-a4-sign { flex: 1; min-width: 0; }
.bc-a4-sign-mark { height: max(34px, 8cqw); display: flex; align-items: flex-end; border-bottom: 1.5px solid #CBD5E1; padding-bottom: .6cqw; }
.bc-a4-sign-mark img { max-height: 100%; max-width: 100%; }
.bc-a4-script { font: 400 max(17px, 3.5cqw)/1.15 "Great Vibes", "Brush Script MT", cursive; color: #1E3A8A; white-space: nowrap; }
.bc-a4-sign b { display: block; margin-top: 1cqw; color: #0F172A; font-size: max(11px, 1.8cqw); }
.bc-a4-sign small { text-transform: none; letter-spacing: 0; font-weight: 500; color: #475569; font-size: max(10px, 1.45cqw); }
.bc-a4-foot p { margin: 3cqw 0 0; padding-top: 1.6cqw; border-top: 1px solid #E2E8F0; color: #64748B; font-size: max(9px, 1.4cqw); }
@media (max-width: 520px) { .bc-a4 { aspect-ratio: auto; } .bc-a4-signs { flex-wrap: wrap; } .bc-a4-sign { flex-basis: 40%; } }

/* ---------- 0.46.0 ---------- */
/* The header stays on top; the paper page's Back / Download bar sticks right under it. */
.bc-top { position: sticky; top: 0; z-index: 60; }
.bc-hw-viewbar { position: sticky; top: var(--bc-top-h, 72px); z-index: 55; padding: 10px 0; background: var(--bc-ink); box-shadow: 0 10px 18px -14px rgba(0, 0, 0, .6); }

/* Assignments */
.bc-tool-sub { display: inline-block; margin-left: 8px; font: 600 15px 'Plus Jakarta Sans', sans-serif; color: var(--bc-muted); vertical-align: middle; }
.bc-assign-btn { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 16px 18px; border-radius: 18px; text-decoration: none; color: var(--bc-text); background: linear-gradient(100deg, rgba(124, 58, 237, .22), rgba(239, 68, 68, .16)), var(--bc-surface); border: 1.5px solid rgba(124, 58, 237, .55); box-shadow: 0 10px 26px rgba(124, 58, 237, .18); transition: transform .15s ease, box-shadow .15s ease; }
.bc-assign-btn:hover, .bc-assign-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(124, 58, 237, .28); }
.bc-assign-icon { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(124, 58, 237, .22); font-size: 28px; }
.bc-assign-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bc-assign-text strong { font: 800 22px Outfit, sans-serif; }
.bc-assign-text small { color: var(--bc-muted); font-size: 13px; }
.bc-assign-count { flex: none; padding: 6px 12px; border-radius: 99px; background: #DC2626; color: #fff; font-weight: 800; font-size: 14px; }
.bc-assign-count.is-done { background: rgba(34, 197, 94, .18); color: #4ADE80; }
.bc-assign-go { flex: none; font-size: 26px; color: var(--bc-muted); }
@media (max-width: 520px) { .bc-assign-text small { display: none; } .bc-assign-text strong { font-size: 19px; } }

/* Quizzes in Coming up */
a.bc-date-card { text-decoration: none; color: var(--bc-text); }
.bc-date-card.is-quiz { border-left-color: #7C3AED; }
.bc-date-card.is-quiz .bc-date-tile { background: rgba(124, 58, 237, .18); color: #C4B5FD; }
.bc-date-card.is-quiz:hover { border-color: rgba(124, 58, 237, .6); }
.bc-date-live { color: #4ADE80; font-weight: 800; font-size: 13px; }

/* Class reminders: firmer, until they are on */
.bc-push-banner.is-must { padding: 16px 18px; border: 1.5px solid rgba(239, 68, 68, .7); background: linear-gradient(90deg, rgba(239, 68, 68, .22), rgba(239, 68, 68, .05) 75%), var(--bc-surface); box-shadow: 0 10px 28px rgba(239, 68, 68, .18); }
.bc-push-banner.is-must .bc-push-banner-icon { width: 48px; height: 48px; font-size: 24px; animation: bc-ring 2.4s ease-in-out infinite; }
.bc-push-banner.is-must .bc-push-banner-text strong { font-size: 16px; }
.bc-push-banner.is-done { border-color: rgba(34, 197, 94, .6); background: rgba(34, 197, 94, .1); box-shadow: none; }
.bc-push-banner.is-done .bc-push-banner-icon { animation: none; }
.bc-push-banner-close { width: auto; padding: 0 10px; font-size: 13px; font-weight: 600; }
@keyframes bc-ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-14deg); } 80% { transform: rotate(12deg); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .bc-push-banner.is-must .bc-push-banner-icon { animation: none; } }

/* Teacher Overview: cards in two columns on wide screens */
.bc-ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 18px; align-items: start; margin-top: 18px; }
.bc-ov-card { min-width: 0; padding: 16px 20px 18px; border-radius: 18px; border: 1px solid var(--bc-line); background: var(--bc-surface); }
.bc-ov-card > h2:first-child, .bc-ov-card > .bc-push-who h2 { margin-top: 0; }
.bc-ov-wide { margin-top: 18px; }
.bc-ov-card .bc-coming, .bc-ov-card .bc-table { max-width: none; width: 100%; }
.bc-ov-card .bc-tiles { margin-bottom: 8px; }
.bc-ov-more { margin-top: 16px; border-top: 1px solid var(--bc-line); padding-top: 12px; }
.bc-ov-more > summary { cursor: pointer; font-weight: 700; color: var(--bc-muted); }
.bc-ov-more[open] > summary { color: var(--bc-text); }
.bc-ov-more .bc-push-panel { max-width: none; margin-top: 12px; }

/* ---------- 0.46.2: Overview cards fold ---------- */
details.bc-ov-card { padding: 0; }
.bc-ov-sum { display: flex; align-items: center; gap: 8px; padding: 14px 18px; cursor: pointer; list-style: none; font: 700 18px Outfit, 'Plus Jakarta Sans', sans-serif; }
.bc-ov-sum::-webkit-details-marker { display: none; }
.bc-ov-sum small { font: 600 12px 'Plus Jakarta Sans', sans-serif; color: var(--bc-muted); }
.bc-ov-sum::after { content: '▾'; margin-left: auto; color: var(--bc-muted); transition: transform .15s ease; }
details.bc-ov-card:not([open]) > .bc-ov-sum::after { transform: rotate(-90deg); }
details.bc-ov-card[open] > .bc-ov-sum { border-bottom: 1px solid var(--bc-line); }
.bc-ov-body { padding: 12px 18px 18px; min-width: 0; }
.bc-ov-body > h2:first-child { display: none; } /* the card's own title says it */
.bc-ov-body .bc-viewas-quick, .bc-ov-body .bc-viewas-pick { border: 0; padding: 0; background: none; box-shadow: none; }
.bc-push-who-group > summary { cursor: pointer; }

/* ---------- 0.46.3: Install the app banner ---------- */
.bc-push-banner.is-install { padding: 16px 18px; border: 1.5px solid rgba(59, 130, 246, .65); background: linear-gradient(90deg, rgba(59, 130, 246, .22), rgba(59, 130, 246, .05) 75%), var(--bc-surface); box-shadow: 0 10px 28px rgba(59, 130, 246, .16); }
.bc-push-banner.is-install .bc-push-banner-icon { width: 48px; height: 48px; font-size: 24px; background: rgba(59, 130, 246, .2); }
.bc-push-banner.is-install .bc-push-banner-text strong { font-size: 16px; }
.bc-push-banner.is-install.is-done { border-color: rgba(34, 197, 94, .6); background: rgba(34, 197, 94, .1); box-shadow: none; }
.bc-push-banner [hidden], .bc-push-panel [hidden] { display: none !important; } /* buttons hidden by push.js stay hidden */

/* ---------- 0.47.0: Fetch the last class ---------- */
.bc-att-lastbtn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0; }
.bc-att-lastbtn small { color: var(--bc-muted); font-size: 12.5px; }
.bc-att-last-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-att-last { display: grid; gap: 14px; max-width: 760px; }
.bc-att-step { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--bc-line); background: var(--bc-surface); }
.bc-att-step h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 18px; }
.bc-att-stepno { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #DC2626; color: #fff; font-size: 14px; font-weight: 800; }
.bc-att-times { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 8px; }
.bc-att-times label { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.bc-att-recs { display: grid; gap: 8px; margin-top: 8px; }
.bc-att-rec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--bc-line); cursor: pointer; }
.bc-att-rec:has(input:checked) { border-color: rgba(220, 38, 38, .7); background: rgba(220, 38, 38, .08); }
.bc-att-rec-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bc-att-rec-main strong { overflow-wrap: anywhere; }
.bc-att-rec-main small { color: var(--bc-muted); }

/* ---------- 0.47.0: Coming up titles fit their box, and two weeks of them ---------- */
.bc-coming-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.bc-coming-field { min-width: 0; }
.bc-coming-field .bc-coming-text { width: 100%; max-width: 100%; min-width: 0; min-height: 64px; resize: vertical; line-height: 1.4; font: inherit; }
.bc-coming-field.is-set .bc-coming-text { border-color: rgba(34, 197, 94, .45); }
.bc-coming-cohort { min-width: 0; }
.bc-coming-more { margin: 2px 0 8px; }
.bc-coming-more > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.bc-coming-more[open] > summary { margin-bottom: 4px; }

/* The quiz notice */
.bc-quiz-notice { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(124, 58, 237, .5); border-left: 5px solid #7C3AED; background: rgba(124, 58, 237, .12); font-weight: 700; }
.bc-quiz-notice-edit { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--bc-line); }
.bc-quiz-notice-edit .bc-inline-form { flex-wrap: wrap; }
.bc-quiz-notice-edit select.bc-input { width: auto; }
.bc-quiz-notice-edit input.bc-input { flex: 1 1 220px; min-width: 0; }

/* ---------- 0.48.0: Classified PDFs ---------- */
.bc-cls-upload { margin: 12px 0; max-width: 760px; }
.bc-cls-upload > summary { cursor: pointer; }
.bc-cls-form { display: grid; gap: 10px; margin-top: 10px; }
.bc-cls-form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.bc-cls-find { max-width: 420px; margin: 8px 0 4px; }
.bc-cls-level { margin-top: 18px; }
.bc-cls-level h2 { display: flex; align-items: center; gap: 8px; }
.bc-cls-topic { margin: 8px 0; border: 1px solid var(--bc-line); border-radius: 14px; background: var(--bc-surface); }
.bc-cls-topic > summary { cursor: pointer; padding: 10px 14px; display: flex; align-items: center; gap: 8px; }
.bc-cls-list { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 6px; }
.bc-cls-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border-radius: 10px; background: var(--bc-tint-2, rgba(255, 255, 255, .03)); }
.bc-cls-main { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.bc-cls-main a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.bc-cls-main small { color: var(--bc-muted); }
.bc-cls-edit > summary { cursor: pointer; color: var(--bc-muted); font-size: 13px; }
.bc-cls-edit[open] { flex-basis: 100%; display: grid; gap: 8px; }
.bc-btn--danger { background: #DC2626; }
.bc-cls-build { border: 1px solid var(--bc-line); border-radius: 14px; padding: 10px 12px; background: var(--bc-surface); }
.bc-cls-build > summary { cursor: pointer; font-weight: 700; }
.bc-cls-compose { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 10px 0 4px; padding: 10px; border-radius: 12px; border: 1px dashed rgba(124, 58, 237, .55); background: rgba(124, 58, 237, .07); }
.bc-cls-compose label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.bc-cls-compose select { min-width: min(100%, 280px); }
.bc-cls-compose input { width: 150px; }
.bc-cls-compose small { flex-basis: 100%; }
.bc-cls-listhead { margin: 10px 0 4px; }
.bc-cls-rows { display: grid; gap: 6px; }
.bc-cls-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--bc-line); }
.bc-cls-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #7C3AED; color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.bc-cls-row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bc-cls-row-main strong { overflow-wrap: anywhere; }
.bc-cls-row-main small { color: var(--bc-muted); }
.bc-icon-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--bc-line); background: transparent; color: var(--bc-text); cursor: pointer; }
.bc-icon-btn:disabled { opacity: .35; cursor: default; }
.bc-cls-msg.is-bad { color: #F87171; }

/* ---------- 0.49.0: iPhone install steps, device check ---------- */
.bc-install-steps { flex-basis: 100%; margin: 6px 0 0; padding: 12px 14px 12px 34px; border-radius: 12px; background: rgba(59, 130, 246, .12); display: grid; gap: 8px; font-size: 14.5px; line-height: 1.45; }
.bc-install-steps li::marker { font-weight: 800; color: #93C5FD; }
.bc-push-banner { flex-wrap: wrap; }
.bc-push-check { margin-top: 12px; }
.bc-push-check > summary { cursor: pointer; font-weight: 700; }
.bc-push-check-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.bc-push-check-list .is-bad { color: #FCA5A5; }

/* Parents: "1 / 3" on the tiles */
.bc-ptile strong .bc-ptile-of { font-size: .55em; font-weight: 700; opacity: .7; }
/* Fetch a class: the Meets, the buttons */
.bc-att-meets { display: grid; gap: 8px; max-width: 760px; }
.bc-att-meet { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-surface); color: var(--bc-text); text-decoration: none; }
.bc-att-meet:hover { border-color: rgba(220, 38, 38, .6); }
.bc-att-meet-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.bc-att-meet-main small { color: var(--bc-muted); }
.bc-att-meet.is-live { border-left: 4px solid #22C55E; }
.bc-att-recs-head { margin: 4px 0 0; font-weight: 700; font-size: 13px; color: var(--bc-muted); }
.bc-att-recs-more > summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
.bc-att-recs-more { display: grid; gap: 8px; }
.bc-att-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bc-att-actions .bc-hint { flex-basis: 100%; margin: 0; }

/* ---------- 0.50.1: New or existing parent ---------- */
.bc-ppick { display: grid; gap: 8px; }
.bc-ppick-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.bc-ppick-existing { display: grid; gap: 6px; }
.bc-ppick-existing[hidden] { display: none; }
.bc-ppick-existing select { max-width: 100%; }
.bc-ppick-guess { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(59, 130, 246, .12); border: 1px solid rgba(59, 130, 246, .4); font-size: 14px; }
.bc-sales-parent { display: grid; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--bc-line); }

/* ---------- 0.51.0: accounts before payment ---------- */
.bc-sales-accounts { border-left: 5px solid #7C3AED; }
.bc-sales-accounts.is-made { border-left-color: #22C55E; }
.bc-sales-form .bc-ppick { margin: 4px 0 8px; }

/* ---------- 0.52.0: Add another parent ---------- */
.bc-extra-parent { margin: 16px 0; }
.bc-extra-parent > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.bc-extra-parent form { display: grid; gap: 10px; margin-top: 10px; }
.bc-extra-parent tr[hidden] { display: none; }

/* ---------- 0.53.0: My tasks ---------- */
.bc-tasks-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .1); color: inherit; text-decoration: none; font-size: 15px; }
.bc-tasks-link.is-open { border-color: rgba(245, 158, 11, .55); background: rgba(245, 158, 11, .12); }
.bc-tasks-link:hover { filter: brightness(1.1); }
.bc-tasks-clear { padding: 16px 18px; border-radius: 14px; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .45); font-size: 16px; margin: 0 0 18px; }
.bc-tasks-sec { margin: 0 0 22px; }
.bc-tasks-sec h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; margin: 0 0 10px; }
.bc-tasks-sec.is-classes h2 { color: #f87171; }
.bc-tasks-sec.is-homework h2 { color: #60a5fa; }
.bc-tasks-sec.is-week h2 { color: #c084fc; }
.bc-tasks-sec.is-money h2 { color: #fbbf24; }
.bc-tasks-n { display: inline-flex; min-width: 24px; height: 24px; padding: 0 7px; align-items: center; justify-content: center; border-radius: 99px; background: #f59e0b; color: #111; font-size: 13px; font-weight: 700; }
.bc-tasks-ok { font-size: 13px; color: #4ade80; font-weight: 600; }
.bc-tasks-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bc-task details { border: 1px solid var(--bc-line); border-radius: 12px; background: var(--bc-card, rgba(255, 255, 255, .03)); }
.bc-task.is-open details { border-color: rgba(245, 158, 11, .45); }
.bc-task summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; cursor: pointer; }
.bc-task summary .bc-btn { margin-left: auto; }
.bc-task-tick { font-size: 20px; line-height: 1; }
.bc-task.is-done .bc-task-tick { color: #4ade80; }
.bc-task.is-done .bc-task-title { opacity: .6; text-decoration: line-through; }
.bc-task-title { font-weight: 600; }
.bc-task details > .bc-hint { margin: 0 0 8px; padding: 0 14px; }
.bc-task-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 9px 14px; border-top: 1px dashed var(--bc-line); }
.bc-task-row.is-late { background: rgba(239, 68, 68, .1); }
.bc-task-what { display: grid; gap: 2px; flex: 1 1 260px; }
.bc-task-what small { opacity: .75; }
.bc-task-do { display: flex; flex-wrap: wrap; gap: 6px; }
.bc-task-do form { margin: 0; }
.bc-task-btn.is-green { background: #16a34a; border-color: #16a34a; color: #fff; }
.bc-task-btn.is-blue { background: #2563eb; border-color: #2563eb; color: #fff; }
.bc-task-btn.is-red { background: #dc2626; border-color: #dc2626; color: #fff; }
.bc-task-btn.is-ghost { background: transparent; border: 1px solid var(--bc-line); color: inherit; }

/* ---------- 0.53.1: a long menu (the teacher's 8) on two rows, no sideways scroll ---------- */
.bc-menu--rows { display: grid; grid-auto-flow: row; grid-template-columns: repeat(var(--bc-menu-cols, 4), auto); gap: 3px; border-radius: 18px; }
.bc-menu--rows a { justify-content: center; }
@media (max-width: 1500px) { .bc-top--rows .bc-brand em { display: none; } }
@media (max-width: 1180px) {
	.bc-top--rows { grid-template-columns: 1fr auto; row-gap: 10px; }
	.bc-top--rows .bc-menu { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; grid-template-columns: repeat(var(--bc-menu-cols, 4), minmax(0, 1fr)); }
}

/* ---------- 0.55.0: ⭐ Extras ---------- */
.bc-hx { margin-top: 28px; }
.bc-hx-new { margin: 0 0 14px; border-color: rgba(245, 158, 11, .5); }
.bc-hx-new > summary { cursor: pointer; font-weight: 700; font-size: 16px; }
.bc-hx-label { display: grid; gap: 4px; margin: 10px 0; max-width: 560px; }
.bc-hx-label span { font-weight: 600; font-size: 14px; }
.bc-hx-label em { font-style: normal; color: #f59e0b; font-weight: 500; }
.bc-hx-label .bc-input { width: 100%; }
.bc-input.is-bad { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .2); }
.bc-hx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bc-hx-card { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(245, 158, 11, .35); border-radius: 14px; background: rgba(245, 158, 11, .07); padding-right: 10px; }
.bc-hx-card > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; text-decoration: none; }
.bc-hx-card > a:hover strong { text-decoration: underline; }
.bc-hx-icon { font-size: 22px; }
.bc-hx-main { display: grid; gap: 2px; min-width: 0; }
.bc-hx-main strong { overflow-wrap: anywhere; }
.bc-hx-del.is-danger { background: #dc2626; border-color: #dc2626; color: #fff; }
.bc-hx-pages { display: grid; gap: 16px; max-width: 900px; margin: 16px auto 0; }
.bc-hx-pages figure { margin: 0; }
.bc-hx-pages img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; border: 1px solid var(--bc-line); }
.bc-hx-pages figcaption { text-align: center; font-size: 13px; color: var(--bc-muted); margin-top: 4px; }
.bc-hx-teacher { margin-top: 24px; }
@media (max-width: 560px) { .bc-hx-card { flex-wrap: wrap; padding: 0 0 10px; } .bc-hx-card .bc-hx-del { margin-left: 14px; } }
.bc-btn:disabled, .bc-btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; } /* 0.55.0: a button that can not be pressed yet looks it */

/* ---------- 0.58.0: Marking: hand in for a student who has not ---------- */
.bc-mark-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bc-mark-upload-hint { margin: 6px 0 10px; }
.bc-mark-row.is-missing { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.bc-mark-row.is-missing .bc-mark-row-name { flex: 1 1 160px; }
.bc-mark-upload-one { margin-left: auto; }

/* ---------- 0.58.2: classified question paper: preview on the page ---------- */
.bc-cls-view { margin: 8px 0 12px; border: 1px solid var(--bc-line, #d6dbe4); border-radius: 12px; overflow: hidden; background: var(--bc-card, #fff); }
.bc-cls-view-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--bc-line, #d6dbe4); }
.bc-cls-view-bar strong { flex: 1 1 200px; overflow-wrap: anywhere; }
.bc-cls-view-frame { display: block; width: 100%; height: 75vh; min-height: 420px; border: 0; background: #525659; }
@media (max-width: 700px) { .bc-cls-view-frame { height: 65vh; min-height: 320px; } }

/* ---------- 0.59.0: extra homework is private; the teacher checks it ---------- */
.bc-hx-badge { justify-self: start; display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.bc-hx-badge.is-wait { background: rgba(245, 158, 11, .16); color: #fbbf24; }
.bc-hx-badge.is-done { background: rgba(22, 163, 74, .18); color: #4ade80; }
.bc-hx-badge.is-redo { background: rgba(220, 38, 38, .16); color: #f87171; }
.bc-hx-card.is-done { border-color: rgba(22, 163, 74, .45); background: rgba(22, 163, 74, .06); }
.bc-hx-card.is-redo { border-color: rgba(220, 38, 38, .4); background: rgba(220, 38, 38, .05); }
.bc-hx-sub { font-size: 15px; margin: 14px 0 8px; }
.bc-hx-checked { margin-top: 14px; }
.bc-hx-checked > summary { cursor: pointer; font-weight: 700; margin-bottom: 8px; }
.bc-hx-result { margin: 12px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--bc-line); }
.bc-hx-result p { margin: 4px 0; }
.bc-hx-result.is-done { border-color: rgba(22, 163, 74, .5); background: rgba(22, 163, 74, .08); }
.bc-hx-result.is-redo { border-color: rgba(220, 38, 38, .45); background: rgba(220, 38, 38, .07); }
.bc-hx-comment { white-space: normal; }
.bc-hx-check { margin: 14px 0; max-width: 640px; }
.bc-hx-check h2 { margin-top: 0; font-size: 17px; }
.bc-hx-choice { display: flex; flex-wrap: wrap; gap: 10px; }
.bc-hx-opt { flex: 1 1 200px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--bc-line); cursor: pointer; font-weight: 700; }
.bc-hx-opt small { font-weight: 500; color: var(--bc-muted); }
.bc-hx-opt.is-done:has(input:checked) { border-color: #16a34a; background: rgba(22, 163, 74, .1); }
.bc-hx-opt.is-redo:has(input:checked) { border-color: #dc2626; background: rgba(220, 38, 38, .08); }
.bc-hx-check textarea.bc-input { width: 100%; resize: vertical; }
[data-bc-hx-check-say].is-bad { color: #dc2626; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .bc-hx-badge.is-wait { color: #b45309; } :root:not([data-theme="dark"]) .bc-hx-badge.is-done { color: #15803d; } :root:not([data-theme="dark"]) .bc-hx-badge.is-redo { color: #b91c1c; } }
:root[data-theme="light"] .bc-hx-badge.is-wait { color: #b45309; } :root[data-theme="light"] .bc-hx-badge.is-done { color: #15803d; } :root[data-theme="light"] .bc-hx-badge.is-redo { color: #b91c1c; }

/* ---------- 0.60.0: notifications on the website: the bell and the banners ---------- */
.bc-nc-bell { position: relative; }
.bc-nc-bell-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--bc-line); background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.bc-nc-bell-btn:hover, .bc-nc-bell-btn[aria-expanded="true"] { background: rgba(127, 127, 127, .14); }
.bc-nc-count { position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font: 700 11px/19px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px var(--bc-surface); }
.bc-nc-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto; border-radius: 14px; border: 1px solid var(--bc-line); background: var(--bc-card); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); text-align: left; }
.bc-nc-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--bc-line); }
.bc-nc-panel-head small { color: #ef4444; font-weight: 700; }
.bc-nc-items { list-style: none; margin: 0; padding: 0; }
.bc-nc-item + .bc-nc-item { border-top: 1px solid var(--bc-line); }
.bc-nc-item-in { display: flex; gap: 10px; padding: 10px 14px; color: inherit; text-decoration: none; }
a.bc-nc-item-in:hover { background: rgba(127, 127, 127, .1); }
.bc-nc-item.is-new .bc-nc-item-in { background: rgba(59, 130, 246, .1); }
.bc-nc-item.is-new strong::after { content: ''; display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #3b82f6; vertical-align: middle; }
.bc-nc-item-icon { font-size: 20px; line-height: 1.2; }
.bc-nc-item-text { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.bc-nc-item-text strong { overflow-wrap: anywhere; }
.bc-nc-item-text span { color: var(--bc-muted); overflow-wrap: anywhere; }
.bc-nc-item-text small { color: var(--bc-muted); font-size: 12px; }
.bc-nc-all { display: block; padding: 11px 14px; border-top: 1px solid var(--bc-line); font-weight: 700; text-align: center; }
.bc-nc-empty { padding: 14px; margin: 0; }
.bc-nc-items--page { max-width: 760px; border: 1px solid var(--bc-line); border-radius: 14px; overflow: hidden; }
.bc-nc-day { padding: 8px 14px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bc-muted); background: rgba(127, 127, 127, .08); }
.bc-nc-items--page .bc-nc-day + .bc-nc-item { border-top: 0; }
.bc-nc-banners { display: grid; gap: 8px; margin: 0 auto 14px; }
.bc-nc-banner { --nc: #3b82f6; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-radius: 14px; border: 1px solid var(--bc-line); border-left: 5px solid var(--nc); background: var(--bc-card); box-shadow: inset 0 0 0 999px rgba(127, 127, 127, .04); transition: opacity .2s, transform .2s; }
.bc-nc-banner.is-going { opacity: 0; transform: translateY(-6px); }
.bc-nc-banner.is-marked, .bc-nc-banner.is-att { --nc: #16a34a; }
.bc-nc-banner.is-due, .bc-nc-banner.is-catchup, .bc-nc-banner.is-live { --nc: #ef4444; }
.bc-nc-banner.is-quiz { --nc: #a855f7; }
.bc-nc-banner.is-homework, .bc-nc-banner.is-material { --nc: #f59e0b; }
.bc-nc-banner.is-class { --nc: #06b6d4; }
.bc-nc-banner-icon { font-size: 24px; }
.bc-nc-banner-text { flex: 1; display: grid; gap: 1px; min-width: 0; font-size: 14px; }
.bc-nc-banner-text strong { font-size: 15px; overflow-wrap: anywhere; }
.bc-nc-banner-text span { overflow-wrap: anywhere; opacity: .88; }
.bc-nc-banner-text small { color: var(--bc-muted); font-size: 12px; }
.bc-nc-banner-go { white-space: nowrap; }
.bc-nc-x { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: inherit; opacity: .6; font-size: 15px; cursor: pointer; }
.bc-nc-x:hover { opacity: 1; background: rgba(127, 127, 127, .18); }
.bc-nc-more { margin: 0; text-align: right; font-size: 14px; }
@media (max-width: 600px) {
	.bc-nc-banner { flex-wrap: wrap; padding: 10px 8px 10px 12px; position: relative; }
	.bc-nc-banner-text { flex: 1 1 calc(100% - 80px); padding-right: 26px; }
	.bc-nc-banner-go { margin-left: 36px; }
	.bc-nc-x { position: absolute; top: 6px; right: 6px; }
	.bc-nc-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--bc-top-h, 64px) + 4px); width: auto; }
}
/* The account bar hides its own text on phones and greys it out (.bc-user span): not inside the bell. */
.bc-user .bc-nc-bell span { display: revert; color: inherit; }
.bc-user .bc-nc-bell .bc-nc-count { display: block; color: #fff; }
.bc-user .bc-nc-bell .bc-nc-item-text { display: grid; }
.bc-user .bc-nc-bell .bc-nc-item-text span { color: var(--bc-muted); }
/* 0.60.1: to-do banners */
.bc-nc-banner.is-late { --nc: #ef4444; background: var(--bc-card); box-shadow: inset 0 0 0 999px rgba(239, 68, 68, .07); }
.bc-nc-banner.is-due { --nc: #f59e0b; }
.bc-hero + .bc-nc-banners { margin-top: 14px; }

/* 0.61.0: report card drafts */
.bc-report-drafts { border-color: rgba(245, 158, 11, .45); }
.bc-report-note { display: inline-block; vertical-align: top; }
.bc-report-note > summary { list-style: none; cursor: pointer; }
.bc-report-note > summary::-webkit-details-marker { display: none; }
.bc-report-note[open] form { display: grid; gap: 6px; margin-top: 6px; min-width: min(360px, 80vw); }
.bc-report-draft-table td:first-child { width: 28px; }

/* 0.63.2: report cards page — the buttons of a draft / an issued card on one line, small (the site-wide
   .bc-actions stacks them full width, which made every row ~350 px tall). The comment form opens below them. */
.bc-report-draft-table td.bc-actions, .bc-report-issued-table td.bc-actions { width: auto; white-space: nowrap; text-align: right; }
.bc-report-draft-table .bc-actions, .bc-report-issued-table .bc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.bc-report-draft-table .bc-actions form, .bc-report-issued-table .bc-actions form { display: inline-flex !important; margin: 0; }
.bc-report-draft-table .bc-actions .bc-btn, .bc-report-issued-table .bc-actions .bc-btn { width: auto; padding: 6px 12px; min-height: 0; line-height: 1.2; }
.bc-report-draft-table td, .bc-report-issued-table td { vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.bc-report-draft-table .bc-report-note { display: inline-flex; flex-direction: column; align-items: flex-end; }
.bc-report-draft-table .bc-report-note > summary { width: auto; }
.bc-report-draft-table .bc-report-note[open] { flex-basis: 100%; align-items: stretch; }
.bc-report-draft-table .bc-report-note[open] > summary { align-self: flex-end; }
.bc-report-draft-table .bc-report-note[open] form { white-space: normal; text-align: left; }
.bc-drafts-bulk { align-items: center; }
.bc-report-draft-table .bc-actions .bc-report-note form { display: grid !important; gap: 6px; width: min(560px, 80vw); margin-top: 6px; }
.bc-report-draft-table .bc-report-note form .bc-input { width: 100%; box-sizing: border-box; }
.bc-report-draft-table .bc-report-note form .bc-btn { justify-self: end; border-radius: 999px; }

/* ---------- 0.66.0: layout fixes from a full check on phone, tablet and desktop ---------- */

/* Sales: cards were at least 560px wide, so on a phone the list scrolled sideways. */
.bc-sales-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); }
.bc-sales-list > *, .bc-sales-item { min-width: 0; }
/* An application's page: the status chip goes under the name instead of being cut off. */
.bc-tool-page-head { flex-wrap: wrap; }
.bc-tool-page-head .bc-pchip { max-width: 100%; }

/* The "?" help bubbles took up room while hidden, so a page could scroll sideways on a phone. */
.bc-help:not(:hover):not(:focus)::after { display: none; }
@media (max-width: 600px) {
	.bc-help::after { position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; max-width: none; transform: none; }
	.bc-help:hover::after, .bc-help:focus::after { transform: none; }
}

/* Forms laid out as a table (Add a student, and others): never wider than the screen. */
@media (max-width: 800px) {
	.bc-fields, .bc-fields tbody, .bc-fields tr { display: block; width: 100%; }
	.bc-fields select, .bc-fields .bc-input, .bc-fields textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
}

/* Attendance: the "From class recordings" box was laid out in one row (a rule meant for the
   recording picker), so its button covered the text on a phone. */
div.bc-att-rec { display: block; cursor: default; padding: 10px 12px; border-radius: 14px; border-color: color-mix(in srgb, #0EA5A4 35%, transparent); }
.bc-att-rec-head { flex-wrap: wrap; }
.bc-att-rec-head > div { flex: 1 1 160px; }
@media (max-width: 720px) {
	/* the arrow sits beside the date, not alone on its own line */
	.bc-att-event > .bc-card-go { grid-column: 2; grid-row: 1; }
	/* class titles wrap instead of being cut off */
	.bc-att-event-main .bc-hint { white-space: normal; overflow: visible; }
}

/* Marking: long homework titles and "mark by" dates wrap on a phone instead of being cut off. */
@media (max-width: 720px) {
	.bc-mark-folder-main strong, .bc-mark-folder-main .bc-hint,
	.bc-mark-row-name strong { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
}

/* My tasks: the task name stays beside its tick box. */
.bc-task-title { flex: 1 1 0; min-width: 0; }

/* Students' homework list: on a phone the state chip goes under the title, so the title has room. */
@media (max-width: 560px) {
	.bc-hw-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
	.bc-hw-card > .bc-hw-state { grid-column: 1; grid-row: 2; justify-self: start; }
	.bc-hw-card > .bc-card-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

/* Reminders / install banners: "Later" sits on the right when the banner wraps on a phone. */
@media (max-width: 560px) {
	.bc-push-banner-close { margin-left: auto; }
}

/* Report cards page on a phone: each draft and each issued card is a small block, not a squeezed table. */
@media (max-width: 700px) {
	.bc-report-draft-table, .bc-report-issued-table { display: block; overflow: visible; }
	.bc-report-draft-table thead, .bc-report-issued-table thead { display: none; }
	.bc-report-draft-table tbody, .bc-report-issued-table tbody { display: grid; gap: 8px; }
	.bc-report-draft-table tr, .bc-report-issued-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 12px; border: 1px solid var(--bc-line); border-radius: 12px; background: var(--bc-surface); }
	.bc-report-draft-table td, .bc-report-issued-table td { display: block; padding: 0 !important; border: 0 !important; width: auto !important; }
	.bc-report-draft-table tr { grid-template-columns: 28px minmax(0, 1fr); column-gap: 8px; }
	.bc-report-draft-table td:first-child { grid-row: 1 / span 5; padding-top: 2px !important; }
	.bc-report-draft-table td:not(:first-child) { grid-column: 2; }
	.bc-report-draft-table td.bc-actions, .bc-report-issued-table td.bc-actions { justify-content: flex-start; text-align: left; white-space: normal; margin-top: 4px; }
	.bc-report-draft-table .bc-actions .bc-report-note form { width: 100%; }
}

/* Sales cards on a phone: the arrow sits on the right instead of alone on its own line. */
@media (max-width: 900px) {
	.bc-sales-card { position: relative; padding-right: 34px; }
	.bc-sales-card > .bc-card-go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
}

/* ---------- 0.66.1: the final mark box was squeezed to a sliver on a phone ---------- */
.bc-mv-final-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; width: 100%; min-width: 0; }
.bc-mv-final-row > .bc-input { flex: none; width: 110px; font: 800 20px Outfit, sans-serif; text-align: center; }
.bc-mv-final-row > span:not(.bc-mark-grade), .bc-mv-final-row > strong { white-space: nowrap; }
.bc-mv-final-row > .bc-btn { margin-left: auto; }
/* number boxes (marks, totals) never shrink so small that the number can't be read */
input[type=number].bc-input--small { min-width: 72px; flex-shrink: 0; }
