.ui-icon {
    --icon: none;
    display: inline-block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background: currentColor;
    mask: var(--icon) center / contain no-repeat;
    -webkit-mask: var(--icon) center / contain no-repeat;
}

.ui-icon-video {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 13 5 3V8l-5 3z'/%3E%3Crect x='3' y='5' width='13' height='14' rx='2'/%3E%3C/svg%3E");
}

.ui-icon-board {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='1'/%3E%3Cpath d='M12 16v4'/%3E%3Cpath d='M8 20h8'/%3E%3Cpath d='M8 8h8'/%3E%3Cpath d='M8 12h5'/%3E%3C/svg%3E");
}

.ui-icon-calendar {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
}

.ui-icon-check {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

.ui-icon-file,
.ui-icon-pdf {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3Cpath d='M8 13h8'/%3E%3Cpath d='M8 17h5'/%3E%3C/svg%3E");
}

.ui-icon-target {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3C/svg%3E");
}

.ui-icon-book-open {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4h7a4 4 0 0 1 4 4v12a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 4h-7a4 4 0 0 0-4 4v12a3 3 0 0 1 3-3h8z'/%3E%3C/svg%3E");
}

.ui-icon-play {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

.ui-icon-user {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}

.ui-icon-copy {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E");
}

.ui-icon-link {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7 0l2-2a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 11a5 5 0 0 0-7 0l-2 2a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E");
}

.ui-icon-download {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 21h14'/%3E%3C/svg%3E");
}

.ui-icon-archive {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='4' rx='1'/%3E%3Cpath d='M5 7v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7'/%3E%3Cpath d='M10 12h4'/%3E%3C/svg%3E");
}

.ui-icon-list {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h13'/%3E%3Cpath d='M8 12h13'/%3E%3Cpath d='M8 18h13'/%3E%3Cpath d='M3 6h.01'/%3E%3Cpath d='M3 12h.01'/%3E%3Cpath d='M3 18h.01'/%3E%3C/svg%3E");
}

.ui-icon-filter {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9v7l4 2v-9z'/%3E%3C/svg%3E");
}

.ui-icon-eye {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.ui-icon-eye-off {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 3 18 18'/%3E%3Cpath d='M10.6 10.6a2 2 0 0 0 2.8 2.8'/%3E%3Cpath d='M9.9 4.2A10.5 10.5 0 0 1 12 4c6 0 10 8 10 8a17 17 0 0 1-3.1 4.3'/%3E%3Cpath d='M6.4 6.4C3.7 8.2 2 12 2 12s4 8 10 8a10.5 10.5 0 0 0 4.6-1.1'/%3E%3C/svg%3E");
}

.ui-icon-settings {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5A3.5 3.5 0 1 0 12 8a3.5 3.5 0 0 0 0 7.5Z'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 0 1 0 2.8 2 2 0 0 1-2.8 0l-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.3a2 2 0 0 1-4 0V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1a2 2 0 0 1-2.8 0 2 2 0 0 1 0-2.8l.1-.1A1.7 1.7 0 0 0 4.6 15a1.7 1.7 0 0 0-1.6-1H2.7a2 2 0 0 1 0-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7a2 2 0 0 1 0-2.8 2 2 0 0 1 2.8 0l.1.1A1.7 1.7 0 0 0 9 4.6a1.7 1.7 0 0 0 1-1.6v-.3a2 2 0 0 1 4 0V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1a2 2 0 0 1 2.8 0 2 2 0 0 1 0 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.3a2 2 0 0 1 0 4H21a1.7 1.7 0 0 0-1.6 1Z'/%3E%3C/svg%3E");
}

.button.icon-button,
.ghost-button.icon-button,
button.icon-button {
    gap: 8px;
}

.button .ui-icon,
.ghost-button .ui-icon {
    margin-left: -2px;
}

.teacher-shell .lesson-filter-bar {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(220px, 320px) auto;
    gap: 12px;
    align-items: end;
    margin: 18px 0;
}

.teacher-shell .lesson-list-row {
    align-items: center;
}

.teacher-shell .lesson-row-main {
    min-width: 0;
}

.lesson-table-list,
.student-table-list {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.lesson-table-head,
.lesson-table-row,
.student-table-head,
.student-table-row {
    display: grid;
    gap: 12px;
    align-items: center;
}

.lesson-table-head,
.student-table-head {
    min-height: 34px;
    padding: 0 14px;
    color: var(--teacher-gold-deep, #92611f);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lesson-table-row,
.student-table-row {
    min-height: 84px;
    padding: 14px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 18px;
    background: rgba(255, 250, 240, 0.72);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lesson-table-row:hover,
.student-table-row:hover {
    border-color: rgba(201, 144, 46, 0.38);
    box-shadow: 0 14px 34px rgba(35, 26, 15, 0.07);
    transform: translateY(-1px);
}

.lesson-table-row > div,
.student-table-row > div {
    min-width: 0;
}

.lesson-table-row strong,
.student-table-row strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--teacher-navy, #081b33);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.25;
}

.lesson-table-row span,
.student-table-row span {
    color: var(--teacher-muted, #647084);
    font-weight: 650;
}

.lesson-table-row .tag-row,
.student-table-row .tag-row {
    margin: 0;
}

.lesson-table-row .split-actions,
.student-table-row .split-actions {
    justify-content: flex-end;
}

/* Student lessons workspace */

body.student-lessons-page {
    min-width: 0;
    overflow-x: hidden;
    background: #f7f8fa;
}

.student-lessons-workspace {
    --lesson-ink: #0b2d50;
    --lesson-muted: #66758a;
    --lesson-line: #dfe5ec;
    --lesson-line-strong: #cbd5df;
    --lesson-paper: #ffffff;
    --lesson-soft: #f4f7fa;
    --lesson-accent: #db8618;
    --lesson-accent-soft: #fff5e6;
    --lesson-green: #24784d;
    --lesson-green-soft: #eaf6ef;
    --lesson-red: #b74545;
    --lesson-red-soft: #fff0f0;
    --lesson-blue: #275f9f;
    color: var(--lesson-ink);
}

.student-lessons-content,
.student-lesson-detail-content {
    display: grid;
    gap: 18px;
    width: min(calc(100% - 72px), 1600px);
    margin: 0 auto;
    padding: 28px 0 40px;
}

.student-lessons-page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    min-width: 0;
    padding: 0 4px 2px;
}

.student-lessons-kicker,
.student-lesson-section-head > div > span,
.student-lesson-overview-block header span,
.student-lesson-notes article > span {
    display: block;
    color: #9b620f;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.student-lessons-page-head h1,
.student-lesson-hero h1,
.student-lesson-section-head h2 {
    margin: 0;
    color: var(--lesson-ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 600;
    letter-spacing: 0;
}

.student-lessons-page-head h1 {
    margin-top: 4px;
    font-size: 3rem;
    line-height: 1;
}

.student-lessons-page-head p {
    margin: 9px 0 0;
    color: var(--lesson-muted);
    font-size: 0.88rem;
    font-weight: 650;
}

.student-featured-lesson {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    min-height: 260px;
    padding: 30px 32px;
    overflow: hidden;
    border: 1px solid var(--lesson-line-strong);
    border-left: 4px solid var(--lesson-accent);
    border-radius: 8px;
    background: var(--lesson-paper);
    box-shadow: 0 12px 32px rgba(11, 45, 80, 0.055);
}

.student-featured-lesson::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 260px;
    height: 100%;
    border-left: 1px solid #e8edf2;
    background: #f8fafc;
    content: "";
    pointer-events: none;
}

.student-featured-lesson-main,
.student-featured-lesson-actions {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.student-featured-lesson-topline,
.student-featured-lesson-meta,
.student-featured-lesson-actions,
.student-featured-lesson-actions > div,
.student-featured-lesson-actions a,
.student-lesson-prep,
.student-lesson-row-action,
.student-lesson-status,
.student-lesson-breadcrumbs,
.student-lesson-breadcrumbs > a,
.student-lesson-breadcrumbs > div,
.student-lesson-breadcrumbs > div a,
.student-lesson-hero-meta,
.student-lesson-hero-actions,
.student-lesson-hero-actions > div,
.student-lesson-hero-actions a,
.student-lesson-tabs,
.student-lesson-tabs a,
.student-lesson-section-head,
.student-lesson-section-actions,
.student-lesson-section-actions a,
.student-lesson-overview-block header,
.student-lesson-overview-block > a,
.student-lesson-material-actions,
.student-lesson-material-actions a,
.student-lesson-material-actions button,
.student-classwork-item summary,
.student-classwork-pagination,
.student-classwork-pagination a,
.student-lesson-homework-row > a {
    display: flex;
    align-items: center;
}

.student-featured-lesson-topline {
    gap: 12px;
    justify-content: space-between;
    color: var(--lesson-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.student-featured-lesson h2 {
    max-width: 850px;
    margin: 18px 0 0;
    color: var(--lesson-ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.student-featured-lesson-main > p {
    max-width: 800px;
    margin: 12px 0 0;
    color: #43546a;
    font-size: 0.95rem;
    line-height: 1.55;
}

.student-featured-lesson-meta {
    flex-wrap: wrap;
    gap: 9px 18px;
    margin-top: 20px;
    color: #465971;
    font-size: 0.8rem;
    font-weight: 700;
}

.student-featured-lesson-meta span,
.student-lesson-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.student-featured-lesson-meta svg,
.student-lesson-hero-meta svg,
.student-featured-lesson-actions svg,
.student-lesson-row-action svg,
.student-lesson-breadcrumbs svg,
.student-lesson-hero-actions svg,
.student-lesson-section-actions svg,
.student-lesson-overview-block svg,
.student-lesson-material-actions svg,
.student-classwork-pagination svg,
.student-lesson-homework-row > a svg {
    width: 18px;
    height: 18px;
}

.student-lesson-status {
    justify-content: center;
    min-height: 26px;
    width: fit-content;
    padding: 0 9px;
    border: 1px solid var(--lesson-line);
    border-radius: 999px;
    background: var(--lesson-soft);
    color: #536276;
    font-size: 0.68rem;
    font-weight: 850;
    white-space: nowrap;
}

.student-lesson-status.is-planned {
    border-color: #cdddec;
    background: #eef5fb;
    color: var(--lesson-blue);
}

.student-lesson-status.is-live {
    border-color: #acd6bd;
    background: var(--lesson-green-soft);
    color: var(--lesson-green);
}

.student-lesson-status.is-success {
    border-color: #cae0d3;
    background: #f1f8f4;
    color: #3a6e51;
}

.student-lesson-status.is-warning {
    border-color: #ead5ad;
    background: var(--lesson-accent-soft);
    color: #936018;
}

.student-lesson-status.is-muted {
    color: #748092;
}

.student-lesson-prep {
    gap: 12px;
    width: min(100%, 560px);
    margin-top: 22px;
    padding: 12px 14px;
    border: 1px solid #ead1a9;
    border-radius: 7px;
    background: var(--lesson-accent-soft);
    color: var(--lesson-ink);
    text-decoration: none;
}

.student-lesson-prep > svg:first-child {
    width: 22px;
    height: 22px;
    color: var(--lesson-accent);
}

.student-lesson-prep > svg:last-child {
    width: 18px;
    height: 18px;
    margin-left: auto;
}

.student-lesson-prep span {
    display: grid;
    min-width: 0;
}

.student-lesson-prep strong {
    font-size: 0.76rem;
}

.student-lesson-prep small {
    margin-top: 3px;
    color: #735a36;
    font-size: 0.72rem;
}

.student-featured-lesson-actions,
.student-lesson-hero-actions {
    align-self: center;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.student-featured-lesson-actions > a,
.student-lesson-hero-actions > a {
    width: 100%;
}

.student-lesson-primary {
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 20px;
    border: 1px solid #052e55;
    border-radius: 7px;
    background: #07345e;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 850;
    text-decoration: none;
}

.student-lesson-primary:hover,
.student-lesson-primary:focus-visible {
    background: #0b467c;
    color: #fff;
}

.student-featured-lesson-actions > div,
.student-lesson-hero-actions > div {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.student-featured-lesson-actions > div a,
.student-lesson-hero-actions > div a,
.student-lesson-section-actions a,
.student-lesson-material-actions a,
.student-lesson-material-actions button {
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid var(--lesson-line-strong);
    border-radius: 7px;
    background: #fff;
    color: var(--lesson-ink);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.student-lesson-group,
.student-lesson-history,
.student-lesson-tab-panel {
    min-width: 0;
    border: 1px solid var(--lesson-line);
    border-radius: 8px;
    background: var(--lesson-paper);
}

.student-lesson-group {
    padding: 22px 24px 24px;
}

.student-lesson-group > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.student-lesson-group h2,
.student-lesson-history summary > span {
    margin: 0;
    color: var(--lesson-ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.52rem;
    font-weight: 600;
    letter-spacing: 0;
}

.student-lesson-group > header > span,
.student-lesson-history summary small {
    color: var(--lesson-muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.student-lesson-rows {
    display: grid;
    gap: 8px;
}

.student-lesson-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr) minmax(150px, auto);
    gap: 18px;
    align-items: center;
    min-height: 96px;
    padding: 12px 14px;
    border: 1px solid #e4e9ef;
    border-radius: 7px;
    background: #fff;
}

.student-lesson-row > time {
    display: grid;
    place-items: center;
    min-height: 68px;
    padding: 7px;
    border-right: 1px solid var(--lesson-line);
    color: var(--lesson-muted);
}

.student-lesson-row > time strong {
    color: var(--lesson-ink);
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.55rem;
    font-weight: 650;
    line-height: 1;
}

.student-lesson-row > time span,
.student-lesson-row > time small {
    margin-top: 2px;
    font-size: 0.67rem;
    font-weight: 750;
}

.student-lesson-row-copy {
    min-width: 0;
}

.student-lesson-row-copy > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.student-lesson-prep-note {
    color: #98641b;
    font-size: 0.7rem;
    font-weight: 800;
}

.student-lesson-row-copy h3 {
    margin: 7px 0 0;
    color: var(--lesson-ink);
    font-size: 0.96rem;
    line-height: 1.3;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.student-lesson-row-copy p {
    margin: 5px 0 0;
    color: var(--lesson-muted);
    font-size: 0.74rem;
    line-height: 1.4;
}

.student-lesson-row-action {
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--lesson-line-strong);
    border-radius: 7px;
    color: var(--lesson-ink);
    font-size: 0.74rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.student-lesson-history {
    overflow: hidden;
}

.student-lesson-history > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    gap: 12px;
    align-items: center;
    min-height: 72px;
    padding: 0 24px;
    cursor: pointer;
    list-style: none;
}

.student-lesson-history > summary::-webkit-details-marker,
.student-classwork-item > summary::-webkit-details-marker {
    display: none;
}

.student-lesson-history > summary svg {
    width: 20px;
    height: 20px;
    transition: transform 180ms ease;
}

.student-lesson-history[open] > summary svg {
    transform: rotate(180deg);
}

.student-lesson-history > .student-lesson-rows {
    padding: 0 24px 24px;
}

.student-lessons-empty,
.student-lesson-tab-empty {
    display: grid;
    place-items: center;
    min-height: 280px;
    padding: 36px;
    border: 1px dashed var(--lesson-line-strong);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.student-lessons-empty svg,
.student-lesson-tab-empty svg {
    width: 42px;
    height: 42px;
    color: var(--lesson-blue);
}

.student-lessons-empty h2,
.student-lesson-tab-empty h3 {
    margin: 12px 0 0;
    color: var(--lesson-ink);
    font-family: "Source Serif 4", Georgia, serif;
    letter-spacing: 0;
}

.student-lessons-empty p {
    margin: 7px 0 0;
    color: var(--lesson-muted);
}

/* Student lesson detail */

.student-lesson-breadcrumbs {
    min-height: 38px;
    color: var(--lesson-muted);
    font-size: 0.75rem;
    font-weight: 750;
}

.student-lesson-breadcrumbs > a {
    gap: 7px;
    color: var(--lesson-ink);
    text-decoration: none;
}

.student-lesson-breadcrumbs > span {
    margin-left: auto;
}

.student-lesson-breadcrumbs > div {
    gap: 6px;
    margin-left: 14px;
}

.student-lesson-breadcrumbs > div a {
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--lesson-line);
    border-radius: 7px;
    color: var(--lesson-ink);
}

.student-lesson-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 36px;
    min-height: 250px;
    padding: 32px;
    border: 1px solid var(--lesson-line-strong);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(11, 45, 80, 0.05);
}

.student-lesson-hero-copy {
    min-width: 0;
}

.student-lesson-hero h1 {
    max-width: 980px;
    margin-top: 16px;
    font-size: 2.65rem;
    line-height: 1.06;
    overflow-wrap: anywhere;
}

.student-lesson-hero-meta {
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 18px;
    color: #43566e;
    font-size: 0.82rem;
    font-weight: 750;
}

.student-lesson-hero-copy > p {
    max-width: 850px;
    margin: 18px 0 0;
    color: var(--lesson-muted);
    font-size: 0.94rem;
    line-height: 1.6;
}

.student-lesson-tabs {
    gap: 4px;
    min-width: 0;
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--lesson-line);
    border-radius: 8px;
    background: #fff;
    scrollbar-width: none;
}

.student-lesson-tabs::-webkit-scrollbar {
    display: none;
}

.student-lesson-tabs a {
    justify-content: center;
    gap: 7px;
    flex: 1 0 auto;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #526278;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.student-lesson-tabs a span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border-radius: 999px;
    background: #edf1f5;
    color: #5b687a;
    font-size: 0.66rem;
}

.student-lesson-tabs a.is-active {
    border-color: #d4dde6;
    background: #f1f5f8;
    color: var(--lesson-ink);
}

.student-lesson-tabs a.is-active span {
    background: #fff;
    color: var(--lesson-blue);
}

.student-lesson-tab-panel {
    padding: 28px 30px 32px;
}

.student-lesson-section-head {
    gap: 18px;
    justify-content: space-between;
    min-width: 0;
    margin-bottom: 24px;
}

.student-lesson-section-head h2 {
    margin-top: 3px;
    font-size: 2rem;
}

.student-lesson-section-head > strong,
.student-lesson-section-actions > strong {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--lesson-line);
    border-radius: 7px;
    color: var(--lesson-muted);
    font-size: 0.74rem;
}

.student-lesson-section-actions {
    gap: 9px;
}

.student-lesson-notes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.student-lesson-notes article {
    min-width: 0;
    padding: 16px 18px;
    border-left: 3px solid #9db6ce;
    background: #f5f8fb;
}

.student-lesson-notes article > span {
    color: #56718e;
}

.student-lesson-notes p {
    margin: 7px 0 0;
    color: #334a63;
    font-size: 0.8rem;
    line-height: 1.55;
}

.student-lesson-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.student-lesson-overview-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 270px;
    padding: 20px;
    border: 1px solid var(--lesson-line);
    border-radius: 7px;
    background: #fff;
}

.student-lesson-overview-block header {
    gap: 12px;
}

.student-lesson-overview-block header > svg {
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 1px solid #d7e1eb;
    border-radius: 7px;
    color: var(--lesson-blue);
    background: #f3f7fb;
}

.student-lesson-overview-block h3 {
    margin: 3px 0 0;
    color: var(--lesson-ink);
    font-size: 0.94rem;
    letter-spacing: 0;
}

.student-lesson-overview-block > p {
    margin: 18px 0 0;
    color: var(--lesson-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.student-lesson-overview-block > p strong {
    color: var(--lesson-ink);
}

.student-lesson-overview-block ul,
.student-lesson-overview-block ol {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.student-lesson-overview-block li {
    display: flex;
    gap: 9px;
    min-width: 0;
    color: #3f5269;
    font-size: 0.73rem;
    line-height: 1.4;
}

.student-lesson-overview-block li strong {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef3f7;
    color: var(--lesson-ink);
    font-size: 0.66rem;
}

.student-lesson-overview-block li span {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.student-lesson-overview-block > a {
    gap: 7px;
    width: fit-content;
    margin-top: auto;
    padding-top: 18px;
    color: var(--lesson-blue);
    font-size: 0.74rem;
    font-weight: 850;
    text-decoration: none;
}

.student-lesson-homework-progress {
    display: inline-block;
    width: fit-content;
    margin-top: 12px;
    padding: 5px 8px;
    border-radius: 6px;
    background: #edf5f0;
    color: var(--lesson-green);
    font-size: 0.7rem;
    font-weight: 800;
}

.student-lesson-material-list,
.student-lesson-homework-list,
.student-classwork-list {
    display: grid;
    gap: 9px;
}

.student-lesson-material-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) minmax(180px, auto);
    gap: 16px;
    align-items: center;
    min-height: 106px;
    padding: 16px;
    border: 1px solid var(--lesson-line);
    border-radius: 7px;
}

.student-lesson-material-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid #d7e1eb;
    border-radius: 7px;
    background: #f3f7fb;
    color: var(--lesson-blue);
}

.student-lesson-material-icon svg {
    width: 25px;
    height: 25px;
}

.student-lesson-material-copy {
    min-width: 0;
}

.student-lesson-material-copy > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.student-lesson-material-copy > div span {
    padding: 3px 7px;
    border-radius: 5px;
    background: #f0f3f6;
    color: #5d6878;
    font-size: 0.64rem;
    font-weight: 800;
}

.student-lesson-material-copy > div span.is-read {
    background: var(--lesson-green-soft);
    color: var(--lesson-green);
}

.student-lesson-material-copy h3 {
    margin: 7px 0 0;
    color: var(--lesson-ink);
    font-size: 0.92rem;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.student-lesson-material-copy p {
    margin: 6px 0 0;
    color: var(--lesson-muted);
    font-size: 0.73rem;
    line-height: 1.5;
}

.student-lesson-material-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.student-lesson-material-actions form {
    margin: 0;
}

.student-classwork-item {
    overflow: hidden;
    border: 1px solid var(--lesson-line);
    border-radius: 7px;
    background: #fff;
}

.student-classwork-item summary {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 22px;
    gap: 14px;
    min-height: 84px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
}

.student-classwork-item summary > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d6dfe8;
    border-radius: 7px;
    color: var(--lesson-ink);
    font-weight: 850;
}

.student-classwork-item summary > div {
    min-width: 0;
}

.student-classwork-item summary small {
    display: block;
    color: #9b620f;
    font-size: 0.66rem;
    font-weight: 850;
}

.student-classwork-item summary strong {
    display: -webkit-box;
    margin-top: 5px;
    overflow: hidden;
    color: var(--lesson-ink);
    font-size: 0.82rem;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.student-classwork-item summary > svg {
    width: 20px;
    height: 20px;
    transition: transform 180ms ease;
}

.student-classwork-item[open] summary > svg {
    transform: rotate(180deg);
}

.student-classwork-condition {
    padding: 18px 74px 22px;
    border-top: 1px solid var(--lesson-line);
    background: #f8fafc;
    color: #172f4b;
    font-size: 0.9rem;
    line-height: 1.65;
}

.student-classwork-condition > :first-child {
    margin-top: 0;
}

.student-classwork-condition > :last-child {
    margin-bottom: 0;
}

.student-classwork-pagination {
    justify-content: center;
    gap: 6px;
    margin-top: 22px;
}

.student-classwork-pagination a {
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border: 1px solid var(--lesson-line);
    border-radius: 7px;
    color: var(--lesson-ink);
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
}

.student-classwork-pagination a.is-active {
    border-color: #0a3b68;
    background: #0a3b68;
    color: #fff;
}

.student-lesson-homework-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(130px, auto);
    gap: 16px;
    align-items: center;
    min-height: 126px;
    padding: 18px;
    border: 1px solid var(--lesson-line);
    border-radius: 7px;
}

.student-lesson-homework-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d6dfe8;
    border-radius: 7px;
    font-weight: 850;
}

.student-lesson-homework-copy {
    min-width: 0;
}

.student-lesson-homework-copy > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--lesson-muted);
    font-size: 0.68rem;
    font-weight: 750;
}

.student-lesson-homework-copy > div span {
    color: var(--lesson-blue);
}

.student-lesson-homework-copy > div span.is-success {
    color: var(--lesson-green);
}

.student-lesson-homework-copy > div span.is-danger {
    color: var(--lesson-red);
}

.student-lesson-homework-copy h3 {
    margin: 8px 0 0;
    color: var(--lesson-ink);
    font-size: 0.94rem;
    letter-spacing: 0;
}

.student-lesson-homework-copy p {
    margin: 6px 0 0;
    color: var(--lesson-muted);
    font-size: 0.72rem;
}

.student-lesson-homework-copy progress {
    width: min(420px, 100%);
    height: 7px;
    margin-top: 12px;
    overflow: hidden;
    border: 0;
    border-radius: 99px;
    background: #e9edf1;
}

.student-lesson-homework-copy progress::-webkit-progress-bar {
    border-radius: 99px;
    background: #e9edf1;
}

.student-lesson-homework-copy progress::-webkit-progress-value {
    border-radius: 99px;
    background: var(--lesson-green);
}

.student-lesson-homework-copy progress::-moz-progress-bar {
    border-radius: 99px;
    background: var(--lesson-green);
}

.student-lesson-homework-row > a {
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #0a3b68;
    border-radius: 7px;
    color: #0a3b68;
    font-size: 0.74rem;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 1120px) {
    .student-lessons-content,
    .student-lesson-detail-content {
        width: calc(100% - 28px);
        padding-top: 18px;
    }

    .student-featured-lesson,
    .student-lesson-hero {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 24px;
        padding: 26px;
    }

    .student-lesson-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-lesson-overview-block:last-child {
        grid-column: 1 / -1;
        min-height: 210px;
    }
}

@media (max-width: 760px) {
    .student-lessons-page-head h1 {
        font-size: 2.35rem;
    }

    .student-featured-lesson,
    .student-lesson-hero {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        padding: 22px;
    }

    .student-featured-lesson::after {
        display: none;
    }

    .student-featured-lesson h2,
    .student-lesson-hero h1 {
        font-size: 2rem;
    }

    .student-featured-lesson-actions,
    .student-lesson-hero-actions {
        align-items: stretch;
    }

    .student-lesson-row {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 12px;
    }

    .student-lesson-row > time {
        min-height: 72px;
    }

    .student-lesson-row-action {
        grid-column: 2;
        justify-self: start;
    }

    .student-lesson-breadcrumbs > span {
        display: none;
    }

    .student-lesson-breadcrumbs > div {
        margin-left: auto;
    }

    .student-lesson-tab-panel {
        padding: 22px 18px 24px;
    }

    .student-lesson-section-head h2 {
        font-size: 1.65rem;
    }

    .student-lesson-overview-grid,
    .student-lesson-notes {
        grid-template-columns: minmax(0, 1fr);
    }

    .student-lesson-overview-block:last-child {
        grid-column: auto;
    }

    .student-lesson-material-row,
    .student-lesson-homework-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .student-lesson-material-actions,
    .student-lesson-homework-row > a {
        grid-column: 2;
        justify-content: flex-start;
    }

    .student-classwork-condition {
        padding: 18px 20px 22px;
    }
}

@media (max-width: 520px) {
    .student-lessons-content,
    .student-lesson-detail-content {
        width: calc(100% - 20px);
        gap: 12px;
        padding: 14px 0 28px;
    }

    .student-lessons-page-head {
        padding-inline: 2px;
    }

    .student-lessons-page-head h1 {
        font-size: 2rem;
    }

    .student-featured-lesson,
    .student-lesson-hero {
        padding: 18px;
    }

    .student-featured-lesson h2,
    .student-lesson-hero h1 {
        font-size: 1.72rem;
    }

    .student-featured-lesson-meta,
    .student-lesson-hero-meta {
        display: grid;
    }

    .student-featured-lesson-actions > div,
    .student-lesson-hero-actions > div {
        justify-content: stretch;
    }

    .student-featured-lesson-actions > div a,
    .student-lesson-hero-actions > div a {
        flex: 1 1 auto;
    }

    .student-lesson-group {
        padding: 18px 12px 14px;
    }

    .student-lesson-history > summary {
        padding-inline: 16px;
    }

    .student-lesson-history > .student-lesson-rows {
        padding: 0 12px 14px;
    }

    .student-lesson-row {
        grid-template-columns: 52px minmax(0, 1fr);
        padding: 10px;
    }

    .student-lesson-row > time {
        padding: 4px;
    }

    .student-lesson-row-action {
        width: 100%;
    }

    .student-lesson-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .student-lesson-tabs a {
        min-width: 0;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 0.78rem;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
    }

    .student-lesson-section-head {
        align-items: flex-start;
    }

    .student-lesson-section-actions {
        align-items: flex-end;
        flex-direction: column;
    }

    .student-lesson-overview-block {
        min-height: 240px;
        padding: 17px;
    }

    .student-lesson-material-row,
    .student-lesson-homework-row {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        padding: 14px 12px;
    }

    .student-lesson-material-icon,
    .student-lesson-homework-number {
        width: 40px;
        height: 40px;
    }

    .student-lesson-material-actions a,
    .student-lesson-material-actions button {
        flex: 1 1 auto;
    }

    .student-classwork-item summary {
        grid-template-columns: 38px minmax(0, 1fr) 18px;
        gap: 10px;
        padding: 10px;
    }

    .student-classwork-item summary > span {
        width: 36px;
        height: 36px;
    }

    .student-classwork-pagination {
        flex-wrap: wrap;
    }
}

.student-shell .lesson-material-read-form {
    margin: 0;
}

.student-shell .lesson-material-read-button {
    white-space: nowrap;
}

.teacher-shell .lesson-table-head,
.teacher-shell .lesson-table-row {
    grid-template-columns: 82px minmax(150px, 0.9fr) minmax(210px, 1.1fr) minmax(190px, 0.9fr) minmax(180px, 0.9fr) minmax(270px, auto);
}

.teacher-shell .student-table-head,
.teacher-shell .student-table-row {
    grid-template-columns: 82px minmax(230px, 1.1fr) minmax(180px, 0.8fr) minmax(190px, 0.8fr) minmax(270px, auto);
}

.student-shell .lesson-table-head,
.student-shell .lesson-table-row {
    grid-template-columns: 82px minmax(240px, 1fr) minmax(240px, 0.9fr) minmax(230px, auto);
}

.student-shell .lesson-table-head {
    color: var(--eg-cobalt-dark);
}

.student-shell .lesson-table-row {
    border-color: var(--eg-border);
    background: rgba(255, 253, 248, 0.86);
}

.student-shell .lesson-table-row:hover {
    border-color: rgba(36, 87, 230, 0.22);
    box-shadow: 0 14px 34px rgba(15, 24, 40, 0.07);
}

.student-shell .lesson-table-row strong {
    color: var(--eg-navy);
}

.student-shell .lesson-table-row span {
    color: var(--eg-ink-soft);
}

.student-shell .student-lesson-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 4px;
}

.student-shell .student-lesson-summary > div {
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid var(--eg-border);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 253, 248, 0.92), rgba(238, 244, 255, 0.58));
}

.student-shell .student-lesson-summary span {
    display: block;
    color: var(--eg-ink-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.student-shell .student-lesson-summary strong {
    display: block;
    margin-top: 8px;
    color: var(--eg-navy);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 650;
    line-height: 1;
}

.library-context-strip {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 18px;
    border: 1px solid rgba(171, 146, 107, 0.24);
    border-radius: 28px;
    background: rgba(255, 250, 240, 0.74);
    box-shadow: 0 14px 34px rgba(35, 26, 15, 0.05);
}

.library-context-main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    min-width: 0;
    color: var(--teacher-muted, #647084);
    font-weight: 800;
}

.library-context-main strong {
    color: var(--teacher-navy, #081b33);
}

.teacher-library-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 18px;
    align-items: start;
}

.teacher-library-main,
.teacher-library-preview {
    min-width: 0;
}

.library-heading-row {
    margin-bottom: 8px;
}

.library-tabs {
    margin: 12px 0 18px;
}

.library-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    margin-left: 6px;
    border: 1px solid rgba(171, 146, 107, 0.24);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 850;
    color: var(--teacher-muted, #647084);
    background: rgba(255, 250, 240, 0.82);
}

.lesson-tab-link.is-active .library-tab-count {
    color: var(--teacher-gold-deep, #92611f);
    border-color: rgba(201, 144, 46, 0.4);
}

.library-filter-bar {
    display: grid;
    grid-template-columns: minmax(110px, 0.7fr) minmax(160px, 0.9fr) minmax(240px, 1.4fr) auto;
    gap: 12px;
    align-items: end;
    margin: 0 0 12px;
}

.library-search-row {
    min-width: 0;
}

.teacher-library-list {
    display: grid;
    gap: 8px;
}

.library-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 96px;
    padding: 14px;
    border: 1px solid rgba(171, 146, 107, 0.26);
    border-radius: 18px;
    background: rgba(255, 250, 240, 0.68);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.library-item-row:hover,
.library-item-row.is-selected {
    border-color: rgba(201, 144, 46, 0.56);
    box-shadow: 0 14px 34px rgba(35, 26, 15, 0.07);
}

.library-item-row:hover {
    transform: translateY(-1px);
}

.library-item-pick {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.library-item-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(171, 146, 107, 0.24);
    border-radius: 14px;
    color: var(--teacher-gold-deep, #92611f);
    background: rgba(255, 250, 240, 0.82);
}

.library-item-icon:has(.ui-icon-calendar) {
    color: #92611f;
    background: rgba(201, 144, 46, 0.14);
    border-color: rgba(201, 144, 46, 0.28);
}

.library-item-icon:has(.ui-icon-book-open) {
    color: #2457e6;
    background: rgba(36, 87, 230, 0.10);
    border-color: rgba(36, 87, 230, 0.20);
}

.library-item-icon:has(.ui-icon-video),
.library-item-icon:has(.ui-icon-play) {
    color: #6d4bd8;
    background: rgba(109, 75, 216, 0.10);
    border-color: rgba(109, 75, 216, 0.20);
}

.library-item-icon:has(.ui-icon-board),
.library-item-icon:has(.ui-icon-check) {
    color: #2d7a4f;
    background: rgba(45, 122, 79, 0.10);
    border-color: rgba(45, 122, 79, 0.20);
}

.library-item-icon:has(.ui-icon-file),
.library-item-icon:has(.ui-icon-pdf),
.library-item-icon:has(.ui-icon-download) {
    color: #c46a21;
    background: rgba(196, 106, 33, 0.11);
    border-color: rgba(196, 106, 33, 0.22);
}

.library-item-icon:has(.ui-icon-link) {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.10);
    border-color: rgba(15, 118, 110, 0.20);
}

.library-item-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.library-item-title {
    display: block;
    overflow-wrap: anywhere;
    color: var(--teacher-navy, #081b33);
    font-family: var(--font-heading);
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1.25;
}

.library-item-subtitle {
    color: var(--teacher-muted, #647084);
    font-weight: 650;
    line-height: 1.45;
}

.library-item-actions {
    gap: 8px;
    justify-content: flex-end;
}

.library-archive-button {
    border-color: rgba(185, 75, 59, 0.30);
    color: var(--teacher-danger, #b94b3b);
    background: rgba(185, 75, 59, 0.07);
}

.library-archive-button:hover {
    border-color: rgba(185, 75, 59, 0.50);
    color: var(--teacher-danger, #b94b3b);
    background: rgba(185, 75, 59, 0.12);
}

.teacher-library-preview {
    position: sticky;
    top: 18px;
}

.library-preview-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(171, 146, 107, 0.24);
    border-radius: 22px;
    background: rgba(255, 250, 240, 0.7);
}

.library-preview-card h3 {
    margin: 0;
    color: var(--teacher-navy, #081b33);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.25;
}

.library-preview-card p {
    margin: 0;
    color: var(--teacher-muted, #647084);
    line-height: 1.55;
}

.library-preview-blocks {
    display: grid;
    gap: 10px;
}

.library-preview-block {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 62px;
    padding: 10px;
    border: 1px solid rgba(171, 146, 107, 0.24);
    border-radius: 16px;
    background: rgba(255, 252, 246, 0.72);
}

.library-preview-block strong,
.library-preview-block em {
    display: block;
    font-style: normal;
}

.library-preview-block strong {
    color: var(--teacher-navy, #081b33);
    font-weight: 850;
}

.library-preview-block em {
    margin-top: 2px;
    color: var(--teacher-muted, #647084);
    font-weight: 700;
}

.library-preview-actions {
    display: grid;
    gap: 10px;
}

.library-preview-actions .button,
.library-preview-actions .ghost-button,
.library-preview-actions form {
    width: 100%;
}

.library-preview-actions .button,
.library-preview-actions .ghost-button {
    min-height: 54px;
}

.lesson-template-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
    gap: 18px;
    align-items: end;
}

.lesson-template-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.lesson-template-grid > .surface-card:first-child {
    grid-row: span 2;
}

.teacher-shell .lesson-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    margin: 18px 0 24px;
    border-bottom: 1px solid rgba(171, 146, 107, 0.24);
}

.teacher-shell .lesson-tab-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    color: var(--teacher-muted);
    font-weight: 800;
    text-decoration: none;
}

.teacher-shell .lesson-tab-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: transparent;
}

.teacher-shell .lesson-tab-link:hover {
    color: var(--teacher-navy);
}

.teacher-shell .lesson-tab-link.is-active {
    color: var(--teacher-gold-deep);
}

.teacher-shell .lesson-tab-link.is-active::after {
    background: var(--teacher-gold);
}

.teacher-shell .lesson-settings-link {
    justify-content: center;
    width: 38px;
    min-height: 38px;
    margin-left: auto;
    border: 1px solid rgba(171, 146, 107, 0.24);
    border-radius: 999px;
}

.teacher-shell .lesson-settings-link::after {
    display: none;
}

.teacher-shell .lesson-settings-link:hover,
.teacher-shell .lesson-settings-link.is-active {
    color: var(--teacher-navy);
    border-color: rgba(171, 146, 107, 0.42);
    background: rgba(255, 250, 240, 0.76);
}

.teacher-shell .lesson-tab-panel {
    scroll-margin-top: 28px;
}

.teacher-shell .lesson-workbench-card {
    display: grid;
    grid-template-columns: minmax(520px, 1fr) minmax(280px, auto);
    gap: 24px;
    align-items: end;
}

.teacher-shell .lesson-workbench-main {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.teacher-shell .lesson-workbench-title {
    max-width: 820px;
    margin: 0;
    color: var(--teacher-muted);
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.55;
}

.teacher-shell .lesson-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: min(820px, 100%);
}

.teacher-shell .lesson-stat-strip > div {
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 18px;
    background: rgba(255, 250, 240, 0.72);
}

.teacher-shell .lesson-stat-strip span {
    display: block;
    color: var(--teacher-muted);
    font-size: 0.88rem;
    font-weight: 750;
}

.teacher-shell .lesson-stat-strip strong {
    display: block;
    margin-top: 8px;
    color: var(--teacher-navy);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 650;
    line-height: 1;
}

.teacher-shell .lesson-prep-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: min(820px, 100%);
}

.teacher-shell .lesson-prep-summary-item {
    display: grid;
    gap: 8px;
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 18px;
    background: rgba(255, 250, 240, 0.72);
}

.teacher-shell .lesson-prep-summary-item span {
    color: var(--teacher-muted);
    font-size: 0.88rem;
    font-weight: 750;
}

.teacher-shell .lesson-prep-summary-item strong {
    color: var(--teacher-navy);
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 650;
    line-height: 1.05;
}

.teacher-shell .lesson-workbench-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 760px;
}

.teacher-shell .lesson-workbench-actions > form {
    display: contents;
}

.teacher-shell .lesson-conduct-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 92px;
    padding: 20px 24px;
    border-radius: 22px;
}

.teacher-shell .lesson-conduct-toolbar-main {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    align-items: center;
    min-width: 0;
}

.teacher-shell .lesson-conduct-toolbar .section-title {
    margin: 0;
    font-size: clamp(1.85rem, 2.2vw, 2.45rem);
}

.teacher-shell .lesson-conduct-toolbar .tag-row {
    margin: 0;
}

.student-shell .lesson-row-main {
    min-width: 0;
}

.student-shell .lesson-workbench-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, auto);
    gap: 24px;
    align-items: end;
}

.student-shell .lesson-workbench-main {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.student-shell .lesson-workbench-title {
    max-width: 760px;
    margin: 0;
    color: var(--eg-ink-soft);
    font-size: 1.02rem;
    font-weight: 750;
    line-height: 1.55;
}

.student-shell .lesson-stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    width: min(720px, 100%);
}

.student-shell .lesson-stat-strip > div {
    min-height: 78px;
    padding: 14px 16px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 18px;
    background: rgba(255, 250, 240, 0.72);
}

.student-shell .lesson-stat-strip span {
    display: block;
    color: var(--eg-ink-soft);
    font-size: 0.88rem;
    font-weight: 750;
}

.student-shell .lesson-stat-strip strong {
    display: block;
    margin-top: 8px;
    color: var(--eg-navy);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 650;
    line-height: 1;
}

.student-shell .lesson-workbench-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.teacher-shell .lesson-preparation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.teacher-shell .lesson-compact-task {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 18px;
    background: rgba(255, 250, 240, 0.72);
}

.teacher-shell .lesson-compact-task strong {
    color: var(--teacher-navy);
}

.teacher-shell .lesson-compact-task span {
    color: var(--teacher-muted);
    font-weight: 650;
}

.teacher-shell .lesson-homework-review-card {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.teacher-shell .lesson-homework-review-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
}

.teacher-shell .lesson-homework-review-head .tag-row {
    margin: 0 0 10px;
}

.teacher-shell .lesson-homework-review-head .section-title {
    margin: 0;
}

.teacher-shell .lesson-homework-review-actions {
    display: flex;
    justify-content: flex-end;
}

.teacher-shell .lesson-homework-review-actions > form {
    display: contents;
}

.teacher-shell .lesson-homework-send-button {
    min-width: 260px;
    justify-content: center;
}

.teacher-shell .lesson-homework-review-details {
    display: grid;
    gap: 12px;
}

.teacher-shell .lesson-homework-review-details > summary {
    width: fit-content;
    cursor: pointer;
    list-style: none;
}

.teacher-shell .lesson-homework-review-details > summary::-webkit-details-marker {
    display: none;
}

.teacher-shell .lesson-homework-details-close,
.teacher-shell .lesson-homework-review-details[open] .lesson-homework-details-open {
    display: none;
}

.teacher-shell .lesson-homework-review-details[open] .lesson-homework-details-close {
    display: inline;
}

.teacher-shell .lesson-homework-review-list {
    display: grid;
    overflow: hidden;
    border: 1px solid rgba(171, 146, 107, 0.26);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.68);
}

.teacher-shell .lesson-homework-review-row {
    display: grid;
    grid-template-columns: 58px 86px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-height: 76px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(171, 146, 107, 0.18);
}

.teacher-shell .lesson-homework-review-row:last-child {
    border-bottom: 0;
}

.teacher-shell .lesson-homework-review-number strong,
.teacher-shell .lesson-homework-review-exam span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 10px;
    color: var(--teacher-navy);
    background: rgba(255, 250, 240, 0.9);
    font-weight: 850;
}

.teacher-shell .lesson-homework-review-exam span {
    min-width: 56px;
    color: var(--teacher-gold-deep);
}

.teacher-shell .lesson-homework-review-condition {
    min-width: 0;
}

.teacher-shell .lesson-homework-review-condition .task-feed-content {
    margin: 0;
    overflow-wrap: anywhere;
}

.teacher-shell .lesson-homework-review-condition .task-feed-content :is(p, li) {
    margin-top: 0;
    margin-bottom: 4px;
}

.teacher-shell .lesson-homework-review-condition .task-feed-content img {
    width: auto;
    max-width: min(100%, 480px);
    height: auto;
}

.teacher-shell .lesson-homework-review-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-shell .lesson-student-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.teacher-shell .lesson-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 22px;
    align-items: start;
}

.teacher-shell .lesson-side {
    position: sticky;
    top: 110px;
}

.teacher-shell .lesson-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.teacher-shell .lesson-meta-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-shell .lesson-form-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.teacher-shell .lesson-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.teacher-shell .lesson-quick-grid > form,
.teacher-shell .lesson-result-actions > form {
    display: contents;
}

.teacher-shell .lesson-material-source-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0 22px;
    padding: 18px 20px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 253, 248, 0.9), rgba(248, 241, 230, 0.76));
}

.teacher-shell .lesson-material-source-panel .section-title-small {
    margin: 0;
}

.teacher-shell .lesson-material-source-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.teacher-shell .lesson-material-source-actions > form {
    display: contents;
}

.teacher-shell .lesson-template-material-add-panel .lesson-quick-forms {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.teacher-shell .lesson-quick-forms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.teacher-shell .lesson-mini-form {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
    border: 1px solid rgba(171, 146, 107, 0.26);
    border-radius: 18px;
    background: rgba(255, 252, 246, 0.74);
}

.teacher-shell .lesson-mini-form h3 {
    margin: 0;
    color: var(--teacher-navy);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 650;
    line-height: 1.05;
}

.teacher-shell .lesson-mini-form .inline-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
}

.teacher-shell .lesson-mini-form .form-row {
    min-width: 0;
}

.teacher-shell .lesson-mini-form textarea {
    min-height: 92px;
    resize: vertical;
}

.teacher-shell .lesson-mini-form .ghost-button {
    margin-top: auto;
}

.teacher-shell .lesson-weekday-row ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.teacher-shell .lesson-result-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(96px, 1fr));
    gap: 10px;
}

.teacher-shell .lesson-conduct-table {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(171, 146, 107, 0.28);
    border-radius: 24px;
    background: rgba(255, 250, 240, 0.62);
}

.teacher-shell .lesson-conduct-row {
    display: grid;
    grid-template-columns: 78px minmax(280px, 1.25fr) minmax(210px, 0.75fr) minmax(500px, 1.1fr);
    gap: 14px;
    align-items: center;
    min-height: 86px;
    padding: 12px 14px;
    border: 1px solid rgba(171, 146, 107, 0.26);
    border-radius: 18px;
    background: rgba(255, 253, 248, 0.74);
}

.teacher-shell .lesson-conduct-number {
    display: grid;
    gap: 6px;
}

.teacher-shell .lesson-conduct-number strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid rgba(171, 146, 107, 0.32);
    border-radius: 12px;
    color: var(--teacher-navy);
    background: rgba(255, 250, 240, 0.86);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 850;
}

.teacher-shell .lesson-conduct-number span {
    color: var(--teacher-muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.teacher-shell .lesson-conduct-condition {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.teacher-shell .lesson-conduct-condition .task-feed-content {
    max-height: 98px;
    margin: 0;
    overflow: hidden;
}

.teacher-shell .lesson-conduct-condition .task-feed-content :is(p, li) {
    margin-top: 0;
    margin-bottom: 6px;
}

.teacher-shell .lesson-conduct-condition .task-feed-content img {
    max-width: min(100%, 260px);
    max-height: 78px;
    object-fit: contain;
}

.teacher-shell .lesson-conduct-condition .tag-row,
.teacher-shell .lesson-conduct-access .tag-row {
    margin: 0;
}

.teacher-shell .lesson-source-context {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px 12px;
    border-left: 3px solid #b8614f;
    border-radius: 6px;
    background: #fff5f1;
}

.teacher-shell .lesson-source-context.is-missing {
    border-left-color: #c78d2d;
    background: #fff8e8;
}

.teacher-shell .lesson-source-context-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.teacher-shell .lesson-source-context-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    color: var(--teacher-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.teacher-shell .lesson-source-context-note {
    color: var(--teacher-navy);
    font-size: 0.9rem;
    line-height: 1.45;
}

.teacher-shell .lesson-source-context-answer {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 8px;
    align-items: baseline;
    font-size: 0.84rem;
}

.teacher-shell .lesson-source-context-answer span {
    color: var(--teacher-muted);
}

.teacher-shell .lesson-source-context-files {
    display: flex;
    gap: 6px;
    align-items: center;
}

.teacher-shell .lesson-source-file {
    display: grid;
    place-items: center;
    width: 58px;
    height: 46px;
    overflow: hidden;
    border: 1px solid rgba(171, 146, 107, 0.32);
    border-radius: 6px;
    background: #fff;
}

.teacher-shell .lesson-source-file img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-shell .lesson-source-file-kind,
.teacher-shell .lesson-source-file-more {
    color: var(--teacher-navy);
    font-size: 0.76rem;
    font-weight: 850;
}

.teacher-shell .lesson-source-context-open {
    white-space: nowrap;
}

.teacher-shell .lesson-source-context-files,
.teacher-shell .lesson-source-context-open {
    justify-self: start;
}

.teacher-shell .lesson-conduct-access {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.teacher-shell .lesson-conduct-access > .ghost-button {
    justify-self: start;
}

.teacher-shell .lesson-conduct-actions {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
    align-self: stretch;
    align-content: center;
}

.teacher-shell .lesson-conduct-actions .ghost-button[aria-pressed="true"] {
    font-weight: 850;
}

.teacher-shell .lesson-conduct-actions .ghost-button.is-success,
.teacher-shell .lesson-conduct-actions .ghost-button.is-success:hover {
    border-color: #9fc8aa;
    background: #dff0e4;
    color: var(--teacher-success);
}

.teacher-shell .lesson-conduct-actions .ghost-button.is-warning,
.teacher-shell .lesson-conduct-actions .ghost-button.is-warning:hover {
    border-color: #dab971;
    background: #fff0cf;
    color: var(--teacher-warning);
}

.teacher-shell .lesson-conduct-actions .ghost-button.is-danger,
.teacher-shell .lesson-conduct-actions .ghost-button.is-danger:hover {
    border-color: #d7a4a0;
    background: #fde3e1;
    color: var(--teacher-danger);
}

.teacher-shell .classwork-builder-card .list-row {
    align-items: flex-start;
}

.teacher-shell .classwork-card-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.teacher-shell .lesson-result-card {
    display: grid;
    gap: 18px;
}

.teacher-shell .lesson-result-card .list-row {
    align-items: flex-start;
}

.teacher-shell .lesson-answer-strip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-top: 2px;
    padding: 12px 14px;
    border: 1px solid rgba(111, 139, 114, 0.28);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(111, 139, 114, 0.14), rgba(255, 250, 240, 0.86));
}

.teacher-shell .lesson-answer-strip > span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(111, 139, 114, 0.24);
    border-radius: 999px;
    color: #48654e;
    background: rgba(237, 246, 237, 0.86);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teacher-shell .lesson-answer-value {
    min-width: 0;
    color: var(--teacher-navy);
    font-size: 1.04rem;
    font-weight: 850;
    line-height: 1.55;
}

.teacher-shell .lesson-answer-value p {
    margin: 0;
    color: inherit;
}

.teacher-shell .lesson-result-form {
    padding-top: 16px;
    border-top: 1px solid rgba(171, 146, 107, 0.24);
}

.teacher-shell .lesson-result-main-fields {
    grid-template-columns: minmax(180px, 1.3fr) minmax(100px, 0.5fr) minmax(160px, 0.7fr) minmax(220px, 1fr);
}

.teacher-shell .lesson-checkbox {
    width: max-content;
    max-width: 100%;
}

.teacher-shell .readiness-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(171, 146, 107, 0.22);
    color: var(--teacher-navy);
    line-height: 1.45;
}

.teacher-shell .readiness-row:last-child {
    border-bottom: 0;
}

@media (max-width: 1180px) {
    .teacher-library-shell {
        grid-template-columns: 1fr;
    }

    .teacher-library-preview {
        position: static;
    }

    .lesson-template-hero,
    .lesson-template-grid {
        grid-template-columns: 1fr;
    }

    .lesson-template-grid > .surface-card:first-child {
        grid-row: auto;
    }

    .library-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-shell .lesson-workbench-card,
    .teacher-shell .lesson-conduct-toolbar,
    .student-shell .lesson-workbench-card {
        grid-template-columns: 1fr;
    }

    .teacher-shell .lesson-table-head,
    .teacher-shell .student-table-head,
    .student-shell .lesson-table-head {
        display: none;
    }

    .teacher-shell .lesson-table-row,
    .teacher-shell .student-table-row,
    .teacher-shell .lesson-conduct-row,
    .student-shell .lesson-table-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .teacher-shell .lesson-conduct-actions {
        grid-column: 1 / -1;
    }

    .teacher-shell .lesson-source-context {
        grid-template-columns: 1fr;
    }

    .teacher-shell .lesson-source-context-open {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .student-shell .student-lesson-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-shell .lesson-workbench-actions,
    .student-shell .lesson-workbench-actions {
        justify-content: flex-start;
    }

    .teacher-shell .lesson-homework-review-head {
        grid-template-columns: minmax(0, 1fr) 230px;
        gap: 12px;
    }

    .teacher-shell .lesson-homework-send-button {
        min-width: 230px;
        padding-right: 16px;
        padding-left: 16px;
    }

    .teacher-shell .lesson-homework-review-row {
        grid-template-columns: 50px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .teacher-shell .lesson-layout {
        grid-template-columns: 1fr;
    }

    .teacher-shell .lesson-side {
        position: static;
    }

}

@media (max-width: 760px) {
    .library-context-strip,
    .library-context-main {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-context-main {
        gap: 6px;
    }

    .library-context-separator {
        display: none;
    }

    .library-context-strip .ghost-button {
        width: 100%;
        justify-content: center;
    }

    .teacher-shell .lesson-homework-review-head {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .teacher-shell .lesson-homework-review-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .teacher-shell .lesson-homework-send-button {
        min-width: 0;
        white-space: normal;
    }

    .library-filter-bar,
    .library-item-row,
    .library-item-pick,
    .library-preview-block {
        grid-template-columns: 1fr;
    }

    .library-item-actions,
    .library-item-actions form,
    .library-item-actions .button,
    .library-item-actions .ghost-button {
        width: 100%;
    }

    .library-item-actions {
        justify-content: stretch;
    }

    .library-heading-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .library-heading-row .split-actions,
    .library-heading-row .button,
    .library-heading-row form {
        width: 100%;
    }

    .teacher-shell .lesson-filter-bar,
    .teacher-shell .lesson-meta-grid,
    .teacher-shell .lesson-stat-strip,
    .teacher-shell .lesson-prep-summary,
    .student-shell .lesson-stat-strip,
    .teacher-shell .lesson-table-row,
    .teacher-shell .student-table-row,
    .teacher-shell .lesson-conduct-row,
    .student-shell .lesson-table-row,
    .student-shell .student-lesson-summary,
    .teacher-shell .lesson-preparation-grid,
    .teacher-shell .lesson-quick-forms,
    .teacher-shell .lesson-result-actions {
        grid-template-columns: 1fr;
    }

    .teacher-shell .lesson-source-context {
        grid-template-columns: 1fr;
    }

    .teacher-shell .lesson-source-context-files,
    .teacher-shell .lesson-source-context-open {
        justify-self: start;
    }

    .teacher-shell .lesson-homework-review-row {
        grid-template-columns: 50px minmax(0, 1fr);
    }

    .teacher-shell .lesson-homework-review-condition {
        grid-column: 1 / -1;
    }

    .lesson-table-row .split-actions,
    .student-table-row .split-actions {
        justify-content: flex-start;
    }

    .teacher-shell .lesson-homework-send-button,
    .teacher-shell .lesson-homework-review-footer .ghost-button {
        width: 100%;
    }

    .teacher-shell .lesson-tabs {
        gap: 18px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .teacher-shell .lesson-material-source-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-shell .lesson-material-source-actions {
        justify-content: stretch;
    }

    .teacher-shell .lesson-material-source-actions .button,
    .teacher-shell .lesson-material-source-actions .ghost-button {
        width: 100%;
    }

}
