/*
 * Live sessions.
 *
 * Every colour reads through a Bootstrap variable with the current literal as a fallback:
 *
 *     border: 1px solid var(--bs-border-color, #dee2e6);
 *
 * The fallback is load-bearing rather than decorative. The site runs Moodle 4.5 on
 * Bootstrap 4 today, which does not define these variables, so each one resolves to the
 * value it would have had anyway. On 5.x the variable exists and follows data-bs-theme, so
 * the same file works in light and dark without a second stylesheet.
 *
 * Bootstrap's variables rather than theme_asi's tokens on purpose: a plugin has to render
 * under whatever theme is installed, and one that only looks right under a single theme is
 * a worse plugin.
 */

/* Two shadow steps, not three independent ad hoc values scattered through the file below --
   own custom properties rather than a theme token for the same theme-independence reason
   as everything else here. */
:root {
    --lsx-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
    --lsx-shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* -- The grid ------------------------------------------------------------- */

/*
 * auto-fill with a minimum, not a fixed column count. The card has a natural minimum
 * width — below about 17rem the title wraps to four lines and the leader's name collides
 * with their photo — so the layout is expressed as that minimum and the browser decides
 * how many fit. No breakpoints to maintain, and it is correct inside a block at 300px as
 * well as on a 1440px page.
 */
.lsx-grid {
    display: grid;
    /* Never wider than the space there is: one column on a 320px phone, not a card cut off. */
    /* stylelint-disable-next-line csstree/validator */
    grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr));
    gap: 1.5rem;
}

/* The listing page (index.php) and a series page (viewseries.php) sit in a centred column
   the width of a course video with its transcript open (theme_asi's .asi-video-lesson:
   81rem), so Live Sessions lines up with the course pages instead of running edge to edge
   on a wide screen. The page heading gets the same column so the title stays over the
   content. Narrower windows just use the space they have, keeping the theme's own side
   padding. */
#page-local-livesessions-index .lsx-listing,
#page-local-livesessions-index #page-header,
#page-local-livesessions-viewseries .lsx-listing,
#page-local-livesessions-viewseries #page-header {
    max-width: 81rem;
    margin-inline: auto;
}

/* The series page's "Back to Live Sessions" button (theme_asi, a direct child of
   #region-main) starts the same column: [role="main"]'s 15px padding plus half of whatever
   is left beside the 81rem. From md up, where the theme sets its own 15px offset; body# so
   this outranks it. */
@media (min-width: 768px) {
    body#page-local-livesessions-viewseries #region-main > .asi-course-back {
        margin-inline-start: calc(15px + max(0px, (100% - 30px - 81rem) / 2));
    }
}

/* "Next up" and the recordings below it: two sections, so each gets a real heading. */
.lsx-section-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.lsx-nextup {
    margin-bottom: 2rem;
}

/* Nothing booked: one quiet line, not an illustration -- the recordings below are what
   this page has to offer right now, so they should be what the eye lands on. */
.lsx-nextup-empty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px dashed var(--bs-border-color, #dee2e6);
    border-radius: 0.625rem;
    color: var(--bs-secondary-color, #6c757d);
}

.lsx-nextup-empty .fa-regular {
    font-size: 1.25rem;
    /* The same warm gold as the cards' calendar and clock icons. */
    color: var(--asi-quote, #f7b541);
}

.lsx-nextup-more {
    margin-top: 0.75rem;
}

/* The CLP tally, heading the page: the earned figure on the left, the bar and its key on
   the right, in the same raised strip as the earn-it steps. */
.lsx-tally {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: center;
    gap: 0.75rem 1.75rem;
    margin-bottom: 2rem;
    padding: 1rem 1.4rem;
    border: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    border-radius: 0.625rem;
    background: var(--asi-surface-raised, #f8f9fa);
    /* theme_asi's raised-surface texture (slate in its dark mode, none in light). */
    background-image: var(--asi-surface-texture, none);
    background-blend-mode: overlay;
}

/* The tally's ninja: he fades in at the card's right end, crouched, then runs, crouches, leaps
   into a flip over the bar, lands and sprints right, and the card's edge cuts him off as he
   goes. Once, as the page loads (the card is at its top), all in CSS. Decoration only: hidden
   from screen readers, takes no clicks, and not shown at all with reduced motion, in print, or
   with the site's animations paused or hidden.
   pix/tally-ninja.png is his fourteen frames side by side (each 330 x 310, his ground line 298
   down), handed over by the renderer as --lsx-tally-ninja. Where he starts depends on where the
   key and the upcoming line end, which depends on the learner's numbers: local_livesessions/
   tallyninja measures it, sets --lsx-tally-start just past the text, and adds .is-running --
   or leaves him away when there isn't room for his routine. Without it he never shows. On a
   card under 900px wide there's no room anyway, so he isn't drawn at all. */
.lsx-tally {
    position: relative;
    container-type: inline-size;
}

.lsx-tally-runner {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.lsx-tally-ninja {
    position: absolute;
    left: var(--lsx-tally-start, calc(100% - 395px));
    bottom: 7px;
    height: 76px;
    aspect-ratio: 330 / 310;
    background: var(--lsx-tally-ninja) no-repeat 15.3846% 0 / 1400% 100%;
    opacity: 0;
}

.lsx-tally-runner.is-running .lsx-tally-ninja {
    animation:
        lsx-tally-ninja-frames 4380ms steps(1, end) forwards,
        lsx-tally-ninja-move 4380ms linear forwards,
        lsx-tally-ninja-fade 4380ms ease-out forwards;
}

@keyframes lsx-tally-ninja-frames {
    0% { background-position-x: 15.3846%; }
    21.689% { background-position-x: 0%; }
    23.858% { background-position-x: 7.6923%; }
    26.027% { background-position-x: 0%; }
    28.196% { background-position-x: 7.6923%; }
    30.365% { background-position-x: 15.3846%; }
    32.877% { background-position-x: 23.0769%; }
    37.215% { background-position-x: 30.7692%; }
    39.954% { background-position-x: 38.4615%; }
    42.466% { background-position-x: 46.1538%; }
    44.977% { background-position-x: 53.8462%; }
    47.489% { background-position-x: 61.5385%; }
    50.913% { background-position-x: 69.2308%; }
    54.566% { background-position-x: 76.9231%; }
    57.306% { background-position-x: 84.6154%; }
    59.247% { background-position-x: 92.3077%; }
    61.187% { background-position-x: 100%; }
    63.128% { background-position-x: 84.6154%; }
    65.068% { background-position-x: 92.3077%; }
    67.009% { background-position-x: 100%; }
    68.95% { background-position-x: 84.6154%; }
    70.89% { background-position-x: 92.3077%; }
    72.831% { background-position-x: 100%; }
    74.772% { background-position-x: 84.6154%; }
    76.712% { background-position-x: 92.3077%; }
    78.653% { background-position-x: 100%; }
    80.594% { background-position-x: 84.6154%; }
    82.534% { background-position-x: 92.3077%; }
    84.475% { background-position-x: 100%; }
    86.416% { background-position-x: 84.6154%; }
    88.356% { background-position-x: 92.3077%; }
    90.297% { background-position-x: 100%; }
    92.237% { background-position-x: 84.6154%; }
    94.178% { background-position-x: 92.3077%; }
    96.119% { background-position-x: 100%; }
    98.059% { background-position-x: 84.6154%; }
    100% { background-position-x: 100%; }
}

@keyframes lsx-tally-ninja-move {
    0% { transform: translate(0, 0); }
    21.689% { transform: translate(0px, 0px); }
    23.858% { transform: translate(24px, 0px); }
    26.027% { transform: translate(48px, 0px); }
    28.196% { transform: translate(72px, 0px); }
    30.365% { transform: translate(96px, 0px); }
    32.877% { transform: translate(100px, 0px); }
    37.215% { transform: translate(108px, -10px); }
    39.954% { transform: translate(128px, -24px); }
    42.466% { transform: translate(150px, -26px); }
    44.977% { transform: translate(170px, -14px); }
    47.489% { transform: translate(184px, 0px); }
    50.913% { transform: translate(184px, 0px); }
    54.566% { transform: translate(188px, 0px); }
    57.306% { transform: translate(196px, 0px); }
    59.247% { transform: translate(223px, 0px); }
    61.187% { transform: translate(250px, 0px); }
    63.128% { transform: translate(277px, 0px); }
    65.068% { transform: translate(304px, 0px); }
    67.009% { transform: translate(331px, 0px); }
    68.95% { transform: translate(358px, 0px); }
    70.89% { transform: translate(385px, 0px); }
    72.831% { transform: translate(412px, 0px); }
    74.772% { transform: translate(439px, 0px); }
    76.712% { transform: translate(466px, 0px); }
    78.653% { transform: translate(493px, 0px); }
    80.594% { transform: translate(520px, 0px); }
    82.534% { transform: translate(547px, 0px); }
    84.475% { transform: translate(574px, 0px); }
    86.416% { transform: translate(601px, 0px); }
    88.356% { transform: translate(628px, 0px); }
    90.297% { transform: translate(655px, 0px); }
    92.237% { transform: translate(682px, 0px); }
    94.178% { transform: translate(709px, 0px); }
    96.119% { transform: translate(736px, 0px); }
    98.059% { transform: translate(763px, 0px); }
    100% { transform: translate(790px, 0); }
}

/* In over half a second, a beat before he runs; gone when he's past the edge anyway. */
@keyframes lsx-tally-ninja-fade {
    0%,
    3.425% { opacity: 0; }
    13.699%,
    100% { opacity: 1; }
}

@container (max-width: 899px) {
    .lsx-tally-runner {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce), print {
    .lsx-tally-runner {
        display: none;
    }
}

/* Nor while the learner has the site's animations paused or hidden (theme_asi's Animations
   setting, the asi-motion-still class on <body>). */
.asi-motion-still .lsx-tally-runner {
    display: none;
}

.lsx-tally-title {
    margin: 0 0 0.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
}

.lsx-tally-figure {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    margin: 0;
}

.lsx-tally-num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--asi-ink, inherit);
}

.lsx-tally-of {
    color: var(--bs-secondary-color, #6c757d);
}

.lsx-tally-bar {
    display: flex;
    height: 0.6rem;
    border-radius: 999px;
    background: var(--bs-border-color, #dee2e6);
    overflow: hidden;
}

.lsx-tally-seg--earned {
    background: var(--asi-success, #198754);
}

.lsx-tally-seg--ready {
    background: var(--asi-accent, var(--bs-primary, #0f6cbf));
}

/* Each entry is as wide as its bar segment (flex-basis, from the --lsx-share set inline on each), so
   its label starts under where that segment starts. One that won't fit its segment -- a
   2% sliver -- keeps its own width (min-width) and nudges the next one along rather than
   overlapping it; the last takes whatever is left. */
.lsx-tally-key {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
}

.lsx-tally-key li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 var(--lsx-share, auto);
    min-width: max-content;
    padding-right: 1rem;
}

.lsx-tally-key li:last-child {
    flex-grow: 1;
    padding-right: 0;
}

/* CLP still to come, by attending live: under the key, in the same gold as the card's date
   icons -- it is about when. */
.lsx-tally-upcoming {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
}

.lsx-tally-upcoming .fa-regular {
    color: var(--asi-quote, #f7b541);
}

.lsx-tally-swatch {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 0.15rem;
}

@media (max-width: 767.98px) {
    .lsx-tally {
        grid-template-columns: minmax(0, 1fr);
    }

    /* On a phone the bar is too short to line labels up under it: just wrap them. */
    .lsx-tally-key {
        flex-wrap: wrap;
        gap: 0.35rem 1.25rem;
    }

    .lsx-tally-key li {
        flex-basis: auto;
        padding-right: 0;
    }
}

/* -- Next up showcase ------------------------------------------------------ */

/* The soonest session, featured: image on the left, details on the right, on the same
   raised (and, with theme_asi, textured) surface as the cards. Its content is sized up to
   fill its half of the card rather than sit small in one corner of it. Stacks below 992px. */
.lsx-showcase {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    margin-bottom: 1.5rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.75rem;
    background: var(--asi-surface-raised, #f8f9fa);
    background-image: var(--asi-surface-texture, none);
    background-blend-mode: overlay;
    /* No overflow: hidden -- it clipped the "Add to calendar" menu; the image rounds its
       own outer corners instead (below). */
}

.lsx-showcase--live {
    border: 2px solid var(--bs-danger, #dc3545);
}

/* The card is as tall as the thumbnail: the picture shows whole at 16:9, centred on the
   details beside it, never cropped to their height and never padded with bars. A
   YouTube poster is the 1280x720 maxresdefault, already 16:9; the rare letterboxed
   hqdefault fallback (localtime.js) is cover-fitted to the same 16:9, which trims exactly
   its bars. The details are sized to sit within that height. */
.lsx-showcase-media,
.lsx-showcase-media .lsx-showcase-image {
    border-start-start-radius: calc(0.75rem - 1px);
    border-end-start-radius: calc(0.75rem - 1px);
}

.lsx-showcase-media {
    position: relative;
    overflow: hidden;
    align-self: center;
    background: var(--bs-secondary-bg, #2b3b52);
}

/* On air: the Next up picture (or, with none, its placeholder screen) once the session is
   live, and the session page's waiting screen -- faint CRT scanlines, a magenta-to-cyan scan
   band sweeping slowly down, and a glow breathing in from the edges: the accent cyan while
   the session is still to come, red once it is on. Next up plays it only while live. Still (the
   scanlines only) for anyone who asks for reduced motion. */
.lsx-showcase--live .lsx-showcase-media,
.lsx-player-placeholder--notstarted {
    --lsx-onair-glow: 115, 223, 255;
    position: relative;
    overflow: hidden;
}

.lsx-showcase--live .lsx-showcase-media,
.lsx-player-placeholder--notstarted.lsx-player-placeholder--live {
    --lsx-onair-glow: 220, 53, 69;
}

.lsx-showcase--live .lsx-showcase-media::before,
.lsx-showcase--live .lsx-showcase-media::after,
.lsx-player-placeholder--notstarted::before,
.lsx-player-placeholder--notstarted::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* The waiting screen's words and countdown stay above the scan. */
.lsx-player-placeholder--notstarted > :not(.lsx-player-placeholder-img) {
    position: relative;
    z-index: 2;
}

.lsx-showcase--live .lsx-showcase-media::before,
.lsx-player-placeholder--notstarted::before {
    background: repeating-linear-gradient(180deg, rgba(0, 10, 23, 0.28) 0 1px, transparent 1px 3px);
    /* Two sweeps of the scan band and three breaths of glow, both done at 7.2s, then still. */
    animation: lsx-onair 2.4s ease-in-out 3;
}

.lsx-showcase--live .lsx-showcase-media::after,
.lsx-player-placeholder--notstarted::after {
    background:
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(255, 60, 120, 0.16) 42%,
            rgba(115, 223, 255, 0.3) 50%,
            rgba(255, 60, 120, 0.16) 58%,
            transparent 100%
        );
    background-size: 100% 45%;
    background-repeat: no-repeat;
    mix-blend-mode: screen;
    /* forwards: the band stays where the last sweep ends, below the picture, instead of
       snapping back to sit across the top as a line. */
    animation: lsx-onair-scan 3.6s linear 2 forwards;
}

@keyframes lsx-onair {
    0%,
    100% {
        box-shadow: inset 0 0 0 0 rgba(var(--lsx-onair-glow), 0);
    }
    50% {
        box-shadow: inset 0 0 28px 4px rgba(var(--lsx-onair-glow), 0.55);
    }
}

@keyframes lsx-onair-scan {
    from {
        background-position: 0 -120%;
    }
    to {
        background-position: 0 220%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lsx-showcase-media::before,
    .lsx-player-placeholder--notstarted::before {
        animation: none;
    }

    .lsx-showcase-media::after,
    .lsx-player-placeholder--notstarted::after {
        display: none;
    }
}

/* Next up with no picture of its own: a dark 16:9 screen with the mascot at his computer --
   the drawing used as a mask, twice: the brand magenta a few pixels behind, the accent cyan
   on top, like the dashboard cards' pictures. */
.lsx-showcase-image--placeholder {
    position: relative;
    display: block;
    background: #0b1220;
}

.lsx-showcase-mascot {
    position: absolute;
    top: 8%;
    bottom: 4%;
    left: 50%;
    aspect-ratio: 752 / 923;
    /* Never wider than the screen he sits in (a narrow column): the drawing scales down
       inside the box rather than being cropped. */
    max-width: 88%;
    -webkit-mask: var(--lsx-mascot) no-repeat center / contain;
    mask: var(--lsx-mascot) no-repeat center / contain;
}

.lsx-showcase-mascot--back {
    transform: translate(calc(-50% + 4px), 4px);
    background-color: rgba(255, 60, 120, 0.55);
}

.lsx-showcase-mascot--front {
    transform: translateX(-50%);
    background-color: rgba(115, 223, 255, 0.85);
}

.lsx-showcase-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.lsx-showcase-body {
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
}

.lsx-showcase-eyebrow {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
}

.lsx-showcase--live .lsx-showcase-eyebrow {
    color: var(--asi-danger, #dc3545);
}

.lsx-showcase-title {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
}

.lsx-showcase-title a {
    color: inherit;
    text-decoration: none;
}

/* As the dashboard's Live Sessions and Latest Courses titles: ink, taking the accent while it
   or the picture is pointed at, never underlined. */
.lsx-showcase-title a:hover,
.lsx-showcase-title a:focus {
    text-decoration: none;
}

.lsx-showcase-title-text {
    color: var(--asi-ink, inherit);
    transition: color 0.15s ease;
}

/* The session title goes accent while the picture, the live feed or the title itself is
   pointed at -- but NOT the "Part of <series>" link, which sits inside this same heading and
   has its own hover. `> a` is the title's own link only; the series link is nested deeper. */
.lsx-showcase:has(.lsx-showcase-image-link:hover, .lsx-showcase-feed-link:hover, .lsx-showcase-title > a:hover, .lsx-showcase-title > a:focus-visible) .lsx-showcase-title-text {
    color: var(--asi-accent, #0f6cbf);
}

.lsx-showcase .lsx-card-when {
    gap: 0.35rem;
    margin-bottom: 0;
    font-size: 1.0625rem;
}

.lsx-showcase .lsx-card-when-line .fa-regular {
    font-size: 1rem;
}

/* The label row a size up from the cards'. */
.lsx-showcase .lsx-state {
    gap: 0.5rem;
    margin-bottom: 0;
}

.lsx-showcase .lsx-label,
.lsx-showcase .lsx-card-clp-badge-inline {
    padding: 0.35rem 0.75rem;
    font-size: 0.9375rem;
}

.lsx-showcase .lsx-card-clp-badge-inline .lsx-card-clp-badge-num {
    font-size: 1.15rem;
}

.lsx-showcase-excerpt {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--asi-ink, inherit);
    white-space: pre-line;
    /* Five lines, then Read more (local_livesessions/readmore); the whole of it once opened.
       Never squeezed shorter by the column it is in. */
    flex-shrink: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    overflow: hidden;
}

.lsx-showcase-excerpt.lsx-clamp-open {
    display: block;
    -webkit-line-clamp: none;
    line-clamp: none;
    overflow: visible;
}

/* Read more / Show less: a quiet text button under the description, above the showcase's
   stretched title link. */
.lsx-readmore {
    position: relative;
    z-index: 2;
    align-self: flex-start;
    margin-top: -0.25rem;
    color: var(--asi-accent, var(--bs-link-color, #0d6efd));
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
}

.lsx-readmore:hover,
.lsx-readmore:focus {
    color: var(--asi-accent-hover, var(--bs-link-hover-color, #0a58ca));
    text-decoration: none;
}

/* Presenters with their job titles -- the showcase has the room the cards don't. */
.lsx-showcase-leaders {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.lsx-showcase .lsx-leader {
    padding-top: 0;
}

.lsx-showcase .lsx-leader-name {
    font-family: inherit;
    font-size: 1rem;
    letter-spacing: normal;
}

/* Big enough to know a face by: 40px, as the dashboard's Live Sessions block. */
.lsx-showcase .lsx-leader-photo {
    width: 2.5rem;
    height: 2.5rem;
}

/* The actions share the row equally, above the showcase's stretched title link. The
   register form is display: contents (see .lsx-card-register-form), so its button is the
   row's item. */
.lsx-showcase-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.lsx-showcase-actions > .lsx-calendar,
.lsx-showcase-actions > .lsx-card-register-form > .btn,
.lsx-showcase-actions > .btn {
    flex: 1 1 0;
    min-width: 0;
}

.lsx-showcase-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.9375rem;
}

@media (max-width: 991.98px) {
    .lsx-showcase {
        grid-template-columns: minmax(0, 1fr);
    }

    .lsx-showcase-media,
    .lsx-showcase-media .lsx-showcase-image {
        border-start-end-radius: calc(0.75rem - 1px);
        border-end-start-radius: 0;
    }

    .lsx-showcase-body {
        padding: 1.25rem;
    }

    .lsx-showcase-title {
        font-size: 1.75rem;
    }

}

@media (max-width: 575.98px) {
    .lsx-showcase-actions {
        flex-wrap: wrap;
    }

    .lsx-showcase-actions > .lsx-calendar,
    .lsx-showcase-actions > .lsx-card-register-form > .btn,
    .lsx-showcase-actions > .btn {
        flex-basis: 100%;
    }
}

/* Filters and chips link to #lsx-recordings; leave room for the theme's fixed top bar. */
.lsx-recordings {
    scroll-margin-top: 5rem;
}

/* No overflow: hidden -- it clipped the "Add to calendar" menu opening out of the
   footer. The image and the Processing panel round their own top corners instead. */
.lsx-card {
    position: relative;
    border: 1px solid var(--bs-border-color, #dee2e6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* The card itself is not a link -- only its title and image are -- so it doesn't lift on
   hover the way a whole-card link would. Instead the picture takes the dashboard Live
   Sessions block's hover (theme_asi .asi-ns-media): it eases in and frames in the accent,
   and the title turns the accent too (below), so the picture and the title read as one link
   to the session. No lift: the dashboard block's picture is inset within its ticket padding,
   but these pictures sit flush to the card edge, where a lift would pull the image off the
   corner. These links are decorative duplicates of the title link (tabindex="-1",
   aria-hidden), so hover is the only state they take. */
.lsx-card-image-link,
.lsx-showcase-image-link {
    display: block;
    /* Match the picture's own rounded corners so the accent frame below follows them. */
    border-radius: inherit;
}

/* The accent frame, drawn just inside the picture's edges (outline-offset: -2px) so it never
   collides with the card's own border on the flush edges, and painted on top of the image. */
.lsx-card-image-link:hover,
.lsx-card:hover .lsx-card-image-link,
.lsx-card:focus-within .lsx-card-image-link,
.lsx-showcase-image-link:hover {
    outline: 2px solid var(--asi-accent, var(--bs-primary, #0f6cbf));
    outline-offset: -2px;
}

/* The picture eases in on hover, the same scale the dashboard block's picture takes. The
   media clips it (overflow: hidden, below / already on the showcase media). */
.lsx-card-image,
.lsx-showcase-image {
    transition: transform 400ms ease;
}

.lsx-card-image-link:hover .lsx-card-image,
.lsx-card:hover .lsx-card-image,
.lsx-card:focus-within .lsx-card-image,
.lsx-showcase-image-link:hover .lsx-showcase-image {
    transform: scale(1.03);
}

/* Movement is decoration. Anyone who has asked the operating system to stop it has asked
   for a reason, and a hover that lifts is exactly the kind of thing they mean. */
@media (prefers-reduced-motion: reduce) {
    .lsx-card,
    .lsx-card:hover,
    .lsx-card:focus-within {
        transition: none;
        transform: none;
    }

    /* The picture's hover zoom is motion too; the accent frame and title colour stay. */
    .lsx-card-image,
    .lsx-showcase-image,
    .lsx-card-image-link:hover .lsx-card-image,
    .lsx-card:hover .lsx-card-image,
    .lsx-card:focus-within .lsx-card-image,
    .lsx-showcase-image-link:hover .lsx-showcase-image {
        transition: none;
        transform: none;
    }
}

.lsx-card-media {
    position: relative;
    /* Clip the picture's hover zoom to the media box. Safe here (unlike .lsx-card, which must
       stay overflow: visible for the calendar menu) -- the media only holds the picture. */
    overflow: hidden;
}

.lsx-card-media,
.lsx-card-media .lsx-card-image {
    border-start-start-radius: var(--bs-card-inner-border-radius, 0.375rem);
    border-start-end-radius: var(--bs-card-inner-border-radius, 0.375rem);
}

/* The card body's column layout lives here rather than in Bootstrap's d-flex/flex-column
   utilities: those are !important, and the list view needs to override it. */
.lsx-card-body {
    display: flex;
    flex-direction: column;
}

.lsx-card-image {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
    display: block;
}

/* A "recording coming soon" card: a dashed outline (it is not ready yet), and, with no
   image of its own, a dark screen in the image's place with PROCESSING lit up in the
   tape counter's VT323 lettering (self-hosted by theme_asi; monospace elsewhere) and a
   line saying the recording is on its way. Fixed dark in both colour modes -- it is a
   screen drawn on the card, like the RFO tape counter, not a themed surface. */
.lsx-card--awaiting {
    border-style: dashed;
}

.lsx-card-processing {
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #020509; /* fixed: a screen, not a themed surface */
    text-align: center;
}

.lsx-card-processing-screen {
    font-family: 'VT323', ui-monospace, monospace;
    font-size: 1.9rem;
    letter-spacing: 0.08em;
    line-height: 1;
    color: #73dfff;
    text-shadow: 0 0 6px rgba(115, 223, 255, 0.75), 0 0 14px rgba(115, 223, 255, 0.35);
}

.lsx-card-processing-screen i {
    font-size: 0.85em;
}

.lsx-card-processing-note {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #8aa0b5;
}

/* A recording not posted yet, pointed at: a screen being processed rather than a video to
   play. Faint CRT scanlines fade in over the image (or the black Processing screen) and a
   glowing cyan scan band sweeps down it; on the Processing screen the clock's hand ticks
   round and a cursor blinks after the word. Off for anyone who asks for reduced motion,
   which leaves just the scanlines. */
.lsx-card--awaiting .lsx-card-media {
    overflow: hidden;
}

.lsx-card--awaiting .lsx-card-media::before,
.lsx-card--awaiting .lsx-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}

/* The scanlines. */
.lsx-card--awaiting .lsx-card-media::before {
    background: repeating-linear-gradient(180deg, rgba(0, 10, 23, 0.35) 0 1px, transparent 1px 3px);
}

/* The scan band: a soft cyan glow travelling down the screen. */
.lsx-card--awaiting .lsx-card-media::after {
    background:
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(115, 223, 255, 0.18) 45%,
            rgba(115, 223, 255, 0.35) 50%,
            rgba(115, 223, 255, 0.18) 55%,
            transparent 100%
        );
    background-size: 100% 60%;
    background-repeat: no-repeat;
}

.lsx-card--awaiting:hover .lsx-card-media::before {
    opacity: 1;
}

.lsx-card--awaiting:hover .lsx-card-media::after {
    opacity: 1;
    animation: lsx-scan 1.8s linear infinite;
}

.lsx-card--awaiting:hover .lsx-card-processing-screen i {
    animation: lsx-tick 2.4s steps(12) infinite;
}

.lsx-card--awaiting:hover .lsx-card-processing-screen::after {
    content: "_";
    margin-inline-start: 0.1em;
    animation: lsx-blink 1s steps(1) 4; /* Then a steady cursor (WCAG 2.2.2). */
}

@keyframes lsx-scan {
    from {
        background-position: 0 -160%;
    }
    to {
        background-position: 0 260%;
    }
}

@keyframes lsx-tick {
    to {
        transform: rotate(360deg);
    }
}

@keyframes lsx-blink {
    50% {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lsx-card--awaiting:hover .lsx-card-media::after,
    .lsx-card--awaiting:hover .lsx-card-processing-screen i,
    .lsx-card--awaiting:hover .lsx-card-processing-screen::after {
        animation: none;
    }

    .lsx-card--awaiting:hover .lsx-card-media::after {
        opacity: 0;
    }
}

/* Status labels -- one system for the card and the session page: the same size as the
   CLP chip, an icon on each, and a solid fill per meaning with the theme's on-fill ink
   (dark on the dark theme's bright fills, white on the light theme's deep ones), so each
   reads at a glance instead of as faint coloured text on a tint of itself.
     live      red        -- happening now
     opening   amber      -- being waited on: about to start
     soon      amber      -- being waited on: the recording
     earned    green      -- done
     upcoming  outlined   -- plain fact, nothing to do yet
     recorded  outlined   -- plain fact
   The session page adds .lsx-state-badge for its larger size (span.lsx-state-badge
   out-specifies this). */
.lsx-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    white-space: nowrap;
}

.lsx-label[hidden] {
    display: none;
}

.lsx-label .fa-regular,
.lsx-label .fa-solid {
    font-size: 0.9em;
}

.lsx-label .lsx-pulse {
    margin-right: 0;
}

.lsx-label--live {
    background: var(--asi-danger, #dc3545);
    color: var(--asi-accent-ink, #fff);
}

.lsx-label--opening,
.lsx-label--soon {
    background: var(--asi-warning, #ffc107);
    color: var(--asi-accent-ink, #212529);
}

.lsx-label--earned {
    background: var(--asi-success, #198754);
    color: var(--asi-accent-ink, #fff);
}

.lsx-label--upcoming,
.lsx-label--recorded {
    border-color: var(--bs-border-color, #adb5bd);
    background: transparent;
    color: var(--asi-ink, inherit);
}

/* A card's badge row: CLP first, then the state and Earned, evenly spaced and centred on
   one line (wrapping if the card is narrow). */
.lsx-card .lsx-state {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    /* Under the date and time, above the excerpt: space it off the excerpt below. */
    margin-bottom: 0.75rem;
}

/* CLP as a badge on the image corner — the same treatment the training library gives a
   course card, so the two catalogues read as one system. Solid accent chip, number given
   real weight. Falls back to the theme primary outside theme_asi. */
.lsx-card-clp-badge {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    z-index: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    padding: 0.28rem 0.6rem;
    border-radius: 0.45rem;
    background: var(--asi-accent, var(--bs-primary, #0f6cbf));
    color: var(--asi-accent-ink, #08122a);
    box-shadow: var(--lsx-shadow-sm);
    line-height: 1;
}

.lsx-card-clp-badge-num {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.lsx-card-clp-badge-unit {
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* A recording's play button: a filled accent circle over a soft dim of the image. On a
   screen that can hover it appears only while the card is pointed at, fading in with the
   button growing into place; a touch screen, which can't hover, doesn't show it (the
   strip's "Watch the recording" already marks a card as a video). */
.lsx-card-play {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: none;
    align-items: center;
    justify-content: center;
    border-start-start-radius: var(--bs-card-inner-border-radius, 0.375rem);
    border-start-end-radius: var(--bs-card-inner-border-radius, 0.375rem);
    background: rgba(0, 10, 23, 0.4);
    pointer-events: none;
}

.lsx-card-play i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--asi-accent, var(--bs-primary, #0f6cbf));
    color: var(--asi-accent-ink, #fff);
    font-size: 1rem;
    transform: scale(0.8);
    transition: transform 250ms ease;
}

@media (hover: hover) {
    .lsx-card-play {
        display: flex;
        opacity: 0;
        transition: opacity 250ms ease;
    }

    .lsx-card:hover .lsx-card-play {
        opacity: 1;
    }

    .lsx-card:hover .lsx-card-play i {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lsx-card-play,
    .lsx-card-play i {
        transition: none;
    }
}

/* A recording's length and how far the viewer has watched are the strip's to show
   (session_strip.mustache), once per card: neither is repeated on the image. */

/* The same progress in words over a retro segmented meter (ten blocks, like the RFO
   library's List view). Read by a screen reader everywhere, but only seen in the List view
   and on a card with no image; a recording's card in the Cards view has its strip. */
.lsx-card-watch {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.lsx-card:not(:has(.lsx-card-media)) .lsx-card-watch,
.lsx-listing--list .lsx-card-watch {
    position: static;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
}

/* Cards view, a recording with an image: the progress in words as well, under the card's
   facts -- the bar along the image alone was easy to miss. No meter here: the bar is it. */
.lsx-listing--cards .lsx-card--recorded:has(.lsx-card-media) .lsx-card-watch {
    position: static;
    display: block;
    width: auto;
    height: auto;
    margin-top: 0.75rem;
    overflow: visible;
    clip: auto;
}

.lsx-listing--cards .lsx-card--recorded:has(.lsx-card-media) .lsx-card-watch-track {
    display: none;
}

.lsx-listing--cards .lsx-card--recorded .lsx-card-watch-text {
    color: var(--asi-success, #198754);
}

/* "13 of 246 min watched" on a card; the List view's narrow column keeps "13 of 246 min"
   under its "Your progress" heading. */
.lsx-card-watch-suffix {
    display: none;
}

.lsx-listing--cards .lsx-card--recorded .lsx-card-watch-suffix {
    display: inline;
}

.lsx-card-watch-meter {
    display: block;
    inline-size: 6rem;
    block-size: 0.5rem;
    overflow: hidden;
    border-radius: 1px;
    background: var(--asi-border, #dee2e6);
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
    mask: repeating-linear-gradient(90deg, #000 0 calc(10% - 2px), transparent calc(10% - 2px) 10%);
}

/* Sized to the whole meter, so the blocks shade from pale to vivid whatever the progress. */
.lsx-card-watch-fill {
    display: block;
    block-size: 100%;
    background-image: linear-gradient(90deg, #96e19b, #0fb91e);
    background-size: 6rem 100%;
    background-repeat: no-repeat;
}

/* Wraps the segmented meter so the goal tick can sit over it without being clipped by the
   meter's overflow or cut up by its block mask. Sized to the meter (6rem). */
.lsx-card-watch-track {
    position: relative;
    display: inline-block;
}

/* The claim's goal at 80%: the session page's tick (.lsx-led-goal) -- a thin slanted bar in
   the ink colour with the accent glow -- not a finish flag. A sibling of the meter, so the
   meter's mask and overflow leave it alone. */
.lsx-card-watch-goal {
    position: absolute;
    inset-block-start: -4px;
    inset-inline-start: calc(80% - 1px);
    inline-size: 2px;
    block-size: calc(0.5rem + 8px);
    border-radius: 1px;
    background: var(--asi-ink, #1d2733);
    transform: skewX(-20deg);
    box-shadow: 0 0 6px var(--asi-accent, #0d6efd);
}

/* What the tick means, in the session page's words and style ("80% · Claim unlocks"). Wider
   than the 6rem meter, so it is a line of its own under it rather than hung off the tick. */
.lsx-card-watch-goallabel {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--asi-ink, #1d2733);
    white-space: nowrap;
}

/* Enough has played: "80% · Claim unlocked", in the progress green. */
.lsx-card-watch-goallabel--unlocked {
    color: var(--asi-success, #198754);
}

/* Cards view, a recording with an image: the words only, as the meter itself isn't shown. */
.lsx-listing--cards .lsx-card--recorded:has(.lsx-card-media) .lsx-card-watch-goallabel {
    display: none;
}

/* "Picking up where you left off, at 4:26.": its own row directly under the video (the
   grid's "resume" area), above the meter. */
.lsx-resume {
    grid-area: resume;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin: 0.75rem 0 0;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.9375rem;
}

.lsx-resume .fa-clock-rotate-left {
    color: var(--asi-quote, #f2c14e);
}

.lsx-card-clp-badge-inline {
    position: static;
    bottom: auto;
    right: auto;
    vertical-align: middle;
    padding: 0.2rem 0.5rem;
}

.lsx-card-clp-badge-inline .lsx-card-clp-badge-num {
    font-size: 1rem;
}

.lsx-card-title {
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.lsx-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

/* Hover: the title takes the accent (no underline -- the same as every library page). */
.lsx-card-title a:hover,
.lsx-card-title a:focus-visible {
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
}

/* Hovering anywhere on the card -- not only the title link itself -- takes the title to the
   accent, matching the RFO Library's whole-card hover (merged via #35). The thumbnail keeps
   its own hover (see .lsx-card-image-link above -- this branch gives it a zoom + accent frame),
   so a recording's thumbnail behaviour is unchanged. The series sub-link is excluded: it keeps
   its own accent-hover. Whole-card hover already covers the image, so it supersedes the
   image-only title hover this branch first proposed. */
.lsx-card:hover .lsx-card-title a:not(.lsx-card-series-link),
.lsx-card:focus-within .lsx-card-title a:not(.lsx-card-series-link) {
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
    text-decoration: none;
}

/* "Part of <series>" under a session's title (renderer::series_line()), in the quiet small
   body text, the series' name in the accent, linking to its page. Lifted above the title's
   link, which the List view stretches over the whole row, so it opens the series and not
   the session. */
.lsx-card-series {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    margin-top: 0.25rem;
    font-family: var(--asi-font-body, inherit);
    font-size: var(--asi-small-size, 0.8125rem);
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.35;
    text-transform: none;
    color: var(--asi-ink-muted, var(--bs-secondary-color, #6c757d));
}

.lsx-card-series i {
    flex: 0 0 auto;
}

a.lsx-card-series-link,
.lsx-card-title a.lsx-card-series-link {
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
    text-decoration: none;
}

a.lsx-card-series-link:hover,
a.lsx-card-series-link:focus-visible,
.lsx-listing--list .lsx-card:hover .lsx-card-title a.lsx-card-series-link {
    color: var(--asi-accent-hover, var(--asi-accent, #0f6cbf));
    text-decoration: none;
}

.lsx-listing--list .lsx-card-title a.lsx-card-series-link::after {
    content: none;
}

/* On Next up, the same line under its larger title. */
.lsx-showcase-title .lsx-card-series {
    margin-top: 0.4rem;
}

/* A title alone doesn't always say what a session covers ("Ordering Coffee with a SOW???"
   being the case that prompted this). Not clamped -- session_card.php's own shorten_text()
   call already bounds this to 220 characters at a word boundary, so a 2-line CSS clamp on
   top of that only ever cut the text again mid-word, which read as a bug. */
.lsx-card-excerpt {
    /* The site's description size: --asi-desc-size from theme_asi ("Description text size"), 16px without it. */
    font-size: var(--asi-desc-size, 1rem);
    /* NOT color: inherit -- .lsx-card-title's own white comes from a heading-specific
       color rule elsewhere in the theme, not from inheriting the card's plain body-text
       color, so an excerpt <p> (not a heading) inheriting the same way pulls in
       Bootstrap's own muted body/link blue instead. Same token local_rfo's identical
       description-color fix uses to match its own title. */
    color: var(--asi-ink);
    line-height: 1.45;
    margin: 0 0 0.75rem;
    /* session::intro_text() turns a paragraph into a blank line and a <br> into a newline
       -- this is what makes them show as a paragraph gap and a line break instead of
       collapsing to a single space the way plain HTML/CSS normally treats whitespace. */
    white-space: pre-line;
}

.lsx-meta {
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0;
}

/* Date and year on one line, the time range on the next. */
.lsx-when-date,
.lsx-when-time {
    display: block;
}

.lsx-when-time {
    margin-top: 0.15rem;
}

/* On a card: the date, then the time on the next line, each after its icon -- the icon
   column keeps the two lines' text aligned whatever the glyph widths. */
.lsx-card-when {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.65rem;
}

.lsx-card-when-line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.lsx-card-when-line .fa-regular {
    width: 1em;
    font-size: 0.8125rem;
    text-align: center;
    /* Gold, from theme_asi's warm-gold token: #f7b541 on the dark canvas, its darker
       amber-brown on light, so the icons stay visible on either. */
    color: var(--asi-quote, #f7b541);
}

.lsx-card-when .lsx-when-time {
    margin-top: 0;
}

/* A recording's card: one quiet line, "Recorded <date>", instead of the date and the time
   it aired in bold -- for something watched whenever, those were the loudest facts on the
   card and the least useful. (The List view keeps its date column.) */
.lsx-card-recorded-label {
    display: none;
}

.lsx-listing--cards .lsx-card--recorded .lsx-card-recorded-label {
    display: inline;
}

.lsx-listing--cards .lsx-card--recorded .lsx-card-when-line + .lsx-card-when-line {
    display: none;
}

.lsx-listing--cards .lsx-card--recorded .lsx-card-when,
.lsx-listing--cards .lsx-card--recorded .lsx-card-when .lsx-when-date {
    color: var(--asi-ink-muted, #6c757d);
    font-size: var(--asi-small-size, 0.875rem);
    font-weight: 400;
}

.lsx-listing--cards .lsx-card--recorded .lsx-card-when-line {
    gap: 0.35rem;
}

.lsx-listing--cards .lsx-card--recorded .lsx-card-when-line .fa-regular {
    color: inherit;
}

.lsx-dot {
    margin: 0 0.35rem;
}

.lsx-card-footer {
    background: transparent;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    /* flex + space-between, not the old text-align: center -- an upcoming session's footer
       now carries two controls (calendar dropdown, then the action button -- in that DOM
       order, see session_card.mustache), and text-align only ever centred a single
       inline-flex box. space-between (rather than centre) pins the calendar dropdown left
       and the action button right, matching their left-to-right DOM order instead of
       clumping both toward the middle. Wraps on narrow cards; row-gap keeps a visible gap
       between the two lines instead of them touching. */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 0.75rem;
    column-gap: 0.5rem;
}

/* space-between only makes sense once there are two controls to split. Live sessions
   ("Join now" only), past sessions ("Watch recording" only), and awaiting-recording
   sessions (.lsx-awaiting text only) never render the calendar dropdown alongside their
   single control (see showcalendar in session_card.php), so without this, that lone
   control/text sits flush left instead of the centred placement the footer had before the
   calendar dropdown existed. :has() is already used elsewhere in this file (see
   .lsx-card:has(.lsx-card-action) above). */
.lsx-card-footer:has(> :only-child) {
    justify-content: center;
}

/* Registering swaps Register for Registered in the same place: the footer stays split
   space-between, so neither button moves when the page comes back. */

.lsx-card-action {
    height: 36px;
    padding: 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* The register/cancel toggle is a <form><button> now (a real POST, not a link), wrapped
   around the same .lsx-card-action a plain link used to be -- the form itself carries no
   visual footprint of its own beyond passing its button through unchanged. */
.lsx-card-register-form {
    display: contents;
}

.lsx-card-registered .fa-circle-check {
    margin-right: 0.35rem;
}

/* A footer too narrow for Add to calendar and "Registered" side by side (the calendar
   button is about 11.25rem, "Registered" about 8rem): the check stands alone, so the pair
   stays on one line wherever Add to calendar and Register did. The word is still read
   out, and shown as the button's tooltip. */
.lsx-listing--cards .lsx-card-footer {
    /* stylelint-disable-next-line csstree/validator */
    container-type: inline-size;
}

/* stylelint-disable-next-line csstree/validator */
@container (max-width: 20rem) {
    .lsx-card-registered {
        min-width: 2.75rem;
        padding-inline: 0.75rem;
    }

    .lsx-card-registered .fa-circle-check {
        margin-right: 0;
        font-size: 1rem;
    }

    .lsx-card-registered-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/*
 * The card is one big link (.stretched-link) and the leader's name is a button on top of
 * it. A link inside a link is invalid HTML that browsers recover from unpredictably, so
 * the button is lifted out of the overlay's stacking context instead.
 */
.lsx-leader,
.lsx-card-footer,
.lsx-edit {
    position: relative;
    z-index: 2;
}

/* -- Live ----------------------------------------------------------------- */

.lsx-card-live {
    border-color: var(--bs-danger, #dc3545);
    border-width: 2px;
}

.lsx-pulse {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: currentColor;
    animation: lsx-pulse 2s ease-in-out 3; /* Three beats, then steady (WCAG 2.2.2). */
}

@keyframes lsx-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

/* The dot carries no information the word "Live now" does not already carry, so when
   motion is unwelcome it simply stops rather than needing a replacement. */
@media (prefers-reduced-motion: reduce) {
    .lsx-pulse {
        animation: none;
    }
}

/* -- Presenters ----------------------------------------------------------- */

/* The container owns alignment, so one presenter and several line up identically
   (a stray inherited centering was aligning only the first row otherwise). */
.lsx-leaders {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.lsx-leader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.4rem;
}

/* On a card the presenters are one line under a hairline: a stack of their photos, then
   their names separated by a pipe. Names wrap to a second line only when a card is too
   narrow for them all. */
.lsx-card .lsx-leaders {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    align-self: stretch;
    /* Pinned to the card's foot -- here, not Bootstrap's !important mt-auto, so the list
       view can centre it in its row instead. */
    margin-top: auto;
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    padding-top: 0.65rem;
}

.lsx-card-leader-photos {
    display: flex;
    flex: 0 0 auto;
}

/* Overlapping, each ringed in the card's own colour so the edges read as separate faces. */
.lsx-card-leader-photos .lsx-leader-photo {
    width: 1.6rem;
    height: 1.6rem;
    border: 2px solid var(--bs-card-bg, var(--asi-surface-raised, #fff));
}

.lsx-card-leader-photos .lsx-leader-photo + .lsx-leader-photo {
    margin-left: -0.5rem;
}

/* Every name carries a separator in front of it (below), and the whole run is pulled left
   by one separator's width and clipped there -- so whichever name starts a line, at any
   width, has its separator in the clipped strip. Separators only ever show between
   names on the same line, never at the start of a wrapped one. The clip leaves room for
   a focused name's outline. */
.lsx-card-leader-names {
    --lsx-sep: 1.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.15rem;
    min-width: 0;
    margin-left: calc(-1 * var(--lsx-sep));
    clip-path: inset(-0.25rem -0.25rem -0.25rem calc(var(--lsx-sep) - 0.35rem));
}

/* Each name keeps .lsx-leader (lifted above the card's stretched link) but sits inline. */
.lsx-card .lsx-leader {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    padding-top: 0;
    /* No gap here: on a card this leader holds only the ::before separator and the name, and
       the separator already carries its own symmetric margin (--lsx-sep / 2 each side). The
       base .lsx-leader gap (for photo + name elsewhere) would land between the separator and
       the name, pushing the name ~0.5rem further off the pipe than the previous name is --
       the pipe then looks off-centre (9px before, 17px after). */
    gap: 0;
}

/* The separator: a 1px rule drawn in CSS rather than a "|" character -- a glyph that thin
   picks up coloured fringes from Windows' ClearType on a dark card (it showed pink and
   gold). Centred in its --lsx-sep strip, in the muted text colour. Decoration only: a
   screen reader already hears each name as its own button. */
.lsx-card-leader-names .lsx-leader::before {
    content: "";
    flex: 0 0 auto;
    width: 1px;
    height: 0.95em;
    margin-inline: calc((var(--lsx-sep) - 1px) / 2);
    background: var(--bs-secondary-color, #6c757d);
}

.lsx-leader-photo {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

/* A second way into the leader dialog, alongside the name button beside it -- reset to
   plain button chrome (no background/border of its own) so only the photo shows, with a
   stroked ring on hover/focus so the photo itself reads as clickable the same way the
   name does. Used both on the card (.lsx-leader-photo, session_card.mustache) and the
   session detail page's own leader block (.lsx-leader-photo-medium,
   session_page.mustache) -- .lsx-leader is already lifted above the card's own
   .stretched-link overlay, so no separate z-index rule is needed here for that case; the
   detail page's leader block isn't inside a stretched-link at all. */
.lsx-leader-photo-btn {
    display: inline-flex;
    padding: 0;
    border: 0;
    background: none;
    border-radius: 50%;
    line-height: 0;
    cursor: pointer;
}

.lsx-leader-photo-btn .lsx-leader-photo,
.lsx-leader-photo-btn .lsx-leader-photo-medium {
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: outline-color 0.15s ease;
}

.lsx-leader-photo-btn:hover .lsx-leader-photo,
.lsx-leader-photo-btn:focus-visible .lsx-leader-photo,
.lsx-leader-photo-btn:hover .lsx-leader-photo-medium,
.lsx-leader-photo-btn:focus-visible .lsx-leader-photo-medium {
    outline-color: var(--asi-accent, var(--bs-primary, #0d6efd));
}

.lsx-leader-photo-btn:focus-visible {
    outline: none;
}

.lsx-leader-photo-medium {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
}

/* Bigger here by request: the dialog is where you decide whether to trust the person. */
.lsx-leader-photo-large {
    width: 7.5rem;
    height: 7.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

/* Photo and the name/social/bio column, side by side -- a flex row instead of a float, so
   .lsx-leader-body no longer needs its own clearfix (see leader_modal.mustache, which
   wraps the text content in .lsx-leader-info to give the flex row a second item). Wraps to
   a stacked, centered layout on narrow viewports rather than squeezing both columns thin. */
.lsx-leader-body {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem;
}

.lsx-leader-info {
    min-width: 0;
    flex: 1 1 16rem;
}

/* Wider dialog for the bio, by request -- this is a full introduction, not a tooltip. */
.lsx-leader-modal-dialog {
    max-width: 40rem;
}

.lsx-leader-modal-header {
    border-bottom: 0;
    padding-bottom: 0;
}

/* Just a centering wrapper -- the photo itself (.lsx-leader-photo-large) is the whole
   visual, no ring behind it. */
.lsx-leader-photo-wrap {
    display: flex;
    flex: 0 0 auto;
    margin: 0 auto;
}

.lsx-leader-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
    min-width: 0;
}

.lsx-leader-name {
    font-weight: 600;
    text-align: left;
    vertical-align: baseline;
}

/* This is a real <button> (opens the bio modal), so it needs a visible focus indicator --
   WCAG 2.4.7 -- for keyboard users, and it keeps focus after the modal closes, so a mouse
   click leaves it showing too. Left unstyled, it fell back to Bootstrap's default .btn
   focus box-shadow, a squared-off ring sized to the button's own box rather than to the
   name text -- which visually read as a box shoved between the name and the title below
   it, not as a focus ring. A slim outline that hugs the text instead keeps the same
   accessibility guarantee without the bulk. */
.lsx-leader-name:focus {
    box-shadow: none;
}

/* Never underlined, pointed at or not: the colour deepens instead (Bootstrap's .btn-link
   underlines on hover). */
.lsx-leader-name,
.lsx-leader-name:hover,
.lsx-leader-name:focus {
    text-decoration: none;
}

.lsx-leader-name:focus-visible {
    outline: 2px solid var(--bs-link-color, #0d6efd);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

.lsx-leader-title {
    font-size: 0.8125rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* The dialog's own name/title are bigger than the inline card byline above -- this is the
   page's one heading, not a caption under a thumbnail. */
.lsx-leader-modal-name {
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--asi-ink, #08122a);
}

.lsx-leader-info .lsx-leader-title {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    color: var(--asi-ink-muted, #6c757d);
}

/* Email/LinkedIn as small round badges instead of a plain mailto link -- see the class
   docblock in leader_modal.mustache for why there is no JS-driven icon set here: two
   inline SVGs, styled with the site's own accent token. */
.lsx-leader-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lsx-leader-social:empty {
    display: none;
}

.lsx-leader-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--asi-accent, var(--bs-primary, #0f6cbf));
    color: var(--asi-accent-ink, #fff);
    transition: opacity 0.15s ease-in-out;
}

.lsx-leader-social-icon:hover,
.lsx-leader-social-icon:focus-visible {
    opacity: 0.82;
    color: var(--asi-accent-ink, #fff);
}

.lsx-leader-social-icon:focus-visible {
    outline: 2px solid var(--asi-accent, var(--bs-link-color, #0d6efd));
    outline-offset: 2px;
}

.lsx-leader-bio {
    color: var(--asi-ink, inherit);
    line-height: 1.5;
}

/* -- Breadcrumb (above the player) ----------------------------------------- */

/* The theme's own core breadcrumb (built from $PAGE->navbar, id="page-navbar") still
   renders above this on session.php -- it has to, session.php still adds itself to
   $PAGE->navbar for accessibility/history the normal Moodle way -- but .lsx-breadcrumb
   below is the richer, purpose-built trail (it can express the conditional "Archive"
   crumb a past session's route back needs, which the generic navbar trail can't), so the
   core one is pure visual duplication wherever this one is present. Confirmed live: two
   stacked breadcrumb rows saying almost the same thing. Scoped to a page actually
   carrying .lsx-breadcrumb rather than hidden globally -- #page-navbar is Boost's shared
   wrapper id, present on unrelated pages sitewide that still need their own core
   breadcrumb shown normally.

   Note this does NOT also hide .page-context-header (core's title region): session.php's
   set_heading() call above already uses a generic "Live Sessions" label, not the
   session's own name (see that comment) -- so core's title and .lsx-session-title's
   in-page repeat never said the same thing to begin with. A brief attempt to hide
   .page-context-header here too (matching a since-corrected local_rfo change) was a
   regression: it threw away that legitimate, distinct "Live Sessions" section label
   instead of fixing an actual duplicate. */
body:has(.lsx-breadcrumb) #page-navbar {
    display: none;
}

/* Same treatment as local_rfo's own .rfo-breadcrumb: a quiet trail, one degree
   quieter than the content beneath it -- it orients, it does not compete for attention.
   Replaces what used to be a separate "Back" link. */
.lsx-breadcrumb {
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    color: var(--asi-ink-muted, #6c757d);
}

.lsx-breadcrumb a {
    display: inline-flex;
    align-items: center;
    min-height: 44px; /* touch target */
    color: var(--asi-ink-muted, #6c757d);
    text-decoration: none;
}

.lsx-breadcrumb a:hover,
.lsx-breadcrumb a:focus-visible {
    color: var(--asi-accent, #0f6cbf);
    text-decoration: underline;
}

.lsx-breadcrumb-sep {
    margin: 0 0.35rem;
    color: var(--asi-border-strong, #495057);
}

/* The session page's back button: theme_asi's .asi-course-back, as on the course and RFO
   pages, in the breadcrumb's place and column. Not pulled up under the topbar (the
   theme's offset is for a button above the page), and no trail-link underline. */
.lsx-back .asi-course-back {
    margin-top: 0;
    margin-bottom: 0;
}

.lsx-back .asi-course-back:hover,
.lsx-back .asi-course-back:focus-visible {
    text-decoration: none;
}

/* The one on-page mention of the session's own name -- the trail links before it stay
   quiet (per the comment above), but the current segment carries more weight than a plain
   muted breadcrumb crumb usually would, since nothing else on the page states the name at
   this size. Matches the leader name's own 15px/600 treatment rather than introducing a
   third weight. */
.lsx-breadcrumb-current {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--asi-ink, #212529);
}

/* -- The player ----------------------------------------------------------- */

/* Sized like a course page's video lesson: capped at 55rem (theme_asi's
   $asi-video-column, the width .asi-video-watch-row and local_rfo's .rfo-player use) and
   centred, rather than a share of the viewport -- 60vw kept growing with the monitor and
   read far wider than a course video. aspect-ratio keeps the height scaling with it
   automatically, so there is no separate height rule to keep in sync. */
.lsx-player {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 55rem;
    margin-inline: auto;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.lsx-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* liveplayer.js's "Turn sound on", over the player's top-left corner while a stream it
   had to start muted is playing. Top-left because YouTube's own controls run along the
   bottom and its share buttons sit top-right; gone for good once clicked. */
.lsx-unmute {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border: 0;
    border-radius: 0.375rem;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.lsx-unmute:hover,
.lsx-unmute:focus-visible {
    background: #000;
}

.lsx-unmute:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* -- Transcript panel ------------------------------------------------------
   Sits beside the player, not below it: a transcript is read while the video plays, so it
   needs to stay visible without scrolling the video out of view. Grid rather than flex so
   the collapsed state (below) can shrink the transcript track to near-zero without the
   JS having to touch either column's width directly. */
/* Fixed rem columns, not 7fr/3fr: the video stays at the course pages' 55rem whether the
   transcript is open or not, beside a 20rem transcript column -- the width local_rfo's
   video pages use ($rfo-watch-transcript), wider than a course page's 16rem because 16
   read as thin -- and the row is centred at their combined width (55 + 1.25 gap + 20 =
   76.25rem). Only the row's width changes between states. */
.lsx-watch-row {
    display: grid;
    grid-template-columns: minmax(0, 55rem) minmax(0, 20rem);
    max-width: 76.25rem;
    margin-inline: auto;
    /* The toggle gets its own row, spanning both columns, instead of being absolutely
       positioned above the row -- that earlier approach depended on there being enough
       clear space above .lsx-watch-row to render into, which isn't guaranteed at every
       viewport (a wrapped page title, a narrower ancestor, a tablet width where the row
       sits closer to the page top all shrink or remove that space), so the button ended
       up rendering over the transcript header/search box instead of above it. A named
       grid row is unconditional: the toggle always gets its own track, never overlapping
       whatever is below it, regardless of any other element's height at any width. */
    /* The watch meter (a recording with a claim waiting on it) is a row of its own under
       the player only, so the transcript beside the video stays exactly the video's height.
       No row gap: the meter joins the player's bottom edge (the toolbar keeps its own space
       below it instead). */
    grid-template-areas:
        "toolbar toolbar"
        "player  transcript"
        "resume  ."
        "meter   .";
    row-gap: 0;
    column-gap: 1.25rem;
    /* stretch (grid's own default, set explicitly since align-items: start was here
       before): the transcript column matches the player's row height instead of sizing
       to its own content -- see .lsx-transcript's height below, which is what actually
       consumes that stretched height rather than sizing itself independently. */
    align-items: stretch;
}

.lsx-watch-row--notranscript {
    /* No toggle button renders at all without a transcript (see hastranscript in the
       template), so there is no "toolbar" row to reserve here. */
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "player" "resume" "meter";
    max-width: 55rem;
}

.lsx-watch-main {
    grid-area: player;
}

/* Only when a transcript column is actually present does the player need to give up its
   55rem centring and fill its grid column -- .lsx-watch-row--notranscript still wants
   the original centred, capped player, and since it carries the base .lsx-watch-row class
   too, the override has to name the transcript specifically rather than the row. */
/* :not(.lsx-watch-row--collapsed) matters: :has() only checks whether .lsx-transcript
   exists in the DOM, not whether it's visible -- collapsing it only sets display:none,
   it never removes the element. Without this guard the player stayed full-bleed even
   with the panel hidden, instead of returning to its original centred, 55rem-capped
   size (the .lsx-player rule further up) the way it looked before this feature existed. */
.lsx-watch-row:has(.lsx-transcript):not(.lsx-watch-row--collapsed) .lsx-player {
    max-width: none;
    margin-inline: 0;
}

.lsx-watch-toolbar {
    /* A real grid row (see .lsx-watch-row's grid-template-areas) rather than absolute
       positioning above the row -- that depended on there being clear space above
       .lsx-watch-row to render into, which isn't guaranteed at every viewport, and
       collapsing under-height meant the button rendered over the transcript header and
       search box instead of above it. This track always exists, so the button is never
       laid over anything else regardless of width. NOT a child of .lsx-transcript, which
       is what display:none's on collapse, so a control living inside it could never be
       clicked again to un-collapse. */
    grid-area: toolbar;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: flex-end;
}

.lsx-transcript-toggle {
    background: var(--asi-surface-raised, #f8f9fa);
    border: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    color: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    min-height: 44px; /* touch target */
    border-radius: 0.375rem;
    cursor: pointer;
}

.lsx-transcript-toggle:focus-visible {
    outline: 3px solid var(--asi-focus, var(--asi-accent, #0d6efd));
    outline-offset: 2px;
}

.lsx-transcript {
    grid-area: transcript;
    background: var(--asi-surface-raised, #f8f9fa);
    border: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    /* Matches the player's height exactly -- the row stretches this column (see
       .lsx-watch-row's align-items above) to the tallest item in the row, which is
       always .lsx-watch-main's aspect-ratio-driven player, so this needs no height or
       max-height of its own beyond filling that stretched box. .lsx-transcript-cues
       below is what scrolls internally once content overflows it. */
    height: 100%;
    /* A grid item's default min-height is auto, not 0 -- meaning without this, a tall
       enough transcript grows PAST the stretched height above instead of being capped
       by it, dragging the whole row (and the player inside it) taller too. This is what
       actually enforces "never taller than the video, scroll instead". */
    min-height: 0;
    overflow: hidden;
}

/* Collapsed: the transcript column shrinks to nothing and the player's column takes the
   freed space, rather than the row itself changing template (which would fight the JS
   state that toggles this class on the same element every click). */
/* No column gap either, and the row back to the video's own 55rem: the collapsed
   transcript track is 0, but a 1.25rem gap beside it would still be reserved and leave the
   video that much narrower than the description row underneath. */
.lsx-watch-row--collapsed {
    grid-template-columns: minmax(0, 1fr) 0;
    column-gap: 0;
    max-width: 55rem;
}

.lsx-watch-row--collapsed .lsx-transcript {
    display: none;
}

.lsx-transcript-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem 0.6rem;
    border-bottom: 1px solid var(--asi-border, rgba(0, 0, 0, 0.12));
}

.lsx-transcript-head h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--asi-ink, #1d2733);
    margin: 0;
}

/* Wraps the icon + input as one positioned unit, sized against .lsx-transcript-head
   (which spans the full transcript panel -- the "outer transcript container") rather
   than shrink-wrapping its own content, so the field actually widens to half the
   panel's width instead of staying pinned to a fixed size. */
.lsx-transcript-search-label {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 50%;
    min-width: 0;
}

.lsx-transcript-search-icon {
    position: absolute;
    left: 0.55rem;
    font-size: 0.75rem;
    color: var(--asi-ink-muted, #6c757d);
    pointer-events: none;
}

.lsx-transcript-search {
    font-size: var(--asi-small-size, 0.875rem);
    /* Left padding clears the icon; right stays the original 0.5rem. */
    padding: 0.3rem 0.5rem 0.3rem 1.75rem;
    border-radius: 0.375rem;
    /* The strong border: the field's edge has to read at 3:1 against the panel (WCAG 1.4.11);
       the plain border measured 1.72:1 in dark mode. 3.33:1 dark, 4.89:1 light. */
    border: 1px solid var(--asi-border-strong, rgba(0, 0, 0, 0.45));
    background: var(--asi-surface, #fff);
    color: inherit;
    width: 100%;
    min-height: 44px; /* touch target */
}

.lsx-transcript-cues {
    flex: 1;
    /* Same reason as .lsx-transcript's own min-height above, one level down: a flex
       item's default min-height is auto too, so without this the cue list grows to fit
       all its (possibly long) content instead of being capped at the space flex: 1
       actually gives it -- which is what defeats overflow-y: auto below entirely. */
    min-height: 0;
    overflow-y: auto;
    padding: 0.6rem 0.7rem 0.8rem;
}

/* The cue list scrolls and takes keyboard focus (so a keyboard can scroll back through
   earlier lines); the panel clips overflow, so the ring sits inside its edge. */
.lsx-transcript-cues:focus-visible {
    outline: 3px solid var(--asi-focus, var(--asi-accent, #0d6efd));
    outline-offset: -3px;
}

/* Before the first cue: plain, full-strength and large -- at 0.875rem italic in the
   muted ink it was barely readable on the dark panel. */
.lsx-transcript-empty {
    margin: 1.5rem 0.5rem;
    text-align: center;
    font-size: 1.125rem;
    line-height: 1.5;
    color: var(--asi-ink, inherit);
}

.lsx-cue {
    position: relative; /* anchors .is-active's straight accent bar below */
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 0.6rem;
    padding: 0.5rem 0.5rem;
    border-radius: 0.375rem;
    margin-bottom: 0.15rem;
}

.lsx-cue time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    color: var(--asi-ink-muted, #6c757d);
    padding-top: 0.15rem;
}

.lsx-cue p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--asi-ink, #fff);
}

/* One heading per speaker TURN, not one prefix per line -- .lsx-speaker-group wraps a
   whole consecutive run of cues from the same speaker (see
   transcript::group_by_speaker()), with this heading appearing once above it, rather
   than repeating (or, worse, only appearing on that turn's very first of what might now
   be many short subdivided cues) inline on individual lines.
   Still a gold chip, not just gold text -- background uses --asi-quote (theme_asi's own
   "warm gold" token, flips with light/dark mode) and the text is pinned to
   $asi-navy-950 (#000a17) specifically, not one of the ink tokens: this fill needs to
   stay dark-on-gold regardless of surface mode, where --asi-ink/--asi-accent-ink would
   flip to a light colour in light mode and fail contrast against gold there. */
.lsx-speaker-group {
    margin-top: 0.75rem;
}

.lsx-speaker-group:first-child {
    margin-top: 0;
}

.lsx-speaker-heading {
    display: inline-block;
    margin: 0 0 0.3rem;
    background: var(--asi-quote, #f7b541);
    /* The status ink (theme_asi's text-on-a-status-fill colour): white on light mode's deep
       gold, navy on dark mode's bright one -- a fixed navy read 2.8:1 on the light gold. */
    color: var(--asi-status-ink, #000a17);
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.1rem 0.55rem;
    border-radius: 0.25rem;
}

.lsx-cue.is-active {
    background: var(--asi-surface-hover, rgba(0, 0, 0, 0.05));
    /* .lsx-cue's own border-radius rounds the highlighted background's top/bottom
       corners right where the straight accent bar (below) meets them -- squaring off
       just the active row is what actually removes the remaining curved look, since the
       bar itself was already straight. */
    border-radius: 0;
}

/* A real straight bar, not an inset box-shadow -- box-shadow follows the parent's own
   border-radius at the top and bottom corners, which is exactly what was rendering as a
   curly-bracket shape instead of a plain vertical line. This pseudo-element has no
   radius of its own, so it stays straight regardless of .lsx-cue's rounded corners. */
.lsx-cue.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--asi-accent, #0d6efd);
}

.lsx-cue.is-active time {
    color: var(--asi-accent, #0d6efd);
    font-weight: 700;
}

.lsx-cue.is-active p {
    color: var(--bs-body-color, inherit);
    font-weight: 500;
}

/* Two independent reasons a cue can be hidden -- not yet reached in playback, or
   filtered out by the search box -- as two separate classes rather than fighting over
   the `hidden` attribute/property from two different pieces of JS. Either one hides it. */
.lsx-cue-pending,
.lsx-cue-filtered {
    display: none;
}

.lsx-transcript-foot {
    padding: 0.6rem 0.9rem 0.75rem;
    border-top: 1px solid var(--asi-border, rgba(0, 0, 0, 0.12));
}

.lsx-transcript-download {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--asi-accent, #0d6efd);
    color: var(--asi-accent-ink, #fff);
    border-radius: 0.375rem;
    padding: 0.5rem;
    min-height: 44px; /* touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    text-decoration: none;
}

.lsx-transcript-download:hover,
.lsx-transcript-download:focus-visible {
    color: var(--asi-accent-ink, #fff);
    text-decoration: underline;
}

/* Too narrow for the transcript beside the video (the page's own width, lsx-page below --
   not the screen's, so Moodle's open drawer counts): one column, in DOM order -- toggle,
   video, meter, transcript. Collapse still means "hidden" here. The transcript is its own
   block under the meter, at a height that shows a useful stretch of lines; transcriptsync.js
   only pins it to the player's height while the two sit side by side. The live chat keeps
   its own rules (.lsx-watch-row--chat, below). */
@container lsx-page (width < 52rem) {
    .lsx-watch-row:not(.lsx-watch-row--chat),
    .lsx-watch-row--collapsed:not(.lsx-watch-row--chat) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "toolbar"
            "player"
            "resume"
            "meter"
            "transcript";
    }

    .lsx-watch-row:not(.lsx-watch-row--chat) .lsx-transcript {
        margin-top: 0.75rem;
        height: min(24rem, 70vh);
    }

    .lsx-watch-row:not(.lsx-watch-row--chat) .lsx-player {
        max-width: none;
    }

    /* The transcript stacks straight under the meter here, and its own outline already
       closes the meter off: no divider line as well. */
    .lsx-watch-row:not(.lsx-watch-row--chat):not(.lsx-watch-row--collapsed):has(> .lsx-transcript) .lsx-watch-meter {
        border-bottom: 0;
        padding-bottom: 0;
    }
}

/* -- Watch meter, attached under the player ----------------------------------------------
   A recording whose claim is still waiting on it (session.php's showwatchmeter): the live
   session's slanted LED meter and wedge cap (.lsx-elapsed), stretched to the video's width --
   twenty 5% blocks running into a green wedge with the percent watched and a cyan one with
   the session's CLPs, dimmed and locked until the claim unlocks. Under them, the badge (how
   much more has to play), the minutes watched and why skipping doesn't help. No box of its
   own: it sits on the page under the video, at the video's width and edges, with a divider
   line under it that closes off the player and its meter from the description below.
   watchprogress.js keeps it current. */
.lsx-watch-meter {
    grid-area: meter;
    container: lsx-meter / inline-size;
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    padding-block: 1rem 1.25rem;
    border-bottom: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
}

/* With the transcript hidden or absent, the player is held to 55rem and centred; the meter
   under it follows. */
.lsx-watch-row--collapsed .lsx-watch-meter,
.lsx-watch-row--notranscript .lsx-watch-meter {
    width: 100%;
    max-width: 55rem;
    margin-inline: auto;
}

.lsx-slant-row {
    display: flex;
    align-items: stretch;
    gap: 1rem;
}

.lsx-led-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    align-self: center;
    padding: 0 0.25rem 1.4rem 0;
}

/* A meter end that doesn't run into a slanted wedge is cut straight: the skewed blocks
   overhang by 7px and this unskewed box clips them on a vertical line. Wide: the left end
   only (the right end leads into the wedge's diagonal). Narrow: both ends. */
.lsx-led-clip {
    clip-path: polygon(0 -12px, calc(100% + 12px) -12px, calc(100% + 12px) calc(100% + 12px), 0 calc(100% + 12px));
}

/* Twenty 5% blocks, so the 80% goal (completion::WATCH_PERCENT) falls cleanly in the gap
   after the sixteenth; the last four are tinted as the claim zone. */
.lsx-led {
    position: relative;
    height: 18px;
    margin-inline-start: -7px;
    overflow: hidden;
    transform: skewX(-20deg);
    background: linear-gradient(90deg, var(--asi-border, rgba(0, 0, 0, 0.15)) 0 80%, var(--asi-border-strong, rgba(0, 0, 0, 0.35)) 80% 100%);
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(5% - 4px), transparent calc(5% - 4px) 5%);
    mask: repeating-linear-gradient(90deg, #000 0 calc(5% - 4px), transparent calc(5% - 4px) 5%);
}

.lsx-led-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #96e19b, #0fb91e); /* the LED meter's green, as on .lsx-elapsed-meter-fill */
    transition: width 0.4s ease;
}

.lsx-led-goal {
    position: absolute;
    top: -5px;
    inset-inline-start: calc(80% - 2px);
    width: 3px;
    height: 28px;
    border-radius: 1px;
    background: var(--asi-ink, #1d2733);
    transform: skewX(-20deg);
    box-shadow: 0 0 8px var(--asi-accent, #0d6efd);
}

.lsx-led-goal-label,
.lsx-led-scale {
    position: absolute;
    top: 28px;
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--asi-ink, #1d2733);
    white-space: nowrap;
}

.lsx-led-goal-label {
    inset-inline-start: 80%;
    transform: translateX(-50%);
}

.lsx-watch-meter--unlocked .lsx-led-goal-label {
    color: var(--asi-success, #198754);
}

.lsx-led-scale--start {
    inset-inline-start: 0;
}

.lsx-led-scale--end {
    inset-inline-end: 0.25rem;
}

/* The wedges, cut on the session header cap's diagonal (.lsx-elapsed) where they meet the
   meter and each other, squared and rounded at the end that meets nothing: the percent
   watched on green, then the CLPs -- dimmed with a lock and "Locked" until the claim
   unlocks, then lit cyan and "Ready". A fixed 1.25rem diagonal, so the cut keeps its angle
   when the cap runs the full width on a narrow meter. */
.lsx-cap {
    flex: 0 0 13.5rem;
    display: flex;
    height: 3.5rem;
}

.lsx-cap--pctonly {
    flex-basis: 8.5rem;
}

.lsx-cap-pct,
.lsx-cap-clp {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    line-height: 1;
}

.lsx-cap-pct {
    margin-inline-end: -0.75rem;
    padding-inline: 0.75rem 0.5rem;
    background: color-mix(in srgb, var(--asi-success, #198754) 14%, var(--asi-surface-raised, #fff));
    color: var(--asi-success, #198754);
    clip-path: polygon(1.25rem 0, 100% 0, calc(100% - 1.25rem) 100%, 0 100%);
}

.lsx-cap-clp {
    padding-inline-start: 0.75rem;
    background: color-mix(in srgb, var(--asi-accent, #0d6efd) 14%, var(--asi-surface-raised, #fff));
    color: var(--asi-ink, #1d2733);
    clip-path: polygon(1.25rem 0, 100% 0, 100% 100%, 0 100%);
    border-start-end-radius: 0.5rem;
    border-end-end-radius: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.lsx-watch-meter--unlocked .lsx-cap-clp {
    background: var(--asi-accent, #0d6efd);
    color: var(--asi-accent-ink, #fff);
}

/* No CLPs: the percent wedge ends the cap, so its right end is squared and rounded. */
.lsx-cap--pctonly .lsx-cap-pct {
    margin-inline-end: 0;
    clip-path: polygon(1.25rem 0, 100% 0, 100% 100%, 0 100%);
    border-start-end-radius: 0.5rem;
    border-end-end-radius: 0.5rem;
}

.lsx-cap-num {
    display: inline-flex;
    align-items: center;
    font-family: var(--asi-font-heading, 'Oswald', 'Source Sans 3', sans-serif);
    font-size: 1.375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.lsx-cap-num .fa-lock {
    margin-inline-end: 0.35rem;
    font-size: 0.8125rem;
}

.lsx-cap-unit {
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* A narrow meter (a phone, or the video column beside an open transcript on a small page):
   the cap drops under the bar and runs the full width, so the bar keeps room for its
   labels. With nothing beside it, the bar is cut straight at both ends, and the cap's
   outer ends are squared and rounded. Keyed to the meter's own width, not the screen's.
   The threshold is where "80% · Claim unlocks" would otherwise reach "100%" with the
   two-wedge cap beside the bar. Measured (Source Sans 3, 0.75rem labels, a 13.5rem cap; a
   container query sees the content box, inside the padding): the label meets "100%" at a
   ~755px content width, so 51rem (816px) keeps ~12px between them; the widest meter (the
   55rem video) has 838px, ~16px. local_rfo's one-wedge cap fits from 50rem. */
@container lsx-meter (width < 51rem) {
    .lsx-slant-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .lsx-led-wrap {
        align-self: stretch;
        padding-inline-end: 0;
    }
    .lsx-led-clip {
        clip-path: inset(-12px 0);
    }
    .lsx-led {
        margin-inline-end: -7px;
    }
    .lsx-led-scale--end {
        display: none; /* decorative, aria-hidden; the goal label needs the room */
    }
    .lsx-cap,
    .lsx-cap--pctonly {
        flex-basis: auto;
    }
    .lsx-cap-pct {
        padding-inline-start: 0.5rem;
        clip-path: polygon(0 0, 100% 0, calc(100% - 1.25rem) 100%, 0 100%);
        border-start-start-radius: 0.5rem;
        border-end-start-radius: 0.5rem;
    }
    .lsx-cap--pctonly .lsx-cap-pct {
        clip-path: none;
        border-radius: 0.5rem;
    }
}

/* Under the bar: the badge (amber with a lock while more has to play, green with a check
   once the claim unlocks) and the minutes watched beside it, then the note on skipping.
   Full body contrast throughout. */
.lsx-watch-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.lsx-watch-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: var(--asi-small-size, 0.875rem);
    font-weight: 700;
    background: color-mix(in srgb, var(--asi-quote, #7a4f00) 14%, var(--asi-surface-raised, #fff));
    color: var(--asi-quote, #7a4f00);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lsx-watch-meter--unlocked .lsx-watch-badge {
    background: color-mix(in srgb, var(--asi-success, #198754) 14%, var(--asi-surface-raised, #fff));
    color: var(--asi-success, #198754);
}

.lsx-watch-minutes {
    font-size: 0.9375rem;
    color: var(--asi-ink, #1d2733);
    font-variant-numeric: tabular-nums;
}

.lsx-watch-minutes strong {
    font-weight: 600;
}

.lsx-watch-note {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    font-size: var(--asi-small-size, 0.875rem);
    color: var(--asi-ink, #1d2733);
}

.lsx-watch-note i {
    margin-top: 0.2rem;
}

@media (prefers-reduced-motion: reduce) {
    .lsx-led-fill,
    .lsx-cap-clp,
    .lsx-watch-badge {
        transition: none;
    }
}

/* -- Session chat ---------------------------------------------------------
   The site's own chat (see \local_livesessions\chat), in the column beside the player
   that a recording's transcript takes once the session is archived -- the two never
   share a page (see session.php). The same fixed 55rem video and 20rem column as the
   transcript's -- a 76.25rem row, centred. Beside the player only from 992px: below that the column is too
   narrow to chat in, so the chat drops under the player instead. */
.lsx-watch-row--chat {
    grid-template-columns: minmax(0, 55rem) minmax(0, 20rem);
    grid-template-areas: "player chat";
    max-width: 76.25rem;
}

.lsx-watch-row--chat .lsx-player {
    max-width: none;
    margin-inline: 0;
}

.lsx-chat {
    grid-area: chat;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    /* Beside the player: exactly the player's height (the row stretches it), never
       shorter than a chat is usable at. contain: size stops a long chat pushing the
       row -- and the player with it -- taller: the message list scrolls instead. */
    contain: size;
    min-height: 450px;
    border: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--asi-surface-raised, #f8f9fa);
}

.lsx-chat-head {
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--asi-border, rgba(0, 0, 0, 0.12));
}

.lsx-chat-head h2 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--asi-ink-muted, #6c757d);
    margin: 0;
}

/* A standing message pinned above the chat log -- an admin-set greeting/announcement shown
   on every live session's chat so presenters need not retype it. Not a message: it stays put
   while the conversation below it scrolls. Tinted like a presenter's message, with an accent
   edge, so it reads as "from the hosts". */
.lsx-chat-pinned {
    flex: 0 0 auto;
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.6rem 0.9rem;
    border-bottom: 1px solid var(--asi-border, rgba(0, 0, 0, 0.12));
    border-left: 3px solid var(--asi-accent, #0d6efd);
    background: var(--bs-primary-bg-subtle, #cfe2ff);
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--asi-ink, #212529);
}

.lsx-chat-pinned-icon {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: var(--asi-accent, #0d6efd);
}

.lsx-chat-pinned-text {
    margin: 0;
    min-width: 0;
    white-space: pre-line;
}

.lsx-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0.75rem 0.9rem;
}

.lsx-chat-message + .lsx-chat-message {
    margin-top: 0.7rem;
}

.lsx-chat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.5rem;
    font-size: 0.8125rem;
    margin: 0;
}

.lsx-chat-meta time {
    color: var(--asi-ink-muted, #6c757d);
    font-size: 0.75rem;
}

/* A presenter's message: tagged, and on a tinted ground, so answers stand out from the
   conversation around them -- on the session page and in the presenter view alike. */
.lsx-chat-message--presenter {
    margin-inline: -0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 0.375rem;
    background: var(--bs-primary-bg-subtle, #cfe2ff);
}

.lsx-chat-presenter-tag {
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--bs-primary-text-emphasis, #052c65);
}

/* Your own messages: the name picks up the accent, so you can find what you said. */
.lsx-chat-message--mine .lsx-chat-poster {
    color: var(--asi-accent, var(--bs-primary, #0d6efd));
}

.lsx-chat-answered {
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--bs-success-text-emphasis, #0a3622);
    background: var(--bs-success-bg-subtle, #d1e7dd);
    border-radius: 999px;
    padding: 0.05rem 0.45rem;
}

/* Kept as typed: a line break someone typed is part of what they said. */
.lsx-chat-text {
    white-space: pre-line;
    overflow-wrap: anywhere;
    margin: 0.1rem 0 0;
}

.lsx-chat-empty,
.lsx-chat-closed {
    color: var(--asi-ink-muted, #6c757d);
    font-size: 0.875rem;
    text-align: center;
    margin: 0;
    padding: 0 0.9rem 0.75rem;
}

/* With no messages to show, the empty message list gives up its space and these notes sit
   in the middle of the panel instead of stranded at its bottom edge. With messages, they
   stay under them. */
.lsx-chat-messages:empty {
    flex: 0 0 auto;
    padding: 0;
}

/* "Say hello" makes no sense once the chat has closed. */
.lsx-chat:has(.lsx-chat-closed) .lsx-chat-empty {
    display: none;
}

.lsx-chat-messages:empty ~ .lsx-chat-empty:not([hidden]),
.lsx-chat-messages:empty ~ .lsx-chat-closed {
    margin-block: auto;
    padding-block: 0.75rem;
}

.lsx-chat-form {
    padding: 0.75rem 0.9rem 0.9rem;
    border-top: 1px solid var(--asi-border, rgba(0, 0, 0, 0.12));
}

.lsx-chat-form textarea {
    resize: none;
}

.lsx-chat-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    /* Room between the message box and the note and Send button under it. */
    margin-top: 0.85rem;
}

.lsx-chat-note {
    font-size: var(--asi-small-size, 0.875rem);
    color: var(--asi-ink-muted, #6c757d);
    margin: 0;
}

.lsx-chat-feedback {
    font-size: 0.8125rem;
    color: var(--bs-danger-text-emphasis, #dc3545);
    margin: 0.4rem 0 0;
}

.lsx-chat-feedback:empty {
    display: none;
}

@media (max-width: 991px) {
    .lsx-watch-row.lsx-watch-row--chat {
        grid-template-columns: minmax(0, 1fr);
        max-width: 55rem;
        grid-template-areas:
            "player"
            "chat";
    }

    /* Under the player there is no player height to match: a fixed, comfortable box. */
    .lsx-chat {
        contain: none;
        min-height: 0;
        height: 26rem;
    }
}

@media (max-width: 767px) {
    /* Belt and braces at phone widths: nothing beside the player, so no cap at all. */
    .lsx-player {
        max-width: none;
    }
}

/* The same chat, read-only, under an archived session's description. */
.lsx-chat-history {
    margin-top: 1.5rem;
    border: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    border-radius: 0.5rem;
    background: var(--asi-surface-raised, #f8f9fa);
}

.lsx-chat-history summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.75rem 0.9rem;
}

.lsx-chat-history .lsx-chat-messages {
    max-height: 30rem;
    border-top: 1px solid var(--asi-border, rgba(0, 0, 0, 0.12));
}

/*
 * When there is nothing to play the space explains itself. An empty black rectangle reads
 * as a broken embed, and the person who sees it has no way to tell whether the fault is
 * theirs.
 *
 * The image (session.php's placeholderimageurl -- the session's own uploaded photo, or a
 * recording's poster frame) is an absolutely-positioned layer behind the text, not a CSS
 * background-image, so the plain no-image case above stays exactly as simple as it was: a
 * flex box centring a <span>, nothing conditional in the base rule.
 */
.lsx-player-placeholder {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 55rem;
    margin-inline: auto;
    display: flex;
    /* Column, not the flex default row -- .lsx-countdown is a second, later flex item
       here whenever a session is upcoming (see that rule's own comment), and it needs
       to stack BELOW the placeholder text rather than sit beside it in a row. */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    /* Clipped with clip-path, not overflow: hidden. Both keep the image and the animated
       layers inside the rounded box, but overflow: hidden also stops a 16:9 box from growing,
       so a reader's wider text spacing (WCAG 1.4.12) on a phone cut the message off. With
       clip-path the box stays 16:9 unless its message needs more room. (overflow: visible
       also undoes the not-started state's overflow: hidden, which it shares with the Next up
       showcase, where it stays.) */
    overflow: visible;
    clip-path: inset(0 round 0.5rem);
    border: 1px dashed var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    color: var(--bs-secondary-color, #6c757d);
    background: var(--bs-secondary-bg, #f8f9fa);
}

.lsx-player-placeholder-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A session that has not started streaming yet (upcoming, or live with no embed configured)
   shows its own promo photo, not session content -- dimmed so the message stays the thing a
   viewer actually reads, rather than competing with a full-strength photo behind it. A past
   session awaiting its recording keeps the poster frame at full strength instead (no
   --notstarted class there): that image IS the content "not published yet" refers to, so
   washing it out would undercut the message rather than support it. */
.lsx-player-placeholder--notstarted .lsx-player-placeholder-img {
    opacity: 0.25;
}

.lsx-player-placeholder--hasimage {
    border-style: solid;
}

/* Sits above the image layer (position: relative promotes it in the stacking order past the
   image's own position: absolute) and gets a dark scrim behind just its own text so it reads
   clearly regardless of what is under it -- a light promo photo included, where the dimmed
   image alone would not guarantee enough contrast against light page text. Sized up from the
   plain-box default: this is the one thing on the page telling a viewer why there is nothing
   to watch yet, so it should be the easiest thing on the page to read, not a caption. */
.lsx-player-placeholder-text {
    position: relative;
    max-width: 40ch;
    /* stylelint-disable-next-line csstree/validator */
    font-size: clamp(1.15rem, 1.6vw + 0.7rem, 1.6rem);
    font-weight: 600;
    line-height: 1.4;
}

/* The card's Processing screen is a link (to the session): no underline or link colour. */
a.lsx-card-processing,
a.lsx-card-processing:hover,
a.lsx-card-processing:focus {
    color: inherit;
    text-decoration: none;
}

/* On the session page the Processing screen runs its animation all the time, not only on
   hover: the scanlines, the cyan scan band sweeping down, the clock ticking round and the
   cursor blinking after the word (the same keyframes as a card's hover, below). Still
   for anyone who asks for reduced motion, but for the scanlines. */
.lsx-player-placeholder--processing {
    /* clip-path, not overflow: hidden -- see .lsx-player-placeholder. */
    clip-path: inset(0 round 0.5rem);
}

.lsx-player-placeholder--processing::before,
.lsx-player-placeholder--processing::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lsx-player-placeholder--processing::before {
    background: repeating-linear-gradient(180deg, rgba(0, 10, 23, 0.35) 0 1px, transparent 1px 3px);
}

.lsx-player-placeholder--processing::after {
    background:
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(115, 223, 255, 0.14) 45%,
            rgba(115, 223, 255, 0.28) 50%,
            rgba(115, 223, 255, 0.14) 55%,
            transparent 100%
        );
    background-size: 100% 60%;
    background-repeat: no-repeat;
    animation: lsx-scan 3s linear infinite;
}

.lsx-player-processing-screen i {
    animation: lsx-tick 2.4s steps(12) infinite;
}

.lsx-player-processing-screen::after {
    content: "_";
    margin-inline-start: 0.1em;
    animation: lsx-blink 1s steps(1) 4; /* Then a steady cursor (WCAG 2.2.2). */
}

@media (prefers-reduced-motion: reduce) {
    .lsx-player-placeholder--processing::after {
        display: none;
    }

    .lsx-player-processing-screen i,
    .lsx-player-processing-screen::after {
        animation: none;
    }
}

/* Waiting on the recording: the card's glowing "Processing" screen (.lsx-card-processing),
   scaled up to the player -- a black screen, the word in the glowing terminal face with its
   clock, and the note under it. */
.lsx-player-placeholder--processing {
    gap: 0.85rem;
    border-color: transparent;
    background: #020509; /* fixed: a screen, not a themed surface */
}

.lsx-player-processing-screen {
    /* stylelint-disable-next-line csstree/validator */
    font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
    /* On a phone with wider text spacing the clock and "PROCESSING" no longer fit on one
       line: the clock goes above the word instead of past the edge. */
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25em 0.3em;
    max-width: 100%;
    text-align: center;
}

.lsx-player-processing-note {
    /* stylelint-disable-next-line csstree/validator */
    font-size: clamp(0.9375rem, 0.5vw + 0.8rem, 1.125rem);
}

/* countdown.js unhides this once the scheduled start is within three hours -- hidden here
   so a session days out never paints an empty/zeroed clock for the instant before that
   module decides. A column of its own (label above clock, both centred), sitting below
   the "will appear here" message as .lsx-player-placeholder's second flex item (see that
   rule's own flex-direction: column) -- deliberately the most prominent thing in the
   placeholder once it appears, since counting down to something a viewer is waiting on is
   more useful at a glance than the static message above it. */
.lsx-countdown {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
    font-family: var(--bs-font-monospace, monospace);
}

.lsx-player-placeholder--hasimage .lsx-countdown {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

.lsx-countdown-label {
    font-family: var(--bs-font-sans-serif);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lsx-countdown-clock {
    /* stylelint-disable-next-line csstree/validator */
    font-size: clamp(2rem, 3vw + 1.4rem, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.lsx-player-placeholder--hasimage .lsx-player-placeholder-text {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

/* -- Session page --------------------------------------------------------- */

/* Same treatment as local_rfo's own .rfo-series-title: just a margin reset on top of the
   theme's standard heading styles, no bespoke size -- the topbar shows "Live Sessions" on
   every session's page (matching the nav item), so this in-page heading is where the
   session's own name actually gets stated. */
.lsx-session-title {
    margin: 0 0 0.5rem;
}

/* With a transcript, the "Hide transcript" toggle takes a row of its own between the
   title and the video (the title's 0.5rem, the 44px toolbar row and its 0.5rem gap:
   3.75rem in all). Without one -- no transcript, or nothing to play yet -- the title
   leaves that same space itself, so every session page has the same gap above the video. */
.lsx-session:not(:has(.lsx-transcript-toggle)) > .lsx-session-title {
    margin-bottom: 3.75rem; /* 0.5rem + the 44px toolbar row + its 0.5rem */
}

/* The brand headline gradient (#73dfff to #1ba5ff), clipped to the text -- theme_asi's
   own --asi-h2-gradient, the one its course headings use, so it matches them and flips
   to a deep navy-to-blue in light mode, where light cyan text can't be read. On the
   inline text, not the heading box, so the gradient spans the words themselves (a short
   title still runs its full range) while the heading keeps the video's column. Without
   the theme there is no gradient and the fill falls back to the text colour. */
.lsx-session-title-text {
    background-image: var(--asi-h2-gradient, none);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: var(--asi-h2-fill, currentColor);
    color: var(--asi-h2-fill, inherit);
    /* Each wrapped line gets the full gradient, rather than one stretched across all. */
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* The breadcrumb and title sit in the same centred column as the video under them, so
   they start at its left edge instead of the page's -- the way a course video's heading
   is held to the video column. That column is 55rem for the player alone (placeholder,
   no side panel, or the transcript collapsed) and 76.25rem when the chat or transcript
   panel sits beside it (.lsx-watch-row); :has() follows the transcript being collapsed
   or reopened without a reload. */
.lsx-session > .lsx-breadcrumb,
.lsx-session > .lsx-session-title {
    max-width: 55rem;
    margin-inline: auto;
}

.lsx-session:has(.lsx-watch-row:not(.lsx-watch-row--notranscript):not(.lsx-watch-row--collapsed)) > .lsx-breadcrumb,
.lsx-session:has(.lsx-watch-row:not(.lsx-watch-row--notranscript):not(.lsx-watch-row--collapsed)) > .lsx-session-title {
    max-width: 76.25rem;
}

/* Below 992px the side panel stacks under the player, so the column is the player's. */
@media (max-width: 991px) {
    .lsx-session:has(.lsx-watch-row--chat) > .lsx-breadcrumb,
    .lsx-session:has(.lsx-watch-row--chat) > .lsx-session-title {
        max-width: 55rem;
    }
}

/* The page's own header ("Live Sessions", shown on the admin layout) in that same column, its
   title starting at the video's left edge like the breadcrumb and session title under it,
   rather than at the page's. Same widths, same :has() switch, no padding of its own. */
#page-local-livesessions-session #page-header {
    max-width: 55rem;
    margin-inline: auto;
    padding-inline: 0;
}

body#page-local-livesessions-session:has(.lsx-watch-row:not(.lsx-watch-row--notranscript):not(.lsx-watch-row--collapsed))
#page-header {
    max-width: 76.25rem;
}

/* The page grid's own width (the index's 81rem) with the transcript open, or the side column
   beside a video with no transcript yet -- see the page grid below. */
body#page-local-livesessions-session:has(.lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) #page-header,
body#page-local-livesessions-session:has(.lsx-watch-row--notranscript):has(.lsx-session-side) #page-header {
    max-width: 81rem;
}

@media (max-width: 991px) {
    body#page-local-livesessions-session:has(.lsx-watch-row--chat) #page-header {
        max-width: 55rem;
    }
}

.lsx-session-body {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
    gap: 2rem;
}

/* Belt and braces alongside the grid tracks' own minmax(0, ...): a grid item's default
   min-width is auto (its content's intrinsic size), which minmax(0, ...) on the TRACK is
   supposed to override, but forcing it here directly on the ITEM does not depend on that
   working exactly right for every grid-template-columns variant (including a :has()-based
   selector a browser without :has() support would simply fail to match). overflow-wrap
   additionally makes sure a single long unbroken run (a URL with no spaces, say) inside
   .lsx-session-intro breaks rather than overflowing even once the box itself is properly
   constrained. */
.lsx-session-main {
    min-width: 0;
    overflow-wrap: break-word;
}

/* When the session has no side panel (e.g. a recorded session with no registration
   or calendar), the aside is not rendered — let the main content run full width
   instead of leaving an empty second column. minmax(0, 1fr), not a bare 1fr: a bare
   fr track's minimum width defaults to its content's intrinsic size, and the session
   description (.lsx-session-intro, deliberately max-width: none) is long unwrapped body
   text with nothing else constraining it now that the page itself runs full width -- that
   let it push the whole track (and the page) wider than the viewport instead of wrapping,
   the exact overflow minmax(0, ...) exists to prevent. */
.lsx-session-body:not(:has(.lsx-session-side)) {
    grid-template-columns: minmax(0, 1fr);
}

/* Mirrors .lsx-watch-row's own state, so the description and side panel underneath are
   always exactly as wide as the video and the column beside it, in every state and as
   the transcript is shown or hidden (transcriptsync.js only toggles
   .lsx-watch-row--collapsed; these follow that class):
   - transcript open, or a video with no transcript yet beside the side column: the page
     grid below takes over from 52rem of page, at the index's 81rem;
   - live chat beside the player (992px and up): the 55rem video and 20rem chat (76.25rem);
   - transcript hidden or absent, chat stacked, or nothing to play yet: the video's own
     55rem, the side panel keeping 20rem so it never changes width on a toggle.
   The description takes the first column, the side panel the second. */
.lsx-session:has(.lsx-watch-row--notranscript) .lsx-session-body,
.lsx-session:has(.lsx-watch-row--collapsed) .lsx-session-body,
.lsx-session:has(.lsx-watch-row--chat) .lsx-session-body,
.lsx-session:has(.lsx-player-placeholder) .lsx-session-body {
    max-width: 55rem;
    margin-inline: auto;
}

/* -- Page width ---------------------------------------------------------------------------
   The session page lays itself out by the room it actually has: .lsx-session-shell is a
   size container, so Moodle's open left drawer (~285px on a desktop) counts. Keyed to the
   screen, a 1024px laptop with the drawer open put a ~320px transcript beside a ~400px
   video. Two thresholds, by what the content needs (as local_rfo's resource page):
   - 52rem: room for the video (at least ~30rem) beside the 20rem transcript;
   - 48rem: room for the description beside the side column (Bootstrap's md, in rem).
   The live chat keeps its own screen-width rules (992px), unchanged. */
.lsx-session-shell {
    container: lsx-page / inline-size;
}

/* Transcript hidden or absent, or nothing to play yet: under the centred 55rem video, the
   description takes 60% and the side column (the claim card first) the other 40%. The same
   split with the transcript open but stacked (48-52rem of page); from 52rem the page grid
   below takes over. */
@container lsx-page (width >= 48rem) {
    .lsx-session:has(.lsx-watch-row > .lsx-transcript) .lsx-session-body:has(.lsx-session-side),
    .lsx-session:has(.lsx-watch-row--notranscript) .lsx-session-body:has(.lsx-session-side),
    .lsx-session:has(.lsx-watch-row--collapsed) .lsx-session-body:has(.lsx-session-side),
    .lsx-session:has(.lsx-player-placeholder) .lsx-session-body:has(.lsx-session-side) {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        column-gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .lsx-session:has(.lsx-watch-row--chat) .lsx-session-body:has(.lsx-session-side) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
        column-gap: 1.25rem;
    }
}

@media (min-width: 992px) {
    .lsx-session:has(.lsx-watch-row--chat) .lsx-session-body {
        max-width: 76.25rem;
    }

    .lsx-session:has(.lsx-watch-row--chat) .lsx-session-body:has(.lsx-session-side) {
        grid-template-columns: minmax(0, 55rem) minmax(0, 20rem);
    }
}

@container lsx-page (width < 48rem) {
    .lsx-session .lsx-session-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .lsx-session:has(.lsx-watch-row--chat) .lsx-session-body {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Room for a 20rem column beside the video: one page grid, as wide as the Live Sessions index
   and the other pages (81rem, the same gutters), the video taking what the column leaves.
   - Transcript open: the transcript is the column beside the video, and the side column (the
     claim card first) runs straight on under it, beside the watch meter, instead of waiting
     for the whole watch row to end.
   - A video with no transcript yet: the side column takes the transcript's place beside the
     video, at the transcript's 20rem. Once a transcript is added, the first layout applies.
   The watch row and the session body hand their children to the session's grid (display:
   contents on two plain wrapper divs, no roles lost). DOM order is unchanged -- breadcrumb,
   title, toggle, player, meter, transcript, description, side column -- and so is the tab
   order; grid areas only place them. The transcript is held to the video's height in CSS
   (contain: size, so its own lines never set the row's height, then stretched to the row) as
   well as by transcriptsync.js. Hidden transcript, nothing to play yet, or the live chat:
   unchanged (the rules above). */
@container lsx-page (width >= 52rem) {
    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript),
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
        column-gap: 1.25rem;
        align-items: start;
        max-width: 81rem;
        margin-inline: auto;
    }

    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) {
        grid-template-areas:
            "crumb   crumb"
            "title   title"
            "toolbar toolbar"
            "player  transcript"
            "resume  side"
            "meter   side"
            "main    side";
        grid-template-rows: auto auto auto auto auto auto 1fr;
    }

    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) {
        grid-template-areas:
            "crumb  crumb"
            "title  title"
            "player side"
            "resume side"
            "meter  side"
            "main   side";
        grid-template-rows: auto auto auto auto auto 1fr;
    }

    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) > .lsx-watch-row,
    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) > .lsx-session-body,
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) > .lsx-watch-row,
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) > .lsx-session-body {
        display: contents;
    }

    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) > .lsx-breadcrumb,
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) > .lsx-breadcrumb {
        grid-area: crumb;
        justify-self: start;
        max-width: none;
        margin-inline: 0;
    }

    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) > .lsx-session-title,
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) > .lsx-session-title {
        grid-area: title;
        justify-self: start;
        max-width: none;
        margin-inline: 0;
    }

    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) .lsx-transcript {
        align-self: stretch;
        contain: size;
    }

    /* The video, and the meter under it, fill their column rather than the 55rem cap they
       keep when centred alone. */
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) .lsx-player,
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) .lsx-watch-meter {
        max-width: none;
        margin-inline: 0;
    }

    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) .lsx-session-main,
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) .lsx-session-main {
        grid-area: main;
        margin-top: 1.5rem;
    }

    /* No side column: the description runs under both. */
    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript):not(:has(.lsx-session-side)) .lsx-session-main {
        grid-column: 1 / -1;
    }

    .lsx-session:has(> .lsx-watch-row:not(.lsx-watch-row--collapsed) > .lsx-transcript) .lsx-session-side {
        grid-area: side;
        margin-top: 1rem;
    }

    /* Level with the top of the video, as the transcript is. */
    .lsx-session:has(> .lsx-watch-row--notranscript):has(.lsx-session-side) .lsx-session-side {
        grid-area: side;
        margin-top: 0;
    }
}

/* Full width by request: the description uses the whole content column. A bigger gap
   above it than the meta lines' own spacing -- it is a distinct block, not a fourth line
   in the same list -- otherwise it reads as glued to "time" underneath a set of lines that
   otherwise look evenly spaced. */
.lsx-session-intro {
    max-width: none;
    margin-top: 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.6;
}

/* TL;DR: a button under the description that opens the overview in place. */
.lsx-tldr {
    margin-top: 1.25rem;
}

.lsx-tldr-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--asi-accent, #0f6cbf);
    border-radius: 0.375rem;
    color: var(--asi-accent, #0f6cbf);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.lsx-tldr-toggle::-webkit-details-marker {
    display: none;
}

.lsx-tldr-toggle:hover {
    background-color: var(--asi-surface-raised, rgba(0, 0, 0, 0.04));
}

.lsx-tldr-toggle:focus-visible {
    outline: 3px solid var(--asi-focus, #ffbf47);
    outline-offset: 2px;
}

.lsx-tldr-chevron {
    font-size: 0.8em;
    transition: transform 150ms ease;
}

.lsx-tldr[open] .lsx-tldr-chevron {
    transform: rotate(180deg);
}

.lsx-tldr-body {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-inline-start: 3px solid var(--asi-accent, #0f6cbf);
    background-color: var(--asi-surface-sunken, rgba(0, 0, 0, 0.03));
    border-radius: 0 0.375rem 0.375rem 0;
}

.lsx-tldr-body > :last-child {
    margin-bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
    .lsx-tldr-toggle,
    .lsx-tldr-chevron {
        transition: none;
    }
}

/* Session resources: the archived session's downloadable files, one row each. */
.lsx-resources {
    margin-top: 1.75rem;
}

.lsx-resources-heading {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
}

.lsx-resources-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--asi-border, #dee2e6);
    border-radius: 0.5rem;
    overflow: hidden;
}

.lsx-resources-list > li + li {
    border-top: 1px solid var(--asi-border, #dee2e6);
}

.lsx-resource {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

/* The gold row hover every library list shares (theme_asi's --asi-row-hover-*): a warm wash,
   a gold edge down the left, and the name in gold. */
.lsx-resource:hover,
.lsx-resource:focus-visible {
    background-color: var(--asi-row-hover-bg, rgba(247, 181, 65, 0.08));
    box-shadow: inset 3px 0 0 var(--asi-row-hover-edge, #f7b541);
    text-decoration: none;
}

.lsx-resource:hover .lsx-resource-name,
.lsx-resource:focus-visible .lsx-resource-name {
    color: var(--asi-row-hover-title, #b07a10);
}

.lsx-resource .lsx-resource-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    flex: none;
}

.lsx-resource .lsx-resource-icon--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    color: var(--asi-ink-muted, #6c757d);
}

.lsx-resource-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: var(--asi-desc-size, 1rem);
}

.lsx-resource-size {
    flex: none;
    color: var(--asi-ink-muted, #6c757d);
    font-size: var(--asi-small-size, 0.875rem);
}

.lsx-resource-download {
    flex: none;
    color: var(--asi-accent, #0f6cbf);
}

@media (prefers-reduced-motion: reduce) {
    .lsx-resource {
        transition: none;
    }
}

/* The session page's own status block: badge, then date, then time, each on its own line
   with an icon marking what kind of fact it is. Its own component class rather than
   reusing .lsx-meta with page-scoped overrides -- the card's .lsx-meta holds only date+time
   (the badge lives in .lsx-state there), so this genuinely is a different component with a
   different shape, not the same one needing a correction. */
/* One line: the state tag leads the line it describes -- state, then when -- and the date
   and time follow, wrapping under it when there is no room. */
.lsx-session-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.25rem;
}

.lsx-when {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9375rem;
    color: var(--asi-ink, var(--bs-body-color, #1d2733));
}

.lsx-when .fa-regular {
    font-size: 0.8125rem;
    width: 1em;
    text-align: center;
    /* The same warm gold as the cards' date and time icons. */
    color: var(--asi-quote, #f7b541);
}

.lsx-when-date {
    color: var(--asi-ink, var(--bs-body-color, inherit));
    font-weight: 600;
}

/* "Presented by": who presents the session, under the date line and before the description,
   as part of the session's facts rather than the claim card. A label, then each person (photo,
   name, title) flowing across and wrapping; a hairline above sets it off from the date line.
   Name and title are one pair, tight together; the people are spaced well apart. */
.lsx-presentedby {
    margin: 1.25rem 0 0.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
}

.lsx-presentedby-heading {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--asi-ink-muted, var(--bs-secondary-color, #6c757d));
}

.lsx-presentedby-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lsx-presentedby-person {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

/* A hairline ring and a soft downward shadow, so the photo reads as a deliberate portrait. */
.lsx-presentedby-person .lsx-leader-photo-medium {
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    margin: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), var(--lsx-shadow-sm);
}

.lsx-presentedby-person .lsx-leader-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    margin: 0;
    line-height: 1.3;
    min-width: 0;
}

.lsx-presentedby-person .lsx-leader-name {
    font-size: 0.9375rem;
    font-weight: 600;
}

.lsx-presentedby-person .lsx-leader-title {
    font-size: 0.875rem;
    color: var(--asi-ink-muted, var(--bs-secondary-color, #6c757d));
}

/* Presenter names show in normal case: the theme uppercases .btn, and the name is a
   btn-link, so it would otherwise inherit all-caps on both the page and the card. Scoped
   via .lsx-leader-text (its parent in both places) to out-specify the theme's .btn rule. */
.lsx-leader-text .lsx-leader-name {
    text-transform: none;
    /* The name is a btn-link: tighten its line-height and clear the bottom margin the
       theme's .btn adds, so the job title sits right under the name as one pair.
       (Padding is already zeroed by the button's p-0 utility class.) */
    line-height: 1.05;
    margin-bottom: 0;
}

/* On a card (both views), every presenter name in the body font at one size. A presenter
   with a dialog is a button, and the theme sets every .btn in its condensed heading face
   (Oswald, 14px, letter-spaced); one without is a plain span in the body face at 16px --
   so the same list mixed two typefaces. Both now read as the plain name. */
.lsx-card .lsx-leader-name {
    font-family: inherit;
    font-size: 0.9375rem;
    letter-spacing: normal;
    line-height: 1.3;
    /* Never underlined, as on the dashboard and the featured session: the accent says it
       opens something, and pointing at it brightens it. */
    text-decoration: none;
}

.lsx-card .lsx-leader-name:hover,
.lsx-card .lsx-leader-name:focus-visible {
    color: var(--asi-accent-hover, var(--asi-accent, var(--bs-link-hover-color, #0a58ca)));
    text-decoration: none;
}

/* The state badge (Recorded / Live / Upcoming) is the page's status marker, so make it
   larger and more legible than a default inline badge -- on the session page and the card
   alike (.lsx-state-badge is the one class both templates put on this specific badge, not
   the registered/CLP badges next to it on the card).

   Bootstrap 5.3's .badge computes its own size from a component-scoped custom property,
   --bs-badge-font-size (0.75em by default -- relative to inherited context), not a plain
   literal. That is standard upstream 5.3 behaviour; it is NOT confirmed against this
   site's actual vendored/compiled Bootstrap copy, which was not available to check from
   here. Setting the custom property is the correct fix if that holds -- it wins
   regardless of specificity or cascade order, since the component reads the variable's
   current value rather than competing on a font-size declaration. The literal font-size
   below (with the element-type specificity bump from a previous attempt) stays as a
   fallback in case the custom property turns out not to be what is actually driving this
   on the real vendored copy. */
/* Bootstrap's .badge is inline-block, which sits the "Live now" dot (.lsx-pulse, also
   inline-block) on the text baseline rather than centred against the label's x-height --
   more visible now that this badge's font-size is bumped up above. inline-flex instead
   centres it against the actual line box, independent of font metrics. */
/* On the session page, the states that sit on a fill read at 4.5:1 or better in both themes:
   "Starting soon" / "Recording soon" on the gold quote fill in the status ink (white on light
   mode's deep gold, navy on dark mode's bright one -- the warning yellow under white text read
   1.6:1), and "Live now" on a fixed broadcast red under white (the danger red under dark
   mode's navy ink read 4.4:1). */
.lsx-session-meta .lsx-label--opening,
.lsx-session-meta .lsx-label--soon {
    background: var(--asi-quote, #7a4f00);
    color: var(--asi-status-ink, #fff);
}

.lsx-session-meta .lsx-label--live {
    background: #b8202d; /* asi-fixed-colour: on-air red, white text 6.3:1 in either theme */
    color: #fff;
}

span.lsx-state-badge {
    --bs-badge-font-size: 1.125rem;
    font-size: 1.125rem;
    padding: 0.4em 0.85em;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
}

.lsx-session-side {
    align-self: start;
    padding: 0 1.25rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.75rem;
    background: var(--bs-secondary-bg, #f8f9fa);
    box-shadow: var(--lsx-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.08));
}

/* Every distinct block in the aside (claim, register, calendar, leaders, count, manage)
   is one section: consistent vertical rhythm and a hairline divider between them, instead
   of each block hand-tuning its own margin-top against its neighbour. The first section
   needs no top border; the rest read as a stack of related-but-separate actions. */
.lsx-aside-section {
    padding: 1.25rem 0;
}

.lsx-aside-section + .lsx-aside-section {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
}

/* The CLP claim is the reason most people are in this panel at all -- give it a quiet
   highlighted ground so it reads as the primary action, not just the first item in a list. */
.lsx-aside-section-primary {
    margin: 0 -1.25rem;
    padding: 1.25rem;
    background: var(--asi-surface-raised, rgba(255, 255, 255, 0.04));
    /* The panel's 0.75rem radius less its 1px border, so this ground sits flush inside it. */
    border-radius: calc(0.75rem - 1px) calc(0.75rem - 1px) 0 0;
}

/* When nothing follows the claim, round its bottom too: square corners would paint over
   the panel's rounded bottom border and make those corners look cut off. */
.lsx-aside-section-primary:last-child {
    border-radius: calc(0.75rem - 1px);
}

/* Registered state, cancel link and notification-preferences link all centered as a
   group, rather than flush left in a layout that otherwise centers everything else in
   this aside (the claim button/lead text above, the register form's own button below) --
   :has() scopes this to the registered variant of .lsx-aside-section specifically, not
   the not-yet-registered form beside it, which stays left-aligned (checkbox + label read
   naturally left-aligned, a centered checkbox row would look odd). */
.lsx-aside-section:has(.lsx-registered-state) {
    text-align: center;
}

.lsx-registered-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.lsx-registered-state .fa-circle-check {
    color: var(--asi-accent, #1f7a4d);
}

/* -- The claim card ------------------------------------------------------------------------
   Kept short: what the credit is worth, one action, one line of help. How far the recording
   has been watched lives under the player (.lsx-watch-meter), where it applies. */
.lsx-claim {
    display: grid;
    gap: 0.875rem;
}

.lsx-claim > * {
    margin: 0;
}

.lsx-claim-worth {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
}

.lsx-claim-worth-num {
    font-family: var(--asi-font-heading, 'Oswald', 'Source Sans 3', sans-serif);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1;
    color: var(--asi-accent, #0d6efd);
}

.lsx-claim-worth-unit {
    font-weight: 700;
    color: var(--asi-ink, #1d2733);
}

.lsx-claim-worth-of {
    margin-inline-start: auto;
    font-size: var(--asi-small-size, 0.875rem);
    color: var(--asi-ink, #1d2733);
}

.lsx-claim-form {
    margin: 0;
}

.lsx-claim .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px; /* touch target */
}

/* Locked (waiting on the recording, or not open yet): a sunken button with a lock, in full
   body ink -- Bootstrap's disabled state fades the whole button to 65%, which took its text
   under 4.5:1. */
.lsx-claim .btn:disabled,
.lsx-claim .btn.disabled {
    opacity: 1;
    cursor: not-allowed;
    background: var(--asi-surface-sunken, #e9ecef);
    border-color: var(--asi-border-strong, rgba(0, 0, 0, 0.35));
    color: var(--asi-ink, #1d2733);
    box-shadow: none;
}

.lsx-claim-help {
    font-size: var(--asi-small-size, 0.875rem);
    line-height: 1.45;
    color: var(--asi-ink, #1d2733);
}

.lsx-claim-help:empty {
    display: none;
}

.lsx-claim-earned {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--asi-success, #198754);
}

.lsx-claim-earned .fa-circle-check {
    margin-top: 0.2rem;
}

.lsx-claim-revoked {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--asi-ink, #1d2733);
}

.lsx-claim-revoked .fa-ban {
    margin-top: 0.25rem;
}

.lsx-claim-passphrase-label {
    font-weight: 600;
}

/* Managers-only warning: a watch-gated session whose recording is on a provider whose watch
   time can't be tracked, so learners can never reach the threshold. */
.lsx-claim-warn {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin: 0 0 0.7rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--asi-warning, #c77700);
    border-radius: 0.4rem;
    background: var(--asi-warning-bg, rgba(199, 119, 0, 0.1));
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: start;
    color: var(--asi-ink, #212529);
}

.lsx-claim-warn i {
    margin-top: 0.1rem;
    color: var(--asi-warning, #c77700);
}

/* Bootstrap's .form-control is width:100% by default, but Boost caps a plain
   <input class="form-control"> at an intrinsic/auto width -- the same behaviour
   theme_asi's own _core-overrides.scss documents and works around for
   /user/contactsitesupport.php. The passphrase field sits directly above a
   full-width Claim button, so its narrower default width read as visibly out of
   place next to it. */
.lsx-claim-form input.form-control {
    width: 100%;
    min-height: 44px; /* touch target */
}

/* Every action in the side column at a 44px touch target (Moodle's .btn is ~38px). Every
   checkbox on the page (the reminders one, and the questions form's "hide my name") is
   24px itself -- WCAG 2.2's minimum target (2.5.8) -- in a 44px row whose label is part of
   its target, with a focus ring that reads at 3:1 or better (the theme's own measured 1:1). */
.lsx-session-side .btn:not(.btn-link) {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lsx-session-side .btn-link {
    min-height: 44px;
}

.lsx-session .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding-inline-start: 0;
}

.lsx-session .form-check-input {
    float: none;
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
}

.lsx-session .form-check-input:focus-visible {
    outline: 3px solid var(--asi-focus, var(--asi-accent, #0d6efd));
    outline-offset: 2px;
}

.lsx-cancel,
.lsx-prefs-link {
    font-size: 0.875rem;
}

.lsx-prefs-link {
    margin: 0.75rem 0 0;
}

.lsx-hint {
    font-size: 0.8125rem;
    color: var(--bs-secondary-color, #6c757d);
    padding-top: 0;
}

.lsx-awaiting {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
    padding: 0.375rem 0;
}

/* -- How to earn it (archive) --------------------------------------------- */

/* The archive's three steps -- watch, pass the quiz or enter the passphrase, CLP -- in one
   bordered strip: a heading on the left, the numbered steps across the rest. */
.lsx-earn {
    /* stylelint-disable-next-line csstree/validator */
    container-type: inline-size;
    margin-bottom: 1.5rem;
    border: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    border-radius: 0.625rem;
    background: var(--asi-surface-raised, #f8f9fa);
    /* theme_asi's raised-surface texture (slate in its dark mode, none in light). */
    background-image: var(--asi-surface-texture, none);
    background-blend-mode: overlay;
    overflow: hidden;
}

.lsx-earn-inner {
    display: flex;
    align-items: stretch;
}

.lsx-earn-head {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    flex: 0 0 auto;
    padding: 1rem 1.4rem;
    border-right: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
}

.lsx-earn-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
}

.lsx-earn-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: inherit;
}

/* The steps and the arrows between them on one grid, with the same flexible space at the
   strip's two ends and either side of each arrow, so every step has the same room round it
   whatever its text length:
   space | step | space | arrow | space | step | space | arrow | space | step | space.
   Each of the first two steps spans its step, the space after it and its arrow (a subgrid,
   so the tracks are the strip's), and draws the arrow in that third track. */
.lsx-earn-steps {
    display: grid;
    flex: 1;
    grid-template-columns:
        minmax(1.25rem, 1fr) auto minmax(1.25rem, 1fr) auto
        minmax(1.25rem, 1fr) auto minmax(1.25rem, 1fr) auto
        minmax(1.25rem, 1fr) auto minmax(1.25rem, 1fr);
    align-items: center;
    margin: 0;
    padding: 0.9rem 0;
    list-style: none;
}

.lsx-earn-step {
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--asi-ink, inherit);
}

.lsx-earn-step:nth-child(1) {
    grid-column: 2 / span 3;
}

.lsx-earn-step:nth-child(2) {
    grid-column: 6 / span 3;
}

.lsx-earn-step:nth-child(3) {
    grid-column: 10;
}

.lsx-earn-step-body {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

/* Each step on one line: a wrapped step's box keeps space its text doesn't use, and the
   spaces round it could no longer be equal. Where the three don't fit on one row, they
   stack instead (below). */
.lsx-earn-step-body {
    white-space: nowrap;
}

.lsx-earn-step strong {
    color: inherit;
    font-weight: 700;
}

/* The arrow after every step but the last, in its own track: a bold chevron drawn in the
   accent colour (two borders of a rotated square), not a text arrow -- a thin grey "->"
   all but vanished on the dark strip. Pure decoration, so no content for a screen reader
   to announce; the list is already ordered. */
.lsx-earn-step:not(:last-child)::after {
    content: "";
    grid-column: 3;
    width: 0.6rem;
    height: 0.6rem;
    border-top: 3px solid var(--asi-accent, var(--bs-primary, #0f6cbf));
    border-right: 3px solid var(--asi-accent, var(--bs-primary, #0f6cbf));
    /* A rotated square's two drawn borders put its visual point right of the box's
       centre, so it is nudged back to centre the chevron itself, not its box. */
    transform: translateX(-20%) rotate(45deg);
}

.lsx-earn-num {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--asi-accent, var(--bs-primary, #0f6cbf));
    color: var(--asi-accent-ink, #fff);
    font-weight: 800;
}

.lsx-earn-num--done {
    background: var(--asi-success, #198754);
}

/* By the strip's own width (it sits in columns of different widths on different pages):
   the heading beside the steps only on a wide strip; below that it goes above them, so the
   steps get the full width to stay on one row; and where even that row won't fit on one
   line each, the steps go one per line, where an arrow would point at nothing. */
/* stylelint-disable-next-line csstree/validator */
@container (max-width: 79.98rem) {
    .lsx-earn-inner {
        flex-direction: column;
    }

    .lsx-earn-head {
        flex-direction: row;
        justify-content: flex-start;
        align-items: baseline;
        gap: 0.75rem;
        padding: 0.75rem 1.4rem;
        border-right: 0;
        border-bottom: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    }
}

/* stylelint-disable-next-line csstree/validator */
@container (max-width: 63.98rem) {
    .lsx-earn-head {
        flex-direction: column;
        gap: 0.2rem;
    }

    .lsx-earn-steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
        padding-inline: 1.4rem;
    }

    /* Stacked, one per line, left-aligned, with no arrows. */
    .lsx-earn-step,
    .lsx-earn-step:nth-child(n) {
        display: block;
        grid-column: 1;
    }

    .lsx-earn-step-body {
        white-space: normal;
    }

    .lsx-earn-step:not(:last-child)::after {
        content: none;
    }
}

/* -- Archive filter ------------------------------------------------------- */

/* The credit chips under the search row: All / Not earned yet / Earned,
   each with its count. Links, so each filter is a URL of its own. Styled like the RFO
   library's series status chips (theme_asi's .rfo-chip): small squared tags on the raised
   surface, the active one filled with the accent. */
.lsx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.lsx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--asi-border, #dee2e6);
    border-radius: 4px;
    background: var(--asi-surface-raised, #f8f9fa);
    color: var(--asi-ink, inherit);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.lsx-chip:hover,
.lsx-chip:focus-visible {
    border-color: var(--asi-accent, var(--bs-primary, #0f6cbf));
    color: var(--asi-ink, inherit);
    text-decoration: none;
}

.lsx-chip--active {
    border-color: var(--asi-accent, var(--bs-primary, #0f6cbf));
    background: var(--asi-accent, var(--bs-primary, #0f6cbf));
    color: var(--asi-accent-ink, #fff);
}

.lsx-chip--active:hover,
.lsx-chip--active:focus-visible {
    color: var(--asi-accent-ink, #fff);
}

.lsx-chip-count {
    font-variant-numeric: tabular-nums;
}

.lsx-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.lsx-filter-search {
    flex: 1 1 16rem;
    min-width: 0;
}

.lsx-filter-leader {
    flex: 0 1 14rem;
}

.lsx-resultcount,
.lsx-count {
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
    margin: 0.5rem 0 0;
}

/* -- Managing ------------------------------------------------------------- */

.lsx-edit {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    background: var(--bs-body-bg, #fff);
    opacity: 0.85;
}

.lsx-edit:hover {
    opacity: 1;
}

.lsx-manage-table td {
    vertical-align: middle;
}

/* The manage page: the table centred on the screen at the width its columns need, and
   the action buttons above it from its left edge, under the title, wrapping onto a second
   row when they must. */
.lsx-manage-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lsx-manage-table {
    width: auto;
    max-width: 100%;
    margin-inline: auto;
}

.lsx-intro {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    color: var(--asi-ink, #fff);
    /* This setting is a plain multi-line textarea (admin_setting_configtextarea) -- an
       admin's real line breaks are literal "\n" characters in the stored string, which
       plain HTML whitespace rules collapse to nothing on their own. pre-line is what
       makes those breaks actually show. */
    white-space: pre-line;
    /* No max-width here anymore to force wrapping at a fixed column -- without this, a
       long unbroken run of text (a pasted URL, say) could overflow its container on a
       narrow viewport instead of breaking. */
    overflow-wrap: anywhere;
}

/* Illustrated empty state (index.php): shown only when there are no upcoming sessions and no
   archive. The illustration says "nothing scheduled yet" where a bare alert would read as an
   error. Colours read the ASI theme tokens with neutral fallbacks. */
.lsx-emptyart {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2.5rem 0 3rem;
}

.lsx-emptyart-img {
    width: auto;
    height: auto;
    max-width: 380px;
    max-height: 380px;
}

/* Light/dark variants (crickets-light.svg / crickets-dark.svg). Dark-first: show the dark art
   by default and in any dark context, swap to the light art under prefers-color-scheme:light or
   a manual light toggle ([data-bs-theme="light"]). */
.lsx-emptyart-img--light {
    display: none;
}
.lsx-emptyart-img--dark {
    display: block;
}

@media (prefers-color-scheme: light) {
    .lsx-emptyart-img--light {
        display: block;
    }
    .lsx-emptyart-img--dark {
        display: none;
    }
}

:root[data-bs-theme="dark"] .lsx-emptyart-img--light {
    display: none;
}
:root[data-bs-theme="dark"] .lsx-emptyart-img--dark {
    display: block;
}
:root[data-bs-theme="light"] .lsx-emptyart-img--light {
    display: block;
}
:root[data-bs-theme="light"] .lsx-emptyart-img--dark {
    display: none;
}

.lsx-emptyart .lsx-empty {
    margin: 0;
    color: var(--asi-ink, #fff);
    font-size: 1.0625rem;
}

/* -- Presenter reorder (edit page) ---------------------------------------- */

.lsx-reorder {
    list-style: none;
    padding-left: 0;
    max-width: 26rem;
}

.lsx-reorder li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.lsx-reorder-name {
    font-weight: 600;
}

.lsx-reorder-btn {
    margin-left: 0.25rem;
}

/* -- Presenter tools (session aside) ---------------------------------------- */
.lsx-presenter-link {
    margin-top: 1rem;
}

.lsx-presenter-link-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.lsx-presenter-link-note {
    font-size: 0.8125rem;
    color: var(--asi-ink-muted, #6c757d);
    margin: 0.4rem 0 0.5rem;
}

/* -- Presenter view (presenter.php) -----------------------------------------
   A second screen beside Restream Studio: the same chat learners see (the .lsx-chat rules
   above), taller, readable at arm's length, with each message's controls under it. */
.lsx-presenter {
    max-width: 52rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 1.5rem;
}

.lsx-presenter-kicker {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--asi-ink-muted, #6c757d);
    margin: 0;
}

.lsx-presenter-title {
    font-size: 1.5rem;
    margin: 0.25rem 0;
}

.lsx-presenter-when {
    color: var(--asi-ink-muted, #6c757d);
    margin: 0 0 0.75rem;
}

.lsx-presenter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.lsx-presenter-count {
    font-weight: 700;
    margin: 0;
}

/* A pressed toolbar button: the theme's accent fill with its matching ink (13:1 dark, 7.4:1
   light). White on the secondary colour was 3.4:1 in dark mode, where secondary is magenta. */
.lsx-presenter-toolbar [aria-pressed='true'] {
    background: var(--asi-accent, var(--bs-secondary, #6c757d));
    border-color: var(--asi-accent, var(--bs-secondary, #6c757d));
    color: var(--asi-accent-ink, var(--bs-white, #fff));
}

/* "Watching now" -- presenter console only (presenter.php gates the data to presenters and
   managers). A live count in the toolbar; the names drop below as a popover so opening does
   not reflow the toolbar. */
.lsx-watchers {
    position: relative;
    font-size: 0.875rem;
}

.lsx-watchers-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    white-space: nowrap;
}

.lsx-watchers-summary::-webkit-details-marker {
    display: none;
}

.lsx-watchers-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--asi-accent, #0d6efd);
    color: var(--asi-accent-ink, #fff);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.lsx-watchers-panel {
    position: absolute;
    z-index: 5;
    inset-inline-end: 0;
    margin-top: 0.4rem;
    min-width: 12rem;
    max-width: 18rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--asi-border, rgba(0, 0, 0, 0.15));
    border-radius: 0.5rem;
    background: var(--asi-surface-raised, #fff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.lsx-watchers-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lsx-watchers-list li {
    padding: 0.15rem 0;
}

.lsx-watchers-list li + li {
    border-top: 1px solid var(--asi-border, rgba(0, 0, 0, 0.08));
}

.lsx-watchers-empty {
    margin: 0;
    color: var(--asi-ink-muted, #6c757d);
}

.lsx-watchers-note {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: var(--asi-ink-muted, #6c757d);
}

/* Not in the session page's grid: fill the window instead, the reply box always on screen. */
/* As tall as its messages need, up to the window's height (less the heading and toolbar
   above it); past that the message list scrolls inside it, the reply box still on screen.
   No fixed height: a quiet chat no longer sits in a tall, mostly empty box. */
.lsx-presenter-chat {
    contain: none;
    min-height: 0;
    height: auto;
    /* 100vh first, for a browser without the dvh unit; 100dvh wins where there is one. */
    max-height: calc(100vh - 13rem);
    /* stylelint-disable-next-line declaration-block-no-duplicate-properties */
    max-height: calc(100dvh - 13rem);
}

.lsx-presenter-chat .lsx-chat-text {
    font-size: 1.0625rem;
}

/* The Questions tab: participants' questions only, the ones still waiting first and the
   answered ones after them -- each group oldest first, so the longest wait is at the top.
   Sorted by order rather than by moving anything, so switching tabs is instant and the
   chat's own order is untouched. */
.lsx-presenter--questions .lsx-chat-message:not(.lsx-presenter-message--question) {
    display: none;
}
.lsx-presenter--questions .lsx-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.lsx-presenter--questions .lsx-chat-message + .lsx-chat-message {
    margin-top: 0;
}
.lsx-presenter--questions .lsx-chat-message--answered {
    order: 1;
}

.lsx-presenter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-top: 0.3rem;
}

.lsx-presenter-actions form {
    margin: 0;
}

.lsx-presenter-postas {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    margin: 0;
}

.lsx-presenter-postas select {
    width: auto;
}

/* -- Cards / List switch and the compact list view -------------------------- */

/* The chips and the view switch share one row, the switch on the right. */
.lsx-filter-chiprow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.lsx-filter-chiprow .lsx-chips {
    margin-top: 0;
}

.lsx-view-switch {
    margin-left: auto;
}

.lsx-view-option {
    padding-block: 0.35rem;
}

/* List view: the same cards, restyled as rows of one bordered list -- no image or
   "Processing" panel, no excerpt, no photo stack. Same markup as the card view on
   purpose, so a change to the cards reaches both. The card body's own children become
   the row's columns (display: contents): title, when, badges, presenters, then the
   footer's Join/Register (upcoming only) and the manager's gear. */
/* One set of columns for every row (subgrid), so title, when, badges and presenters line
   up down the whole list even when a row has no badges, presenters or actions. Browsers
   without subgrid fall back to each row's own columns, the same template. */
.lsx-listing--list .lsx-grid {
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.4fr) auto auto;
    gap: 0;
}

.lsx-listing--list .lsx-grid-item {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
}

.lsx-listing--list .lsx-card {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.4fr) auto auto;
    align-items: center;
    gap: 0.5rem 1.25rem;
    padding: 0.75rem 1.1rem;
    border: 0;
    border-radius: 0;
    border-inline: 1px solid var(--bs-border-color, #dee2e6);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

@supports (grid-template-columns: subgrid) {
    .lsx-listing--list .lsx-card {
        grid-template-columns: subgrid;
    }
}

/* The frame is the rows' own, not the grid's, so the column headers can sit above it
   (as in the RFO library's List view): side borders on every row, the top on the first,
   and the corners rounded on the first and last (the hover fill follows them). */
.lsx-listing--list .lsx-grid-item:first-child .lsx-card,
.lsx-listing--list .lsx-grid-head + .lsx-grid-item .lsx-card {
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    border-start-start-radius: 0.625rem;
    border-start-end-radius: 0.625rem;
}

.lsx-listing--list .lsx-grid-item:last-child .lsx-card {
    border-end-start-radius: 0.625rem;
    border-end-end-radius: 0.625rem;
}

/* The List view's column headers (renderer::list_head()): the grid's first row, on the
   same columns as the rows (subgrid), each sorting by its column -- the same look as the
   RFO library's, above the rows' frame rather than inside it. None in the Cards view. */
.lsx-grid-head {
    display: none;
}

.lsx-listing--list .lsx-grid-head {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.5fr) minmax(0, 1.3fr) minmax(0, 1.4fr) auto auto;
    align-items: center;
    gap: 0.5rem 1.25rem;
    /* Above the framed rows, inset by their 1px border as well as their padding so each
       header starts exactly over its column. */
    padding: 0 calc(1.1rem + 1px) 0.5rem;
}

@supports (grid-template-columns: subgrid) {
    .lsx-listing--list .lsx-grid-head {
        grid-template-columns: subgrid;
    }
}
/* Over the watch meter, which sits centred in its column. */
.lsx-sort--progress {
    justify-self: center;
}

/* Rows sit on the page itself, not on the card colour, so the list reads as one list. */
.lsx-listing--list .lsx-card {
    background: transparent;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

/* Pointing at a row lights it up in the gold every List view shares (theme_asi's
   --asi-row-hover-*): a warm wash, a gold edge down the left, and the title in gold. The
   title itself underlines too, since it is the row's link. */
.lsx-listing--list .lsx-card:hover {
    background-color: var(--asi-row-hover-bg, rgba(247, 181, 65, 0.08));
    box-shadow: inset 3px 0 0 var(--asi-row-hover-edge, #f7b541);
}

.lsx-listing--list .lsx-card:hover .lsx-card-title a {
    color: var(--asi-row-hover-title, #b07a10);
}

.lsx-listing--list .lsx-card-title a {
    text-decoration: none;
}

/* The whole row opens the session: the title's link is stretched over it (an ::after
   covering the row), so a click anywhere on it goes to the session page. The things in
   a row that do something else -- a presenter's name (their dialog), Join / Register,
   Add to calendar, the manager's gear -- sit above that layer and keep working. */
.lsx-listing--list .lsx-card {
    position: relative;
    cursor: pointer;
}

.lsx-listing--list .lsx-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.lsx-listing--list .lsx-leader-name,
.lsx-listing--list .lsx-card-footer,
.lsx-listing--list .lsx-edit {
    position: relative;
    z-index: 1;
}

/* The List view's CLPs as the Training Library's list draws them: the accent on its tint,
   cut on the slash at both ends, rather than a solid rounded pill. */
.lsx-listing--list .lsx-card-clp-badge {
    padding: 0.4rem 1rem 0.4rem 1.1rem;
    border-radius: 0;
    background: color-mix(in srgb, var(--asi-accent, var(--bs-primary, #0f6cbf)) 16%, var(--asi-surface, var(--bs-body-bg, #fff)));
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
    box-shadow: none;
    clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%);
}

.lsx-listing--list .lsx-card-clp-badge-num {
    font-family: var(--asi-font-heading, inherit);
    font-size: 1.25rem;
    font-weight: 600;
}

.lsx-listing--list .lsx-card-clp-badge-unit {
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 1;
}

/* An open Add to calendar menu runs down over the rows below it: its row's buttons come
   up above theirs, so the next row's Join / Register can't cover the menu. */
.lsx-listing--list .lsx-card-footer:has(.dropdown-menu.show) {
    z-index: 5;
}

.lsx-listing--list .lsx-card-title a:hover,
.lsx-listing--list .lsx-card-title a:focus-visible {
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
}

@media (prefers-reduced-motion: reduce) {
    .lsx-listing--list .lsx-card {
        transition: none;
    }
}

/* Presenters on a row: plain names separated by commas, in body text rather than as
   underlined links -- each is still the button into that presenter's dialog, and
   underlines on hover. */
.lsx-listing--list .lsx-card-leader-names {
    margin-left: 0;
    clip-path: none;
}

.lsx-listing--list .lsx-card-leader-names .lsx-leader::before {
    content: none;
}

.lsx-listing--list .lsx-card-leader-names .lsx-leader:not(:last-child)::after {
    content: ",";
    margin-right: 0.35rem;
    color: var(--bs-secondary-color, #6c757d);
}

.lsx-listing--list .lsx-card .lsx-leader {
    gap: 0;
}

.lsx-listing--list .lsx-leader-name {
    color: var(--bs-secondary-color, #6c757d);
    font-weight: 400;
    text-decoration: none;
}

.lsx-listing--list .lsx-leader-name:hover,
.lsx-listing--list .lsx-leader-name:focus-visible {
    color: var(--asi-ink, inherit);
}

.lsx-listing--list .lsx-card-live {
    border-left: 3px solid var(--bs-danger, #dc3545);
}

.lsx-listing--list .lsx-card-media,
.lsx-listing--list .lsx-card-excerpt,
.lsx-listing--list .lsx-card-leader-photos {
    display: none;
}

.lsx-listing--list .lsx-card .lsx-card-body {
    display: contents;
}

.lsx-listing--list .lsx-card-title,
.lsx-listing--list .lsx-card-when,
.lsx-listing--list .lsx-card .lsx-state {
    margin: 0;
}

.lsx-listing--list .lsx-card .lsx-leaders {
    margin: 0;
    padding: 0;
    border: 0;
}

.lsx-listing--list .lsx-card-footer {
    padding: 0;
    border: 0;
    background: transparent;
}

.lsx-listing--list .lsx-card-footer {
    grid-column: 5;
}

/* Its own last column, sized to the icon rather than stretched across the cell. */
.lsx-listing--list .lsx-edit {
    position: relative;
    top: auto;
    right: auto;
    grid-column: 6;
    justify-self: end;
    align-self: center;
}

/* A row with no badges or presenters still keeps its columns lined up with the rest. In
   the body face at 16px semibold, as the RFO Library's and the Training Library's List
   views name theirs, not the theme's h5 heading face: a list row is read down a column. */
.lsx-listing--list .lsx-card-title {
    grid-column: 1;
    font-family: var(--asi-font-body, inherit);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.lsx-listing--list .lsx-card-when {
    grid-column: 2;
}

.lsx-listing--list .lsx-card .lsx-state {
    grid-column: 3;
}

.lsx-listing--list .lsx-card .lsx-leaders {
    grid-column: 4;
}

/* A recording has no buttons, so its watch meter takes the actions column. */
.lsx-listing--list .lsx-card-watch {
    grid-column: 5;
    justify-self: center;
}

/* Tablets and phones: the title across the top, then when, badges and presenters each on
   their own short line, then the actions. */
@media (max-width: 991.98px) {
    .lsx-listing--list .lsx-grid {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .lsx-listing--list .lsx-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.35rem 1rem;
    }

    .lsx-listing--list .lsx-card-title,
    .lsx-listing--list .lsx-card-when,
    .lsx-listing--list .lsx-card .lsx-state,
    .lsx-listing--list .lsx-card .lsx-leaders,
    .lsx-listing--list .lsx-card-watch {
        grid-column: 1;
    }

    .lsx-listing--list .lsx-card-watch {
        justify-self: start;
    }

    /* No columns to sit over: the sort links as one wrapping line instead. */
    .lsx-listing--list .lsx-grid-head {
        display: flex;
        flex-wrap: wrap;
        /* Lines 34px apart: each sort link's tap area is 44px tall round its 19px of text
           (theme_asi's _tap-targets.scss), and the areas on two lines don't overlap. */
        gap: 2.125rem 1rem;
    }

    .lsx-listing--list .lsx-grid-head .lsx-sort--static,
    .lsx-listing--list .lsx-grid-head > span:last-child {
        display: none;
    }

    /* The actions on their own line under the presenters, where they come in the page,
       not beside the title: there they took most of a phone's width and left the title a
       column a letter wide, and the keyboard went back up to them after the presenters. */
    .lsx-listing--list .lsx-card-footer {
        grid-column: 1 / -1;
        justify-content: flex-start;
        margin-top: 0.4rem;
        /* Its own width now, so the registered check can stand alone where the word won't
           fit (the Cards view's rule, by its container query). */
        /* stylelint-disable-next-line csstree/validator */
        container-type: inline-size;
    }

    .lsx-listing--list .lsx-edit {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }
}

/* -- Presenter view backdrop: retro wave -------------------------------------
   presenter.php only (its popup layout has none of the site's chrome). A quiet synthwave
   scene fixed behind the page -- a near-black purple sky with a low, dim sunset glow at the
   horizon, a faint banded sun and a faint grid floor receding in perspective -- kept dark and
   still so it sits behind a presenter's work rather than competing with it. The layout's own
   containers are made transparent here (they painted a solid box over the scene), and the
   chat column sits on its own dark panel, so messages read exactly as on the plain page. */
body#page-local-livesessions-presenter {
    background-color: #07031a;
}

body#page-local-livesessions-presenter #page,
body#page-local-livesessions-presenter .main-inner,
body#page-local-livesessions-presenter #page-content,
body#page-local-livesessions-presenter #region-main-box,
body#page-local-livesessions-presenter #region-main,
body#page-local-livesessions-presenter [role="main"] {
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* The sky: near-black, a low dim glow where it meets the floor (62% down). */
body#page-local-livesessions-presenter::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            #07031a 0%,
            #0e0626 40%,
            #1f0a33 54%,
            #3a0c3a 60%,
            #4a1030 62%,
            #07031a 62.2%,
            #07031a 100%
        );
}

/* The sun: small and dim, banded across its lower half, sitting on the horizon. */
body#page-local-livesessions-presenter::after {
    content: '';
    position: fixed;
    z-index: 0;
    pointer-events: none;
    left: 50%;
    top: 62vh;
    /* stylelint-disable-next-line csstree/validator */
    width: min(30vh, 40vw);
    aspect-ratio: 1;
    transform: translate(-50%, -100%);
    border-radius: 50%;
    background: linear-gradient(180deg, #f9bf41 0%, #ff006c 100%);
    opacity: 0.22;
    -webkit-mask:
        linear-gradient(
            180deg,
            #000 0 55%,
            transparent 55% 59%,
            #000 59% 68%,
            transparent 68% 73%,
            #000 73% 81%,
            transparent 81% 87%,
            #000 87% 100%
        );
    mask:
        linear-gradient(
            180deg,
            #000 0 55%,
            transparent 55% 59%,
            #000 59% 68%,
            transparent 68% 73%,
            #000 73% 81%,
            transparent 81% 87%,
            #000 87% 100%
        );
}

/* The grid floor: faint lines, fading into the horizon. Still -- no motion behind a chat a
   presenter is reading. */
body#page-local-livesessions-presenter #page-wrapper::before {
    content: '';
    position: fixed;
    z-index: 0;
    pointer-events: none;
    left: -50%;
    right: -50%;
    top: 62vh;
    bottom: -20vh;
    background-image:
        linear-gradient(rgba(255, 0, 140, 0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 140, 0.18) 1px, transparent 1px);
    background-size: 4rem 4rem;
    transform: perspective(22rem) rotateX(62deg);
    transform-origin: top center;
    -webkit-mask: linear-gradient(180deg, transparent 0, #000 30%);
    mask: linear-gradient(180deg, transparent 0, #000 30%);
}

/* The page above the scene, and the chat column on a panel that keeps it readable. */
body#page-local-livesessions-presenter #page,
body#page-local-livesessions-presenter .lsx-presenter {
    position: relative;
    z-index: 1;
}
body#page-local-livesessions-presenter .lsx-presenter {
    margin-block: 1.5rem;
    /* The theme's raised surface, so the panel follows light and dark mode with its text: a
       fixed dark navy here left the light-mode title and toolbar dark-on-dark (1.2-2.5:1).
       The dark navy stays only as a fallback without the theme's tokens. */
    background: var(--asi-surface-raised, rgba(11, 21, 33, 0.94));
    border: 1px solid var(--asi-border, rgba(255, 255, 255, 0.12));
    border-radius: 0.75rem;
}

/* The presenter view's empty chat: centred in the chat area, a large "No messages yet" in
   the heading font and the brand headline gradient, with the explanation under it in body
   text. :not([hidden]) so the flex layout never overrides presenter.js hiding it. */
.lsx-presenter-empty:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Takes the room the chat has, but gives it up first: on a short window it shrinks
       rather than push the reply box out of the chat's fixed-height frame, which hid the
       box until a first message replaced this state. */
    flex: 1 1 auto;
    /* stylelint-disable-next-line csstree/validator */
    min-height: min(16rem, 25vh);
    text-align: center;
}

/* The reply box never shrinks or scrolls away: the messages (or the empty state above)
   give up their room instead. */
.lsx-presenter-chat .lsx-chat-form {
    flex-shrink: 0;
}
.lsx-presenter-empty-title {
    margin: 0 0 0.5rem;
    font-family: var(--asi-font-heading, 'Oswald', 'Source Sans 3', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}
.lsx-presenter-empty-titletext {
    background-image: var(--asi-h2-gradient, none);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: var(--asi-h2-fill, currentColor);
    color: var(--asi-h2-fill, inherit);
}
.lsx-presenter-empty-text {
    margin: 0;
    font-size: 1.125rem;
    color: var(--asi-ink, inherit);
}

/* -- Presenter view messages: controls and state -----------------------------------------
   Read at a glance on a second screen mid-session. Each message is one row: a small check
   at the left to mark a question answered (an undo arrow to put it back), the message, and
   a small bin at the right to remove it -- so a long chat isn't padded out by a row of
   buttons under every message. Quiet until pointed at: each lights
   up in its own colour on hover or focus. A question still waiting for a presenter has a
   gold edge down its left side; an answered one is dimmed (full strength again on hover or
   focus, to read or undo it) and carries a green check by its label. */
.lsx-presenter-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.lsx-presenter-message-body {
    flex: 1 1 auto;
    min-width: 0;
}
/* The Mark answered slot at the left: always its width, button or not, so text lines up. */
.lsx-presenter-answer {
    flex: 0 0 2rem;
}
.lsx-presenter-answer form {
    margin: 0;
}
/* Mark answered shows its outline at rest -- it is the control a presenter looks for. */
.lsx-presenter-iconbtn--answer {
    border-color: var(--asi-border, rgba(127, 127, 127, 0.4));
}
.lsx-presenter-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.25rem;
    margin: 0;
}
.lsx-presenter-actions form {
    margin: 0;
}
.lsx-presenter-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--asi-ink-muted, #6c757d);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.lsx-presenter-iconbtn:focus-visible {
    outline: 2px solid var(--asi-accent, #0d6efd);
    outline-offset: 1px;
}
.lsx-presenter-iconbtn--answer:hover,
.lsx-presenter-iconbtn--answer:focus-visible {
    color: var(--asi-success, #0fb91e);
    border-color: var(--asi-success, #0fb91e);
}
.lsx-presenter-iconbtn--undo:hover,
.lsx-presenter-iconbtn--undo:focus-visible {
    color: var(--asi-ink, #212529);
    border-color: var(--asi-border-strong, #adb5bd);
}
.lsx-presenter-iconbtn--remove:hover,
.lsx-presenter-iconbtn--remove:focus-visible {
    color: var(--asi-danger, #dc3545);
    border-color: var(--asi-danger, #dc3545);
}

.lsx-presenter .lsx-chat-message {
    border-inline-start: 3px solid transparent;
    padding-inline-start: 0.75rem;
}
.lsx-presenter .lsx-chat-message--waiting {
    border-inline-start-color: var(--asi-warning, #f9bf41);
}
.lsx-presenter .lsx-chat-message--answered {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}
.lsx-presenter .lsx-chat-message--answered:hover,
.lsx-presenter .lsx-chat-message--answered:focus-within {
    opacity: 1;
}
.lsx-presenter .lsx-chat-answered {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--asi-success, #0fb91e);
    font-weight: 600;
}

/* In the presenter view's left slot, where a participant's question has its Mark answered
   check: a quiet speech-bubble mark on a presenter's or staff member's statement, so those
   read as comments at a glance and every message's text still starts at the same place. */
.lsx-presenter-statement {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    color: var(--asi-accent, #0d6efd);
    font-size: 0.95rem;
    opacity: 0.8;
}

/* The presenter view's session date, before its times under the title: the heading font in
   the brand headline gradient (on the inline text), a dot, then the times in plain text. */
.lsx-presenter-when {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
}
.lsx-presenter-date {
    font-family: var(--asi-font-heading, 'Oswald', 'Source Sans 3', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}
.lsx-presenter-date-text {
    background-image: var(--asi-h2-gradient, none);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: var(--asi-h2-fill, currentColor);
    color: var(--asi-h2-fill, inherit);
}
.lsx-presenter-when-sep {
    color: var(--asi-ink-muted, #6c757d);
}

/* "Dana Reyes is typing…" -- above the reply box in both chats, quiet and small, with three
   dots pulsing after it (still, for anyone who asks for reduced motion). */
.lsx-chat-typing {
    margin: 0;
    padding: 0.35rem 0.9rem;
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--asi-ink-muted, #6c757d);
}
.lsx-chat-typing::after {
    content: '';
    display: inline-block;
    width: 0.35rem;
    height: 0.35rem;
    margin-inline-start: 0.4rem;
    border-radius: 50%;
    background: currentColor;
    vertical-align: middle;
    box-shadow: 0.55rem 0 0 currentColor, 1.1rem 0 0 currentColor;
    margin-inline-end: 1.1rem;
    animation: lsx-typing-dots 1.2s ease-in-out infinite;
}

@keyframes lsx-typing-dots {
    0%,
    100% {
        opacity: 0.35;
    }
    50% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lsx-chat-typing::after {
        animation: none;
    }
}

/* The session page's slashed progress cap, at the right end of the state-and-date line
   under the video: how far through the session it is on a faint green wedge, cut on the
   diagonal against its CLPs on the cyan one -- the dashboard's cap at this page's size.
   countdown.js keeps the percentage current; it hides with the Live now badge when the
   session ends (data-lsx-end-before), hence :not([hidden]). In the line's flow, pushed to its
   end, so it wraps under the date when the column is too narrow for both -- absolutely
   placed, it reserved 21rem of the line and squeezed the date into a sliver beside it. */
.lsx-elapsed:not([hidden]) {
    margin-inline-start: auto;
    display: flex;
    align-items: stretch;
    width: 20rem;
    height: 3.25rem;
}
.lsx-elapsed--pctonly:not([hidden]) {
    width: 16rem;
}
/* The retro LED meter leading into the wedge: ten blocks with a gap between, slanted to the
   wedge's diagonal, lit green from pale to vivid up to the share already played. */
.lsx-elapsed-meter {
    flex: 0 0 9rem;
    align-self: center;
    block-size: 0.875rem;
    margin-inline-end: 0.5rem;
    overflow: hidden;
    background: var(--asi-border, #dee2e6);
    transform: skewX(-20deg);
    -webkit-mask: repeating-linear-gradient(90deg, #000 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
    mask: repeating-linear-gradient(90deg, #000 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
}
.lsx-elapsed-meter-fill {
    display: block;
    block-size: 100%;
    background-image: linear-gradient(90deg, #96e19b, #0fb91e);
    background-size: 9rem 100%;
    background-repeat: no-repeat;
    transition: width 0.6s ease;
}
/* Phones: the wedges alone; there is no room beside the date for the meter too. */
@media (max-width: 575.98px) {
    .lsx-elapsed:not([hidden]) {
        width: 10rem;
    }
    .lsx-elapsed--pctonly:not([hidden]) {
        width: 6rem;
    }
    .lsx-elapsed-meter {
        display: none;
    }
}
.lsx-elapsed-pct,
.lsx-elapsed-clp {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    line-height: 1;
}
.lsx-elapsed-pct {
    margin-inline-end: -0.75rem;
    padding-inline-start: 0.5rem;
    background: rgba(15, 185, 30, 0.12);
    color: var(--asi-success, #198754);
    clip-path: polygon(18% 0, 100% 0, 82% 100%, 0 100%);
}
.lsx-elapsed-clp {
    background: var(--asi-accent, #0d6efd);
    color: var(--asi-accent-ink, #fff);
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
    border-start-end-radius: 0.375rem;
    border-end-end-radius: 0.375rem;
}
.lsx-elapsed--pctonly .lsx-elapsed-pct {
    margin-inline-end: 0;
    clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
}
.lsx-elapsed-num {
    font-family: var(--asi-font-heading, 'Oswald', 'Source Sans 3', sans-serif);
    font-size: 1.25rem;
    font-weight: 600;
}
.lsx-elapsed-unit {
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* -- Next up showcase: three columns --------------------------------------------------
   The picture (smaller now, about a third), the details, and a column of its own for who is
   presenting and the action -- over a faint mark of a camera on air, the dashboard cards'
   corner treatment (the darker page colour, low opacity, cropped by the card). Across the
   bottom, its ticket stub (Tickets, below). Two columns (picture and details, the third
   column under them) below 1200px; one below 992px. */
.lsx-showcase {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr) minmax(15rem, 0.8fr);
}

.lsx-showcase-body {
    padding: 1.5rem 1.75rem;
}

@media (min-width: 1200px) {

    .lsx-showcase-media .lsx-showcase-image-link:has(.lsx-showcase-image--placeholder) {
        display: flex;
        flex: 1;
    }

    .lsx-showcase-media .lsx-showcase-image--placeholder {
        width: 100%;
        height: 100%;
        min-height: 12rem;
        aspect-ratio: auto;
    }

    .lsx-showcase-title {
        font-size: 1.625rem;
    }

    .lsx-showcase-title-text {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        overflow: hidden;
    }
}

.lsx-showcase-aside {
    position: relative;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1.75rem 1.5rem 1.5rem;
    border-inline-start: 1px solid var(--asi-border, rgba(0, 0, 0, 0.1));
    border-start-end-radius: 0.75rem;
    border-end-end-radius: 0.75rem;
}

.lsx-showcase-aside > * {
    position: relative;
    z-index: 1;
}

/* The Contract Ninja, faint behind the presenters and the actions, gesturing at them: a line
   drawing (pix/showcase-ninja.png, his outlines only, as a mask; the renderer hands its URL over
   as --lsx-ninja) printed twice, a pink copy 4px
   off a cyan one, as the picture placeholder's mascot is (.lsx-showcase-mascot). Decoration
   only: generated content, so screen readers never meet it; it takes no clicks; it sits inside
   the panel, which can't clip it (that would cut off the Add to calendar menu).

   Checked for contrast (WCAG 1.4.3, 1.4.11): every line of text in the panel keeps 4.5:1 or
   better even over the drawing's strongest line, at these strengths -- dark-first, as the
   empty-state art is (.lsx-emptyart-img), and fainter in light. The buttons get a solid fill of
   the panel's colour (below), so their outlines always sit on the plain panel. In Windows high
   contrast the fill becomes the page colour and the drawing goes. */
.lsx-showcase-aside::before,
.lsx-showcase-aside::after {
    content: "";
    position: absolute;
    z-index: 0;
    right: 0.5rem;
    bottom: 0.75rem;
    height: 82%;
    aspect-ratio: 374 / 426;
    max-width: 70%;
    pointer-events: none;
    -webkit-mask: var(--lsx-ninja) no-repeat right bottom / contain;
    mask: var(--lsx-ninja) no-repeat right bottom / contain;
}

.lsx-showcase-aside::before {
    background-color: rgb(255, 60, 120);
    opacity: 0.16;
    transform: translate(4px, 4px);
}

.lsx-showcase-aside::after {
    background-color: rgb(115, 223, 255);
    opacity: 0.2;
}

@media (prefers-color-scheme: light) {
    .lsx-showcase-aside::before {
        opacity: 0.09;
    }
    .lsx-showcase-aside::after {
        opacity: 0.11;
    }
}

:root[data-bs-theme="dark"] .lsx-showcase-aside::before {
    opacity: 0.16;
}
:root[data-bs-theme="dark"] .lsx-showcase-aside::after {
    opacity: 0.2;
}
:root[data-bs-theme="light"] .lsx-showcase-aside::before {
    opacity: 0.09;
}
:root[data-bs-theme="light"] .lsx-showcase-aside::after {
    opacity: 0.11;
}

/* He goes while the learner has the site's characters hidden (theme_asi's Animations setting,
   the asi-motion-hidden class on <body>). He never moves, so Paused leaves him be. */
.asi-motion-hidden .lsx-showcase-aside::before,
.asi-motion-hidden .lsx-showcase-aside::after {
    content: none;
}

/* The buttons on a solid fill of the panel's own colour, so the drawing never shows through
   them: their outlines and labels always sit on the plain panel. Their own hover, focus and
   open states keep their own fills. */
.lsx-showcase-aside .lsx-showcase-actions .btn:not(:hover):not(:focus-visible):not(:active):not(.show) {
    background-color: var(--asi-surface-raised, #f8f9fa);
}

.lsx-showcase-aside-title {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--asi-accent, #0d6efd);
}

.lsx-showcase-aside .lsx-showcase-leaders {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.lsx-showcase-aside .lsx-showcase-actions {
    flex-wrap: wrap;
}

.lsx-showcase-aside .lsx-showcase-actions .btn {
    flex: 1 1 auto;
}

@media (max-width: 1199.98px) {
    .lsx-showcase {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    }

    .lsx-showcase-aside {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 1.25rem 1.5rem;
        border-inline-start: 0;
        border-top: 1px solid var(--asi-border, rgba(0, 0, 0, 0.1));
    }

    /* A short strip across the card now, with no room for him beside the presenters. */
    .lsx-showcase-aside::before,
    .lsx-showcase-aside::after {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .lsx-showcase {
        grid-template-columns: minmax(0, 1fr);
    }

    .lsx-showcase-aside {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
    }
}

/* -- Tickets: the Next up showcase and the upcoming cards -----------------------------
   An upcoming or live session is a ticket: across its bottom a stub, torn off along a
   perforated line, with a notch bitten out of each side of the card where the line meets
   its edge -- "Starts in" and the time to go (or "Live now"), then its CLPs under a
   perforation of their own (session_stub.mustache). The Cards view only: the List view
   keeps its rows.

   The notches are cut clean through to the page, whatever is behind it: the card's
   background and border are drawn on a layer behind its content (::before), and that layer
   and the stub are masked; the content itself is not, so the Add to calendar menu still
   opens past the card's edge. Two rings (.lsx-stub-notch) draw the border round the inside
   of each bite. */
.lsx-listing--cards .lsx-ticket {
    --lsx-stub-h: 4rem;
    --lsx-ticket-bw: 1px;
    --lsx-ticket-line: var(--asi-border, var(--bs-border-color, #dee2e6));
    --lsx-notch: 12px;
    /* Where the perforation meets the edge, measured up from the card's outer bottom edge. */
    --lsx-notch-y: calc(100% - var(--lsx-stub-h) - var(--lsx-ticket-bw) / 2);
    position: relative;
    isolation: isolate;
    border-color: transparent;
    background: transparent;
}

/* A ticket with its Add to calendar menu open stacks over the tickets after it, so the menu
   runs over the next card's top rather than under it. */
.lsx-listing--cards .lsx-ticket:has(.dropdown-menu.show) {
    z-index: 5;
}

.lsx-listing--cards .lsx-ticket.lsx-showcase--live,
.lsx-listing--cards .lsx-ticket.lsx-card-live {
    --lsx-ticket-bw: 2px;
    --lsx-ticket-line: var(--bs-danger, #dc3545);
}

.lsx-listing--cards .lsx-ticket::before {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--lsx-ticket-bw));
    z-index: -1;
    border: var(--lsx-ticket-bw) solid var(--lsx-ticket-line);
    border-radius: inherit;
    background-color: var(--asi-surface-raised, #f8f9fa);
    background-image: var(--asi-surface-texture, none);
    background-blend-mode: overlay;
    pointer-events: none;
    -webkit-mask:
        radial-gradient(
            circle var(--lsx-notch) at 0 var(--lsx-notch-y),
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) left / 51% 100% no-repeat,
        radial-gradient(
            circle var(--lsx-notch) at 100% var(--lsx-notch-y),
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) right / 51% 100% no-repeat;
    mask:
        radial-gradient(
            circle var(--lsx-notch) at 0 var(--lsx-notch-y),
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) left / 51% 100% no-repeat,
        radial-gradient(
            circle var(--lsx-notch) at 100% var(--lsx-notch-y),
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) right / 51% 100% no-repeat;
}

/* The bites' own edge: a ring the border's width just outside each hole, only its inner
   half (the outer half would sit on the page). */
.lsx-listing--cards .lsx-stub-notch {
    --lsx-ring: calc(2 * var(--lsx-notch) + 2 * var(--lsx-ticket-bw));
    position: absolute;
    bottom: calc(var(--lsx-stub-h) - var(--lsx-ring) / 2 - var(--lsx-ticket-bw) / 2);
    width: var(--lsx-ring);
    height: var(--lsx-ring);
    border: var(--lsx-ticket-bw) solid var(--lsx-ticket-line);
    border-radius: 50%;
    pointer-events: none;
}

.lsx-listing--cards .lsx-stub-notch--start {
    left: calc(-1 * var(--lsx-ticket-bw) - var(--lsx-ring) / 2);
    clip-path: inset(-1px -1px -1px 50%);
}

.lsx-listing--cards .lsx-stub-notch--end {
    right: calc(-1 * var(--lsx-ticket-bw) - var(--lsx-ring) / 2);
    clip-path: inset(-1px 50% -1px -1px);
}

/* The stub: along the card's bottom, perforated across its top, bitten at both ends. */
.lsx-listing--cards .lsx-stub {
    display: flex;
    align-items: stretch;
    height: var(--lsx-stub-h);
    margin-top: auto;
    overflow: hidden;
    border-top: calc(var(--lsx-ticket-bw) + 1px) dashed var(--lsx-ticket-line);
    border-end-start-radius: inherit;
    border-end-end-radius: inherit;
    -webkit-mask:
        radial-gradient(
            circle var(--lsx-notch) at calc(-1 * var(--lsx-ticket-bw)) 0,
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) left / 51% 100% no-repeat,
        radial-gradient(
            circle var(--lsx-notch) at calc(100% + var(--lsx-ticket-bw)) 0,
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) right / 51% 100% no-repeat;
    mask:
        radial-gradient(
            circle var(--lsx-notch) at calc(-1 * var(--lsx-ticket-bw)) 0,
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) left / 51% 100% no-repeat,
        radial-gradient(
            circle var(--lsx-notch) at calc(100% + var(--lsx-ticket-bw)) 0,
            transparent calc(var(--lsx-notch) - 0.5px),
            #000 var(--lsx-notch)
        ) right / 51% 100% no-repeat;
}

.lsx-listing--list .lsx-stub,
.lsx-listing--list .lsx-stub-notch {
    display: none;
}

.lsx-stub-part {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.4rem 1.25rem;
    line-height: 1;
}

.lsx-stub-part[hidden] {
    display: none;
}

/* Each part after the first under a perforation of its own. */
.lsx-stub-part + .lsx-stub-part {
    border-inline-start: calc(var(--lsx-ticket-bw) + 1px) dashed var(--lsx-ticket-line);
}

/* The CLPs are parted from the countdown by the same dashed perforation (above) as the rest
   of the ticket, not the slash the strips use: on a ticket every tear line is a perforation. */

.lsx-stub-part--active {
    background: rgba(220, 53, 69, 0.12);
    color: var(--asi-danger, #b02a37);
}

/* After --active: a session opening early is waited for, so amber like the countdown. */
.lsx-stub-part--count,
.lsx-stub-part--opening {
    background: rgba(249, 191, 65, 0.2);
    color: var(--asi-warning, #8a5a00);
}

.lsx-stub-part--ended {
    color: var(--asi-ink-muted, #6c757d);
}

.lsx-stub-part--clp {
    flex: 0 0 6rem;
    align-items: center;
    background: rgba(115, 223, 255, 0.16);
    color: var(--asi-accent, #0d6efd);
}

/* The number over its unit, in the 6rem corner; Next up's wide one puts them on a line. */
.lsx-stub-clp-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.lsx-stub-clp-label {
    display: none;
}

.lsx-stub-key {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lsx-stub-num,
.lsx-stub-clock,
.lsx-stub-state {
    font-family: var(--asi-font-heading, inherit);
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lsx-stub-clock {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.5rem;
    line-height: 1.1;
}

.lsx-stub-unit small {
    margin-inline-start: 0.1rem;
    font-family: var(--asi-font-body, inherit);
    font-size: 0.6875rem;
    font-weight: 700;
    opacity: 0.85;
}

/* Live now / Starting soon, and in the showcase how far through it is beside it. */
.lsx-stub-part--active,
.lsx-stub-part--ended {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
}

.lsx-stub-state {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lsx-stub-elapsed {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

/* The stub says the CLPs and how soon (or that it's on), so the chips above give way to it;
   the label row goes altogether when nothing else is left in it. */
.lsx-listing--cards .lsx-ticket .lsx-card-clp-badge-inline,
.lsx-listing--cards .lsx-ticket .lsx-label--upcoming,
.lsx-listing--cards .lsx-ticket .lsx-label--live,
.lsx-listing--cards .lsx-ticket .lsx-label--opening {
    display: none;
}

.lsx-listing--cards .lsx-ticket .lsx-state:not(:has(> :not(.lsx-card-clp-badge-inline, .lsx-label--upcoming, .lsx-label--live,
.lsx-label--opening, [hidden]))) {
    display: none;
}

/* A ticket card: the picture framed and rounded inside it, like the dashboard block's, and
   the actions straight above the stub, no rule between. */
.lsx-listing--cards .lsx-card--stub .lsx-card-media {
    margin: 0.75rem 0.75rem 0;
}

.lsx-listing--cards .lsx-card--stub .lsx-card-media,
.lsx-listing--cards .lsx-card--stub .lsx-card-media .lsx-card-image {
    border-radius: 0.5rem;
    overflow: hidden;
}

.lsx-listing--cards .lsx-card--stub .lsx-card-footer {
    border-top: 0;
}

/* The showcase's picture: whole at 16:9, framed and rounded inside the card at the top of
   its column (level with the title), like the cards'. */
.lsx-showcase.lsx-ticket .lsx-showcase-media {
    align-self: start;
    margin: 0.875rem;
    border-radius: 0.5rem;
    background: none;
}

.lsx-showcase.lsx-ticket .lsx-showcase-media,
.lsx-showcase.lsx-ticket .lsx-showcase-media .lsx-showcase-image {
    border-radius: 0.5rem;
}

/* The presenters' column no longer reaches the card's corners (the stub is under it), so
   it is square: rounded, its divider curved at the end when it runs across the card. */
.lsx-showcase.lsx-ticket .lsx-showcase-aside {
    border-radius: 0;
}

/* On now: the stream in the picture's place (dashboard::preview_url()), 16:9 like the
   picture, under the on-air scanlines and glow. A preview: it takes no clicks -- the link laid
   over it opens the session. */
.lsx-showcase-feed {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #0b1220;
}

.lsx-showcase-feed-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

/* The session's picture over the stream while it loads -- under the scanlines -- fading out
   once the player's own load-time chrome (the title bar, the logo, "Watch on YouTube"; no
   embed setting hides them any more) has cleared, five seconds in. */
.lsx-showcase-feed-cover {
    position: absolute;
    inset: 0;
    background: #0b1220 center / cover no-repeat;
    pointer-events: none;
    animation: lsx-feed-reveal 0.8s ease 5s forwards;
}

@keyframes lsx-feed-reveal {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lsx-showcase-feed-cover {
        /* Near-zero rather than none: the cover still clears after its five seconds, just
           without the fade. */
        /* stylelint-disable-next-line time-min-milliseconds */
        animation-duration: 0.01s;
    }
}

.lsx-showcase-feed-link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* "Preview · Join for sound" on the stream's corner, so nobody waits for sound that isn't
   coming; on a stream under 20rem wide only the muted-speaker icon (its width steps from
   1.9rem to fit-content there -- the x100 makes the switch a step, not a ramp). */
.lsx-showcase-feed-muted {
    position: absolute;
    right: 0.5rem;
    bottom: 0.5rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    /* stylelint-disable-next-line csstree/validator */
    max-width: clamp(1.9rem, calc((100% - 20rem) * 100), 20rem);
    height: 1.9rem;
    padding-inline: 0.55rem;
    overflow: hidden;
    border-radius: 0.25rem;
    background: rgba(0, 10, 23, 0.78);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

/* The showcase's stub runs its whole width. With the three columns it shares them: the
   countdown (or Live now) under the picture and the details, the CLPs under the presenters,
   whose divider becomes the perforation between them. */
.lsx-showcase.lsx-ticket > .lsx-stub {
    grid-column: 1 / -1;
}

@media (min-width: 1200px) {
    .lsx-listing--cards .lsx-showcase.lsx-ticket > .lsx-stub {
        display: grid;
        grid-template-columns: subgrid;
    }

    .lsx-showcase.lsx-ticket > .lsx-stub > .lsx-stub-part:not(.lsx-stub-part--clp) {
        grid-column: 1 / 3;
    }

    .lsx-showcase.lsx-ticket > .lsx-stub > .lsx-stub-part--clp {
        grid-column: 3;
    }

    /* The whole third column is the corner here, too wide for a small unit stacked under
       the number: "You earn" over "1.5 CLPs" on one line instead, centred, built as the
       countdown's "Starts in" over its time. */
    .lsx-showcase.lsx-ticket > .lsx-stub > .lsx-stub-part--clp .lsx-stub-clp-label {
        display: block;
    }

    .lsx-showcase.lsx-ticket > .lsx-stub > .lsx-stub-part--clp .lsx-stub-clp-value {
        flex-direction: row;
        align-items: baseline;
        gap: 0.35rem;
    }

    .lsx-showcase.lsx-ticket > .lsx-stub > .lsx-stub-part--clp .lsx-stub-clp-value .lsx-stub-key {
        font-size: 0.875rem;
    }

    .lsx-listing--cards .lsx-showcase.lsx-ticket .lsx-showcase-aside {
        border-inline-start: calc(var(--lsx-ticket-bw) + 1px) dashed var(--lsx-ticket-line);
    }
}

/* The archive filter chips, the List view sort headers, the Cards / List switch and the watch
   figure are theme_asi's shared library components (.asi-sort, .asi-view-switch /
   .asi-view-option, .asi-chip, .asi-meter-text in its _library-components.scss), on the
   markup alongside this plugin's own classes. Only this page's layout stays here. */

/* A small phone (320px): the countdown, the stub's parts and the strip's wedges a size
   down, so "1d 23h 45m 55s" stays on one line. */
@media (max-width: 400px) {
    .lsx-listing--cards .lsx-stub-part {
        padding-inline: 0.75rem;
    }

    .lsx-listing--cards .lsx-stub-part--clp,
    .lsx-listing--cards .lsx-wedge--clp {
        flex-basis: 4.5rem;
    }

    .lsx-listing--cards .lsx-stub-num,
    .lsx-listing--cards .lsx-stub-clock,
    .lsx-listing--cards .lsx-stub-state {
        font-size: 1.25rem;
    }

    .lsx-listing--cards .lsx-stub-clock {
        gap: 0 0.35rem;
    }

    .lsx-listing--cards .lsx-wedge {
        padding-inline-start: 0.75rem;
    }

    .lsx-listing--cards .lsx-wedge-num {
        font-size: 1.125rem;
    }
}

/* -- Strips: the recordings' cards ------------------------------------------------------
   A recording's card ends in the slashed strip the dashboard's Continue Learning and Live
   Sessions cards end in (session_strip.mustache): a wedge in the progress green for where
   the viewer is with it, cut on one diagonal against its CLPs on the accent tint. The
   second wedge overlaps the first so the cut runs between them; whichever is last runs
   square into the corner. The picture is framed and rounded inside the card, like the
   tickets'. The Cards view only: the List view keeps its columns. */
.lsx-listing--cards .lsx-card--strip {
    --lsx-slant: 1.25rem;
}

.lsx-listing--cards .lsx-card--strip .lsx-card-media {
    margin: 0.75rem 0.75rem 0;
}

.lsx-listing--cards .lsx-card--strip .lsx-card-media,
.lsx-listing--cards .lsx-card--strip .lsx-card-media .lsx-card-image {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* The strip says the CLPs, Earned and how far through, so the chips and the line above give
   way to it; the label row goes altogether when nothing else is left in it. */
.lsx-listing--cards .lsx-card--strip .lsx-card-clp-badge-inline,
.lsx-listing--cards .lsx-card--strip .lsx-label--earned,
.lsx-listing--cards .lsx-card--strip.lsx-card--recorded .lsx-card-watch,
.lsx-listing--cards .lsx-card--strip.lsx-card--recorded:has(.lsx-card-media) .lsx-card-watch {
    display: none;
}

.lsx-listing--cards .lsx-card--strip .lsx-state:not(:has(> :not(.lsx-card-clp-badge-inline, .lsx-label--earned, [hidden]))) {
    display: none;
}

.lsx-strip {
    display: none;
}

.lsx-listing--cards .lsx-strip {
    display: flex;
    align-items: stretch;
    min-height: 4rem;
    margin-top: auto;
    overflow: hidden;
    border-top: 1px solid var(--asi-border, var(--bs-border-color, #dee2e6));
    border-end-start-radius: inherit;
    border-end-end-radius: inherit;
}

.lsx-wedge {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.5rem calc(var(--lsx-slant) + 0.5rem) 0.5rem 1rem;
    line-height: 1;
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--lsx-slant)) 100%, 0 100%);
}

/* The second wedge starts on the slash and overlaps the first, 4px apart: the dashboard's gap. */
.lsx-wedge + .lsx-wedge {
    margin-inline-start: calc(-1 * var(--lsx-slant) + 0.25rem);
    padding-inline-start: var(--lsx-slant);
    clip-path: polygon(var(--lsx-slant) 0, 100% 0, calc(100% - var(--lsx-slant)) 100%, 0 100%);
}

.lsx-wedge:last-child {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.lsx-wedge + .lsx-wedge:last-child {
    clip-path: polygon(var(--lsx-slant) 0, 100% 0, 100% 100%, 0 100%);
}

.lsx-wedge-key {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lsx-wedge-num {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--asi-font-heading, inherit);
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.lsx-wedge-num .fa-play {
    font-size: 0.75em;
}

/* Where the viewer is: the strip's spare width, in the progress green. */
.lsx-wedge--watch {
    flex: 1 1 auto;
    background: rgba(15, 185, 30, 0.12);
    color: var(--asi-success, #198754);
}

/* How far, as a slanted segmented meter under the words, with the session page's goal tick
   at 80% and its "80% · Claim unlocks" label. It starts and ends where the wedge's words do,
   the part still to go its faint track and the progress filling it in, in the site's
   progress green. */
.lsx-wedge--watch:has(.lsx-wedge-meter) {
    align-items: stretch;
}

.lsx-wedge--watch:has(.lsx-wedge-meter) > .lsx-wedge-key,
.lsx-wedge--watch:has(.lsx-wedge-meter) > .lsx-wedge-num {
    align-self: flex-start;
}

/* Room is kept below the blocks for the goal's label, so the strip grows to fit it rather than
   its overflow:hidden clipping it. */
.lsx-wedge-meter {
    position: relative;
    display: block;
    margin-top: 0.3rem;
    padding-block-end: 1rem;
}

/* The ten slanted blocks: a tilted stripe mask over a faint track, the fill behind growing
   to watchpercent. The mask covers the fill too, so the blocks read the same empty or full. */
.lsx-wedge-segs {
    display: block;
    block-size: 0.6875rem;
    overflow: hidden;
    border-radius: 2px;
    background: color-mix(in srgb, var(--asi-ink, var(--bs-body-color, #212529)) 12%, transparent);
    -webkit-mask: repeating-linear-gradient(108deg, #000 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
            mask: repeating-linear-gradient(108deg, #000 0 calc(10% - 3px), transparent calc(10% - 3px) 10%);
}

.lsx-wedge-fill {
    display: block;
    block-size: 100%;
    background: linear-gradient(90deg, #96e19b, #0fb91e);
}

/* The claim's goal at 80%: the session page's tick (.lsx-led-goal), a thin bar in the ink
   colour with the accent glow, leaning with the blocks. A sibling of the masked blocks, so
   the mask leaves it whole. */
.lsx-wedge-goal {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-start: calc(80% - 1.5px);
    inline-size: 3px;
    block-size: calc(0.6875rem + 10px);
    border-radius: 1px;
    background: var(--asi-ink, #1d2733);
    transform: skewX(-20deg);
    box-shadow: 0 0 8px var(--asi-accent, #0d6efd);
}

/* "80% · Claim unlocks", in the session page's label style. Wider than the fifth of the meter
   after the tick, so it ends at the meter's end instead of centring on the tick, and never
   runs past the wedge. */
.lsx-wedge-goallabel {
    position: absolute;
    inset-block-start: calc(0.6875rem + 6px);
    inset-inline-end: 0;
    color: var(--asi-ink, var(--bs-body-color, #212529));
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Enough has played: "80% · Claim unlocked", in the wedge's own green, as "Watched" above it. */
.lsx-wedge-goallabel--unlocked {
    color: inherit;
}

/* Earned: solid, in a deep green with white on it in both modes -- the dark theme's
   bright success green would outshine the live red beside it. */
.lsx-wedge--earned {
    background: #146c43;
    color: #fff;
}

.lsx-wedge--clp {
    flex: 0 0 6rem;
    align-items: center;
    background: rgba(115, 223, 255, 0.16);
    color: var(--asi-accent, #0d6efd);
}

/* -- Questions before the session ------------------------------------------------------ */

/* The questions section under the description (templates/session_questions.mustache): the
   same heading and spacing as the session resources above it. The form and the asker's own
   questions sit on the raised surface, one bordered panel; Send question is an outline
   button, because Register in the side column is the page's one primary action. */
.lsx-questions {
    margin-top: 1.75rem;
}

.lsx-questions-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.lsx-questions-heading .fa-circle-question {
    color: var(--asi-accent, var(--bs-primary, #0d6efd));
    font-size: 1.125rem;
}

/* Who reads it and who sees it, in one line, before the box. */
.lsx-questions-lead {
    margin: 0 0 0.75rem;
    max-width: 65ch;
    color: var(--asi-ink-muted, #6c757d);
    font-size: var(--asi-small-size, 0.875rem);
}

/* A comfortable reading width: a question is a few sentences, not an essay. */
.lsx-questions-input {
    max-width: 40rem;
    resize: vertical;
}

/* The hide-my-name choice and the button on one line under the box, the button at its end. */
.lsx-questions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    max-width: 40rem;
    margin-top: 0.5rem;
}

.lsx-questions-hidename {
    margin: 0;
    font-size: var(--asi-small-size, 0.875rem);
}

.lsx-questions-row .btn,
.lsx-myquestion-cancel {
    margin-inline-start: auto;
}

.lsx-myquestion-cancel + .btn {
    margin-inline-start: 0;
}

/* Says what hiding the name does and does not do, right under the choice. */
.lsx-questions-note {
    margin: 0.35rem 0 0;
    color: var(--asi-ink-muted, #6c757d);
    font-size: var(--asi-label-size, 0.75rem);
}

.lsx-myquestions-heading {
    margin: 1.5rem 0 0.5rem;
    font-size: 1rem;
}

/* The asker's own questions: one bordered list, rows split by a hairline, like the
   resources list. */
.lsx-myquestions {
    max-width: 40rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--asi-border, #dee2e6);
    border-radius: 0.5rem;
    overflow: hidden;
}

.lsx-myquestion {
    padding: 0.75rem 1rem;
}

.lsx-myquestion + .lsx-myquestion {
    border-top: 1px solid var(--asi-border, #dee2e6);
}

/* Kept as typed, line breaks included. */
.lsx-myquestion-text {
    margin: 0 0 0.35rem;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.lsx-myquestion-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    color: var(--asi-ink-muted, #6c757d);
    font-size: var(--asi-label-size, 0.75rem);
}

.lsx-myquestion-tag,
.lsx-chat-beforestart-tag {
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
    background: var(--bs-primary-bg-subtle, #cfe2ff);
    color: var(--bs-primary-text-emphasis, #052c65);
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 600;
}

/* After the form closes: answered in the success pairing, otherwise the muted ink. */
.lsx-myquestion-status--answered {
    color: var(--asi-success, var(--bs-success, #198754));
    font-weight: 600;
}

/* Edit and Delete: quiet text actions at the end of the row. Delete is a real form button
   (a POST), styled to match the Edit link beside it. */
.lsx-myquestion-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-inline-start: auto;
}

.lsx-myquestion-deleteform {
    display: inline;
    margin: 0;
}

.lsx-myquestion-action {
    padding: 0;
    border: 0;
    background: none;
    color: var(--asi-accent, var(--bs-primary, #0d6efd));
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

/* No underline on hover, as everywhere on these pages: the colour deepens instead. Two
   classes deep so Bootstrap's a:hover underline (one class plus a tag) does not win. */
.lsx-myquestion-action:hover,
.lsx-myquestion-action:focus-visible {
    color: var(--asi-accent-hover, var(--bs-link-hover-color, #0a58ca));
    text-decoration: none;
}

/* In the presenter view, a hidden name reads as a label, not a person. */
.lsx-chat-poster--hidden {
    font-style: italic;
    font-weight: 600;
}

/* -- Corrections & clarifications ------------------------------------------------------ */

/* The session page's corrections panel (templates/session_corrections.mustache): the same
   heading, spacing and bordered hairline list as the session resources. Each entry is one
   line, transcript-style: the time in the recording in its own narrow column (a link that
   plays the recording from there), then the topic in bold running into the correction.
   Edit/Delete are the quiet text actions the questions use, only rendered for managers. */
.lsx-corrections {
    margin-top: 1.75rem;
}

.lsx-corrections-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 1rem;
    margin: 0 0 0.25rem;
}

.lsx-corrections-heading {
    margin: 0;
    font-size: 1.25rem;
}

.lsx-corrections-updated {
    margin: 0 0 0.75rem;
    color: var(--asi-ink-muted, #6c757d);
    font-size: var(--asi-small-size, 0.875rem);
}

.lsx-corrections-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--asi-border, #dee2e6);
    border-radius: 0.5rem;
    overflow: hidden;
}

.lsx-correction {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0 0.75rem;
    padding: 0.75rem 1rem;
}

.lsx-correction + .lsx-correction {
    border-top: 1px solid var(--asi-border, #dee2e6);
}

/* Lined up down the left like the transcript's cue times; 1:02:34 still fits. */
.lsx-correction-time {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--asi-ink-muted, #6c757d);
    line-height: inherit;
}

.lsx-correction-time a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--asi-accent, var(--bs-primary, #0d6efd));
    text-decoration: none;
}

.lsx-correction-time .fa-play {
    font-size: 0.625em;
}

/* No underline on hover, as everywhere on these pages: the colour deepens instead. */
.lsx-correction-time a:hover,
.lsx-correction-time a:focus-visible {
    color: var(--asi-accent-hover, var(--bs-link-hover-color, #0a58ca));
    text-decoration: none;
}

.lsx-correction-text {
    overflow-wrap: anywhere;
}

/* The topic runs into the correction's first paragraph, as one sentence-like line. */
.lsx-correction-text > p:first-of-type {
    display: inline;
}

.lsx-correction-text > p:first-of-type ~ * {
    margin-top: 0.5rem;
}

.lsx-correction-text > :last-child {
    margin-bottom: 0;
}

.lsx-correction-manage {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    margin-top: 0.5rem;
    color: var(--asi-ink-muted, #6c757d);
    font-size: var(--asi-label-size, 0.75rem);
}

.lsx-correction-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-inline-start: auto;
}

.lsx-correction-action {
    color: var(--asi-accent, var(--bs-primary, #0d6efd));
    font-size: var(--asi-label-size, 0.75rem);
    font-weight: 600;
    text-decoration: none;
}

/* No underline on hover, as everywhere on these pages: the colour deepens instead. Two
   classes deep so Bootstrap's a:hover underline does not win. */
.lsx-correction-action:hover,
.lsx-correction-action:focus-visible {
    color: var(--asi-accent-hover, var(--bs-link-hover-color, #0a58ca));
    text-decoration: none;
}

.lsx-corrections-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: var(--asi-small-size, 0.875rem);
}

/* -- Public "upcoming sessions" page (upcoming.php) --------------------------
   The logged-out list the front page's "See what's coming up" links to. It reuses the
   signed-in cards (.lsx-card and friends); these few rules only space the page and center
   its one call to action. Info-only cards -- no footer, no register controls. */
.lsx-public-upcoming {
    margin-inline: auto;
}

/* Square the card's corner so the wedge's corner is clipped to the card's radius. */
.lsx-pubcard {
    overflow: hidden;
}

.lsx-public-upcoming .lsx-pubcard .lsx-card-body {
    gap: 0.5rem;
    /* Extra bottom space so the corner wedge sits clear of the last line of copy. */
    padding: 1rem 1.25rem 3rem;
}

/* CLP as a corner wedge on the card surface -- the accent-tint slash the Training Library
   (.tl-card-clp) and the landing cards use, in the card's bottom-right corner. */
.lsx-pubcard-clp {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    min-width: 4.75rem;
    padding: 0.4rem 0.75rem 0.4rem 1.25rem;
    background: color-mix(in srgb, var(--asi-accent, var(--bs-primary, #0f6cbf)) 16%, var(--asi-surface, var(--bs-body-bg, #fff)));
    color: var(--asi-accent, var(--bs-primary, #0f6cbf));
    line-height: 1;
    clip-path: polygon(1.25rem 0, 100% 0, 100% 100%, 0 100%);
}

.lsx-pubcard-clp-num {
    font-weight: 600;
    font-size: 1.2rem;
    white-space: nowrap;
}

.lsx-pubcard-clp-unit {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lsx-public-cta {
    margin-top: 2rem;
    text-align: center;
}

/* A series' page (viewseries.php): its description under the title, and the Recordings
   heading with the Cards / List switch on the same line, as the Live Sessions page's filter
   bar carries it there. */
.lsx-series-description {
    max-width: 65ch;
    margin-bottom: 1.5rem;
}

.lsx-series-recordings-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.lsx-series-recordings-head .lsx-section-title {
    margin-bottom: 0;
}
