/*
 * Learn: the learner-facing look. Loaded after app.css on learner pages only
 * (the site shell and course pages), so staff portals are untouched.
 * Colours come from the site theme (--accent); the hero is built from it.
 */

body.area-learner, body.learner-course {
    /* Hero band and footer: from the brand colour (theme.css --hero, --hero-base), white text */
    --lx-hero-bg: var(--hero, #2f5fd0);
    --lx-ink: #0f1b33;
    --lx-bg: #ffffff;
    --lx-card-shadow: 0 1px 2px rgba(15, 27, 51, .06), 0 6px 18px rgba(15, 27, 51, .06);
    --lx-card-shadow-hover: 0 2px 4px rgba(15, 27, 51, .08), 0 14px 32px rgba(15, 27, 51, .12);
    --lx-radius: 14px;
    --lx-hero-base: var(--hero-base, #24489e);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body.area-learner, :root:not([data-theme="light"]) body.learner-course {
        --lx-ink: #e8ecf4; --lx-bg: #10141c; --lx-card-shadow: 0 1px 2px rgba(0, 0, 0, .4); --lx-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
    }
}
:root[data-theme="dark"] body.area-learner, :root[data-theme="dark"] body.learner-course {
    --lx-ink: #e8ecf4; --lx-bg: #10141c; --lx-card-shadow: 0 1px 2px rgba(0, 0, 0, .4); --lx-card-shadow-hover: 0 8px 24px rgba(0, 0, 0, .5);
}

body.lx-site { background: var(--lx-bg); overflow-x: clip; display: flex; flex-direction: column; min-height: 100vh; }
body.lx-site main.page { flex: 1 0 auto; width: 100%; }
body.lx-site main.page:has(> .lx-hero:first-child) { padding-top: 0; }
body.area-learner h1, body.area-learner h2 { letter-spacing: -.02em; color: var(--lx-ink); }
body.area-learner h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; }

/* Buttons: rounded pills, as is common on learning sites */
body.area-learner .button, body.area-learner button:not(.link):not(.el-carousel-btn):not(.el-carousel-dot):not(.site-menu-btn),
body.learner-course .button { border-radius: 999px; }
body.area-learner .button:not(.small), body.area-learner button[type="submit"]:not(.link):not(.small) { padding: .65rem 1.35rem; }

/* ---- header ------------------------------------------------------------ */
body.lx-site .site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
body.lx-site .site-header-inner { max-width: 1200px; min-height: 68px; padding: .55rem 1rem; }
body.lx-site .site-header .brand { font-weight: 800; letter-spacing: -.01em; }
body.lx-site .site-header .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
body.area-learner .site-nav a, body.area-learner .site-nav summary { font-weight: 600; }
.lx-signin { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--text); text-decoration: none; }
.lx-signin:hover { color: var(--accent); }

/* ---- footer ------------------------------------------------------------ */
body.lx-site .site-footer { max-width: none; margin: 4rem 0 0; padding: 0; border: 0; background: var(--lx-hero-base); color: #fff; }
body.lx-site .site-footer a { color: #fff; text-decoration: none; }
body.lx-site .site-footer a:hover { text-decoration: underline; }
.lx-footer { max-width: 1200px; margin: 0 auto; padding: 3rem 1rem 1.5rem; display: grid; gap: 2rem; grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(150px, 1fr)); }
.lx-footer-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: #fff; margin: 0 0 .75rem; }
.lx-footer-brand .brand-mark { width: 34px; height: 34px; border-radius: 9px; }
.lx-footer p { margin: 0 0 .6rem; line-height: 1.55; }
body.area-learner .lx-footer h2 { font-size: .95rem; color: #fff; margin: 0 0 .85rem; letter-spacing: 0; }
.lx-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.lx-footer-base { position: relative; max-width: 1200px; margin: 0 auto; padding: 1.1rem 1rem 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; font-size: .875rem; }
.lx-footer-base::before { content: ""; position: absolute; top: 0; left: 1rem; right: 1rem; border-top: 1px solid rgba(255, 255, 255, .14); }
.lx-footer-base select { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.lx-footer-base select option { color: #111; }
@media (max-width: 720px) { .lx-footer { grid-template-columns: 1fr 1fr; } .lx-footer-about { grid-column: 1 / -1; } }

/* ---- hero band: full width, flat brand colour, slanted bottom edge --------------- */
.lx-hero {
    position: relative; color: #fff; margin: 0 calc(50% - 50vw) 2rem; padding: clamp(2.25rem, 5vw, 4rem) 1rem clamp(4rem, 8vw, 6.5rem);
    background: var(--lx-hero-bg);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - clamp(1.5rem, 5vw, 4.5rem)), 0 100%);
}
.lx-hero-inner { max-width: calc(1200px - 2rem); margin: 0 auto; } /* lines up with .page's content */
body.area-learner .lx-hero h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 3.6rem); letter-spacing: -.035em; line-height: 1.04; margin: .35rem 0 .9rem; }
.lx-hero p { color: #fff; }
.lx-hero .lx-lead { font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 40rem; margin: 0; }
.lx-crumb { margin: 0; font-size: .925rem; }
.lx-crumb a { color: #fff; }
.lx-hero .button.secondary { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .55); }
.lx-hero .button.secondary:hover { background: rgba(255, 255, 255, .22); }
.lx-hero-row { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-end; justify-content: space-between; }
.lx-stats { display: flex; flex-wrap: wrap; gap: .6rem 1.75rem; margin: 1.1rem 0 0; padding: 0; list-style: none; font-size: 1rem; }
.lx-stats strong { color: #fff; }

/* ---- course page ------------------------------------------------------- */
.lx-hero--course .lx-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 2.5rem; align-items: center; }
.lx-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 1.25rem 0 0; }
.lx-facts div { display: flex; gap: .35rem; }
.lx-facts dt { color: #fff; }
.lx-facts dd { margin: 0; font-weight: 700; color: #fff; }

.lx-action { background: var(--surface); color: var(--text); border-radius: var(--lx-radius); box-shadow: 0 20px 50px rgba(0, 0, 0, .28); overflow: hidden; }
.lx-action-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lx-action-body { padding: 1.35rem 1.5rem 1.5rem; }
.lx-action .lx-eyebrow { color: var(--accent); }
.lx-action h2 { font-size: 1.3rem; margin: .2rem 0 .35rem; color: var(--lx-ink); }
.lx-action p { color: var(--muted); }
.lx-action .lx-next-where { margin: .5rem 0 0; font-size: .9rem; }
.lx-action .button, .lx-action button[type="submit"] { display: flex; width: 100%; justify-content: center; margin-top: 1.1rem; font-size: 1.05rem; }
.lx-action form { margin: 0; }
.lx-action .lx-restart { margin-top: .75rem; text-align: center; }
.lx-action .lx-restart button { width: auto; display: inline; margin: 0; }
.lx-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin: .85rem 0 .4rem; }
.lx-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.lx-bar-0 span { width: 0; } .lx-bar-5 span { width: 5%; } .lx-bar-10 span { width: 10%; } .lx-bar-15 span { width: 15%; } .lx-bar-20 span { width: 20%; }
.lx-bar-25 span { width: 25%; } .lx-bar-30 span { width: 30%; } .lx-bar-35 span { width: 35%; } .lx-bar-40 span { width: 40%; } .lx-bar-45 span { width: 45%; }
.lx-bar-50 span { width: 50%; } .lx-bar-55 span { width: 55%; } .lx-bar-60 span { width: 60%; } .lx-bar-65 span { width: 65%; } .lx-bar-70 span { width: 70%; }
.lx-bar-75 span { width: 75%; } .lx-bar-80 span { width: 80%; } .lx-bar-85 span { width: 85%; } .lx-bar-90 span { width: 90%; } .lx-bar-95 span { width: 95%; } .lx-bar-100 span { width: 100%; }
.lx-eyebrow { margin: 0; font-size: .85rem; font-weight: 700; letter-spacing: .02em; }

.lx-course-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 2.5rem; align-items: start; max-width: 1240px; margin: 0 auto; }
.lx-course-body > section > h2, .lx-about h2 { font-size: 1.5rem; margin: 0 0 .35rem; }
.lx-summary { color: var(--muted); margin: 0 0 1.25rem; }

.lx-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.lx-timeline::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--border); }
.lx-timeline > li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 1rem; margin-bottom: 1.1rem; }
.lx-num { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--lx-bg); border: 2px solid var(--border); color: var(--muted); margin-top: .6rem; }
.lx-timeline > li.is-done .lx-num { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.lx-timeline > li.is-started .lx-num { border-color: var(--accent); color: var(--accent); }
.lx-module { background: var(--surface); border: 1px solid var(--border); border-radius: var(--lx-radius); box-shadow: var(--lx-card-shadow); }
.lx-module h3 { margin: 0; padding: 1.1rem 1.35rem; font-size: 1.15rem; border-bottom: 1px solid var(--border); display: flex; gap: .75rem; align-items: baseline; justify-content: space-between; }
.lx-module h3 .lx-count { font-size: .85rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.lx-module details { padding: .8rem 1.35rem; }
.lx-module summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: .35rem; }
.lx-module summary::-webkit-details-marker { display: none; }
.lx-module summary svg { transition: transform .15s; }
.lx-module details[open] summary svg { transform: rotate(180deg); }
.lx-module details[open] .lx-show, .lx-module details:not([open]) .lx-hide { display: none; }
.lx-pages { list-style: none; margin: .75rem 0 .25rem; padding: 0; display: grid; gap: .15rem; }
.lx-pages li { display: flex; align-items: flex-start; gap: .7rem; padding: .4rem 0; }
.lx-pages a { color: var(--text); text-decoration: none; }
.lx-pages a:hover { color: var(--accent); text-decoration: underline; }
.lx-dot { flex: none; width: 20px; height: 20px; margin-top: .15rem; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 60%, transparent); display: grid; place-items: center; }
.lx-pages li.is-seen .lx-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

.lx-about { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--lx-radius); box-shadow: var(--lx-card-shadow); padding: 1.5rem; }
.lx-about-head { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.lx-about-head .lx-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--info-bg); color: var(--accent); }
.lx-about-head h2 { margin: 0; font-size: 1.2rem; }
.lx-about .learner-content { color: var(--text); }
.lx-about .learner-content > :first-child { margin-top: 0; }
.lx-keyfacts { list-style: none; margin: 1.25rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--border); display: grid; gap: .5rem; }
.lx-keyfacts li { display: flex; gap: .55rem; align-items: flex-start; }
.lx-keyfacts svg { flex: none; margin-top: .2rem; color: var(--ok); }

@media (max-width: 960px) {
    .lx-hero--course .lx-hero-inner, .lx-course-body { grid-template-columns: minmax(0, 1fr); }
    .lx-about { position: static; }
}

/* ---- course cards (catalogue, featured, my learning) -------------------- */
/* Course tiles: a deeper shadow than other panels, so they lift off the page. */
body.area-learner .course-card { border-radius: var(--lx-radius); box-shadow: 0 4px 10px rgba(16, 24, 40, .10), 0 14px 34px rgba(16, 24, 40, .16); border-color: var(--border); }
body.area-learner .course-card:hover { box-shadow: 0 6px 14px rgba(16, 24, 40, .12), 0 22px 48px rgba(16, 24, 40, .24); }
body.area-learner .course-card-body { padding: 1.15rem 1.25rem; }
body.area-learner .course-card-body h3 { font-size: 1.15rem; letter-spacing: -.01em; }
body.area-learner .course-grid { gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lx-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin: 0 0 1.25rem; }
.lx-toolbar h2 { margin: 0; font-size: 1.5rem; }

/* My learning */
.lx-mycourses { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.lx-mycard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--lx-radius); box-shadow: var(--lx-card-shadow); overflow: hidden; display: flex; flex-direction: column; }
.lx-mycard img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lx-mycard-ph { aspect-ratio: 16 / 9; background: var(--info-bg); }
.lx-mycard-body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.lx-mycard h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.lx-mycard h3 a { color: var(--lx-ink); text-decoration: none; }
.lx-mycard h3 a:hover { color: var(--accent); text-decoration: underline; }
.lx-mycard .lx-progress-text { font-size: .9rem; color: var(--muted); margin: 0; }
.lx-mycard .button { margin-top: auto; align-self: flex-start; }
.lx-mycard .lx-bar { margin-top: 1rem; }
.lx-mycard .lx-progress-text + .button { margin-top: 1.1rem; }
body.area-learner .my-empty { border-radius: var(--lx-radius); box-shadow: var(--lx-card-shadow); }

/* ---- sign in / sign up ---------------------------------------------- */
body.area-learner .auth-card, body.area-learner .card.narrow { border-radius: var(--lx-radius); box-shadow: var(--lx-card-shadow); border-color: var(--border); }

@media (prefers-reduced-motion: reduce) { .lx-module summary svg { transition: none; } }
.lx-footer-base p { margin: 0; }

/* Small screens: logo, account and menu button on one row */
@media (max-width: 760px) {
    html.js body.lx-site .site-header-inner { gap: .6rem; flex-wrap: wrap; }
    body.lx-site .site-header .brand { flex: 1 1 0; min-width: 0; }
    body.lx-site .site-header .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html.js body.lx-site .site-account { margin-left: 0; }
}
@media (max-width: 520px) {
    body.lx-site .site-account .button.small { display: none; }
}
body.lx-site .lx-footer p a, body.lx-site .lx-footer-base a { text-decoration: underline; text-underline-offset: 2px; }

/* Home page: the hero band sits behind the first carousel or banner, sized to it */
body.lx-site main.page:has(> .site-page.is-home:first-child) { padding-top: 0; }
.site-page.is-home { position: relative; isolation: isolate; padding-top: clamp(1.5rem, 3vw, 2.5rem);
    --home-slide: clamp(14rem, 27vw, 21rem); --home-band-below: clamp(2.5rem, 5vw, 4.5rem); }
.site-page.is-home > .el:first-child:has(> section.el-carousel, > section.el-banner) { position: relative; margin-bottom: calc(var(--home-band-below) + 1.25rem); }
.site-page.is-home > .el:first-child > :is(section.el-carousel, section.el-banner) { margin-bottom: 0; }
.site-page.is-home > .el:first-child section.el-carousel .el-carousel-slide,
.site-page.is-home > .el:first-child > section.el-banner { min-height: var(--home-slide); }
.site-page.is-home > .el:first-child :is(section.el-carousel .el-banner, > section.el-banner) { box-shadow: 0 24px 60px rgba(10, 14, 30, .35); }
.site-page.is-home > .el:first-child:has(> section.el-carousel, > section.el-banner)::before {
    content: ""; position: absolute; z-index: -1;
    top: calc(-1 * clamp(1.5rem, 3vw, 2.5rem)); bottom: calc(-1 * var(--home-band-below));
    left: calc(50% - 50vw); width: 100vw;
    background: var(--lx-hero-bg);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - clamp(1.5rem, 5vw, 4.5rem)), 0 100%);
}

/* ---- menu: the links live in a burger dropdown on every screen size ---- */
html.js body.lx-site .site-header-inner { position: relative; flex-wrap: nowrap; }
html.js body.lx-site .site-menu-btn { display: inline-flex; order: 3; margin-left: .25rem; padding: .5rem; border-radius: 10px; }
html.js body.lx-site .site-account { order: 2; margin-left: auto; }
html.js .lx-menu-panel {
    display: none; position: absolute; z-index: 40; top: calc(100% + 6px); right: 1rem; order: 4;
    width: min(320px, calc(100vw - 2rem)); flex-direction: column; flex-basis: auto; gap: .1rem; padding: .5rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 44px rgba(10, 14, 30, .2); overflow: visible;
}
html.js .lx-menu-panel.is-open { display: flex; }
html.js .lx-menu-panel > a, html.js .lx-menu-panel .nav-drop > summary, html.js .lx-menu-panel button.link {
    display: block; padding: .65rem .8rem; border: 0; border-radius: 8px; color: var(--text); font-weight: 600; text-decoration: none; white-space: normal; box-shadow: none;
}
html.js .lx-menu-panel > a:hover, html.js .lx-menu-panel .nav-drop > summary:hover, html.js .lx-menu-panel button.link:hover { background: var(--hover, var(--bg)); text-decoration: none; }
html.js .lx-menu-panel a[aria-current="page"] { background: var(--info-bg); color: var(--accent); box-shadow: none; padding-left: .8rem; }
html.js .lx-menu-panel .nav-drop-panel { position: static; display: flex; flex-direction: column; box-shadow: none; border: 0; padding: 0 0 .25rem .9rem; background: transparent; min-width: 0; }
html.js .lx-menu-panel .nav-drop-panel a { padding: .5rem .8rem; border-radius: 8px; }
html.js .lx-menu-panel hr { border: 0; border-top: 1px solid var(--border); margin: .35rem .4rem; }
html.js .lx-menu-panel form { margin: 0; }
html.js .lx-menu-panel button.link { width: 100%; text-align: left; background: none; cursor: pointer; font: inherit; font-weight: 600; }
/* the lesson page header */
.lc-menu { position: relative; margin-left: auto; }
html.js .lc-menu .lx-menu-panel { right: 0; top: calc(100% + 10px); }
.lc-menu .site-menu-btn { display: inline-flex; padding: .5rem; border: 1px solid var(--border); border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.lc-menu .site-menu-btn .when-open { display: none; }
.lc-menu .site-menu-btn[aria-expanded="true"] .when-open { display: inline; }
.lc-menu .site-menu-btn[aria-expanded="true"] .when-closed { display: none; }
html:not(.js) .lc-menu .site-menu-btn { display: none; }
html:not(.js) .lc-menu .lx-menu-panel { display: flex; gap: 1rem; }
html.js .lx-menu-panel .nav-drop > summary { display: flex; align-items: center; justify-content: space-between; }
html.js .lx-menu-panel .nav-drop > summary::after { flex: none; margin-right: .2rem; }
html.js .lx-menu-panel .nav-drop[open] > summary::after { transform: translateY(2px) rotate(225deg); }

/* Home: a banner first on the page sits straight on the brand-colour band */
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) {
    background: transparent; color: #fff; box-shadow: none; min-height: 0; overflow: visible; border-radius: 0; padding: clamp(.5rem, 2vw, 1.25rem) 0 clamp(.5rem, 2vw, 1rem);
}
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-heading { color: #fff; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.02em; line-height: 1.05; margin-bottom: .5rem; }
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-text { color: #fff; font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 36rem; line-height: 1.55; }
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-button { background: #fff; color: var(--lx-hero-bg); border-color: #fff; }
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-button:hover { background: #fff; color: var(--lx-hero-base); }
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-button2 { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .8); }
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-button2:hover { background: rgba(255, 255, 255, .12); }
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-side { border: 6px solid #fff; box-shadow: 0 24px 50px rgba(10, 14, 30, .35); transform: rotate(1.5deg); }
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-button:focus-visible,
.site-page.is-home > .el:first-child > section.el-banner:not(.has-image) .el-banner-button2:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .site-page.is-home .el-banner-side { transform: none; } }

/* audience colours (.aud-c-<colour>) are in app.css, so the Designer can show them too */

/* cards: a brand-colour stripe along the top; audience colours are on the badges */
body.area-learner .course-card { border-top: 6px solid var(--lx-hero-bg); }
.aud-badges { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.aud-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: 999px; background: var(--aud-bg); color: var(--aud-ink); font-size: .8rem; font-weight: 700; }
.aud-badge svg { flex: none; }

/* hero bands stay in the site's red for every audience (audience colours are on tiles, cards and badges) */


/* catalogue: filter chips and group headings */
.aud-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2rem; }
.aud-filter a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; border: 2px solid var(--aud, var(--border)); color: var(--aud-ink, var(--text)); font-weight: 700; text-decoration: none; background: var(--surface); }
.aud-filter a:hover { background: var(--aud-bg, var(--bg)); }
.aud-filter a[aria-current="page"] { background: var(--aud, var(--accent)); border-color: var(--aud, var(--accent)); color: #fff; }
.aud-filter a[aria-current="page"] .aud-count { color: inherit; }
.aud-filter a[aria-current="page"]:not([class*="aud-"]) { color: var(--accent-text); }
.aud-count { font-weight: 400; color: var(--muted); }
.aud-group { margin: 0 0 2.75rem; }
.aud-group-head { display: flex; gap: 1rem; align-items: center; margin: 0 0 1.25rem; padding-bottom: .9rem; border-bottom: 3px solid var(--aud); }
.aud-group-head h2 { margin: 0; font-size: 1.6rem; color: var(--aud-ink); }
.aud-group-head p { margin: .15rem 0 0; color: var(--muted); }
.aud-tile { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--aud); color: #fff; }
/* course page: buttons, progress and timeline in the audience colour */




.lx-course-body[class*="aud-"] .lx-timeline > li.is-done .lx-num { background: var(--aud); border-color: var(--aud); color: #fff; }
.lx-course-body[class*="aud-"] .lx-timeline > li.is-started .lx-num { border-color: var(--aud); color: var(--aud-ink); }
.lx-course-body[class*="aud-"] .lx-pages li.is-seen .lx-dot { background: var(--aud); border-color: var(--aud); color: #fff; }
.lx-course-body[class*="aud-"] .lx-module summary { color: var(--aud-ink); }
.lx-course-body[class*="aud-"] .lx-about-head .lx-icon { background: var(--aud-bg); color: var(--aud-ink); }

/* ---- Courses: audience tiles ---- */
.aud-tiles { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.25rem; }
.aud-tile-card a { position: relative; display: flex; flex-direction: column; gap: 1rem; height: 100%; min-height: 230px; padding: 1.6rem 1.6rem 1.3rem; border-radius: 18px; background: var(--aud-hero); color: #fff; text-decoration: none; box-shadow: var(--lx-card-shadow); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.aud-tile-card a::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.aud-tile-card a:hover { transform: translateY(-3px); box-shadow: var(--lx-card-shadow-hover); }
.aud-tile-card a:focus-visible { outline: 3px solid var(--aud-hero); outline-offset: 4px; }
.aud-tile-icon { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); }
.aud-tile-text { display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.aud-tile-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -.01em; }
.aud-tile-desc { font-size: .98rem; line-height: 1.45; opacity: .95; }
.aud-tile-foot { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; border-top: 1px solid rgba(255, 255, 255, .3); padding-top: .8rem; }
.aud-all, .aud-back { margin: 0 0 2rem; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .aud-tile-card a { transition: none; } .aud-tile-card a:hover { transform: none; } }

/* ---- One audience's page ---- */
.aud-page-head { display: flex; gap: 1.5rem; align-items: center; }
.aud-hero-icon { flex: none; width: 86px; height: 86px; border-radius: 22px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: #fff; }
.aud-count-line { font-weight: 700; margin-top: .4rem !important; }
.aud-pathway, .aud-more { margin: 0 0 2.5rem; }
.aud-pathway h2, .aud-more h2 { font-size: 1.5rem; margin: 0 0 .3rem; }
.aud-pathway > p { margin: 0 0 1.25rem; }
ol.aud-steps { list-style: none; }
@media (max-width: 600px) { .aud-page-head { flex-direction: column; align-items: flex-start; } .aud-hero-icon { width: 64px; height: 64px; } }

/* ---- Card extras: step number, ribbon ---- */
.course-card-media { position: relative; }
.course-card-media .course-card-img { display: block; }
.step-badge { position: absolute; left: 14px; top: 14px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--aud, var(--accent)); color: #fff; font-weight: 800; font-size: 1.35rem; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.step-label { color: var(--aud-ink, var(--accent)); }
.hl-ribbon { position: absolute; right: 12px; top: 12px; padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; background: #fff; color: #1b1b1f; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.hl-new { background: #ffd43b; color: #1b1b1f; }
.hl-updated { background: #fff; color: #1e40af; }
.hl-popular { background: #fff; color: #9a3412; }
.hl-start { background: #1b1b1f; color: #fff; }
.hl-soon { background: #fff; color: #4b5563; }
/* course page tags */
.lx-hero-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: .7rem 0 0; }
.lx-hero-tags .hl-tag, .lx-hero-tags .step-tag { padding: .3rem .8rem; border-radius: 999px; font-size: .85rem; font-weight: 800; }
.lx-hero-tags .hl-tag { text-transform: uppercase; letter-spacing: .03em; }
.lx-hero-tags .hl-tag:not(.hl-new):not(.hl-start) { background: #fff; }
.lx-hero-tags .step-tag { background: #fff; color: #1b1b1f; }

/* Small audience tiles above the course cards (switch audience) */
.aud-mini { margin: 0 0 2rem; }
.aud-mini ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .75rem; }
.aud-mini a { display: flex; align-items: center; gap: .7rem; height: 100%; padding: .7rem .85rem; border-radius: 14px; border: 2px solid var(--aud-bg, var(--border)); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.aud-mini a:hover { border-color: var(--aud, var(--accent)); background: var(--aud-bg, var(--bg)); }
.aud-mini a[aria-current="page"] { background: var(--aud-hero, var(--accent)); border-color: var(--aud-hero, var(--accent)); color: #fff; }
.aud-mini-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--aud-hero, var(--accent)); color: #fff; }
.aud-mini a[aria-current="page"] .aud-mini-icon { background: rgba(255, 255, 255, .2); }
.aud-mini-text { display: flex; flex-direction: column; min-width: 0; }
.aud-mini-title { font-weight: 800; line-height: 1.2; }
.aud-mini-count { font-size: .85rem; color: var(--muted); }
.aud-mini a[aria-current="page"] .aud-mini-count { color: #fff; opacity: .9; }
.aud-all-tile { --aud-hero: #3f3f46; --aud: #52525b; --aud-bg: #e4e4e7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .aud-all-tile { --aud-bg: rgba(255, 255, 255, .12); } }
:root[data-theme="dark"] .aud-all-tile { --aud-bg: rgba(255, 255, 255, .12); }
@media (prefers-reduced-motion: reduce) { .aud-mini a { transition: none; } }
@media (max-width: 600px) {
    .aud-mini ul { grid-template-columns: 1fr 1fr; gap: .5rem; }
    .aud-mini a { padding: .55rem .6rem; gap: .5rem; }
    .aud-mini-icon { width: 30px; height: 30px; border-radius: 9px; }
    .aud-mini-title { font-size: .9rem; }
    .aud-mini-count { font-size: .78rem; }
}

/* "For you": the signed-in learner's audience */
.aud-mini a { position: relative; }
.aud-mine { position: absolute; right: 8px; top: -9px; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 800; background: var(--aud-hero); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.aud-mini a[aria-current="page"] .aud-mine { background: #fff; color: var(--aud-hero); }
.aud-foryou { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 14px; background: var(--aud-bg); color: var(--text); }
.aud-foryou svg { color: var(--aud-ink); flex: none; }
.aud-foryou a { font-weight: 800; color: var(--aud-ink); margin-left: auto; }

/* Course cards: what this learner has done (bottom-left of the picture) */
.mine-badge { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 800; letter-spacing: .02em; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.mine-completed { background: #166534; color: #fff; }
.mine-in-progress { background: #fff; color: var(--lx-hero-bg); }

/* Course search box (home page course list, courses page, search results) */
.course-search { display: flex; gap: .5rem; max-width: 34rem; margin: 0 0 1.5rem; }
.course-search input[type="search"] { flex: 1 1 auto; min-width: 0; padding: .7rem 1rem; font-size: 1.05rem; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); }
.course-search input[type="search"]:focus-visible { border-color: var(--lx-hero-bg); outline: 3px solid color-mix(in srgb, var(--lx-hero-bg) 35%, transparent); outline-offset: 1px; }
.course-search button { display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .7rem 1.25rem; border-radius: 999px; font-weight: 700; }
.lx-hero .course-search-hero { margin: 1.5rem 0 0; }
.lx-hero .course-search-hero input[type="search"] { border-color: transparent; }
.lx-hero .course-search-hero input[type="search"]:focus-visible { outline-color: #fff; }
.lx-hero .course-search-hero button, body.area-learner .lx-hero .course-search-hero button { background: #fff; color: var(--lx-hero-bg); border-color: #fff; }
.course-search-count { font-weight: 700; margin: 0 0 1.25rem; }
@media (max-width: 480px) { .course-search button { padding: .7rem .9rem; } }

/* Programmes: cards on the Courses page, the programme page */
.prog-list { margin: 0 0 2.5rem; }
.prog-list h2 { margin-bottom: .2rem; }
.prog-list > p { margin: 0 0 1.25rem; }
.prog-ribbon, .hl-ribbon.prog-ribbon { left: 12px; right: auto; background: var(--lx-hero-bg); color: #fff; }
.lx-hero .hl-tag.prog-tag { background: #fff; color: var(--lx-hero-bg); }
.prog-about { max-width: 46rem; margin: 0 0 2rem; font-size: 1.05rem; }
.lx-invite { margin-top: .9rem; }
.lx-hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Invite someone */
.invite-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; align-items: start; }
.invite-pick { border: 0; padding: 0; margin: 0; max-height: 26rem; overflow-y: auto; }
.invite-group { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .75rem 0 .1rem; }
.invite-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.invite-list li { padding-bottom: .9rem; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
@media (max-width: 860px) { .invite-layout { grid-template-columns: minmax(0, 1fr); } }
/* My learning: certificate on a course card */
.lx-mycert { margin-top: .6rem; display: flex; width: max-content; max-width: 100%; align-items: center; gap: .35rem; }
.lx-mycert-ready { margin: .6rem 0 0; font-weight: 650; }
.lx-mycert-form { margin: 0; }

/* Discussions (docs/discussions.md) */
.dz-topics { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 1rem; }
.dz-topic h2 { margin: 0 0 .4rem; font-size: 1.3rem; }
.dz-topic p { margin: .3rem 0 0; }
.dz-description p { margin: 0 0 .6rem; }
.dz-notice { margin-top: 1.5rem; }
.dz-count { font-size: 1.15rem; margin: 2rem 0 .8rem; }
.dz-thread { margin-bottom: 1rem; }
.dz-post { padding: .2rem 0; }
.dz-post + .dz-post { border-top: 1px solid var(--border); padding-top: .8rem; margin-top: .8rem; }
.dz-post-head { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: baseline; }
.dz-post-body { margin: .4rem 0; overflow-wrap: anywhere; }
.dz-post-body p { margin: 0 0 .6rem; }
.dz-post-actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.dz-post-actions form { margin: 0; }
.dz-replies { margin: .9rem 0 0 1.2rem; padding-left: 1rem; border-left: 3px solid var(--border); }
.dz-held, .dz-hidden { opacity: .85; }
.dz-removed p { margin: 0; font-style: italic; }
.dz-reply-box { margin-top: .9rem; }
.dz-reply-box summary { cursor: pointer; font-weight: 600; }
.dz-compose textarea { width: 100%; }
.dz-compose-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.dz-warning p { margin: 0 0 .5rem; }
.dz-warning p:last-child { margin: 0; }
.dz-quote { margin: 0; padding: .6rem 1rem; border-left: 3px solid var(--border); overflow-wrap: anywhere; }
.dz-quote p { margin: 0 0 .5rem; }
@media (max-width: 600px) { .dz-replies { margin-left: .3rem; padding-left: .7rem; } }
