/* ============================================
   CLASSROOM STYLES - VSVSV
   ============================================ */

.classroom-body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, #f0f5fb 0, #f6f8fb 220px, #eef4f7 100%);
    color: #182536;
    font-family: 'Montserrat', system-ui, sans-serif;
}

.classroom-topbar {
    min-height: 76px;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid #dce5ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: 0 0 auto;
}

.classroom-tools {
    display: inline-flex;
    align-items: stretch;
    gap: 8px;
    padding: 6px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #f8fbff;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.exit-link {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4fb;
    color: var(--brand-navy, #002d62);
    text-decoration: none;
    flex: 0 0 auto;
}

.exit-link:hover,
.exit-link:focus {
    background: var(--brand-navy, #002d62);
    color: #ffffff;
}

.topbar-kicker {
    margin: 0 0 4px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.classroom-topbar h1 {
    margin: 0;
    color: var(--brand-navy, #002d62);
    font-size: 1.18rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.topbar-progress {
    width: min(300px, 32vw);
    min-width: 190px;
    display: grid;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
}

.language-control {
    min-width: 178px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 800;
}

.language-control span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.language-control select {
    height: 40px;
    border: 1px solid #cfdbe8;
    border-radius: 8px;
    background: #ffffff;
    color: #172033;
    font: inherit;
    font-size: 0.82rem;
    padding: 0 34px 0 10px;
}

.print-classroom-btn {
    min-height: 40px;
    border: 1px solid #cfdbe8;
    border-radius: 8px;
    background: #ffffff;
    color: var(--brand-navy, #002d62);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    font-weight: 800;
    cursor: pointer;
}

.print-classroom-btn:hover,
.print-classroom-btn:focus {
    background: #0b3768;
    color: #ffffff;
}

.topbar-progress-track {
    height: 9px;
    background: #e5edf6;
    border-radius: 999px;
    overflow: hidden;
}

.topbar-progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--brand-navy, #002d62), #2f80ed);
    transition: width 0.2s ease;
}

.classroom-shell {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    min-height: calc(100vh - 76px);
}

.lesson-sidebar {
    background: #ffffff;
    border-right: 1px solid #dce5ef;
    overflow-y: auto;
    max-height: calc(100vh - 76px);
    position: sticky;
    top: 76px;
}

.sidebar-heading {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8eef5;
}

.sidebar-heading h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--brand-navy, #002d62);
}

.sidebar-collapse {
    display: none;
    border: 1px solid #d4deea;
    background: #ffffff;
    color: var(--brand-navy, #002d62);
    border-radius: 8px;
    width: 38px;
    height: 38px;
}

.lesson-list {
    padding: 14px;
}

.module-block {
    margin-bottom: 12px;
}

.module-title {
    margin: 8px 6px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.lesson-button {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    padding: 12px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 10px;
    align-items: start;
    text-align: left;
    color: #1e293b;
    cursor: pointer;
}

.lesson-button:hover,
.lesson-button:focus {
    background: #f0f7ff;
    border-color: #d5e4f5;
}

.lesson-button.active {
    background: #0b3768;
    border-color: #0b3768;
    color: #ffffff;
}

.lesson-button.active strong,
.lesson-button.active span:last-child {
    color: #ffffff;
}

.lesson-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e5edf6;
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 2px;
}

.lesson-button.completed .lesson-status {
    background: #dff7ea;
    color: #168447;
}

.lesson-button.active .lesson-status {
    background: #ffcf4a;
    color: #132338;
}

.lesson-button strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lesson-button span:last-child {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.78rem;
}

.lesson-workspace {
    padding: 26px;
    min-width: 0;
}

.compliance-strip {
    background: #fff8df;
    color: #614700;
    border: 1px solid #f1db92;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 18px;
}

.language-strip {
    background: #eaf3ff;
    color: #123a66;
    border: 1px solid #bfd9f4;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 0.84rem;
    line-height: 1.45;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.language-strip[hidden] {
    display: none;
}

.language-strip-served {
    background: #edf8f2;
    color: #145c36;
    border-color: #bfe5cf;
}

.language-strip-fallback {
    background: #fff8df;
    color: #614700;
    border-color: #f1db92;
}

.lesson-panel {
    background: #ffffff;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(11, 55, 104, 0.08);
}

.lesson-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    border-bottom: 1px solid #e8eef5;
    background:
        linear-gradient(90deg, rgba(11, 55, 104, 0.98), rgba(16, 92, 137, 0.94)),
        #0b3768;
}

.lesson-meta {
    margin: 0 0 8px;
    color: #cde2f5;
    font-size: 0.82rem;
    font-weight: 700;
}

.lesson-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.classroom-tabs {
    display: flex;
    gap: 4px;
    padding: 0 18px;
    border-bottom: 1px solid #e8eef5;
    overflow-x: auto;
}

.classroom-tab {
    border: 0;
    background: transparent;
    color: #475569;
    font-weight: 800;
    padding: 15px 14px;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.classroom-tab.active {
    color: var(--brand-navy, #002d62);
    border-bottom-color: var(--brand-navy, #002d62);
}

.lesson-tab-panel {
    display: none;
    padding: 24px;
    min-height: 420px;
}

.lesson-tab-panel.active {
    display: block;
}

.lesson-content {
    max-width: none;
}

.rich-lesson-document {
    display: grid;
    gap: 20px;
}

.rich-lesson-document h1 {
    margin: 0;
    color: #0b3768;
    font-size: 1.8rem;
    line-height: 1.2;
}

.rich-lesson-document > p,
.lesson-section p,
.rich-lesson-document li {
    margin: 0 0 16px;
    color: #29384a;
    font-size: 1rem;
    line-height: 1.75;
}

.rich-lesson-document ul,
.rich-lesson-document ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.rich-lesson-document li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.rich-lesson-document h3 {
    margin: 10px 0 0;
    color: #0b3768;
    font-size: 1.12rem;
}

.lesson-briefing {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.85fr);
    gap: 18px;
    padding: 20px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, #0b3768 0%, #105c89 56%, #168b8f 100%);
    color: #ffffff;
    overflow: hidden;
}

.briefing-kicker,
.briefing-focus span {
    display: inline-flex;
    margin-bottom: 8px;
    color: #ffcf4a;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.briefing-copy h3 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 1.35rem;
    line-height: 1.25;
}

.briefing-copy p,
.briefing-focus p,
.briefing-focus li {
    margin: 0;
    color: #e5f1fb;
    line-height: 1.55;
}

.briefing-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.briefing-chips span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
}

.briefing-focus {
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.briefing-focus ul {
    margin: 0;
    padding-left: 18px;
}

.lesson-progress-ribbon {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    padding: 12px 14px;
    background: linear-gradient(90deg, #ffffff 0%, #f4f8fd 62%, #fff8df 100%);
}

.progress-ribbon-kicker {
    display: block;
    margin-bottom: 2px;
    color: #9b1c31;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lesson-progress-ribbon strong {
    color: #0b3768;
    font-size: 0.95rem;
}

.lesson-progress-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.lesson-progress-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #cddbea;
    border-radius: 50%;
    background: #ffffff;
    color: #516276;
    font-size: 0.78rem;
    font-weight: 900;
}

.lesson-progress-pill.complete {
    border-color: #8fc5a8;
    background: #edf8f2;
    color: #136b3d;
}

.lesson-progress-pill.active {
    border-color: #ffcf4a;
    background: #0b3768;
    color: #ffffff;
}

.lesson-map {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.lesson-map-card {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 92px;
    padding: 14px;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.lesson-map-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #ffcf4a;
}

.lesson-map-card i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef4fb;
    color: #0b3768;
}

.lesson-map-card span:not(.lesson-map-step) {
    display: block;
    color: #9b1c31;
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lesson-map-card strong {
    display: block;
    margin-top: 3px;
    color: #0b3768;
    font-size: 0.9rem;
    line-height: 1.25;
}

.lesson-map-step {
    position: absolute;
    top: 8px;
    right: 10px;
    /* Was #c7d4e4 on the #eef4fb card: 1.5:1 — the step number was invisible. */
    color: #4a6480;
    font-size: 0.78rem;
    font-weight: 900;
}

.lesson-section {
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    padding: 18px 18px 4px 22px;
    background: #fbfdff;
    position: relative;
    overflow: hidden;
}

.lesson-section::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #2f80ed;
}

.lesson-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.lesson-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eaf3ff;
    color: #0b3768;
}

.lesson-section-kicker {
    display: inline-flex;
    margin-bottom: 3px;
    color: #9b1c31;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.lesson-section h2 {
    margin: 0 0 12px;
    color: #0b3768;
    font-size: 1.14rem;
    line-height: 1.35;
}

.lesson-section-heading h2 {
    margin-bottom: 0;
}

.lesson-section-note {
    background: #f0f7ff;
    border-color: #c7ddf5;
}

.lesson-section-note::before {
    background: #2f80ed;
}

.lesson-section-focus {
    background: #fff8df;
    border-color: #efd98f;
}

.lesson-section-focus::before {
    background: #ffbf2e;
}

.lesson-section-activity {
    background: #edf8f2;
    border-color: #bfe5cf;
}

.lesson-section-activity::before {
    background: #1d9a58;
}

.lesson-section-source {
    background: #f8fafc;
    border-color: #ccd7e4;
}

.lesson-section-source::before {
    background: #64748b;
}

.lesson-section-source .lesson-section-icon {
    background: #e8edf3;
    color: #334155;
}

.lesson-section-warning {
    background: #fff6f3;
    border-color: #f2c3b7;
}

.lesson-section-warning::before {
    background: #d9482f;
}

.lesson-section-warning .lesson-section-icon {
    background: #ffe5de;
    color: #a4321e;
}

.lesson-check-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid #b7cce6;
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(135deg, #eef6ff 0%, #ffffff 58%, #fff7dc 100%);
    box-shadow: 0 12px 28px rgba(11, 55, 104, 0.08);
}

.lesson-check-card-muted {
    background: #f7f9fc;
    border-color: #dbe4ef;
    box-shadow: none;
}

.lesson-check-kicker {
    display: inline-flex;
    margin-bottom: 6px;
    color: #9b1c31;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.lesson-check-card h3 {
    margin: 0 0 8px;
    color: #0b3768;
    font-size: 1.08rem;
}

.lesson-check-card p {
    margin: 0;
    color: #334155;
    line-height: 1.55;
}

.lesson-check-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.lesson-check-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid #d4e0ee;
    border-radius: 8px;
    background: #ffffff;
    color: #203044;
    font-size: 0.78rem;
    font-weight: 800;
}

.lesson-check-card button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 132px;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #9b1c31;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.resource-card {
    border: 1px solid #dce5ef;
    border-radius: 8px;
    padding: 16px;
    background: #fbfdff;
    box-shadow: 0 10px 24px rgba(11, 55, 104, 0.06);
}

.resource-card i {
    color: var(--brand-navy, #002d62);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.resource-card h3 {
    margin: 0 0 8px;
    color: #172033;
    font-size: 0.98rem;
    line-height: 1.35;
}

.resource-card p {
    margin: 0 0 14px;
    color: #5c6b7d;
    font-size: 0.86rem;
    line-height: 1.5;
}

.resource-language-badge {
    display: inline-flex;
    margin: 0 0 14px;
    padding: 5px 8px;
    border: 1px solid #d5e0ed;
    border-radius: 8px;
    background: #ffffff;
    color: #0b3768;
    font-size: 0.74rem;
    font-weight: 900;
}

.resource-card a,
.resource-card button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 8px;
    padding: 9px 12px;
    background: var(--brand-navy, #002d62);
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.84rem;
}

.lesson-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
}

.resource-card-video {
    grid-column: 1 / -1;
}

.resource-card-video h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.lesson-video-player {
    width: 100%;
    max-height: 70vh;
    border-radius: 6px;
    background: #000;
    display: block;
}

.lesson-audio-player {
    width: 100%;
    display: block;
    margin-top: 4px;
}

.lesson-video-footnote {
    margin: 10px 0 0;
    font-size: 0.82rem;
}

.lesson-video-footnote a {
    background: transparent;
    color: var(--brand-navy, #002d62);
    padding: 0;
    font-weight: 700;
    text-decoration: underline;
}

.lesson-actions .btn-outline {
    background: #ffffff;
    border-color: #9bb1c9;
    color: var(--brand-navy, #002d62);
}

.lesson-actions .btn-outline:hover,
.lesson-actions .btn-outline:focus-visible {
    background: var(--brand-navy, #002d62);
    border-color: var(--brand-navy, #002d62);
    color: #ffffff;
}

.lesson-actions .btn:disabled {
    background: #eef4fb;
    border-color: #b9c9dc;
    color: #516579;
    cursor: not-allowed;
    opacity: 1;
    transform: none;
    box-shadow: none;
}

.empty-state,
.classroom-loading {
    min-height: 220px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    color: #64748b;
    gap: 10px;
}

.empty-state i,
.classroom-loading i {
    color: #8aa5c2;
    font-size: 2rem;
}

.empty-state h3 {
    margin: 0;
    color: var(--brand-navy, #002d62);
}

.empty-state p {
    margin: 0;
    max-width: 560px;
}

.rich-empty-state {
    border: 1px dashed #bfd0e3;
    border-radius: 8px;
    background:
        linear-gradient(180deg, #fbfdff 0%, #f0f7ff 100%);
    padding: 28px;
}

@media (max-width: 920px) {
    .classroom-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-progress {
        width: 100%;
    }

    .topbar-actions {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .classroom-tools {
        width: 100%;
        flex-wrap: wrap;
    }

    .language-control {
        flex: 1 1 190px;
    }

    .lesson-briefing {
        grid-template-columns: 1fr;
    }

    .lesson-progress-ribbon {
        grid-template-columns: 1fr;
    }

    .lesson-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lesson-progress-pills {
        justify-content: flex-start;
    }

    .classroom-shell {
        grid-template-columns: 1fr;
    }

    .lesson-sidebar {
        position: static;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid #dce5ef;
    }

    .sidebar-collapse {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .lesson-sidebar.collapsed .lesson-list {
        display: none;
    }

    .lesson-workspace {
        padding: 16px;
    }

    .lesson-header {
        flex-direction: column;
    }

    .lesson-check-card {
        grid-template-columns: 1fr;
    }

    .lesson-check-card button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .classroom-topbar {
        padding: 12px 14px;
    }

    .lesson-tab-panel {
        padding: 18px;
    }

    .lesson-actions {
        flex-direction: column;
    }

    .lesson-actions .btn,
    .lesson-header .btn {
        width: 100%;
        justify-content: center;
    }

    .print-classroom-btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .language-control {
        min-width: 100%;
        justify-content: space-between;
    }

    .language-control select {
        flex: 1 1 auto;
    }
}

@media print {
    @page {
        size: A4;
        margin: 16mm;
    }

    .classroom-body {
        background: #ffffff;
        color: #111827;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .classroom-topbar {
        position: static;
        padding: 0 0 14px;
        border-bottom: 2px solid var(--brand-navy, #002d62);
        align-items: flex-start;
    }

    .exit-link,
    .topbar-progress,
    .language-control,
    .classroom-tools,
    .print-classroom-btn,
    .lesson-sidebar,
    .classroom-tabs,
    .lesson-actions,
    #markCompleteBtn {
        display: none !important;
    }

    .classroom-shell {
        display: block;
        min-height: 0;
    }

    .lesson-workspace {
        padding: 0;
    }

    .compliance-strip,
    .language-strip,
    .lesson-panel,
    .lesson-section,
    .rich-empty-state {
        break-inside: avoid;
        box-shadow: none;
    }

    .compliance-strip,
    .language-strip {
        margin: 12px 0;
    }

    .lesson-panel {
        border: 0;
        border-radius: 0;
    }

    .lesson-header {
        padding: 12px 0;
        border-bottom: 1px solid #dce5ef;
        background: #ffffff;
    }

    .lesson-tab-panel {
        display: none;
        padding: 16px 0 0;
        min-height: 0;
    }

    #learnPanel {
        display: block;
    }

    .rich-lesson-document h1 {
        font-size: 24pt;
    }

    .lesson-header h2 {
        font-size: 22pt;
        color: #0b3768;
    }

    .lesson-section {
        margin-bottom: 12px;
        padding-left: 18px;
    }

    .lesson-briefing {
        background: #0b3768;
        color: #ffffff;
        margin-bottom: 12px;
        break-inside: avoid;
    }

    .lesson-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        break-inside: avoid;
    }
}

/* ── Translation "report a problem" affordance ────────────────────────── */
.tr-report-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .75rem;
    padding: .35rem .7rem;
    background: transparent;
    border: 1px solid #d8dee9;
    border-radius: 6px;
    color: #5b6b7f;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.tr-report-btn:hover { border-color: #a6192e; color: #a6192e; background: #fff5f5; }
.tr-report-btn i { font-size: .75rem; }
.tr-report-lesson {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed #d8dee9;
    text-align: center;
}
.tr-report-lesson-note { margin: 0 0 .6rem; color: #5b6b7f; font-size: .9rem; }
.tr-report-btn-lg { padding: .55rem 1.1rem; font-size: .9rem; }

/* Modal */
.tr-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 12, 32, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.tr-modal-overlay[hidden] { display: none; }
.tr-modal {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 12px;
    padding: 1.6rem 1.6rem 1.3rem;
    box-shadow: 0 18px 50px rgba(0, 12, 32, .3);
    max-height: 90vh;
    overflow-y: auto;
}
.tr-modal h3 { margin: 0 0 .35rem; color: #002d62; font-size: 1.2rem; }
.tr-modal-context { margin: 0 0 1rem; color: #5b6b7f; font-size: .85rem; }
.tr-modal-close {
    position: absolute;
    top: .75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #8b97a8;
    cursor: pointer;
}
.tr-field { display: block; margin-bottom: 1rem; }
.tr-field > span { display: block; font-weight: 600; color: #1f2933; font-size: .9rem; margin-bottom: .3rem; }
.tr-field > span small { font-weight: 400; color: #8b97a8; }
.tr-field select,
.tr-field textarea,
.tr-field input {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid #d8dee9;
    border-radius: 6px;
    font-family: inherit;
    font-size: .92rem;
}
.tr-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .5rem; }
.tr-modal-cancel {
    padding: .55rem 1rem;
    background: #fff;
    border: 1px solid #d8dee9;
    border-radius: 6px;
    color: #5b6b7f;
    font-weight: 600;
    cursor: pointer;
}
.tr-modal-submit {
    padding: .55rem 1.1rem;
    background: #002d62;
    border: 1px solid #002d62;
    border-radius: 6px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.tr-modal-submit:hover { background: #001f4d; }
.tr-modal-submit:disabled { opacity: .6; cursor: not-allowed; }
.tr-modal-status { margin: .8rem 0 0; font-size: .88rem; min-height: 1.1em; }
.tr-modal-status-ok { color: #2e7d32; }
.tr-modal-status-error { color: #a6192e; }

/* ==========================================================================
   AV narration (avDelivery). Narration exists in English + Hindi only; when a
   learner's language has none we serve English and SAY so, reusing the caution
   styling of the machine-translation disclosure. A disclosure, not a green tick.
   ========================================================================== */
.lesson-av {
    margin: 1.25rem 0 1.75rem;
}

.lesson-av .av-notice {
    margin-bottom: 0.75rem;
}

.lesson-av-player {
    width: 100%;
    max-width: 100%;
    border-radius: 10px;
    background: #000;
    display: block;
    aspect-ratio: 16 / 9;
}

.av-alt-btn {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.15rem 0.55rem;
    font: inherit;
    font-size: 0.85em;
    color: #1d4ed8;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 999px;
    cursor: pointer;
}

.av-alt-btn:hover,
.av-alt-btn:focus-visible {
    background: rgba(29, 78, 216, 0.08);
}

/* Missing lesson diagram — the asset file 404s (a number of referenced diagrams
   have not been produced yet). Hide the broken <img> glyph but KEEP the caption,
   which describes the diagram in words, so the lesson degrades honestly instead
   of showing a broken icon at the top of the page. Set by the delegated error
   handler in classroom.js / lesson-render.js. */
.lesson-figure-missing img { display: none; }

.lesson-figure-missing figcaption {
    background: #f4f7fb;
    border-left: 3px solid #9aa7b8;
    border-radius: 6px;
    color: #5b6b7f;
    font-style: italic;
    padding: 10px 14px;
}
