/* PhiExam · one design system for the student app and the admin panel. Colours are tokens on :root, redefined for
   dark mode (the OS setting, unless the viewer chose light) and for an explicit dark choice. */

/* Bengali in Kalpurush (the book font, SIL OFL, in vendor/kalpurush); only for Bengali letters, so English and digits
   0-9 stay in the system font and math in KaTeX's. It has one weight: bold is drawn by the browser. */
@font-face {
  font-family: "Kalpurush"; src: url("/vendor/kalpurush/kalpurush.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0964-0965, U+0980-09FF, U+200C-200D, U+25CC;
}
/* The UI in Noto Sans Bengali like the mobile app (SIL OFL, vendor/noto-sans-bengali, four weights); Kalpurush stays
   the book face (--font-book) for printed papers. */
@font-face { font-family: "Noto Sans Bengali UI"; src: url("/vendor/noto-sans-bengali/noto-sans-bengali-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Bengali UI"; src: url("/vendor/noto-sans-bengali/noto-sans-bengali-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Bengali UI"; src: url("/vendor/noto-sans-bengali/noto-sans-bengali-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans Bengali UI"; src: url("/vendor/noto-sans-bengali/noto-sans-bengali-700.woff2") format("woff2"); font-weight: 700 900; font-style: normal; font-display: swap; }

/* palette v2 (the mobile app's src/theme/tokens.ts, light + dark); the old names stay as aliases */
:root {
  color-scheme: light;
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #EEF1F7;
  --surface-3: #E6EAF2;
  --border: #E2E6EF;
  --border-strong: #C9CFDC;
  --text: #0E1424;
  --text-2: #434C63;
  --muted: #5E6880;
  --brand: #2F5BEA;
  --brand-hover: #2448C4;
  --brand-soft: #E8EEFD;
  --brand-ink: #1E3FAE;
  --on-brand: #FFFFFF;
  --hero-1: #14204D;
  --hero-2: #1B2A63;
  --hero-text: #FFFFFF;
  --hero-muted: rgba(255, 255, 255, .76);
  --hero-chip: rgba(255, 255, 255, .12);
  --hero-border: #14204D;
  --hero-accent: #FFD166;
  --page-grid: transparent;
  --good: #12924F;
  --good-ink: #0B7A43;
  --good-soft: #E4F5EC;
  --bad: #D03B3B;
  --bad-ink: #B42828;
  --bad-soft: #FCEBEB;
  --warn: #E0A11B;
  --warn-ink: #8A5A00;
  --warn-soft: #FFF3D6;
  --info-soft: #E8EEFD;
  --answer-saved: #12924F;
  --answer-pending: #E0A11B;
  --glass: rgba(255, 255, 255, .66);
  --glass-border: rgba(255, 255, 255, .9);
  --lens: rgba(47, 91, 234, .12);
  --track: #E2E6EF;
  --varsity: #2F5BEA;
  --varsity-soft: #E8EEFD;
  --engineering: #A84D06;
  --engineering-soft: #FFF0E0;
  --medical: #0F766E;
  --medical-soft: #DDF4F1;
  --agri: #3A7419;
  --agri-soft: #E8F4DF;
  --gst: #6D28D9;
  --gst-soft: #EFE8FD;
  --wrong: #BE123C;
  --wrong-soft: #FDE7EC;
  --on-tint: #FFFFFF;
  --overlay: rgba(14, 20, 36, .45);
  --shadow-color: rgba(20, 32, 77, .14);
  --watermark: rgba(14, 20, 36, .045);
  --series: #2F5BEA;
  --series-soft: #C9D7FF;
  --grid: #E6EAF2;
  --axis: #C9CFDC;
  --shadow-sm: 0 1px 2px rgba(14, 20, 36, .04);
  --shadow: 0 1px 2px rgba(14, 20, 36, .04), 0 4px 16px rgba(14, 20, 36, .05);
  --shadow-lg: 0 20px 50px -12px rgba(20, 32, 77, .28);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-hero: 24px;
  --side: 256px;
  --font: "Noto Sans Bengali UI", "Noto Sans Bengali", "Kalpurush", system-ui, -apple-system, "Segoe UI", "Hind Siliguri", "Kohinoor Bangla", Roboto, sans-serif;
  --font-book: "Kalpurush", "Noto Sans Bengali UI", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* English (html[lang=en], set by lang.js / PX.setLang): the system Latin face first, Noto Sans Bengali after it for
   the Bangla server text inside English screens. Line heights are px or numbers, so nothing moves on a switch. */
html[lang="en"] { --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali UI", "Noto Sans Bengali", sans-serif; }
/* index.html's static text, both languages: only the one in <html lang> shows (before any script draws) */
html[lang="en"] .bn-only, html:not([lang="en"]) .en-only { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #090B11;
    --surface: #12151F;
    --surface-2: #1A1F2C;
    --surface-3: #232838;
    --border: #252B3A;
    --border-strong: #3A4256;
    --text: #EDF0F7;
    --text-2: #BAC1D1;
    --muted: #8C95AA;
    --brand: #7DA2FF;
    --brand-hover: #A9C0FF;
    --brand-soft: rgba(125, 162, 255, .14);
    --brand-ink: #C9D7FF;
    --on-brand: #0A0D16;
    --hero-1: #151E44;
    --hero-2: #1A2552;
    --hero-text: #F3F6FF;
    --hero-muted: rgba(243, 246, 255, .74);
    --hero-chip: rgba(255, 255, 255, .09);
    --hero-border: rgba(125, 162, 255, .22);
    --hero-accent: #FFD166;
    --page-grid: transparent;
    --good: #22C55E;
    --good-ink: #4ADE80;
    --good-soft: rgba(74, 222, 128, .13);
    --bad: #E04848;
    --bad-ink: #F58A8A;
    --bad-soft: rgba(245, 138, 138, .14);
    --warn: #FBBF24;
    --warn-ink: #FBBF24;
    --warn-soft: rgba(251, 191, 36, .13);
    --info-soft: rgba(125, 162, 255, .14);
    --answer-saved: #4ADE80;
    --answer-pending: #FBBF24;
    --glass: rgba(24, 28, 40, .58);
    --glass-border: rgba(255, 255, 255, .09);
    --lens: rgba(125, 162, 255, .16);
    --track: #252B3A;
    --varsity: #8FB0FF;
    --varsity-soft: rgba(125, 162, 255, .12);
    --engineering: #FDBA74;
    --engineering-soft: rgba(253, 186, 116, .12);
    --medical: #5EEAD4;
    --medical-soft: rgba(94, 234, 212, .11);
    --agri: #A3E07A;
    --agri-soft: rgba(163, 224, 122, .11);
    --gst: #C4B5FD;
    --gst-soft: rgba(196, 181, 253, .12);
    --wrong: #FDA4AF;
    --wrong-soft: rgba(253, 164, 175, .13);
    --on-tint: #0A0D16;
    --overlay: rgba(0, 0, 0, .6);
    --shadow-color: rgba(0, 0, 0, .5);
    --watermark: rgba(255, 255, 255, .045);
    --series: #7DA2FF;
    --series-soft: #2A3A6E;
    --grid: #232838;
    --axis: #3A4256;
    --shadow-sm: none;
    --shadow: none;
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090B11;
  --surface: #12151F;
  --surface-2: #1A1F2C;
  --surface-3: #232838;
  --border: #252B3A;
  --border-strong: #3A4256;
  --text: #EDF0F7;
  --text-2: #BAC1D1;
  --muted: #8C95AA;
  --brand: #7DA2FF;
  --brand-hover: #A9C0FF;
  --brand-soft: rgba(125, 162, 255, .14);
  --brand-ink: #C9D7FF;
  --on-brand: #0A0D16;
  --hero-1: #151E44;
  --hero-2: #1A2552;
  --hero-text: #F3F6FF;
  --hero-muted: rgba(243, 246, 255, .74);
  --hero-chip: rgba(255, 255, 255, .09);
  --hero-border: rgba(125, 162, 255, .22);
  --hero-accent: #FFD166;
  --page-grid: transparent;
  --good: #22C55E;
  --good-ink: #4ADE80;
  --good-soft: rgba(74, 222, 128, .13);
  --bad: #E04848;
  --bad-ink: #F58A8A;
  --bad-soft: rgba(245, 138, 138, .14);
  --warn: #FBBF24;
  --warn-ink: #FBBF24;
  --warn-soft: rgba(251, 191, 36, .13);
  --info-soft: rgba(125, 162, 255, .14);
  --answer-saved: #4ADE80;
  --answer-pending: #FBBF24;
  --glass: rgba(24, 28, 40, .58);
  --glass-border: rgba(255, 255, 255, .09);
  --lens: rgba(125, 162, 255, .16);
  --track: #252B3A;
  --varsity: #8FB0FF;
  --varsity-soft: rgba(125, 162, 255, .12);
  --engineering: #FDBA74;
  --engineering-soft: rgba(253, 186, 116, .12);
  --medical: #5EEAD4;
  --medical-soft: rgba(94, 234, 212, .11);
  --agri: #A3E07A;
  --agri-soft: rgba(163, 224, 122, .11);
  --gst: #C4B5FD;
  --gst-soft: rgba(196, 181, 253, .12);
  --wrong: #FDA4AF;
  --wrong-soft: rgba(253, 164, 175, .13);
  --on-tint: #0A0D16;
  --overlay: rgba(0, 0, 0, .6);
  --shadow-color: rgba(0, 0, 0, .5);
  --watermark: rgba(255, 255, 255, .045);
  --series: #7DA2FF;
  --series-soft: #2A3A6E;
  --grid: #232838;
  --axis: #3A4256;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
}

/* tone classes: one accent pair per category / state (the app's ui/tones.ts); --tone is the glyph / text colour,
   --tone-soft its soft background, --tone-solid the filled tile behind an --on-tint glyph */
.tone-brand { --tone: var(--brand); --tone-soft: var(--brand-soft); --tone-solid: var(--brand); }
.tone-varsity { --tone: var(--varsity); --tone-soft: var(--varsity-soft); --tone-solid: var(--varsity); }
.tone-engineering { --tone: var(--engineering); --tone-soft: var(--engineering-soft); --tone-solid: var(--engineering); }
.tone-medical { --tone: var(--medical); --tone-soft: var(--medical-soft); --tone-solid: var(--medical); }
.tone-agri { --tone: var(--agri); --tone-soft: var(--agri-soft); --tone-solid: var(--agri); }
.tone-gst { --tone: var(--gst); --tone-soft: var(--gst-soft); --tone-solid: var(--gst); }
.tone-wrong { --tone: var(--wrong); --tone-soft: var(--wrong-soft); --tone-solid: var(--wrong); }
.tone-good { --tone: var(--good-ink); --tone-soft: var(--good-soft); --tone-solid: var(--good); }
.tone-warn { --tone: var(--warn-ink); --tone-soft: var(--warn-soft); --tone-solid: var(--warn); }
.tone-bad { --tone: var(--bad-ink); --tone-soft: var(--bad-soft); --tone-solid: var(--bad); }
.tone-slate { --tone: var(--text-2); --tone-soft: var(--surface-2); --tone-solid: var(--text-2); }

/* ------------------------------------------------------------------ the app's UI kit (PX.ui in common.js) */
/* the tinted square behind an icon (the app's IconTile): soft accent, accent glyph */
.ui-ico {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--tone-soft, var(--brand-soft)); color: var(--tone, var(--brand));
}
.ui-ico-text { font-weight: 700; font-size: 13px; line-height: 1; white-space: nowrap; }
.ui-ico-text.long { font-size: 11px; }

/* screen head (the app's Header): a large title on a tab root, back arrow + title on a sub-screen */
.ui-head { display: flex; align-items: flex-start; gap: 12px; margin: 4px 0 16px; min-height: 56px; }
.ui-head-text { flex: 1; min-width: 0; }
.ui-head-title { font-size: 28px; line-height: 40px; font-weight: 700; letter-spacing: 0; }
.ui-head-sub { color: var(--muted); font-size: 15px; line-height: 24px; margin-top: 2px; }
.ui-head.has-back { align-items: center; }
.ui-head.has-back .ui-head-title { font-size: 20px; line-height: 30px; }
.ui-head.has-back .ui-head-sub { font-size: 13px; line-height: 20px; margin-top: 0; }
.ui-back {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.ui-back:hover { background: var(--surface-2); text-decoration: none; }
.ui-head-actions { display: flex; align-items: center; gap: 8px; flex: none; align-self: center; }

/* hero (the app's HeroCard): solid deep navy, the decorative ring and dot top-right, white text in both themes */
.ui-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; padding: 20px;
  border-radius: var(--radius-hero); background: var(--hero-1); border: 1px solid var(--hero-border); color: var(--hero-text);
}
.ui-hero-ring { position: absolute; right: -46px; top: -46px; width: 170px; height: 170px; border-radius: 50%; border: 26px solid var(--hero-chip); pointer-events: none; }
.ui-hero-blob { position: absolute; right: 54px; bottom: -30px; width: 64px; height: 64px; border-radius: 50%; background: var(--hero-chip); pointer-events: none; }
.ui-hero-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ui-hero-side { position: relative; flex: none; display: grid; place-items: center; }
.ui-hero-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px; border-radius: 999px;
  background: var(--hero-chip); color: var(--hero-text); font-size: 12px; line-height: 18px; font-weight: 600;
}
.ui-hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hero-accent); flex: none; }
.ui-hero-title { font-size: 20px; line-height: 30px; font-weight: 700; color: var(--hero-text); letter-spacing: 0; }
.ui-hero-sub { color: var(--hero-muted); font-size: 13px; line-height: 20px; }
.ui-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.ui-hero-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 0; background: var(--hero-text); color: var(--hero-1); font: inherit; font-size: 14px;
  font-weight: 700; cursor: pointer; white-space: nowrap; transition: transform .12s, opacity .12s;
}
.ui-hero-btn:hover { text-decoration: none; opacity: .92; }
.ui-hero-btn:active { transform: scale(.98); }
.ui-hero-btn.ghost { background: var(--hero-chip); color: var(--hero-text); }
.ui-hero .ring-bg { stroke: var(--hero-chip); }
.ui-hero .ring-fg { stroke: var(--hero-accent); }
.ui-hero .ring-text strong { color: var(--hero-text); }
.ui-hero .ring-text span, .ui-hero .muted { color: var(--hero-muted); }
@media (min-width: 1024px) { .ui-hero { padding: 26px 28px; } .ui-hero-title { font-size: 24px; line-height: 36px; } .ui-hero-sub { font-size: 14px; line-height: 22px; } }

/* tile (the app's Tile): white card + soft icon tile; .tinted = the whole tile in the accent (bank categories) */
.ui-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; min-width: 0;
  min-height: 112px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: transform .14s cubic-bezier(.2, .8, .2, 1), border-color .14s, box-shadow .14s;
}
.ui-tile .ui-ico { width: 38px; height: 38px; border-radius: 12px; }
a.ui-tile:hover, button.ui-tile:hover { text-decoration: none; border-color: color-mix(in srgb, var(--tone) 40%, var(--border)); }
a.ui-tile:active, button.ui-tile:active { transform: scale(.98); }
.ui-tile-text { display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.ui-tile-title { font-size: 14px; line-height: 21px; font-weight: 700; overflow-wrap: anywhere; }
.ui-tile-sub { font-size: 12px; line-height: 18px; color: var(--muted); }
.ui-tile.tinted { background: var(--tone-soft); border-color: transparent; box-shadow: none; padding: 16px; border-radius: 20px; }
.ui-tile.tinted .ui-ico { width: 42px; height: 42px; border-radius: 13px; background: var(--tone-solid); color: var(--on-tint); }
.ui-tile.tinted .ui-tile-title { font-size: 16px; line-height: 24px; }
.ui-tile.tinted .ui-tile-sub { color: var(--text-2); }
.ui-tile.wide { flex-direction: row; align-items: center; gap: 14px; min-height: 80px; grid-column: 1 / -1; }
.ui-tile.wide .ui-tile-text { flex: 1; }
.ui-tile.wide.tinted .ui-ico { width: 48px; height: 48px; border-radius: 15px; }
.ui-tile .ui-chev { color: var(--muted); flex: none; }
.ui-tile.tinted .ui-chev { color: var(--tone); }
.ui-tile.off { opacity: .5; cursor: default; box-shadow: none; }
.ui-tile.locked .ui-tile-title { color: var(--text-2); }
.ui-tile.selected { border: 2px solid var(--brand); padding: 13px; }
.ui-tile-corner {
  position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
}
.ui-tile-corner.on { background: var(--brand); color: var(--on-brand); }
.ui-tile-badge {
  position: absolute; top: 10px; right: 10px; min-height: 20px; padding: 1px 8px; border-radius: 999px; background: var(--brand);
  color: var(--on-brand); font-size: 11px; line-height: 18px; font-weight: 700; white-space: nowrap;
}
/* tile grid: 2 columns on a phone (phone-1/3 to change), up to cols-N on a wide screen; a .wide tile spans the row */
.ui-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ui-grid.phone-1 { grid-template-columns: minmax(0, 1fr); }
.ui-grid.phone-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ui-grid > * { min-width: 0; }
@media (min-width: 640px) {
  .ui-grid.cols-3, .ui-grid.cols-4, .ui-grid.cols-5, .ui-grid.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ui-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ui-grid { gap: 14px; }
  .ui-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
  .ui-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ui-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ui-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* grouped list (the app's Card + ListRow): rows at least 64 tall, tinted icon tile, bold title, muted line */
.ui-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ui-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; color: var(--text);
  background: none; border: 0; font: inherit; text-align: left;
}
.ui-list > .ui-row + .ui-row, .ui-list > * + .ui-row { border-top: 1px solid var(--border); }
a.ui-row, button.ui-row { cursor: pointer; transition: background .12s; }
a.ui-row:hover, button.ui-row:hover { background: var(--surface-2); text-decoration: none; }
a.ui-row:active, button.ui-row:active { background: var(--surface-3); }
.ui-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ui-row-title { font-size: 14px; line-height: 21px; font-weight: 700; overflow-wrap: anywhere; }
.ui-row-sub { font-size: 12px; line-height: 18px; color: var(--muted); }
.ui-row-right { flex: none; display: flex; align-items: center; gap: 6px; max-width: 45%; color: var(--text-2); font-size: 13px; font-weight: 600; text-align: right; }
.ui-row .ui-chev { color: var(--muted); flex: none; }
.ui-row.danger .ui-row-title { color: var(--bad-ink); }

/* section head (the app's SectionHeader) */
.ui-section { margin: 24px 0 10px; }
.ui-section:first-child { margin-top: 0; }
.ui-section-row { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.ui-section-title { flex: 1; min-width: 0; font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: 0; }
.ui-section-link { color: var(--brand); font: inherit; font-size: 13px; font-weight: 700; background: none; border: 0; cursor: pointer; padding: 8px 0 8px 8px; white-space: nowrap; }
.ui-section-link:hover { text-decoration: underline; }
.ui-section-sub { color: var(--muted); font-size: 13px; line-height: 20px; }

/* pill (the app's Badge) */
.ui-pill {
  display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 1px 8px; border-radius: 999px; vertical-align: middle;
  background: var(--tone-soft); color: var(--tone); font-size: 11px; line-height: 17px; font-weight: 700; white-space: nowrap;
}
.ui-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* the language pill (the app's LangPill: the other language, outlined, on the welcome hero) */
.ui-langpill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 10px; border: 1px solid currentColor;
  border-radius: 999px; background: transparent; color: var(--text-2); font: inherit; font-size: 12px; line-height: 18px;
  font-weight: 700; white-space: nowrap; cursor: pointer; flex-shrink: 0;
}
.ui-langpill:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.ui-langpill:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ui-langpill span[lang="bn"] { font-family: "Noto Sans Bengali UI", "Noto Sans Bengali", var(--font); }
.ui-hero .ui-langpill, .au-brand .ui-langpill { color: var(--hero-text); }
.au-brand .ui-langpill { margin-left: auto; }
/* Settings' ভাষা / Language segment: full width like the theme segment, "বাংলা" always in the Bengali face */
.segmented.ui-lang-seg { width: 100%; }
.segmented.ui-lang-seg button { flex: 1; justify-content: center; }
.segmented.ui-lang-seg button:first-child { font-family: "Noto Sans Bengali UI", "Noto Sans Bengali", var(--font); }

/* sheet (the app's Sheet): from the bottom on a phone, a centred dialog on a wide screen */
.ui-scrim { position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: center; background: var(--overlay); animation: fade .18s ease; }
.ui-scrim.out { opacity: 0; transition: opacity .18s ease; }
.ui-sheet {
  display: flex; flex-direction: column; width: 100%; max-height: calc(100dvh - 40px); background: var(--surface);
  border-radius: 20px 20px 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg);
  animation: ui-sheet-up .26s cubic-bezier(.2, .8, .2, 1);
}
.ui-scrim.out .ui-sheet { transform: translateY(24px); transition: transform .18s ease; }
.ui-grip { flex: none; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 8px auto 0; }
.ui-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 4px 16px; }
.ui-sheet-head h2 { font-size: 18px; line-height: 28px; }
.ui-sheet-x { border-color: transparent; background: transparent; }
.ui-sheet-body { padding: 8px 16px; overflow-y: auto; overscroll-behavior: contain; }
.ui-sheet-body > p { color: var(--text-2); }
.ui-sheet-foot { display: flex; gap: 10px; padding: 12px 16px 0; }
.ui-sheet-foot .btn { flex: 1; }
@keyframes ui-sheet-up { from { transform: translateY(100%); } }
@media (min-width: 1024px) {
  .ui-scrim { align-items: center; padding: 24px; }
  .ui-sheet { width: min(480px, 100%); border-radius: 20px; padding-bottom: 20px; animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
  .ui-sheet.wide { width: min(720px, 100%); }
  .ui-grip { display: none; }
  .ui-sheet-head { padding: 16px 14px 4px 20px; }
  .ui-sheet-body { padding: 8px 20px; }
  .ui-sheet-foot { padding: 14px 20px 0; justify-content: flex-end; }
  .ui-sheet-foot .btn { flex: 0 0 auto; min-width: 120px; }
}

/* the app's short entrance: up to 6 children rise in turn (180–240 ms); none under reduced motion (rule below) */
.ui-in > * { animation: ui-rise .22s cubic-bezier(.2, .8, .2, 1) both; }
.ui-in > :nth-child(2) { animation-delay: 30ms; }
.ui-in > :nth-child(3) { animation-delay: 60ms; }
.ui-in > :nth-child(4) { animation-delay: 90ms; }
.ui-in > :nth-child(5) { animation-delay: 120ms; }
.ui-in > :nth-child(n+6) { animation-delay: 150ms; }
@keyframes ui-rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .ui-in > *, .ui-sheet, .ui-scrim { animation: none !important; } }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text); font: 15px/1.6 var(--font);
  background: var(--bg) linear-gradient(var(--page-grid) 1px, transparent 1px) 0 0 / 56px 56px fixed,
    linear-gradient(90deg, var(--page-grid) 1px, transparent 1px) 0 0 / 56px 56px fixed;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.12rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; display: block; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ shell: sidebar + top bar + content */
.shell { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 30;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; color: var(--text); font-weight: 800; font-size: 1.15rem; }
.side-brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: block; flex: none;
  box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--brand) 70%, transparent);
}
.brand-sub { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.nav-group { margin-top: 14px; }
.nav-group-title { padding: 0 10px 6px; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-2);
  font-weight: 600; font-size: .93rem; margin-bottom: 2px; position: relative;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.on { background: var(--brand-soft); color: var(--brand-ink); }
.nav-link.on .icon { color: var(--brand); }
.nav-badge {
  margin-left: auto; min-width: 22px; padding: 0 7px; height: 20px; border-radius: 999px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); font-size: .72rem; font-weight: 700;
}
.nav-badge.hot { background: var(--bad); color: #fff; }
.side-foot { border-top: 1px solid var(--border); padding: 12px; }
/* .icon-btn (later) sets display: grid, so name both classes or the button shows in the phone menu too */
.icon-btn.rail-btn { display: none; }
/* the slim rail (wide screens): icons only, named on hover */
@media (min-width: 1025px) {
  .icon-btn.rail-btn { display: grid; margin: 0 auto 6px; border-color: transparent; background: transparent; width: 44px; height: 44px; }
  body.rail { --side: 92px; }
  body.rail .side-text, body.rail .nav-group-title { display: none; }
  body.rail .side-brand { justify-content: center; padding: 20px 0 14px; }
  body.rail .brand-mark { width: 42px; height: 42px; border-radius: 13px; }
  body.rail .side-nav { padding: 4px 14px 12px; }
  body.rail .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
  body.rail .nav-group:first-child { border-top: 0; padding-top: 0; }
  body.rail .nav-link { justify-content: center; padding: 0; height: 52px; border-radius: 14px; margin-bottom: 4px; }
  body.rail .nav-link.on { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent); }
  body.rail .nav-badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; font-size: .64rem; background: var(--bad); color: #fff; }
  body.rail .side-foot { padding: 12px 0; display: flex; justify-content: center; }
  body.rail .me-card { padding: 4px; }
  body.rail .me-card .avatar { width: 44px; height: 44px; }
}
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me-card:hover { background: var(--surface-2); text-decoration: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem;
  color: var(--brand-ink); background: var(--brand-soft);
}
.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }
.me-name { font-weight: 700; color: var(--text); font-size: .9rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-sub { font-size: .75rem; color: var(--muted); display: block; }

.main { margin-left: var(--side); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar-title { font-size: 1.1rem; font-weight: 750; }
.topbar-title .muted { font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.menu-btn { display: none; }
/* the logo in the top bar, where the sidebar (and its logo) is hidden: tablets and phones */
.topbar-logo { display: none; flex: none; margin-right: -2px; }
.topbar-logo img { width: 32px; height: 32px; border-radius: 9px; display: block; box-shadow: 0 4px 10px -5px color-mix(in srgb, var(--brand) 70%, transparent); }
.content { max-width: 1240px; margin: 0 auto; padding: 8px 28px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 2rem; letter-spacing: -.02em; }
.page-head p { color: var(--text-2); margin-top: 4px; font-size: 1rem; }
@media (max-width: 720px) { .page-head h1 { font-size: 1.45rem; } .page-head { margin-bottom: 18px; } }

.tabbar { display: none; }
.scrim { display: none; }

/* focus mode (during an exam) and the sign-in page: no sidebar */
body.focus .side, body.focus .tabbar, body.focus .topbar, body.auth .side, body.auth .tabbar, body.auth .topbar,
body.gate .side, body.gate .tabbar, body.gate .topbar { display: none; }
body.focus .main, body.auth .main, body.gate .main { margin-left: 0; }
body.focus .content { max-width: 1180px; padding-top: 0; }
body.auth .content { max-width: none; padding: 0; }

@media (max-width: 1024px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .45); z-index: 25; }
  .main { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar-logo { display: block; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .topbar { padding: 0 16px; height: 58px; }
  .content { padding: 4px 16px 96px; }
  body.focus .content { padding-bottom: 24px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface);
    border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--muted);
    font-size: .7rem; font-weight: 600; background: none; border: 0; cursor: pointer;
  }
  .tab:hover { text-decoration: none; }
  .tab.on { color: var(--brand); }
  .menu-btn { display: none; }
  h1 { font-size: 1.3rem; }
}

/* ------------------------------------------------------------------ student chrome: the app's four tabs
   Phones and tablets: no top bar, screens draw their own header (PX.ui.screenHead), and the floating frosted-glass
   pill tab bar (the app's ui/tabbar.tsx) with a lens behind the open tab. ≥ 1024 px: a slim rail on the left with
   the same four tabs, content centred. (The admin panel keeps its own sidebar: everything here is body.student.) */
body.student { --tabbar-h: calc(64px + max(12px, env(safe-area-inset-bottom)) + 8px); background: var(--bg); }
body.student.focus, body.student.auth, body.student.notab { --tabbar-h: 0px; }
body.student.notab .tabbar { display: none; }
body.student .topbar, body.student .scrim, body.student .side { display: none; }
body.student .main { margin-left: 0; }
body.student .content { max-width: 760px; padding: max(14px, env(safe-area-inset-top)) 16px calc(var(--tabbar-h) + 28px); }
body.student.focus .content { max-width: 1180px; padding-bottom: 24px; }
body.student.auth .content { max-width: none; padding: 0; }

body.student .tabbar {
  display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 0 16px max(12px, env(safe-area-inset-bottom));
  background: none; border: 0; pointer-events: none; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s;
}
body.student.focus .tabbar, body.student.auth .tabbar, body.student.gate .tabbar { display: none; }
body.student.kb .tabbar { transform: translateY(130%); opacity: 0; }
.gt { position: relative; height: 64px; max-width: 520px; margin: 0 auto; pointer-events: auto; --i: 0; --x: 0px; }
.gt-shadow {
  position: absolute; top: 2px; bottom: 0; left: 6px; right: 6px; border-radius: 999px; pointer-events: none;
  box-shadow: 0 18px 40px rgba(20, 32, 77, .18), 0 4px 12px rgba(47, 91, 234, .08), 0 1px 3px rgba(20, 32, 77, .06);
}
/* the pane: a thin tint of glass over a strong blur; light falls on it from above, a faint cool–violet sheen across */
.gt-pill {
  position: relative; height: 100%; border-radius: 999px; overflow: hidden; isolation: isolate;
  background: rgba(255, 255, 255, .46); border: 1px solid rgba(255, 255, 255, .95); outline: .5px solid rgba(14, 20, 36, .07);
  -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), inset 0 -1px 0 rgba(20, 32, 77, .06);
}
.gt-pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .22) 55%, rgba(255, 255, 255, .06) 100%),
    linear-gradient(90deg, rgba(47, 91, 234, .05), rgba(255, 255, 255, 0) 50%, rgba(109, 40, 217, .04));
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) { .gt-pill { background: color-mix(in srgb, var(--surface) 96%, transparent); } }
.gt-row { position: absolute; inset: 4px; display: flex; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
/* the open tab's capsule: bright-rimmed glass with the brand's lens tint; it springs from tab to tab */
.gt-lens {
  position: absolute; top: 0; bottom: 0; left: 0; width: 25%; border-radius: 999px; pointer-events: none;
  translate: calc(var(--i) * 100%) 0; transition: translate .5s cubic-bezier(.3, 1.32, .5, 1), opacity .18s;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .1) 60%, rgba(255, 255, 255, .55)),
    linear-gradient(var(--lens), var(--lens)), rgba(255, 255, 255, .86);
  border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1), 0 3px 10px rgba(47, 91, 234, .14), 0 1px 2px rgba(20, 32, 77, .06);
}
.gt-lens.smear { animation: gt-smear .46s cubic-bezier(.2, .8, .2, 1); }
@keyframes gt-smear { 22% { scale: 1.22 .9; } 100% { scale: 1 1; } }
.gt.none .gt-lens { opacity: 0; }
/* under a finger the capsule turns into a lens that rises out of the bar (not clipped by the pane) */
.gt-lift {
  position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 4); border-radius: 999px; pointer-events: none;
  opacity: 0; scale: 1 1; translate: calc(var(--i) * 100%) 0;
  transition: translate .5s cubic-bezier(.3, 1.32, .5, 1), opacity .16s, scale .3s cubic-bezier(.3, 1.5, .5, 1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .04) 55%, rgba(255, 255, 255, .24)), rgba(255, 255, 255, .1);
  border: 1.5px solid rgba(255, 255, 255, .98);
  box-shadow: 0 8px 22px rgba(20, 20, 40, .16), inset 0 1px 2px rgba(255, 255, 255, .95), inset 0 -3px 8px rgba(255, 255, 255, .45),
    inset 0 0 0 2px color-mix(in srgb, var(--brand) 22%, transparent);
}
.gt.lift .gt-lift { opacity: 1; scale: 1.22 1.45; }
.gt.lift .gt-lens { opacity: 0; }
.gt.drag .gt-lens, .gt.drag .gt-lift { translate: var(--x) 0; transition: opacity .16s, scale .3s; }
.gt-tab {
  flex: 1; min-width: 0; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; color: var(--text-2); font-size: 11.5px; line-height: 16px; font-weight: 500; text-decoration: none; border-radius: 999px;
  -webkit-tap-highlight-color: transparent; -webkit-user-drag: none; transition: scale .25s cubic-bezier(.3, 1.5, .5, 1), color .15s;
}
.gt-tab:hover { text-decoration: none; color: var(--text); }
.gt-tab .icon { width: 23px; height: 23px; }
.gt-tab.on { color: var(--brand); font-weight: 700; }
.gt-tab.on .icon path { fill: currentColor; fill-opacity: .16; }
.gt.lift .gt-tab.hover { scale: 1.3; }
.gt-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
/* English "Question Bank" (bold when on) is a little wider than a quarter of a phone: a touch smaller there, not "Question B…" */
@media (max-width: 420px) { html[lang="en"] .gt-label { font-size: 10.5px; letter-spacing: -.1px; padding: 0; } }
.gt-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gt-shadow { box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 3px 10px rgba(0, 0, 0, .4), 0 0 0 1px rgba(125, 162, 255, .06); }
  :root:not([data-theme="light"]) .gt-pill { background: rgba(20, 24, 36, .42); border-color: rgba(255, 255, 255, .12); outline-color: rgba(0, 0, 0, .5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .35); }
  :root:not([data-theme="light"]) .gt-pill::before { background: linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(90deg, rgba(125, 162, 255, .07), rgba(255, 255, 255, 0) 50%, rgba(196, 181, 253, .06)); }
  :root:not([data-theme="light"]) .gt-lens { background: linear-gradient(180deg, rgba(201, 215, 255, .2), rgba(125, 162, 255, .02) 60%, rgba(125, 162, 255, .1)), rgba(125, 162, 255, .16);
    border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .14), 0 2px 8px rgba(0, 0, 0, .25); }
  :root:not([data-theme="light"]) .gt-lift { background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .1)), rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .5); box-shadow: 0 8px 22px rgba(0, 0, 0, .45), inset 0 1px 2px rgba(255, 255, 255, .35), inset 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
  :root:not([data-theme="light"]) .gt-tab.on .icon path { fill-opacity: .22; }
}
:root[data-theme="dark"] .gt-shadow { box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 3px 10px rgba(0, 0, 0, .4), 0 0 0 1px rgba(125, 162, 255, .06); }
:root[data-theme="dark"] .gt-pill { background: rgba(20, 24, 36, .42); border-color: rgba(255, 255, 255, .12); outline-color: rgba(0, 0, 0, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .35); }
:root[data-theme="dark"] .gt-pill::before { background: linear-gradient(180deg, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, .03) 55%, rgba(255, 255, 255, 0) 100%),
  linear-gradient(90deg, rgba(125, 162, 255, .07), rgba(255, 255, 255, 0) 50%, rgba(196, 181, 253, .06)); }
:root[data-theme="dark"] .gt-lens { background: linear-gradient(180deg, rgba(201, 215, 255, .2), rgba(125, 162, 255, .02) 60%, rgba(125, 162, 255, .1)), rgba(125, 162, 255, .16);
  border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .14), 0 2px 8px rgba(0, 0, 0, .25); }
:root[data-theme="dark"] .gt-lift { background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .02) 55%, rgba(255, 255, 255, .1)), rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .5); box-shadow: 0 8px 22px rgba(0, 0, 0, .45), inset 0 1px 2px rgba(255, 255, 255, .35), inset 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
:root[data-theme="dark"] .gt-tab.on .icon path { fill-opacity: .22; }
@media (prefers-reduced-motion: reduce) { .gt-lens, .gt-lift, .gt-tab { transition: none !important; } .gt-lens.smear { animation: none; } }

/* the rail (≥ 1024 px): logo, the four tabs (icon in a lens pill, label under it), theme + me at the foot */
@media (min-width: 1024px) {
  body.student { --side: 96px; --tabbar-h: 0px; }
  body.student .tabbar { display: none; }
  body.student .side {
    display: flex; flex-direction: column; align-items: center; width: var(--side); padding: 18px 0 16px; transform: none; box-shadow: none;
    background: var(--surface); border-right: 1px solid var(--border);
  }
  body.student.focus .side, body.student.auth .side, body.student.gate .side { display: none; }
  body.student .main { margin-left: var(--side); }
  body.student.focus .main, body.student.auth .main, body.student.gate .main { margin-left: 0; }
  body.student .content { max-width: 1128px; padding: 28px 24px 64px; }
  body.student.focus .content { max-width: 1180px; padding-top: 0; }
  body.student.auth .content { max-width: none; padding: 0; }
}
.rail-brand { display: block; margin-bottom: 22px; }
.rail-brand img { width: 44px; height: 44px; border-radius: 13px; display: block; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.rail-tabs { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 0 10px; }
.rail-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 6px 0 8px; border-radius: 16px;
  color: var(--text-2); font-size: 12px; line-height: 16px; font-weight: 600; text-align: center;
}
.rail-tab:hover { text-decoration: none; color: var(--text); }
.rail-ico { width: 56px; height: 34px; border-radius: 999px; display: grid; place-items: center; transition: background .18s, color .18s; }
.rail-tab:hover .rail-ico { background: var(--surface-2); }
.rail-tab.on { color: var(--brand); font-weight: 700; }
.rail-tab.on .rail-ico { background: var(--lens); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 18%, transparent); }
.rail-tab.on .icon path { fill: currentColor; fill-opacity: .16; }
.rail-label { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* English "Question Bank" is wider than the rail: two short lines, not "Question Ba…" */
html[lang="en"] .rail-label { white-space: normal; overflow-wrap: anywhere; }
.rail-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rail-foot .icon-btn { width: 44px; height: 44px; border-radius: 50%; }
.avatar.rail-me { width: 44px; height: 44px; font-size: .9rem; }
.avatar.rail-me:hover { text-decoration: none; }
/* Piku stands above the floating bar, never on it */
body.student .pk { bottom: calc(var(--tabbar-h) + 6px); }
body.student.kb .pk { bottom: 12px; }
/* … and never on what is to be read or tapped (mascot.js settle): the end of every page keeps a clear floor for it
   (not with a page's own bar docked at the bottom: it stands above that bar there) */
body.student.pk-on:not(.focus):not(.auth) .content:not(:has(.rs-bar-dock, .rk-pin)) { padding-bottom: calc(var(--tabbar-h) + 96px); }

/* ------------------------------------------------------------------ cards, buttons, inputs */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.card.pad-lg { padding: 28px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head h2 .icon { color: var(--brand); background: var(--brand-soft); padding: 7px; width: 32px; height: 32px; border-radius: 10px; }
.card-sub { color: var(--muted); font-size: .85rem; margin-top: -8px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .card { padding: 16px; } }
@media (max-width: 420px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
/* grid and flex children may shrink below their content (a chart drawn wide must not widen the page on a phone) */
.split > *, .grid > *, .stack > * { min-width: 0; }

/* buttons (the app's Button): pill, 44 tall (small 34, lg 52), bold */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: .92rem; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s, transform .08s, opacity .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { filter: brightness(.95); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }
.btn.small { min-height: 34px; padding: 0 14px; font-size: .84rem; border-radius: 999px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 1rem; border-radius: 999px; }
.btn.wide { width: 100%; }
.btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 600; }
.link:hover { text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .86rem; color: var(--text-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.input, .field input, .field select, .field textarea, select.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s;
}
.field textarea { min-height: 90px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search { position: relative; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }
.form-error { color: var(--bad-ink); font-size: .88rem; min-height: 1.2em; margin-bottom: 8px; }

/* badges and pills */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .75rem;
  font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge.good { background: var(--good-soft); color: var(--good-ink); }
.badge.bad { background: var(--bad-soft); color: var(--bad-ink); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge.info { background: var(--info-soft); color: var(--series); }
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.lvl { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.lvl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.lvl-killer .lvl-dot { background: var(--bad); box-shadow: 0 0 0 2px var(--bad-soft); }
.lvl-hard .lvl-dot { background: #ec835a; }
.lvl-medium .lvl-dot { background: var(--warn); }
.lvl-easy .lvl-dot { background: var(--good); }
.lvl-trivial .lvl-dot { background: var(--border-strong); }

/* segmented control (the app's Segmented): a track (radius 14) with the chosen segment raised; chips: pills */
.segmented {
  display: inline-flex; gap: 2px; flex-wrap: wrap; padding: 4px; border-radius: 14px; background: var(--surface-3);
  border: 1px solid transparent; max-width: 100%;
}
.segmented button {
  border: 1px solid transparent; background: transparent; min-height: 40px; padding: 0 14px; border-radius: 11px; font-weight: 700;
  font-size: .9rem; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .14s, color .14s, box-shadow .14s;
}
.segmented button:hover { color: var(--text); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(14, 20, 36, .08), 0 2px 8px rgba(14, 20, 36, .06); }
.seg-n { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: .72rem; }
.segmented button.on .seg-n { background: var(--brand-soft); color: var(--brand-ink); }
@media (max-width: 720px) { .segmented button { min-height: 38px; padding: 0 12px; font-size: .85rem; } }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .segmented { background: var(--surface); border-color: var(--border); }
  :root:not([data-theme="light"]) .segmented button.on { background: var(--surface-3); border-color: rgba(255, 255, 255, .06); box-shadow: none; }
}
:root[data-theme="dark"] .segmented { background: var(--surface); border-color: var(--border); }
:root[data-theme="dark"] .segmented button.on { background: var(--surface-3); border-color: rgba(255, 255, 255, .06); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; font-size: .88rem;
  transition: background .12s, border-color .12s, color .12s;
}
.chip:hover { border-color: var(--border-strong); }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip-n { font-size: .74rem; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.chip.on .chip-n { background: rgba(255, 255, 255, .22); color: inherit; }

/* ------------------------------------------------------------------ stat tiles, hero, rings, meters */
/* stat tile (the app's StatTile): icon tile + label on one line, a big Bangla number under them, a muted line */
.stat-tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 10px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.stat-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-tile.good .stat-icon { background: var(--good-soft); color: var(--good-ink); }
.stat-tile.bad .stat-icon { background: var(--bad-soft); color: var(--bad-ink); }
.stat-tile.warn .stat-icon { background: var(--warn-soft); color: var(--warn-ink); }
.stat-tile.info .stat-icon { background: var(--info-soft); color: var(--brand); }
.stat-body { display: contents; }
.stat-label { font-size: 13px; line-height: 20px; color: var(--text-2); font-weight: 500; }
.stat-value { grid-column: 1 / -1; font-size: 24px; font-weight: 700; line-height: 32px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub { grid-column: 1 / -1; font-size: 12px; line-height: 18px; color: var(--muted); margin-top: -4px; }

/* the older hero markup, in the app's navy hero look (ring top-right, white text in both themes) */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius-hero); padding: 26px 28px; color: var(--hero-text);
  background: var(--hero-1); border: 1px solid var(--hero-border);
}
.hero::before {
  content: ""; position: absolute; right: -46px; top: -46px; width: 170px; height: 170px; border-radius: 50%;
  border: 26px solid var(--hero-chip); pointer-events: none;
}
.hero::after { content: ""; position: absolute; right: 54px; bottom: -30px; width: 64px; height: 64px; border-radius: 50%; background: var(--hero-chip); pointer-events: none; }
.hero h1 { font-size: 1.6rem; line-height: 1.4; letter-spacing: 0; color: var(--hero-text); }
.hero p { color: var(--hero-muted); margin-top: 6px; max-width: 560px; }
.hero p.small { color: var(--hero-muted); font-size: .9rem; }
.hero .muted { color: var(--hero-muted); }
.hero .btn.white { background: var(--hero-text); color: var(--hero-1); border-color: transparent; }
.hero .btn.white:hover { opacity: .92; }
.hero .btn.glass { background: var(--hero-chip); color: var(--hero-text); border-color: transparent; }
.hero .btn.glass:hover { background: color-mix(in srgb, var(--hero-text) 18%, transparent); }
.hero-row { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stat { background: var(--hero-chip); border-radius: 16px; padding: 12px 16px; min-width: 110px; }
.hero-stat strong { display: block; font-size: 1.5rem; line-height: 1.3; color: var(--hero-text); }
.hero-stat span { font-size: .8rem; color: var(--hero-muted); }
.hero .ring-bg { stroke: var(--hero-chip); }
.hero .ring-fg { stroke: var(--hero-accent); }
.hero .ring-text span { color: var(--hero-muted); }
@media (max-width: 720px) { .hero { padding: 20px; } .hero h1 { font-size: 1.3rem; } .hero-stat { min-width: 0; flex: 1; padding: 10px 12px; } }

.ring { position: relative; flex: none; }
.ring svg { display: block; }
.ring-bg { fill: none; stroke: var(--track); }
.ring-fg { fill: none; stroke: var(--brand); stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring-fg.good { stroke: var(--good); }
.ring-fg.bad { stroke: var(--bad); }
.ring-fg.warn { stroke: var(--warn); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-text strong { font-size: 1.4rem; line-height: 1.1; }
.ring-text span { font-size: .72rem; color: var(--muted); }

.meter { display: block; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.meter.good .meter-fill { background: var(--good); }
.meter.bad .meter-fill { background: var(--bad); }
.meter.warn .meter-fill { background: var(--warn); }
.meter.brand .meter-fill { background: var(--brand); }
.meter.thin { height: 6px; }

/* ------------------------------------------------------------------ charts */
.viz-wrap { position: relative; }
.viz-box { width: 100%; }
.viz { display: block; overflow: visible; }
.viz-grid { stroke: var(--grid); stroke-width: 1; }
.viz-axis { stroke: var(--axis); stroke-width: 1; }
.viz-tick { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.viz-bar { fill: var(--series); }
.viz-zero { fill: var(--surface-3); }
.viz-hit { fill: transparent; }
.viz-col { outline: none; cursor: default; }
.viz-col:hover .viz-hit, .viz-col:focus .viz-hit { fill: var(--surface-2); }
.viz-col:focus-visible .viz-hit { stroke: var(--brand); stroke-width: 1.5; }
.viz-col.on .viz-bar { fill: var(--brand); }
.viz-tip {
  position: absolute; z-index: 60; pointer-events: none; background: var(--text); color: var(--bg); border-radius: 8px;
  padding: 7px 10px; font-size: .8rem; line-height: 1.4; box-shadow: var(--shadow-lg); max-width: 240px;
}
.viz-tip strong { display: block; font-size: .78rem; opacity: .8; font-weight: 600; }
.viz-tip div { font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--series); }

/* horizontal bar list */
.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.hbar-row .meter { grid-column: 1 / -1; }
.hbar-label { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-value { font-size: .84rem; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------------ lists and tables */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--border); color: var(--text); }
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item:last-child { padding-bottom: 0; }
a.list-item:hover { text-decoration: none; }
a.list-item:hover .list-title { color: var(--brand); }
.list-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.list-icon.brand { background: var(--brand-soft); color: var(--brand); }
.list-icon.good { background: var(--good-soft); color: var(--good-ink); }
.list-icon.bad { background: var(--bad-soft); color: var(--bad-ink); }
.list-icon.warn { background: var(--warn-soft); color: var(--warn-ink); }
.list-body { flex: 1; min-width: 0; }
.list-title { font-weight: 650; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-sub { font-size: .8rem; color: var(--muted); display: block; }
.list-end { text-align: right; flex: none; }
.list-end strong { display: block; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th {
  text-align: left; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }
.table tr.me td { background: var(--brand-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-main { font-weight: 650; display: block; }
.cell-sub { font-size: .78rem; color: var(--muted); display: block; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: .86rem; color: var(--muted); }

/* empty state (the app's EmptyState): a soft icon tile, a title, one muted line, an action */
.empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; }
.empty h3 { font-size: 16px; line-height: 24px; }
.empty p { max-width: 380px; font-size: 14px; line-height: 22px; }
.empty .btn { margin-top: 12px; }
/* skeletons in the card's shape, with a soft light sweeping across (the app's Skeleton) */
.skeleton-list { display: flex; flex-direction: column; gap: 10px; }
.skeleton {
  position: relative; overflow: hidden; height: 76px; border-radius: var(--radius); background: var(--surface-2);
}
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  animation: shimmer 1.3s ease-in-out infinite;
}
.skeleton.tall { height: 150px; }
.skeleton.hero { height: 170px; border-radius: var(--radius-hero); }
.skeleton.line { height: 14px; border-radius: 7px; }
@keyframes shimmer { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; display: none; } }

/* ------------------------------------------------------------------ dialogs, toasts */
.overlay { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: pop .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.dialog.wide { width: min(860px, 100%); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 0 20px; }
.dialog-head h2 { font-size: 18px; line-height: 28px; }
.dialog-head .icon-btn { border-color: transparent; background: transparent; }
.dialog-body { padding: 10px 20px 6px; }
.dialog-body > p { color: var(--text-2); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px 20px; }
@media (max-width: 520px) { .dialog-foot { flex-wrap: wrap; } .dialog-foot .btn { flex: 1; } }
/* toast (the app's Toast): a surface pill with a border and a coloured icon, at the top on a phone like the app.
   The column spans the screen less 16 px a side (a left: 50% box would shrink-wrap to half the width and wrap the
   text narrow); toastSpot() in common.js moves it past a sticky bar at its edge. */
.toasts { position: fixed; z-index: 70; left: 16px; right: 16px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); font-weight: 600; font-size: .9rem; line-height: 1.45; box-shadow: var(--shadow-lg); animation: rise .2s ease;
  max-width: min(520px, 100%); pointer-events: auto;
}
.toast .icon { flex: none; }
.toast span { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 1024px) { body.student:not(.focus):not(.auth) .toasts { left: calc(var(--side) + 16px); } }
.toast .icon { color: var(--good-ink); }
.toast.good .icon { color: var(--good-ink); }
.toast.bad .icon { color: var(--bad-ink); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 1023px) { .toasts { bottom: auto; top: max(12px, env(safe-area-inset-top)); } .toast.out { transform: translateY(-8px); } }

/* ------------------------------------------------------------------ sign-in */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-side {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(800px 400px at 0% 100%, rgba(255, 255, 255, .12), transparent 60%), linear-gradient(140deg, #1e3a8a, #2563eb 45%, #0ea5e9);
}
.auth-side::after { content: "Φ"; position: absolute; right: -30px; top: 40px; font-size: 360px; font-weight: 800; opacity: .07; line-height: 1; }
.auth-side h2 { font-size: 2.1rem; line-height: 1.25; max-width: 460px; position: relative; z-index: 1; }
.auth-side .lead { opacity: .85; margin-top: 12px; max-width: 440px; position: relative; z-index: 1; }
.auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.auth-points li { display: flex; gap: 12px; align-items: flex-start; }
.auth-points .icon { padding: 7px; width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .14); }
.auth-points strong { display: block; }
.auth-points span { opacity: .8; font-size: .88rem; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; position: relative; z-index: 1; }
.auth-brand .brand-mark { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.auth-foot { font-size: .8rem; opacity: .7; position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 1.7rem; }
.auth-card > p { color: var(--muted); margin: 6px 0 22px; }
.auth-card .segmented { width: 100%; margin-bottom: 20px; }
.auth-card .segmented button { flex: 1; justify-content: center; }
.auth-top { display: flex; justify-content: flex-end; padding: 16px; position: absolute; right: 0; top: 0; }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { padding: 28px 22px; min-height: 0; }
  .auth-side h2 { font-size: 1.4rem; }
  .auth-points, .auth-foot { display: none; }
  .auth-side::after { font-size: 200px; top: -10px; }
}

/* ------------------------------------------------------------------ SHELL screens (the app's auth + profile features).
   au = welcome / sign in, pf = the প্রোফাইল tab, nt = notices, rp = reports, st = settings, hs = my exams,
   lbd = leaderboard, pg = progress; sh = shared bits. Tokens only (both themes). */
/* kit: switch, field error, password eye, chip choice */
.ui-switch {
  position: relative; width: 50px; height: 30px; flex: none; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--border-strong); transition: background .18s ease;
}
.ui-switch-knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 1px 3px var(--shadow-color); transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.ui-switch[aria-checked="true"] { background: var(--brand); }
.ui-switch[aria-checked="true"] .ui-switch-knob { transform: translateX(20px); }
.ui-switch:disabled { opacity: .45; cursor: default; }
.ui-switch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ui-field-error { color: var(--bad-ink); font-size: 12px; line-height: 18px; font-weight: 600; }
.ui-field-error:empty { display: none; }
.ui-field.bad input, .ui-field.bad textarea, .ui-field.bad select { border-color: var(--bad); }
.ui-choice { gap: 8px; }
.ui-choice .chip { min-height: 40px; }
.pw-wrap { position: relative; display: block; }
.field .pw-wrap input { width: 100%; padding-right: 50px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: none; color: var(--muted); cursor: pointer;
}
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.field textarea { width: 100%; min-height: 76px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 12px; resize: vertical;
  background: var(--surface); color: var(--text); font: inherit; }
.field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* shared: numbers on a hero, three stat boxes, a narrow column, a note line */
.sh-nums { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.sh-num { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--hero-chip); text-align: center; min-width: 0; }
.sh-num strong { font-size: 18px; line-height: 26px; font-weight: 800; color: var(--hero-text); }
.sh-num span { font-size: 11px; line-height: 16px; color: var(--hero-muted); }
.sh-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sh-stat {
  display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.sh-stat .ui-ico { width: 34px; height: 34px; border-radius: 11px; }
.sh-stat strong { display: block; font-size: 19px; line-height: 26px; font-weight: 800; }
.sh-stat span { display: block; font-size: 12px; line-height: 17px; color: var(--muted); }
.sh-narrow { width: 100%; max-width: 760px; margin: 0 auto; }
.sh-note { color: var(--muted); font-size: 13px; line-height: 20px; margin: 10px 4px 0; }
.sh-tools { margin-bottom: 14px; }
.sh-tools .segmented { width: 100%; }
.sh-tools .segmented button { flex: 1; justify-content: center; }
@media (min-width: 640px) { .sh-tools .segmented { width: auto; } .sh-tools .segmented button { flex: 0 0 auto; } }
.sh-more { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }

/* (the screens' own styles — welcome / sign in, the প্রোফাইল tab, notices, reports, settings, my exams, leaderboard,
   progress — are in profile.css) */

/* ------------------------------------------------------------------ exam list: greeting, state pills, exam cards with a clock */
.exam-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .84rem; color: var(--text-2); }
.exam-meta span { display: inline-flex; align-items: center; gap: 5px; }
.exam-meta .icon { color: var(--muted); }
.xl-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 8px 0 26px; }
.xl-head h1 { font-size: 2rem; letter-spacing: -.02em; }
.xl-head h1 .name { color: var(--brand); }
.xl-head p { color: var(--text-2); margin-top: 4px; font-size: 1rem; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 10px 0 18px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: .95rem; box-shadow: var(--shadow-sm);
  transition: background .12s, border-color .12s, color .12s;
}
.pill:hover { border-color: var(--border-strong); color: var(--text); }
.pill.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 10px 22px -12px var(--brand); }
.pill-n { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: .76rem; }
.pill.on .pill-n { background: rgba(255, 255, 255, .24); color: inherit; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.src-pills { margin: 0 0 22px; }
.src-pills .pill { height: 38px; padding: 0 8px 0 14px; font-size: .88rem; box-shadow: none; }
.src-pills .pill-n { min-width: 22px; height: 22px; }

.xl { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.xl > * { min-width: 0; }
.xl-side { position: sticky; top: 84px; }
.xl-side:empty { display: none; }
.xl-label { display: flex; align-items: center; gap: 12px; font-size: .88rem; font-weight: 700; color: var(--good-ink); letter-spacing: .06em; margin: 0 0 14px; }
.xl-label::before { content: ""; width: 30px; height: 1.5px; background: currentColor; opacity: .55; }
.xl-label.soon { color: var(--warn-ink); }
.xl-label.done { color: var(--muted); }
.xl-list { display: flex; flex-direction: column; gap: 22px; margin-bottom: 34px; }

.score-chip { font-weight: 800; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 10px; border-radius: 999px; font-size: .85rem; }
.badge.led::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.outline { background: transparent; border: 1px solid var(--border); }

.lb-rows { display: flex; flex-direction: column; gap: 6px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; }
.lb-row.me { background: var(--info-soft); border-color: color-mix(in srgb, var(--series) 28%, transparent); }
.lb-rank { width: 24px; flex: none; text-align: center; font-weight: 800; color: var(--muted); font-size: .9rem; }
.lb-pts { text-align: right; flex: none; }
.lb-pts strong { display: block; line-height: 1.1; }
.lb-pts span { font-size: .72rem; color: var(--muted); }

@media (max-width: 1100px) { .xl { grid-template-columns: minmax(0, 1fr); } .xl-side { position: static; } }
@media (max-width: 720px) {
  .xl-head { margin-bottom: 18px; }
  .xl-head h1 { font-size: 1.45rem; }
  .pills { gap: 6px; }
  .pill { height: 38px; padding: 0 8px 0 12px; font-size: .85rem; gap: 6px; }
  .pill-n { min-width: 22px; height: 22px; }
}

/* ------------------------------------------------------------------ practice builder */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.builder-side { position: sticky; top: 80px; }
@media (max-width: 1100px) { .builder { grid-template-columns: minmax(0, 1fr); } .builder-side { position: static; } }
.subject-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 8px; }
.subject-label:first-child { margin-top: 0; }
.chapters { display: flex; flex-direction: column; gap: 8px; }
.chapter { border: 1px solid var(--border); border-radius: 12px; padding: 4px 6px; background: var(--surface); }
.chapter.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }
.chapter.none:not(.on) { opacity: .55; }
.check { display: flex; align-items: center; gap: 12px; padding: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.check-text strong { font-weight: 650; font-size: .93rem; }
.ch-no { font-size: .74rem; color: var(--muted); font-weight: 700; }
.ch-count { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; }
.topics { padding: 0 8px 10px 38px; }
.topics summary { cursor: pointer; font-size: .82rem; color: var(--brand); font-weight: 600; padding: 2px 0 8px; }
.topics .chip { min-height: 32px; font-size: .82rem; }

/* ------------------------------------------------------------------ taking an exam (the room itself is room.css) */
.sync { font-size: .76rem; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.sync.ok { color: var(--good-ink); }
.sync.busy { color: var(--muted); }
.sync.off { color: var(--bad-ink); }
/* a switch row (the admin panel's feature rows) */
.sound-toggle { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: .84rem; font-weight: 600; cursor: pointer; text-align: left; }
.sound-toggle .icon { color: var(--muted); }
.sound-toggle[aria-checked="true"] .icon { color: var(--brand); }
.switch { width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.sound-toggle[aria-checked="true"] .switch { background: var(--brand); }
.sound-toggle[aria-checked="true"] .switch::after { transform: translateX(16px); }
.sound-toggle:disabled { opacity: .6; cursor: not-allowed; }
.sound-toggle .grow strong, .sound-toggle .grow .cell-sub { display: block; }
.sound-toggle .grow .cell-sub { font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: 2px; }
/* the 5 / 2 / 1 minute alert, under the exam bar */
.time-alert {
  position: sticky; top: 82px; z-index: 14; display: flex; align-items: center; gap: 12px; margin: -6px 0 16px; padding: 12px 14px;
  border-radius: 16px; border: 1px solid; box-shadow: var(--shadow-lg); animation: drop .25s cubic-bezier(.2, .8, .2, 1);
}
.time-alert[hidden] { display: none; }
.time-alert strong { display: block; font-size: 1.05rem; }
.time-alert .grow span { font-size: .86rem; color: var(--text-2); }
.time-alert .icon-btn { background: transparent; border-color: transparent; }
.time-alert-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; }
.time-alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.time-alert.warn strong { color: var(--warn-ink); }
.time-alert.warn .time-alert-ic { background: var(--warn); }
.time-alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.time-alert.bad strong { color: var(--bad-ink); }
.time-alert.bad .time-alert-ic { background: var(--bad); animation: shake .5s ease 2; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes shake { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (max-width: 720px) { .time-alert { top: 66px; margin: -4px 0 12px; } }

.section-head { margin: 26px 0 12px; display: flex; flex-direction: column; gap: 4px; }
.section-head:first-child { margin-top: 0; }
.questions { display: flex; flex-direction: column; gap: 14px; }
.q { scroll-margin-top: 90px; }
.q.answered { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.q-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.q-no { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: .88rem; }
.q-text { font-size: 1.02rem; line-height: 1.75; margin-bottom: 12px; overflow-x: auto; }
.statements { margin: 0 0 12px; padding-left: 20px; list-style: none; } /* each item carries its own label (i. ii. …) */
.statements li { margin-bottom: 4px; }
.cites { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cite { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--info-soft); color: var(--series); }
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; padding: 11px 14px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; line-height: 1.6; overflow-x: auto;
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--brand); }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt-label { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .85rem; border: 1.5px solid var(--border-strong); background: var(--surface); }
.opt.on .opt-label { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.opt-body { flex: 1; min-width: 0; padding-top: 1px; }
.opt.static { cursor: default; }
.opt.static:hover { border-color: var(--border); }
.opt.right { border-color: var(--good); background: var(--good-soft); }
.opt.right .opt-label { background: var(--good); border-color: var(--good); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.wrong .opt-label { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt .mark { margin-left: auto; font-size: .76rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.opt.right .mark { color: var(--good-ink); }
.opt.wrong .mark { color: var(--bad-ink); }
.opt-share { font-size: .74rem; color: var(--muted); font-weight: 600; margin-left: auto; white-space: nowrap; }
.fig { margin: 8px 0; }
.fig img { border-radius: 8px; background: #fff; }
.fig figcaption { font-size: .8rem; color: var(--muted); }
.dmath { overflow-x: auto; overflow-y: hidden; }
.notice { background: var(--info-soft); border-color: transparent; }
.notice.warn-notice { background: var(--warn-soft); display: flex; flex-direction: column; gap: 8px; }
.warn-notice > .row .icon { color: var(--warn); }
.end-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.solution { margin-top: 12px; border-top: 1px dashed var(--border-strong); padding-top: 10px; }
.solution summary { cursor: pointer; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.solution summary::-webkit-details-marker { display: none; }
.solution[open] summary { margin-bottom: 8px; }
.steps { margin: 0 0 8px; }
.step { margin-bottom: 6px; }
.final { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }

/* leaderboard */
.rank-no { font-weight: 800; width: 34px; text-align: center; color: var(--muted); }

/* profile */
.profile-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ admin */
.kpi-delta { font-size: .76rem; font-weight: 700; color: var(--good-ink); }
.tree { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 220px); overflow: auto; }
.tree-paper { font-weight: 700; padding: 8px 10px; border-radius: 9px; display: flex; justify-content: space-between; gap: 8px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-size: .9rem; }
.tree-paper:hover, .tree-ch:hover { background: var(--surface-2); }
.tree-paper.on, .tree-ch.on { background: var(--brand-soft); color: var(--brand-ink); }
.tree-ch { padding: 7px 10px 7px 22px; border-radius: 9px; display: flex; justify-content: space-between; gap: 8px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-size: .85rem; color: var(--text-2); }
.tree-ch span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-n { font-size: .74rem; color: var(--muted); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; flex: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { flex: 1; min-width: 200px; }
.qcard-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.qcard-foot .grow { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.qid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; color: var(--muted); }
button.qid { border: 0; background: none; padding: 0; cursor: copy; }
button.qid:hover { color: var(--brand); }
.tree-topic { padding-left: 36px; font-size: .8rem; }
/* the admin question bank: filters, summary strip, tags, ticking many */
.filters-card { padding: 0; margin-bottom: 14px; }
.filters-card > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 650; list-style: none; }
.filters-card > summary::-webkit-details-marker { display: none; }
.filters-card > summary .btn { margin-left: auto; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; padding: 0 16px 16px; }
.filter { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.filter > span { font-size: .76rem; font-weight: 650; color: var(--muted); }
.toolbar .filter { flex-direction: row; align-items: center; gap: 8px; }
.toolbar .filter select { width: auto; }
.sum-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sum-tile { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text); font: inherit; }
button.sum-tile { cursor: pointer; }
button.sum-tile:hover { border-color: var(--brand); }
.sum-tile strong { font-size: 1.15rem; }
.sum-tile span { font-size: .76rem; color: var(--muted); font-weight: 600; }
.sum-tile .sum-sub { font-weight: 500; }
.sum-tile.warn strong { color: var(--warn-ink); }
.sum-tile.bad strong { color: var(--bad-ink); }
.sum-tile.good strong { color: var(--good-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -2px 0 10px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 650; padding: 2px 8px; border-radius: 6px;
  background: var(--surface-3); color: var(--text-2); }
.tag.uni { background: var(--info-soft); color: var(--series); }
.tag.year { background: var(--brand-soft); color: var(--brand-ink); }
.tag.warn { background: var(--warn-soft); color: var(--warn-ink); }
.q-pick { width: 18px; height: 18px; accent-color: var(--brand); flex: none; cursor: pointer; }
.card.q.picked { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.pick-all { padding: 0 4px; }
.bulk-bar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px;
  padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--brand); box-shadow: 0 8px 28px rgba(15, 23, 42, .18); }
.bulk-bar[hidden] { display: none; }
.bulk-bar .grow { flex: 1; }
.choice-bars { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.choice-bar { display: grid; grid-template-columns: 22px minmax(0, 1fr) 54px; gap: 8px; align-items: center; font-size: .78rem; }
.choice-bar b { text-align: center; }
.choice-bar .meter { height: 7px; }
.choice-bar .meter-fill { background: var(--border-strong); }
.choice-bar.right .meter-fill { background: var(--good); }
.choice-bar.right b { color: var(--good-ink); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(720px, 100%); background: var(--bg); z-index: 55; box-shadow: var(--shadow-lg); overflow: auto; animation: slide .2s ease; border-left: 1px solid var(--border); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.drawer-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.report-card { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
@media (max-width: 900px) { .report-card { grid-template-columns: 1fr; } }
.report-note { background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.return-note { margin: 10px 0 0; }
.q-actions { gap: 6px; justify-content: flex-end; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: .88rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.role-badge { text-transform: capitalize; }
.health { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.health div { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.health strong { display: block; font-size: 1.15rem; }
.health span { font-size: .76rem; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------------ answers are final (exam) */
.opt.locked { cursor: default; }
.opt.locked:not(.on) { opacity: .62; }
.opt.locked:not(.on):hover { border-color: var(--border); }
.opt:disabled { color: inherit; }
.opt.on .mark { color: var(--brand-ink); }
.lock-note { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ------------------------------------------------------------------ user management (admin) */
.btn.danger-ghost { color: var(--bad-ink); border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); background: var(--surface); }
.btn.danger-ghost:hover { background: var(--bad-soft); border-color: var(--bad); }
.manage-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-head > .grow { flex: 1 1 260px; }
.profile-head h1 { font-size: 1.4rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.facts dt { font-size: .76rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.secret-box { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--border-strong); margin: 10px 0 6px; }
.secret-box .btn { margin-left: auto; }
.secret { font: 700 1.15rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; user-select: all; }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: 0; }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); }
.tl-item.bad .tl-icon { background: var(--bad-soft); color: var(--bad-ink); }
.tl-line { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.tl-line a { color: var(--brand); font-weight: 600; font-size: .86rem; }
.tl-detail { font-size: .84rem; color: var(--text-2); overflow-wrap: anywhere; margin: 2px 0; }
.cards-sm .cell-lead .badge { display: none; }

/* ------------------------------------------------------------------ phones */
@media (max-width: 720px) {
  /* the dashboard hero: text on top, today's ring and the two stats side by side under it */
  .hero-row { flex-direction: column; align-items: stretch; gap: 18px; }
  .hero-row > .grow { flex: none; }
  .hero-row > .row { flex-wrap: nowrap; gap: 14px; align-items: center; }
  .hero-row > .row > .ring { flex: none; }
  .hero-row .hero-stats { flex: 1; min-width: 0; flex-direction: column; gap: 10px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .page-head { align-items: stretch; }
  .page-head > .row { width: 100%; }
  .page-head > .row > .btn { flex: 1 1 auto; justify-content: center; }
  .toolbar .segmented { max-width: 100%; overflow-x: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .manage-actions { width: 100%; }
  .manage-actions .btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .dialog-foot .btn { flex: 1; }
  /* tables become cards: the first cell is the title, the rest are label/value lines */
  .cards-sm, .cards-sm tbody, .cards-sm tr, .cards-sm td { display: block; width: 100%; }
  .cards-sm thead { display: none; }
  .cards-sm tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .cards-sm tr:last-child { border-bottom: 0; }
  .cards-sm td { border: 0; padding: 3px 0; text-align: left; }
  .cards-sm td.num { text-align: left; }
  .cards-sm td[data-label] { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; }
  .cards-sm td[data-label]::before { content: attr(data-label); color: var(--muted); font-weight: 500; }
  .cards-sm td[data-label] > * { text-align: right; min-width: 0; }
  .cards-sm td.cell-lead { padding-bottom: 8px; }
  .cards-sm .cell-lead .badge { display: inline-flex; }
  .cards-sm td.hide-sm { display: none; }
  .table tbody tr.click:hover td { background: transparent; }
  .table tbody tr.click:active { background: var(--surface-2); }
}
@media (max-width: 380px) {
  .hero-row > .row { flex-direction: column; align-items: stretch; }
  .hero-row > .row > .ring { align-self: center; }
  .hero-row .hero-stats { flex-direction: row; }
}

@media print { .side, .topbar, .tabbar { display: none !important; } .main { margin: 0; } }
/* the student site never prints a question (Ctrl+P, Save as PDF): only the name and one line. Not touched: the OMR sheet's
   own print (omr.js adds body.omr-printing, omr.css), the admin editor's phone preview (.qe-in-phone) and admin pages
   (no body.student; their print rules are below) */
@media print {
  body.student:not(.omr-printing):not(.qe-in-phone) { background: #fff !important; color: #000 !important; }
  body.student:not(.omr-printing):not(.qe-in-phone) > * { display: none !important; }
  body.student:not(.omr-printing):not(.qe-in-phone)::before { content: "PhiExam"; display: block; margin: 20mm 0 0; font-size: 22pt; line-height: 1.3; font-weight: 700; text-align: center; color: #000; }
  body.student:not(.omr-printing):not(.qe-in-phone)::after { content: "প্রশ্ন প্রিন্ট করা যায় না"; display: block; margin: 3mm 0 0; font-size: 12pt; line-height: 1.5; text-align: center; color: #444; }
  html[lang="en"] body.student:not(.omr-printing):not(.qe-in-phone)::after { content: "Questions can’t be printed"; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
a.stat-tile { color: var(--text); }
a.stat-tile:hover { text-decoration: none; border-color: var(--brand); }
a.card.list-item { padding: 16px; border-top: 1px solid var(--border); }
a.card.list-item:hover { border-color: var(--brand); }
.builder-side .card > h2 { margin-bottom: 12px; }

/* ------------------------------------------------------------------ subject-wise result (optional subjects) */
.subject-head { padding: 16px 16px 0; }
.table tr.muted td { color: var(--muted); }

/* ------------------------------------------------------------------ admin: exam patterns */
.tpl-card { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
.tpl-card:hover { border-color: var(--brand); }
.tpl-card p { margin: 0; }
.tpl-error { background: var(--bad-soft); color: var(--bad-ink); }
.icon-btn.rot90 .icon { transform: rotate(90deg); }
.table td .input { min-width: 70px; }

.table td .input.wide { min-width: 150px; }
/* exam edit (admin) */
.edit-thumb { max-height: 64px; max-width: 160px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.input.narrow { width: 84px; }

/* Bengali words inside math (\text{সময়}) in Kalpurush too; KaTeX_Main still draws every Latin letter and symbol */
.math .katex, .dmath .katex { font-family: KaTeX_Main, "Kalpurush", "Times New Roman", serif; }

/* ------------------------------------------------------------------ admin: rich-text editor with a live preview */
.rx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rx .rx-input, .field .rx .rx-input { min-height: 44px; resize: none; overflow: hidden; line-height: 1.6;
  font-size: .92rem; }
/* the buttons show under the box while it is in use (under it, so the box never moves as it is clicked) */
.rx-tools { display: none; flex-wrap: wrap; gap: 4px; align-items: center; }
.rx:focus-within .rx-tools { display: flex; order: 1; }
.rx-input { order: 0; }
.rx-preview, .rx-warn { order: 2; }
.rx-tool { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2);
  color: var(--text); font-size: .85rem; font-weight: 600; cursor: pointer; }
.rx-tool:hover { border-color: var(--brand); color: var(--brand); }
.rx-sep { width: 1px; height: 20px; background: var(--border-strong); margin: 0 2px; }
.rx-preview { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border); line-height: 1.75; overflow-x: auto; }
.rx-preview.is-math { text-align: center; }
.rx.plain .rx-preview { display: none; }
.rx.locked .rx-input { display: none; }
.rx.locked .rx-preview { display: block; border-style: solid; }
.rx-empty { color: var(--muted); font-size: .8rem; }
.rx-warn { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--bad-ink); }
.rx-warn:empty { display: none; }
.rx-preview .m-bad, .edit-view .m-bad { color: var(--bad-ink); background: var(--bad-soft); border-radius: 4px; padding: 0 3px; font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
.stack.tight { gap: 8px; }
/* the question as students see it, beside the boxes (under them on a narrow screen) */
.edit-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.edit-boxes { min-width: 0; }
.edit-view { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); }
.edit-view-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: none; }
.edit-view .opt { background: var(--surface); }
.edit-no-view .edit-split { grid-template-columns: minmax(0, 1fr); }
.edit-no-view .edit-view { display: none; }
@media (max-width: 1100px) {
  .edit-split { grid-template-columns: minmax(0, 1fr); }
  .edit-view { position: static; max-height: none; }
}

/* tags under a chapter's topics (the Studio's finer headings) */
.topics .tag-label { margin: 10px 0 4px; }
.tag.tag-soft { background: var(--surface-2, transparent); color: var(--muted, inherit); font-weight: 500; }

/* ------------------------------------------------------------------ dashboards: KPI grids, analysis, results */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.kpi-grid > * { min-width: 0; }
.split-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.split-2 > * { min-width: 0; }
@media (max-width: 1000px) { .split-2 { grid-template-columns: minmax(0, 1fr); } }
.good-text { color: var(--good-ink); }
.bad-text { color: var(--bad-ink); }
.pad { padding: 0 20px 18px; }
.card.flush > .card-head.pad { padding: 18px 20px 6px; margin: 0; }
.exam-tags { gap: 8px; margin: -6px 0 18px; }
.band-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.band { border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; }
.band strong { font-size: 1.25rem; }
.band span { font-size: .78rem; color: var(--text-2); }
.band.good { background: var(--good-soft); } .band.good strong { color: var(--good-ink); }
.band.info { background: var(--info-soft); } .band.info strong { color: var(--series); }
.band.warn { background: var(--warn-soft); } .band.warn strong { color: var(--warn-ink); }
.subject-rows { display: flex; flex-direction: column; gap: 16px; }
.subject-row { display: flex; flex-direction: column; gap: 7px; }
.subject-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; }
.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; padding: 4px 20px 20px; }
.top-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.top-card:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.top-card .grow { min-width: 0; display: flex; flex-direction: column; }
.top-card .cell-main, .top-card .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-place, .place-chip { min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font-weight: 700; font-size: .82rem; background: var(--surface-2); color: var(--text-2); }
.top-place.p1, .place-chip.p1 { background: #fde68a; color: #78350f; }
.top-place.p2, .place-chip.p2 { background: #e5e7eb; color: #374151; }
.top-place.p3, .place-chip.p3 { background: #fed7aa; color: #7c2d12; }
.top-score { display: flex; flex-direction: column; align-items: flex-end; }
.top-score strong { font-size: 1.05rem; }
.top-score span { font-size: .72rem; color: var(--muted); }
.q-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.q-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.q-card.flagged { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.q-card-head { display: flex; align-items: center; justify-content: space-between; }
.q-card-sub { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.q-card-sub .qid { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.q-pct { font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); }
.q-pct.good { background: var(--good-soft); color: var(--good-ink); }
.q-pct.warn { background: var(--warn-soft); color: var(--warn-ink); }
.q-pct.bad { background: var(--bad-soft); color: var(--bad-ink); }
.q-flag { display: flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--warn-ink); background: var(--warn-soft); border-radius: 8px; padding: 6px 8px; }
.toolbar select.input { width: auto; min-width: 180px; }

@media print {
  .side, .topbar, .scrim, .toolbar, .page-head .row, .segmented, .pager, .xl-side { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; }
  .content { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none !important; border-color: #ccc !important; break-inside: avoid; }
  body { background: #fff !important; }
}

/* roles and notices (admin) */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.role-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--border-strong); display: flex; flex-direction: column; gap: 6px; }
.role-card.r1 { border-top-color: var(--series); } .role-card.r2 { border-top-color: var(--brand); } .role-card.r3 { border-top-color: var(--good); }
.role-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .86rem; }
.role-list li { display: flex; gap: 6px; align-items: flex-start; }
.role-list .icon { color: var(--good); flex: none; margin-top: 3px; }
.notice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.notice-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--series); border-radius: var(--radius-sm);
  padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.notice-card.exam { border-left-color: var(--brand); } .notice-card.urgent { border-left-color: var(--bad); }
.notice-card.pinned { box-shadow: 0 0 0 3px var(--brand-soft); }
.notice-card h3 { font-size: 1.02rem; }
.notice-body { color: var(--text-2); font-size: .9rem; white-space: pre-line; overflow-wrap: anywhere; }
.notice-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.tab-bar { margin-bottom: 16px; }
.kpi-grid.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
@media (max-width: 1100px) { .kpi-grid.six, .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kpi-grid.six, .kpi-grid.four { grid-template-columns: minmax(0, 1fr); } }
.kpi-btn { all: unset; display: block; cursor: pointer; border-radius: var(--radius); min-width: 0; }
.kpi-btn:focus-visible { outline: 3px solid var(--brand-soft); }
.kpi-btn .stat-tile { height: 100%; box-sizing: border-box; transition: border-color .12s; }
.kpi-btn:hover .stat-tile { border-color: var(--brand); }
.stat-tile .stat-sub, .stat-tile small { overflow: hidden; text-overflow: ellipsis; }

.kpi-btn .stat-body { min-width: 0; }
.kpi-btn .stat-sub { display: block; white-space: nowrap; }

/* the exam list as a grid of cards (Chorcha-style): two or three across, the clock inside the card */
.xl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
@media (max-width: 720px) { .xl-list { grid-template-columns: minmax(0, 1fr); } }

/* student dashboard: courses, notices */
.hero-courses { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.course-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.course-chip:hover { background: var(--brand); color: var(--on-brand); }
.urgent-banner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); color: var(--text); }
.urgent-banner p { color: var(--text-2); font-size: .9rem; margin-top: 2px; white-space: pre-line; }
.urgent-ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--bad); color: #fff; }
.notice-list { display: flex; flex-direction: column; }
.notice-item { border-top: 1px solid var(--border); }
.notice-item:first-child { border-top: none; }
.notice-item summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; }
.notice-item summary::-webkit-details-marker { display: none; }
.notice-item summary .icon { color: var(--muted); transition: transform .15s; flex: none; }
.notice-item[open] summary .icon { transform: rotate(180deg); }
.notice-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--series); }
.notice-item.exam .notice-dot { background: var(--brand); }
.notice-item.urgent .notice-dot { background: var(--bad); }
.notice-text { color: var(--text-2); font-size: .88rem; padding: 0 0 12px 19px; white-space: pre-line; overflow-wrap: anywhere; }
.stack.tight { gap: 10px; }

@media (max-width: 720px) {
  /* the result sheet on a phone: place, name and marks in one line, then right / wrong / blank */
  .results-table tr { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
  .results-table td { padding: 0 !important; }
  .results-table td.cell-lead { padding: 0 !important; }
  .results-table td[data-label="নম্বর"] { display: flex; flex-direction: column; align-items: flex-end; }
  .results-table td[data-label="নম্বর"]::before { content: none; }
  .results-table td.inline-sm { grid-column: 2 / 4; display: inline; width: auto; font-size: .8rem; }
  .results-table td.inline-sm:nth-of-type(5)::before { content: "✓ "; }
  .results-table td.inline-sm:nth-of-type(6)::before { content: "✗ "; }
  .results-table td.inline-sm:nth-of-type(7)::before { content: "বাদ "; }
  .results-table td.inline-sm { grid-row: 2; }
  .results-table td.inline-sm:nth-of-type(5) { grid-column: 2; justify-self: start; }
  .results-table td.inline-sm:nth-of-type(6) { grid-column: 2; justify-self: center; }
  .results-table td.inline-sm:nth-of-type(7) { grid-column: 3; justify-self: end; }
  .kpi-grid.six, .kpi-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .kpi-grid .stat-tile { padding: 12px; gap: 8px; }
  .kpi-grid .stat-icon { display: none; }
  .band { padding: 8px 10px; } .band strong { font-size: 1.05rem; } .band span { font-size: .7rem; }
}

.section-title { margin: 22px 0 12px; }

/* ---- live monitor */
.live-chart { position: relative; height: 150px; border-bottom: 1px solid var(--border); }
.live-chart svg { width: 100%; height: 100%; display: block; }
.live-max { position: absolute; top: 0; left: 0; font-size: .72rem; color: var(--muted); background: var(--surface); padding: 0 4px; border-radius: 4px; }
.live-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: .8rem; color: var(--text-2); }
.live-legend span { display: inline-flex; align-items: center; gap: 6px; }
.live-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.live-legend strong { color: var(--text); font-variant-numeric: tabular-nums; }
.log-list { max-height: 420px; overflow: auto; margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font: .78rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); }
.log-line { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 10px; padding: 4px 10px; border-bottom: 1px solid var(--border); }
.log-line:last-child { border-bottom: none; }
.log-time { color: var(--muted); }
.log-level { font-weight: 700; color: var(--muted); min-width: 3.4em; }
.log-line.warn .log-level { color: var(--warn-ink); } .log-line.error .log-level { color: var(--bad); }
.log-line.error { background: var(--bad-soft); }
.log-msg { overflow-wrap: anywhere; color: var(--text-2); }
.log-msg strong { color: var(--text); font-weight: 600; }
@media (max-width: 760px) { .log-line { grid-template-columns: auto minmax(0, 1fr); } .log-level { display: none; } }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); display: inline-block; animation: rec-blink 1.2s infinite; }
.rec-dot.off { animation: none; background: var(--muted); }
@keyframes rec-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.replay-bar { position: sticky; top: 64px; z-index: 5; display: flex; flex-direction: column; gap: 12px; }
.replay-time { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.replay-slider { width: 100%; accent-color: var(--brand); }
.replay-overview { position: relative; cursor: pointer; }
.replay-overview .live-legend { margin-top: 4px; }
.replay-cursor { position: absolute; top: 0; height: 90px; width: 2px; background: var(--text); pointer-events: none; transform: translateX(-1px); }
.replay-marks { position: absolute; top: 0; left: 0; right: 0; height: 90px; pointer-events: none; }
.replay-mark { position: absolute; top: 0; width: 2px; height: 10px; background: var(--bad); }
@media (max-width: 760px) { .replay-bar { position: static; } }

/* ------------------------------------------------------------------ grids of tiles (practice levels and sources,
   subjects, universities): each tile has a tone (t-blue …) that colours its icon */
.t-blue { --tc: #2563eb; } .t-violet { --tc: #7c3aed; } .t-green { --tc: #15803d; } .t-orange { --tc: #c2570c; }
.t-teal { --tc: #0f766e; } .t-red { --tc: #c53030; } .t-indigo { --tc: #4338ca; } .t-slate { --tc: #475569; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-blue { --tc: #7fb2fb; } :root:not([data-theme="light"]) .t-violet { --tc: #b89bfa; }
  :root:not([data-theme="light"]) .t-green { --tc: #5bd17a; } :root:not([data-theme="light"]) .t-orange { --tc: #f6a560; }
  :root:not([data-theme="light"]) .t-teal { --tc: #4fd1c0; } :root:not([data-theme="light"]) .t-red { --tc: #f58b8b; }
  :root:not([data-theme="light"]) .t-indigo { --tc: #a5a8fb; } :root:not([data-theme="light"]) .t-slate { --tc: #a8b3c7; }
}
:root[data-theme="dark"] .t-blue { --tc: #7fb2fb; } :root[data-theme="dark"] .t-violet { --tc: #b89bfa; }
:root[data-theme="dark"] .t-green { --tc: #5bd17a; } :root[data-theme="dark"] .t-orange { --tc: #f6a560; }
:root[data-theme="dark"] .t-teal { --tc: #4fd1c0; } :root[data-theme="dark"] .t-red { --tc: #f58b8b; }
:root[data-theme="dark"] .t-indigo { --tc: #a5a8fb; } :root[data-theme="dark"] .t-slate { --tc: #a8b3c7; }

.tile-groups { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 18px; }
.tile-group .subject-label { margin-top: 0; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile-groups .tile-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.tile-grid.sources { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1240px) and (min-width: 1101px), (max-width: 760px) { .tile-grid.sources { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; min-height: 104px;
  padding: 14px; border: 1.5px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tile:hover { border-color: var(--tc, var(--brand)); transform: translateY(-1px); box-shadow: var(--shadow); }
.tile.on { border-color: var(--tc, var(--brand)); background: color-mix(in srgb, var(--tc, var(--brand)) 9%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc, var(--brand)) 18%, transparent); }
.tile.on::after { content: ""; position: absolute; top: 12px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: var(--tc, var(--brand)); }
.tile.locked, .tile.empty { cursor: not-allowed; background: var(--surface-2); }
.tile.locked .tile-ic { background: var(--surface-3); color: var(--muted); }
.tile.locked strong, .tile.empty strong { color: var(--text-2); }
.tile.locked:hover, .tile.empty:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }
.tile-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--tc, var(--brand)) 14%, transparent); color: var(--tc, var(--brand)); }
.tile-ic.big { width: 52px; height: 52px; border-radius: 15px; }
.tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-text strong { font-size: .98rem; line-height: 1.3; }
.tile-text span { font-size: .78rem; color: var(--muted); line-height: 1.35; }
.tile-grid.subjects { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 4px; }
.tile-grid.subjects .tile { min-height: 0; flex-direction: row; align-items: center; padding: 12px; }
.tile-grid.subjects .tile.on::after { top: 8px; right: 8px; }
.tile-grid.course-subjects { margin-bottom: 26px; }
@media (max-width: 900px) { .tile-groups { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) {
  .tile-grid, .tile-groups .tile-grid, .tile-grid.sources, .tile-grid.subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { min-height: 92px; padding: 12px; }
}
.page-head .row .tile-ic { flex: none; }

/* (sign-in from the Physics Hunters website: profile.css .au-ph / .au-sso) */
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } .tile, .uni-tile { transition: none; } }

/* what a student's courses give (admin: a student's page; the student's own is profile.css .ac-) */
.access-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.mock-link { margin-bottom: 16px; text-decoration: none; color: var(--text); }
.mock-link:hover { border-color: var(--brand); }

/* admin: a course's access (and the access editor) */
.grant { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.grant-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.grant-flags .badge, .access-summary .badge { gap: 4px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.check-tile { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); cursor: pointer; }
.check-tile:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.check-tile input, .field .check-tile input { width: 18px; height: 18px; min-height: 0; flex: none; padding: 0; margin: 2px 0 0; border: 0; box-shadow: none;
  accent-color: var(--brand); }
.check-tile > span { display: flex; flex-direction: column; min-width: 0; }
.check-tile strong { font-size: .9rem; }
.card.access-unset { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
.warn-text { color: var(--warn-ink); }
.warn-text .icon { vertical-align: -2px; }
.access-summary { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
/* the admin's daily limits (#/courses): a small table, and the editor's one block per limit */
.limits-table td:first-child { font-weight: 600; }
.limits-note { margin-top: 12px; }
.limit-edit { padding: 12px 14px 0; border: 1px solid var(--border); border-radius: 14px; margin-top: 12px; }
.limit-edit > strong { display: block; font-size: .9rem; }
.limit-edit > .hint { display: block; font-size: .78rem; color: var(--muted); margin: 2px 0 10px; }
.limit-edit .field { margin-bottom: 12px; }
.limit-edit + .form-error:not(:empty) { margin-top: 10px; }
.gap { height: 16px; }
.gap-top { margin-top: 16px; }
.card-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }

/* profiles (student and admin): parts of a long form, tags, staff notes, the student list's bulk bar */
.profile-part { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.profile-part legend { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; padding: 0; }
.profile-part legend .icon { color: var(--brand); }
.card > .meter { margin: -4px 0 4px; }
.fact-group + .fact-group { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.fact-group .subject-label { margin-top: 0; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: .74rem; font-weight: 600;
  background: var(--warn-soft); color: var(--warn-ink); }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.card > .tag-row { margin-top: 14px; }
.filters { gap: 8px; }
.filters select.input { width: auto; min-width: 150px; flex: 1 1 150px; max-width: 240px; }
.bulk-bar { position: sticky; top: 72px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.bulk-bar strong { margin-right: auto; color: var(--brand-ink); }
.bulk-bar[hidden] { display: none; }
td.tick, th:first-child:has(input[type="checkbox"]) { width: 36px; }
td.tick input, th input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); }
tr.picked td { background: var(--brand-soft); }
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.note-form textarea { width: 100%; resize: vertical; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--border-strong); }
.note.pinned { border-left-color: var(--warn); background: var(--warn-soft); }
.note p { white-space: pre-line; margin-bottom: 6px; }
@media (max-width: 720px) { .filters select.input { max-width: none; } .bulk-bar { top: 60px; } }

/* ---- the admin question bank: table view, select all that match, one question's page ---- */
a.qid { text-decoration: none; }
a.qid:hover { color: var(--brand); text-decoration: underline; }
.pick-all-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.link-btn { border: 0; background: none; padding: 0; color: var(--brand); cursor: pointer; font: inherit; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.link-btn.bad { color: var(--bad-ink, var(--bad)); font-weight: 600; }
.link-btn.warn { color: var(--warn-ink, var(--warn)); font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.q-table td { vertical-align: top; }
.q-table tr.picked td { background: var(--brand-soft); }
.q-cell { min-width: 260px; max-width: 520px; }
.q-cell-text { display: block; color: inherit; text-decoration: none; line-height: 1.45; }
.q-cell-text:hover { color: var(--brand); }
.q-cell .mono { display: block; margin-top: 2px; font-size: .72rem; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.q-detail .kv { margin: 0; }
/* ---- admin: likely copies (#/likely): a group per card, its copies side by side (one above the other on a phone),
   what differs marked; the one to keep picked; ticked groups decided from the bar below */
.lk-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.card.lk-card { padding: 0; overflow: hidden; scroll-margin-top: 80px; transition: opacity .24s ease, transform .24s ease; }
.card.lk-card.picked { box-shadow: 0 0 0 2px var(--brand); }
.card.lk-card.done { background: var(--surface-2); }
.lk-done { display: flex; align-items: center; gap: 10px; padding: 12px 20px; font-size: .9rem; color: var(--muted); }
.lk-done .grow { flex: 1; }
.lk-done svg { color: var(--good); flex: none; }
.card.lk-card.flash { animation: flash 1.4s ease; }
.lk-head, .lk-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; }
.lk-head { border-bottom: 1px solid var(--border); }
.lk-foot { border-top: 1px solid var(--border); }
.lk-head .grow, .lk-foot .grow { flex: 1; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1px; background: var(--border); }
.lk-side { padding: 14px 20px 16px; min-width: 0; background: var(--surface); transition: box-shadow .15s ease, opacity .15s ease; }
.lk-side.keep { box-shadow: inset 0 3px 0 var(--good); background: color-mix(in srgb, var(--good) 4%, var(--surface)); }
.lk-side.out { opacity: .5; }
.lk-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; min-height: 30px; }
.lk-pick .grow { flex: 1; }
.lk-keep, .lk-out { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border-strong); font-size: .82rem; font-weight: 600; }
.lk-keep input, .lk-out input, .lk-tick, .lk-all input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.lk-side.keep .lk-keep { border-color: var(--good); color: var(--good); }
.lk-all { padding: 4px 0; gap: 8px; font-size: .86rem; }
.lk-filters { align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.lk-filters .filter select.input { min-width: 150px; }
.bulk-bar.lk-bar { top: auto; bottom: 16px; box-shadow: var(--shadow-lg); }
.lk-confirm p { margin: 0 0 8px; }
.lk-moves { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 4px; }
.lk-warn { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px;
  background: var(--warn-soft, #fff7e6); color: var(--warn-ink, #8a5a00); font-size: 13px; line-height: 1.5; }
.lk-warn svg { flex: none; margin-top: 3px; }
.dialog.lk-edit { width: min(1000px, 100%); }
.dialog.lk-edit > .card { border: 0; box-shadow: none; margin: 0; }
.lk-side .q-head { gap: 8px; }
.lk-side .q-text { margin-bottom: 10px; }
.lk-side .opts { gap: 6px; }
.lk-side .opts.lk-short { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lk-side .opt { padding: 7px 10px; gap: 10px; }
.lk-side .opt-label { width: 24px; height: 24px; font-size: .78rem; }
.lk-letter { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: .82rem;
  background: var(--brand-soft); color: var(--brand-ink); }
a.badge.lk-copies { text-decoration: none; }
a.badge.lk-copies:hover { color: var(--brand-ink); }
mark.lk-diff, .math.lk-diff, .dmath.lk-diff { background: color-mix(in srgb, var(--warn) 26%, transparent); color: inherit; border-radius: 4px;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--warn) 70%, transparent); }
mark.lk-diff { padding: 0 2px; }
.lk-looking { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); }
.lk-looking::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: pulse 1.4s infinite; }
@media (max-width: 720px) {
  .lk-head, .lk-foot { padding: 10px 14px; }
  .lk-side { padding: 14px; }
  .lk-foot .btn { flex: 1 1 auto; }
  .lk-foot .grow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .card.lk-card, .lk-side { transition: none; } .lk-looking::before { animation: none; } }

/* ------------------------------------------------------------------ the answer sheet after an exam: subjects, navigator */
.subject-filter { margin: 4px 0 12px; overflow-x: auto; scrollbar-width: none; }
.subject-filter .chips { flex-wrap: nowrap; }
.subject-filter .chip { white-space: nowrap; }
.review-head { scroll-margin-top: 80px; }
.questions .card.q { scroll-margin-top: 80px; }
.card.q.flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 55%, transparent); } 100% { box-shadow: var(--shadow, none); } }
tr.row-out td { color: var(--muted); }

/* ------------------------------------------------------------------ admin: university mock tests */
.notice.warn { background: var(--warn-soft); }
.mock-uni .card-head { flex-wrap: wrap; gap: 10px; }
.mock-uni h2 { margin: 0; font-size: 1.05rem; }
.mock-unit { border-top: 1px solid var(--border); }
.mock-unit-head { padding: 12px 18px 0; }
.mock-unit-head h3 { margin: 0; font-size: .95rem; }
.year-strip { display: flex; gap: 8px; padding: 12px 18px; overflow-x: auto; }
.year-cell { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 86px; padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--good) 40%, var(--border)); background: var(--good-soft); border-radius: 10px; color: inherit;
  font-size: .78rem; text-decoration: none; }
.year-cell strong { font-size: .9rem; }
.year-cell span { color: var(--text-2); }
a.year-cell:hover { border-color: var(--brand); text-decoration: none; }
.year-cell.sample { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn-ink) 35%, var(--border)); }
.year-cell.hidden { background: var(--surface-2); border-color: var(--border); opacity: .75; }
.year-cell.gap { background: none; border: 1px dashed var(--border-strong); color: var(--muted); }
tr.muted-row td { opacity: .6; }
.mock-notes { margin-bottom: 14px; }
.mock-notes p { margin: 0; }

/* ------------------------------------------------------------------ hover polish: only with a mouse (a tap never leaves a
   card stuck lifted), and the lifts only when the viewer allows motion. Clickable cards glow under the cursor:
   common.js keeps --mx / --my at the pointer, inside the card. */
@media (hover: hover) and (pointer: fine) {
  .paper-card, .tpl-card, a.card.list-item, a.stat-tile, .kpi-btn .stat-tile, .mock-link, a.year-cell, .top-card, button.sum-tile,
  .tile, .uni-tile, .opt, .chip, .pill, .segmented button, .course-chip {
    transition: border-color .15s, background-color .15s, color .15s, box-shadow .2s, transform .2s cubic-bezier(.2, .8, .2, 1);
  }
  .paper-card:hover, .tpl-card:hover, a.card.list-item:hover, a.stat-tile:hover, .kpi-btn:hover .stat-tile, .mock-link:hover,
  a.year-cell:hover, .top-card:hover, button.sum-tile:hover, .opt:not(.static):not(.locked):hover {
    background-image: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%);
    box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--brand) 55%, transparent);
  }
  .tile:not(.locked):not(.empty):hover, .uni-tile:hover {
    background-image: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--tc, var(--brand)) 13%, transparent), transparent 70%);
    box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--tc, var(--brand)) 60%, transparent);
  }
  /* answer options: no lift (the paper must stay still while reading), the letter lights up instead */
  .opt:not(.static):not(.locked):hover { box-shadow: 0 0 0 3px var(--brand-soft); }
  .opt:not(.static):not(.locked):not(.on):hover .opt-label { border-color: var(--brand); color: var(--brand); }
  .opt-label { transition: border-color .15s, color .15s, transform .15s; }

  /* the primary button: a light sheen runs across */
  .btn.primary { position: relative; overflow: hidden; isolation: isolate; }
  .btn.primary::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transform: translateX(-110%);
    background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .3) 50%, transparent 75%);
  }
  .btn.primary:not(:disabled):hover { box-shadow: 0 14px 28px -12px var(--brand); }
  .btn.primary:not(:disabled):hover::after { transform: translateX(110%); transition: transform .6s ease; }
  .btn { transition: background .12s, border-color .12s, box-shadow .2s, transform .15s; }

  /* sidebar: a brand bar grows at the left edge, the icon nudges */
  .nav-link { transition: background .15s, color .15s; }
  .nav-link::before {
    content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0; border-radius: 0 3px 3px 0; background: var(--brand);
    transform: translateY(-50%); transition: height .18s ease;
  }
  .nav-link:hover::before { height: 18px; }
  .nav-link.on::before { height: 24px; }
  body.rail .nav-link::before { display: none; }
  .nav-link .icon, .icon-btn .icon, .card-head h2 .icon { transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
  .nav-link:hover .icon, .icon-btn:hover .icon { color: var(--brand); }

  /* clickable table rows: a brand edge on the hovered row */
  .table tbody tr.click:hover td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
  a.list-item .list-icon { transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .paper-card:hover, .tpl-card:hover, a.card.list-item:hover, a.stat-tile:hover, .kpi-btn:hover .stat-tile, .mock-link:hover,
  a.year-cell:hover, .top-card:hover, button.sum-tile:hover, .uni-tile:hover { transform: translateY(-3px); }
  .tile:not(.locked):not(.empty):hover { transform: translateY(-3px); }
  .chip:hover, .pill:not(.on):hover, .segmented button:not(.on):hover, .course-chip:hover { transform: translateY(-1px); }
  .btn:not(:disabled):hover { transform: translateY(-1px); }
  .btn:not(:disabled):active { transform: translateY(1px) scale(.98); }
  .opt:not(.static):not(.locked):hover .opt-label { transform: scale(1.08); }
  .nav-link:hover .icon { transform: translateX(2px) scale(1.08); }
  .icon-btn:hover .icon { transform: scale(1.12) rotate(-6deg); }
  .card:hover .card-head h2 .icon { transform: rotate(-8deg) scale(1.06); }
  a.list-item:hover .list-icon { transform: translateX(3px) scale(1.06); }
}

/* ------------------------------------------------------------------ Piku (পিকু), the study buddy (mascot.js) */
.pk { position: fixed; left: 0; bottom: 12px; z-index: 40; width: 76px; pointer-events: none; will-change: transform; }
body.auth .pk { display: none; }
body.focus .pk { z-index: 35; }   /* under the exam's question sheet */
.pk-clock { position: absolute; left: 50%; bottom: calc(100% - 6px); transform: translateX(-50%); padding: 3px 9px; border-radius: 999px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .78rem; font-weight: 700;
  white-space: nowrap; font-variant-numeric: tabular-nums; pointer-events: none; transition: background .2s, color .2s; }
.pk-clock[hidden], .pk.exam .pk-timer, .pk.tucked .pk-clock, .pk.tucked .pk-timer { display: none; }
.pk.clock-warn .pk-clock { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn); }
.pk.clock-low .pk-clock { background: var(--bad); color: #fff; border-color: var(--bad); animation: pk-clock 1s ease-in-out infinite; }
@keyframes pk-clock { 50% { transform: translateX(-50%) scale(1.08); } }
/* slid against a side: a little of it shows, leaning out; a tap or a pull brings it back */
.pk.tucked .pk-btn { cursor: pointer; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.pk.tucked[data-side="left"] .pk-btn { transform: rotate(16deg); }
.pk.tucked[data-side="right"] .pk-btn { transform: rotate(-16deg); }
.pk.tucked.clock-low .pk-svg { animation: pk-nudge 1.6s ease-in-out infinite; }   /* little time left: it fidgets at the edge */
@keyframes pk-nudge { 0%, 78%, 100% { transform: none; } 84% { transform: translateX(-3px); } 90% { transform: translateX(3px); } 96% { transform: translateX(-2px); } }
.pk-howto { margin: 10px 0 0; font-size: .74rem; color: var(--muted); }
.pk-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: grab; pointer-events: auto; touch-action: none;
  -webkit-tap-highlight-color: transparent; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), opacity .2s; }
.pk-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 50%; }
.pk.held .pk-btn { cursor: grabbing; }
.pk-flip { display: block; transition: transform .2s; }
.pk-flip.left { transform: scaleX(-1); }
/* no filter (a drop-shadow under running animations repaints every frame); the shadow is the ellipse under it */
.pk-svg { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 100%; }
.pk-shadow { fill: rgba(15, 23, 42, .18); transform-box: fill-box; transform-origin: center; }
.pk-foot { fill: #3560d8; transform-box: fill-box; transform-origin: center; }
.pk-arm ellipse { fill: #4f86f5; }
.pk-arm { transform-box: fill-box; }
.pk-arm.l { transform-origin: 80% 15%; }
.pk-arm.r { transform-origin: 20% 15%; }
.pk-bod { transform-box: view-box; transform-origin: 62px 111px; animation: pk-breathe 2.8s ease-in-out infinite; }
.pk-ant { transform-box: view-box; transform-origin: 62px 33px; }
.pk-flush { opacity: 0; transition: opacity .3s; }
.pk-line path, path.pk-line, .pk-line-p { fill: none; stroke: #1b2140; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.pk-line.thin path, path.pk-line.thin { stroke-width: 2.3; }
.pk-e-open ellipse, .pk-m-o { fill: #1b2140; }
.pk-e-open { transform-box: fill-box; transform-origin: center; animation: pk-blink 4.6s infinite; }
.pk-look { transition: transform .12s; }
.pk-tear { fill: #7cc4ff; opacity: 0; }
.pk-steam { animation: pk-steam 2s ease-in-out infinite; }

/* which face goes with which mood */
.pk-e, .pk-m, .pk-brow, .pk-tear, .pk-p { display: none; }
.pk:is([data-mood="idle"], [data-mood="happy"], [data-mood="sad"], [data-mood="angry"], [data-mood="worried"]) .pk-e-open,
.pk[data-mood="excited"] .pk-e-star, .pk[data-mood="love"] .pk-e-heart, .pk:is([data-mood="giggle"], [data-mood="blush"]) .pk-e-happy,
.pk[data-mood="wink"] .pk-e-wink, .pk[data-mood="blush"] .pk-m-cat,
.pk[data-mood="sleepy"] .pk-e-closed, .pk[data-mood="dizzy"] .pk-e-dizzy,
.pk:is([data-mood="idle"], [data-mood="happy"]) .pk-m-smile,
.pk:is([data-mood="excited"], [data-mood="love"], [data-mood="giggle"], [data-mood="wink"]) .pk-m-open,
.pk[data-mood="sad"] .pk-m-sad, .pk[data-mood="worried"] .pk-m-wavy, .pk[data-mood="angry"] .pk-m-flat,
.pk:is([data-mood="sleepy"], [data-mood="dizzy"]) .pk-m-o,
.pk:is([data-mood="sad"], [data-mood="worried"]) .pk-brow-sad, .pk[data-mood="angry"] .pk-brow-angry,
.pk[data-mood="sad"] .pk-tear,
.pk[data-prop="book"] .pk-p-book, .pk[data-prop="pencil"] .pk-p-pencil, .pk[data-prop="cup"] .pk-p-cup,
.pk[data-prop="clock"] .pk-p-clock, .pk[data-prop="trophy"] .pk-p-trophy, .pk[data-prop="search"] .pk-p-search { display: inline; }
.pk[data-mood="angry"] .pk-flush { opacity: .9; }
.pk-cheek { opacity: .8; transform-box: fill-box; transform-origin: center; transition: opacity .2s, transform .2s; }
.pk:is([data-mood="blush"], [data-mood="love"], [data-mood="giggle"]) .pk-cheek { opacity: 1; transform: scale(1.3); }
.pk[data-mood="blush"] .pk-svg { animation: pk-sway .9s ease-in-out 2; }
.pk[data-mood="wink"] .pk-svg { animation: pk-wiggle .25s ease-in-out 2; }
.pk[data-mood="angry"] .pk-arm ellipse, .pk[data-mood="angry"] .pk-foot { fill: #e2403a; }
.pk[data-mood="sleepy"] .pk-m-o { transform-box: fill-box; transform-origin: center; transform: scale(.7); }

/* moods in motion */
.pk[data-mood="excited"] .pk-svg { animation: pk-jump .5s cubic-bezier(.3, .7, .4, 1) 4; }
.pk[data-mood="excited"] .pk-arm.l, .pk.f-wave .pk-arm.l { animation: pk-wave .35s ease-in-out infinite alternate; }
/* things it does by itself now and then (mascot.js fidget) */
.pk.f-hop .pk-svg { animation: pk-jump .5s cubic-bezier(.3, .7, .4, 1) 2; }
.pk.f-spin .pk-svg { animation: pk-spin .8s ease-in-out; }
.pk.f-stretch .pk-svg { animation: pk-stretch 1.4s ease-in-out; }
.pk.f-look .pk-look { animation: pk-look 1.6s ease-in-out; }
.pk.f-sneeze .pk-svg { animation: pk-sneeze .7s ease-out .35s; }
.pk.press .pk-svg { transform: scale(1.08, .9); transition: transform .5s ease-out; }
.pk[data-mood="excited"] .pk-arm.r { animation: pk-wave-r .35s ease-in-out infinite alternate; }
.pk[data-mood="love"] .pk-svg { animation: pk-sway 1.1s ease-in-out 3; }
.pk[data-mood="giggle"] .pk-svg { animation: pk-wiggle .18s ease-in-out 6; }
.pk[data-mood="angry"] .pk-svg { animation: pk-shake .09s linear 8; }
.pk[data-mood="angry"] .pk-ant { animation: pk-ant .15s linear infinite alternate; }
.pk[data-mood="sad"] .pk-bod { animation: pk-slump 3.6s ease-in-out infinite; }
.pk[data-mood="sad"] .pk-tear { animation: pk-tear 1.4s ease-in infinite; }
.pk[data-mood="sad"] .pk-tear.r { animation-delay: .7s; }
.pk[data-mood="worried"] .pk-svg { animation: pk-fidget 1.2s ease-in-out infinite; }
.pk[data-mood="sleepy"] .pk-bod { animation: pk-breathe 4.2s ease-in-out infinite; }
.pk[data-mood="sleepy"] .pk-svg { transform: rotate(-4deg); }
.pk[data-mood="dizzy"] .pk-svg { animation: pk-dizzy .8s ease-in-out infinite alternate; }
.pk.held .pk-feet { animation: pk-kick .25s ease-in-out infinite alternate; }
.pk.walk .pk-foot.l { animation: pk-step .32s ease-in-out infinite alternate; }
.pk.walk .pk-foot.r { animation: pk-step .32s ease-in-out infinite alternate-reverse; }
.pk.walk .pk-bod { animation: pk-bob .32s ease-in-out infinite alternate; }
.pk.walk .pk-arm.l { animation: pk-wave .32s ease-in-out infinite alternate; }
.pk.boop .pk-svg { animation: pk-boop .35s cubic-bezier(.3, 1.6, .5, 1); }
.pk.land .pk-svg { animation: pk-land .45s cubic-bezier(.3, 1.6, .5, 1); }
.pk.duck .pk-btn { transform: translateY(58%); }
/* no clear floor under it: down out of sight, behind the tab bar or past the window's edge, till there is one */
.pk.away .pk-btn { transform: translateY(calc(100% + var(--tabbar-h, 0px) + 24px)); opacity: 0; pointer-events: none;
  transition: transform .26s ease-in, opacity .2s .06s; }
.pk.away .pk-clock, .pk.away .pk-timer { visibility: hidden; }
/* a line it kept (no clear place to say it by itself): a still dot on it; a tap says it (mascot.js keep) */
.pk-btn { position: relative; }
.pk.pk-kept .pk-btn::after { content: ""; position: absolute; top: 22%; right: 12%; width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; animation: pk-note .35s cubic-bezier(.3, 1.6, .5, 1); }
.pk.tucked.pk-kept .pk-btn::after { display: none; }
@keyframes pk-note { from { transform: scale(0); } }
@media (hover: hover) and (pointer: fine) {
  .pk-btn:hover .pk-ant { animation: pk-ant .5s ease-in-out 2 alternate; }
  .pk-btn:hover .pk-cheek { opacity: 1; transform: scale(1.15); }
}

@keyframes pk-breathe { 50% { transform: scale(1.025, .975); } }
@keyframes pk-blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pk-step { from { transform: translateY(0); } to { transform: translateY(-5px) scaleX(.9); } }
@keyframes pk-bob { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-3px) rotate(2deg); } }
@keyframes pk-wave { from { transform: rotate(0); } to { transform: rotate(-55deg); } }
@keyframes pk-wave-r { from { transform: rotate(0); } to { transform: rotate(45deg); } }
@keyframes pk-jump { 0%, 100% { transform: translateY(0) scale(1); } 15% { transform: translateY(0) scale(1.08, .9); } 50% { transform: translateY(-22px) scale(.95, 1.06); } 85% { transform: translateY(0) scale(1.06, .92); } }
@keyframes pk-sway { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes pk-wiggle { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(7deg) translateY(-2px); } }
@keyframes pk-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes pk-ant { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
@keyframes pk-slump { 0%, 100% { transform: scale(1.03, .93); } 50% { transform: scale(1.04, .91); } }
@keyframes pk-tear { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
@keyframes pk-fidget { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(2px) rotate(2deg); } }
@keyframes pk-dizzy { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes pk-kick { from { transform: translateY(0); } to { transform: translateY(-4px); } }
@keyframes pk-boop { 0% { transform: scale(1); } 40% { transform: scale(1.12, .88); } 100% { transform: scale(1); } }
@keyframes pk-land { 0% { transform: scale(1.25, .7); } 60% { transform: scale(.92, 1.1) translateY(-6px); } 100% { transform: none; } }
@keyframes pk-spin { to { transform: rotateY(360deg); } }
@keyframes pk-stretch { 30%, 60% { transform: scale(.94, 1.12); } }
@keyframes pk-look { 25%, 40% { transform: translate(-3.5px, 0); } 60%, 80% { transform: translate(3.5px, 0); } }
@keyframes pk-sneeze { 0% { transform: scale(1.06, .92); } 30% { transform: scale(.95, 1.08) translateY(-6px) rotate(-4deg); } 100% { transform: none; } }
@keyframes pk-steam { 0%, 100% { opacity: .2; transform: translateY(1px); } 50% { opacity: .9; transform: translateY(-2px); } }

/* emoji floating off its head; confetti for a great result */
.pk-fx { position: absolute; left: 50%; top: 4px; font-size: 18px; pointer-events: none; opacity: 0;
  animation: pk-float 1.7s ease-out forwards; }
.pk[data-mood="sleepy"] .pk-fx { font-weight: 700; color: var(--muted); font-size: 15px; }
@keyframes pk-float { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.6); } 15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -64px) rotate(var(--rot)) scale(1.1); } }
.pk-confetti { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; }
.pk-confetti i { position: absolute; top: -14px; width: 8px; height: 13px; border-radius: 2px; animation: pk-confetti linear forwards; }
.pk-confetti i:nth-child(3n) { width: 10px; height: 10px; border-radius: 50%; }
@keyframes pk-confetti { to { transform: translate(var(--dx), 105vh) rotate(var(--r)); } }

/* its speech bubble */
.pk-bubble { position: absolute; bottom: calc(100% + 4px); left: 0; width: min(290px, calc(100vw - 24px)); padding: 12px 14px 13px;
  border-radius: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  pointer-events: auto; transform-origin: var(--tail, 50%) 100%; }
.pk-bubble[hidden] { display: none; }
.pk-bubble.in { animation: pk-pop .32s cubic-bezier(.3, 1.5, .5, 1); }
.pk-bubble::after { content: ""; position: absolute; top: 100%; left: var(--tail, 50%); width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: var(--surface); border: solid var(--border); border-width: 0 1px 1px 0; transform: rotate(45deg); }
@keyframes pk-pop { from { opacity: 0; transform: translateY(8px) scale(.85); } }
.pk-bubble-top { display: flex; align-items: center; gap: 2px; margin: -2px -6px 4px 0; }
.pk-name { flex: 1; font-size: .74rem; letter-spacing: .02em; color: var(--brand); }
.pk-mini { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pk-mini:hover { background: var(--surface-2); color: var(--text); }
.pk-text { margin: 0; font-size: .93rem; line-height: 1.55; font-weight: 600; }
.pk-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pk-acts[hidden] { display: none; }

/* its menu, a question in the bubble, the focus timer over its head */
.pk-bubble.wide { width: min(400px, calc(100vw - 24px)); }
.pk-body { max-height: min(62vh, 520px); overflow: auto; overscroll-behavior: contain; margin-right: -6px; padding-right: 6px; }
.pk-menu .pk-text { margin-bottom: 10px; }
.pk-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pk-item { display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: .83rem; font-weight: 600; text-align: left; cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s; }
.pk-item:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.pk-item:active { transform: scale(.97); }
.pk-emo { font-size: 1.05rem; line-height: 1; }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pk-timer { position: absolute; left: 50%; bottom: calc(100% - 6px); transform: translateX(-50%); padding: 2px 8px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 10px -4px var(--brand); pointer-events: none; }
.pk-timer.brk { background: var(--good); }
.pk-timer[hidden], .pk:has(.pk-bubble:not([hidden])) .pk-timer { display: none; }

.pk-quiz { display: flex; flex-direction: column; gap: 10px; }
.pk-q-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .74rem; color: var(--muted); }
.pk-q-meta .badge { font-size: .7rem; }
.pk-dots { display: flex; gap: 4px; margin-left: auto; }
.pk-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.pk-dots i.good { background: var(--good); }
.pk-dots i.bad { background: var(--bad); }
.pk-dots i.cur { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pk-q-text { font-size: .95rem; line-height: 1.6; font-weight: 600; }
.pk-q-text img, .pk-quiz .figure img { max-width: 100%; height: auto; }
.pk-quiz .statements { margin: 0; padding-left: 18px; font-size: .88rem; }
.pk-opts { display: grid; gap: 6px; }
.pk-opt { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .15s; }
.pk-opt:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.pk-opt:disabled { cursor: default; }
.pk-opt .opt-label { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); font-weight: 700; font-size: .8rem; }
.pk-opt.right { border-color: var(--good); background: var(--good-soft); }
.pk-opt.right .opt-label { background: var(--good); color: #fff; }
.pk-opt.wrong { border-color: var(--bad); background: var(--bad-soft); animation: pk-shake .09s linear 4; }
.pk-opt.wrong .opt-label { background: var(--bad); color: #fff; }
.pk-opt.busy { opacity: .7; }
.pk-verdict { margin: 0; padding: 9px 11px; border-radius: 12px; font-weight: 700; font-size: .9rem; }
.pk-verdict.good { background: var(--good-soft); color: var(--good-ink); }
.pk-verdict.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pk-verdict span { display: block; font-weight: 500; font-size: .8rem; opacity: .85; margin-top: 2px; }
.pk-quiz .steps { font-size: .86rem; }
.pk-sum { display: grid; gap: 8px; }
.pk-sum-row { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.pk-sum-row .pk-emo { width: 22px; text-align: center; }
.pk-sum-row strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.pk-sum .meter { margin-top: -2px; }
.pk-plan > span:nth-child(2) { flex: 1; min-width: 0; }
.pk-plan .btn { flex: none; }
.pk-notes { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }

@media (max-width: 720px) {
  .pk { width: 62px; bottom: calc(64px + env(safe-area-inset-bottom)); }
  .pk-text { font-size: .9rem; }
  .pk-body { max-height: calc(100dvh - 230px); }
}
@media (prefers-reduced-motion: reduce) {
  .pk *, .pk-bubble.in { animation: none !important; }
}

/* ------------------------------------------------------------------ admin: the student app (#/app) */
.feature-list { display: flex; flex-direction: column; }
.feature-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 12px; align-items: center; padding: 4px 0; border-top: 1px solid var(--border); }
.feature-row:first-child { border-top: 0; }
.feature-row .sound-toggle { margin-top: 0; }
.feature-row .input:only-child, .feature-row > .sound-toggle:only-child { grid-column: 1 / -1; }
.feature-row.off .sound-toggle strong { color: var(--muted); }
@media (max-width: 720px) { .feature-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-bottom: 10px; } }
.sticky-card { position: sticky; top: 76px; }
@media (max-width: 1100px) { .sticky-card { position: static; } }
.phone-preview { margin-top: 12px; max-height: 70vh; overflow: auto; border: 8px solid var(--surface-3); border-radius: 28px; padding: 14px 12px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 14px; }
.hub-cat-name { font-weight: 700; font-size: .9rem; margin-bottom: 8px; }
.hub-unis { display: flex; flex-direction: column; gap: 8px; }
.hub-uni { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.hub-uni .grow strong, .hub-uni .grow .cell-sub { display: block; }
.hub-logo { width: 38px; height: 38px; flex: none; border-radius: 10px; display: grid; place-items: center; object-fit: contain;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: .72rem; text-transform: uppercase; overflow: hidden; }
.omr-photo img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--border); display: block; }
.omr-detail { grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr); }
@media (max-width: 900px) { .omr-detail { grid-template-columns: minmax(0, 1fr); } }
.omr-rows td, .omr-rows th { padding: 6px 8px; }
.omr-rows select { min-width: 92px; padding: 4px 6px; }
tr.warn-row td { background: var(--warn-soft); }
/* an OMR row the student changed after the scan: what was read → the final answer */
tr.changed-row td { background: var(--warn-soft); box-shadow: inset 0 -1px 0 var(--border); }
tr.changed-row td:first-child { box-shadow: inset 3px 0 0 var(--warn-ink), inset 0 -1px 0 var(--border); }
.omr-rows .changed-to { color: var(--warn-ink); }
td.push-title { min-width: 220px; }
@media (max-width: 720px) { td.push-title { min-width: 0; } }

/* ------------------------------------------------------------------ profile photos (PX.face): fill any round avatar */
.px-face { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }

/* ------------------------------------------------------------------ the student site on a phone (CLEANUI)
   Every target at least 44 px with 8 px between, inputs at 16 px (no zoom on focus), body type at least 15 px and
   labels/counts at least 12 px. Scoped to .student: the admin pages share this file and stay as they are. */
.student .ui-row-title, .student .ui-tile-title { font-size: 15px; line-height: 22px; }
.student .ui-row-sub, .student .ui-tile-sub { font-size: 13px; line-height: 19px; }
.student .ui-hero-sub { font-size: 15px; line-height: 23px; }
.student .ui-head.has-back .ui-head-sub { font-size: 14px; line-height: 21px; }
.student .ui-section-link { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 44px; min-width: 44px;
  padding: 0 4px 0 12px; font-size: 15px; }
.student .ui-pill, .student .ui-tile-badge { font-size: 12px; }
.student .ui-row-right { font-size: 14px; }
.student .btn { font-size: 15px; }
.student .btn.small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.student .chip { min-height: 44px; font-size: 15px; }
.student .segmented button { min-height: 44px; font-size: 15px; }
.student .icon-btn { width: 44px; height: 44px; }
.student .pw-eye { width: 44px; height: 44px; right: 2px; }
.student .ui-langpill { min-height: 44px; padding: 4px 14px; font-size: 14px; }
/* the switch keeps its look; its tap area grows to 44 px */
.student .ui-switch::before { content: ""; position: absolute; inset: -7px -4px; border-radius: 999px; }
.student .input, .student .field input, .student .field select, .student .field textarea, .student select.input { font-size: 16px; }
.student .field > span { font-size: 14px; }
.student .field .hint { font-size: 13px; }
.student .gt-label { font-size: 12px; }
.student .ui-hero-btn { font-size: 15px; }
