/*
 * LearnHub design system (R2 foundations). Premium Enterprise Hybrid: restrained teal brand, clean neutral surfaces,
 * one type scale, one spacing scale, three radii and semantic status colours. Reference: docs/product-refinement/
 * R2-IMPLEMENTATION-REPORT.md (design tokens and component standards).
 *
 * Brand: institute pages override --lh-primary* (BrandPalette.AccentStyle) and --site-primary* (BrandPalette.SidebarStyle)
 * from the institute's one stored colour (Tenant.PrimaryColor, edited in Site settings). Never add a second sidebar colour
 * or hard-code an institute colour here: anything brand-coloured must use var(--lh-primary*) or var(--site-primary*).
 * Light theme only. A dark theme has not been built; it is a separate, optional decision (RF-DS-12).
 */
:root {
    /* ---- Neutral surfaces and text (cool neutral canvas) ---- */
    --lh-bg: #F4F7F8;                 /* page canvas */
    --lh-surface: #FFFFFF;            /* cards, panels, inputs */
    --lh-surface-alt: #EEF3F4;        /* table headers, subtle fills */
    --lh-surface-hover: #F7FAFA;      /* row hover */
    --lh-border: #E2E9EB;
    --lh-border-strong: #C9D5D9;
    --lh-text: #172F37;               /* body text: 13.0:1 on the canvas */
    --lh-text-strong: #10252C;        /* headings */
    --lh-text-secondary: #3D4F57;     /* labels: 7.6:1 on surface-alt */
    --lh-muted: #5E6E75;              /* helper text, metadata: 4.92:1 on canvas, 5.30:1 on white, 4.73:1 on surface-alt (WCAG AA) */
    --lh-disabled: #8C9DA3;

    /* ---- Brand accent (re-themed per institute by BrandPalette.AccentStyle) ---- */
    --lh-primary: #0F766E;
    --lh-primary-rgb: 15, 118, 110;
    --lh-primary-hover: #0D645E;
    --lh-primary-soft: #E7F1F0;

    --lh-highlight: #D97706;
    --lh-highlight-soft: #FEF3C7;

    /* ---- Semantic status colours: text (fg) on its own background (bg) is at least 4.5:1; borders at least 3:1 on white ---- */
    --lh-success-fg: #166534;  --lh-success-bg: #E8F5EC;  --lh-success-border: #15803D;  --lh-success-solid: #15803D;
    --lh-warning-fg: #92400E;  --lh-warning-bg: #FDF3DC;  --lh-warning-border: #B45309;  --lh-warning-solid: #D97706;
    --lh-danger-fg: #B91C1C;   --lh-danger-bg: #FDECEC;   --lh-danger-border: #DC2626;   --lh-danger-solid: #DC2626;
    --lh-info-fg: var(--lh-primary-hover); --lh-info-bg: var(--lh-primary-soft); --lh-info-border: var(--lh-primary);
    --lh-neutral-fg: #3D4F57;  --lh-neutral-bg: #EEF3F4;  --lh-neutral-border: #8C9DA3;

    /* ---- Sidebar: derived from the site primary colour (BrandPalette.SidebarStyle); platform defaults below ---- */
    --site-primary: #0F766E;
    --site-primary-contrast: #FFFFFF;
    --site-primary-hover: #0D6861;
    --site-primary-active: #0B5A54;
    --site-primary-muted: #E2EFEE;
    --lh-sidebar: var(--site-primary);
    --lh-sidebar-text: var(--site-primary-contrast);
    --lh-sidebar-muted: var(--site-primary-muted);
    --lh-sidebar-hover: var(--site-primary-hover);

    /* ---- Typography: one scale; 13px is the smallest size for anything a user must read ---- */
    --lh-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --lh-fs-overline: .75rem;   /* 12px, uppercase labels only (table headers, menu groups) */
    --lh-fs-xs: .8125rem;       /* 13px caption, metadata, helper text */
    --lh-fs-sm: .875rem;        /* 14px secondary text, labels, table cells */
    --lh-fs-base: .9375rem;     /* 15px body */
    --lh-fs-md: 1rem;           /* 16px section and card titles */
    --lh-fs-lg: 1.125rem;       /* 18px sub-page headings */
    --lh-fs-xl: 1.25rem;        /* 20px page title */
    --lh-fs-2xl: 1.5rem;        /* 24px KPI values */
    --lh-fw-regular: 400; --lh-fw-medium: 500; --lh-fw-semibold: 600; --lh-fw-bold: 700;
    --lh-lh-tight: 1.25; --lh-lh-base: 1.5;

    /* ---- Spacing (4px base), radii, elevation, controls, focus ---- */
    --lh-space-1: .25rem; --lh-space-2: .5rem; --lh-space-3: .75rem; --lh-space-4: 1rem;
    --lh-space-5: 1.25rem; --lh-space-6: 1.5rem; --lh-space-8: 2rem;
    --lh-radius-sm: 6px;        /* badges, chips, small tiles */
    --lh-radius-md: 8px;        /* buttons, inputs, menus, list tiles */
    --lh-radius-lg: 12px;       /* cards, panels, dialogs */
    --lh-radius-pill: 999px;
    --lh-radius: var(--lh-radius-lg);
    --lh-shadow-sm: 0 1px 2px rgba(16, 37, 44, .05);
    --lh-shadow: 0 1px 2px rgba(16, 37, 44, .04), 0 2px 8px rgba(16, 37, 44, .04);
    --lh-shadow-lg: 0 12px 32px rgba(16, 37, 44, .14);
    --lh-control-height: 2.375rem;
    --lh-control-height-sm: 2rem;
    --lh-focus: 0 0 0 .2rem rgba(var(--lh-primary-rgb), .3);
    --lh-focus-outline: 2px solid var(--lh-primary);

    /* ---- Bootstrap mapped onto the tokens ---- */
    --bs-primary: var(--lh-primary);
    --bs-primary-rgb: var(--lh-primary-rgb);
    --bs-link-color: var(--lh-primary);
    --bs-link-color-rgb: var(--lh-primary-rgb);
    --bs-link-hover-color: var(--lh-primary-hover);
    --bs-body-font-family: var(--lh-font);
    --bs-body-font-size: var(--lh-fs-base);
    --bs-body-color: var(--lh-text);
    --bs-body-bg: var(--lh-bg);
    --bs-border-color: var(--lh-border);
    --bs-secondary-color: var(--lh-muted);
    --bs-emphasis-color: var(--lh-text-strong);
    --bs-success-text-emphasis: var(--lh-success-fg);
    --bs-danger-text-emphasis: var(--lh-danger-fg);
    --bs-warning-text-emphasis: var(--lh-warning-fg);
}

body { background: var(--lh-bg); font-size: var(--lh-fs-base); line-height: var(--lh-lh-base); color: var(--lh-text); }
h1, h2, h3, h4, h5, h6 { color: var(--lh-text-strong); font-weight: var(--lh-fw-semibold); }
a { color: var(--lh-primary); }
a:hover { color: var(--lh-primary-hover); }
.text-muted, .text-secondary { color: var(--lh-muted) !important; }
.text-success { color: var(--lh-success-fg) !important; }
.text-danger { color: var(--lh-danger-fg) !important; }
.text-warning { color: var(--lh-warning-fg) !important; }
.small-muted { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.fw-bold, .fw-bolder { font-weight: var(--lh-fw-bold) !important; }
/* Flex children that must be allowed to shrink (truncation inside flex rows). Bootstrap has no min-width utility, so the
   markup's .min-w-0 previously did nothing and long text pushed whole pages wider than the window (RF-PLT-02). */
.min-w-0 { min-width: 0 !important; }

/* Type roles (RF-DS-01): use these instead of ad-hoc sizes. */
.lh-page-title { font-size: var(--lh-fs-xl); font-weight: var(--lh-fw-semibold); line-height: var(--lh-lh-tight); }
.lh-section-title { font-size: var(--lh-fs-md); font-weight: var(--lh-fw-semibold); line-height: var(--lh-lh-tight); margin: 0; }
.lh-subheading { font-size: var(--lh-fs-sm); font-weight: var(--lh-fw-semibold); color: var(--lh-text-secondary); margin: 0; }
.lh-body { font-size: var(--lh-fs-base); }
.lh-helper, .form-text { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.lh-meta { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.lh-overline { font-size: var(--lh-fs-overline); font-weight: var(--lh-fw-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--lh-muted); }

/* Visible keyboard focus everywhere (WCAG 2.4.7 / 2.4.11). Mouse clicks keep the quieter look. */
:focus-visible { outline: var(--lh-focus-outline); outline-offset: 2px; }
.btn:focus-visible, .page-link:focus-visible, .nav-link:focus-visible, .dropdown-item:focus-visible { outline: var(--lh-focus-outline); outline-offset: 2px; box-shadow: none; }
/* Inputs already show a focus ring (border plus shadow); no second outline. */
.form-control:focus-visible, .form-select:focus-visible, .form-check-input:focus-visible, .btn-check:focus-visible + .btn { outline: 0; }
.btn-check:focus-visible + .btn { box-shadow: var(--lh-focus); }

/* ---------- Buttons ---------- */
/* Bootstrap compiles its own blue into many components; re-point them at the accent so institute theming flows through. */
.btn { border-radius: var(--lh-radius-md); font-weight: var(--lh-fw-medium); }
.btn-sm { border-radius: var(--lh-radius-sm); }
.btn-primary {
    --bs-btn-bg: var(--lh-primary); --bs-btn-border-color: var(--lh-primary);
    --bs-btn-hover-bg: var(--lh-primary-hover); --bs-btn-hover-border-color: var(--lh-primary-hover);
    --bs-btn-active-bg: var(--lh-primary-hover); --bs-btn-active-border-color: var(--lh-primary-hover);
    --bs-btn-disabled-bg: var(--lh-primary); --bs-btn-disabled-border-color: var(--lh-primary);
    --bs-btn-focus-shadow-rgb: var(--lh-primary-rgb);
}
.btn-outline-primary {
    --bs-btn-color: var(--lh-primary); --bs-btn-border-color: var(--lh-primary);
    --bs-btn-hover-bg: var(--lh-primary); --bs-btn-hover-border-color: var(--lh-primary);
    --bs-btn-active-bg: var(--lh-primary-hover); --bs-btn-active-border-color: var(--lh-primary-hover);
    --bs-btn-focus-shadow-rgb: var(--lh-primary-rgb);
}
/* Success and danger keep their meaning but use the tokens (white text at least 4.5:1). */
.btn-success {
    --bs-btn-bg: var(--lh-success-solid); --bs-btn-border-color: var(--lh-success-solid);
    --bs-btn-hover-bg: var(--lh-success-fg); --bs-btn-hover-border-color: var(--lh-success-fg);
    --bs-btn-active-bg: var(--lh-success-fg); --bs-btn-active-border-color: var(--lh-success-fg);
    --bs-btn-disabled-bg: var(--lh-success-solid); --bs-btn-disabled-border-color: var(--lh-success-solid);
}
.btn-danger {
    --bs-btn-bg: var(--lh-danger-fg); --bs-btn-border-color: var(--lh-danger-fg);
    --bs-btn-hover-bg: #991B1B; --bs-btn-hover-border-color: #991B1B;
    --bs-btn-active-bg: #991B1B; --bs-btn-active-border-color: #991B1B;
    --bs-btn-disabled-bg: var(--lh-danger-fg); --bs-btn-disabled-border-color: var(--lh-danger-fg);
}
.btn-outline-danger {
    --bs-btn-color: var(--lh-danger-fg); --bs-btn-border-color: var(--lh-danger-border);
    --bs-btn-hover-bg: var(--lh-danger-fg); --bs-btn-hover-border-color: var(--lh-danger-fg);
    --bs-btn-active-bg: #991B1B; --bs-btn-active-border-color: #991B1B;
}
/* Bootstrap's amber outline button is 1.63:1 on white (RF-A11Y-06). Amber stays the "attention" colour, with dark text
   (6.43:1 on its fill) and a 5.0:1 border, so the button and its label are readable in every state. */
.btn-outline-warning {
    --bs-btn-color: var(--lh-warning-fg); --bs-btn-border-color: var(--lh-warning-border);
    --bs-btn-hover-color: var(--lh-warning-fg); --bs-btn-hover-bg: var(--lh-warning-bg); --bs-btn-hover-border-color: var(--lh-warning-border);
    --bs-btn-active-color: var(--lh-warning-fg); --bs-btn-active-bg: var(--lh-warning-bg); --bs-btn-active-border-color: var(--lh-warning-fg);
    --bs-btn-disabled-color: var(--lh-warning-fg); --bs-btn-disabled-border-color: var(--lh-warning-border);
}
.btn-check:checked + .btn-outline-warning, .btn-outline-warning.active { color: var(--lh-warning-fg); background: var(--lh-warning-bg); border-color: var(--lh-warning-fg); }
.btn-outline-secondary {
    --bs-btn-color: var(--lh-text-secondary); --bs-btn-border-color: var(--lh-border-strong);
    --bs-btn-hover-color: var(--lh-text-strong); --bs-btn-hover-bg: var(--lh-surface-alt); --bs-btn-hover-border-color: var(--lh-neutral-border);
    --bs-btn-active-color: var(--lh-text-strong); --bs-btn-active-bg: var(--lh-surface-alt); --bs-btn-active-border-color: var(--lh-neutral-border);
}
.btn-light { --bs-btn-bg: var(--lh-surface-alt); --bs-btn-border-color: var(--lh-surface-alt); --bs-btn-hover-bg: #E3EBED; --bs-btn-hover-border-color: #E3EBED; --bs-btn-color: var(--lh-text); }
.btn-highlight { background: var(--lh-highlight); border-color: var(--lh-highlight); color: #fff; }
.btn-highlight:hover { background: #B45309; border-color: #B45309; color: #fff; }
.text-primary { color: var(--lh-primary) !important; }
.bg-primary { background-color: var(--lh-primary) !important; }
.border-primary { border-color: var(--lh-primary) !important; }

/* ---------- Form controls ---------- */
.form-label { font-weight: var(--lh-fw-medium); font-size: var(--lh-fs-sm); color: var(--lh-text-secondary); }
.form-control, .form-select { border-radius: var(--lh-radius-md); border-color: var(--lh-border-strong); }
.form-control:not(textarea):not([type="file"]):not(.form-control-sm):not(.form-control-lg), .form-select:not(.form-select-sm):not([multiple]):not([size]) { min-height: var(--lh-control-height); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--lh-primary); box-shadow: var(--lh-focus); }
.form-check-input { border-color: var(--lh-neutral-border); }
.form-check-input:checked { background-color: var(--lh-primary); border-color: var(--lh-primary); }
.input-group-text { background: var(--lh-surface-alt); border-color: var(--lh-border-strong); }
.field-validation-error, .text-danger.field-validation-error { font-size: var(--lh-fs-xs); }
.input-validation-error { border-color: var(--lh-danger-border) !important; }
.pagination { --bs-pagination-color: var(--lh-primary); --bs-pagination-hover-color: var(--lh-primary-hover); --bs-pagination-active-bg: var(--lh-primary); --bs-pagination-active-border-color: var(--lh-primary); --bs-pagination-focus-box-shadow: var(--lh-focus); }
.list-group { --bs-list-group-active-bg: var(--lh-primary); --bs-list-group-active-border-color: var(--lh-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--lh-primary); border-color: var(--lh-border); border-radius: var(--lh-radius-md); box-shadow: var(--lh-shadow-lg); }
/* Bootstrap's progress bar is its own blue; follow the institute accent (RF-BR-06). */
.progress { --bs-progress-bar-bg: var(--lh-primary); --bs-progress-bg: var(--lh-surface-alt); }
.alert { border-radius: var(--lh-radius-md); }
.alert-info { --bs-alert-bg: var(--lh-primary-soft); --bs-alert-border-color: rgba(var(--lh-primary-rgb), .25); --bs-alert-color: var(--lh-primary-hover); }
.alert-success { --bs-alert-bg: var(--lh-success-bg); --bs-alert-border-color: #BFE3CB; --bs-alert-color: var(--lh-success-fg); }
.alert-warning { --bs-alert-bg: var(--lh-warning-bg); --bs-alert-border-color: #F3D9A4; --bs-alert-color: var(--lh-warning-fg); }
.alert-danger { --bs-alert-bg: var(--lh-danger-bg); --bs-alert-border-color: #F5C2C2; --bs-alert-color: var(--lh-danger-fg); }
.table-light { --bs-table-bg: var(--lh-surface-alt); }
.table-hover > tbody > tr:hover > * { --bs-table-hover-bg: var(--lh-surface-hover); }
.modal { --bs-modal-border-radius: var(--lh-radius-lg); --bs-modal-border-color: var(--lh-border); }

/* Field component (RF-FRM-01; FieldTagHelper renders this markup). */
.lh-field { margin-bottom: var(--lh-space-4); }
.lh-field .form-label { margin-bottom: var(--lh-space-1); }
.lh-field .req { color: var(--lh-danger-fg); font-weight: var(--lh-fw-semibold); margin-left: .2rem; }
.lh-field .opt { font-weight: var(--lh-fw-regular); color: var(--lh-muted); font-size: var(--lh-fs-xs); margin-left: .4rem; }
.lh-field .form-text { margin-top: var(--lh-space-1); }
.lh-fieldset { border: 0; padding: 0; margin: 0 0 var(--lh-space-5); }
.lh-fieldset > legend { font-size: var(--lh-fs-md); font-weight: var(--lh-fw-semibold); margin-bottom: var(--lh-space-1); }
.lh-fieldset > .lh-helper { margin-bottom: var(--lh-space-3); }
/* Progressive disclosure: <details class="lh-disclosure"> for optional or advanced settings. */
.lh-disclosure { border: 1px solid var(--lh-border); border-radius: var(--lh-radius-md); background: var(--lh-surface); }
.lh-disclosure > summary { cursor: pointer; list-style: none; padding: var(--lh-space-3) var(--lh-space-4); font-weight: var(--lh-fw-semibold); display: flex; gap: var(--lh-space-2); align-items: center; }
.lh-disclosure > summary::-webkit-details-marker { display: none; }
.lh-disclosure > summary::after { content: "+"; margin-left: auto; color: var(--lh-muted); font-weight: var(--lh-fw-regular); }
.lh-disclosure[open] > summary::after { content: "\2212"; }
.lh-disclosure > summary .lh-helper { font-weight: var(--lh-fw-regular); }
.lh-disclosure > .body { padding: 0 var(--lh-space-4) var(--lh-space-4); }

/* ---------- App shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar {
    background: var(--lh-sidebar); color: var(--lh-sidebar-text); width: 248px;
    --bs-offcanvas-width: 248px; --bs-offcanvas-bg: var(--lh-sidebar);
    /* A thin, visible scrollbar tells people the menu continues below the fold (RF-NAV-05). */
    scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .45) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .45); border-radius: var(--lh-radius-pill); }
.sidebar::-webkit-scrollbar-track { background: transparent; }
@media (min-width: 992px) {
    /* Bootstrap's .offcanvas-lg sets background-color: transparent !important at this width; keep the sidebar colour. */
    .sidebar.offcanvas-lg { position: fixed; inset: 0 auto 0 0; background-color: var(--lh-sidebar) !important; overflow-y: auto; }
    .app-main { margin-left: 248px; }
    /* Owner request (15 Nov 2026): the top bar's button hides and shows the sidebar on wide screens. */
    .sidebar-animate .sidebar.offcanvas-lg { transition: transform .2s ease, visibility .2s; }
    .sidebar-animate .app-main { transition: margin-left .2s ease; }
    .sidebar-collapsed .sidebar.offcanvas-lg { transform: translateX(-100%); visibility: hidden; }
    .sidebar-collapsed .app-main { margin-left: 0; }
}
/* The toggle's arrow sits inside the sidebar icon's open panel (to the right of the panel divider). */
.sidebar-toggle-icon { position: relative; display: inline-block; line-height: 1; }
.sidebar-toggle-arrow { position: absolute; top: 50%; left: 62%; transform: translate(-50%, -50%); font-size: .45em; -webkit-text-stroke: .5px; }
@media (prefers-reduced-motion: reduce) {
    .sidebar-animate .sidebar.offcanvas-lg, .sidebar-animate .app-main { transition: none; }
}
.sidebar .brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: var(--lh-fw-bold); font-size: 1.2rem; padding: 1.4rem 1.4rem 1.6rem; text-decoration: none; }
.sidebar .brand i { color: #FBBF24; font-size: 1.6rem; }
.sidebar .nav-section { font-size: var(--lh-fs-overline); font-weight: var(--lh-fw-semibold); text-transform: uppercase; letter-spacing: .08em; color: var(--lh-sidebar-muted); padding: 1rem 1.4rem .4rem; }
.sidebar .nav-link { color: var(--lh-sidebar-text); display: flex; align-items: center; gap: .8rem; padding: .6rem 1rem; margin: 1px .6rem; border-radius: var(--lh-radius-md); font-weight: var(--lh-fw-medium); }
.sidebar .nav-link i { font-size: 1.1rem; width: 1.2rem; }
/* Hover and active are darker shades of the site colour, so white text keeps (or gains) contrast. */
.sidebar .nav-link:hover { color: var(--site-primary-contrast); background: var(--site-primary-hover); }
.sidebar .nav-link.active { color: var(--site-primary-contrast); background: var(--site-primary-active); box-shadow: inset 3px 0 0 var(--site-primary-contrast); font-weight: var(--lh-fw-semibold); }
.sidebar .nav-link:focus-visible { outline: 2px solid var(--site-primary-contrast); outline-offset: -3px; }
.sidebar .tenant-chip { margin: 0 1rem 1rem; padding: .75rem; border-radius: var(--lh-radius-lg); background: var(--site-primary-hover); display: flex; gap: .6rem; align-items: center; color: var(--site-primary-contrast); font-size: var(--lh-fs-sm); }
.sidebar .tenant-chip .logo-tile { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.skip-link:focus { position: fixed; z-index: 1080; top: .5rem; left: .5rem; }
/* Learner shell (R3): the institute's identity heads the menu; the platform name sits at its foot. */
.learner-brand { display: flex; align-items: center; gap: .7rem; padding: 1.2rem 1.2rem 1.1rem; color: var(--site-primary-contrast); text-decoration: none; min-width: 0; }
.learner-brand:hover { color: var(--site-primary-contrast); }
.learner-brand .logo-tile { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.learner-brand .name { display: block; font-weight: var(--lh-fw-bold); line-height: 1.2; }
.learner-brand .sub { display: block; font-size: var(--lh-fs-xs); color: var(--lh-sidebar-muted); }
.sidebar-foot { color: var(--lh-sidebar-muted); }
/* Phones: one "back to parent" link instead of the hidden breadcrumb trail, and titles may wrap (RF-RSP-01). */
.crumb-back { display: inline-flex; align-items: center; gap: .2rem; font-size: var(--lh-fs-xs); color: var(--lh-muted); text-decoration: none; margin-bottom: .1rem; }
.crumb-back:hover { color: var(--lh-primary); }
@media (max-width: 575.98px) { .topbar .page-heading h1 { white-space: normal; font-size: var(--lh-fs-lg); } }

/* Learner overview (R3). */
.next-up { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; padding: 1.25rem 1.5rem; border-radius: var(--lh-radius-lg);
    background: var(--lh-primary-soft); border: 1px solid rgba(var(--lh-primary-rgb), .2); margin-bottom: 1.25rem; }
.next-up .what { flex: 1 1 18rem; min-width: 0; }
.next-up .eyebrow { font-size: var(--lh-fs-overline); font-weight: var(--lh-fw-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--lh-primary-hover); }
.next-up .title { font-size: var(--lh-fs-lg); font-weight: var(--lh-fw-semibold); color: var(--lh-text-strong); margin: .15rem 0 .1rem; }
.next-up.urgent { background: var(--lh-warning-bg); border-color: #F3D9A4; }
.next-up.urgent .eyebrow { color: var(--lh-warning-fg); }
.priority-list { list-style: none; margin: 0; padding: 0; }
.priority-list li { display: flex; gap: .85rem; align-items: center; padding: .8rem 1.25rem; border-top: 1px solid var(--lh-border); }
.priority-list li:first-child { border-top: 0; }
.priority-list .what { flex: 1 1 auto; min-width: 0; }
.priority-list .level { flex: none; }
.area-card { display: flex; flex-direction: column; height: 100%; }
.area-card .card-body { flex: 1 1 auto; }
.area-card .figure { font-size: var(--lh-fs-2xl); font-weight: var(--lh-fw-bold); color: var(--lh-text-strong); line-height: 1.1; }
.course-row { display: flex; gap: .75rem; align-items: center; padding: .55rem 0; }
.course-row + .course-row { border-top: 1px solid var(--lh-border); }
.course-row .meter { flex: 0 0 4rem; }
@media (max-width: 575.98px) {
    /* Phones: the title takes the full row; the status and the action move to a second line. */
    .priority-list li { flex-wrap: wrap; row-gap: .5rem; }
    .priority-list .what { flex: 1 1 calc(100% - 36px - 1rem); }
    .priority-list .level { margin-left: calc(36px + .85rem); }
    .priority-list .what .text-truncate { white-space: normal; }
}
.assess-group + .assess-group { margin-top: 1.5rem; }

.topbar { background: var(--lh-surface); border-bottom: 1px solid var(--lh-border); padding: .75rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 10; }
.topbar .page-heading h1 { font-size: var(--lh-fs-xl); font-weight: var(--lh-fw-semibold); line-height: var(--lh-lh-tight); margin: 0; }
.topbar .page-heading p { margin: 0; color: var(--lh-muted); font-size: var(--lh-fs-sm); }
/* Header "Go Back" action: a compact pill beside the profile menu; icon only on small screens. */
.btn-back {
    display: inline-flex; align-items: center; gap: .45rem; flex: none;
    padding: .45rem 1rem; border-radius: var(--lh-radius-pill); font-weight: var(--lh-fw-semibold); font-size: var(--lh-fs-sm);
    color: var(--lh-primary); background: var(--lh-primary-soft); border: 1px solid rgba(var(--lh-primary-rgb), .25);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-back i { font-size: 1rem; transition: transform .15s ease; }
.btn-back:hover, .btn-back:focus-visible { color: #fff; background: var(--lh-primary); border-color: var(--lh-primary); }
.btn-back:hover i { transform: translateX(-2px); }
@media (max-width: 575.98px) { .btn-back { padding: .45rem .7rem; } .btn-back span { display: none; } }
.content { padding: 1.5rem; }
@media (max-width: 575.98px) { .content { padding: 1rem; } .topbar { padding: .75rem 1rem; } }

/* Page header inside the content area (RF-DS-13): title block on the left, one primary action on the right,
   secondary actions in a menu. Use this when a page needs more than the topbar title, e.g. an object header. */
.lh-page-header { display: flex; flex-wrap: wrap; gap: var(--lh-space-3) var(--lh-space-4); align-items: flex-start; margin-bottom: var(--lh-space-5); }
.lh-page-header .heading { flex: 1 1 18rem; min-width: 0; }
.lh-page-header .heading h2 { font-size: var(--lh-fs-lg); margin: 0; }
.lh-page-header .heading p { margin: var(--lh-space-1) 0 0; color: var(--lh-muted); font-size: var(--lh-fs-sm); }
.lh-page-header .actions { display: flex; flex-wrap: wrap; gap: var(--lh-space-2); align-items: center; }

/* ---------- Cards & tables ---------- */
.card { border: 1px solid var(--lh-border); border-radius: var(--lh-radius-lg); box-shadow: var(--lh-shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--lh-border); padding: 1rem 1.25rem; font-weight: var(--lh-fw-semibold); display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
/* A heading used as a card title (RF-A11Y-04): same look as the card header text. */
.card-header :is(h2, h3, h4).card-title, .card-header .lh-section-title { font-size: var(--lh-fs-md); font-weight: var(--lh-fw-semibold); margin: 0; }
.card-body { padding: 1.25rem; }
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .75rem 1rem; border-color: var(--lh-border); vertical-align: middle; }
.table thead th { font-size: var(--lh-fs-overline); text-transform: uppercase; letter-spacing: .04em; color: var(--lh-muted); font-weight: var(--lh-fw-semibold); background: var(--lh-surface-alt); }

/* One KPI style (stat-card on M01 dashboards and kpi-card on M05+ pages share sizes). */
.stat-card { display: flex; gap: 1rem; align-items: center; }
.stat-icon { width: 44px; height: 44px; border-radius: var(--lh-radius-md); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.stat-icon.sm { width: 36px; height: 36px; font-size: 1rem; }
.stat-icon.md { width: 40px; height: 40px; font-size: 1.15rem; }
.stat-icon.lg { width: 56px; height: 56px; font-size: 1.5rem; }
.stat-value { font-size: var(--lh-fs-2xl); font-weight: var(--lh-fw-bold); line-height: 1.1; color: var(--lh-text-strong); }
.stat-label { color: var(--lh-muted); font-size: var(--lh-fs-xs); }
.trend-up { color: var(--lh-success-fg); font-size: var(--lh-fs-xs); font-weight: var(--lh-fw-semibold); }
.trend-down { color: var(--lh-danger-fg); font-size: var(--lh-fs-xs); font-weight: var(--lh-fw-semibold); }

/* Icon tones are decorative, so they share one brand tint (RF-DS-03); colour is reserved for status (badges, alerts). */
.tone-blue, .tone-purple, .tone-green, .tone-orange, .tone-red { background: var(--lh-primary-soft); color: var(--lh-primary); }

/* Status badges: always text plus colour, never colour alone. */
.badge-soft { display: inline-block; padding: .25em .65em; border-radius: var(--lh-radius-sm); font-size: var(--lh-fs-xs); font-weight: var(--lh-fw-semibold); line-height: 1.4; white-space: nowrap; }
.badge-soft.success { background: var(--lh-success-bg); color: var(--lh-success-fg); }
.badge-soft.warning { background: var(--lh-warning-bg); color: var(--lh-warning-fg); }
.badge-soft.danger { background: var(--lh-danger-bg); color: var(--lh-danger-fg); }
.badge-soft.info { background: var(--lh-info-bg); color: var(--lh-info-fg); }
/* Category badges (plans, roles). "teal" follows the institute brand instead of fixed platform teal (RF-BR-02). */
.badge-soft.purple { background: #F1EAFB; color: #6B21A8; }
.badge-soft.teal { background: var(--lh-primary-soft); color: var(--lh-primary-hover); }
.badge-soft.neutral { background: var(--lh-neutral-bg); color: var(--lh-neutral-fg); }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: var(--lh-fw-semibold); font-size: var(--lh-fs-xs); flex: none; background: var(--lh-highlight-soft); color: #92400E; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.logo-tile { width: 40px; height: 40px; border-radius: var(--lh-radius-md); display: inline-grid; place-items: center; color: #fff; font-weight: var(--lh-fw-bold); flex: none; overflow: hidden; }
.logo-tile img { width: 100%; height: 100%; object-fit: cover; }
.logo-tile.lg { width: 72px; height: 72px; font-size: 1.5rem; border-radius: var(--lh-radius-lg); }

/* ---------- Tabs (RF-DS-08) ---------- */
/* Standard: .lh-tabs for page sections (below). Segmented pills (.pill-tabs, .nav-pills-soft) for filters and views.
   .nav-underline and .side-tabs are legacy; they share the same tokens until their pages are refined. */
.nav-underline .nav-link { color: var(--lh-muted); font-weight: var(--lh-fw-semibold); }
.nav-underline .nav-link:hover { color: var(--lh-text-strong); }
.nav-underline .nav-link.active { color: var(--lh-primary); border-bottom-color: var(--lh-primary); }
.nav-pills-soft .nav-link { color: var(--lh-text-secondary); border-radius: var(--lh-radius-md); font-weight: var(--lh-fw-medium); padding: .45rem .9rem; }
.nav-pills-soft .nav-link.active { background: var(--lh-primary-soft); color: var(--lh-primary-hover); font-weight: var(--lh-fw-semibold); }
.side-tabs .nav-link { color: var(--lh-text-secondary); display: flex; gap: .6rem; align-items: center; border-radius: var(--lh-radius-md); padding: .65rem .9rem; }
.side-tabs .nav-link.active { background: var(--lh-primary-soft); color: var(--lh-primary-hover); font-weight: var(--lh-fw-semibold); }

/* R4: positioned, so absolutely placed content inside (a visually hidden table heading) is clipped with the table instead of widening the page. */
.scroll-x { overflow-x: auto; position: relative; }
/* Whole-row links (owner request, 15 Nov 2026): the row is the target; its subject link underlines when the row is hovered. */
tr.row-link { cursor: pointer; }
tr.row-link:hover > * { background-color: var(--lh-surface-alt); }
.row-link-target { font-weight: var(--lh-fw-semibold); text-decoration: none; }
tr.row-link:hover .row-link-target, .row-link-target:focus-visible { text-decoration: underline; }

/* ---------- Empty state (one definition; _EmptyState partial renders it) ---------- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--lh-muted); }
.empty-state i { display: block; font-size: 2rem; color: var(--lh-primary); opacity: .8; margin-bottom: .5rem; }
.empty-state .title { font-weight: var(--lh-fw-semibold); color: var(--lh-text-strong); margin-bottom: .25rem; }
.empty-state .text { font-size: var(--lh-fs-sm); max-width: 32rem; margin: 0 auto; }
.empty-state .actions { margin-top: var(--lh-space-4); display: flex; gap: var(--lh-space-2); justify-content: center; flex-wrap: wrap; }

/* ---------- Loading state ---------- */
.lh-loading { display: inline-flex; gap: var(--lh-space-2); align-items: center; color: var(--lh-muted); font-size: var(--lh-fs-sm); }
.lh-loading::before { content: ""; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--lh-border-strong); border-top-color: var(--lh-primary); animation: lh-spin .8s linear infinite; }
@keyframes lh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lh-loading::before { animation: none; } }

/* ---------- Stepper (RF-DS-09): one look for ol.wizard-steps > li (assessments, activities) and the registration
   wizard's .wizard-steps > .step markup; app.js toggles .active/.done on the latter. ---------- */
.wizard-steps { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; counter-reset: step; }
.wizard-steps li, .wizard-steps .step { display: flex; align-items: center; gap: .55rem; font-size: var(--lh-fs-sm); font-weight: var(--lh-fw-semibold); color: var(--lh-muted); }
.wizard-steps li a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .55rem; }
.wizard-steps .num { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 2px solid var(--lh-border-strong); background: var(--lh-surface); font-size: var(--lh-fs-xs); }
.wizard-steps li.done .num, .wizard-steps .step.done .num { border-color: var(--lh-primary); color: var(--lh-primary); }
.wizard-steps li.current, .wizard-steps .step.active { color: var(--lh-text-strong); }
.wizard-steps li.current .num, .wizard-steps .step.active .num { border-color: var(--lh-primary); background: var(--lh-primary); color: #fff; }
.wizard-steps li + li::before, .wizard-steps .step + .step::before { content: ""; width: 1.5rem; height: 2px; background: var(--lh-border); margin-right: .25rem; }
@media (max-width: 767.98px) { .wizard-steps .label { display: none; } .wizard-steps li.current .label { display: inline; } .wizard-steps li + li::before, .wizard-steps .step + .step::before { width: .75rem; } }
.wizard-panel[hidden] { display: none; }
.plan-option { border: 1.5px solid var(--lh-border); border-radius: var(--lh-radius-lg); padding: 1rem; cursor: pointer; height: 100%; display: block; }
.plan-option:has(input:checked) { border-color: var(--lh-primary); background: var(--lh-primary-soft); }
.plan-option:has(input:focus-visible) { box-shadow: var(--lh-focus); }
.promo-panel { background: linear-gradient(160deg, var(--lh-primary-soft), #F8FBFB); border-radius: var(--lh-radius-lg); padding: 1.5rem; height: 100%; }
.promo-panel li { list-style: none; display: flex; gap: .5rem; margin-bottom: .55rem; font-size: var(--lh-fs-sm); }
.promo-panel li i { color: var(--lh-highlight); }

/* ---------- Usage meters & permissions ---------- */
.meter { height: 8px; border-radius: var(--lh-radius-pill); background: var(--lh-surface-alt); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--lh-primary); border-radius: var(--lh-radius-pill); }
.perm-group { border: 1px solid var(--lh-border); border-radius: var(--lh-radius-lg); padding: .9rem 1rem; height: 100%; }
.perm-group h6 { font-size: var(--lh-fs-overline); text-transform: uppercase; letter-spacing: .05em; color: var(--lh-muted); }
.matrix th, .matrix td { text-align: center; white-space: nowrap; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix .bi-check-circle-fill { color: var(--lh-primary); }
.matrix .bi-dash { color: var(--lh-disabled); }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--lh-fs-xs); background: var(--lh-surface-alt); border-radius: var(--lh-radius-md); padding: .5rem .75rem; word-break: break-all; }

/* ---------- Danger zone (irreversible actions, kept apart from routine ones) ---------- */
.danger-zone { border: 1px solid #F5C2C2; border-radius: var(--lh-radius-lg); background: var(--lh-surface); }
.danger-zone > .head { padding: 1rem 1.25rem; border-bottom: 1px solid #F5C2C2; }
.danger-zone > .head h2 { font-size: var(--lh-fs-md); color: var(--lh-danger-fg); margin: 0; }
.danger-zone > .body { padding: 1.25rem; }
.consequences { padding-left: 1.1rem; margin: 0 0 1rem; }
.consequences li { margin-bottom: .25rem; }

/* ---------- Confirmation dialog (app.js builds it for [data-confirm-dialog]) ---------- */
.lh-confirm .modal-body p:last-child { margin-bottom: 0; }
.lh-confirm .subject { font-weight: var(--lh-fw-semibold); color: var(--lh-text-strong); }

/* ---------- Editor action bar and unsaved-changes state (RF-EDT-01 pattern) ---------- */
.editor-actions { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end;
    padding: .75rem 1.25rem; background: var(--lh-surface); border-top: 1px solid var(--lh-border); border-radius: 0 0 var(--lh-radius-lg) var(--lh-radius-lg); }
.editor-actions .me-auto { margin-right: auto; }
.unsaved-indicator { display: inline-flex; gap: .35rem; align-items: center; font-size: var(--lh-fs-xs); font-weight: var(--lh-fw-semibold); color: var(--lh-warning-fg); background: var(--lh-warning-bg); border-radius: var(--lh-radius-pill); padding: .2rem .65rem; }
.unsaved-indicator[hidden] { display: none; }

/* ---------- Auth & public pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 1rem; }
.auth-card { width: 100%; max-width: 440px; }
.public-nav { background: var(--lh-surface); border-bottom: 1px solid var(--lh-border); }
.hero { padding: 4.5rem 0; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
.feature-card i { font-size: 1.6rem; color: var(--lh-primary); }

.portal-hero { color: #fff; padding: 5rem 0; background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary)); }
.portal-hero h1 { font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); }
/* The global heading colour (h1–h6 above) would beat the white inherited from the hero; headings here follow the hero. */
.portal-hero :is(h1, h2, h3, h4, h5, h6) { color: inherit; }
.btn-brand { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn-brand:hover { filter: brightness(.92); color: #fff; }
.text-brand { color: var(--brand-primary); }
.preview-frame { border: 1px solid var(--lh-border); border-radius: var(--lh-radius-lg); overflow: hidden; }
.preview-frame .bar { background: var(--lh-surface-alt); padding: .4rem .75rem; font-size: var(--lh-fs-overline); color: var(--lh-muted); display: flex; gap: .4rem; align-items: center; }
.preview-frame .bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lh-border-strong); }
.preview-frame .hero-mini { padding: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary)); }

/* ---------- Warm accents (public site) ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, var(--lh-highlight-soft), transparent 60%), radial-gradient(900px 400px at 0% 0%, var(--lh-primary-soft), transparent 55%); }
.badge-highlight { background: var(--lh-highlight-soft); color: #92400E; }

/* ---------- M02: website content and catalogue ---------- */
.prose { line-height: 1.7; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: 1.6rem; margin-bottom: .6rem; font-weight: var(--lh-fw-bold); }
.prose > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--lh-radius-md); }
.prose table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--bs-border-color); padding: .4rem .6rem; }
.prose blockquote { border-left: 4px solid var(--brand-primary, var(--lh-primary)); padding-left: 1rem; color: var(--bs-secondary-color); }
.prose pre { background: var(--lh-surface-alt); padding: .75rem 1rem; border-radius: var(--lh-radius-md); }
.md-source { min-height: 18rem; font-size: var(--lh-fs-sm); }
.md-preview { max-height: 32rem; overflow: auto; }
.md-insert img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--lh-radius-sm); display: block; }
.media-tile { display: block; color: inherit; text-decoration: none; }
.media-tile:hover .media-thumb { outline: 2px solid var(--lh-primary); }
.media-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--lh-surface-alt); border-radius: var(--lh-radius-md); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-thumb i { font-size: 2.5rem; color: var(--bs-secondary-color); }
.media-preview img { max-width: 100%; max-height: 28rem; }
.thumb-preview { max-height: 8rem; border-radius: var(--lh-radius-md); }
.course-card { overflow: hidden; }
.course-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--brand-primary, var(--lh-primary)) 12%, white); }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; }
.course-thumb i { font-size: 2.5rem; color: var(--brand-primary, var(--lh-primary)); }
.catalogue-search { min-width: min(100%, 22rem); }
.preview-banner { background: var(--lh-warning-bg); color: #78350F; padding: .6rem 0; border-bottom: 1px solid #F3D9A4; }
.footer-text { white-space: pre-line; }

/* ---------- M03: forms, components, templates, modules ---------- */
.component-chip { display: inline-block; background: #EEF2FF; color: #3730A3; border: 1px dashed #A5B4FC; border-radius: var(--lh-radius-md); padding: .35rem .75rem; font-size: var(--lh-fs-sm); }
.content-component { margin: 1.5rem 0; }
.content-component .public-form h2 { margin-top: 0; }
.public-form { max-width: 44rem; }
.submission-values dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.module-soon { opacity: .75; border-style: dashed; }
.template-card .media-thumb { aspect-ratio: 16 / 9; border-radius: 0; }
/* Form width modifiers instead of inline max-width styles (RF-DS-07). */
.form-narrow { max-width: 32rem; }
.form-medium { max-width: 44rem; }
.form-wide { max-width: 56rem; }


/* ---------- Platform landing page (platform host only; institute portals keep .portal-hero) ---------- */
.landing-hero { position: relative; overflow: hidden; overflow-x: clip; padding: 3.5rem 0 6rem; background: linear-gradient(180deg, #F3FAF8 0%, var(--lh-bg) 100%); }
.landing-glow { position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(40rem 22rem at 85% 20%, rgba(20, 184, 166, .14), transparent 70%),
                radial-gradient(28rem 18rem at 8% 85%, rgba(245, 158, 11, .10), transparent 70%); }
.landing-eyebrow { display: inline-block; padding: .35rem .8rem; border-radius: 999px; background: var(--lh-primary-soft); color: var(--lh-primary-hover); font-size: .78rem; font-weight: 600; }
.landing-title { margin-top: 1rem; font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.landing-accent { color: var(--lh-primary); position: relative; }
@media (min-width: 576px) { .landing-accent { white-space: nowrap; } }   /* keep "in minutes." together where it fits */
.landing-accent::after { content: ""; position: absolute; left: 2%; right: 4%; bottom: -.12em; height: .16em; border-radius: 999px;
    background: linear-gradient(90deg, var(--lh-primary), #F59E0B); opacity: .85; }
.landing-lead { margin-top: 1.25rem; font-size: 1.1rem; color: var(--lh-text-secondary); max-width: 34rem; }
.landing-cta { box-shadow: 0 8px 20px rgba(var(--lh-primary-rgb), .25); }
.landing-trust li { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--lh-text-strong); }
.landing-trust i { color: var(--lh-primary); font-size: 1.05rem; }
.landing-art { width: 100%; height: auto; max-width: 620px; display: block; margin-inline: auto; filter: drop-shadow(0 18px 30px rgba(19, 78, 74, .12)); }

.landing-strip-wrap { position: relative; margin-top: -3.25rem; z-index: 2; }
.landing-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; padding: 1.5rem; background: var(--lh-surface);
    border: 1px solid var(--lh-border); border-radius: 18px; box-shadow: 0 12px 32px rgba(28, 25, 23, .08); }
.landing-strip-item { display: flex; gap: .85rem; align-items: flex-start; }
.landing-strip-item + .landing-strip-item { border-left: 1px solid var(--lh-border); padding-left: 1.25rem; }

.landing-section { padding-top: 4.5rem; }
.landing-h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.02em; }
.landing-feature { height: 100%; padding: 1.5rem; background: var(--lh-surface); border: 1px solid var(--lh-border); border-radius: 16px; transition: transform .15s ease, box-shadow .15s ease; }
.landing-feature:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(28, 25, 23, .08); }
.landing-feature h3, .landing-step h3 { font-size: 1.05rem; font-weight: 700; margin: 1rem 0 .4rem; }
.landing-feature p, .landing-step p { margin: 0; color: var(--lh-muted); }

.landing-band { margin-top: 4.5rem; padding: 4rem 0; background: linear-gradient(180deg, #EEF7F5, #F7FBFA); border-block: 1px solid #DCEFEB; }
.landing-step { position: relative; height: 100%; padding: 1.5rem; background: var(--lh-surface); border-radius: 16px; box-shadow: var(--lh-shadow); }
.landing-step-no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--lh-primary); color: #fff; font-weight: 800; }

.landing-plan { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.5rem; background: var(--lh-surface); border: 1px solid var(--lh-border);
    border-radius: 16px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.landing-plan:hover { transform: translateY(-3px); border-color: rgba(var(--lh-primary-rgb), .45); box-shadow: 0 14px 30px rgba(var(--lh-primary-rgb), .12); }
.landing-price { font-size: 1.35rem; font-weight: 800; color: var(--lh-text-strong); letter-spacing: -.01em; }
.landing-checks li { display: flex; gap: .45rem; margin-bottom: .45rem; }
.landing-checks i { color: var(--lh-success-solid); font-weight: 700; }
.landing-plan .btn { margin-top: auto; }

.landing-final { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; padding: 2.25rem 2.5rem; border-radius: 20px; color: #E6F4F1;
    background: radial-gradient(30rem 14rem at 90% 0%, rgba(245, 158, 11, .25), transparent 70%), linear-gradient(135deg, #134E4A, #0F766E); }
.landing-final h2 { color: #fff; }

.landing-footer { padding: 3rem 0 1.5rem; background: #0F3B38; color: #A7C9C3; font-size: .9rem; }
.landing-footer a { color: #CDE5E1; text-decoration: none; }
.landing-footer a:hover { color: #fff; text-decoration: underline; }
.landing-footer li { margin-bottom: .4rem; }
.landing-footer-head { color: #fff; font-weight: 700; margin-bottom: .6rem; }
.landing-footer-bottom { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .8125rem; }

@media (max-width: 991.98px) {
    .landing-hero { padding-bottom: 5rem; }
    .landing-strip { grid-template-columns: repeat(2, 1fr); }
    .landing-strip-item + .landing-strip-item { border-left: 0; padding-left: 0; }
}
@media (max-width: 575.98px) {
    .landing-strip { grid-template-columns: 1fr; }
    .landing-final { padding: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .landing-feature, .landing-plan { transition: none; }
    .landing-feature:hover, .landing-plan:hover { transform: none; }
}

/* ---------- M05 assessment UI (closure redesign): reusable components on the shared tokens ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: var(--lh-fs-xs); color: var(--lh-muted); margin-bottom: .15rem; }
.crumbs a { color: var(--lh-muted); text-decoration: none; }
.crumbs a:hover { color: var(--lh-primary); text-decoration: underline; }
.crumbs .sep { opacity: .6; }

.page-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.25rem; }
.page-toolbar .lead-text { color: var(--lh-muted); margin: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.kpi-card { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.15rem; background: var(--lh-surface); border: 1px solid var(--lh-border); border-radius: var(--lh-radius-lg); min-width: 0; }
.kpi-card .kpi-value { font-size: var(--lh-fs-2xl); font-weight: var(--lh-fw-bold); line-height: 1.1; color: var(--lh-text-strong); }
.kpi-card .kpi-label { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
@media (max-width: 991.98px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479.98px) { .kpi-grid { grid-template-columns: 1fr; } }

/* Filter bar (RF-TBL-01 standard): selects apply on change (data-autosubmit), Enter applies the search box, and a
   "Clear filters" link appears whenever a filter is active. */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--lh-border); }
.filter-bar .search { position: relative; flex: 1 1 16rem; max-width: 24rem; }
.filter-bar .search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--lh-muted); pointer-events: none; }
.filter-bar .search input { padding-left: 2.2rem; }
.filter-bar .form-select { width: auto; min-width: 9.5rem; max-width: 15rem; flex: 0 1 auto; }
.filter-bar input[type="date"].form-control { width: auto; flex: 0 1 10.5rem; }
.filter-bar .clear-filters { font-size: var(--lh-fs-sm); white-space: nowrap; }
/* A validation summary with no errors renders as an empty element; styled as an alert it showed an empty red box. */
.validation-summary-valid { display: none; }
/* M09 Phase 3: the proctoring waiting room and admission list. */
.readiness-steps { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; counter-reset: step; }
.readiness-steps li { counter-increment: step; flex: 1 1 8rem; padding: .55rem .75rem; border: 1px solid var(--lh-border); border-radius: var(--lh-radius-md); font-size: var(--lh-fs-sm); color: var(--lh-muted); background: var(--lh-surface, #fff); }
.readiness-steps li::before { content: counter(step) ". "; font-weight: 600; }
.readiness-steps li.current { border-color: var(--site-primary, #0F766E); color: inherit; font-weight: 600; }
.readiness-steps li.done { color: inherit; }
.readiness-steps li.done::before { content: "✓ "; color: var(--lh-success-fg); }
.device-probes li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--lh-border); }
.device-probes li[data-state="ok"] [data-label] { color: var(--lh-success-fg); }
.device-probes li[data-state="fail"] [data-label] { color: var(--lh-danger-fg); }
.disclosure-list li { margin-bottom: .35rem; }

.lh-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--lh-border); margin-bottom: 1.25rem; overflow-x: auto; scrollbar-width: none; }
.lh-tabs a { padding: .65rem .95rem; color: var(--lh-muted); font-weight: var(--lh-fw-semibold); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.lh-tabs a:hover { color: var(--lh-text-strong); }
.lh-tabs a.active { color: var(--lh-primary); border-bottom-color: var(--lh-primary); }
.lh-tabs a .count { font-weight: var(--lh-fw-medium); color: var(--lh-muted); margin-left: .25rem; }
.card .lh-tabs { margin: 0; padding: 0 .75rem; }

.wizard-footer { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: flex-end; padding: 1rem 1.25rem; border-top: 1px solid var(--lh-border); }
.wizard-footer .me-auto { margin-right: auto; }
.wizard-footer.card { flex-direction: row; }

.choice-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .75rem; }
.choice-card { position: relative; display: flex; gap: .75rem; padding: .9rem 1rem; border: 1.5px solid var(--lh-border); border-radius: var(--lh-radius-lg); background: var(--lh-surface); cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card .title { font-weight: var(--lh-fw-semibold); }
.choice-card .hint { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.choice-card:hover { border-color: rgba(var(--lh-primary-rgb), .5); }
.choice-card:has(input:checked) { border-color: var(--lh-primary); background: var(--lh-primary-soft); }
.choice-card:has(input:focus-visible) { box-shadow: var(--lh-focus); }

.setting-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .95rem 0; border-bottom: 1px solid var(--lh-border); }
.setting-row:last-child { border-bottom: 0; }

/* R4 authoring: grouped settings, unavailable choices shown as text, mode panels, compact list metadata. */
.settings-section { padding: 1.25rem 0; border-top: 1px solid var(--lh-border); }
.settings-section:first-child { border-top: 0; padding-top: 0; }
.settings-section:last-child { padding-bottom: 0; }
.settings-section > h3 { font-size: var(--lh-fs-md); font-weight: var(--lh-fw-semibold); margin: 0 0 .15rem; }
.settings-section > .lh-helper { margin: 0 0 .9rem; }
.choice-cards.compact { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.choice-card.unavailable { cursor: default; background: var(--lh-surface-alt); border-style: dashed; }
.choice-card.unavailable .title { color: var(--lh-muted); }
.mode-panel { margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--lh-border); border-radius: var(--lh-radius-md); background: var(--lh-surface); }
.mode-panel > h4 { font-size: var(--lh-fs-sm); font-weight: var(--lh-fw-semibold); margin: 0 0 .6rem; }
.mode-panel + .mode-panel { margin-top: .75rem; }
.fact-list { list-style: none; padding: 0; margin: 0; font-size: var(--lh-fs-sm); color: var(--lh-muted); }
.fact-list li { display: flex; gap: .5rem; padding: .2rem 0; }
.fact-list li i { flex: none; }
.cell-meta { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: .5rem; align-items: flex-start; padding: .3rem 0; font-size: var(--lh-fs-sm); }
.check-list li i { flex: none; margin-top: .1rem; }
/* R4 filters: secondary filters behind "More filters"; active filters as removable chips. */
.filter-more { display: block; }
.filter-more[open] { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.filter-more > summary { list-style: none; white-space: nowrap; }
.filter-more > summary::-webkit-details-marker { display: none; }
.filter-more[open] > summary { background: var(--lh-primary-soft); }
.filter-more-body { display: flex; flex-wrap: wrap; gap: .6rem; }
.filter-more:not([open]) > .filter-more-body { display: none; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .6rem 1.1rem; border-bottom: 1px solid var(--lh-border); }
.filter-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: var(--lh-radius-pill); background: var(--lh-primary-soft);
    color: var(--lh-primary-hover); font-size: var(--lh-fs-xs); font-weight: var(--lh-fw-semibold); text-decoration: none; }
.filter-chip:hover { text-decoration: underline; }
/* R4 structured answers (rows that write the text format) and editor groups. */
.row-editor-rows { display: grid; gap: .4rem; }
.row-editor-row { display: flex; gap: .5rem; align-items: center; }
.row-editor-row .form-control { flex: 1 1 auto; min-width: 0; }
.row-editor-row .row-editor-narrow { flex: 0 0 6.5rem; }
.row-editor-check { display: inline-flex; align-items: center; gap: .3rem; flex: none; font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.row-editor-tools { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; }
.editor-section + .editor-section { border-top: 1px solid var(--lh-border); margin-top: 1.25rem; padding-top: 1.25rem; }
.editor-section > h2 { font-size: var(--lh-fs-md); font-weight: var(--lh-fw-semibold); margin: 0 0 .75rem; }
.totals-bar { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; align-items: baseline; font-size: var(--lh-fs-sm); }
.totals-bar strong { font-size: var(--lh-fs-md); }
.setting-row .title { font-weight: var(--lh-fw-semibold); }
.setting-row .hint { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.setting-row .form-switch .form-check-input { width: 2.6em; height: 1.35em; cursor: pointer; }

.info-list { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .45rem 1.25rem; margin: 0; font-size: var(--lh-fs-sm); }
.info-list dt { color: var(--lh-muted); font-weight: var(--lh-fw-medium); }
.info-list dd { margin: 0; color: var(--lh-text-strong); }

.row-menu .btn { padding: .2rem .5rem; }
.row-menu .dropdown-item i { width: 1.25rem; color: var(--lh-muted); }
.row-menu form { margin: 0; }

.title-cell { display: flex; gap: .65rem; align-items: center; min-width: 14rem; }
.title-cell .type-icon { width: 2rem; height: 2rem; border-radius: var(--lh-radius-md); display: grid; place-items: center; flex: none; }
.title-cell a { font-weight: var(--lh-fw-semibold); color: var(--lh-text-strong); text-decoration: none; }
.title-cell a:hover { color: var(--lh-primary); text-decoration: underline; }

.q-row { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1.1rem; border-bottom: 1px solid var(--lh-border); }
.q-row:last-child { border-bottom: 0; }
.q-row .q-num { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--lh-radius-md); background: var(--lh-surface-alt); font-weight: var(--lh-fw-bold); flex: none; }
.q-row .q-body { flex: 1 1 auto; min-width: 0; }
.q-row .q-meta { font-size: var(--lh-fs-xs); color: var(--lh-muted); }

.dist-chart { display: flex; gap: .5rem; align-items: flex-end; height: 11rem; padding: .5rem 0 0; }
.dist-chart .bar { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .3rem; height: 100%; }
.dist-chart .bar span { display: block; width: 100%; max-width: 3.25rem; border-radius: var(--lh-radius-sm) var(--lh-radius-sm) 0 0; background: var(--lh-primary); min-height: 2px; }
.dist-chart .bar small { font-size: var(--lh-fs-overline); color: var(--lh-muted); white-space: nowrap; }
.dist-chart .bar b { font-size: var(--lh-fs-overline); }

.meter-row { display: flex; gap: .75rem; align-items: center; }
.meter-row .meter { flex: 1 1 auto; }

/* Activity lists (dashboards): the description wraps or truncates inside its card; the time keeps its own column. */
.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-feed li { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px solid var(--lh-border); }
.activity-feed li:last-child { border-bottom: 0; }
.activity-feed .what { flex: 1 1 auto; min-width: 0; }
.activity-feed .when { flex: none; width: 6.5rem; text-align: right; font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.audit-details { min-width: 14rem; overflow-wrap: anywhere; }

/* ---------- Learner examination (distraction-free) ---------- */
.exam-body { background: var(--lh-bg); min-height: 100vh; }
.exam-header { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; padding: .75rem 1.5rem; background: var(--lh-surface); border-bottom: 1px solid var(--lh-border); }
.exam-header .exam-title { font-weight: var(--lh-fw-bold); font-size: 1.05rem; margin: 0; }
.exam-timer { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.exam-timer .label { font-size: var(--lh-fs-overline); color: var(--lh-muted); text-transform: uppercase; letter-spacing: .06em; }
.exam-timer .value { font-variant-numeric: tabular-nums; font-size: 1.35rem; font-weight: var(--lh-fw-bold); color: var(--lh-primary); }
.exam-timer.low .value { color: var(--lh-danger-fg); }
.exam-main { max-width: 1180px; margin: 0 auto; padding: 1.5rem; }
.exam-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: .4rem; }
.exam-palette a { display: grid; place-items: center; height: 2.6rem; border-radius: var(--lh-radius-md); font-weight: var(--lh-fw-bold); text-decoration: none; border: 1.5px solid var(--lh-border-strong); background: var(--lh-surface); color: var(--lh-text-strong); }
.exam-palette a.answered { border-color: var(--lh-success-border); background: var(--lh-success-bg); color: var(--lh-success-fg); }
.exam-palette a.marked { border-color: var(--lh-warning-border); background: var(--lh-warning-bg); color: var(--lh-warning-fg); }
.exam-palette a.current { border-color: var(--lh-primary); background: var(--lh-primary); color: #fff; }
.exam-palette a:focus-visible { box-shadow: var(--lh-focus); outline: 0; }
.exam-legend { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .45rem; font-size: var(--lh-fs-xs); }
.exam-legend span { display: inline-block; width: 1rem; height: 1rem; border-radius: 4px; border: 1.5px solid var(--lh-neutral-border); vertical-align: -.15rem; margin-right: .45rem; }
.exam-legend .current { background: var(--lh-primary); border-color: var(--lh-primary); }
.exam-legend .answered { background: var(--lh-success-bg); border-color: var(--lh-success-border); }
.exam-legend .marked { background: var(--lh-warning-bg); border-color: var(--lh-warning-border); }
.exam-question .q-label { font-size: var(--lh-fs-xs); color: var(--lh-muted); font-weight: var(--lh-fw-semibold); }
.exam-question .stem { font-size: 1.12rem; }
.exam-options .form-check { padding: .75rem .9rem .75rem 2.6rem; border: 1.5px solid var(--lh-border); border-radius: var(--lh-radius-md); margin-bottom: .55rem; background: var(--lh-surface); }
.exam-options .form-check:has(input:checked) { border-color: var(--lh-primary); background: var(--lh-primary-soft); }
.exam-options .form-check-input { margin-left: -1.7rem; }
.exam-options .form-check-label > :last-child, .exam-options .prose > p:last-child { margin-bottom: 0; }
.exam-footer { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .9rem 1.25rem; border-top: 1px solid var(--lh-border); }

@media print {
    .sidebar, .topbar, .exam-header .btn, .page-toolbar .btn, .row-menu, .editor-actions { display: none !important; }
    .app-main { margin-left: 0 !important; }
}

/* ---------------------------------------------------------------- M06 Learning Activities (same tokens and components as M05) */
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.activity-card { display: flex; flex-direction: column; gap: .5rem; padding: 1.1rem; background: var(--lh-surface); border: 1px solid var(--lh-border); border-radius: var(--lh-radius-lg); min-width: 0; }
.activity-card .head { display: flex; gap: .75rem; align-items: flex-start; }
.activity-card .title { font-weight: var(--lh-fw-bold); color: var(--lh-text-strong); line-height: 1.25; }
.activity-card .meta { font-size: var(--lh-fs-xs); color: var(--lh-muted); }
.activity-card .foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding-top: .5rem; }
.activity-card:hover { border-color: rgba(var(--lh-primary-rgb), .45); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; margin-bottom: 1.25rem; }
.category-card { display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: 1rem .75rem; text-align: center; background: var(--lh-surface); border: 1.5px solid var(--lh-border); border-radius: var(--lh-radius-lg); color: var(--lh-text-strong); text-decoration: none; font-weight: var(--lh-fw-semibold); }
.category-card .stat-icon { width: 52px; height: 52px; }
.category-card small { color: var(--lh-muted); font-weight: var(--lh-fw-medium); }
.category-card:hover, .category-card.active { border-color: var(--lh-primary); color: var(--lh-primary); }
.pill-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.pill-tabs a { padding: .4rem .9rem; border-radius: var(--lh-radius-pill); border: 1px solid var(--lh-border-strong); background: var(--lh-surface); color: var(--lh-text); text-decoration: none; font-size: var(--lh-fs-sm); font-weight: var(--lh-fw-semibold); }
.pill-tabs a.active { background: var(--lh-primary); border-color: var(--lh-primary); color: #fff; }
.score-ring { --pct: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(closest-side, var(--lh-surface) 76%, transparent 77% 100%), conic-gradient(var(--lh-primary) calc(var(--pct) * 1%), var(--lh-surface-alt) 0); }
.score-ring b { font-size: 1.7rem; color: var(--lh-text-strong); }
.feedback-box { border-radius: var(--lh-radius-lg); padding: .85rem 1rem; border: 1.5px solid; margin-top: 1rem; }
.feedback-box.correct { border-color: var(--lh-success-border); background: var(--lh-success-bg); }
.feedback-box.partial { border-color: var(--lh-warning-border); background: var(--lh-warning-bg); }
.feedback-box.incorrect { border-color: var(--lh-danger-border); background: var(--lh-danger-bg); }
.feedback-box .title { font-weight: var(--lh-fw-bold); }
.hint-box { border-left: 4px solid var(--lh-warning-solid); background: var(--lh-warning-bg); padding: .6rem .9rem; border-radius: 0 var(--lh-radius-md) var(--lh-radius-md) 0; margin: .75rem 0; font-size: var(--lh-fs-sm); }
.grid-cells { border-collapse: collapse; margin: .5rem 0; }
.grid-cells td { width: 3rem; height: 3rem; border: 1px solid var(--lh-neutral-border); padding: 0; text-align: center; }
.grid-cells td.given { background: var(--lh-surface-alt); font-weight: var(--lh-fw-bold); font-size: 1.2rem; color: var(--lh-text-strong); }
.grid-cells td.box-right { border-right: 3px solid #334155; }
.grid-cells td.box-bottom { border-bottom: 3px solid #334155; }
.grid-cells input { width: 100%; height: 100%; border: 0; text-align: center; font-size: 1.15rem; font-weight: var(--lh-fw-bold); color: var(--lh-primary); background: transparent; }
.grid-cells input:focus { outline: 3px solid rgba(var(--lh-primary-rgb), .5); outline-offset: -3px; }
.grid-answer td { border: 1px solid var(--lh-border-strong); width: 2rem; height: 2rem; text-align: center; font-weight: var(--lh-fw-bold); }
.order-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.order-list li { display: flex; gap: .75rem; align-items: center; padding: .6rem .8rem; border: 1.5px solid var(--lh-border); border-radius: var(--lh-radius-md); background: var(--lh-surface); }
.order-list li .form-select { width: auto; min-width: 4.5rem; }
.order-list li .text { flex: 1 1 auto; min-width: 0; }
.order-list .moves .btn { padding: .1rem .45rem; }
.activity-figure { max-width: 100%; height: auto; }
.figure-wrap { margin: .5rem 0 1rem; overflow-x: auto; }
.exam-options .form-check-label svg { display: block; }
.player-progress { height: 8px; border-radius: var(--lh-radius-pill); background: var(--lh-surface-alt); overflow: hidden; margin: .4rem 0 1rem; }
.player-progress > span { display: block; height: 100%; background: var(--lh-primary); border-radius: var(--lh-radius-pill); }
.exam-palette a.correct { border-color: var(--lh-success-solid); background: var(--lh-success-solid); color: #fff; }
.exam-palette a.incorrect { border-color: var(--lh-danger-border); background: var(--lh-danger-bg); color: var(--lh-danger-fg); }
.exam-palette a.partial { border-color: var(--lh-warning-border); background: var(--lh-warning-bg); color: var(--lh-warning-fg); }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.trend span { flex: 1 1 0; background: var(--lh-primary); border-radius: 4px 4px 0 0; min-height: 3px; opacity: .85; }
.usage-bars { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
.usage-bars span { flex: 1 1 0; background: rgba(var(--lh-primary-rgb), .75); border-radius: 3px 3px 0 0; min-height: 1px; }
.result-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 575.98px) { .result-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-cells td { width: 2.4rem; height: 2.4rem; } }
.review-item { border-top: 1px solid var(--lh-border); padding: 1rem 1.25rem; }
.review-item:first-child { border-top: 0; }

/* M09 Phase 4: live invigilation (candidate strip and shell, admission tiles). */
.live-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--lh-muted); flex: none; }
[data-live-state="live"] .live-dot { background: var(--lh-success-solid); }
[data-live-state="reconnecting"] .live-dot, [data-live-state="offline"] .live-dot { background: var(--lh-warning-solid); }
[data-live-state="refused"] .live-dot, [data-live-state="replaced"] .live-dot { background: var(--lh-danger-solid); }
.live-preview { display: block; width: 100%; max-width: 16rem; aspect-ratio: 16 / 9; background: #111; border-radius: var(--lh-radius-md); object-fit: cover; }
body.live-shell { display: flex; flex-direction: column; height: 100vh; margin: 0; overflow: hidden; }
.live-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .35rem 1rem; font-size: var(--lh-fs-sm); border-bottom: 1px solid var(--lh-border); background: var(--lh-surface, #fff); }
.live-frame { flex: 1 1 auto; width: 100%; border: 0; }
.live-cell { width: 11rem; }
.live-tile { width: 10rem; aspect-ratio: 16 / 9; background: #1c1917; border-radius: var(--lh-radius-sm); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.live-tile .small-muted { color: #d6d3d1; padding: .25rem; text-align: center; font-size: var(--lh-fs-overline); }
.live-tile .live-video { width: 100%; height: 100%; object-fit: cover; }
