/*
 * Etapa 2C. Only the modern learning-area desktop layout is changed.
 * Tutor uses max-width:992px for its mobile sidebar: leave that range intact.
 * Keep Tutor's expanded/fullscreen layout and its restore control untouched.
 * The original 320px sidebar, markup, tracking and interactions are retained.
 */
@media (min-width: 993px) {
    /* Standalone learning area: reserve the fixed sidebar space on the right. */
    .tutor-learning-page .tutor-learning-area:not(.is-fullscreen) .tutor-learning-area-body {
        padding-inline-start: 0;
        padding-inline-end: 0;
        padding-left: 0;
        padding-right: 320px;
    }

    .tutor-learning-page .tutor-learning-area:not(.is-fullscreen) .tutor-learning-sidebar {
        inset-inline-start: auto;
        inset-inline-end: auto;
        left: auto;
        right: 0;
    }

    /* Remove Tutor's desktop content cap; video fills the available main area. */
    .tutor-learning-page .tutor-learning-area:not(.is-fullscreen) .tutor-learning-area-container {
        max-width: none;
    }

    /* Site-shell variant: Tutor uses a sticky sidebar in a two-column grid. */
    .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-area-body {
        grid-template-columns: minmax(0, 1fr) 320px;
        padding-right: 0;
    }

    .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-sidebar {
        grid-column: 2;
        grid-row: 1;
    }

    .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-area-content {
        grid-column: 1;
        grid-row: 1;
    }

    /* Grid columns follow text direction; keep the sidebar physically right. */
    [dir="rtl"] .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-area-body {
        grid-template-columns: 320px minmax(0, 1fr);
    }

    [dir="rtl"] .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-sidebar {
        grid-column: 1;
    }

    [dir="rtl"] .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-area-content {
        grid-column: 2;
    }
}

/* Etapa 2D: scoped to the lesson override; use Tutor's existing brand tokens. */
.ausoin-le-lesson .ausoin-le-resource-description {
    margin: 6px 0;
    color: var(--tutor-text-secondary);
    font-size: .875rem;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.ausoin-le-lesson .ausoin-le-intro {
    padding: 24px 24px 12px;
}
.ausoin-le-lesson .ausoin-le-title {
    margin: 0;
    color: var(--tutor-text-primary);
    font: inherit;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.ausoin-le-lesson .ausoin-le-description {
    margin: 12px 0 0;
    color: var(--tutor-text-secondary);
    line-height: 1.6;
}
.ausoin-le-lesson .ausoin-le-controls {
    padding: 0 24px;
}
/* Render the original controls once, in flow above the tabs (also on mobile). */
.ausoin-le-lesson .ausoin-le-controls .tutor-learning-area-footer[data-lesson] {
    position: static;
    width: auto;
    margin: 0;
}
.ausoin-le-lesson .tutor-tabs-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 16px 24px;
    overscroll-behavior-x: contain;
}
.ausoin-le-lesson .tutor-tabs-nav .tutor-tabs-tab {
    flex-shrink: 0;
    min-height: 44px;
    white-space: nowrap;
}
.ausoin-le-lesson .ausoin-le-resources {
    padding: 24px;
}
.ausoin-le-lesson .ausoin-le-resources h2 {
    margin: 0 0 20px;
    font: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--tutor-text-primary);
}
.ausoin-le-lesson .ausoin-le-resource-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.ausoin-le-lesson .ausoin-le-resource {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--tutor-border-idle);
    border-radius: 8px;
    background: var(--tutor-surface-l1);
}
.ausoin-le-lesson .ausoin-le-resource-icon {
    flex-shrink: 0;
    color: var(--tutor-text-brand);
}
.ausoin-le-lesson .ausoin-le-resource-info {
    min-width: 0;
    flex: 1;
}
.ausoin-le-lesson .ausoin-le-resource-name {
    display: block;
    overflow-wrap: anywhere;
    font-weight: 600;
    color: var(--tutor-text-primary);
}
.ausoin-le-lesson .ausoin-le-resource-meta,
.ausoin-le-lesson .ausoin-le-empty {
    color: var(--tutor-text-secondary);
    font-size: .875rem;
    line-height: 1.6;
}
.ausoin-le-lesson .ausoin-le-resource-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
    flex-shrink: 0;
    color: var(--tutor-text-brand);
    border: 1px solid var(--tutor-border-idle);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.ausoin-le-lesson .ausoin-le-resource-action:focus-visible {
    outline: 2px solid var(--tutor-text-brand);
    outline-offset: 3px;
}
@media (max-width: 768px) {
    /* Tutor's untouched mobile header already prints the lesson title. */
    .ausoin-le-lesson .ausoin-le-title { display: none; }
    .ausoin-le-lesson .ausoin-le-intro { padding: 0 16px; }
    .ausoin-le-lesson .ausoin-le-controls { padding: 0 16px; }
    .ausoin-le-lesson .tutor-tabs-nav { padding: 12px 16px; }
    .ausoin-le-lesson .ausoin-le-resources { padding: 20px 16px; }
    .ausoin-le-lesson .ausoin-le-resource { flex-wrap: wrap; gap: 12px; }
    .ausoin-le-lesson .ausoin-le-resource-info { flex-basis: calc(100% - 48px); }
    .ausoin-le-lesson .ausoin-le-resource-action { margin-inline-start: 36px; }
}

/* 2D.2: resource cards only; no video, tabs or sidebar changes. */
.ausoin-le-lesson .ausoin-le-resources h2 { margin-bottom: 8px; }
.ausoin-le-lesson .ausoin-le-resources-intro { margin: 0 0 24px; color: #526077; line-height: 1.6; }
.ausoin-le-lesson .ausoin-le-resource {
    display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, auto);
    gap: 24px; padding: 24px; background: #fff; border: 1px solid #e4e9f2;
    border-radius: 14px; box-shadow: 0 2px 8px rgb(25 44 75 / 4%);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.ausoin-le-lesson .ausoin-le-resource:hover { border-color: #cdd9ec; box-shadow: 0 4px 14px rgb(25 44 75 / 7%); }
.ausoin-le-lesson .ausoin-le-resource-icon {
    display: flex; align-items: center; justify-content: center; align-self: start;
    width: 56px; height: 56px; border-radius: 12px; background: #edf2fc; color: #325a97;
}
.ausoin-le-lesson .ausoin-le-resource-name { margin: 0; font: inherit; font-size: 1.1rem; font-weight: 650; line-height: 1.45; color: #1c2c45; }
.ausoin-le-lesson .ausoin-le-resource-description { margin: 8px 0 0; color: #526077; line-height: 1.6; }
.ausoin-le-lesson .ausoin-le-resource-details { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 16px 0 0; }
.ausoin-le-lesson .ausoin-le-resource-details dt { font-size: .75rem; font-weight: 600; color: #526077; margin-bottom: 6px; }
.ausoin-le-lesson .ausoin-le-resource-details dd { margin: 0; }
.ausoin-le-lesson .ausoin-le-resource-badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #f0f2fa; color: #495877; font-size: .8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.ausoin-le-lesson .ausoin-le-resource-details > div { min-width: 0; max-width: 100%; }
.ausoin-le-lesson .ausoin-le-resource-meta { display: block; margin-top: 8px; color: #526077; }
.ausoin-le-lesson .ausoin-le-resource-action {
    display: inline-flex; gap: 10px; align-self: center; min-width: 0; max-width: 240px;
    margin: 0; padding: 12px 18px; min-height: 48px; border: 1px solid #2455a6;
    border-radius: 10px; background: #2455a6; color: #fff;
    box-shadow: 0 3px 8px rgb(36 85 166 / 16%); text-align: center;
    transition: background-color .16s ease, box-shadow .16s ease;
}
.ausoin-le-lesson .ausoin-le-resource-action span { min-width: 0; overflow-wrap: anywhere; }
.ausoin-le-lesson .ausoin-le-resource-action svg { width: 18px; height: 18px; flex-shrink: 0; }
.ausoin-le-lesson .ausoin-le-resource-action:hover { color: #fff; background: #1d468a; box-shadow: 0 4px 10px rgb(36 85 166 / 22%); }
.ausoin-le-lesson .ausoin-le-resource-action:focus-visible { outline: 3px solid #2455a6; outline-offset: 4px; }
@media (max-width: 600px) {
    .ausoin-le-lesson .ausoin-le-resource { grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px; }
    .ausoin-le-lesson .ausoin-le-resource-icon { width: 44px; height: 44px; }
    .ausoin-le-lesson .ausoin-le-resource-action { grid-column: 1 / -1; max-width: none; width: 100%; margin: 0; box-sizing: border-box; }
}
@media (prefers-reduced-motion: reduce) {
    .ausoin-le-lesson .ausoin-le-resource, .ausoin-le-lesson .ausoin-le-resource-action { transition: none; }
}

/* 0.3.4: identical metadata geometry, softly differentiated values. */
.ausoin-le-lesson .ausoin-le-resource-details { align-items: start; }
.ausoin-le-lesson .ausoin-le-resource-details .ausoin-le-resource-meta-item {
    display: grid; grid-template-rows: auto 1fr; gap: 6px; align-content: start;
}
.ausoin-le-lesson .ausoin-le-resource-meta-item dt,
.ausoin-le-lesson .ausoin-le-resource-meta-item dd { margin: 0; padding: 0; line-height: 1.4; }
.ausoin-le-lesson .ausoin-le-resource-meta-item dd { display: flex; align-items: flex-start; }
.ausoin-le-lesson .ausoin-le-resource-badge { min-height: 28px; box-sizing: border-box; }
.ausoin-le-lesson .ausoin-le-resource-badge--type { background: #edf3fc; color: #27538b; }
.ausoin-le-lesson .ausoin-le-resource-badge--category { background: #f3eefb; color: #634488; }

/* 2D.3: legible native curriculum, with the same fixed/sticky/mobile logic. */
@media (min-width: 993px) {
    .tutor-learning-page .tutor-learning-area { --ausoin-sidebar-width: clamp(320px, 29vw, 420px); }
    .tutor-learning-page .tutor-learning-area:not(.is-fullscreen) .tutor-learning-sidebar { width: var(--ausoin-sidebar-width); }
    .tutor-learning-page .tutor-learning-area:not(.is-fullscreen) .tutor-learning-area-body { padding-right: var(--ausoin-sidebar-width); }
    .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-area-body { grid-template-columns: minmax(0, 1fr) var(--ausoin-sidebar-width); padding-right: 0; }
    [dir="rtl"] .tutor-learning-page .tutor-learning-area.tutor-has-site-shell:not(.is-fullscreen) .tutor-learning-area-body { grid-template-columns: var(--ausoin-sidebar-width) minmax(0, 1fr); }
}
.tutor-learning-page .tutor-learning-nav-header-title { white-space: normal !important; text-overflow: clip !important; overflow-wrap: anywhere; min-width: 0; line-height: 1.45; }
.tutor-learning-page .tutor-learning-nav-header { align-items: flex-start; padding-block: 12px; }
.tutor-learning-page .tutor-learning-nav-header-actions { display: flex !important; flex-shrink: 0; margin-inline-start: auto; }
.tutor-learning-page .ausoin-le-topic-summary { display: block; margin-top: 6px; font-size: .75rem; font-weight: 400; color: var(--tutor-text-secondary); }
.tutor-learning-page .tutor-learning-nav { scrollbar-gutter: stable; padding-inline-end: 14px !important; }
.tutor-learning-page .tutor-learning-nav-item { padding-block: 12px !important; }
.tutor-learning-page .tutor-learning-nav-item > div { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.tutor-learning-page .tutor-learning-nav-item.active { box-shadow: inset 3px 0 var(--tutor-actions-brand-primary); }
.tutor-learning-page .ausoin-le-item-duration { margin-top: 4px; font-size: .75rem; color: var(--tutor-text-secondary); }
/* Banner 0.3.6: scoped to the enabled override; preserve Tutor's vertical offsets. */
.tutor-learning-page .ausoin-le-header {
    background: #101e33; color: #fff; color-scheme: dark;
    border-bottom: 1px solid #40516b; box-sizing: border-box; padding: 7px 8px 8px;
    --tutor-text-primary: #fff; --tutor-text-secondary: #d5deeb;
    --tutor-text-subdued: #d5deeb; --tutor-icon-primary: #fff;
    --tutor-surface-base: #101e33; --tutor-surface-l1: #101e33;
    --tutor-surface-l1-hover: #253650; --tutor-border-idle: #40516b;
}
.tutor-learning-page .ausoin-le-header .tutor-learning-header-inner {
    background: transparent; border-radius: 0; min-width: 0; overflow: visible;
}
.tutor-learning-page .ausoin-le-header .tutor-learning-header-content { min-width: 0; flex: 1; gap: 16px; }
.tutor-learning-page .ausoin-le-header .tutor-learning-header-back { border-inline-end: 0; }
.tutor-learning-page .ausoin-le-header .tutor-learning-header-title {
    display: flex; align-items: center; flex: 1; min-width: 0; gap: 24px; color: #fff; overflow: visible;
}
.tutor-learning-page .ausoin-le-header .ausoin-le-brand {
    display: flex; flex-direction: column; justify-content: center; flex-shrink: 0;
    gap: 3px; padding-inline-end: 24px; border-inline-end: 1px solid #52617a;
    color: #fff; text-decoration: none;
}
.tutor-learning-page .ausoin-le-header .ausoin-le-brand-name {
    font-size: 1.375rem; font-weight: 700; line-height: 1.15; letter-spacing: -.025em;
}
.tutor-learning-page .ausoin-le-header .ausoin-le-brand-tagline {
    color: #d5deeb; font-size: .6875rem; font-weight: 400; line-height: 1.35; letter-spacing: 0;
}
.tutor-learning-page .ausoin-le-header .ausoin-le-course-title {
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 1rem; font-weight: 500; color: #fff;
}
.tutor-learning-page .ausoin-le-header .tutor-learning-header-back .tutor-btn,
.tutor-learning-page .ausoin-le-header .tutor-learning-header-toggle-mobile .tutor-btn { color: #fff; background: transparent; }
.tutor-learning-page .ausoin-le-header .tutor-learning-header-back .tutor-btn:hover,
.tutor-learning-page .ausoin-le-header .tutor-learning-header-toggle-mobile .tutor-btn:hover { background: #253650; }
.tutor-learning-page .ausoin-le-header a:focus-visible,
.tutor-learning-page .ausoin-le-header button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 1100px) {
    .tutor-learning-page .ausoin-le-header .tutor-learning-header-title { gap: 16px; }
    .tutor-learning-page .ausoin-le-header .ausoin-le-brand { padding-inline-end: 16px; }
    .tutor-learning-page .ausoin-le-header .ausoin-le-brand-tagline { display: none; }
}
@media (max-width: 768px) {
    .tutor-learning-page .ausoin-le-header .tutor-learning-header-content { gap: 8px; }
    .tutor-learning-page .ausoin-le-header .tutor-learning-header-title {
        flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
    }
    .tutor-learning-page .ausoin-le-header .ausoin-le-brand { border: 0; padding: 0; }
    .tutor-learning-page .ausoin-le-header .ausoin-le-brand-name { font-size: 1rem; }
    .tutor-learning-page .ausoin-le-header .ausoin-le-course-title { max-width: 100%; font-size: .75rem; line-height: 1.3; }
}
@media (forced-colors: active) {
    .tutor-learning-page .ausoin-le-header { border-bottom-color: CanvasText; }
    .tutor-learning-page .ausoin-le-header .ausoin-le-brand { border-inline-end-color: CanvasText; }
}

/* 0.3.7: one mobile main column; desktop sidebar rules start at 993px. */
@media (max-width: 992px) {
    .tutor-learning-page,
    .tutor-learning-page .tutor-learning-area,
    .tutor-learning-page .tutor-learning-area .tutor-learning-area-body,
    .tutor-learning-page .tutor-learning-area .tutor-learning-area-content,
    .tutor-learning-page .tutor-learning-area .tutor-learning-area-container {
        width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box;
    }
    .tutor-learning-page .tutor-learning-area .tutor-learning-area-body {
        display: block; grid-template-columns: none; padding-inline: 0;
        margin-inline: 0; transform: none;
    }
    .tutor-learning-page .tutor-learning-area .tutor-learning-area-content {
        grid-column: auto; grid-row: auto; padding-inline: 0; margin-inline: 0;
        flex-basis: auto; transform: none;
    }
    /* Prevent native desktop sticky/grid declarations leaking at exactly 992px. */
    .tutor-learning-page .tutor-learning-area .tutor-learning-sidebar {
        position: fixed; width: 100%; max-width: 100%; min-width: 0;
        grid-column: auto; grid-row: auto; top: 0; height: 100dvh;
        box-sizing: border-box;
        /* Tutor keeps its .is-open transform, Alpine state and drawer controls. */
    }
    .tutor-learning-page .ausoin-le-header { width: 100%; max-width: 100%; min-width: 0; }
    .tutor-learning-page .ausoin-le-lesson {
        width: 100%; max-width: 100%; min-width: 0; margin-inline: 0; box-sizing: border-box;
    }
    .ausoin-le-lesson .tutor-lesson-content-tab,
    .ausoin-le-lesson .tutor-tabs-nav,
    .ausoin-le-lesson .tutor-tabs-content,
    .ausoin-le-lesson .tutor-tab-panel,
    .ausoin-le-lesson .tutor-lesson-wrapper,
    .ausoin-le-lesson .ausoin-le-resource {
        min-width: 0; max-width: 100%; box-sizing: border-box;
    }
    .ausoin-le-lesson .tutor-lesson-content-tab { padding-inline: 0; }
    .ausoin-le-lesson .tutor-lesson-video-wrapper,
    .ausoin-le-lesson .tutor-lesson-image-wrapper {
        min-width: 0; max-width: 100%; margin-inline: 0; box-sizing: border-box;
    }
    .ausoin-le-lesson .tutor-lesson-wrapper { overflow-wrap: anywhere; }
    /* Constrain legacy editor/Elementor blocks, including inline fixed min-width. */
    .ausoin-le-lesson .tutor-lesson-wrapper :is(div, section, article, figure, p) {
        min-width: 0 !important; max-width: 100% !important; box-sizing: border-box;
    }
    .ausoin-le-lesson img { max-width: 100% !important; height: auto; }
    .ausoin-le-lesson :is(iframe, video, embed, object) {
        width: 100% !important; max-width: 100% !important;
        min-width: 0 !important; box-sizing: border-box;
    }
    /* Leave primary Tutor/Plyr heights alone; responsive sizing for legacy content. */
    .ausoin-le-lesson .tutor-lesson-wrapper :is(iframe, video, embed, object) {
        height: auto; aspect-ratio: 16 / 9;
    }
    .ausoin-le-lesson .tutor-lesson-wrapper figure { margin-inline: 0; }
    .ausoin-le-lesson .tutor-lesson-wrapper pre {
        max-width: 100%; min-width: 0; overflow-x: auto; box-sizing: border-box;
    }
}

/* 0.3.8: enhanced mobile only. Without JS, keep the native drawer and panels. */
.ausoin-le-mobile[hidden] { display: none !important; }
@media (max-width: 768px) {
    .ausoin-le-mobile-ready .ausoin-le-title { display: block; font-size: 1.15rem; padding-block: 12px; }
    .ausoin-le-mobile-ready .ausoin-le-header .tutor-learning-header-toggle-mobile { display: none; }
    .ausoin-le-mobile { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    .ausoin-le-mobile [hidden] { display: none !important; }
    .ausoin-le-mobile-nav { display: flex; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--tutor-border-idle); }
    .ausoin-le-mobile-nav button { min-height: 44px; flex: 1; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--tutor-text-secondary); font: inherit; font-weight: 600; cursor: pointer; }
    .ausoin-le-mobile-nav button[aria-selected="true"] { color: var(--tutor-text-brand); border-bottom-color: var(--tutor-text-brand); }
    .ausoin-le-mobile button:focus-visible, .ausoin-le-mobile a:focus-visible, .ausoin-le-mobile summary:focus-visible { outline: 2px solid var(--tutor-text-brand); outline-offset: 2px; }
    .tutor-learning-page .ausoin-le-mobile-classes .tutor-learning-sidebar {
        position: static; transform: none; width: 100%; height: auto; max-height: none; min-width: 0;
        padding: 12px 0; overflow: visible; transition: none; pointer-events: auto;
    }
    .ausoin-le-mobile-classes .tutor-learning-sidebar > :not(.tutor-learning-sidebar-curriculum) { display: none !important; }
    .ausoin-le-mobile-classes .tutor-learning-sidebar-curriculum { height: auto !important; max-height: none !important; overflow: visible; opacity: 1 !important; pointer-events: auto !important; }
    .ausoin-le-mobile-classes .tutor-learning-nav { height: auto !important; max-height: none !important; overflow: visible; padding-inline: 12px !important; }
    .ausoin-le-mobile-classes .tutor-learning-nav-body { padding-inline-start: 0 !important; }
    .ausoin-le-mobile-classes .tutor-learning-nav-body::before { display: none; }
    .ausoin-le-mobile-classes .ausoin-le-item-number { flex-shrink: 0; min-width: 24px; padding-top: 2px; font-size: .75rem; color: var(--tutor-text-secondary); }
    .ausoin-le-mobile-classes .ausoin-le-module-time[data-complete="0"] { display: none; }
    .ausoin-le-mobile-actions { display: grid; gap: 10px; padding: 16px; }
    .ausoin-le-mobile-actions > a, .ausoin-le-mobile-actions > button, .ausoin-le-mobile-announcements > summary {
        display: block; min-height: 44px; padding: 12px 16px; border: 1px solid var(--tutor-border-idle); border-radius: 10px;
        background: var(--tutor-surface-l1); color: var(--tutor-text-primary); font: inherit; text-align: start; text-decoration: none; cursor: pointer; box-sizing: border-box;
    }
    .ausoin-le-mobile-announcements { margin: 0 16px 16px; min-width: 0; }
    .ausoin-le-mobile-announcements > summary { margin-bottom: 12px; }
    .ausoin-le-mobile-lesson-panels { min-width: 0; max-width: 100%; }
}

/* 0.3.9: bounded mobile shell, single scroll owner per active view. */
@media (max-width: 768px) {
    .tutor-learning-page .tutor-learning-area.ausoin-le-scroll-shell {
        height: var(--ausoin-mobile-height, 100svh); min-height: 0;
        display: flex; flex-direction: column;
    }
    .tutor-learning-page .ausoin-le-scroll-shell .ausoin-le-header {
        position: relative; top: auto; flex: 0 0 auto;
    }
    .tutor-learning-page .ausoin-le-scroll-shell .tutor-learning-area-body,
    .tutor-learning-page .ausoin-le-scroll-shell .tutor-learning-area-content,
    .tutor-learning-page .ausoin-le-scroll-shell .tutor-learning-area-container,
    .tutor-learning-page .ausoin-le-scroll-shell .ausoin-le-lesson,
    .tutor-learning-page .ausoin-le-scroll-shell .tutor-lesson-content-tab {
        flex: 1; display: flex; flex-direction: column; min-height: 0;
        padding-block: 0; margin-block: 0; overflow: visible;
    }
    .ausoin-le-scroll-shell .tutor-lesson-video-wrapper { flex: 0 0 auto; margin-bottom: 0 !important; }
    .ausoin-le-scroll-shell .tutor-lesson-image-wrapper,
    .ausoin-le-scroll-shell .tutor-lesson-content-tab > .ausoin-le-intro { flex: 0 0 auto; }
    .ausoin-le-scroll-shell .ausoin-le-mobile { flex: 1; display: flex; flex-direction: column; min-height: 0; }
    .ausoin-le-scroll-shell .ausoin-le-mobile-nav { flex: 0 0 auto; }
    .ausoin-le-scroll-shell .ausoin-le-mobile-classes,
    .ausoin-le-scroll-shell .ausoin-le-mobile-more {
        flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain;
        scrollbar-gutter: stable; padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .ausoin-le-scroll-shell .tutor-learning-area-footer[data-lesson] { position: static; }
}

/* 0.6.0: prose and controls only; no mobile-shell/player geometry changes. */
.ausoin-le-overview .tutor-lesson-wrapper {
    color: var(--tutor-text-primary, #182230);
    background-color: var(--tutor-surface-l1, #fff);
    line-height: 1.75; overflow-wrap: anywhere;
}
.ausoin-le-overview { --ausoin-prose-link: #2456c8; }
[data-tutor-theme="dark"] .ausoin-le-overview { --ausoin-prose-link: #a4bcf4; }
@media (prefers-color-scheme: dark) {
    [data-tutor-theme="system"] .ausoin-le-overview { --ausoin-prose-link: #a4bcf4; }
}
/* Normalize legacy prose/inline colours against Tutor's effective light/dark palette.
   Keep pixels inside images, players and embedded documents untouched. */
.ausoin-le-overview .tutor-lesson-wrapper :is(p, h1, h2, h3, h4, h5, h6, li, dt, dd, th, td, blockquote, font[color], span[style*="color"], strong[style*="color"], b[style*="color"]) {
    color: var(--tutor-text-primary, #182230) !important;
}
.ausoin-le-overview .tutor-lesson-wrapper :is(div, section, p, h1, h2, h3, h4, h5, h6, ul, ol, li, table, thead, tbody, tr, th, td, blockquote, span)[style*="background"],
.ausoin-le-overview .tutor-lesson-wrapper :is(table, tr, th, td)[bgcolor] {
    background-color: var(--tutor-surface-l1, #fff) !important;
}
.ausoin-le-overview .tutor-lesson-wrapper :is(a, a span[style*="color"], a strong[style*="color"]) {
    color: var(--ausoin-prose-link) !important;
    text-decoration: underline; text-underline-offset: .18em;
}
.ausoin-le-overview .tutor-lesson-wrapper :is(h1, h2, h3, h4, h5, h6) { line-height: 1.35; margin-block: 1.3em .6em; }
.ausoin-le-overview .tutor-lesson-wrapper :is(p, ul, ol, blockquote, figure) { margin-block: 0 1em; }
.ausoin-le-overview .tutor-lesson-wrapper table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.ausoin-le-overview .tutor-lesson-wrapper :is(th, td) { min-width: 120px; border: 1px solid var(--tutor-border-idle, #d0d5dd); padding: 10px 12px; }
.ausoin-le-overview .tutor-lesson-wrapper img { max-width: 100%; height: auto; }
.ausoin-le-lesson .ausoin-le-controls .tutor-learning-area-footer[data-lesson] {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center; gap: 12px; padding-block: 12px;
}
.ausoin-le-controls .tutor-learning-area-footer[data-lesson] > a { min-width: 0; min-height: 44px; white-space: nowrap; }
.ausoin-le-lesson .ausoin-le-controls .tutor-learning-area-footer[data-lesson] > a.tutor-btn { min-height: 44px; padding: 8px 12px; }
.ausoin-le-controls .tutor-learning-area-footer[data-lesson] > a:first-child { justify-self: start; }
.ausoin-le-controls .tutor-learning-area-footer[data-lesson] > a:last-child { justify-self: end; }
.ausoin-le-controls .tutor-learning-area-footer[data-lesson] > form { min-width: 0; max-width: 100%; margin: 0; }
.ausoin-le-controls .tutor-mark-as-complete-button {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; max-width: 100%; padding: 10px 14px; border-radius: 10px;
    font-size: .875rem; line-height: 1.3; white-space: normal; box-sizing: border-box;
    background: var(--tutor-surface-brand-secondary, #eff4ff); color: var(--tutor-text-primary, #182230);
    border: 1px solid var(--tutor-border-idle, #d0d5dd);
}
.ausoin-le-controls .tutor-mark-as-complete-button > span { width: auto; min-width: 0; }
.ausoin-le-controls .tutor-mark-as-complete-button > svg { width: 22px; height: 22px; flex-shrink: 0; }
.ausoin-le-controls .tutor-mark-as-complete-button.completed { opacity: 1; color: var(--tutor-text-success, #067647); background: var(--tutor-surface-success, #ecfdf3); }
@media (max-width: 768px) {
    .ausoin-le-lesson .ausoin-le-controls .tutor-learning-area-footer[data-lesson] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
    .ausoin-le-controls .tutor-learning-area-footer[data-lesson] > a:first-child { grid-column: 1; grid-row: 1; }
    .ausoin-le-controls .tutor-learning-area-footer[data-lesson] > a:last-child { grid-column: 2; grid-row: 1; }
    .ausoin-le-controls .tutor-learning-area-footer[data-lesson] > form { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
    .ausoin-le-controls .tutor-mark-as-complete-button { width: 100%; }
    .ausoin-le-mobile-nav { padding-block: 10px; }
    .ausoin-le-mobile-actions > :is(a, button) { line-height: 1.45; }
}
