:root {
    --brand: #ff5b14;
    --brand-fg: #16161f;
    --brand-700: #ff7437;
    --bg: #f5f5f9;
    --ink: #16161f;
    --muted: #5b6270;
    --line: #ececf1;

    /* Theme tokens (light). Dark values below; use these instead of hard-coded colours so both themes work. */
    --surface: #fff;
    --surface-2: #fafafc;
    --surface-3: #f3f3f8;
    --surface-4: #e5e7eb;
    --ink-2: #374151;
    --ink-3: #4b5563;
    --faint: #9ca3af;
    --faint-2: #c4c4cf;
    --line-strong: #d4d4de;
    --brand-ink: #b8420e;
    --tint-brand: #ffefe8;
    --tint-brand-2: #ffe5d9;
    --tint-brand-line: #ffceb8;
    --tint-success: #e7f7ee;
    --success-ink: #047857;
    --success-line: #a7f3d0;
    --tint-danger: #fef2f2;
    --danger-ink: #b91c1c;
    --danger-line: #fecaca;
    --tint-warn: #fff7ed;
    --warn-ink: #92400e;
    --warn-line: #fde68a;
    --tint-info: #eff6ff;
    --info-ink: #1e3a8a;
    --info-line: #bfdbfe;
    --tint-pink: #fdf2f8;
    --pink-ink: #be185d;
    --pink-line: #fbcfe8;
    --purple-ink: #6b21a8;
    --glass: rgba(255, 255, 255, .92);
    --focus-ring: rgba(255, 91, 20, 0.15);
    --shadow: 0 12px 32px rgba(20, 20, 40, .14);
    --input-bg: var(--surface);
    --paper: #fff;
    --paper-ink: #16161f;

    /* Home page (css/landing.css). */
    --brand-accent: var(--brand);
    --brand-accent-ink: var(--brand-ink);
    --lp-shadow: 0 22px 48px rgba(20, 20, 40, .13);
    --lp-shadow-soft: 0 8px 20px rgba(20, 20, 40, .07);
    --lp-onbrand: var(--brand-fg);
    --lp-invert-bg: var(--ink);
    --lp-invert-ink: var(--surface);
    color-scheme: light;
}

/* Dark theme: js/r3-learn.js sets data-theme on <html> before the first paint (light, dark, or the system's choice). */
:root[data-theme="dark"] {
    --brand-700: #ff7437;
    --bg: #0f1117;
    --ink: #e9eaf1;
    --muted: #a1a6b4;
    --line: #2b2f3c;
    --surface: #181a23;
    --surface-2: #1d2029;
    --surface-3: #242733;
    --surface-4: #2e3240;
    --ink-2: #d0d3dc;
    --ink-3: #b9bdc8;
    --faint: #8a90a0;
    --faint-2: #4d5263;
    --line-strong: #3a3f4f;
    --brand-ink: #ff824c;
    --tint-brand: #462720;
    --tint-brand-2: #5d2e1e;
    --tint-brand-line: #973e1b;
    --tint-success: #10291f;
    --success-ink: #6ee7b7;
    --success-line: #1f5a43;
    --tint-danger: #351619;
    --danger-ink: #fca5a5;
    --danger-line: #6e2b31;
    --tint-warn: #30230e;
    --warn-ink: #fcd34d;
    --warn-line: #6b5219;
    --tint-info: #13213a;
    --info-ink: #93c5fd;
    --info-line: #27497a;
    --tint-pink: #33162a;
    --pink-ink: #f9a8d4;
    --pink-line: #6d2d55;
    --purple-ink: #d8b4fe;
    --glass: rgba(24, 26, 35, .92);
    --focus-ring: rgba(255, 130, 76, 0.35);
    --shadow: 0 12px 32px rgba(0, 0, 0, .45);
    --lp-shadow: 0 22px 48px rgba(0, 0, 0, .55);
    --lp-shadow-soft: 0 8px 20px rgba(0, 0, 0, .40);
    color-scheme: dark;
}

/* Bootstrap's pink code text is too dark on the dark background. */
:root[data-theme="dark"] code { color: var(--pink-ink); }

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; }
.app--railed { display: flex; align-items: stretch; }
.app__col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.topbar__inner {
    display: flex; align-items: center; gap: 16px;
    max-width: 1320px; margin: 0 auto; padding: 13px 28px;
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--brand-ink); font-weight: 800; font-size: 20px; text-decoration: none; }
.brand__mark { display: grid; place-items: center; }
.brand__name { letter-spacing: -.3px; }

.ask-ai {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ask-ai__spark { color: var(--brand-ink); }

.search-wrap { position: relative; flex: 0 1 340px; }
.search { position: relative; flex: 1; display: block; }
.search input {
    width: 100%; border: 1px solid var(--line); border-radius: 999px;
    padding: 9px 44px 9px 16px; font-size: 14px; background: var(--surface); outline: none;
}
.search input:focus { border-color: var(--brand); }
.search__btn {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-fg);
    display: grid; place-items: center;
}

.search-backdrop { position: fixed; inset: 0; z-index: 40; }
.search-results { position: absolute; z-index: 41; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(17,17,40,.16); padding: 6px; max-height: 60vh; overflow-y: auto; }
.search-results__msg { padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.search-result { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: none; border-radius: 9px; padding: 8px; cursor: pointer; text-align: left; }
.search-result:hover { background: var(--surface-2); }
.search-result__thumb { width: 40px; height: 32px; flex: none; border-radius: 7px; display: grid; place-items: center; color: #fff; overflow: hidden; }
.search-result__thumb--img { background-size: cover; background-position: center; }
.search-result__title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topbar__spacer { flex: 1; }

.icon-btn {
    width: 38px; height: 38px; border: none; background: transparent; color: var(--ink-3);
    border-radius: 10px; display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); }

.profile { display: flex; align-items: center; gap: 10px; padding-left: 6px; }
.profile__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: var(--brand-fg); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.profile__meta { display: flex; flex-direction: column; line-height: 1.2; }
.profile__name { font-weight: 700; font-size: 13px; }
.profile__role { font-size: 11px; color: var(--muted); }

.tabs__inner { display: flex; gap: 26px; max-width: 1320px; margin: 0 auto; padding: 0 28px; }
.tab { padding: 12px 2px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--brand); }
.tab__count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--tint-brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; }

.app__main { max-width: 1320px; margin: 0 auto; padding: 24px 28px 60px; }

/* ---------- Dashboard layout ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.dash-loading { padding: 80px; text-align: center; color: var(--muted); }

.greeting { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.greeting__title { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.greeting__sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.greeting__stats { display: flex; gap: 12px; }

.stat-pill { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 16px; min-width: 96px; }
.stat-pill__icon, .summary-card__icon { display: grid; place-items: center; }
.stat-pill__icon { width: 30px; height: 30px; border-radius: 9px; }
.stat-pill__value { font-weight: 800; font-size: 18px; line-height: 1; }
.stat-pill__label { font-size: 12px; color: var(--muted); }

.ic--amber { background: var(--tint-warn); color: #f59e0b; }
.ic--gold { background: var(--tint-warn); color: #d99a07; }
.ic--green { background: var(--tint-success); color: #10b981; }
.ic--ink { background: var(--surface-3); color: var(--ink-2); }

/* ---------- Feature banner ---------- */
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(90deg, var(--tint-success), var(--tint-success)); border: 1px solid var(--success-line); border-radius: 14px; padding: 14px 18px; margin-bottom: 26px; }
.banner__tag { background: #10b981; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 7px; }
.banner__title { font-weight: 700; font-size: 14px; }
.banner__text { flex: 1; min-width: 220px; color: var(--ink-3); font-size: 13px; }
.banner__link { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Sections ---------- */
.section { margin-bottom: 28px; }
.section__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section__title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.section__info, .card__info { color: var(--faint-2); font-size: 12px; }
.link { color: var(--brand-ink); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.empty { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- In-progress rows ---------- */
.course-rows { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.course-row { display: grid; grid-template-columns: 64px minmax(0, 1.7fr) 1fr 1fr 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.course-row--clickable { cursor: pointer; transition: background .12s; }
.course-row--clickable:hover { background: var(--bg); }
.course-row:last-child { border-bottom: none; }
.course-row__thumb { width: 64px; height: 52px; border-radius: 10px; display: grid; place-items: center; color: #fff; overflow: hidden; }
.course-row__thumb--img { background-size: cover; background-position: center; }
.course-row__main { min-width: 0; }
.course-row__kicker { font-size: 11px; font-weight: 700; color: var(--brand-ink); }
.course-row__title { margin-top: 3px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-row__col { display: flex; flex-direction: column; gap: 5px; }
.course-row__k { font-size: 11px; color: var(--muted); }
.course-row__v { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.course-row__v--muted { color: var(--faint); }
.course-row__v--deadline { color: #ef4444; }
.ring { width: 18px; height: 18px; border-radius: 50%; background: conic-gradient(#10b981 calc(var(--p) * 1%), var(--surface-4) 0); }

.btn { border: none; border-radius: 10px; padding: 9px 22px; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn--solid { background: var(--brand); color: var(--brand-fg); }
.btn--solid:hover { background: var(--brand-700); }
.btn--ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--surface-2); }

/* ---------- New enrollment cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.course-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.course-card:hover { box-shadow: 0 8px 24px rgba(20, 20, 40, .08); transform: translateY(-2px); }
.course-card__art { position: relative; height: 120px; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.course-card__art--img { background-size: cover; background-position: center; }
.course-card__materials { position: absolute; top: 10px; left: 10px; background: rgba(17, 17, 31, .5); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 7px; }
.course-card__body { padding: 14px 16px 16px; }
.course-card__kicker { font-size: 11px; font-weight: 700; color: var(--brand-ink); }
.course-card__title { margin: 6px 0 12px; font-size: 14px; font-weight: 700; line-height: 1.35; min-height: 38px; }
.course-card__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: var(--surface-3); color: var(--ink-3); font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }

/* thumbnail accents */
.acc--purple { background: linear-gradient(135deg, #7c6cf5, #9d7bf7); }
.acc--amber { background: linear-gradient(135deg, #f6b24b, #f59257); }
.acc--blue { background: linear-gradient(135deg, #5aa6f7, #6c8cf5); }

/* ---------- Right rail ---------- */
.dash__side { display: flex; flex-direction: column; gap: 16px; }
.summary-card { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.summary-card__icon { width: 38px; height: 38px; border-radius: 10px; }
.summary-card__value { font-size: 22px; font-weight: 800; line-height: 1; }
.summary-card__label { font-size: 12px; color: var(--muted); margin-top: 3px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card__title { font-size: 15px; font-weight: 700; }

.goal { text-align: center; }
.goal__ring { width: 120px; height: 120px; border-radius: 50%; margin: 12px auto 16px; background: conic-gradient(#10b981 calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.goal__ring-inner { width: 92px; height: 92px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--brand-ink); }
.goal__line { font-size: 13px; margin: 4px 0; }
.goal__line--muted { color: var(--muted); }
.goal .link { display: inline-block; margin-top: 10px; }

.leaderboard__list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.leaderboard__row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.leaderboard__row--me { background: var(--surface-2); }
.leaderboard__rank { width: 18px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.leaderboard__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--surface-4); color: var(--ink-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.leaderboard__row--me .leaderboard__avatar { background: var(--brand); color: var(--brand-fg); }
.leaderboard__name { flex: 1; font-size: 13px; font-weight: 600; }
.leaderboard__points { font-size: 13px; font-weight: 700; color: var(--brand-ink); }

@media (max-width: 1100px) { .dash { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
    .course-grid { grid-template-columns: 1fr; }
    .course-row { grid-template-columns: 56px 1fr auto; row-gap: 10px; }
    .course-row__col:nth-child(3), .course-row__col:nth-child(4), .course-row__col:nth-child(5) { display: none; }
    .greeting { flex-direction: column; }
    .search { display: none; }
}

/* ---------- Framework error UI ---------- */
#blazor-error-ui {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--tint-warn); padding: 12px 48px 12px 20px; box-shadow: 0 -1px 4px rgba(0, 0, 0, .15); z-index: 1000;
}
#blazor-error-ui .dismiss { position: absolute; right: 14px; top: 10px; cursor: pointer; }

.validation-message { color: var(--danger-ink); }
.blazor-error-boundary {
    background: #b32121; padding: 1rem 1rem 1rem 1rem; color: #fff;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

/* ================= Login + forbidden ================= */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--bg); padding: 20px; }
.login__card { width: 380px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; box-shadow: 0 18px 50px rgba(20, 20, 40, .08); }
.login__brand { display: flex; align-items: center; gap: 8px; color: var(--brand-ink); font-weight: 800; font-size: 20px; margin-bottom: 20px; }
.login__title { font-size: 22px; font-weight: 800; }
.login__sub { font-size: 13.5px; color: var(--muted); margin: 6px 0 22px; }
.login .fld { display: block; margin-bottom: 16px; }
.login .fld__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.login .fld__input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; outline: none; }
.login .fld__input:focus { border-color: var(--brand); }
.login__error { background: var(--tint-danger); color: var(--danger-ink); border: 1px solid var(--danger-line); border-radius: 9px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.login__submit { width: 100%; justify-content: center; padding: 11px; }
.login__quick { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.login__quick-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.login__quick-row { display: flex; gap: 8px; }
.login__quick-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 6px; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; }
.login__quick-btn:hover:not(:disabled) { border-color: var(--tint-brand-line); background: var(--surface-2); }
.login__quick-btn:disabled { opacity: .6; cursor: default; }
.login__quick-av { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.login__hint { font-size: 11.5px; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.forbidden { min-height: 70vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 6px; }
.forbidden h1 { font-size: 48px; font-weight: 800; color: var(--ink); }

/* ================= Take quiz ================= */
.take { position: fixed; inset: 0; background: var(--bg); display: flex; flex-direction: column; }
.take__top { display: flex; align-items: center; gap: 12px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 18px; }
.take__title { font-size: 15px; font-weight: 700; }
.take__timer { margin-left: auto; font-size: 15px; font-weight: 800; color: var(--brand-ink); background: var(--tint-brand); border-radius: 9px; padding: 6px 12px; font-variant-numeric: tabular-nums; }
.take__timer--low { color: var(--danger-ink); background: var(--tint-danger); }
.qed__timelimit { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; padding: 4px 10px; }
.qed__timelimit input { width: 42px; border: none; outline: none; font-size: 13px; font-weight: 700; color: var(--ink); }
.ccard__timed { color: var(--brand-ink); font-weight: 700; }
.take__explain { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--tint-brand-line); border-left: 3px solid var(--brand); border-radius: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.qe__explain { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.qed__link { margin-top: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.qed__link-title { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.take__lesson { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 14px; padding: 10px 18px; background: var(--tint-brand); color: var(--brand-ink); font-weight: 700; font-size: 14px; border-radius: 10px; text-decoration: none; }
.take__lesson:hover { background: var(--tint-brand-2); }
.take__lesson--sm { margin: 10px 0 0; padding: 7px 12px; font-size: 12.5px; }

.take__intro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; max-width: 520px; margin: 40px auto 0; padding: 32px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.take__intro-icon { font-size: 40px; }
.take__intro-head { font-size: 22px; font-weight: 800; }
.take__intro-msg { color: var(--muted); font-size: 15px; line-height: 1.55; white-space: pre-line; }
.take__intro-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.take__intro-start { margin-top: 8px; padding: 11px 26px; }

/* report Questions tab — accumulated per-question stats */
.qinfo { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; font-size: 13px; color: var(--muted); }
.qinfo__spacer { flex: 1; }
.qinfo__sel { border: 1px solid var(--line); border-radius: 9px; padding: 6px 12px; font-weight: 600; color: var(--ink-2); }
.qinfo__sort { font-weight: 600; color: var(--ink-2); cursor: pointer; }
.qstats { display: flex; flex-direction: column; gap: 16px; }
.qstat { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--surface); }
.qstat__head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.qstat__qico { width: 22px; height: 22px; flex: none; border-radius: 6px; background: #1f2430; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.qstat__no { font-weight: 700; color: var(--ink-2); }
.qstat__spacer { flex: 1; }
.qstat__type { border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-weight: 600; color: var(--ink-3); }
.qstat__dot { color: var(--faint-2); }
.qstat__pts { color: #d99a07; font-weight: 700; }
.qstat__prompt { font-size: 16px; font-weight: 700; margin: 14px 0 16px; }
.qstat__cols { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: start; }
.qstat__bars { display: flex; flex-direction: column; gap: 14px; }
.qstat__opt-label { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.qstat__bar { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.qstat__bar-fill { display: block; height: 100%; border-radius: 6px; background: var(--surface-4); }
.qstat__bar-fill--ok { background: #10b981; }
.qstat__bar-fill--no { background: #ef4444; }
.qstat__opt-meta { font-size: 12px; color: var(--muted); margin-top: 5px; }
.qstat__opt-meta b { color: var(--ink-2); }
.qstat__panel { border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.qstat__panel-title { font-size: 14px; font-weight: 800; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.qstat__panel-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.qstat__count { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; color: var(--ink-2); }
.qstat__sw { width: 12px; height: 12px; border-radius: 4px; }
.qstat__sw--ok { background: #10b981; }
.qstat__sw--no { background: #ef4444; }

@media (max-width: 820px) { .qstat__cols { grid-template-columns: 1fr; } }

/* learner submission detail modal */
.learner__name--link { border: none; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.learner__name--link:hover { color: var(--brand-ink); text-decoration: underline; }
.learner__view { margin-left: auto; border: none; background: none; color: var(--faint); cursor: pointer; padding: 4px; border-radius: 8px; }
.learner__view:hover { color: var(--brand-ink); background: var(--tint-brand); }

.lsm__overlay { position: fixed; inset: 0; z-index: 80; background: rgba(17,17,40,.45); display: grid; place-items: center; padding: 24px; }
.lsm { width: 640px; max-width: 100%; max-height: 88vh; overflow-y: auto; background: var(--surface); border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.lsm__top { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); border-radius: 18px 18px 0 0; }
.lsm__avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; }
.lsm__who { flex: 1; }
.lsm__name { font-weight: 800; font-size: 15px; }
.lsm__dept { font-weight: 600; font-size: 12px; color: var(--muted); margin-left: 4px; }
.lsm__role { font-size: 12px; color: var(--muted); }
.lsm__close { border: none; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.lsm__body { padding: 20px 22px 28px; }
.lsm__headrow { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.lsm__title { font-size: 20px; font-weight: 800; max-width: 60%; }
.lsm__stats { display: flex; gap: 22px; }
.lsm__stat { display: flex; flex-direction: column; gap: 3px; }
.lsm__stat-label { font-size: 11.5px; color: var(--muted); }
.lsm__stat-val { font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.lsm__meta { font-size: 12.5px; color: var(--muted); margin: 10px 0 16px; display: flex; align-items: center; gap: 8px; }
.lsm__cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; margin-bottom: 14px; }
.lsm__cell { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 6px; border: 1px solid transparent; border-radius: 8px; background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; transition: border-color .12s, background .12s; }
.lsm__cell:hover { background: var(--tint-brand); border-color: var(--tint-brand-line); }
.lsm__cell-badge { width: 17px; height: 17px; flex: none; border-radius: 5px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.lsm__cell-badge--correct { background: #10b981; }
.lsm__cell-badge--half { background: #f59e0b; }
.lsm__cell-badge--wrong { background: #ef4444; }
.lsm__cell-badge--skip { background: var(--surface-4); }
.lsm__cell-badge--review { background: #6366f1; }
.lsm__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--ink-3); padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.lsm__leg { display: inline-flex; align-items: center; gap: 6px; }
.lsm__sw { width: 12px; height: 12px; border-radius: 4px; }
.lsm__sw--correct { background: #10b981; }
.lsm__sw--half { background: #f59e0b; }
.lsm__sw--wrong { background: #ef4444; }
.lsm__sw--skip { background: var(--surface-4); }
.lsm__sw--review { background: #6366f1; }
.lsm__questions { display: flex; flex-direction: column; gap: 14px; }
.lsm__q { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.lsm__q--focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus-ring); }
.lsm__q-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; width: 100%; border: none; background: none; cursor: pointer; text-align: left; padding: 0; }
.lsm__q-no { font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.lsm__dot-sep { color: var(--faint-2); }
.lsm__q-status--correct { color: #10b981; font-weight: 700; }
.lsm__q-status--half { color: #d99a07; font-weight: 700; }
.lsm__q-status--wrong { color: #ef4444; font-weight: 700; }
.lsm__q-status--skip { color: var(--faint); font-weight: 700; }
.lsm__q-status--review { color: var(--brand-ink); font-weight: 700; }
.lsm__q-spacer { flex: 1; }
.lsm__q-type { border: 1px solid var(--line); border-radius: 8px; padding: 4px 9px; font-weight: 600; color: var(--ink-3); }
.lsm__q-pts { color: #d99a07; font-weight: 700; }
.lsm__chev { transition: transform .15s; color: var(--faint); }
.lsm__chev--open { transform: rotate(180deg); }
.lsm__q-prompt { font-size: 14px; font-weight: 600; margin: 10px 0 0; }
.lsm__q--open .lsm__q-prompt { margin-bottom: 10px; }
.lsm__opts { margin-top: 8px; }
.lsm__pick { font-size: 10.5px; font-weight: 700; color: var(--brand-ink); background: var(--tint-brand); border-radius: 20px; padding: 2px 8px; margin-left: auto; }
.lsm__noanswer { margin-top: 10px; font-size: 13px; color: var(--faint); font-style: italic; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }

/* /reports/learners */
.rlearn { padding: 4px 2px 40px; }
.rlearn__h1 { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
.rlearn__tabs { margin-bottom: 18px; }
.rlearn__empty { margin-top: 30px; }
.rlearn__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.rcard { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 18px; }
.rcard__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.rcard__head h2 { font-size: 15px; font-weight: 800; }
.rcard__info { color: var(--muted); font-weight: 600; font-size: 12px; }
.rlearn__activity { grid-row: span 2; }
.rlearn__pill { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rlearn__big { font-size: 34px; font-weight: 800; }
.rlearn__big-unit { font-size: 14px; font-weight: 600; color: var(--muted); }
.rlearn__delta { color: #10b981; font-size: 13px; font-weight: 700; margin-top: 6px; }
.rlearn__divisions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; margin-top: 16px; }
.rlearn__div { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.rlearn__div-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rlearn__div-name { color: var(--muted); }
.rlearn__div-count { font-weight: 700; margin-left: auto; }

.rlearn__feedtabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 8px; }
.rlearn__feedtab { font-size: 13px; color: var(--muted); cursor: pointer; }
.rlearn__feedtab--on { color: var(--ink, var(--ink)); font-weight: 700; border-bottom: 2px solid var(--brand); padding-bottom: 8px; margin-bottom: -11px; }
.rlearn__feedgroup { font-size: 12px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
.rlearn__act { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.rlearn__avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; }
.rlearn__avatar--sm { width: 26px; height: 26px; font-size: 11px; }
.rlearn__act-body { flex: 1; min-width: 0; }
.rlearn__act-text { font-size: 13px; line-height: 1.45; }
.rlearn__act-subj { color: var(--brand-ink); }
.rlearn__pts { font-weight: 700; color: #d99a07; }
.rlearn__act-time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.rlearn__weekly { grid-column: 1; }
.rlearn__legend { display: flex; gap: 16px; margin-bottom: 8px; }
.rlearn__leg { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.rlearn__leg-line { width: 16px; height: 2px; border-radius: 2px; }
.rlearn__leg-line--brand { background: #5b5ef0; }
.rlearn__leg-line--muted { background: var(--surface-4); }
.rlearn__chart { height: 150px; display: flex; flex-direction: column; }
.rlearn__svg { width: 100%; height: 130px; }
.rlearn__axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); }

.rlearn__matable { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.rlearn__macol--right { text-align: right; }
.rlearn__marow { display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; gap: 12px; padding: 10px 0; }
.rlearn__maname { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rlearn__mabar { display: flex; align-items: center; gap: 8px; }
.rlearn__mabar-fill { height: 18px; border-radius: 6px; background: #5aa6f7; min-width: 4px; }
.rlearn__mahrs { font-size: 12px; color: var(--muted); white-space: nowrap; }

@media (max-width: 900px) { .rlearn__grid { grid-template-columns: 1fr; } .rlearn__activity { grid-row: auto; } }

/* /reports/quiz — active quizzes list */
.rquiz { padding: 4px 2px 40px; }
.rquiz__h1 { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
.rquiz__tabs { margin-bottom: 18px; }
.rquiz__empty { margin-top: 30px; }
.rquiz__toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rquiz__status { border: none; background: none; font-size: 15px; font-weight: 800; cursor: pointer; }
.rquiz__status-n { color: var(--muted); font-weight: 600; }
.rquiz__table th { font-size: 12.5px; color: var(--muted); font-weight: 700; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.rquiz__table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 13.5px; }
.rquiz__row { cursor: pointer; }
.rquiz__row:hover { background: var(--surface-2); }
.rquiz__name { display: flex; align-items: center; gap: 12px; }
.rquiz__ico { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.rquiz__title { font-weight: 700; }
.rquiz__sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.rquiz__mode { letter-spacing: .04em; font-weight: 700; }
.rquiz__review { color: #d99a07; font-weight: 700; }
.rquiz__learners { font-weight: 700; color: var(--ink-2); }
.rquiz__acc { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.rquiz__muted { color: var(--muted); }
.qstatus { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; border-radius: 20px; padding: 4px 11px; }
.qstatus--done { background: var(--tint-success); color: #10b981; }
.qstatus--prog { background: var(--tint-warn); color: #d99a07; }

/* notifications popup */
.notif-wrap { position: relative; }
.notif-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; }
.icon-btn { position: relative; }
.icon-btn__badge { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid var(--surface); }

.notif { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: 380px; max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(17,17,40,.18); }
.notif__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); border-radius: 16px 16px 0 0; }
.notif__title { font-size: 16px; font-weight: 800; }
.notif__markread { border: none; background: none; color: var(--brand-ink); font-weight: 700; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.notif__loading, .notif__empty { padding: 28px; text-align: center; color: var(--muted); font-size: 14px; }
.notif__list { padding: 6px 0 10px; }
.notif__group { padding: 12px 18px 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.notif__item { display: flex; gap: 12px; padding: 12px 18px; position: relative; }
.notif__item--unread { background: var(--surface-2); }
.notif__item--link { cursor: pointer; }
.notif__item--link:hover { background: var(--tint-brand); }
.notif__ico { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; color: #fff; }
.notif__body { flex: 1; min-width: 0; }
.notif__text { font-size: 13.5px; line-height: 1.45; }
.notif__time { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.notif__dot { position: absolute; left: 8px; top: 18px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.notif__extra { margin-top: 8px; }
.notif__points { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; background: var(--tint-warn); border-radius: 8px; padding: 6px 10px; }
.notif__coin { font-weight: 800; color: #d99a07; }
.notif__file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.notif__file-ico { font-size: 18px; }
.notif__file-info { flex: 1; display: flex; flex-direction: column; }
.notif__file-name { font-size: 12.5px; font-weight: 700; }
.notif__file-size { font-size: 11px; color: var(--muted); }
.notif__file-dl { color: var(--brand-ink); cursor: pointer; }
.notif__reply { font-size: 12.5px; color: var(--ink-3); background: var(--surface-3); border-radius: 10px; padding: 8px 10px; line-height: 1.4; }

/* favorites */
.ccard__fav { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; display: grid; place-items: center; border: none; border-radius: 50%; background: var(--glass); color: var(--muted); cursor: pointer; transition: transform .12s, color .12s, background .12s; }
.ccard__fav:hover { transform: scale(1.1); background: var(--surface); }
.ccard__fav--on { color: #ef4444; }
.btn--fav-on { color: #ef4444; border-color: var(--danger-line); }

.favpage__head { margin-bottom: 18px; }
.favpage__head h1 { font-size: 22px; font-weight: 800; }
.favpage__sub { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* rich empty state with call-to-action */
.emptystate { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 60px 20px; color: var(--muted); }
.emptystate__art { color: var(--faint-2); }
.emptystate__text { font-size: 14.5px; max-width: 360px; line-height: 1.5; }
.emptystate .btn { padding: 11px 22px; }

/* profile sidebar — badges & certificates */
.psb__badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 2px; }
.psb__badge { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 16px; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.psb__empty { font-size: 12px; color: var(--muted); padding: 4px 2px 8px; line-height: 1.4; }

/* /achievements */
.ach { max-width: 920px; margin: 0 auto; padding: 26px 20px 60px; }
.ach__head { margin-bottom: 22px; }
.ach__head h1 { font-size: 24px; font-weight: 800; }
.ach__sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.ach__section { margin-bottom: 34px; }
.ach__section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ach__section-head h2 { font-size: 16px; font-weight: 800; }
.ach__count { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--surface-3); border-radius: 20px; padding: 4px 12px; }

.badgegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.badge--locked .badge__medal { opacity: .55; filter: grayscale(.7); }
.badge__medal { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.badge__icon { font-size: 30px; line-height: 1; }
.badge__lock { position: absolute; right: -2px; bottom: -2px; font-size: 16px; background: var(--surface); border-radius: 50%; padding: 1px; }
.badge__name { font-size: 13.5px; font-weight: 700; margin-top: 4px; }
.badge__desc { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.badge__earned { font-size: 11px; font-weight: 700; color: #10b981; margin-top: 2px; }
.badge__earned--locked { color: var(--muted); }

.certlist { display: flex; flex-direction: column; gap: 12px; }
.cert { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cert__ribbon { width: 52px; height: 52px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 24px; color: #fff; }
.cert__body { flex: 1; min-width: 0; }
.cert__title { font-size: 15px; font-weight: 700; }
.cert__meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.cert__code { font-family: ui-monospace, monospace; }
.cert__view { flex: none; white-space: nowrap; }

/* /profile */
.profilepage { max-width: 560px; margin: 0 auto; padding: 26px 20px 60px; }
.profilepage__h1 { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.profilecard { padding: 22px; }
.profilecard__head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.profilecard__avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--brand-fg); display: grid; place-items: center; font-size: 20px; font-weight: 800; flex: none; }
.profilecard__name { font-size: 18px; font-weight: 800; }
.profilecard__role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profilecard__fields { margin: 18px 0; display: flex; flex-direction: column; gap: 14px; }
.profilecard__fields div { display: flex; justify-content: space-between; gap: 16px; }
.profilecard__fields dt { font-size: 13px; color: var(--muted); margin: 0; }
.profilecard__fields dd { font-size: 13.5px; font-weight: 600; margin: 0; text-align: right; }
.profilecard__signout { display: inline-flex; align-items: center; gap: 8px; color: var(--danger-ink); }
.cstep__timed { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: var(--brand-ink); background: var(--tint-brand); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.cstep__reorder { display: inline-flex; flex-direction: column; line-height: 0.8; }
.cstep__reorder .iconbtn { padding: 0 4px; font-size: 12px; }
.cstep__reorder .iconbtn:disabled { opacity: .3; cursor: default; }
.take__body { flex: 1; overflow: auto; max-width: 680px; width: 100%; margin: 0 auto; padding: 26px 20px 60px; }
.take__q { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; }
.take__qhead { font-size: 16px; font-weight: 700; margin-bottom: 14px; display: flex; gap: 10px; align-items: baseline; }
.take__qno { width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--tint-brand); color: var(--brand-ink); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.take__submit { display: flex; justify-content: flex-end; margin-top: 8px; }
.take__submit .btn { padding: 11px 28px; }
.take__result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.take__result h1 { font-size: 24px; font-weight: 800; }
.take__score { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; margin: 30px 0 10px; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); }
.take__score span { width: 100px; height: 100px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 26px; font-weight: 800; }
.take__resultmeta { color: var(--muted); font-size: 14px; }
.take__resultactions { display: flex; gap: 10px; margin-top: 18px; justify-content: center; }
.take__bar { height: 6px; background: var(--surface-3); max-width: 680px; margin: 0 auto; border-radius: 4px; overflow: hidden; }
.take__bar span { display: block; height: 100%; background: var(--brand); transition: width .25s; }
.take__qmeta { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.take__navrow { display: flex; justify-content: space-between; margin-top: 18px; }
.take__navrow .btn { padding: 10px 22px; }
.take__reviewhead { font-size: 15px; font-weight: 800; margin: 26px 0 14px; }
.rvq { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.rvq__head { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.rvq__prompt { flex: 1; }
.rvq__time { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-3); border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.rvq__badge { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; }
.rvq__badge--ok { background: #10b981; }
.rvq__badge--no { background: #ef4444; }

/* ================= Author dashboard ================= */
.adash__quick { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 22px; }
.aquick { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.aquick:hover { border-color: var(--tint-brand-line); }
.aquick__ico { width: 22px; height: 22px; border-radius: 6px; color: #fff; display: grid; place-items: center; font-size: 11px; }
.aquick__plus { color: var(--muted); }
.adash__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.adash__main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.adash__row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.acard__week { font-size: 12.5px; color: var(--muted); }
.acard__issued { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0 14px; }
.acard__kicker { font-size: 11px; font-weight: 700; color: var(--brand-ink); }
.acard__title { font-size: 14px; font-weight: 700; margin-top: 6px; max-width: 180px; }
.acard__delta { font-size: 12px; color: #10b981; font-weight: 600; }
.acard__issuedright { text-align: right; }
.acard__big { font-size: 24px; font-weight: 800; }
.acard__big span { font-size: 12px; font-weight: 600; color: var(--muted); }
.acard__spark { width: 110px; height: 34px; }
.acard__link { font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.acard__link:hover { color: var(--ink); }
.acard__assign { display: flex; align-items: baseline; justify-content: space-between; margin: 10px 0; }
.acard__remaining { font-size: 12.5px; color: var(--muted); }
.aprogress { height: 8px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin-bottom: 14px; }
.aprogress span { display: block; height: 100%; background: var(--brand); border-radius: 5px; }

.agauge-wrap { display: flex; align-items: center; gap: 20px; padding: 8px 0; }
.agauge { width: 150px; height: 150px; border-radius: 50%; flex: none; display: grid; place-items: center; }
.agauge__hole { width: 104px; height: 104px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; }
.agauge__label { display: block; font-size: 11px; color: var(--muted); }
.agauge__num { display: block; font-size: 26px; font-weight: 800; }
.alegend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.alegend li { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.alegend b { margin-left: auto; color: var(--ink); }
.alegend__dot { width: 9px; height: 9px; border-radius: 3px; }

.atop { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.atop__row { display: flex; align-items: center; gap: 10px; }
.atop__rank { width: 22px; font-size: 13px; font-weight: 700; color: var(--muted); }
.atop__avatar { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.atop__avatar--sm { width: 26px; height: 26px; font-size: 10px; }
.atop__id { flex: 1; display: flex; flex-direction: column; }
.atop__name { font-size: 13.5px; font-weight: 700; }
.atop__role { font-size: 11px; color: var(--muted); }
.atop__pts { font-size: 12.5px; font-weight: 700; color: var(--warn-ink); }

.atable { width: 100%; border-collapse: collapse; }
.atable th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.atable td { padding: 12px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.atable tr:last-child td { border-bottom: none; }
.atable__no { color: var(--muted); width: 24px; }
.atable__qt { font-weight: 600; }
.atable__open { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.atable__learner { display: inline-flex; align-items: center; gap: 8px; }
.atable__grade { padding: 6px 14px; font-size: 12.5px; }

.adash__side { display: flex; flex-direction: column; gap: 18px; }
.atodo__add { display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer; color: var(--brand-ink); font-size: 13px; font-weight: 600; padding: 6px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.atodo__viewall { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.atodo__item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.atodo__check { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-radius: 50%; flex: none; margin-top: 2px; cursor: pointer; background: none; display: grid; place-items: center; font-size: 11px; line-height: 1; color: #fff; padding: 0; }
.atodo__check:hover { border-color: var(--brand); }
.atodo__check--done { background: var(--brand); border-color: var(--brand); }
.atodo__title { font-size: 13.5px; font-weight: 600; }
.atodo__flag { color: #ef4444; }
.atodo__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.atodo__due { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.atodo__due--over { color: #ef4444; font-weight: 600; }
.atodo__form { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.atodo__form .fld__input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; background: var(--surface); color: var(--ink); }
.atodo__form .fld__input:focus { border-color: var(--brand); }
.atodo__formrow { display: flex; gap: 8px; align-items: center; }
.atodo__date { flex: 1; color: var(--muted); }
.atodo__flagchk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; white-space: nowrap; user-select: none; }
.atodo__flagchk input { accent-color: var(--brand); }
.atodo__formbtns { display: flex; justify-content: flex-end; gap: 8px; }

/* /tasks full page */
.taskpage { max-width: 760px; margin: 0 auto; padding: 26px 20px 60px; }
.taskpage__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.taskpage__head h1 { font-size: 22px; font-weight: 800; }
.taskpage__toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.taskpage__head-actions { display: inline-flex; align-items: center; gap: 14px; }

/* reusable right-hand slide-over panel */
.slideover-backdrop { position: fixed; inset: 0; z-index: 1190; background: rgba(17,17,31,.35); animation: cdlgFade .2s ease; }
.slideover { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1191; width: 380px; max-width: 92vw; background: var(--surface); box-shadow: -16px 0 50px rgba(17,17,40,.18); display: flex; flex-direction: column; animation: slideoverIn .22s cubic-bezier(.4,0,.2,1); }
@keyframes slideoverIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.slideover__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.slideover__head h2 { font-size: 17px; font-weight: 800; }
.slideover__body { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.slideover__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); }
.taskpage__compose { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px; margin-bottom: 18px; }
.taskpage__compose .fld__input { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; background: var(--surface); color: var(--ink); }
.taskpage__compose .fld__input:focus { border-color: var(--brand); }
.taskpage__date { flex: 0 0 auto; min-width: 0; color: var(--muted); }
.tasklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.taskrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.taskrow__body { flex: 1; min-width: 0; }
.taskrow__title { font-size: 14px; font-weight: 600; }
.taskrow--done .taskrow__title { text-decoration: line-through; color: var(--muted); }
.taskrow__due { font-size: 12px; color: var(--muted); white-space: nowrap; }
.taskrow--editing { padding: 14px; }
.taskedit { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.taskedit .fld__input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 14px; font-family: inherit; outline: none; background: var(--surface); color: var(--ink); }
.taskedit .fld__input:focus { border-color: var(--brand); }
.taskedit__row { display: flex; align-items: center; gap: 8px; }
.taskedit__spacer { flex: 1; }
.taskpage__more { display: flex; justify-content: center; margin-top: 16px; }
.aupgrade { background: linear-gradient(160deg, var(--tint-warn), var(--tint-warn)); border-color: var(--warn-line); }
.aupgrade__title { font-size: 17px; font-weight: 800; }
.aupgrade__price { font-size: 24px; font-weight: 800; margin: 6px 0 14px; }
.aupgrade__price span { font-size: 13px; font-weight: 600; color: var(--muted); }
.aupgrade__feats { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.aupgrade__hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.aupgrade__btn { width: 100%; justify-content: center; background: #f59e0b; color: #fff; }
.aupgrade__btn:hover { background: #e08c06; }

@media (max-width: 1100px) { .adash__grid { grid-template-columns: 1fr; } .adash__row2 { grid-template-columns: 1fr; } }

/* ================= Classes ================= */
.raillayout { display: flex; min-height: 100vh; }
.raillayout__main { flex: 1; min-width: 0; background: var(--bg); overflow: auto; }
.clspage { max-width: 1100px; padding: 24px 28px 60px; }
.clspage__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.clspage__head h1 { font-size: 24px; font-weight: 800; }
.clspage__actions { display: flex; gap: 10px; align-items: center; }
.clsjoin { display: flex; gap: 6px; }
.clsjoin__input { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font-size: 13px; width: 150px; outline: none; }
.clsmsg { background: var(--tint-brand); color: var(--brand-ink); border: 1px solid var(--tint-brand-line); border-radius: 9px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.clsmsg--err { background: var(--tint-danger); color: var(--danger-ink); border-color: var(--danger-line); }
.clscreate { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; padding: 14px; }
.clscreate .fld__input { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 14px; outline: none; }
.clssec { margin-bottom: 24px; }
.clssec__title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px; }
.clsgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.clscard { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); transition: box-shadow .15s, transform .15s; }
.clscard--clickable { cursor: pointer; }
.clscard--clickable:hover { box-shadow: 0 8px 24px rgba(20, 20, 40, .08); transform: translateY(-2px); }
.clscard__bar { height: 60px; }
.clscard__body { padding: 14px 16px; }
.clscard__body h3 { font-size: 15px; font-weight: 700; }
.clscard__teacher, .clscard__desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.clscard__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.clscard__pending { color: var(--warn-ink); font-weight: 700; }
.clscard__invite { font-size: 12.5px; color: var(--muted); margin: 8px 0; }
.clscard__actions { display: flex; gap: 8px; }

.clsdetail { max-width: 1100px; padding-bottom: 60px; }
.clsdetail__head { display: flex; align-items: flex-start; gap: 16px; padding: 28px; color: #fff; }
.clsdetail__head h1 { font-size: 24px; font-weight: 800; }
.clsdetail__teacher { font-size: 13px; opacity: .9; margin-top: 4px; }
.clsdetail__desc { font-size: 13px; opacity: .85; margin-top: 8px; max-width: 600px; }
.clsdetail__back { background: var(--glass); border: none; color: #fff; font-size: 16px; }
.clsdetail__code { margin-left: auto; text-align: right; font-size: 11px; opacity: .9; }
.clsdetail__code b { font-size: 18px; letter-spacing: 2px; }
.clsbanner { display: flex; align-items: center; gap: 12px; background: var(--tint-brand); border-bottom: 1px solid var(--tint-brand-line); padding: 12px 28px; font-size: 13.5px; }
.clsbanner--muted { background: var(--surface-3); color: var(--muted); }
.clsprogress { padding: 14px 28px; }
.clsprogress .aprogress { margin-top: 8px; max-width: 420px; }
.clsdetail__grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; padding: 20px 28px; align-items: start; }

.cjourney { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cstep { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.cstep__no { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); color: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cstep__no--done { background: #10b981; border-color: #10b981; color: #fff; }
.cstep__ico { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; color: #fff; }
.cstep__title { flex: 1; font-size: 14px; font-weight: 600; }
.cstep__type { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.cjourney__add { margin-top: 12px; }
.cpick { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow: auto; }
.cpick__item { display: flex; align-items: center; gap: 10px; border: none; background: transparent; padding: 8px; border-radius: 8px; cursor: pointer; text-align: left; font-size: 13px; }
.cpick__item:hover { background: var(--surface-3); }
.cpick__ico { width: 26px; height: 26px; flex: none; border-radius: 7px; display: grid; place-items: center; color: #fff; font-size: 11px; }
.cpick__plus { margin-left: auto; color: var(--brand-ink); font-weight: 700; }

.clsinvite { display: flex; gap: 8px; margin-bottom: 14px; }
.clsinvite .fld__input { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 13px; outline: none; }
.croster { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.croster__row { display: flex; align-items: center; gap: 10px; }
.croster__avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.croster__id { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.croster__name { font-size: 13.5px; font-weight: 700; }
.croster__role { font-size: 11px; color: var(--muted); }
.croster__done { font-size: 12px; color: var(--muted); }
.croster__status { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.croster__status--active { background: var(--tint-success); color: #10b981; }
.croster__status--invited { background: var(--tint-brand); color: var(--brand-ink); }
.croster__status--requested { background: var(--tint-warn); color: var(--warn-ink); }
.croster__btn { padding: 5px 12px; font-size: 12px; }

@media (max-width: 1000px) { .clsgrid { grid-template-columns: 1fr 1fr; } .clsdetail__grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .clsgrid { grid-template-columns: 1fr; } }

.acc--teal { background: linear-gradient(135deg, #2dd4bf, #22b8c2); }
.btn { display: inline-flex; align-items: center; gap: 6px; }

/* ================= Workspace shell (icon rail + sidebar) ================= */
.ws { display: flex; align-items: stretch; min-height: 100vh; }
.ws__col { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.ws__body { flex: 1; min-width: 0; display: flex; overflow: hidden; }

.rail { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0; }
.rail__logo { color: var(--brand-ink); margin-bottom: 8px; display: grid; place-items: center; }
.rail__group { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; }
.rail__group + .rail__group { border-top: 1px solid var(--line); }
.rail__btn { width: 40px; height: 40px; border: none; background: transparent; color: var(--faint); border-radius: 11px; display: grid; place-items: center; cursor: pointer; }
.rail__btn:hover { background: var(--surface-3); color: var(--ink); }
.rail__btn.active { background: var(--tint-brand); color: var(--brand-ink); }
.rail__spacer { flex: 1; }
.rail__fab { width: 40px; height: 40px; border: none; color: #fff; border-radius: 12px; display: grid; place-items: center; cursor: pointer; font-size: 20px; font-weight: 500; }
.rail__fab--brand { background: var(--brand); }
.rail__fab--amber { background: #f59e0b; }
.rail__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--warn-line); color: var(--warn-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; margin-top: 6px; }

.wsbar { width: 248px; flex: none; height: 100%; overflow: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; }
.wsbar__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wsbar__title { font-size: 15px; font-weight: 700; }
.wsbar__collapse { border: none; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.wsmenu { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wsmenu a, .wslist a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); text-decoration: none; }
.wsmenu a:hover, .wslist a:hover { background: var(--surface-3); }
.wsmenu a.active, .wslist a.active { background: var(--tint-brand); color: var(--brand-ink); font-weight: 700; }
.wsmenu a.active .wsgroup__count { background: var(--surface); }
.wsmenu__ico { width: 18px; text-align: center; font-size: 13px; }
.wsgroup { margin-bottom: 10px; }
.wsgroup__head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 12px; font-weight: 700; color: var(--muted); }
.wsgroup__count { color: var(--faint-2); font-weight: 600; }
.wsgroup__add, .wsgroup__chev { color: var(--faint-2); cursor: pointer; }
.wslist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.wslist a.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.dot--blue { background: #5aa6f7; }
.dot--purple { background: #7c6cf5; }
.dot--amber { background: #f6b24b; }
.dot--pink { background: #ec4899; }
.wsbar__spacer { flex: 1; min-height: 16px; }
.promo { background: linear-gradient(160deg, var(--surface-2), var(--tint-brand)); border: 1px solid var(--tint-brand-line); border-radius: 14px; padding: 14px; text-align: center; }
.promo__hat { font-size: 20px; }
.promo__title { font-size: 13.5px; font-weight: 700; margin-top: 6px; }
.promo__text { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.promo__btn { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; }

.ws__main { flex: 1; min-width: 0; background: var(--bg); height: 100%; overflow: auto; }

/* ================= Content list page ================= */
.content-page { max-width: 1180px; padding: 18px 28px 50px; }
.cphead { display: flex; justify-content: space-between; align-items: center; padding: 8px 0 16px; }
.cphead__title { display: flex; align-items: center; gap: 10px; }
.cphead__avatar { width: 30px; height: 30px; border-radius: 8px; background: #ec4899; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.cphead h1 { font-size: 18px; font-weight: 800; }
.cphead__members { display: flex; align-items: center; margin-left: 6px; }
.member { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-4); color: var(--ink-3); display: grid; place-items: center; font-size: 11px; font-weight: 700; border: 2px solid var(--surface); margin-left: -7px; }
.member--rf { background: var(--tint-brand-2); color: var(--brand-ink); }
.member--add { background: var(--surface); border: 1px dashed var(--line-strong); color: var(--faint); }
.cphead__actions { display: flex; gap: 10px; }

.ctabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.ctab { border: none; background: transparent; padding: 11px 2px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ctab:hover { color: var(--ink); }
.ctab--active { color: var(--brand-ink); border-bottom-color: var(--brand); }

.cfilters { display: flex; align-items: center; gap: 12px; padding: 16px 0; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 8px; background: var(--tint-brand); color: var(--brand-ink); border: 1px solid var(--tint-brand-line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; }
.fchip__x { border: none; background: transparent; color: var(--brand-ink); cursor: pointer; font-size: 11px; }
.cfilters__link { border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.cfilters__link:hover { color: var(--ink); }
.cfilters__spacer { flex: 1; }
.cfilters__sort { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.vtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.vtoggle__btn { border: none; background: var(--surface); padding: 7px 9px; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.vtoggle__btn--on { background: var(--brand); color: var(--brand-fg); }

.ccount { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.ccount__num { font-size: 13px; font-weight: 600; color: var(--muted); }
.csearch { display: flex; align-items: center; gap: 8px; flex: 0 1 300px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--surface); color: var(--muted); }
.csearch input { border: none; outline: none; width: 100%; background: transparent; color: var(--ink); font-size: 13px; }

.cgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cgrid--list { grid-template-columns: 1fr; }
.cgrid-loading { padding: 60px; text-align: center; color: var(--muted); }

.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.ccard:hover { box-shadow: 0 8px 24px rgba(20, 20, 40, .08); transform: translateY(-2px); }
.ccard__art { position: relative; height: 128px; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.ccard__art--img { background-size: cover; background-position: center; }
.ccard__badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; background: rgba(17, 17, 31, .58); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 8px; }
.ccard__badge--draft { left: auto; right: 10px; background: var(--glass); color: var(--brand-ink); }
.ccard__body { padding: 14px 16px; }
.ccard__title { font-size: 14px; font-weight: 700; line-height: 1.35; min-height: 38px; margin-bottom: 12px; }
.ccard__metrics { display: flex; gap: 14px; margin-bottom: 14px; }
.metric { display: flex; align-items: center; gap: 9px; flex: 1; }
.metric__ring { width: 32px; height: 32px; border-radius: 50%; flex: none; position: relative; background: conic-gradient(#10b981 calc(var(--p) * 1%), var(--surface-4) 0); }
.metric__ring::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.metric__text { display: flex; flex-direction: column; }
.metric__label { font-size: 10.5px; color: var(--muted); }
.metric__val { font-size: 13px; font-weight: 700; }
.ccard__tags { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ccard__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ccard__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }
.ccard__meta { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.ccard__sep { color: var(--faint-2); }
.iconbtn { border: none; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; padding: 4px; border-radius: 7px; font-size: 16px; line-height: 1; }
.iconbtn:hover { background: var(--surface-3); color: var(--ink); }

@media (max-width: 1180px) { .cgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 920px) {
    .ws { grid-template-columns: 64px 1fr; }
    .wsbar { display: none; }
}
@media (max-width: 720px) { .cgrid { grid-template-columns: 1fr; } }

/* ================= Create-quiz wizard (full-screen) ================= */
.wz { position: fixed; inset: 0; z-index: 1000; background: var(--surface); display: flex; flex-direction: column; }
.wz__top { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.wz__left { display: flex; align-items: center; gap: 12px; }
.wz__x { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.wz__x:hover { background: var(--surface-3); }
.wz__brand { font-size: 15px; font-weight: 700; }
.wz__mid { flex: 1; display: flex; justify-content: center; }
.wz__steplabel { font-size: 14px; color: var(--muted); }
.wz__steplabel b { color: var(--ink); }
.wz__right { display: flex; align-items: center; gap: 12px; }
.wz__next { font-size: 13px; color: var(--muted); }
.wz__collapse { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.wz__continue:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }

.wz__bar { display: flex; gap: 4px; padding: 0 18px; }
.wz__seg { flex: 1; height: 3px; border-radius: 3px; background: var(--surface-3); }
.wz__seg--on { background: var(--brand); }

.wz__body { flex: 1; overflow: auto; padding: 32px 20px 60px; }
.wz__panel { max-width: 540px; margin: 0 auto; }

.wzthumb { position: relative; height: 190px; border-radius: 14px; margin-bottom: 30px; }
.wzthumb--review { height: 150px; margin-bottom: 18px; }
.wzthumb__update { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink); }
.wzthumb__icon { position: absolute; left: 18px; bottom: -22px; width: 48px; height: 48px; border-radius: 12px; background: #ec4899; color: #fff; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(236, 72, 153, .35); }
.wzthumb__pop { position: absolute; right: 12px; bottom: 52px; width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(20, 20, 40, .16); padding: 14px; z-index: 5; }
.wzthumb__tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.wzthumb__tabs button { border: none; background: transparent; padding: 6px 2px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.wzthumb__tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.wzthumb__gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wzthumb__swatch { height: 54px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; }
.wzthumb__swatch.on { border-color: var(--ink); }
.wzthumb__drop { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); }
.wzthumb__drop-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-top: 6px; }
.wzthumb__drop-hint { font-size: 11.5px; margin: 4px 0 12px; }

.wz__title { width: 100%; border: none; outline: none; font-size: 24px; font-weight: 800; color: var(--ink); padding: 0; margin-bottom: 18px; }
.wz__title::placeholder { color: var(--faint-2); }

.wzfields { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.wzfield { display: flex; align-items: flex-start; gap: 16px; padding: 6px 0; }
.wzfield__label { width: 150px; flex: none; font-size: 13.5px; font-weight: 600; color: var(--ink-3); padding-top: 6px; }
.wzfield__val { position: relative; flex: 1; }
.wzfield__empty { border: none; background: transparent; color: var(--muted); font-size: 13.5px; cursor: pointer; padding: 6px 0; }
.wzfield__val--inline { display: flex; align-items: center; gap: 8px; }
.wzfield__num { width: 80px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 13.5px; }
.wzfield__unit { font-size: 13.5px; color: var(--muted); }
.wzfield__select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13.5px; background: var(--surface); color: var(--ink); min-width: 200px; }
.wzfield__chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.wzfield__addchip { width: 24px; height: 24px; border: 1px dashed var(--line-strong); background: var(--surface); border-radius: 7px; color: var(--muted); cursor: pointer; }
.wzdrop { position: absolute; top: 100%; left: 0; margin-top: 6px; width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(20, 20, 40, .14); padding: 6px; z-index: 5; display: flex; flex-direction: column; gap: 2px; }
.wzdrop__item { text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--ink-3); }
.wzdrop__item:hover { background: var(--surface-3); }
.wzdrop__item.on { background: var(--surface-2); color: var(--brand-ink); font-weight: 600; }

.wzdesc { position: relative; border-bottom: 1px solid var(--line); }
.wzdesc__input { width: 100%; border: none; outline: none; resize: vertical; min-height: 56px; font-size: 14px; font-family: inherit; color: var(--ink); padding: 6px 50px 6px 0; }
.wzdesc__count { position: absolute; right: 0; top: 6px; font-size: 12px; color: var(--faint-2); }
.wzdesc__hint { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

/* step 2 */
.wzsum { padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.wzsum__kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.wzsum__icon { width: 22px; height: 22px; border-radius: 6px; background: #ec4899; color: #fff; display: grid; place-items: center; }
.wzsum__title { font-size: 19px; font-weight: 800; margin: 8px 0; }
.wzsum__desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.wzsum__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); }
.wzsum__dot { color: var(--faint-2); }

.wzq__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wzq__head h3 { font-size: 15px; font-weight: 700; }
.wzq__setby { font-size: 13px; color: var(--muted); }
.wzq__add { width: 100%; border: 1.5px dashed var(--line-strong); background: var(--surface-2); color: var(--brand-ink); border-radius: 12px; padding: 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; margin-top: 12px; }
.wzq__add:hover { background: var(--surface-2); }

.qcard { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.qcard__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.qcard__num { width: 24px; height: 24px; flex: none; border-radius: 7px; background: var(--surface-2); color: var(--brand-ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.qcard__text { flex: 1; border: none; outline: none; font-size: 14px; font-weight: 600; color: var(--ink); }
.qcard__options { display: flex; flex-direction: column; gap: 8px; padding-left: 34px; }
.qopt { display: flex; align-items: center; gap: 10px; }
.qopt__text { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none; }
.qopt--correct .qopt__text { border-color: #10b981; background: var(--tint-success); }
.qcard__addopt { align-self: flex-start; border: none; background: transparent; color: var(--brand-ink); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 4px 0; }

.wzreview { margin-top: 20px; padding: 18px; background: var(--surface-2); border-radius: 14px; }
.wzreview h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.wzreview p { font-size: 13px; color: var(--muted); }

/* ================= Create-content dialog (slide up) ================= */
.cdlg__backdrop { position: fixed; inset: 0; z-index: 1100; background: rgba(17, 17, 31, .35); display: grid; place-items: center; padding: 20px; animation: cdlgFade .2s ease; }
.cdlg { width: 660px; max-width: 100%; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: 0 28px 70px rgba(17, 17, 31, .28); animation: cdlgSlideUp .3s cubic-bezier(.16, 1, .3, 1); }
@keyframes cdlgFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cdlgSlideUp { from { transform: translateY(48px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.cdlg__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 14px; }
.cdlg__title { font-size: 17px; font-weight: 800; }
.cdlg__x { width: 32px; height: 32px; border: none; background: transparent; color: var(--muted); border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.cdlg__x:hover { background: var(--surface-3); color: var(--ink); }

.cdlg__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 22px 4px; }
.cdlg__card { position: relative; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.cdlg__card:hover { border-color: var(--tint-brand-line); box-shadow: 0 8px 22px rgba(20, 20, 40, .07); transform: translateY(-2px); }
.cdlg__icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; margin-bottom: 12px; }
.cdlg__card-title { display: block; font-size: 14px; font-weight: 700; }
.cdlg__desc { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 6px; }
.cdlg__badge { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 7px; }
.cdlg__badge--ai { background: var(--tint-brand); color: var(--brand-ink); }
.cdlg__badge--new { background: #16161f; color: #fff; }

.cdlg__foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding: 16px 22px; margin-top: 12px; }

@media (max-width: 560px) { .cdlg__grid { grid-template-columns: 1fr; } }

/* ================= Reports page ================= */
.report { width: 100%; padding: 18px 28px 50px; }
.rephead { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 16px; }
.rephead__crumb { font-size: 14px; font-weight: 600; }
.rephead__crumb-muted { color: var(--muted); }
.rephead__crumb-sep { color: var(--faint-2); margin: 0 6px; }
.rephead__actions { display: flex; align-items: center; gap: 8px; }
.iconbtn--bordered { width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; }

.repbanner { display: flex; align-items: center; gap: 8px; background: var(--tint-warn); border: 1px solid var(--warn-line); border-radius: 12px; padding: 12px 16px; font-size: 13.5px; color: var(--warn-ink); margin-bottom: 18px; }
.repbanner__link { margin-left: 6px; color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.repinfo { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 20px; }
.repinfo__main { flex: 1; min-width: 0; }
.repinfo__status { display: flex; gap: 8px; margin-bottom: 10px; }
.repstatus { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.repstatus--live { background: var(--surface-3); color: var(--muted); }
.repstatus__dot { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.repstatus--done { background: var(--tint-success); color: #10b981; }
.repinfo__title { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.repinfo__tags { display: flex; gap: 8px; margin: 10px 0; }
.repinfo__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.repinfo__thumb { width: 320px; height: 160px; border-radius: 14px; display: grid; place-items: center; color: rgba(255, 255, 255, .9); flex: none; }
@media (max-width: 1000px) { .repinfo__thumb { display: none; } }

.repstats { display: flex; border: 1px solid var(--line); border-radius: 14px; padding: 6px 0; margin-bottom: 6px; }
.repstat { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.repstat--bordered { border-left: 1px solid var(--line); }
.repstat__ring { width: 42px; height: 42px; border-radius: 50%; flex: none; position: relative; background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--surface-3) 0); }
.repstat__ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.repstat__label { display: block; font-size: 12px; color: var(--muted); }
.repstat__val { display: block; font-size: 18px; font-weight: 800; }

.report__tabs { margin-top: 18px; }
.report__search { margin: 16px 0; }

.reptable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.reptable { border-collapse: collapse; width: 100%; min-width: 760px; }
.reptable th, .reptable td { padding: 12px 14px; text-align: left; white-space: nowrap; }
.reptable thead th { background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); }
.reptable tbody tr { border-bottom: 1px solid var(--line); }
.reptable tbody tr:last-child { border-bottom: none; }
.reptable__qh, .reptable__cell { text-align: center; }
.reptable__cell--click { cursor: pointer; }
.reptable__cell--click:hover { background: var(--surface-2); }
.reptable__sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 240px; }
.reptable thead .reptable__sticky { background: var(--surface-2); }
.passpill { display: inline-block; background: var(--surface-3); color: var(--muted); font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; margin-left: 4px; }

.learner { display: flex; align-items: center; gap: 10px; }
.learner__rank { width: 16px; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.learner__avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; flex: none; }
.learner__id { display: flex; flex-direction: column; }
.learner__name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.learner__dept { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 1px 7px; border-radius: 6px; }
.learner__role { font-size: 11.5px; color: var(--muted); }
.pointspill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--warn-ink); }
.cell { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; }
.cell--ok { background: #10b981; }
.cell--no { background: #ef4444; }

.repquestions { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.repq { display: flex; align-items: center; gap: 14px; }
.repq__no { width: 48px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.repq__bar { flex: 1; height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.repq__bar span { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.repq__pct { width: 46px; text-align: right; font-size: 13px; font-weight: 700; }

/* ================= Quiz editor ================= */
.ccard--clickable { cursor: pointer; }

.qed { position: fixed; inset: 0; background: var(--surface); display: flex; flex-direction: column; }
.qed__top { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.qed__top-left { flex: 1; display: flex; align-items: center; gap: 12px; }
.qed__back { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; display: grid; place-items: center; cursor: pointer; }
.qed__edited { font-size: 13px; color: var(--muted); }
.qed__top-mid { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 10px; }
.qed__top-mid--saved { animation: qedSaved 1.6s ease; }
@keyframes qedSaved {
    0% { background: transparent; box-shadow: none; }
    15% { background: var(--tint-success); box-shadow: 0 0 0 1px var(--success-line); }
    70% { background: var(--tint-success); box-shadow: 0 0 0 1px var(--success-line); }
    100% { background: transparent; box-shadow: none; }
}
.qed__title { border: none; outline: none; font-size: 15px; font-weight: 700; text-align: center; width: 300px; }
.qed__cloud { color: var(--muted); font-size: 13px; transition: color .2s; display: inline-block; }
.qed__cloud--saving { color: var(--brand-ink); animation: qedSpin 1s linear infinite; }
.qed__cloud--saved { color: #10b981; }
@keyframes qedSpin { to { transform: rotate(360deg); } }
.qed__top-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.qed__avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--warn-line); color: var(--warn-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; }

.qed__body { flex: 1; display: grid; grid-template-columns: 244px 1fr; overflow: hidden; }
.qed__list { border-right: 1px solid var(--line); background: var(--surface-2); padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.qed__list-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.qed__item { display: flex; align-items: flex-start; gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.qed__item--active { border-color: var(--tint-brand-line); box-shadow: 0 0 0 2px var(--tint-brand-line); }
.qed__item--dragover { border-color: var(--brand); border-style: dashed; background: var(--surface-2); }
.qed__grip { color: var(--faint-2); cursor: grab; font-size: 12px; line-height: 1.4; }
.qed__item:active .qed__grip { cursor: grabbing; }
.qed__item-no { width: 18px; font-size: 12px; font-weight: 700; color: var(--muted); }
.qed__item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qed__item-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qed__item-type { font-size: 11.5px; color: var(--muted); }
.qed__item-more { color: var(--faint-2); }
.qed__welcome { margin-top: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.qed__welcome-title { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.qed__welcome .fld__textarea { font-size: 13px; }
.qed__result { margin-top: auto; display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); }
.qed__result-title { font-size: 12.5px; font-weight: 700; }
.qed__result-sub { font-size: 11px; color: var(--muted); }

.qed__main { overflow: auto; padding: 18px 28px 50px; }
.qed__search { max-width: none; margin-bottom: 18px; }
.qed__create { text-align: center; margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--line); }
.qed__create-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.qed__create-actions { display: flex; gap: 12px; justify-content: center; }

.qe { border: 1px solid var(--line); border-radius: 16px; }
.qe__bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.qe__type { border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600; background: var(--surface); }
.qe__bar-right { display: flex; align-items: center; gap: 10px; }
.qe__required { font-size: 13px; color: var(--muted); }
.qe__body { padding: 16px; }
.qe__qnum { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.qe__req { color: #ef4444; }
.qe__prompt { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; margin: 10px 0 14px; }
.qe__fillactions { display: flex; gap: 10px; margin-bottom: 16px; }
.qe__addbtn { border: 1px dashed var(--line-strong); background: var(--surface); border-radius: 9px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.qe__addbtn:hover { background: var(--surface-2); }
.qe__opthead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.qe__optlabel { font-size: 13px; font-weight: 700; }
.qe__shuffled { font-size: 12px; color: var(--muted); }
.qe__chips { display: flex; flex-wrap: wrap; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.optchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--surface); }
.optchip--correct { border-color: var(--tint-brand-line); background: var(--tint-brand); }
.optchip__no { width: 16px; height: 16px; border-radius: 50%; background: #a855f7; color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.optchip__text { border: none; outline: none; font-size: 13px; font-weight: 600; background: transparent; min-width: 70px; width: 110px; }
.optchip__x { border: none; background: transparent; cursor: pointer; color: var(--faint-2); }
.qe__options { display: flex; flex-direction: column; gap: 8px; }
.qe__opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.qe__opt--correct { border-color: var(--success-line); background: var(--tint-success); }
.opt__grip { color: var(--faint-2); cursor: grab; font-size: 12px; flex: none; }
.opt__grip:active { cursor: grabbing; }
.qe__opt.opt--dragover, .optchip.opt--dragover, .qopt.opt--dragover { outline: 2px dashed var(--brand); outline-offset: 1px; }
.qe__opt-text { flex: 1; border: none; outline: none; font-size: 13.5px; background: transparent; }
.qe__settings { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 18px; }
.qe__setting-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.qe__setting-val { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 4px 10px; width: fit-content; }
.qe__setting-val input { width: 50px; border: none; outline: none; font-size: 14px; font-weight: 600; }
.qe__setting-unit { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.qe__setting-select { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-size: 13px; background: var(--surface); }

/* two-step "related lesson" picker */
.lpick { position: relative; }
.lpick__trigger { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 13px; background: var(--surface); cursor: pointer; text-align: left; }
.lpick__trigger:hover { border-color: var(--tint-brand-line); }
.lpick__trigger--open { border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus-ring); }
.lpick__current { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpick__caret { color: var(--muted); transition: transform .18s; }
.lpick__trigger--open .lpick__caret { transform: rotate(180deg); }
.lpick__backdrop { position: fixed; inset: 0; z-index: 60; }
.lpick__panel { position: absolute; z-index: 61; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(17,17,40,.16); overflow: hidden; transform-origin: top; animation: lpickIn .16s ease-out; }
@keyframes lpickIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.lpick__viewport { overflow: hidden; }
.lpick__rail { display: flex; width: 200%; transition: transform .26s cubic-bezier(.4,0,.2,1); }
.lpick__rail--step2 { transform: translateX(-50%); }
.lpick__step { width: 50%; flex: none; max-height: 280px; overflow-y: auto; padding: 6px; }
.lpick__opt { display: flex; align-items: center; gap: 8px; width: 100%; border: none; background: none; border-radius: 8px; padding: 9px 11px; font-size: 13px; cursor: pointer; text-align: left; color: var(--ink-2); }
.lpick__opt:hover { background: var(--surface-2); }
.lpick__opt-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpick__opt--sel { background: var(--tint-brand); color: var(--brand-ink); font-weight: 700; }
.lpick__opt--active .lpick__chev { color: var(--brand-ink); }
.lpick__opt--drill { justify-content: space-between; }
.lpick__chev { color: var(--faint-2); font-size: 16px; }
.lpick__back { display: flex; align-items: center; gap: 6px; width: 100%; border: none; background: none; border-bottom: 1px solid var(--line); padding: 8px 11px; margin-bottom: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; text-align: left; }
.lpick__back:hover { color: var(--brand-ink); }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__track { position: absolute; inset: 0; background: var(--surface-4); border-radius: 999px; cursor: pointer; transition: .2s; }
.switch__track::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--surface); border-radius: 50%; transition: .2s; }
.switch input:checked + .switch__track { background: #10b981; }
.switch input:checked + .switch__track::before { transform: translateX(16px); }

@media (max-width: 800px) { .qed__body { grid-template-columns: 1fr; } .qed__list { display: none; } }

/* Course editor: sections (left) + chapters (right) */
.qed__addsec { margin-top: 12px; }
.cedit__banner { display: flex; flex-direction: column; gap: 8px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.cedit__banner-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.cedit__banner-prev { position: relative; height: 110px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; color: #fff; }
.cedit__banner-prev img { width: 100%; height: 100%; object-fit: cover; }
.cedit__banner-actions { display: flex; align-items: center; gap: 8px; }
.cedit__banner-rm { padding: 6px 12px; font-size: 12.5px; color: #ef4444; }
.cedit__sechead { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cedit__sectitle { flex: 1; width: auto; text-align: left; font-size: 20px; }
.cedit__seccount { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.chcard { margin-bottom: 14px; }
.chcard__num { flex: 1; font-size: 12px; font-weight: 700; color: var(--muted); }
.chcard--dragover { outline: 2px dashed var(--brand); outline-offset: 2px; }

/* Chapter content blocks */
.blocks { display: flex; flex-direction: column; gap: 12px; }
.blk { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); }
.blk__bar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.blk__bar .iconbtn { margin-left: auto; }
.blk__grip { color: var(--faint-2); cursor: grab; font-size: 13px; flex: none; }
.blk__grip:active { cursor: grabbing; }
.blk--dragover { outline: 2px dashed var(--brand); outline-offset: 2px; border-radius: 12px; }
.blk__type { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.blk__url, .blk__caption { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: none; }
.blk__source { display: flex; gap: 8px; align-items: stretch; }
.blk__source .blk__url { flex: 1; }
.blk__upload { position: relative; overflow: hidden; display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--brand-ink); cursor: pointer; }
.blk__upload:hover { background: var(--surface-2); }
.blk__upload--busy { color: var(--muted); }
.blk__file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.blk__caption { margin-top: 8px; font-style: italic; color: var(--ink-3); }
.blk__error { margin: 6px 0; font-size: 12.5px; font-weight: 600; color: #ef4444; }
.blk__preview { margin: 8px 0; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.blk__preview img, .blk__preview video, .blk__preview iframe { display: block; width: 100%; max-height: 240px; object-fit: cover; border: none; }
.blk__preview iframe, .blk__preview video { aspect-ratio: 16 / 9; max-height: none; height: auto; }
.blk__preview .blk__pdf { aspect-ratio: auto; height: 460px; background: var(--surface); }
.blocks__add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.blocks__add-label { font-size: 12px; color: var(--muted); }
.blk-add { border: 1px dashed var(--line-strong); background: var(--surface); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.blk-add:hover { background: var(--surface-2); border-color: var(--tint-brand-line); color: var(--brand-ink); }

/* Rich-text editor */
.rte { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.rte__bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rte__btn { min-width: 28px; height: 28px; border: 1px solid transparent; background: transparent; border-radius: 7px; font-size: 12px; font-weight: 700; color: var(--ink-3); cursor: pointer; padding: 0 6px; }
.rte__btn:hover { background: var(--tint-brand); color: var(--brand-ink); }
.rte__btn--b { font-weight: 800; }
.rte__btn--i { font-style: italic; }
.rte__btn--u { text-decoration: underline; }
.rte__sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.rte__size { border: 1px solid var(--line); border-radius: 7px; padding: 4px 6px; font-size: 12px; background: var(--surface); }
.rte__swatch { width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.rte__area { min-height: 120px; padding: 12px 14px; font-size: 14px; line-height: 1.6; outline: none; }
.rte__area:focus { box-shadow: inset 0 0 0 2px var(--tint-brand-line); }
.rte__area h1 { font-size: 22px; font-weight: 800; margin: 8px 0; }
.rte__area h2 { font-size: 18px; font-weight: 700; margin: 8px 0; }
.rte__area p { margin: 6px 0; }

/* Player media blocks */
.cplay__rte { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.cplay__rte h1 { font-size: 22px; font-weight: 800; margin: 18px 0 10px; }
.cplay__rte h2 { font-size: 18px; font-weight: 800; margin: 18px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); display: inline-block; }
.cplay__rte p { margin-bottom: 14px; }
.cplay__rte ul { margin: 0 0 14px 20px; }
.cplay__fig { margin: 0 0 18px; }
.cplay__fig img, .cplay__video { width: 100%; border-radius: 14px; display: block; }
.cplay__video { aspect-ratio: 16 / 9; border: none; background: #000; }
.cplay__pdf { width: 100%; height: 80vh; min-height: 520px; border: 1px solid var(--line); border-radius: 14px; display: block; background: var(--surface); }
.cplay__fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }

/* ================= Student preview modal ================= */
.pv__backdrop { position: fixed; inset: 0; z-index: 1200; background: rgba(17, 17, 31, .45); display: grid; place-items: center; padding: 20px; animation: cdlgFade .2s ease; }
.pv { width: 620px; max-width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: 0 28px 70px rgba(17, 17, 31, .3); overflow: hidden; animation: cdlgSlideUp .3s cubic-bezier(.16, 1, .3, 1); }
.pv__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.pv__badge { background: var(--tint-brand); color: var(--brand-ink); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.pv__title { flex: 1; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv__progress { height: 4px; background: var(--surface-3); }
.pv__progress span { display: block; height: 100%; background: var(--brand); transition: width .25s; }
.pv__body { padding: 24px 22px; overflow: auto; }
.pv__qmeta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.pv__prompt { font-size: 18px; font-weight: 700; line-height: 1.5; margin-bottom: 20px; }
.pv__blank { display: inline-block; width: 70px; border-bottom: 2px solid var(--line-strong); margin: 0 4px; vertical-align: middle; }
.pv__blank--next { border-bottom-color: var(--brand); animation: pvBlankPulse 1.2s ease infinite; }
@keyframes pvBlankPulse { 0%, 100% { border-bottom-color: var(--brand); } 50% { border-bottom-color: var(--tint-brand-line); } }
.pv__blank--filled { width: auto; border: none; border-radius: 7px; padding: 2px 10px; font-weight: 700; font-size: 15px; background: var(--tint-brand); color: var(--brand-ink); cursor: pointer; }
.pv__blank--filled:hover:not(:disabled) { background: var(--tint-brand-2); }
.pv__blank--filled.ok { background: var(--tint-success); color: #10b981; }
.pv__blank--filled.no { background: var(--tint-danger); color: #ef4444; }
.pv__opt-no { width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--brand); color: var(--brand-fg); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.pv__options { display: flex; flex-direction: column; gap: 10px; }
.pv__opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px 16px; cursor: pointer; font-size: 14px; transition: border-color .12s, background .12s; }
.pv__opt:hover { border-color: var(--tint-brand-line); }
.pv__opt-marker { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; }
.pv__opt-text { flex: 1; }
.pv__opt--picked { border-color: var(--brand); background: var(--surface-2); }
.pv__opt--picked .pv__opt-marker { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 5px, var(--surface) 6px); }
/* Multi-select (more than one correct answer): square checkbox marker. */
.pv__opt--multi .pv__opt-marker { border-radius: 6px; }
.pv__opt--multi.pv__opt--picked .pv__opt-marker { background: var(--brand); }
.pv__opt--multi.pv__opt--correct .pv__opt-marker { background: #10b981; }
.pv__opt--multi.pv__opt--wrong .pv__opt-marker { background: #ef4444; }
.pv__opt--correct { border-color: #34c98a; background: var(--tint-success); }
.pv__opt--correct .pv__opt-marker { border-color: #10b981; background: #10b981; }
.pv__opt--wrong { border-color: var(--danger-line); background: var(--tint-danger); }
.pv__opt--wrong .pv__opt-marker { border-color: #ef4444; background: #ef4444; }
.pv__opt-icon { font-weight: 800; }
.pv__opt-icon--ok { color: #10b981; }
.pv__opt-icon--no { color: #ef4444; }
.pv__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }

/* ================= Course wizard + editor extras ================= */
.wzthumb__gallery--inline { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.wzthumb__gallery--inline .wzthumb__swatch { width: 36px; height: 28px; }
.le__title { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 15px; font-weight: 700; outline: none; margin: 10px 0 12px; }
.lrow { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.lrow__no { width: 18px; text-align: center; font-weight: 700; color: var(--muted); font-size: 13px; }
.lrow__title { flex: 1; border: none; outline: none; font-size: 14px; font-weight: 600; background: transparent; }
.lrow__type { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; background: var(--surface); }
.lrow__dur { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.lrow__dur input { width: 46px; border: none; outline: none; font-size: 13px; }

/* Course preview (curriculum + lesson) */
.pv--wide { width: 880px; }
.cpv { display: grid; grid-template-columns: 280px 1fr; min-height: 0; }
.cpv__curriculum { border-right: 1px solid var(--line); padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.cpv__sum { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 8px 8px; }
.cpv__item { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 9px 10px; cursor: pointer; }
.cpv__item:hover { background: var(--surface-3); }
.cpv__item--active { background: var(--surface); border-color: var(--tint-brand-line); box-shadow: 0 0 0 2px var(--tint-brand-line); }
.cpv__item-ico { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--tint-brand); color: var(--brand-ink); font-size: 12px; }
.cpv__item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cpv__item-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpv__item-meta { font-size: 11px; color: var(--muted); }
.cpv__item-done { color: #10b981; font-weight: 800; }
.cpv__stage { display: flex; flex-direction: column; min-width: 0; }
.cpv__stage-body { padding: 22px; overflow: auto; flex: 1; }
.cpv__media { height: 150px; border-radius: 14px; display: grid; place-items: center; color: rgba(255, 255, 255, .9); margin-bottom: 18px; }
.cpv__media-ico { font-size: 38px; }
.cpv__desc { font-size: 14px; color: var(--ink-3); line-height: 1.6; margin-top: 10px; }

/* ================= Course player (learning view) ================= */
.cplay { position: fixed; inset: 0; background: var(--surface); display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.cplay__main { overflow: auto; border-right: 1px solid var(--line); }
.cplay__maintop { padding: 22px 40px 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.cplay__content { padding: 16px 40px 60px; }
.cplay__crumb { font-size: 13px; font-weight: 600; color: var(--muted); }
.cplay__crumb-sep { margin: 0 6px; color: var(--faint-2); }
.cplay__title { font-size: 26px; font-weight: 800; margin: 8px 0 18px; }
.cplay__media { height: 320px; border-radius: 16px; display: grid; place-items: center; color: rgba(255, 255, 255, .85); margin-bottom: 24px; overflow: hidden; }
.cplay__media-img { width: 100%; height: 100%; object-fit: cover; }
.cplay__lesson { }
.cplay__h { font-size: 17px; font-weight: 800; margin: 22px 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); display: inline-block; }
.cplay__p { font-size: 15px; line-height: 1.7; color: var(--ink-2); margin-bottom: 14px; white-space: pre-line; }
.cplay__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }

.cplay__panel { display: flex; flex-direction: column; min-height: 0; }
.cplay__panelhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.cplay__tabs { display: flex; gap: 20px; }
.cplay__tab { border: none; background: transparent; padding: 6px 2px 14px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.cplay__tab:hover { color: var(--ink); }
.cplay__tab--active { color: var(--ink); border-bottom-color: var(--ink); }
.cplay__search { margin: 14px 18px; flex: none; }
.cplay__empty { margin: 40px 18px; }
.cplay__tree { overflow: auto; padding: 0 10px 24px; }
.cplay__disc { overflow: auto; padding: 14px 16px 24px; }

.trsec { }
.trsec__head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.trsec__head:hover { background: var(--surface-3); }
.trsec__chev { width: 14px; color: var(--muted); font-size: 12px; }
.trsec__title { font-size: 14px; font-weight: 700; color: var(--ink); }
.trstat { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.trstat--done { background: #10b981; color: #fff; }
.trstat--prog { background: conic-gradient(var(--brand) 60%, var(--surface-4) 0); }
.trstat--prog::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); }
.trstat--todo { border: 2px solid var(--line-strong); }
.trch { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: none; background: transparent; padding: 9px 8px 9px 30px; border-radius: 10px; cursor: pointer; }
.trch:hover { background: var(--surface-3); }
.trch--active { background: var(--surface-3); }
.trch--active .trch__title { font-weight: 700; color: var(--ink); }
.trch__check { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 10px; }
.trch__check--done { background: #10b981; border-color: #10b981; color: #fff; }
.trch__title { font-size: 13px; color: var(--ink-3); line-height: 1.35; }

@media (max-width: 900px) { .cplay { grid-template-columns: 1fr; } .cplay__panel { display: none; } }

/* ================= Course detail (view course) ================= */
.cdet { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; max-width: 1300px; padding: 22px 28px 60px; }
.cdet__main { min-width: 0; }
.cdet__header { display: flex; justify-content: space-between; gap: 24px; }
.cdet__title { font-size: 26px; font-weight: 800; }
.cdet__tags { display: flex; gap: 8px; margin: 12px 0; }
.cdet__meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.cdet__byline { font-size: 13px; color: var(--muted); margin-top: 8px; }
.cdet__thumb { width: 230px; height: 130px; border-radius: 14px; display: grid; place-items: center; color: rgba(255, 255, 255, .85); flex: none; overflow: hidden; }
.cdet__thumb-img { width: 100%; height: 100%; object-fit: cover; }
.cdet__rule { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.cdet__desc { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.cdet__readmore { background: none; border: none; cursor: pointer; padding: 0; }
.cdet__tabs { margin-top: 20px; }

.cdet__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; padding: 20px 0; }
.cdet__fact { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.cdet__fact-ico { width: 22px; text-align: center; color: var(--muted); }
.cdet__fact-ico--amber { color: #f59e0b; }

.cdet__section-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; }
.cdet__section-head h2 { font-size: 16px; font-weight: 700; }
.cdet__subtle { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.cdet__trainers { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.trainer { display: flex; gap: 12px; align-items: flex-start; }
.trainer__avatar { width: 44px; height: 44px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.trainer__name { font-size: 14px; font-weight: 700; }
.trainer__role { font-size: 12px; color: var(--muted); }
.trainer__tag { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 2px 8px; border-radius: 6px; }

.cdet__sections { display: flex; flex-direction: column; gap: 12px; }
.dsec { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dsec__head { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: none; padding: 14px 16px; cursor: pointer; }
.dsec__head:hover { background: var(--surface-2); }
.dsec__grip, .dch__grip { color: var(--faint-2); cursor: grab; }
.dsec__title { flex: 1; font-size: 14px; font-weight: 700; }
.dsec__count { font-size: 12.5px; color: var(--muted); }
.dsec__chev { color: var(--muted); width: 14px; text-align: center; }
.dsec__chs { border-top: 1px solid var(--line); }
.dch { display: flex; align-items: center; gap: 12px; padding: 13px 16px 13px 18px; border-top: 1px solid var(--line); }
.dch:first-child { border-top: none; }
.dch__title { font-size: 13.5px; color: var(--ink-2); }

.cdet__panelcard { border: 1px solid var(--line); border-radius: 14px; padding: 18px; max-width: 560px; }
.fld { display: block; margin-bottom: 16px; }
.fld__label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.fld__select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 14px; background: var(--surface); }
.fld__textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; outline: none; }
.cdet__formfoot { display: flex; justify-content: flex-end; }
.issue-done { text-align: center; padding: 30px 10px; }
.issue-done__ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #10b981; color: #fff; font-size: 20px; font-weight: 800; margin-bottom: 12px; }

.disc { max-width: 620px; }
.disc__composer { display: flex; gap: 12px; margin-bottom: 22px; }
.disc__avatar { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.disc__box { flex: 1; }
.disc__composer-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.disc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.disc__item { display: flex; gap: 12px; }
.disc__head { font-size: 13.5px; }
.disc__time { color: var(--muted); font-size: 12px; margin-left: 6px; }
.disc__text { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-top: 4px; }
.disc__body { flex: 1; min-width: 0; }
.disc__replybtn { margin-top: 6px; border: none; background: none; padding: 0; color: var(--brand-ink); font-weight: 700; font-size: 12.5px; cursor: pointer; }
.disc__replybtn:hover { text-decoration: underline; }
.disc__avatar--sm { width: 30px; height: 30px; font-size: 11px; }
.disc__item--reply { gap: 10px; }
.disc__replies { list-style: none; margin: 12px 0 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.disc__replybox { margin-top: 10px; }
.disc__replybox-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.disc__animin { animation: discIn .18s ease-out; transform-origin: top; }
@keyframes discIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.cdet__stats { border: 1px solid var(--line); border-radius: 16px; padding: 16px; position: sticky; top: 24px; }
.stats__tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.stats__tab { border: none; background: none; padding: 4px 2px 12px; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.stats__tab--active { color: var(--ink); border-bottom-color: var(--brand); }
.stats__showdata { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.stats__chart { margin-bottom: 14px; }
.stats__svg { width: 100%; height: 120px; display: block; }
.stats__axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.stats__legend { display: flex; gap: 24px; margin-bottom: 16px; }
.stats__leg { font-size: 12px; color: var(--muted); }
.stats__legval { font-size: 14px; font-weight: 800; color: var(--ink); margin-top: 4px; }
.stats__dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.stats__dot--amber { background: #f59e0b; }
.stats__dot--brand { background: var(--brand); }
.stats__actions { display: flex; gap: 8px; margin-bottom: 10px; }
.stats__assign { flex: 1; justify-content: center; }
.stats__start { width: 100%; justify-content: center; padding: 12px; font-size: 15px; margin-bottom: 4px; }
.stats__links { display: flex; gap: 8px; }
.stats__links .btn { flex: 1; justify-content: center; }
.stats__assignees { display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 1100px) {
    .cdet { grid-template-columns: 1fr; }
    .cdet__thumb { display: none; }
    .cdet__stats { position: static; }
    .cdet__facts, .cdet__trainers { grid-template-columns: 1fr; }
}

/* ---- Account pages ---- */
.login__links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 16px; font-size: 13px; }
.login__links .link { background: none; border: 0; padding: 0; cursor: pointer; }
.login__ok { background: var(--tint-success); color: var(--success-ink); border: 1px solid var(--success-line); border-radius: 9px; padding: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.login__code { letter-spacing: 8px; font-size: 20px; text-align: center; }
.fld__hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.validation-message { color: var(--danger-ink); font-size: 12px; margin-top: 4px; }
.profileform { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 4px; max-width: 520px; }
.profileform__h { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.profileform .fld { display: block; margin-bottom: 10px; }
.profileform .fld__label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.profileform .fld__input, .profileform .fld__textarea { width: 100%; }

/* ---- Admin ---- */
.adminpage { padding: 4px 6px 40px; }
.adminpage__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.adminpage__h1 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.adminpage__head .adminpage__h1 { margin-bottom: 0; }
.adminpage__filters { display: flex; gap: 8px; }
.adminpage__filters .fld__input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 220px; }
.admincards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.admincard { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.admincard__value { font-size: 26px; font-weight: 800; }
.admincard__label { font-size: 13px; font-weight: 600; }
.admincard__sub { font-size: 12px; color: var(--muted); }
.admincard--warn { border-color: var(--danger-line); background: var(--tint-danger); }
.admintable { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 13px; }
.admintable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.admintable td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admintable tr:last-child td { border-bottom: 0; }
.admintable .btn { padding: 6px 10px; font-size: 12px; }
.admintable__sub { font-size: 11.5px; color: var(--muted); }
.adminform { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.adminform .fld__input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.adminform__num { width: 80px; }
.adminsettings { max-width: 640px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.pager__label { font-size: 13px; color: var(--muted); }
.qed__banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--tint-warn); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 8px 0 12px; }
.qed__status { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-3); color: var(--ink-3); }
.qed__status--published { background: var(--tint-success); color: var(--success-ink); }
.qed__status--archived { background: var(--surface-3); color: var(--muted); }
.qed__settings { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.qed__setting { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
.qed__setting .fld__input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.qed__setting--inline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.chcard__meta { display: flex; gap: 16px; align-items: center; margin: 6px 0 10px; }
.chcard__mins { width: 70px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.cplay__done { background: var(--tint-success); color: var(--success-ink); border: 1px solid var(--success-line); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin-bottom: 14px; }

/* ---- Public catalogue ---- */
.pub { min-height: 100vh; background: var(--bg); }
.pub__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.pub__nav { display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 600; }
.pub__nav a { color: var(--ink); text-decoration: none; }
.pub__nav .btn--solid { color: var(--brand-fg); }
.pub__main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.pubpage { padding-top: 10px; }
.pubhero { text-align: center; padding: 36px 12px 28px; }
.pubhero h1 { font-size: 32px; font-weight: 800; }
.pubhero p { color: var(--muted); margin: 8px 0 18px; }
.pubhero__search { width: min(560px, 100%); border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; font-size: 15px; outline: none; }
.catalog { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.catalog__filters { display: flex; flex-direction: column; gap: 4px; }
.catalog__filters h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.catalog__cat { text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 8px; font-size: 13.5px; cursor: pointer; color: var(--ink-3); }
.catalog__cat--child { padding-left: 24px; }
.catalog__cat--on { background: var(--tint-brand); color: var(--brand-ink); font-weight: 700; }
.catcard { display: block; text-decoration: none; color: var(--ink); }
.catcard__body { padding: 14px; display: grid; gap: 6px; }
.catcard__cat { font-size: 11.5px; font-weight: 700; color: var(--brand-ink); text-transform: uppercase; letter-spacing: .03em; }
.catcard__title { font-size: 15px; font-weight: 800; line-height: 1.3; }
.catcard__summary { font-size: 12.5px; color: var(--muted); line-height: 1.45; min-height: 36px; }
.catcard__meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; }
.catcard__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.catcard__rating { font-size: 12.5px; color: var(--warn-ink); font-weight: 600; }
.catcard__price { font-weight: 800; font-size: 15px; }
.catcard__price--free { color: var(--success-ink); }
.landing { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.landing__title { font-size: 30px; font-weight: 800; margin: 8px 0; }
.landing__desc { color: var(--ink-2); line-height: 1.6; }
.landing__facts { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
.landing__h2 { font-size: 18px; font-weight: 800; margin: 26px 0 10px; }
.landing__outline { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
.landing__sectiontitle { font-weight: 700; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.landing__chapter { display: flex; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.landing__chmeta { display: flex; gap: 12px; color: var(--muted); font-size: 12.5px; }
.landing__chmeta .link { background: none; border: 0; cursor: pointer; padding: 0; }
.landing__preview { margin-top: 14px; }
.landing__previewhead { display: flex; justify-content: space-between; margin-bottom: 10px; }
.landing__img { max-width: 100%; border-radius: 10px; }
.landing__author p { margin-top: 8px; color: var(--ink-2); }
.landing__buy { position: sticky; top: 80px; display: grid; gap: 12px; }
.landing__art { height: 170px; border-radius: 12px; background-size: cover; background-position: center; }
.landing__price { font-size: 28px; font-weight: 800; }
.landing__cta { justify-content: center; padding: 12px; font-size: 14px; text-decoration: none; }
.landing__includes { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--ink-2); display: grid; gap: 6px; }
.checkoutdone { max-width: 520px; margin: 40px auto; text-align: center; display: grid; gap: 12px; justify-items: center; padding: 32px; }
.checkoutdone__icon { font-size: 44px; }
.refundform { display: flex; gap: 6px; align-items: center; }
.adminpage__h1--spaced { margin-top: 30px; }
.admintable__muted td { opacity: .5; }
.reviews__summary { display: flex; gap: 24px; align-items: center; margin-bottom: 14px; }
.reviews__avg { font-size: 40px; font-weight: 800; }
.reviews__avg span { color: #f59e0b; font-size: 26px; }
.reviews__bars { flex: 1; display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.reviews__bar { display: grid; grid-template-columns: 34px 1fr 30px; gap: 8px; align-items: center; }
.reviews__track { height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.reviews__track div { height: 100%; background: #f59e0b; }
.reviews__form { display: grid; gap: 8px; margin-bottom: 14px; }
.reviews__stars { display: flex; gap: 2px; }
.reviews__star { background: none; border: 0; font-size: 24px; color: var(--faint-2); cursor: pointer; padding: 0 2px; }
.reviews__star--on { color: #f59e0b; }
.reviews__item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.reviews__head { display: flex; gap: 10px; align-items: center; }
.reviews__rating { color: #f59e0b; }
.disc__replybtn--on { color: #ef4444; }
@media (max-width: 900px) {
  .catalog, .landing { grid-template-columns: 1fr; }
  .landing__buy { position: static; }
  .pub__top { padding: 12px 16px; }
}
.stats__progress { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.stats__progress div { height: 100%; background: var(--brand); }

/* ---- Assignments ---- */
.asg { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; padding: 18px; width: 100%; }
.asg__settings { display: grid; gap: 10px; }
.asg__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.asg__task { display: grid; gap: 8px; }
.asg__taskhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.asg__taskhead strong { margin-right: auto; }
.asg__prompt { white-space: pre-wrap; color: var(--ink-2); }
.asg__rubric { background: var(--tint-warn); border: 1px dashed var(--warn-line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--warn-ink); }
.asg__answer { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.asg__text { white-space: pre-wrap; }
.asg__feedback { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.asg__late { color: var(--danger-ink); font-weight: 600; }
.asg__grade p { margin-top: 6px; }

/* ---- Classes extras, notes ---- */
.gradebook { margin-top: 18px; }
.gradebook .card__head { display: flex; justify-content: space-between; align-items: center; }
.gradebook__scroll { overflow-x: auto; }
.gradebook__cell { text-align: center; font-weight: 600; }
.gradebook__cell--completed { background: var(--tint-success); color: var(--success-ink); }
.gradebook__cell--overdue { background: var(--tint-danger); color: var(--danger-ink); }
.gradebook__cell--inprogress { background: var(--tint-warn); color: var(--warn-ink); }
.cstep__due { font-size: 11.5px; margin-left: 8px; color: var(--muted); }
.cstep__duein { width: 170px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: 12px; }
.live__form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.live__form .fld__input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.live__mins { width: 80px; }
.live__url { flex: 1; min-width: 220px; }
.live__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.live__item { display: flex; align-items: center; gap: 12px; justify-content: space-between; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.live__item--ended { opacity: .55; }
.notes { padding: 12px; display: grid; gap: 6px; }
.notes__text { min-height: 280px; }
.lc__import { position: relative; overflow: hidden; cursor: pointer; }
.aipanel { width: min(560px, 92vw); display: grid; gap: 10px; }

/* ---------- Phase 5: SCORM, lesson assistant, organisations, webhooks ---------- */
.chip--ok { background: var(--tint-success); color: var(--success-ink); }
.chip--bad { background: var(--tint-danger); color: var(--danger-ink); }
.chip--muted { background: var(--surface-3); color: var(--muted); }

.scormframe { width: 100%; height: 78vh; min-height: 540px; border: 1px solid var(--line); border-radius: 14px; display: block; background: var(--surface); }
.scormframe--loading { display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.scormframe__status { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.blk__url--readonly { padding: 9px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blk__scorminfo { margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.blk__hint { margin: 6px 0 8px; font-size: 12px; color: var(--muted); }
.blk__transcript { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.blk__transcript summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.blk__transcript textarea { width: 100%; margin: 8px 0; }

.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 10px 14px 14px; gap: 10px; }
.chat__log { flex: 1; min-height: 240px; max-height: 62vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.chat__hint { background: var(--surface-2); border: 1px solid var(--tint-brand-line); border-radius: 14px; padding: 14px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.chat__hint p { color: var(--muted); }
.chat__example { text-align: left; border: 1px solid var(--tint-brand-line); background: var(--surface); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--brand-ink); }
.chat__example:hover { background: var(--tint-brand); }
.chat__msg { max-width: 92%; border-radius: 14px; padding: 9px 12px; font-size: 13.5px; line-height: 1.45; }
.chat__msg--me { align-self: flex-end; background: var(--brand); color: var(--brand-fg); border-bottom-right-radius: 4px; }
.chat__msg--ai { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 4px; }
.chat__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__sources { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 11.5px; color: var(--muted); }
.chat__src { border: 1px solid var(--tint-brand-line); background: var(--surface); color: var(--brand-ink); border-radius: 999px; padding: 3px 9px; font: inherit; font-size: 11.5px; cursor: pointer; }
.chat__typing { display: inline-flex; gap: 4px; }
.chat__typing span { width: 6px; height: 6px; border-radius: 50%; background: #a5a3c7; animation: chatdot 1s infinite ease-in-out; }
.chat__typing span:nth-child(2) { animation-delay: .15s; }
.chat__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatdot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat__form { display: flex; gap: 8px; align-items: flex-end; }
.chat__input { flex: 1; resize: none; }
.chat__note { font-size: 11px; color: var(--muted); }

.orgm { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.orgm__head, .orgm__member { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.orgm__member { margin-bottom: 4px; }
.orgm__name { font-size: 18px; margin-bottom: 4px; }
.orgm__code { display: flex; align-items: center; gap: 8px; }
.orgm__codevalue { font-size: 15px; font-weight: 700; letter-spacing: 1px; background: var(--surface-3); border-radius: 8px; padding: 6px 10px; }
.orgm__tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.orgm__search { max-width: 320px; margin: 4px 0 8px; }

.hooks { display: flex; flex-direction: column; gap: 12px; }
.hooks__form { display: flex; flex-direction: column; gap: 10px; }
.hooks__events { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.hooks__events legend { font-size: 12.5px; font-weight: 600; padding: 0 4px; }
.hooks__event code { font-size: 12px; }
.hooks__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hooks__item { display: flex; flex-direction: column; gap: 6px; }
.hooks__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hooks__url { font-size: 13px; overflow-wrap: anywhere; }
.hooks__secret { border-color: var(--warn-line); background: var(--tint-warn); display: flex; flex-direction: column; gap: 8px; }
.hooks__secret-value { font-size: 13px; background: var(--surface); border: 1px solid var(--warn-line); border-radius: 8px; padding: 8px 10px; overflow-wrap: anywhere; user-select: all; }
.hooks__deliveries { margin-top: 6px; }
.hooks__help summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.hooks__help p { margin: 8px 0; font-size: 13px; color: var(--muted); }
.hooks__help pre { background: #16161f; color: #e5e7eb; border-radius: 10px; padding: 10px 12px; font-size: 12px; overflow: auto; }
.ccard__badge--org { top: auto; bottom: 10px; background: var(--glass); color: var(--success-ink); }
.adminform, .orgm__head, .orgm__member { flex-direction: row; }
.orgm .fld__input, .hooks .fld__input, .orgm__search, .adminpage > .fld__input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 14px; font-family: inherit; background: var(--surface); color: var(--ink); outline: none; }
.orgm .fld__input:focus, .hooks .fld__input:focus, .orgm__search:focus { border-color: var(--brand); }
.hooks .fld { display: block; }
.hooks .fld__label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.hooks .fld__input { width: 100%; }
.orgm .profileform, .adminpage > .profileform { margin-top: 0; border-top: none; }
.orgpage { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; }

/* ---------- Commerce: cart, bundles, membership, earnings ---------- */
.cartbadge { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--ink); text-decoration: none; margin-right: 6px; }
.cartbadge:hover { background: var(--surface-3); }
.cartbadge__count { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: var(--brand-fg); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.pub__nav .cartbadge { margin: 0; }
.cartpage { max-width: 1080px; margin: 0 auto; padding: 28px 20px 48px; display: flex; flex-direction: column; gap: 16px; }
.cartpage__grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.cartpage__items { display: flex; flex-direction: column; gap: 10px; }
.cartitem { display: flex; flex-direction: row; align-items: center; gap: 14px; }
.cartitem--blocked { opacity: .7; }
.cartitem__art { width: 88px; height: 56px; flex: none; border-radius: 10px; background-size: cover; background-position: center; }
.cartitem__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cartitem__title { font-weight: 700; color: var(--ink); text-decoration: none; }
.cartitem__problem { font-size: 12.5px; color: var(--warn-ink); }
.cartitem__price { font-weight: 700; white-space: nowrap; }
.cartpage__summary { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.cartpage__line { display: flex; justify-content: space-between; font-size: 16px; }
@media (max-width: 800px) { .cartpage__grid { grid-template-columns: 1fr; } }

.landing__member { display: block; margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--tint-warn); color: var(--warn-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
.landing__cta + .landing__cta { margin-top: 8px; }
.bundlelist { display: flex; flex-direction: column; gap: 10px; }
.bundlelist__item { display: flex; flex-direction: row; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.bundlelist__art { width: 72px; height: 48px; flex: none; border-radius: 10px; background-size: cover; background-position: center; }
.bundlelist__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bundlelist__price { color: var(--muted); font-size: 13px; }
.bundle__save { margin: -4px 0 10px; font-size: 13px; color: var(--success-ink); font-weight: 600; }
.bundle__save s { color: var(--muted); font-weight: 400; }
.bundlestrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 22px; }
.bundlestrip__item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; border-color: var(--tint-brand-line); background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.bundlestrip__price { font-weight: 700; }
.bundlestrip__price s { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12.5px; }
.bundleform fieldset { max-height: 260px; overflow: auto; }

.membership { max-width: 1000px; margin: 0 auto; padding: 24px 20px 48px; display: flex; flex-direction: column; gap: 16px; }
.membership__mine { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.membership__mine strong { margin-right: 8px; }
.membership__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan__name { font-size: 18px; }
.plan__price { font-size: 28px; font-weight: 800; }
.plan__price span { font-size: 14px; font-weight: 500; color: var(--muted); }

.earn__account { display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.earn__chart { margin: 14px 0; }
.earn__svg { width: 100%; height: auto; max-height: 220px; display: block; }
.earn__bar { fill: var(--brand); opacity: .85; }
.earn__bar:hover { opacity: 1; }
.earn__label { fill: var(--muted); font-size: 11px; }

/* ---------- Storefront: landing extras, instructor, banners, pages ---------- */
.landing__subtitle { font-size: 17px; color: var(--ink-2); margin: 6px 0 10px; }
.landing__trailer { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; margin: 14px 0; background: #000; }
.landing__trailer iframe { width: 100%; height: 100%; border: 0; }
.landing__outcomes { margin: 16px 0; }
.landing__outcomes ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; }
.landing__reqs { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.landing__avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; float: left; margin-right: 12px; }
.landing__authorlink { color: var(--ink); }
.cgrid--compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.catcard__member { display: inline-block; font-size: 11px; font-weight: 700; color: var(--warn-ink); background: var(--tint-warn); border-radius: 6px; padding: 2px 6px; margin-bottom: 4px; }
.catalog__member { margin-top: 10px; }
.catrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.catbanner { position: relative; border-radius: 18px; padding: 28px 30px; margin-bottom: 20px; color: #fff; background: linear-gradient(120deg, #4b46e0, #8b5cf6); background-size: cover; background-position: center; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 170px; justify-content: center; }
.catbanner__title { font-size: 26px; font-weight: 800; color: #fff; }
.catbanner__text { max-width: 560px; color: rgba(255, 255, 255, .9); }
.catbanner .btn--solid { background: var(--surface); color: var(--brand-ink); }
.catbanner__dots { position: absolute; right: 18px; bottom: 14px; display: flex; gap: 6px; }
.catbanner__dot { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--glass); cursor: pointer; padding: 0; }
.catbanner__dot--on { background: var(--surface); }
.instructor { max-width: 1080px; margin: 0 auto; padding: 28px 20px 48px; }
.instructor__head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.instructor__avatar { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; flex: none; }
.instructor__avatar--initials { display: grid; place-items: center; background: var(--brand); color: var(--brand-fg); font-size: 36px; font-weight: 800; }
.instructor__bio { max-width: 760px; white-space: pre-wrap; line-height: 1.6; }
.staticpage { max-width: 820px; margin: 0 auto; padding: 32px 20px 56px; display: flex; flex-direction: column; gap: 14px; }
.pub__footer { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding: 22px 16px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pub__footer a { color: var(--muted); text-decoration: none; }
.pub__footer a:hover { color: var(--ink); }
.storepage .rte { min-height: 180px; }
.seo-static { max-width: 820px; margin: 24px auto; font-family: sans-serif; }

/* ---- Learning extras: interactive blocks, Q&A, updates, planner ---- */
.cplay__tabs { flex-wrap: wrap; gap: 2px 14px; }
.linkbtn { border: none; background: none; padding: 0; color: var(--brand-ink); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.btn--sm { padding: 6px 12px; font-size: 12.5px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg__btn { border: none; background: none; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg__btn--on { background: var(--brand); color: var(--brand-fg); }
.seg__btn:disabled { opacity: .45; cursor: default; }

.practice, .scenario { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin: 0 0 18px; background: var(--surface-2); display: grid; gap: 10px; }
.practice__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-ink); }
.practice__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.practice__result { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.practice__score { display: flex; align-items: center; gap: 12px; }
.practice__bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.practice__bar span { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #22c55e); border-radius: 999px; }
.practice__list ul { margin: 4px 0 0; padding-left: 18px; font-size: 14px; }
.practice__list--good strong { color: var(--success-ink); }

.cplay__embed { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 14px; display: block; background: var(--surface); }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; margin: 0 0 18px; border-left: 4px solid; font-size: 15px; line-height: 1.55; }
.callout__text { white-space: pre-line; }
.callout--info { background: var(--tint-brand); border-color: #6366f1; }
.callout--tip { background: var(--tint-warn); border-color: #eab308; }
.callout--warning { background: var(--tint-danger); border-color: #f43f5e; }
.callout--success { background: var(--tint-success); border-color: #10b981; }
.cplay__math { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; overflow-x: auto; }
.mathview { font-size: 1.25em; text-align: center; }
.mathview math { font-size: 1.15em; }

.flipcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0 0 8px; }
.flipcard { border: none; background: none; padding: 0; height: 150px; perspective: 900px; cursor: pointer; font: inherit; }
.flipcard__inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.flipcard--flipped .flipcard__inner { transform: rotateY(180deg); }
.flipcard__face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px; border-radius: 14px; backface-visibility: hidden; text-align: center; font-size: 15px; overflow: auto; }
.flipcard__front { background: var(--surface); border: 1px solid var(--line); font-weight: 700; box-shadow: 0 2px 8px rgba(20, 20, 40, .05); }
.flipcard__back { background: var(--brand); color: var(--brand-fg); transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .flipcard__inner { transition: none; } }

.scenario__text { font-size: 15.5px; line-height: 1.6; white-space: pre-line; }
.scenario__feedback { background: var(--surface); border-left: 3px solid var(--brand); padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--ink-2); }
.scenario__choices { display: grid; gap: 8px; }
.scenario__choice { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 14px; font: inherit; font-size: 14.5px; cursor: pointer; }
.scenario__choice:hover { border-color: var(--brand); background: var(--surface-2); }
.scenario__end { padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.scenario__end--good { background: var(--tint-success); color: var(--success-ink); }
.scenario__end--bad { background: var(--tint-warn); color: var(--warn-ink); }

.blk__row { display: flex; gap: 8px; margin-bottom: 8px; }
.blk__mono { font-family: Consolas, "Courier New", monospace; }
.blk__preview--math { background: var(--surface); border: 1px solid var(--line); padding: 14px; overflow-x: auto; }
.blk__cards { display: grid; gap: 8px; margin-bottom: 8px; }
.blk__card { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
.blk__step { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; display: grid; gap: 8px; background: var(--surface-2); }
.blk__stephead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.blk__stephead .iconbtn { margin-left: auto; }
.blk__choice { display: grid; grid-template-columns: 1.3fr auto 1.3fr auto; gap: 6px; align-items: center; }
@media (max-width: 720px) { .blk__card, .blk__choice { grid-template-columns: 1fr; } }

.forum { display: grid; gap: 10px; align-content: start; }
.forum__bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.forum__item { display: flex; gap: 12px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; width: 100%; }
.forum__item:hover { border-color: var(--tint-brand-line); }
.forum__item--hidden { opacity: .55; }
.forum__votes { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 34px; text-align: center; padding-top: 2px; }
.forum__itemmain { display: grid; gap: 3px; min-width: 0; }
.forum__itemtitle { font-weight: 700; font-size: 14px; }
.forum__empty { color: var(--muted); font-size: 13.5px; padding: 18px 4px; text-align: center; }
.forum__back { border: none; background: none; color: var(--brand-ink); font-weight: 600; cursor: pointer; padding: 0; justify-self: start; font-size: 13px; }
.forum__row { display: flex; gap: 10px; align-items: flex-start; }
.forum__vote { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.forum__vote--on { border-color: var(--brand); color: var(--brand-ink); background: var(--tint-brand); }
.forum__title { font-size: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.forum__body { font-size: 14px; line-height: 1.55; white-space: pre-line; margin: 6px 0; }
.forum__count { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.forum__answers { display: grid; gap: 8px; }
.forum__post { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.forum__post--accepted { border-color: var(--success-line); background: var(--tint-success); }
.forum__postmain { min-width: 0; flex: 1; }
.forum__mod { display: flex; gap: 12px; }
.forum__inst { background: var(--tint-brand); color: var(--brand-ink); }
.forum__form { display: grid; gap: 8px; }
.forum__formactions { display: flex; justify-content: flex-end; gap: 8px; }

.updates { padding: 14px 16px 24px; overflow: auto; display: grid; gap: 10px; align-content: start; }
.updates__h { font-size: 14px; margin-top: 6px; }
.resources { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.resources__item { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.resources__item a { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--brand-ink); }
.announce { display: grid; gap: 4px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.card.announce { padding: 14px 16px; margin-top: 10px; }
.announce__head { display: flex; justify-content: space-between; gap: 10px; }
.announce__title { font-weight: 700; font-size: 14.5px; }
.announce__body { font-size: 14px; line-height: 1.55; white-space: pre-line; }
.cplay__manage { display: block; padding: 0 16px 20px; }

.notes__ai { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.managetabs { margin-top: 14px; }
.manage__resrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.manage__resrow .fld__input { flex: 1; min-width: 200px; }

.take__focus { background: var(--tint-warn); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; }
.asg__solution { border-top: 1px dashed var(--line); padding-top: 8px; }
.asg__solution summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.asg__solution[open] { display: grid; gap: 8px; }
.asg__modelanswer { background: var(--tint-warn); border: 1px solid var(--warn-line); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-line; }
.asg__number { max-width: 220px; }

.planner__files { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
.planner__section { margin-top: 12px; display: grid; gap: 8px; }
.planner__sechead { display: flex; gap: 10px; align-items: center; }
.planner__sechead .le__title { flex: 1; }
.planner__chapter { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface-2); }
.planner__chapter summary { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.planner__chapter summary .fld__input { flex: 1; }
.planner__draft { margin-top: 10px; font-size: 14px; }
.planner__actions { display: flex; gap: 10px; margin-top: 14px; }
.blk__card .fld__input, .blk__choice .fld__input, .planner__chapter .fld__input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 14px; background: var(--surface); }

/* ---- Account security: captcha, Google, two-step sign-in, tokens, deletion ---- */
.captcha { margin: 6px 0 10px; min-height: 24px; }
.login__google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; text-decoration: none; margin-bottom: 6px; }
.login__or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 12px 0; }
.login__or::before, .login__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login__code { font-size: 20px; letter-spacing: .3em; text-align: center; }
.security { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; display: grid; gap: 10px; }
.security__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.security__row .fld__input { flex: 1; min-width: 160px; }
.security__state--on { color: var(--success-ink); font-weight: 600; font-size: 14px; }
.security__steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.security__qr { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.security__qr img { border: 1px solid var(--line); border-radius: 10px; image-rendering: pixelated; background: var(--surface); }
.security__secret { display: block; font-family: Consolas, "Courier New", monospace; font-size: 13px; background: var(--surface-3); padding: 8px 10px; border-radius: 8px; word-break: break-all; margin-top: 4px; }
.security__codes { background: var(--tint-warn); border: 1px solid var(--warn-line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; font-size: 14px; }
.security__codes ol { columns: 2; margin: 0; padding-left: 22px; font-family: Consolas, "Courier New", monospace; }
.security__linked { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.security--danger .profileform__h { color: var(--danger-ink); }
.security__danger { color: var(--danger-ink); border-color: var(--danger-line); }
.btn--solid.security__danger-solid { background: #dc2626; }
.btn--solid.security__danger-solid:hover { background: #b91c1c; }

/* ---- Integration: engagement report, live room chat, organisation branding, xAPI status ---- */
.engage__period { display: inline-flex; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); margin: 12px 0; }
.engage__row { cursor: pointer; }
.engage__row:hover td, .engage__row--on td { background: var(--surface-2); }
.engage__detail { margin-top: 16px; display: grid; gap: 12px; }
.engage__h { font-size: 14px; margin-top: 8px; }
.engage__funnel { display: grid; gap: 8px; }
.engage__step, .engage__chapter { display: grid; grid-template-columns: 180px 1fr 60px; gap: 12px; align-items: center; font-size: 14px; }
.engage__chtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engage__bar { height: 12px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.engage__bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.engage__bar--reach span { background: #10b981; }
.engage__daily { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.engage__day { flex: 1; display: flex; align-items: flex-end; gap: 1px; height: 100%; min-width: 2px; }
.engage__dv, .engage__de { flex: 1; border-radius: 3px 3px 0 0; min-height: 1px; }
.engage__dv, .engage__key--v { background: var(--tint-brand-2); }
.engage__de, .engage__key--e { background: var(--brand); }
.engage__legend { display: flex; gap: 8px; align-items: center; }
.engage__key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 8px; }
@media (max-width: 720px) { .engage__step, .engage__chapter { grid-template-columns: 1fr; gap: 4px; } }

.live__room { list-style: none; display: block; }
.liveroom { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: var(--surface-2); }
.liveroom__people { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.liveroom__messages { max-height: 320px; overflow-y: auto; display: grid; gap: 8px; align-content: start; }
.liveroom__empty { padding: 12px; text-align: center; }
.liveroom__msg { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.liveroom__msg--teacher { border-color: var(--tint-brand-line); background: var(--surface-2); }
.liveroom__who { font-weight: 700; margin-right: 6px; }
.liveroom__hide { float: right; }
.liveroom__text { white-space: pre-line; margin-top: 2px; }
.liveroom__form { display: flex; gap: 8px; }
.liveroom__form .fld__input { flex: 1; }

.brand__mark--logo { background: none; padding: 0; }
.brand__mark--logo img { object-fit: contain; border-radius: 6px; }
.orgbrand { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.orgbrand__color { display: flex; gap: 8px; align-items: center; }
.orgbrand__color input[type=color] { width: 44px; height: 38px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); }
.orgbrand__logo { max-height: 40px; max-width: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: var(--surface); }
@media (max-width: 720px) { .orgbrand { grid-template-columns: 1fr; } }
.xapi__stats { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Learning paths, locked chapters, offline page ---- */
.path__chip { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 6px 0; }
.chcard__date { width: 150px; }
.cplay__locked { border: 1px dashed var(--line); border-radius: 14px; padding: 28px; text-align: center; color: var(--ink-2); background: var(--surface-2); margin-bottom: 18px; }
.cplay__locked-icon { font-size: 32px; margin-bottom: 6px; }
.path__reqs li { display: flex; gap: 8px; align-items: center; }
.offline { max-width: 460px; margin: 15vh auto; padding: 0 16px; text-align: center; display: grid; gap: 14px; justify-items: center; }

/* ---- Selling: discount codes, gifts, invoices, affiliates, tax ---- */
.couponbox { margin: 8px 0; font-size: 13.5px; }
.couponbox summary { cursor: pointer; color: var(--brand-ink); font-weight: 600; }
.couponbox__row { display: flex; gap: 6px; margin: 8px 0 4px; }
.couponbox__row .fld__input { flex: 1; text-transform: uppercase; }
.landing__discount { font-size: 14px; color: var(--success-ink); margin-bottom: 8px; }
.landing__gift { margin-top: 10px; font-size: 13.5px; }
.landing__gift summary { cursor: pointer; font-weight: 600; }
.landing__gift[open] { display: grid; gap: 8px; }
.coupon__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 16px; }
.coupon__value { display: flex; gap: 6px; }
.coupon--off td { opacity: .55; }
.gift__courses { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 4px; font-weight: 600; }
.gift__message { border-left: 3px solid var(--tint-brand-line); margin: 8px 0 14px; padding: 4px 12px; color: var(--ink-2); font-style: italic; }
.gift__actions { display: flex; gap: 10px; justify-content: center; }
.tax__country { width: 70px; text-transform: uppercase; }
.tax__rate { width: 90px; }
.landing__gift .fld__input, .landing__gift .fld__textarea, .couponbox__row .fld__input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; background: var(--surface); }


/* ---- Real links everywhere (cards, rows, menus, collapsible sidebar) ---- */
.ccard { position: relative; overflow: visible; }
.ccard__art { border-radius: 16px 16px 0 0; }
.ccard__link { color: inherit; text-decoration: none; }
.ccard__link::after { content: ""; position: absolute; inset: 0; border-radius: 16px; z-index: 1; }
.ccard__link:focus-visible { outline: none; }
.ccard__link:focus-visible::after { outline: 2px solid var(--brand); outline-offset: 2px; }
.ccard__fav, .ccard__btn, .ccard__more { position: relative; z-index: 2; }
.ccard__fav { position: absolute; }
.ccard__more { display: inline-flex; }
.ccard__backdrop { position: fixed; inset: 0; z-index: 3; }
.ccard__menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 4; min-width: 180px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 20, 40, .14); padding: 6px; }
.ccard__menu a, .ccard__menu button { text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--ink); text-decoration: none; cursor: pointer; }
.ccard__menu a:hover, .ccard__menu button:hover:not(:disabled) { background: var(--surface-3); }
.ccard__menu .ccard__danger { color: var(--danger-ink); }
.ccard__err { font-size: 12px; color: var(--danger-ink); padding: 4px 10px; word-break: break-all; }

.course-row { position: relative; }
.course-row__link { color: inherit; text-decoration: none; }
.course-row__link::after { content: ""; position: absolute; inset: 0; }
.course-row__btn { position: relative; z-index: 1; text-decoration: none; }

a.clscard { display: block; color: inherit; text-decoration: none; }
a.aquick, a.aupgrade__btn, a.promo__btn, a.atable__grade { text-decoration: none; display: inline-flex; align-items: center; }
a.promo__btn { color: var(--ink); }
a.aupgrade__btn { display: flex; }
.wzthumb--img { background-size: cover; background-position: center; }
.wzthumb__pick { position: relative; overflow: hidden; display: inline-block; }

.wsmenu a, .wslist a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsgroup__link { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.wsgroup__link:hover, .wsgroup__link.active { color: var(--brand-ink); }
.wsgroup__empty { font-size: 12px; color: var(--muted); padding: 2px 10px 8px; margin: 0; }

.cfilters__select { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 7px 10px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); }

.ws__expand { display: none; position: sticky; top: 12px; left: 12px; z-index: 5; margin: 12px 0 -44px 12px; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; place-items: center; }
html.ws-collapsed .wsbar { display: none; }
html.ws-collapsed .ws__expand { display: grid; }
@media (max-width: 900px) { html.ws-collapsed .ws__expand { display: none; } }

.rquiz__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.rquiz__tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.rquiz__tile-n { font-size: 24px; font-weight: 800; }
.rquiz__tile-k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.rquiz__tile--warn { border-color: var(--warn-line); background: var(--tint-warn); }
.rquiz__h2 { font-size: 15px; font-weight: 800; margin: 18px 0 8px; }
.rquiz__review-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rquiz__review-list a { font-weight: 700; color: var(--ink); }
a.rquiz__title { color: inherit; text-decoration: none; display: block; }
a.rquiz__title:hover { color: var(--brand-ink); text-decoration: underline; }
button.rlearn__feedtab { border: none; background: transparent; font: inherit; cursor: pointer; }
a.rephead__crumb-muted { color: inherit; text-decoration: none; }
a.rephead__crumb-muted:hover { text-decoration: underline; }

@media print {
    .navrail, .topbar, .wsbar, .ws__expand, .rephead__actions, #blazor-error-ui { display: none !important; }
    .ws, .ws__col, .ws__body, .ws__main { display: block !important; height: auto !important; overflow: visible !important; }
}

a.qed__back { color: inherit; text-decoration: none; }
a.ctab { display: inline-block; text-decoration: none; }

/* ---- Shared: confirm-before-acting button, user menu, language picker ---- */
.confirm { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--tint-warn); border: 1px solid var(--warn-line); border-radius: 10px; padding: 6px 8px; font-size: 12.5px; }
.confirm__msg { color: var(--warn-ink); font-weight: 600; }
.confirm__yes--danger { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.confirm__yes--danger:hover { background: #991b1b; }
.umenu { position: relative; }
.umenu > .profile { border: none; background: transparent; cursor: pointer; border-radius: 12px; padding: 4px 8px 4px 6px; font: inherit; color: inherit; text-align: left; }
.umenu > .profile:hover, .umenu > .profile[aria-expanded="true"] { background: var(--surface-3); }
.umenu__chev { color: var(--muted); font-size: 11px; }
.umenu__backdrop { position: fixed; inset: 0; z-index: 40; }
.umenu__panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 41; min-width: 220px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 20, 40, .14); padding: 6px; }
.umenu__panel > a, .umenu__panel > button { display: flex; gap: 8px; align-items: center; text-align: left; border: none; background: transparent; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--ink); text-decoration: none; cursor: pointer; }
.umenu__panel > a:hover, .umenu__panel > button:hover { background: var(--surface-3); }
.umenu__signout { border-top: 1px solid var(--line) !important; border-radius: 0 0 8px 8px !important; margin-top: 4px; }
.langpick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.langpick select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; color: var(--ink); background: var(--surface); }
.umenu__lang { padding: 8px 10px; justify-content: space-between; }
.profilecard__lang { margin: 12px 0; }
.pub__lang { margin-left: auto; }

/* ---- Form fields everywhere: only the sign-in page used to style them, so profile, admin and organisation forms showed raw browser inputs ---- */
.fld { display: block; margin-bottom: 14px; }
.fld__label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.fld__input, .fld__textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
.fld .fld__input, .fld .fld__textarea { width: 100%; }
.fld__textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.fld__input:focus, .fld__textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus-ring); }
.fld__input:disabled, .fld__textarea:disabled { background: var(--surface-3); color: var(--muted); }
.fld__input.invalid, .fld__textarea.invalid { border-color: #dc2626; }
.fld__hint { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; }
.profileform .validation-message { font-size: 12px; color: var(--danger-ink); margin-top: 4px; }
input[type="file"] { font: inherit; font-size: 13px; color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button { margin-right: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 9px; padding: 7px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
input[type="file"]::file-selector-button:hover { border-color: var(--tint-brand-line); background: var(--surface-3); }

/* Profile: photo picker, organisation line, language */
.profilephoto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.profilephoto__pick { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.profilephoto .fld__hint { flex-basis: 100%; margin-top: 0; }
.profilecard__avatar--img { object-fit: cover; padding: 0; }
.profilecard__org { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.langpick__label { font-weight: 600; }

/* Audio blocks */
.cplay__audio, .blk__audio { width: 100%; display: block; }
.cplay__audiofig { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.cplay__transcript { margin-top: 10px; font-size: 13.5px; color: var(--ink); }
.cplay__transcript summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.cplay__transcript p { margin: 8px 0 0; line-height: 1.6; white-space: pre-wrap; }

/* The assignment editor sits in the fixed full-screen editor shell: its column scrolls, or tasks below the window cannot be reached */
.qed > .asg { flex: 1 1 auto; min-height: 0; overflow-y: auto; max-width: none; align-content: start; padding: 18px max(18px, calc((100% - 880px) / 2)); }
