/* Lab Bench global styles. Loaded on every page by layout() via stylesheet_link(). */

:root {
    --wtc-red: #BA0C2F;
    --wtc-red-dark: #76232F;
    --wtc-black: #000000;
    --wtc-white: #ffffff;
    --wtc-gray-10: #e6e6e6;
    --wtc-gray-30: #b3b3b3;
    --wtc-gray-55: #737373;
    --wtc-gray-85: #262626;
    --wtc-blue: #00587C;
    --wtc-green: #2E7D32;
    --bg: #f3f4f6;
    --card: #ffffff;
    --text: #000000;
    --muted: #595959;
    --border: #e2e4e8;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    --input-bg: #ffffff;
    --input-border: #d0d4db;
    --label: #262626;
    --header-text: #000000;
    --surface-muted: #f8f9fb;
    --save-status-bg: #ffffff;
    --flash-success-bg: #eef7ee;
    --flash-success-text: #1b5e20;
    --flash-error-bg: #fdecee;
    --flash-error-text: #76232F;
    --save-ok: #1b5e20;
    --link: #9a0926;
    --link-hover: #76232F;
    --status-saving: #004a66;
    --status-error: #9a0926;
    --focus-ring: #BA0C2F;
    --lab-table-header-bg: var(--wtc-gray-85);
    --lab-table-header-text: #fff;
    --btn-secondary-bg: var(--wtc-gray-85);
    --btn-secondary-hover: var(--wtc-black);
    --btn-secondary-border: transparent;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 999px;
}
[data-theme="dark"] {
    --bg: #121212;
    --card: #1e1e1e;
    --text: #f0f0f0;
    --muted: #c2c2c2;
    --border: #3a3a3a;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --input-bg: #2a2a2a;
    --input-border: #555555;
    --label: #f0f0f0;
    --header-text: #ffffff;
    --surface-muted: #252525;
    --save-status-bg: #1e1e1e;
    --flash-success-bg: #1a2e1a;
    --flash-success-text: #b9f6ca;
    --flash-error-bg: #2e1a1a;
    --flash-error-text: #E892A3;
    --save-ok: #b9f6ca;
    --link: #DE6B82;
    --link-hover: #EDA0AF;
    --status-saving: #6EB8D4;
    --status-error: #DE6B82;
    --focus-ring: #DE6B82;
    --lab-table-header-bg: #525252;
    --lab-table-header-text: #fff;
    /* Secondary buttons must clear dark cards/surfaces (#1e/#25). */
    --btn-secondary-bg: #5e5e5e;
    --btn-secondary-hover: #707070;
    --btn-secondary-border: #8a8a8a;
}
@supports (color: color-mix(in srgb, white, black)) {
    [data-theme="dark"] {
        --flash-error-text: color-mix(in srgb, var(--wtc-red) 58%, white);
        --link: color-mix(in srgb, var(--wtc-red) 68%, white);
        --link-hover: color-mix(in srgb, var(--wtc-red) 52%, white);
        --status-saving: color-mix(in srgb, var(--wtc-blue) 58%, white);
        --status-error: color-mix(in srgb, var(--wtc-red) 68%, white);
        --focus-ring: color-mix(in srgb, var(--wtc-red) 68%, white);
    }
}
* { box-sizing: border-box; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 100;
    background: var(--card);
    color: var(--text);
    border: 2px solid var(--focus-ring);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus {
    top: 12px;
}
body {
    margin: 0;
    font-family: Calibri, "Segoe UI", Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
h1, h2, h3, .brand-mark {
    font-family: Oswald, "Arial Narrow", sans-serif;
    font-weight: 200;
    letter-spacing: 0.02em;
    text-transform: none;
}
.brand-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--wtc-red) 0%, var(--wtc-red-dark) 100%);
}
.shell { max-width: min(1680px, calc(100vw - 32px)); margin: 0 auto; padding: 24px 18px; }
@media (max-width: 720px) {
    .shell {
        max-width: 100%;
        padding: 16px 12px 28px;
    }
    .card {
        padding: 18px 14px;
        border-radius: var(--radius-sm);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .card h2 { font-size: 1.45rem; }
    .card h3 { font-size: 1.15rem; }
    header h1 { font-size: 1.45rem; }
    header {
        margin-bottom: 18px;
        padding-bottom: 14px;
        gap: 12px;
    }
    .footer-note {
        font-size: 0.82rem;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }
}
.test-bar {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    background: var(--wtc-gray-85); color: #fff; padding: 10px 16px; font-size: 14px;
}
.test-bar form { margin: 0; }
header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; margin-bottom: 28px; padding-bottom: 18px;
    border-bottom: 2px solid var(--wtc-red);
}
header h1 { margin: 0; font-size: 30px; color: var(--header-text); }
header h1 a { color: inherit; text-decoration: none; }
/* Logo: one image per theme; the hidden one is display:none so screen readers only announce one. */
header h1.brand { line-height: 0; }
/* Block + fit-content so max-width: 100% can shrink the logo on narrow screens. */
.brand-link {
    display: block;
    width: fit-content;
    max-width: 100%;
}
.brand-logo {
    display: block;
    width: 523px;
    max-width: 100%;
    height: auto;
}
.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: block; }
.brand-link:focus-visible { outline-offset: 4px; }
/* Wide screens: the logo gives up width before the nav buttons wrap to a second row. */
@media (min-width: 1060px) {
    header h1.brand { min-width: 0; }
    header .header-account { flex-shrink: 0; }
}
.header-account {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 0;
}
.header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    min-width: 0;
    max-width: min(100%, 22rem);
}
.header-user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.header-user-email {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.user-pill {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    font-size: 14px;
}
@media (max-width: 720px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }
    .header-account {
        align-items: flex-start;
    }
    .header-user {
        align-items: flex-start;
        text-align: left;
        max-width: none;
    }
    .user-pill {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        justify-content: stretch;
    }
    .user-pill .btn {
        width: 100%;
        min-width: 0;
        text-align: center;
        justify-content: center;
        white-space: normal;
        min-height: 2.35rem;
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}
#theme-toggle { white-space: nowrap; }
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.card:last-child { margin-bottom: 0; }
.card h2, .card h3 {
    margin: 0 0 12px;
    font-family: Oswald, sans-serif;
    font-weight: 200;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.card h2 { font-size: 1.75rem; text-transform: none; }
.card h3 { font-size: 1.25rem; font-weight: 200; text-transform: none; }
.card > p.muted { margin: 0; line-height: 1.55; }
.card > a.btn:first-child { margin-bottom: 12px; }
.card > h3 + table { margin-top: 4px; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.grid > .card { margin-bottom: 0; }
form { margin: 0; }
.form-stack label:not(:first-child):not(.section-meeting-day-option):not(.section-online-option) { margin-top: 16px; }
.form-stack .section-meeting-days { margin-top: 16px; }
.form-stack .btn { margin-top: 18px; }
.class-term-fields label { display: block; margin-top: 16px; }
.class-term-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.class-term-selects select { flex: 1 1 140px; min-width: 0; }
.class-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.class-action-form { margin: 0; display: inline; }
.class-archived-note { font-size: 0.88rem; margin-top: 4px; }
.class-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 8px;
}
.class-list-term-heading {
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.class-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.class-list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}
.class-list-item-main {
    flex: 1 1 14rem;
    min-width: 0;
}
.class-list-item-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    line-height: 1.35;
}
.class-list-item-name {
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}
.class-list-item-labs {
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
.class-prep-quicklook {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    text-decoration: none;
    color: inherit;
    flex: 1 1 100%;
}
@media (min-width: 721px) {
    .class-prep-quicklook {
        flex: 0 1 auto;
        margin-left: 4px;
    }
}
.class-prep-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px 2px 5px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-muted, #f8f9fb);
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    line-height: 1.2;
    color: var(--muted);
}
.class-prep-chip-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}
.class-prep-chip-letter { font-weight: 700; }
.class-prep-chip--warn {
    color: #BA0C2F;
    border-color: rgba(186, 12, 47, 0.35);
}
.class-prep-chip--ok {
    color: #1a7f37;
    border-color: rgba(26, 127, 55, 0.35);
}
.class-prep-chip--muted {
    color: var(--muted);
    opacity: 0.85;
}
.class-prep-quicklook:hover .class-prep-chip,
.class-prep-quicklook:focus-visible .class-prep-chip {
    border-color: currentColor;
}
.class-list-actions {
    flex: 1 1 12rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    gap: 6px;
    align-items: stretch;
    max-width: 28rem;
}
.class-list-actions .class-action-form { display: block; margin: 0; }
.class-list-actions .class-action-form .btn,
.class-list-actions > .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}
@media (max-width: 720px) {
    .class-list-item {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
    }
    .class-list-item-main {
        flex: 1 1 auto;
        width: 100%;
    }
    .class-list-actions {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 360px) {
    .class-list-actions {
        grid-template-columns: 1fr;
    }
}
.class-go-status {
    margin-top: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
}
.class-go-status--active {
    color: var(--wtc-green, #2e7d32);
}
.class-go-status--inactive {
    color: var(--muted);
    font-weight: 600;
}
[data-theme="dark"] .class-go-status--active {
    color: #7dcea0;
}
.class-page-header .class-go-status {
    margin-top: 4px;
}
.class-access-meta {
    margin-top: 6px;
    font-size: 0.9rem;
    line-height: 1.45;
}
.class-access-owner {
    font-weight: 600;
    font-size: 0.88rem;
}
.class-shared-with { margin-top: 4px; }
.class-shared-with .muted { font-size: 0.88rem; }
.class-shared-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wtc-blue);
}
[data-theme="dark"] .class-shared-badge { color: #6EB8D4; }
.class-share-list { margin: 16px 0 0; padding: 0; list-style: none; }
.class-share-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.class-share-list li:last-child { border-bottom: 0; }
.class-share-list .muted { font-size: 0.92rem; }
.share-email-combobox { position: relative; }
.share-email-suggestions {
    position: absolute;
    z-index: 20;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    max-height: 280px;
    overflow: auto;
}
.share-email-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 2px;
}
.share-email-option:last-child { border-bottom: 0; }
.share-email-option[aria-selected="true"],
.share-email-option:hover {
    background: color-mix(in srgb, var(--wtc-blue) 10%, var(--card));
}
.share-email-option strong {
    font-size: 0.98rem;
    color: var(--text);
}
.share-email-option-email {
    font-size: 0.92rem;
    color: var(--muted);
}
.share-email-option-meta {
    font-size: 0.82rem;
    color: var(--muted);
}
.share-email-hint { margin-top: 8px; font-size: 0.92rem; }
.create-class-panel > summary,
.create-lab-panel > summary,
.archived-classes-panel > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--link);
    user-select: none;
}
.create-class-panel > summary:hover,
.create-lab-panel > summary:hover,
.archived-classes-panel > summary:hover { color: var(--link-hover); }
.create-class-panel .form-stack,
.create-lab-panel .form-stack { margin-top: 14px; }
.class-add-labs-card .create-lab-panel + .create-lab-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.archived-classes-panel {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.archived-classes-panel .class-list { margin-top: 14px; }
.class-archived-banner {
    border-left: 4px solid var(--wtc-gray-55);
    background: var(--surface-muted);
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
}
.class-archived-banner p { margin: 0; }
.class-archived-banner .class-actions { margin-top: 10px; }
.admin-header-card h2 { margin-top: 12px; }
.admin-master-note { margin-top: 10px; }
.admin-section {
    margin: 8px 0 28px;
}
.admin-section-heading {
    margin: 0 0 4px;
    font-family: Oswald, sans-serif;
    font-size: 1.35rem;
    font-weight: 200;
    letter-spacing: 0.01em;
}
.admin-section-hint {
    margin: 0 0 12px;
    font-size: 0.95rem;
}
.admin-section-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.admin-section-body > .card {
    margin: 0;
}
.admin-subsection-title {
    margin: 18px 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
}
.admin-subsection-title:first-child {
    margin-top: 0;
}
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.admin-stats-grid > div {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--surface-muted);
}
.admin-stats-grid strong {
    display: block;
    font-family: Oswald, sans-serif;
    font-weight: 200;
    font-size: 1.35rem;
}
.admin-stats-grid span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.92rem;
}
.admin-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}
.admin-inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.admin-inline-form input { flex: 1 1 240px; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.admin-table th, .admin-table td {
    border-bottom: 1px solid var(--border);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}
.admin-summary-list { margin: 0; padding-left: 18px; }
.admin-summary-list li + li { margin-top: 4px; }
.admin-add-admin-form { margin-top: 16px; }
.admin-orphan-panel { scroll-margin-top: 20px; }
.admin-collapsible { scroll-margin-top: 20px; }
.admin-collapsible > summary {
    cursor: pointer;
    font-family: Oswald, sans-serif;
    font-size: 1.15rem;
    font-weight: 200;
    color: var(--text);
    user-select: none;
    list-style: none;
}
.admin-collapsible > summary::-webkit-details-marker { display: none; }
.admin-collapsible > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    color: var(--link);
    transition: transform 0.15s ease;
}
.admin-collapsible[open] > summary::before { transform: rotate(90deg); }
.admin-collapsible > summary:hover { color: var(--link); }
.admin-collapsible-body { margin-top: 14px; }
.admin-collapsible-body > h3:first-child { margin-top: 0; }
.class-page-collapsible > summary {
    cursor: pointer;
    font-family: Oswald, sans-serif;
    font-size: 1.15rem;
    font-weight: 200;
    color: var(--text);
    user-select: none;
    list-style: none;
}
.class-page-collapsible > summary::-webkit-details-marker { display: none; }
.class-page-collapsible > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    color: var(--link);
    transition: transform 0.15s ease;
}
.class-page-collapsible[open] > summary::before { transform: rotate(90deg); }
.class-page-collapsible > summary:hover { color: var(--link); }
.class-page-collapsible-body { margin-top: 14px; }
.class-lab-card.class-page-collapsible {
    padding: 0;
    overflow: visible;
}
.class-tools-panel {
    margin-top: 14px;
}
.class-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.class-downloads-panel > .class-page-collapsible-body > div + div {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.class-downloads-panel h3 {
    margin-top: 0;
}
.class-lab-card.class-page-collapsible > summary.class-lab-card-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 8px;
    row-gap: 4px;
    padding: 16px 20px;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}
.class-lab-card.class-page-collapsible > summary.class-lab-card-summary::before {
    grid-row: 1 / span 2;
    align-self: start;
    margin-right: 0;
    margin-top: 0.15em;
    line-height: 1.2;
}
.class-lab-card-summary-text {
    grid-column: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.class-lab-card-summary-title {
    font-family: Oswald, sans-serif;
    font-size: 1.3rem;
    font-weight: 200;
    line-height: 1.2;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}
.class-lab-card-summary-actions {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
    max-width: min(100%, 22rem);
}
.class-lab-card-summary-actions .btn {
    font-weight: 500;
    font-size: 0.78rem;
    padding: 0.22rem 0.5rem;
    line-height: 1.2;
    min-height: 0;
}
@media (max-width: 720px) {
    .class-lab-card.class-page-collapsible > summary.class-lab-card-summary {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .class-lab-card-summary-actions {
        grid-column: 2;
        grid-row: auto;
        justify-content: flex-start;
        max-width: none;
        margin-top: 0.2rem;
    }
}
.lab-notes-status-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin-left: 0.1rem;
}
.lab-notes-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--muted);
    border-radius: 3px;
    text-decoration: none;
    flex: 0 0 auto;
}
.lab-notes-status-icon:hover,
.lab-notes-status-icon:focus-visible {
    color: var(--link);
    outline: none;
    background: color-mix(in srgb, var(--link) 12%, transparent);
}
.lab-notes-status-icon svg {
    width: 0.95rem;
    height: 0.95rem;
    display: block;
}
.lab-notes-status-icon--lab {
    color: color-mix(in srgb, var(--text) 55%, #1565c0 45%);
}
.lab-notes-status-icon--agenda {
    color: color-mix(in srgb, var(--text) 45%, #2e7d32 55%);
}
.class-lab-card-summary-meta {
    font-size: 0.95rem;
    line-height: 1.45;
    font-weight: 400;
}
.class-lab-card.class-page-collapsible > .class-page-collapsible-body {
    padding: 0 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.class-lab-card.class-page-collapsible .class-lab-sections {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.class-sections-card > summary,
.class-info-sheet-panel > summary,
.class-tutors-card > summary {
    font-size: 1.25rem;
}
.class-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}
.class-setup-grid > .card {
    margin-bottom: 0;
}
.class-setup-grid > :only-child {
    grid-column: 1 / -1;
}
@media (max-width: 960px) {
    .class-setup-grid {
        grid-template-columns: 1fr;
    }
}
.class-sections-card .class-section-panel > summary,
.class-sections-card .class-section-add-panel > summary,
.class-tutors-card .class-tutor-panel > summary,
.class-tutors-card .class-tutor-add-panel > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    user-select: none;
    list-style: none;
}
.class-sections-card .class-section-panel > summary::-webkit-details-marker,
.class-sections-card .class-section-add-panel > summary::-webkit-details-marker,
.class-tutors-card .class-tutor-panel > summary::-webkit-details-marker,
.class-tutors-card .class-tutor-add-panel > summary::-webkit-details-marker { display: none; }
.class-sections-card .class-section-panel > summary::before,
.class-sections-card .class-section-add-panel > summary::before,
.class-tutors-card .class-tutor-panel > summary::before,
.class-tutors-card .class-tutor-add-panel > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 8px;
    color: var(--link);
    transition: transform 0.15s ease;
}
.class-sections-card .class-section-panel[open] > summary::before,
.class-sections-card .class-section-add-panel[open] > summary::before,
.class-tutors-card .class-tutor-panel[open] > summary::before,
.class-tutors-card .class-tutor-add-panel[open] > summary::before { transform: rotate(90deg); }
.class-sections-card .class-section-panel > summary:hover,
.class-sections-card .class-section-add-panel > summary:hover,
.class-tutors-card .class-tutor-panel > summary:hover,
.class-tutors-card .class-tutor-add-panel > summary:hover { color: var(--link); }
.admin-orphan-summary { margin: 0 0 12px; }
.admin-orphan-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.admin-orphan-toolbar--bottom { margin-top: 12px; margin-bottom: 0; }
.admin-orphan-select-all {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}
.admin-orphan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
.admin-orphan-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    background: var(--surface-muted);
}
.admin-orphan-item:hover { border-color: var(--link); }
.admin-orphan-item-head {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 8px;
    cursor: pointer;
}
.admin-orphan-filename {
    font-size: 0.84rem;
    line-height: 1.3;
    word-break: break-all;
}
.admin-orphan-preview {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}
[data-theme="dark"] .admin-orphan-preview { background: #111; }
.admin-orphan-preview img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: contain;
}
.admin-orphan-preview--file {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 88px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: var(--surface-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}
.admin-orphan-meta {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.35;
}
.admin-orphan-meta > div + div { margin-top: 3px; }
.admin-orphan-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
}
.admin-orphan-badge--grace {
    background: #fef3c7;
    color: #92400e;
}
.admin-orphan-badge--ready {
    background: #dcfce7;
    color: #166534;
}
[data-theme="dark"] .admin-orphan-badge--grace {
    background: #78350f;
    color: #fde68a;
}
[data-theme="dark"] .admin-orphan-badge--ready {
    background: #14532d;
    color: #bbf7d0;
}
.class-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.class-page-header-title {
    margin-bottom: 6px;
}
.class-page-header-title h2,
.class-page-header h2 { margin: 0; }
.class-page-header p { margin: 0; }
.class-labs-card-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 4px;
}
.class-labs-card-heading h3 { margin: 0; }
.class-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.edit-class-go-warning {
    margin: 8px 0 0;
    padding: 10px 12px;
    border: 1px solid rgba(186, 12, 47, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(186, 12, 47, 0.06);
    color: inherit;
    font-size: 0.92rem;
    line-height: 1.4;
}
.lab-schedule-lab h3 {
    margin: 0 0 14px;
}
.lab-schedule-rows {
    display: grid;
    gap: 12px;
}
.lab-schedule-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin: 0 0 14px;
}
.lab-schedule-fill-status {
    font-size: 0.92rem;
}
.lab-schedule-agenda-hint {
    font-size: 0.85rem;
}
.lab-schedule-row {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}
.lab-schedule-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
}
.lab-schedule-status {
    font-size: 0.92rem;
}
.lab-schedule-fields {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
.lab-schedule-fields label {
    margin-bottom: 4px;
}
.lab-schedule-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.lab-schedule-actions.sticky-save {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.class-clone-summary { margin: 0 0 4px; }
label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--label); }
input[type=text], input[type=number], input[type=datetime-local], input[type=date], input[type=time], textarea, select {
    width: 100%; padding: 11px 13px; border: 1px solid var(--input-border);
    border-radius: var(--radius-sm); font: inherit; background: var(--input-bg); color: var(--text);
    box-sizing: border-box;
}
input[type=date], input[type=time], input[type=datetime-local], .themed-date-input {
    accent-color: var(--link);
    padding-right: 2.75rem;
    min-height: 2.75rem;
    color-scheme: light;
}
[data-theme="dark"] input[type=date],
[data-theme="dark"] input[type=time],
[data-theme="dark"] input[type=datetime-local],
[data-theme="dark"] .themed-date-input {
    color-scheme: dark;
}
input[type=date]::-webkit-datetime-edit,
input[type=time]::-webkit-datetime-edit,
input[type=datetime-local]::-webkit-datetime-edit,
input[type=date]::-webkit-datetime-edit-fields-wrapper,
input[type=time]::-webkit-datetime-edit-fields-wrapper,
input[type=datetime-local]::-webkit-datetime-edit-fields-wrapper {
    color: var(--text);
}
input[type=date]::-webkit-calendar-picker-indicator,
input[type=time]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0;
    padding: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.125rem 1.125rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
input[type=time]::-webkit-calendar-picker-indicator,
input[type=datetime-local]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
}
[data-theme="dark"] input[type=date]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
[data-theme="dark"] input[type=time]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type=datetime-local]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 14'/%3E%3C/svg%3E");
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
a:focus-visible, .btn:focus-visible, button:focus-visible, label:focus-visible, .save-status.can-retry:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
a { color: var(--link); }
a:hover { color: var(--link-hover); }
textarea { min-height: 120px; resize: vertical; }
textarea.code-field { font-family: Consolas, "Courier New", monospace; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    min-height: 2.5rem;
    padding: 11px 18px;
    background: var(--wtc-red);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-transform: capitalize;
}
/* Keep markdown/shell token labels literal in the lab editor toolbar. */
.btn[data-insert^="code_"],
.btn[data-insert^="shell_"] {
    text-transform: none;
}
a.btn,
a.btn:visited,
a.btn:hover,
a.btn:active,
a.btn:focus {
    color: #fff;
    text-decoration: none;
}
.btn:hover { background: var(--wtc-red-dark); color: #fff; }
.btn-secondary {
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    color: #fff;
}
.btn-secondary:hover {
    background: var(--btn-secondary-hover);
    border-color: var(--btn-secondary-border);
    color: #fff;
}
.btn-danger { background: var(--wtc-red-dark); color: #fff; }
.btn-danger:hover { background: var(--wtc-red); color: #fff; }
.btn-small {
    min-height: 2.5rem;
    padding: 11px 18px;
    font-size: 15px;
}
.muted { color: var(--muted); }
.badge {
    display: inline-block; padding: 5px 11px; border-radius: var(--radius-pill);
    font-size: 12px; font-weight: 700; background: var(--wtc-gray-85); color: #fff;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.badge.open { background: var(--wtc-green); }
.badge.closed { background: var(--wtc-red); }
.badge.scheduled { background: var(--wtc-blue); }
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--wtc-red);
    font-family: Oswald, sans-serif;
    font-weight: 200; text-transform: none; letter-spacing: 0.03em;
}
td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.link-box {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    background: var(--surface-muted); border: 1px dashed var(--input-border); padding: 14px; border-radius: var(--radius-sm);
}
.link-box input { flex: 1; min-width: 220px; }
.go-share-box {
    background: var(--surface-muted);
    border: 1px dashed var(--input-border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin: 0;
}
.go-share-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.go-share-label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--label);
    white-space: nowrap;
    flex: 0 0 auto;
}
.go-share-input,
input.go-share-input {
    flex: 1 1 160px;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 6px 8px;
    min-height: 2rem;
    height: 2rem;
    font-family: "Source Code Pro", ui-monospace, monospace;
    font-size: 0.82rem;
    line-height: 1.3;
    background: var(--input-bg);
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    box-sizing: border-box;
}
.go-share-row .btn {
    flex: 0 0 auto;
    margin: 0;
    min-height: 2rem;
    padding: 6px 12px;
    font-size: 0.85rem;
}
.go-share-hint {
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
}
.class-labs-card > h3 { margin-top: 0; }
.class-labs-intro { margin: 0 0 4px; }
.class-lab-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.class-lab-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.class-lab-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.class-lab-card-intro { min-width: min(100%, 280px); flex: 1 1 280px; }
.class-lab-card-title {
    margin: 0 0 6px;
    font-family: Oswald, sans-serif;
    font-size: 1.3rem;
    font-weight: 200;
    text-transform: none;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.class-lab-card-title a { color: inherit; text-decoration: none; }
.class-lab-card-title a:hover { color: var(--link); text-decoration: underline; }
.class-lab-card-meta { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.class-lab-card-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
@media (max-width: 720px) {
    .class-lab-card-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .class-lab-card-toolbar > .btn {
        width: 100%;
    }
    .class-lab-card-toolbar > .editor-menu {
        grid-column: 1 / -1;
    }
    .class-lab-card-toolbar > .editor-menu .editor-menu-toggle {
        width: 100%;
    }
}
.class-lab-more-menu .editor-menu-panel {
    min-width: 14rem;
    z-index: 30;
}
.class-lab-more-delete {
    display: block;
    width: 100%;
    margin: 0;
}
.class-lab-inline-form { margin: 0; display: inline; }
a.editor-menu-item {
    text-decoration: none;
    color: inherit;
}
.editor-menu-item--danger {
    color: var(--danger, #b71c1c);
}
.editor-menu-item--danger:hover,
.editor-menu-item--danger:focus-visible {
    background: color-mix(in srgb, var(--danger, #b71c1c) 12%, transparent);
}
.submission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.class-lab-sections {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.class-lab-section-row {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.class-lab-section-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}
.class-lab-section-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    flex: 0 1 auto;
}
.class-lab-section-row-top .badge {
    flex: 0 0 auto;
}
.class-lab-section-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 0;
    margin-left: auto;
}
@media (max-width: 720px) {
    .link-box input { min-width: 0; }
    .grid { grid-template-columns: 1fr; }
    .class-page-header {
        flex-direction: column;
        align-items: stretch;
    }
    .class-settings-actions,
    .class-labs-card-heading,
    .class-tools-actions {
        width: 100%;
    }
    .class-tools-actions .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
    .class-lab-section-row-top {
        flex-direction: column;
        align-items: stretch;
    }
    .class-lab-section-toolbar {
        margin-left: 0;
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .class-lab-section-toolbar .btn,
    .class-lab-section-toolbar .class-action-form,
    .class-lab-section-toolbar .class-action-form .btn {
        width: 100%;
        margin: 0;
    }
    .go-share-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
        align-items: center;
    }
    .go-share-label {
        grid-column: 1 / -1;
        white-space: normal;
    }
    .go-share-input,
    input.go-share-input {
        grid-column: 1;
        width: 100%;
        flex: none;
        min-width: 0;
    }
    .go-share-row .btn {
        width: auto;
        min-width: 0;
        padding: 6px 10px;
    }
    .class-lab-section-link.go-share-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
    .test-bar {
        gap: 8px;
    }
    .test-bar .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 8px);
        justify-content: center;
    }
}
@media (max-width: 420px) {
    .test-bar .btn {
        min-width: 100%;
    }
}
.class-lab-section-link {
    min-width: 0;
}
.class-lab-section-link .go-share-input {
    flex: 1 1 140px;
}
.class-sections-card .class-section-panel,
.class-sections-card .class-section-add-panel,
.class-tutors-card .class-tutor-panel,
.class-tutors-card .class-tutor-add-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
}
.class-sections-card .class-section-panel + .class-section-panel,
.class-sections-card .class-section-add-panel,
.class-tutors-card .class-tutor-panel + .class-tutor-panel,
.class-tutors-card .class-tutor-add-panel {
    margin-top: 10px;
}
.class-section-form,
.class-section-add-panel form,
.class-tutor-panel form,
.class-tutor-add-panel form {
    margin-top: 12px;
}
.tutor-section-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 6px 0 0;
    padding-left: 1.5rem;
}
.tutor-assignment-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}
.tutor-assignment-fieldset legend {
    font-weight: 600;
    margin-bottom: 4px;
}
.tutor-assignment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.tutor-assignment-class {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
}
.tutor-assignment-class-label {
    display: block;
    font-weight: 600;
}
.admin-tutor-panel,
.admin-tutor-add-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
    margin-top: 10px;
}
.admin-tutor-panel > summary,
.admin-tutor-add-panel > summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}
.admin-tutor-panel > summary::-webkit-details-marker,
.admin-tutor-add-panel > summary::-webkit-details-marker { display: none; }
.admin-tutor-panel form,
.admin-tutor-add-panel form {
    margin-top: 12px;
}
.tutor-assigned-list {
    margin: 0;
    padding-left: 1.25rem;
}
.tutor-public-card {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.tutor-public-card:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.tutor-public-card h3 {
    margin: 0 0 0.35em;
}
.tutor-public-notes {
    margin: 0.5em 0;
    white-space: pre-wrap;
}
.class-section-time-row,
.class-section-date-row,
.class-info-section-links .class-lab-link-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.section-meeting-days {
    border: 0;
    padding: 0;
    margin: 0;
}
.section-online-option {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 16px 0 0;
    font-weight: 600;
}
.section-online-option .section-online-input {
    margin: 0;
}
.lab-study-guide-option {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
}
.lab-study-guide-option input {
    margin: 0;
}
.class-section-form:has(.section-online-input:checked) .section-meeting-schedule,
.class-section-add-panel form:has(.section-online-input:checked) .section-meeting-schedule {
    display: none;
}
.section-meeting-days-legend {
    grid-column: 1 / -1;
    display: block;
    font-weight: 700;
    margin: 0;
    color: var(--label);
    padding: 0;
}
.section-meeting-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: 2.25rem;
    gap: 8px;
    align-items: center;
}
label.section-meeting-day-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.25rem;
    min-height: 2.25rem;
    max-height: 2.25rem;
    padding: 0;
    margin: 0;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    line-height: 1;
    user-select: none;
    overflow: hidden;
}
label.section-meeting-day-option .section-meeting-day-label {
    display: block;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}
label.section-meeting-day-option:has(input:checked) {
    border-color: var(--link);
    background: color-mix(in srgb, var(--link) 12%, var(--input-bg));
    color: var(--link);
}
label.section-meeting-day-option .section-meeting-day-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
}
@media (max-width: 640px) {
    .section-meeting-days-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.class-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.student-archive-download {
    margin: 0 0 12px;
}
.student-archive-download .muted {
    font-size: 0.88rem;
}
.student-archive-download-list .student-archive-download {
    margin-bottom: 0;
}
.student-archive-download-item-title {
    font-weight: 700;
    margin-bottom: 6px;
}
.student-course-tips-card .btn,
.page-tips-card .btn { margin-top: 4px; }
.course-tips-highlight {
    position: fixed;
    z-index: 81;
    border: 2px solid var(--wtc-red);
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    box-sizing: border-box;
}
.course-tips-callout {
    position: fixed;
    z-index: 82;
    max-width: calc(100vw - 24px);
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow);
    box-sizing: border-box;
}
.course-tips-counter {
    margin: 0 0 4px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.course-tips-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: var(--header-text);
}
.course-tips-body {
    margin: 0 0 14px;
    line-height: 1.45;
}
.course-tips-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.course-tips-actions .btn { margin: 0; }
@media (max-width: 720px) {
    .course-tips-callout {
        left: 12px !important;
        right: 12px;
        width: auto !important;
        max-width: none;
    }
    .course-tips-actions {
        justify-content: stretch;
    }
    .course-tips-actions .btn {
        flex: 1 1 auto;
        min-width: calc(33% - 8px);
        justify-content: center;
    }
}
.class-archive-setting {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
}
.class-archive-setting label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    font-weight: 600;
}
.seating-create-primary-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: flex-end;
    max-width: 36rem;
}
.seating-create-primary-fields .seating-field {
    flex: 1 1 9rem;
    min-width: 8rem;
    margin: 0;
}
.seating-create-primary-fields .seating-field--wide {
    flex: 1.5 1 14rem;
}
.seating-create-primary-fields .seating-select,
.seating-create-primary-fields input {
    width: 100%;
    min-width: 0;
}
.seating-create-settings,
.form-stack .seating-create-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: flex-end;
    max-width: 36rem;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}
.seating-create-settings .seating-field {
    flex: 1 1 9rem;
    min-width: 8rem;
    max-width: 12rem;
    margin: 0;
}
.seating-create-settings .seating-grid-size-fields--inline {
    flex: 0 0 auto;
}
.seating-grid-size-fields {
    margin-top: 0;
}
.seating-grid-size-legend {
    margin: 0 0 8px;
    font-weight: 700;
    color: var(--label);
}
.seating-grid-size-format {
    font-weight: 400;
    color: var(--muted);
}
.seating-grid-size-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}
.seating-grid-size-times {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--muted);
}
.seating-grid-size-times label {
    display: none;
}
.seating-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--label);
}
.seating-editor-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: flex-end;
    flex: 1 1 360px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}
.seating-editor-settings .seating-field {
    flex: 1 1 150px;
    min-width: 130px;
    max-width: 220px;
    margin: 0;
}
.seating-editor-settings .seating-field--wide {
    flex: 1.4 1 220px;
    max-width: 280px;
}
.seating-editor-settings .seating-select {
    width: 100%;
    min-width: 0;
}
.seating-grid-size-fields--inline {
    margin-top: 0;
    flex: 0 0 auto;
}
.seating-grid-size-fields--inline .seating-grid-size-legend {
    display: block;
    margin-bottom: 8px;
}
.seating-grid-size-fields--inline .seating-grid-size-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.seating-grid-size-fields--inline input[type="number"] {
    width: 4.5rem;
    min-width: 4.5rem;
    text-align: center;
    padding: 8px 6px;
}
.seating-grid-size-fields--inline .seating-grid-size-times {
    padding-bottom: 0;
    font-size: 1.1rem;
    line-height: 1;
}
.seating-editor-toolbar .seating-field {
    min-width: 120px;
}
.seating-editor-toolbar-fields .seating-grid-size-fields {
    grid-column: 1 / -1;
}
.seating-editor-toolbar,
.seating-page-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}
.seating-page-toolbar-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    flex: 1 1 auto;
}
.seating-page-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.seating-page-toolbar .seating-field label {
    display: block;
    margin: 0 0 4px;
    font-size: 0.85rem;
}
.seating-page-toolbar .seating-select {
    display: block;
    min-height: 2.5rem;
}
.seating-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    align-self: flex-end;
    margin-left: auto;
}
.seating-editor-workspace,
.seating-page-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
    align-items: stretch;
    min-height: 520px;
}
.seating-page-body {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}
.seating-grid-wrap {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 70vh;
}
.seating-grid-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 480px;
}
.seating-room-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    padding: 6px 0;
}
.seating-room-label--front {
    margin-bottom: 8px;
}
.seating-room-label--back {
    margin-top: 8px;
}
.seating-grid {
    display: grid;
    gap: 8px;
    min-height: 420px;
}
.seating-grid--layout {
    gap: 6px;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 420px;
}
.seating-editor-card .seating-grid,
.seating-page-card .seating-grid {
    gap: 6px;
}
.seating-grid-empty {
    grid-column: 1 / -1;
    padding: 24px;
}
.seating-cell {
    min-height: 88px;
    border: 1px dashed var(--input-border);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--input-bg) 70%, transparent);
    padding: 4px;
}
.seating-editor-card .seating-cell,
.seating-page-card .seating-cell {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 0;
    height: 100%;
    padding: 4px;
    overflow: hidden;
}
.seating-cell--over {
    border-color: var(--link);
    background: color-mix(in srgb, var(--link) 8%, var(--input-bg));
}
.seating-desk {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 80px;
    padding: 8px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    text-align: center;
    cursor: grab;
    user-select: none;
}
.seating-editor-card .seating-desk,
.seating-page-card .seating-desk {
    width: 100%;
    height: 100%;
    max-width: none;
    min-height: 0;
    min-width: 0;
    flex: 1 1 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 5px 4px;
    font-size: 0.72rem;
    gap: 3px;
    overflow: hidden;
    box-sizing: border-box;
}
.seating-page-card .seating-desk--occupied {
    width: 100%;
    min-width: 0;
    max-width: none;
    justify-content: flex-start;
}
.seating-desk-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--muted);
    line-height: 1.15;
    word-break: break-word;
    flex: 0 0 auto;
}
.seating-desk--instructor {
    border-color: var(--wtc-blue);
    background: color-mix(in srgb, var(--wtc-blue) 12%, var(--input-bg));
}
.seating-side-panel {
    display: flex;
    flex-direction: column;
}
.seating-side-panel-help {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.45;
}
.seating-palette-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.seating-side-panel .seating-desk--palette,
.seating-palette-items .seating-desk--palette,
.seating-editor-card .seating-side-panel .seating-desk--palette {
    width: auto;
    height: auto;
    min-height: 0;
    max-width: 9rem;
    flex: 0 0 auto;
    padding: 10px 14px;
    margin-top: 0;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.seating-desk--palette {
    min-height: auto;
}
.seating-desk--palette .seating-desk-label {
    font-size: 0.72rem;
}
.seating-desk--selected {
    outline: 2px solid var(--focus-ring);
    outline-offset: 1px;
}
.seating-desk--dragging,
.seating-student-card--dragging {
    opacity: 0.55;
}
.seating-desk--occupied {
    border-color: var(--wtc-green);
    background: color-mix(in srgb, var(--wtc-green) 10%, var(--input-bg));
}
.seating-desk--over {
    outline: 2px solid var(--link);
    outline-offset: 1px;
}
.seating-desk-student {
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    word-break: break-word;
}
.seating-desk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    margin-top: 2px;
    justify-content: center;
    width: 100%;
}
.seating-desk-action,
.seating-text-action {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--link);
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}
.seating-desk-action:hover,
.seating-text-action:hover {
    color: var(--link-hover);
}
.seating-desk-action--danger,
.seating-text-action--danger {
    color: var(--wtc-red, #b71c1c);
}
.seating-desk-action--danger:hover,
.seating-text-action--danger:hover {
    color: color-mix(in srgb, var(--wtc-red, #b71c1c) 80%, #000);
}
.seating-desk-empty {
    font-size: 0.72rem;
    color: var(--muted);
}
.seating-student-card .seating-roster-remove-btn,
.seating-student-card .seating-text-action {
    flex-shrink: 0;
    align-self: center;
}
.seating-side-panel,
.seating-roster-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    padding: 14px;
    min-width: 0;
}
.seating-side-panel h3,
.seating-roster-panel h3 {
    margin: 0 0 10px;
    font-size: 1rem;
}
.seating-add-student {
    margin: 0 0 12px;
}
.seating-add-student > summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 8px;
}
.seating-add-student-form {
    margin: 0 0 4px;
    gap: 8px;
}
.seating-add-student-form label {
    margin: 0;
    font-size: 0.85rem;
}
.seating-add-student-form input {
    margin: 0;
}
.seating-student-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 560px;
    overflow: auto;
}
.seating-student-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    cursor: grab;
    min-width: 0;
}
.seating-student-card-main {
    min-width: 0;
    flex: 1 1 auto;
}
.seating-student-name {
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}
.seating-student-meta,
.seating-student-desk {
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 2px;
    overflow-wrap: anywhere;
}
.seating-select {
    min-width: 160px;
    max-width: 100%;
}
.seating-upload-label {
    cursor: pointer;
    margin: 0;
    display: inline-flex;
    align-items: center;
}
@media (max-width: 960px) {
    .seating-editor-workspace,
    .seating-page-body {
        grid-template-columns: 1fr;
    }
}
.class-lab-schedule-hint {
    margin: 0 0 8px;
    font-size: 0.9rem;
}
.class-lab-card-share label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.class-lab-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.class-lab-link-row input,
.class-lab-link-row input[type=text] {
    flex: 1 1 12rem;
    min-width: 0;
    width: auto;
    padding: 6px 8px;
    min-height: 2rem;
    height: 2rem;
    font-family: "Source Code Pro", monospace;
    font-size: 0.82rem;
    line-height: 1.3;
    background: var(--input-bg);
    box-sizing: border-box;
}
.class-lab-link-row .btn {
    flex: 0 0 auto;
    margin: 0;
    min-height: 2rem;
    padding: 6px 12px;
    font-size: 0.85rem;
}
@media (max-width: 720px) {
    .class-lab-link-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
        align-items: center;
    }
    .class-lab-link-row input,
    .class-lab-link-row input[type=text] {
        grid-column: 1;
        width: 100%;
        flex: none;
    }
}
.class-lab-schedule {
    border-top: none;
    padding-top: 0;
    margin: 0;
}
.class-lab-schedule summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--link);
    user-select: none;
    list-style: none;
}
.class-lab-schedule summary::-webkit-details-marker { display: none; }
.class-lab-schedule summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 4px;
    transition: transform 0.15s ease;
}
.class-lab-schedule[open] > summary::before { transform: rotate(90deg); }
.class-lab-schedule summary:hover { color: var(--link-hover); }
.class-lab-schedule-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 8px;
    align-items: end;
}
.class-lab-schedule-form label { margin-bottom: 4px; font-size: 0.9rem; }
.class-lab-schedule-form .schedule-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.class-lab-pre-notes {
    border-top: 1px solid var(--border);
    padding-top: 12px;
    margin-top: 4px;
}
.class-lab-pre-notes summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--link);
    user-select: none;
}
.class-lab-pre-notes summary:hover { color: var(--link-hover); }
.class-lab-pre-notes-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}
.class-lab-pre-notes-editor {
    width: 100%;
}
.lab-pre-notes-panel > summary,
.student-archived-questions-panel > summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--link);
    user-select: none;
}
.lab-pre-notes-panel > summary:hover,
.student-archived-questions-panel > summary:hover { color: var(--link-hover); }
.lab-pre-notes-body {
    margin-top: 14px;
}
.lab-pre-notes-drawer {
    margin: 4px 0 12px;
}
.lab-pre-notes-drawer > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    user-select: none;
}
.lab-pre-notes-drawer > summary::-webkit-details-marker { display: none; }
.lab-pre-notes-drawer-panel {
    margin-top: 12px;
}
.lab-pre-notes-drawer-hint {
    margin: 0;
}
.lab-pre-notes-refresh {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--wtc-blue) 35%, var(--border));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--wtc-blue) 10%, var(--card));
}
.lab-pre-notes-refresh[hidden] {
    display: none !important;
}
.lab-pre-notes-refresh p {
    margin: 0;
}
.lab-pre-notes-fallback-toggle {
    margin: 0 0 10px;
}
.student-archived-questions-panel {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.student-archived-questions-panel #student-instructor-questions-archived {
    margin-top: 14px;
}
.question-block { margin-top: 18px; margin-bottom: 16px; }
.question-block + .lab-content { margin-top: 4px; }
.question-prompt { margin-bottom: 10px; }
.question-prompt-text > :first-child { margin-top: 0; }
.question-prompt-text > :last-child { margin-bottom: 0; }
.lab-step { margin: 0.75em 0; }
.answer-box {
    border: 1px solid var(--input-border); border-radius: var(--radius-sm); background: var(--input-bg);
    padding: 0; overflow: hidden; margin-bottom: 4px;
}
.answer-box:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.answer-box.answer-box--text-only .answer-image,
.answer-box.answer-box--text-only .answer-image-tools,
.answer-box.answer-box--text-only .paste-zone {
    display: none !important;
}
.answer-box textarea {
    width: 100%; min-height: 160px; border: 0; border-radius: 0;
    padding: 12px; resize: vertical; font: inherit; background: transparent; color: var(--text);
}
.answer-box textarea.answer-input--compact,
.answer-box-preview textarea.answer-input--compact {
    min-height: 44px;
    height: auto;
    resize: none;
    overflow: hidden;
    field-sizing: content;
}
.answer-box textarea:focus { outline: none; }
.answer-box .answer-image { padding: 0 12px 12px; }
.answer-box .answer-image-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0 12px 12px;
}
.answer-box .answer-image-tools .btn { margin: 0; cursor: pointer; }
.answer-box.is-dragover {
    outline: 2px dashed var(--wtc-green);
    outline-offset: 2px;
    background: color-mix(in srgb, var(--wtc-green) 8%, var(--input-bg));
}
.answer-box.is-dragover .answer-input { pointer-events: none; }
.answer-box .answer-image img {
    max-width: 100%; max-height: 320px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); display: block;
}
.answer-box .answer-image.empty { display: none; }
.answer-box.answer-box-preview .answer-image.empty,
.answer-box-preview .answer-image.empty { display: block; }
.answer-box .preview-actions { margin-top: 8px; }
.answer-box.readonly .answer-text {
    padding: 12px; min-height: 48px; white-space: pre-wrap; word-break: break-word;
}
.answer-box.readonly .answer-text.empty { color: var(--muted); font-style: italic; }
.lab-closed-notice {
    border-left: 4px solid var(--wtc-gray-55);
    padding: 12px 16px;
    background: var(--surface-muted);
}
.lab-closed-notice h3 { margin: 0 0 8px; font-family: Oswald, sans-serif;
    font-weight: 200; }
.lab-closed-notice p { margin: 0; }
.lab-closed-notice p + p { margin-top: 10px; }
.lab-closed-schedule { font-size: 1.05rem; }
.lab-closed-prompt {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.45);
}
.lab-closed-prompt[hidden] { display: none !important; }
.lab-closed-prompt-dialog {
    width: min(440px, 100%);
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 22px 22px 18px;
}
.lab-closed-prompt-dialog h3 {
    margin: 0 0 10px;
    font-family: Oswald, sans-serif;
    font-weight: 200;
}
.lab-closed-prompt-dialog p { margin: 0 0 16px; line-height: 1.45; }
.lab-closed-prompt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
body.lab-closed-prompt-open { overflow: hidden; }
.download-section { border-left: 4px solid var(--wtc-red); }
.lab-backup-panel { border-left: 4px solid var(--border); }
.lab-backup-panel.is-urgent {
    border-left-color: var(--wtc-red);
    box-shadow: var(--shadow);
    background: color-mix(in srgb, var(--status-error) 6%, var(--card));
}
.lab-backup-urgent-banner {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--status-error) 14%, var(--card));
    border: 1px solid color-mix(in srgb, var(--status-error) 45%, var(--border));
    color: var(--text);
    line-height: 1.45;
}
.lab-backup-urgent-banner strong { color: var(--status-error); }
.lab-save-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--wtc-red);
    color: #fff;
    padding: 14px 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
.lab-save-alert[hidden] { display: none !important; }
.lab-save-alert-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}
.lab-save-alert-copy { flex: 1 1 240px; min-width: 0; }
.lab-save-alert-title {
    display: block;
    font-family: Oswald, sans-serif;
    font-size: 1.15rem;
    font-weight: 200;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}
.lab-save-alert-message {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    opacity: 0.95;
}
.lab-save-alert-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.lab-save-alert .btn {
    background: #fff;
    color: var(--wtc-red);
    border-color: #fff;
    font-weight: 700;
}
.lab-save-alert .btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.75);
}
.lab-save-alert .btn:hover { filter: brightness(0.96); }
body.lab-has-save-error .brand-bar { box-shadow: 0 0 0 3px var(--wtc-red); }
body.lab-has-save-error .shell { scroll-padding-top: 88px; }
.question-block.save-failed {
    padding: 12px;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--status-error) 7%, var(--card));
    box-shadow: inset 0 0 0 2px var(--status-error);
}
.question-block.save-failed .answer-box {
    border-color: var(--status-error);
}
.backup-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.restore-backup-label { cursor: pointer; margin: 0; }
.answer-hint { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.35; }
.answer-box .answer-hint,
.answer-box-preview .answer-hint {
    padding: 4px 12px 6px;
    border-top: 1px solid var(--input-border);
}
.save-status {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    padding: 10px 16px; margin-bottom: 0; font-size: 14px; text-align: center;
    background: var(--save-status-bg); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.2s ease;
    pointer-events: none;
}
.save-status.is-visible { transform: translateY(0); }
.save-status.can-retry { cursor: pointer; pointer-events: auto; }
body:has(#save-status.is-visible) .shell { padding-bottom: 56px; }
body.lab-has-save-error:has(#save-status.is-visible) .shell { padding-bottom: 64px; }
.save-status.saving { border-top-color: var(--status-saving); color: var(--status-saving); }
.save-status.saved { border-top-color: var(--save-ok); color: var(--save-ok); }
.save-status.error {
    border-top: none;
    background: var(--status-error);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    padding: 14px 16px;
    box-shadow: 0 -8px 28px rgba(154, 9, 38, 0.4);
}
.save-status.error.can-retry { text-decoration: underline; text-underline-offset: 3px; }
.student-lab-header { margin-bottom: 4px; }
.student-lab-header .lab-class-name { font-size: 14px; margin-bottom: 6px; }
.student-lab-header .lab-title {
    font-family: Oswald, sans-serif; font-size: 1.75rem; font-weight: 200;
    line-height: 1.2; margin: 0 0 0.75rem; color: var(--text);
}
.lab-open-schedule {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
    font-size: 14px;
    margin: -0.35rem 0 0.75rem;
}
.lab-open-schedule-dates { display: inline; }
.lab-open-schedule-updated { margin-left: auto; }
.lab-open-schedule strong { color: var(--text); font-weight: 600; }
.student-lab-header + .lab-content { margin-top: 0; }
.student-lab-header + .lab-content > :first-child { margin-top: 0; }
.ai-policy {
    display: grid;
    grid-template-columns: 8px 1fr;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 0 0 1.1rem;
    background: var(--surface-muted, #fafbfc);
}
.ai-policy__stripe { min-height: 100%; }
.ai-policy__body { padding: 0.85rem 1rem; }
.ai-policy__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.35rem;
}
.ai-policy__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.95rem;
}
.ai-policy__dot {
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.ai-policy__message {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
}
.ai-policy__allowed {
    margin: 0.65rem 0 0;
    padding: 0.55rem 0.7rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--card, #fff) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    font-size: 0.95rem;
}
.ai-policy__allowed strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.2rem;
}
.ai-policy--open {
    background: color-mix(in srgb, #1b8a3e 10%, var(--card, #fff));
    border-color: color-mix(in srgb, #1b8a3e 35%, var(--border));
}
.ai-policy--open .ai-policy__stripe,
.ai-policy--open .ai-policy__dot { background: #1b8a3e; }
.ai-policy--open .ai-policy__badge { color: #145c2a; }
.ai-policy--limited {
    background: color-mix(in srgb, #c47f00 11%, var(--card, #fff));
    border-color: color-mix(in srgb, #c47f00 40%, var(--border));
}
.ai-policy--limited .ai-policy__stripe,
.ai-policy--limited .ai-policy__dot { background: #c47f00; }
.ai-policy--limited .ai-policy__badge { color: #8a5900; }
.ai-policy--prohibited {
    background: color-mix(in srgb, #9a0926 9%, var(--card, #fff));
    border-color: color-mix(in srgb, #9a0926 35%, var(--border));
}
.ai-policy--prohibited .ai-policy__stripe,
.ai-policy--prohibited .ai-policy__dot { background: #9a0926; }
.ai-policy--prohibited .ai-policy__badge { color: #7a071e; }
[data-theme="dark"] .ai-policy--open .ai-policy__badge { color: #7dcea0; }
[data-theme="dark"] .ai-policy--limited .ai-policy__badge { color: #f0c674; }
[data-theme="dark"] .ai-policy--prohibited .ai-policy__badge { color: #f5a9b8; }
.lab-ai-usage-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.35rem 0 0.5rem;
}
.lab-ai-usage-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    background: var(--surface-muted);
    font-weight: 600;
    font-size: 0.92rem;
}
.lab-ai-usage-options input { margin: 0; }
.lab-ai-usage-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.lab-ai-usage-dot--open { background: #1b8a3e; }
.lab-ai-usage-dot--limited { background: #c47f00; }
.lab-ai-usage-dot--prohibited { background: #9a0926; }
.lab-ai-usage-allowed[hidden] { display: none !important; }
/* Lab AI policy acceptance gate (shown before the lab when the student hasn't accepted the current policy). */
.lab-ai-gate-intro { margin: 0; font-weight: 600; }
.lab-ai-gate .ai-policy { margin: 0; }
.lab-ai-gate-form {
    display: grid;
    gap: 0.9rem;
}
.lab-ai-gate-statement {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--wtc-red);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    line-height: 1.5;
}
.lab-ai-gate-accept {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}
.lab-ai-gate-accept input {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.15rem 0 0;
}
/* AI usage disclosure card (AI-Open / AI-Limited labs) */
.lab-ai-disclosure { border-left: 4px solid var(--wtc-blue); }
.lab-ai-disclosure.is-complete { border-left-color: var(--save-ok); }
.lab-ai-disclosure-closed {
    margin: 0;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--status-error) 10%, var(--card));
    border: 1px solid color-mix(in srgb, var(--status-error) 40%, var(--border));
}
.lab-ai-disclosure-prompt { margin: 0; font-weight: 600; }
.lab-ai-disclosure-answer textarea { min-height: 6rem; }
.lab-ai-disclosure-count { margin: 0.35rem 0 0; font-size: 0.9rem; }
.lab-ai-disclosure-noai {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin: 0;
    font-weight: 600;
    cursor: pointer;
}
.lab-ai-disclosure-noai input {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0.15rem 0 0;
}
.lab-ai-disclosure-status { margin: 0; font-size: 0.92rem; color: var(--muted); }
.lab-ai-disclosure.is-complete .lab-ai-disclosure-status { color: var(--save-ok); font-weight: 600; }
.btn.is-disabled,
.btn.is-disabled:hover {
    background: var(--wtc-gray-55);
    border-color: transparent;
    cursor: not-allowed;
    opacity: 0.75;
}
.lab-ai-download-hint { margin: 0.35rem 0 0; font-size: 0.9rem; }
/* AI usage policy forms (My AI policy page, Edit class) */
.ai-policy-settings {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem 1rem;
    margin: 1rem 0 0;
}
.ai-policy-settings legend { font-weight: 700; padding: 0 0.35rem; }
.ai-policy-fields { display: grid; gap: 0.25rem; margin-top: 0.5rem; }
.ai-policy-fields[hidden] { display: none !important; }
.ai-policy-level {
    margin: 0.5rem 0 0.25rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}
.ai-policy-level h4 {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.4rem;
}
.ai-policy-level label { margin-top: 0.4rem; }
.lab-ai-status { font-weight: 600; white-space: nowrap; }
.lab-ai-status--ok { color: var(--save-ok); }
.lab-ai-status--earlier { color: var(--status-saving); }
.lab-ai-status--missing { color: var(--status-error); }
.flash { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; border-left: 4px solid; }
.flash.success { background: var(--flash-success-bg); border-color: var(--save-ok); color: var(--flash-success-text); }
.flash.error { background: var(--flash-error-bg); border-color: var(--wtc-red); color: var(--flash-error-text); }
.stack > * + * { margin-top: 12px; }
.footer-note { font-size: 13px; color: var(--muted); margin-top: 24px; }
.lab-content { font-size: 1.125rem; line-height: 1.65; }
.lab-content h2, .lab-content h3, .lab-content h4 { font-family: Oswald, sans-serif;
    font-weight: 200; margin: 1em 0 0.5em; }
.lab-content h2[id] { scroll-margin-top: 72px; }
html { scroll-behavior: smooth; }
.lab-content p { margin: 0.75em 0; }
.lab-content ul, .lab-content ol { margin: 0.75em 0; padding-left: 1.5em; }
.lab-content li { margin: 0.35em 0; }
.lab-content li > ul, .lab-content li > ol { margin: 0.35em 0; }
.lab-content .lab-answer-slot {
    margin: 0;
    padding: 0;
    border: 0;
}
.lab-content .lab-answer-slot > .question-block:first-child {
    margin-top: 18px;
}
.lab-content li.lab-list-item--with-answer > .question-block--embedded {
    display: block;
    margin-top: 0.45em;
    margin-bottom: 0.35em;
}
.lab-content .question-block--embedded {
    margin: 0.45em 0 0.65em;
}
.lab-content .question-block--embedded .answer-box {
    margin-top: 0;
}
.lab-content .question-block--embedded .answer-hint {
    display: none;
}
.lab-content ol:not([type]) { list-style-type: decimal; }
.lab-content ol:not([type]) ol:not([type]) { list-style-type: lower-alpha; }
.lab-content ol:not([type]) ol:not([type]) ol:not([type]) { list-style-type: lower-roman; }
.lab-content ol:not([type]) ol:not([type]) ol:not([type]) ol:not([type]) { list-style-type: upper-alpha; }
.lab-content ol:not([type]) ol:not([type]) ol:not([type]) ol:not([type]) ol:not([type]) { list-style-type: upper-roman; }
.lab-content table.lab-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.95em;
}
.lab-content table.lab-table.lab-table--sized {
    table-layout: fixed;
    max-width: 100%;
}
.lab-content table.lab-table.lab-table--sized-pct {
    width: 100%;
}
.lab-content table.lab-table.lab-table--sized-px {
    width: max-content;
    max-width: 100%;
}
.lab-content table.lab-table.lab-table--sized th,
.lab-content table.lab-table.lab-table--sized td {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.lab-content table.lab-table.lab-table--sized col {
    min-width: 0;
}
.lab-content table.lab-table th,
.lab-content table.lab-table td {
    border: 1px solid var(--border);
    padding: 0.55em 0.75em;
    vertical-align: top;
}
.lab-content table.lab-table th {
    background: var(--lab-table-header-bg);
    color: var(--lab-table-header-text);
    font-family: inherit;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    text-align: center;
}
.lab-content table.lab-table th[scope="row"] {
    text-align: left;
}
.lab-content table.lab-table th a {
    color: var(--lab-table-header-text);
}
.lab-content .table-scroll {
    overflow-x: auto;
    margin: 1em 0;
    max-width: 100%;
}
.lab-content .table-scroll.table-scroll--centered {
    display: flex;
    justify-content: center;
}
.lab-content .table-scroll table.lab-table {
    margin: 0;
}
.lab-content table.lab-table.lab-table--centered:not([style*="width"]) {
    width: max-content;
    max-width: 100%;
}
.lab-content .lab-inline-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    margin: 0 0.12em;
    vertical-align: -0.18em;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.lab-content .lab-inline-icon--waffle {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='9.75' y='3' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='16.5' y='3' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='3' y='9.75' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='9.75' y='9.75' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='16.5' y='9.75' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='3' y='16.5' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='9.75' y='16.5' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='16.5' y='16.5' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='9.75' y='3' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='16.5' y='3' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='3' y='9.75' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='9.75' y='9.75' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='16.5' y='9.75' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='3' y='16.5' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='9.75' y='16.5' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3Crect x='16.5' y='16.5' width='4.5' height='4.5' rx='1' fill='%23000'/%3E%3C/svg%3E");
}
.lab-content .lab-inline-icon--arrow {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h12' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M13 6l6 6-6 6' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h12' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M13 6l6 6-6 6' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.lab-content mark.lab-code-mark,
.lab-content .lab-code-mark {
    background: #ffe566;
    color: inherit;
    padding: 0.05em 0.15em;
    border-radius: 2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
[data-theme="dark"] .lab-content mark.lab-code-mark,
[data-theme="dark"] .lab-content .lab-code-mark {
    background: #8a6d00;
    color: #fff8d6;
}
.lab-content ul.lab-link-list {
    list-style: none;
    padding-left: 1.5em;
    margin: 0.75em 0;
}
.lab-content ul.lab-link-list li { margin: 0.35em 0; }
.lab-content code { background: var(--surface-muted); padding: 0; border-radius: var(--radius-sm); font-family: "Source Code Pro", monospace; font-weight: 600; }
.lab-content pre { background: var(--surface-muted); padding: 12px; overflow: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.lab-content pre code { background: transparent; padding: 0; font-family: "Source Code Pro", monospace; font-size: 1em; font-weight: 600; }
[data-theme="light"] .lab-content pre {
    background: #f6f8fa;
    border-color: #c9d1d9;
    color: #24292f;
}
[data-theme="light"] .lab-content pre code { color: inherit; }
.lab-content pre code.hljs { display: block; overflow-x: auto; padding: 0; white-space: pre; }
.lab-content pre:has(> code.hljs) { padding: 0; border: 0; background: transparent; }
.lab-content pre:has(> code.hljs) code.hljs {
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 1em;
    font-weight: 600;
    line-height: 1.55;
}
.lab-content pre code.shell-prompted { display: block; white-space: pre; }
.lab-content pre code.shell-prompted .code-line {
    display: block;
    white-space: pre;
    margin: 0;
}
.lab-content pre code.shell-prompted.hljs .code-text.hljs {
    display: inline;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}
[data-theme="light"] .lab-content pre code.hljs,
[data-theme="light"] .lab-content pre code.hljs .code-text.hljs {
    color: #24292f;
    background: #f6f8fa;
}
[data-theme="light"] .lab-content pre:has(> code.hljs) code.hljs {
    line-height: 1.6;
}
[data-theme="dark"] .lab-content pre code.hljs,
[data-theme="dark"] .lab-content pre code.hljs .code-text.hljs {
    color: #e6edf3;
    background: #161b22;
}
[data-theme="light"] .lab-content .hljs-keyword,
[data-theme="light"] .lab-content .hljs-selector-tag,
[data-theme="light"] .lab-content .hljs-literal,
[data-theme="light"] .lab-content .hljs-section,
[data-theme="light"] .lab-content .hljs-link { color: #d73a49; }
[data-theme="light"] .lab-content .hljs-string,
[data-theme="light"] .lab-content .hljs-title,
[data-theme="light"] .lab-content .hljs-name,
[data-theme="light"] .lab-content .hljs-type,
[data-theme="light"] .lab-content .hljs-attribute,
[data-theme="light"] .lab-content .hljs-number,
[data-theme="light"] .lab-content .hljs-quote,
[data-theme="light"] .lab-content .hljs-template-tag,
[data-theme="light"] .lab-content .hljs-deletion,
[data-theme="light"] .lab-content .hljs-meta .hljs-keyword { color: #0550ae; }
[data-theme="light"] .lab-content .hljs-built_in,
[data-theme="light"] .lab-content .hljs-symbol,
[data-theme="light"] .lab-content .hljs-bullet { color: #953800; }
[data-theme="light"] .lab-content .hljs-comment,
[data-theme="light"] .lab-content .hljs-code,
[data-theme="light"] .lab-content .hljs-formula { color: #57606a; }
[data-theme="dark"] .lab-content .hljs-keyword,
[data-theme="dark"] .lab-content .hljs-selector-tag,
[data-theme="dark"] .lab-content .hljs-literal,
[data-theme="dark"] .lab-content .hljs-section,
[data-theme="dark"] .lab-content .hljs-link { color: #ff7b72; }
[data-theme="dark"] .lab-content .hljs-string,
[data-theme="dark"] .lab-content .hljs-title,
[data-theme="dark"] .lab-content .hljs-name,
[data-theme="dark"] .lab-content .hljs-type,
[data-theme="dark"] .lab-content .hljs-attribute,
[data-theme="dark"] .lab-content .hljs-number,
[data-theme="dark"] .lab-content .hljs-quote,
[data-theme="dark"] .lab-content .hljs-template-tag,
[data-theme="dark"] .lab-content .hljs-deletion,
[data-theme="dark"] .lab-content .hljs-meta .hljs-keyword { color: #a5d6ff; }
[data-theme="dark"] .lab-content .hljs-built_in,
[data-theme="dark"] .lab-content .hljs-symbol,
[data-theme="dark"] .lab-content .hljs-bullet { color: #ffa657; }
[data-theme="dark"] .lab-content .hljs-comment,
[data-theme="dark"] .lab-content .hljs-code,
[data-theme="dark"] .lab-content .hljs-formula { color: #8b949e; }
.lab-content .code-prompt {
    user-select: none;
    -webkit-user-select: none;
    color: var(--muted);
    font-weight: 600;
}
.lab-content pre code:not(.hljs) { white-space: pre-wrap; }
.lab-content blockquote:not(.lab-note) {
    margin: 0.75em 0; padding: 12px 14px; border-left: 3px solid var(--border);
    background: var(--surface-muted); color: var(--text);
}
.lab-content .lab-note {
    margin: 1.1em 0;
    padding: 14px 16px 14px 18px;
    border: 1px solid #93c5fd;
    border-left: 5px solid #2563eb;
    border-radius: var(--radius-sm);
    background: #eff6ff;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.lab-content .lab-note > :first-child { margin-top: 0; }
.lab-content .lab-note > :last-child { margin-bottom: 0; }
.lab-content .lab-note p,
.lab-content .lab-note-text { margin: 0.45em 0; display: block; }
.lab-content .lab-note-text:first-child,
.lab-content .lab-note-label + .lab-note-text { margin-top: 0; }
.lab-content .lab-note-text:last-child { margin-bottom: 0; }
.lab-content .lab-note-label {
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 0.55em;
    color: #1d4ed8;
}
.lab-content .lab-note--tip {
    border-color: #86efac;
    border-left-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
}
.lab-content .lab-note--tip .lab-note-label { color: #15803d; }
.lab-content .lab-note--warning,
.lab-content .lab-note--caution {
    border-color: #fcd34d;
    border-left-color: #d97706;
    background: #fffbeb;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.08);
}
.lab-content .lab-note--warning .lab-note-label,
.lab-content .lab-note--caution .lab-note-label { color: #b45309; }
.lab-content .lab-note--important {
    border-color: #fca5a5;
    border-left-color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}
.lab-content .lab-note--important .lab-note-label { color: #b91c1c; }
[data-theme="dark"] .lab-content .lab-note {
    border-color: #3b82f6;
    border-left-color: #60a5fa;
    background: #172554;
    color: #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
[data-theme="dark"] .lab-content .lab-note-label { color: #93c5fd; }
[data-theme="dark"] .lab-content .lab-note--tip {
    border-color: #22c55e;
    border-left-color: #4ade80;
    background: #14532d;
}
[data-theme="dark"] .lab-content .lab-note--tip .lab-note-label { color: #86efac; }
[data-theme="dark"] .lab-content .lab-note--warning,
[data-theme="dark"] .lab-content .lab-note--caution {
    border-color: #f59e0b;
    border-left-color: #fbbf24;
    background: #451a03;
}
[data-theme="dark"] .lab-content .lab-note--warning .lab-note-label,
[data-theme="dark"] .lab-content .lab-note--caution .lab-note-label { color: #fcd34d; }
[data-theme="dark"] .lab-content .lab-note--important {
    border-color: #ef4444;
    border-left-color: #f87171;
    background: #450a0a;
}
[data-theme="dark"] .lab-content .lab-note--important .lab-note-label { color: #fca5a5; }

/* Guide-style lab reading (Neatnik-inspired). Roll back: LAB_GUIDE_STYLE_ENABLED=false in .env */
.lab-content--guide {
    font-size: 1.15rem;
    line-height: 1.7;
    --lab-section-indent: 2.75rem;
}
.lab-content--guide .lab-section-heading,
.lab-content--guide h2[id]:has(+ .lab-section-body) {
    margin-bottom: 0.5em;
}
.lab-content--guide .lab-section-body {
    padding-left: var(--lab-section-indent);
    margin: 0 0 1.35em;
}
.question-block--in-section {
    padding-left: 2.75rem;
}
/* Slots live inside .lab-section-body, which already indents; avoid double indent. */
.lab-content .lab-section-body .question-block--in-section {
    padding-left: 0;
}
.question-example {
    margin: 0.75em 0 1em;
    padding: 0.75em 0.95em;
    border: 1px solid color-mix(in srgb, #1565c0 28%, var(--border));
    border-left: 4px solid #1565c0;
    background: color-mix(in srgb, #1565c0 7%, var(--surface-muted, rgba(0, 0, 0, 0.03)));
    border-radius: 0 var(--radius-md, 6px) var(--radius-md, 6px) 0;
}
.question-example--expected {
    border-color: color-mix(in srgb, #6a1b9a 28%, var(--border));
    border-left-color: #6a1b9a;
    background: color-mix(in srgb, #6a1b9a 7%, var(--surface-muted, rgba(0, 0, 0, 0.03)));
}
.question-example-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #1565c0;
    margin: 0 0 0.45em;
}
.question-example--expected .question-example-label {
    color: #6a1b9a;
}
.question-example-body {
    margin: 0;
}
.question-example-body > :first-child { margin-top: 0; }
.question-example-body > :last-child { margin-bottom: 0; }
[data-theme="dark"] .question-example {
    border-color: #5b8fc7;
    border-left-color: #7eb6ea;
    background: #1a2430;
}
[data-theme="dark"] .question-example--expected {
    border-color: #9b7bb8;
    border-left-color: #c9a0e8;
    background: #241a2c;
}
[data-theme="dark"] .question-example-label {
    color: #9ec9f5;
}
[data-theme="dark"] .question-example--expected .question-example-label {
    color: #d7b8f5;
}
.answer-box {
    /* Keep answer boxes visually distinct from example callouts */
    border: 1px solid var(--border);
    background: var(--card, var(--surface));
}
.answer-box--with-expected {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.answer-expected-section {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid color-mix(in srgb, #6a1b9a 28%, var(--border));
    background: color-mix(in srgb, #6a1b9a 6%, transparent);
}
.answer-expected-label {
    padding: 0.55rem 0.75rem 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6a1b9a;
}
.answer-expected-body {
    padding: 0.25rem 0.75rem 0.7rem;
    margin: 0;
    min-height: 1.5rem;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.45;
}
.answer-expected-body.lab-content {
    white-space: normal;
    font-family: inherit;
    font-size: inherit;
}
.answer-expected-body > :first-child { margin-top: 0; }
.answer-expected-body > :last-child { margin-bottom: 0; }
[data-theme="dark"] .answer-expected-section {
    border-bottom-color: #9b7bb8;
    background: rgba(155, 123, 184, 0.12);
}
[data-theme="dark"] .answer-expected-label {
    color: #d7b8f5;
}
.lab-content--guide .lab-section-body--continued {
    margin-top: 0;
}
.lab-content--guide .question-block + .lab-content .lab-section-body--continued {
    margin-top: 0;
}
.lab-content--guide .lab-section-body > :last-child {
    margin-bottom: 0;
}
.student-lab-header--guide .lab-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}
.student-lab-header--guide .lab-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text);
}
.student-lab-header--guide .lab-pill--muted {
    font-weight: 500;
    color: var(--muted);
}
.student-lab-header--guide .lab-pill--action {
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--link);
    background: var(--card);
    border-color: var(--link);
}
.student-lab-header--guide .lab-pill--action:hover {
    color: var(--link-hover);
    border-color: var(--link-hover);
}
.student-lab-header--guide .lab-pill--action.is-active {
    background: var(--link);
    border-color: var(--link);
    color: #fff;
}
[data-theme="dark"] .student-lab-header--guide .lab-pill--action.is-active {
    color: #fff;
}
.student-lab-header--guide .lab-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.lab-content .lab-code-block {
    margin: 1.15em 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-muted);
}
.lab-content .lab-code-block-bar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
}
.lab-content .lab-code-block-bar--copy-only {
    justify-content: flex-end;
    min-height: 2.25rem;
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-muted);
}
.lab-content .lab-code-block--plain {
    background: var(--surface-muted);
}
.lab-content .lab-code-block--plain pre {
    position: relative;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 12px 2.75rem 12px 12px;
}
.lab-content .lab-code-block--single-line pre {
    position: relative;
    padding: 8px 2.75rem 8px 12px;
}
.lab-content .lab-code-block pre {
    margin: 0;
    border: 0;
    border-radius: 0;
}
.lab-content .lab-code-label {
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 8px 14px;
    border-radius: 0;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}
.lab-content .lab-code-copy-btn {
    flex-shrink: 0;
    align-self: center;
    margin: 6px 8px 6px 0;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    box-sizing: border-box;
    pointer-events: auto;
    z-index: 3;
}
.lab-content .lab-code-copy-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1rem;
    height: 1rem;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23000' d='M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23000' d='M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.lab-content .lab-code-copy-btn:hover,
.lab-content .lab-code-copy-btn:focus-visible {
    border-color: var(--wtc-red);
    outline: 2px solid var(--focus-ring);
    outline-offset: 1px;
}
.lab-content .lab-code-copy-btn.is-copied {
    color: var(--save-ok);
    border-color: var(--save-ok);
}
.lab-content .lab-code-copy-btn.lab-code-copy-btn--inline {
    position: absolute;
    top: 8px;
    right: 8px;
    margin: 0;
    z-index: 5;
}
.lab-content .lab-code-block--single-line .lab-code-copy-btn.lab-code-copy-btn--inline {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}
[data-theme="light"] .lab-content--guide .lab-code-block {
    border-color: #c9d1d9;
    background: #f6f8fa;
}
[data-theme="light"] .lab-content--guide .lab-code-block-bar {
    border-bottom-color: #c9d1d9;
    background: #eaeef2;
}
[data-theme="light"] .lab-content--guide .lab-code-block--plain {
    border: 1px solid #c9d1d9;
    background: #f6f8fa;
}
[data-theme="light"] .lab-content--guide .lab-code-copy-btn {
    background: #ffffff;
    border-color: #c9d1d9;
    color: #24292f;
}
[data-theme="light"] .lab-content--guide pre:has(> code.hljs) code.hljs,
[data-theme="light"] .lab-content--guide pre:has(> code.hljs) code.hljs .code-text.hljs,
[data-theme="light"] .lab-content--guide pre code.shell-prompted,
[data-theme="light"] .lab-content--guide .lab-code-block pre code:not(.hljs) {
    background: #f6f8fa !important;
    color: #24292f !important;
    border-color: transparent !important;
}
[data-theme="light"] .lab-content--guide .code-prompt {
    color: #57606a !important;
}
[data-theme="dark"] .lab-content--guide .lab-code-block {
    border-color: #374151;
    background: #1a1a1a;
}
[data-theme="dark"] .lab-content--guide .lab-code-block-bar {
    border-bottom-color: #374151;
    background: #262626;
}
[data-theme="dark"] .lab-content--guide .lab-code-block--plain {
    border: 1px solid #374151;
    background: #1a1a1a;
}
[data-theme="dark"] .lab-content--guide .lab-code-copy-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}
.lab-content--guide .lab-code-block--copy .lab-code-block-bar,
.lab-content--guide .lab-code-label--copy {
    background: #166534;
    color: #dcfce7;
    border-bottom-color: #14532d;
}
.lab-content--guide .lab-code-block--edit .lab-code-block-bar,
.lab-content--guide .lab-code-label--edit {
    background: #991b1b;
    color: #fee2e2;
    border-bottom-color: #7f1d1d;
}
.lab-content--guide .lab-code-block--example .lab-code-block-bar,
.lab-content--guide .lab-code-label--example {
    background: #1e3a8a;
    color: #dbeafe;
    border-bottom-color: #172554;
}
[data-theme="light"] .lab-content--guide .lab-code-block--copy .lab-code-block-bar {
    background: #166534;
    border-bottom-color: #14532d;
}
[data-theme="light"] .lab-content--guide .lab-code-block--edit .lab-code-block-bar {
    background: #991b1b;
    border-bottom-color: #7f1d1d;
}
[data-theme="light"] .lab-content--guide .lab-code-block--example .lab-code-block-bar {
    background: #1e3a8a;
    border-bottom-color: #172554;
}
[data-theme="dark"] .lab-content--guide .lab-code-block--copy .lab-code-block-bar,
[data-theme="dark"] .lab-content--guide .lab-code-label--copy {
    background: #14532d;
    color: #bbf7d0;
    border-bottom-color: #052e16;
}
[data-theme="dark"] .lab-content--guide .lab-code-block--edit .lab-code-block-bar,
[data-theme="dark"] .lab-content--guide .lab-code-label--edit {
    background: #7f1d1d;
    color: #fecaca;
    border-bottom-color: #450a0a;
}
[data-theme="dark"] .lab-content--guide .lab-code-block--example .lab-code-block-bar,
[data-theme="dark"] .lab-content--guide .lab-code-label--example {
    background: #1e3a8a;
    color: #bfdbfe;
    border-bottom-color: #172554;
}
[data-theme="dark"] .lab-content--guide pre:has(> code.hljs) code.hljs,
[data-theme="dark"] .lab-content--guide pre:has(> code.hljs) code.hljs .code-text.hljs,
[data-theme="dark"] .lab-content--guide pre code.shell-prompted {
    background: #1a1a1a !important;
    color: #f3f4f6 !important;
    border-color: #374151 !important;
}
[data-theme="dark"] .lab-content--guide .code-prompt {
    color: #9ca3af !important;
}
.lab-content .lab-note--guide {
    display: grid;
    grid-template-columns: 3.75rem 1fr;
    gap: 0;
    margin: 1.25em 0;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: none;
}
.lab-content .lab-note--guide .lab-note-icon-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 0;
    background: rgba(0, 0, 0, 0.08);
}
.lab-content .lab-note--guide .lab-note-icon-strip::before {
    content: "";
    display: block;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.lab-content .lab-note-icon-strip--note::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20600%20600%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22m300%2C234c-22.09139%2C0-40%2C17.90861-40%2C40v170c0%2C22.09139%2017.90861%2C40%2040%2C40%2022.09139%2C0%2040%2C-17.90861%2040%2C-40V274c0%2C-22.09139-17.90861%2C-40-40%2C-40z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22m300.60937%2C-12.792969c-173.60599%2C0-315.214839%2C141.724839-315.214839%2C315.404299%200%2C173.67945%20141.608849%2C315.40429%20315.214839%2C315.40429%20173.606%2C0%20315.21485%2C-141.72484%20315.21485%2C-315.40429%200%2C-173.67946-141.60885%2C-315.404299-315.21485%2C-315.404299zm0%2C84.082031c128.13278%2C10e-7%20231.13086%2C103.052738%20231.13086%2C231.322268%200%2C128.26952-102.99808%2C231.32226-231.13086%2C231.32226C172.4766%2C533.93359%2069.476562%2C430.88085%2069.476562%2C302.61133%2069.476563%2C174.3418%20172.4766%2C71.289062%20300.60937%2C71.289062Z%22%20transform%3D%22matrix%28.952%200%200%20.951%2013.901%2012.169%29%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22m300%2C110c-27.14042%2C0-50%2C22.85958-50%2C50%200%2C27.14042%2022.85958%2C50%2050%2C50%2027.14042%2C0%2050%2C-22.85958%2050%2C-50%200%2C-27.14042-22.85958-50-50%2C-50z%22%2F%3E%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20600%20600%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22m300%2C234c-22.09139%2C0-40%2C17.90861-40%2C40v170c0%2C22.09139%2017.90861%2C40%2040%2C40%2022.09139%2C0%2040%2C-17.90861%2040%2C-40V274c0%2C-22.09139-17.90861%2C-40-40%2C-40z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22m300.60937%2C-12.792969c-173.60599%2C0-315.214839%2C141.724839-315.214839%2C315.404299%200%2C173.67945%20141.608849%2C315.40429%20315.214839%2C315.40429%20173.606%2C0%20315.21485%2C-141.72484%20315.21485%2C-315.40429%200%2C-173.67946-141.60885%2C-315.404299-315.21485%2C-315.404299zm0%2C84.082031c128.13278%2C10e-7%20231.13086%2C103.052738%20231.13086%2C231.322268%200%2C128.26952-102.99808%2C231.32226-231.13086%2C231.32226C172.4766%2C533.93359%2069.476562%2C430.88085%2069.476562%2C302.61133%2069.476563%2C174.3418%20172.4766%2C71.289062%20300.60937%2C71.289062Z%22%20transform%3D%22matrix%28.952%200%200%20.951%2013.901%2012.169%29%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22m300%2C110c-27.14042%2C0-50%2C22.85958-50%2C50%200%2C27.14042%2022.85958%2C50%2050%2C50%2027.14042%2C0%2050%2C-22.85958%2050%2C-50%200%2C-27.14042-22.85958-50-50%2C-50z%22%2F%3E%3C%2Fsvg%3E");
}
.lab-content .lab-note-icon-strip--tip::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2047%2047%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M23.5%2C11.449c-6.385%2C0-11.563%2C4.959-11.563%2C11.077c0%2C7.265%2C5.045%2C9.117%2C5.045%2C13.344c0%2C1.045%2C0.799%2C2.017%2C1.999%2C2.731c-0.251%2C0.209-0.391%2C0.438-0.391%2C0.678c0%2C0.322%2C0.253%2C0.623%2C0.688%2C0.881c-0.408%2C0.253-0.645%2C0.544-0.645%2C0.855c0%2C0.314%2C0.242%2C0.608%2C0.659%2C0.863c-0.426%2C0.256-0.674%2C0.555-0.674%2C0.872c0%2C0.388%2C0.366%2C0.743%2C0.978%2C1.032c-0.237%2C0.215-0.373%2C0.453-0.373%2C0.703c0%2C0.74%2C1.153%2C1.369%2C2.774%2C1.621C22.282%2C46.634%2C22.86%2C47%2C23.534%2C47c0.673%2C0%2C1.25-0.363%2C1.535-0.889c1.637-0.248%2C2.803-0.881%2C2.803-1.623c0-0.247-0.131-0.482-0.363-0.694c0.625-0.291%2C0.998-0.651%2C0.998-1.042c0-0.314-0.241-0.609-0.659-0.863c0.425-0.257%2C0.674-0.554%2C0.674-0.871c0-0.322-0.254-0.623-0.688-0.882c0.41-0.252%2C0.646-0.544%2C0.646-0.855c0-0.249-0.151-0.484-0.421-0.698c1.181-0.713%2C1.966-1.675%2C1.966-2.711c0-4.229%2C5.039-6.08%2C5.039-13.344C35.063%2C16.408%2C29.886%2C11.449%2C23.5%2C11.449zM29.538%2C29.381c-1.152%2C1.692-2.455%2C3.604-2.535%2C6.232c-0.396%2C0.441-1.809%2C1.158-3.499%2C1.158c-1.691%2C0-3.105-0.717-3.5-1.16c-0.08-2.629-1.385-4.541-2.539-6.232c-1.287-1.886-2.502-3.667-2.502-6.854c0-4.439%2C3.83-8.051%2C8.537-8.051c4.708%2C0%2C8.538%2C3.612%2C8.538%2C8.051C32.038%2C25.713%2C30.823%2C27.495%2C29.538%2C29.381z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M23.5%2C7.564c0.832%2C0%2C1.513-0.9%2C1.513-2V2c0-1.1-0.681-2-1.513-2s-1.513%2C0.9-1.513%2C2v3.564C21.987%2C6.665%2C22.668%2C7.564%2C23.5%2C7.564z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M15.747%2C9.642c0.721-0.416%2C0.859-1.536%2C0.31-2.488l-1.781-3.087c-0.55-0.953-1.59-1.392-2.311-0.976c-0.721%2C0.416-0.86%2C1.536-0.311%2C2.488l1.783%2C3.087C13.987%2C9.619%2C15.026%2C10.058%2C15.747%2C9.642z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M9.095%2C13.007L6.01%2C11.225c-0.953-0.55-2.073-0.411-2.489%2C0.31c-0.416%2C0.721%2C0.022%2C1.76%2C0.976%2C2.31l3.086%2C1.782c0.953%2C0.55%2C2.073%2C0.411%2C2.488-0.31C10.486%2C14.596%2C10.048%2C13.557%2C9.095%2C13.007z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M42.504%2C32.295l-3.086-1.781c-0.953-0.551-2.073-0.412-2.488%2C0.31c-0.416%2C0.721%2C0.021%2C1.76%2C0.977%2C2.31l3.084%2C1.782c0.953%2C0.55%2C2.073%2C0.411%2C2.489-0.31C43.896%2C33.884%2C43.458%2C32.845%2C42.504%2C32.295z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M7.994%2C23.07c0-0.833-0.9-1.513-2-1.513H2.43c-1.1%2C0-2%2C0.681-2%2C1.513c0%2C0.832%2C0.9%2C1.513%2C2%2C1.513h3.564C7.094%2C24.583%2C7.994%2C23.902%2C7.994%2C23.07z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M44.57%2C21.557h-3.563c-1.101%2C0-2%2C0.681-2%2C1.513c0%2C0.832%2C0.899%2C1.513%2C2%2C1.513h3.563c1.101%2C0%2C2-0.681%2C2-1.513C46.57%2C22.238%2C45.67%2C21.557%2C44.57%2C21.557z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M7.582%2C30.514l-3.086%2C1.781c-0.953%2C0.55-1.392%2C1.589-0.976%2C2.311c0.416%2C0.721%2C1.536%2C0.859%2C2.489%2C0.31l3.085-1.782c0.953-0.55%2C1.392-1.589%2C0.976-2.31C9.655%2C30.104%2C8.535%2C29.963%2C7.582%2C30.514z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M39.418%2C15.627l3.086-1.782c0.953-0.55%2C1.392-1.589%2C0.976-2.31c-0.416-0.721-1.536-0.86-2.489-0.31l-3.085%2C1.782c-0.952%2C0.55-1.392%2C1.589-0.976%2C2.31C37.345%2C16.038%2C38.465%2C16.177%2C39.418%2C15.627z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M35.036%2C3.09c-0.722-0.416-1.762%2C0.023-2.312%2C0.976l-1.781%2C3.087c-0.55%2C0.953-0.411%2C2.072%2C0.31%2C2.488c0.722%2C0.416%2C1.761-0.023%2C2.311-0.976l1.783-3.087C35.896%2C4.626%2C35.756%2C3.506%2C35.036%2C3.09z%22%2F%3E%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2047%2047%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M23.5%2C11.449c-6.385%2C0-11.563%2C4.959-11.563%2C11.077c0%2C7.265%2C5.045%2C9.117%2C5.045%2C13.344c0%2C1.045%2C0.799%2C2.017%2C1.999%2C2.731c-0.251%2C0.209-0.391%2C0.438-0.391%2C0.678c0%2C0.322%2C0.253%2C0.623%2C0.688%2C0.881c-0.408%2C0.253-0.645%2C0.544-0.645%2C0.855c0%2C0.314%2C0.242%2C0.608%2C0.659%2C0.863c-0.426%2C0.256-0.674%2C0.555-0.674%2C0.872c0%2C0.388%2C0.366%2C0.743%2C0.978%2C1.032c-0.237%2C0.215-0.373%2C0.453-0.373%2C0.703c0%2C0.74%2C1.153%2C1.369%2C2.774%2C1.621C22.282%2C46.634%2C22.86%2C47%2C23.534%2C47c0.673%2C0%2C1.25-0.363%2C1.535-0.889c1.637-0.248%2C2.803-0.881%2C2.803-1.623c0-0.247-0.131-0.482-0.363-0.694c0.625-0.291%2C0.998-0.651%2C0.998-1.042c0-0.314-0.241-0.609-0.659-0.863c0.425-0.257%2C0.674-0.554%2C0.674-0.871c0-0.322-0.254-0.623-0.688-0.882c0.41-0.252%2C0.646-0.544%2C0.646-0.855c0-0.249-0.151-0.484-0.421-0.698c1.181-0.713%2C1.966-1.675%2C1.966-2.711c0-4.229%2C5.039-6.08%2C5.039-13.344C35.063%2C16.408%2C29.886%2C11.449%2C23.5%2C11.449zM29.538%2C29.381c-1.152%2C1.692-2.455%2C3.604-2.535%2C6.232c-0.396%2C0.441-1.809%2C1.158-3.499%2C1.158c-1.691%2C0-3.105-0.717-3.5-1.16c-0.08-2.629-1.385-4.541-2.539-6.232c-1.287-1.886-2.502-3.667-2.502-6.854c0-4.439%2C3.83-8.051%2C8.537-8.051c4.708%2C0%2C8.538%2C3.612%2C8.538%2C8.051C32.038%2C25.713%2C30.823%2C27.495%2C29.538%2C29.381z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M23.5%2C7.564c0.832%2C0%2C1.513-0.9%2C1.513-2V2c0-1.1-0.681-2-1.513-2s-1.513%2C0.9-1.513%2C2v3.564C21.987%2C6.665%2C22.668%2C7.564%2C23.5%2C7.564z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M15.747%2C9.642c0.721-0.416%2C0.859-1.536%2C0.31-2.488l-1.781-3.087c-0.55-0.953-1.59-1.392-2.311-0.976c-0.721%2C0.416-0.86%2C1.536-0.311%2C2.488l1.783%2C3.087C13.987%2C9.619%2C15.026%2C10.058%2C15.747%2C9.642z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M9.095%2C13.007L6.01%2C11.225c-0.953-0.55-2.073-0.411-2.489%2C0.31c-0.416%2C0.721%2C0.022%2C1.76%2C0.976%2C2.31l3.086%2C1.782c0.953%2C0.55%2C2.073%2C0.411%2C2.488-0.31C10.486%2C14.596%2C10.048%2C13.557%2C9.095%2C13.007z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M42.504%2C32.295l-3.086-1.781c-0.953-0.551-2.073-0.412-2.488%2C0.31c-0.416%2C0.721%2C0.021%2C1.76%2C0.977%2C2.31l3.084%2C1.782c0.953%2C0.55%2C2.073%2C0.411%2C2.489-0.31C43.896%2C33.884%2C43.458%2C32.845%2C42.504%2C32.295z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M7.994%2C23.07c0-0.833-0.9-1.513-2-1.513H2.43c-1.1%2C0-2%2C0.681-2%2C1.513c0%2C0.832%2C0.9%2C1.513%2C2%2C1.513h3.564C7.094%2C24.583%2C7.994%2C23.902%2C7.994%2C23.07z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M44.57%2C21.557h-3.563c-1.101%2C0-2%2C0.681-2%2C1.513c0%2C0.832%2C0.899%2C1.513%2C2%2C1.513h3.563c1.101%2C0%2C2-0.681%2C2-1.513C46.57%2C22.238%2C45.67%2C21.557%2C44.57%2C21.557z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M7.582%2C30.514l-3.086%2C1.781c-0.953%2C0.55-1.392%2C1.589-0.976%2C2.311c0.416%2C0.721%2C1.536%2C0.859%2C2.489%2C0.31l3.085-1.782c0.953-0.55%2C1.392-1.589%2C0.976-2.31C9.655%2C30.104%2C8.535%2C29.963%2C7.582%2C30.514z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M39.418%2C15.627l3.086-1.782c0.953-0.55%2C1.392-1.589%2C0.976-2.31c-0.416-0.721-1.536-0.86-2.489-0.31l-3.085%2C1.782c-0.952%2C0.55-1.392%2C1.589-0.976%2C2.31C37.345%2C16.038%2C38.465%2C16.177%2C39.418%2C15.627z%22%2F%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M35.036%2C3.09c-0.722-0.416-1.762%2C0.023-2.312%2C0.976l-1.781%2C3.087c-0.55%2C0.953-0.411%2C2.072%2C0.31%2C2.488c0.722%2C0.416%2C1.761-0.023%2C2.311-0.976l1.783-3.087C35.896%2C4.626%2C35.756%2C3.506%2C35.036%2C3.09z%22%2F%3E%3C%2Fsvg%3E");
}
.lab-content .lab-note-icon-strip--warning::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2217%22%20r%3D%221%22%20fill%3D%22%23000%22%2F%3E%3Cpath%20d%3D%22M12%2010v4%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.44722%2018.1056L10.2111%204.57771C10.9482%203.10361%2013.0518%203.10362%2013.7889%204.57771L20.5528%2018.1056C21.2177%2019.4354%2020.2507%2021%2018.7639%2021H5.23607C3.7493%2021%202.78231%2019.4354%203.44722%2018.1056Z%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2217%22%20r%3D%221%22%20fill%3D%22%23000%22%2F%3E%3Cpath%20d%3D%22M12%2010v4%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.44722%2018.1056L10.2111%204.57771C10.9482%203.10361%2013.0518%203.10362%2013.7889%204.57771L20.5528%2018.1056C21.2177%2019.4354%2020.2507%2021%2018.7639%2021H5.23607C3.7493%2021%202.78231%2019.4354%203.44722%2018.1056Z%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.lab-content .lab-note-icon-strip--caution::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2217%22%20r%3D%221%22%20fill%3D%22%23000%22%2F%3E%3Cpath%20d%3D%22M12%2010v4%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.44722%2018.1056L10.2111%204.57771C10.9482%203.10361%2013.0518%203.10362%2013.7889%204.57771L20.5528%2018.1056C21.2177%2019.4354%2020.2507%2021%2018.7639%2021H5.23607C3.7493%2021%202.78231%2019.4354%203.44722%2018.1056Z%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2217%22%20r%3D%221%22%20fill%3D%22%23000%22%2F%3E%3Cpath%20d%3D%22M12%2010v4%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M3.44722%2018.1056L10.2111%204.57771C10.9482%203.10361%2013.0518%203.10362%2013.7889%204.57771L20.5528%2018.1056C21.2177%2019.4354%2020.2507%2021%2018.7639%2021H5.23607C3.7493%2021%202.78231%2019.4354%203.44722%2018.1056Z%22%20stroke%3D%22%23000%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}
.lab-content .lab-note-icon-strip--important::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M11.55%205.007V12.007c0%20.552-.47%201-1.05%201s-1.05-.448-1.05-1V5.007c0-.552.47-1%201.05-1s1.05.448%201.05%201zm0%2010c0%20.552-.47%201-1.05%201s-1.05-.448-1.05-1%20.47-1%201.05-1%201.05.448%201.05%201zM18.9%2017c0%20.552-.47%201-1.05%201H3.15c-.58%200-1.05-.448-1.05-1V3c0-.552.47-1%201.05-1h14.7c.58%200%201.05.448%201.05%201v14zm0-17H2.1C.94%200%200%20.899%200%202.003V2.007v16C0%2019.112.94%2020%202.1%2020h16.8C20.06%2020%2021%2019.108%2021%2017.997V2.007C21%20.902%2019.95%200%2018.9%200z%22%2F%3E%3C%2Fsvg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M11.55%205.007V12.007c0%20.552-.47%201-1.05%201s-1.05-.448-1.05-1V5.007c0-.552.47-1%201.05-1s1.05.448%201.05%201zm0%2010c0%20.552-.47%201-1.05%201s-1.05-.448-1.05-1%20.47-1%201.05-1%201.05.448%201.05%201zM18.9%2017c0%20.552-.47%201-1.05%201H3.15c-.58%200-1.05-.448-1.05-1V3c0-.552.47-1%201.05-1h14.7c.58%200%201.05.448%201.05%201v14zm0-17H2.1C.94%200%200%20.899%200%202.003V2.007v16C0%2019.112.94%2020%202.1%2020h16.8C20.06%2020%2021%2019.108%2021%2017.997V2.007C21%20.902%2019.95%200%2018.9%200z%22%2F%3E%3C%2Fsvg%3E");
}
.lab-content .lab-note--guide .lab-note-body {
    padding: 0.95rem 1.1rem;
}
.lab-content table.lab-table .lab-note,
.lab-content .lab-note--compact {
    margin: 0;
}
.lab-content .lab-note--compact.lab-note--guide {
    grid-template-columns: 2.15rem 1fr;
}
.lab-content .lab-note--compact .lab-note-icon-strip {
    padding: 0.4rem 0;
}
.lab-content .lab-note--compact .lab-note-icon-strip::before {
    width: 1.2rem;
    height: 1.2rem;
}
.lab-content .lab-note--compact .lab-note-body {
    padding: 0.4rem 0.65rem;
}
.lab-content .lab-note--inline {
    display: inline-grid;
    vertical-align: middle;
    max-width: 100%;
}
.lab-content table.lab-table td .lab-note,
.lab-content table.lab-table th .lab-note {
    width: 100%;
}
.lab-content .lab-note--guide .lab-note-label {
    display: none;
}
.lab-content .lab-note--guide.lab-note--note {
    background: #bfdbfe;
    color: #0f172a;
}
.lab-content .lab-note--guide.lab-note--note .lab-note-icon-strip { color: #1d4ed8; }
.lab-content .lab-note--guide.lab-note--tip {
    background: #bbf7d0;
    color: #0f172a;
}
.lab-content .lab-note--guide.lab-note--tip .lab-note-icon-strip { color: #15803d; }
.lab-content .lab-note--guide.lab-note--warning {
    background: #fde68a;
    color: #0f172a;
}
.lab-content .lab-note--guide.lab-note--warning .lab-note-icon-strip { color: #b45309; }
.lab-content .lab-note--guide.lab-note--caution {
    background: #fed7aa;
    color: #0f172a;
}
.lab-content .lab-note--guide.lab-note--caution .lab-note-icon-strip { color: #c2410c; }
.lab-content .lab-note--guide.lab-note--important {
    background: #fecaca;
    color: #0f172a;
}
.lab-content .lab-note--guide.lab-note--important .lab-note-icon-strip { color: #b91c1c; }
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--note {
    background: #1e3a8a;
    color: #e2e8f0;
}
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--note .lab-note-icon-strip { color: #93c5fd; }
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--tip {
    background: #14532d;
    color: #e2e8f0;
}
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--tip .lab-note-icon-strip { color: #86efac; }
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--warning {
    background: #78350f;
    color: #e2e8f0;
}
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--warning .lab-note-icon-strip { color: #fcd34d; }
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--caution {
    background: #7c2d12;
    color: #e2e8f0;
}
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--caution .lab-note-icon-strip { color: #fdba74; }
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--important {
    background: #7f1d1d;
    color: #e2e8f0;
}
[data-theme="dark"] .lab-content .lab-note--guide.lab-note--important .lab-note-icon-strip { color: #fca5a5; }
.lab-content--guide .lab-figure .lab-image,
.lab-content--guide img.lab-image {
    border-radius: var(--radius-sm);
}

.lab-content .hljs { font-family: "Source Code Pro", monospace; font-weight: 600; }
.lab-content .hljs-keyword { font-weight: 700; }
.lab-content .hljs-title.function_ { font-weight: 700; }
.lab-content .hljs-string,
.lab-content .hljs-number,
.lab-content .hljs-literal { font-weight: 600; }
.lab-content a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.lab-content a:hover { color: var(--link-hover); }
.lab-content .lab-figure {
    margin: 1em 0;
    max-width: 100%;
}
.markdown-preview.lab-content .lab-figure--resizable {
    width: 100%;
    overflow: visible;
}
.lab-content .lab-figure--resizable {
    position: relative;
}
.lab-content .lab-image-resize-frame {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}
.lab-content .lab-image-resize-frame .lab-image {
    width: 100%;
}
.lab-image-resize-handle {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--wtc-white);
    border-radius: 2px;
    background: var(--wtc-red);
    cursor: nwse-resize;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    z-index: 2;
    touch-action: none;
}
.lab-image-resize-handle:hover,
.lab-image-resize-handle:focus-visible {
    background: var(--wtc-red-dark);
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
.markdown-preview.lab-content .lab-figure--resizable.is-resizing {
    user-select: none;
}
.markdown-preview.lab-content .lab-figure--resizable.is-resizing .lab-image-resize-frame {
    outline: 2px dashed var(--wtc-red);
    outline-offset: 2px;
}
.lab-content .lab-image,
.lab-content .lab-figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}
.lab-content .lab-figure figcaption {
    margin-top: 0.45em;
    font-size: 0.92rem;
    color: var(--muted);
}
.lab-content .lab-video-embed {
    margin: 1em 0;
    max-width: 100%;
    background: #000;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.lab-content .lab-video-embed iframe,
.lab-content .lab-video-embed video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
}
.markdown-preview.lab-content .lab-video-embed iframe,
.markdown-preview.lab-content .lab-video-embed video {
    pointer-events: none;
}
.lab-video-mobile-link {
    display: none;
}
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
    .lab-video-embed.has-mobile-link {
        background: none !important;
        border: 0 !important;
        overflow: visible !important;
    }
    .lab-video-embed.has-mobile-link iframe,
    .lab-video-embed.has-mobile-link video {
        display: none !important;
    }
    .lab-video-mobile-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--surface-muted);
        color: inherit;
        font-weight: 600;
        text-decoration: none;
    }
    .lab-video-mobile-link::before {
        content: "";
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 6px 0 6px 10px;
        border-color: transparent transparent transparent currentColor;
    }
}
.editor-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
}
.editor-toolbar--below {
    margin-top: 14px;
    margin-bottom: 0;
}
.editor-toolbar--below + .editor-toolbar--below {
    margin-top: 10px;
}
.editor-toolbar--blocks {
    margin-top: 0;
}
.lab-editor-chrome {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted, var(--card));
}
.editor-toolbar--grouped {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}
.editor-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.editor-toolbar-group:first-child {
    padding-top: 0;
    border-top: 0;
}
.editor-toolbar--menus {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
    position: relative;
    z-index: 5;
}
.editor-menu {
    position: relative;
}
.editor-menu-toggle::after {
    content: " ▾";
    font-size: 0.85em;
    opacity: 0.8;
}
.editor-menu.is-open .editor-menu-toggle::after {
    content: " ▴";
}
.editor-menu-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 11.5rem;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 20;
}
[data-theme="dark"] .editor-menu-panel {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.editor-menu-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}
.editor-menu-item:hover,
.editor-menu-item:focus-visible {
    background: color-mix(in srgb, var(--wtc-green, #2e7d32) 12%, transparent);
    outline: none;
}
label.editor-menu-item {
    font-weight: 600;
}
.lab-editor-chrome-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: flex-start;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.lab-editor-chrome-footer .editor-split-toolbar {
    margin: 0;
    margin-left: auto;
}
.lab-editor-chrome-footer .lab-editor-help {
    margin: 0;
    flex: 1 1 280px;
}
.lab-editor-settings {
    margin: 4px 0 12px;
}
.lab-editor-settings-body > label:first-child {
    margin-top: 0;
}
.editor-toolbar .btn,
.editor-toolbar label.btn {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 11px 18px;
    font-size: 15px;
    line-height: 1.2;
    box-sizing: border-box;
    vertical-align: middle;
}
.editor-toolbar-label {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    margin: 0 2px 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    min-width: 4.5rem;
}
.editor-toolbar-label + .editor-toolbar-label {
    margin-left: 8px;
}
.lab-editor-help {
    margin: 0 0 12px;
    font-size: 0.95rem;
}
.lab-editor-help > summary {
    cursor: pointer;
    color: var(--muted);
    user-select: none;
    list-style: none;
    font-weight: 600;
}
.lab-editor-help > summary::-webkit-details-marker { display: none; }
.lab-editor-help > summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 6px;
    color: var(--link);
    transition: transform 0.15s ease;
}
.lab-editor-help[open] > summary::before { transform: rotate(90deg); }
.lab-editor-help > summary:hover { color: var(--link); }
.lab-editor-help-body {
    margin-top: 10px;
}
.lab-editor-help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}
@media (max-width: 720px) {
    .lab-editor-help-grid { grid-template-columns: 1fr; }
}
.lab-editor-help-grid h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--header-text, var(--text));
}
.lab-editor-help-list {
    margin: 0;
    padding-left: 1.1rem;
    line-height: 1.45;
}
.lab-editor-help-list li + li { margin-top: 4px; }
.lab-editor-inline-code {
    display: block;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}
.lab-image-alt-dialog {
    width: min(480px, calc(100vw - 32px));
    border: 1px solid var(--border);
    padding: 20px;
    margin: auto;
    background: var(--card);
    color: var(--text);
    color-scheme: light;
}
.app-dialog {
    width: min(440px, calc(100vw - 32px));
    border: 1px solid var(--border);
    padding: 20px;
    margin: auto;
    background: var(--card);
    color: var(--text);
    color-scheme: light;
}
[data-theme="dark"] .app-dialog,
[data-theme="dark"] .lab-image-alt-dialog {
    color-scheme: dark;
}
.app-dialog::backdrop,
.lab-image-alt-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}
.app-dialog h3,
.lab-image-alt-dialog h3 {
    margin-top: 0;
    color: var(--header-text);
}
.app-dialog-message {
    margin: 0 0 18px;
    line-height: 1.5;
    color: var(--text);
}
.app-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.app-dialog-field-label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--label);
}
.app-dialog-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--input-bg);
    color: var(--text);
    box-sizing: border-box;
    margin-bottom: 18px;
}
.lab-image-alt-intro {
    margin: 0 0 14px;
    line-height: 1.45;
}
.lab-image-alt-dialog label {
    display: block;
    margin-top: 12px;
    margin-bottom: 4px;
}
.lab-image-alt-dialog input {
    width: 100%;
}
.lab-table-dialog {
    width: min(820px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
}
.lab-table-dialog-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 4px;
}
@media (max-width: 520px) {
    .lab-table-dialog-fields { grid-template-columns: 1fr; }
}
.lab-table-dialog-fields p {
    margin: 6px 0 0;
    font-size: 0.85rem;
}
.lab-table-header-options {
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.lab-table-header-options legend {
    padding: 0 4px;
    font-weight: 600;
    font-size: 0.92rem;
}
.lab-table-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
    font-weight: 500;
}
.lab-table-header-options > .muted {
    margin: 8px 0 0;
    font-size: 0.85rem;
}
.lab-table-data-fields {
    margin-top: 14px;
}
.lab-table-data-fields > .muted {
    margin: 0 0 8px;
    font-size: 0.85rem;
}
.lab-table-data-grid {
    display: grid;
    grid-template-columns: repeat(var(--lab-table-cols, 3), minmax(7.5rem, 1fr));
    gap: 6px;
    max-height: min(42vh, 360px);
    overflow: auto;
    padding: 2px;
}
.lab-table-data-cell {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.lab-table-data-cell--header,
.lab-table-data-cell--row-header {
    font-weight: 700;
}
.lab-table-width-fields {
    margin-top: 12px;
}
.lab-table-width-fields > .muted {
    margin: 0 0 8px;
    font-size: 0.85rem;
}
.lab-table-width-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.lab-table-width-inputs label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
}
.lab-table-width-inputs input {
    width: 100%;
    box-sizing: border-box;
}
.lab-section-links-dialog {
    width: min(640px, calc(100vw - 32px));
}
.lab-section-links-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 8px 0 12px;
    max-height: min(50vh, 360px);
    overflow: auto;
}
.lab-section-links-row {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) minmax(7rem, 11rem) auto;
    gap: 8px;
    align-items: center;
}
.lab-section-links-letter {
    font-weight: 700;
    color: var(--label);
}
.lab-section-links-title {
    width: 100%;
    margin: 0;
}
.lab-section-links-anchor {
    display: block;
    font-size: 0.85em;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lab-section-links-row-actions {
    margin-bottom: 12px;
}
.lab-section-links-preview {
    margin: 0 0 16px;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: 0.92em;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 10rem;
    overflow: auto;
}
@media (max-width: 640px) {
    .lab-section-links-row {
        grid-template-columns: 2rem minmax(0, 1fr) auto;
    }
    .lab-section-links-anchor {
        grid-column: 2 / -1;
    }
}
.lab-image-alt-external {
    margin-top: 14px;
    font-size: 0.92rem;
}
.lab-image-alt-external > summary {
    cursor: pointer;
    user-select: none;
}
.lab-image-alt-external > summary:hover { color: var(--link); }
.lab-image-alt-external p { margin: 8px 0 0; }
.lab-image-alt-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.lab-insert-image-btn.is-uploading {
    opacity: 0.65;
    pointer-events: none;
}
.lab-editor-card { overflow: hidden; }
.lab-editor-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.lab-editor-save-note { margin-bottom: 6px; }
.lab-editor-draft-status {
    min-height: 1.25rem;
    margin: 0 0 12px;
    font-size: 0.92rem;
}
.lab-editor-draft-status.is-saving { color: var(--status-saving, #00587C); }
.lab-editor-draft-status.is-saved { color: var(--save-ok, #2e7d32); }
.lab-editor-draft-status.is-error { color: var(--wtc-red, #BA0C2F); }
.lab-editor-draft-banner {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #00587C;
    border-radius: var(--radius-md);
    background: rgba(0, 88, 124, 0.08);
}
.lab-editor-draft-banner--active {
    border-color: #2e7d32;
    background: rgba(46, 125, 50, 0.08);
}
[data-theme="dark"] .lab-editor-draft-banner--active {
    border-color: #81c784;
    background: rgba(129, 199, 132, 0.12);
}
[data-theme="dark"] .lab-editor-draft-banner {
    background: rgba(110, 184, 212, 0.12);
    border-color: #6EB8D4;
}
.lab-editor-draft-banner p { margin: 0 0 12px; }
.lab-editor-draft-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.editor-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
    width: 100%;
}
.editor-split-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.editor-follow-scroll-toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
}
.editor-follow-scroll-toggle input { margin: 0; }
.markdown-editor.is-word-wrap {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}
@media (max-width: 1024px) {
    .editor-split { grid-template-columns: 1fr; }
}
.editor-pane {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.editor-pane label { margin-bottom: 0; }
.markdown-editor {
    width: 100%;
    min-width: 0;
    min-height: 420px;
    height: min(65vh, 720px);
    resize: vertical;
    font-family: "Source Code Pro", monospace;
    font-size: 14px;
    line-height: 1.6;
    tab-size: 2;
    white-space: pre;
    overflow: auto;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: var(--input-bg);
    color: var(--text);
    box-sizing: border-box;
}
.markdown-editor:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
.markdown-preview {
    min-width: 0;
    min-height: 420px;
    height: min(65vh, 720px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--surface-muted);
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.markdown-preview.lab-content pre {
    overflow-x: auto;
    max-width: 100%;
}
.markdown-preview.lab-content pre code.hljs {
    white-space: pre;
}
.markdown-preview.lab-content img,
.markdown-preview.lab-content table {
    max-width: 100%;
}
.preview-note {
    padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-muted);
    border: 1px solid var(--border); margin-bottom: 12px;
}
.student-lab-preview { margin-top: 16px; }
.student-open-labs { margin-top: 8px; }
.student-open-labs-term + .student-open-labs-term {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.student-open-labs-term-heading {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: var(--link);
}
.student-open-labs-course + .student-open-labs-course { margin-top: 16px; }
.student-open-labs-course-heading {
    margin: 0 0 8px;
    font-size: 0.98rem;
}
.student-open-labs-section + .student-open-labs-section {
    margin-top: 14px;
}
.student-open-labs-section-heading {
    margin: 0 0 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}
.student-open-labs-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.student-open-labs-list li + li { margin-top: 10px; }
.student-open-labs-item a { font-weight: 600; }
.student-open-labs-item-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.student-open-labs-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wtc-blue);
}
.student-open-labs-badge.is-closed {
    color: var(--wtc-red-dark);
}
[data-theme="dark"] .student-open-labs-badge { color: #6EB8D4; }
[data-theme="dark"] .student-open-labs-badge.is-closed { color: #F28B9A; }
.student-open-labs-schedule {
    margin-top: 4px;
    font-size: 0.88rem;
    line-height: 1.45;
}
.lab-instructor-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}
.lab-instructor-nav-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-muted);
}
.lab-instructor-nav-link:hover { color: var(--link-hover); border-color: var(--link); }
.lab-instructor-nav-link.is-active {
    background: var(--wtc-blue);
    border-color: var(--wtc-blue);
    color: #fff;
}
[data-theme="dark"] .lab-instructor-nav-link.is-active {
    background: #1a5f7a;
    border-color: #1a5f7a;
}
.instructor-questions-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.instructor-question-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    background: var(--surface-muted);
}
.instructor-question-card + .instructor-question-card { margin-top: 14px; }
.instructor-question-card.is-open { border-left: 4px solid var(--wtc-blue); }
.instructor-question-card.is-answered { border-left: 4px solid var(--wtc-gray-55); opacity: 0.92; }
.instructor-question-meta {
    margin: 0 0 10px;
    font-size: 0.92rem;
}
.instructor-question-body {
    margin: 0 0 12px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.instructor-question-reply {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.instructor-question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}
.instructor-question-actions textarea {
    width: 100%;
    min-height: 90px;
    margin-top: 8px;
}
.student-instructor-questions-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
.student-instructor-question-item {
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.student-instructor-question-item:first-child { border-top: 0; padding-top: 0; }
.student-instructor-question-text { line-height: 1.5; }
.student-instructor-question-meta { font-size: 0.88rem; margin-top: 6px; }
.student-instructor-question-actions {
    margin-top: 10px;
}
.instructor-question-log-table {
    width: 100%;
    border-collapse: collapse;
}
.instructor-question-log-table th,
.instructor-question-log-table td {
    vertical-align: top;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.instructor-question-log-question,
.instructor-question-log-reply {
    min-width: 12rem;
    line-height: 1.5;
    white-space: pre-wrap;
}
.table-scroll {
    overflow-x: auto;
}
.student-instructor-reply {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--wtc-blue);
    background: var(--surface-muted);
}
#student-ask-instructor.has-new-reply {
    animation: app-notification-flash 1s ease-in-out 2;
}
.student-signal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.student-signal-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 11rem;
    padding: 12px 16px;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-transform: capitalize;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.student-signal-btn.is-pause {
    background: #F4B84A;
    border-color: #C47F00;
    color: #4A3000;
}
.student-signal-btn.is-help {
    background: #E45A74;
    border-color: var(--wtc-red-dark);
    color: #fff;
}
.student-signal-btn.is-slow {
    background: #2F8FB3;
    border-color: #004A66;
    color: #fff;
}
.student-signal-btn.is-pause:hover {
    background: #EBA62A;
    filter: brightness(1.02);
}
.student-signal-btn.is-help:hover {
    background: var(--wtc-red);
    filter: brightness(1.05);
}
.student-signal-btn.is-slow:hover {
    background: #217CA0;
    filter: brightness(1.05);
}
.student-signal-btn.is-pause.is-active {
    background: #C47F00;
    border-color: #8A5A00;
    color: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, #C47F00 35%, transparent);
}
.student-signal-btn.is-help.is-active {
    background: var(--wtc-red);
    border-color: var(--wtc-red-dark);
    color: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wtc-red) 35%, transparent);
}
.student-signal-btn.is-slow.is-active {
    background: var(--wtc-blue);
    border-color: #004A66;
    color: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--wtc-blue) 35%, transparent);
}
.student-signal-btn.is-compact {
    min-width: 0;
    padding: 6px 10px;
    font-size: 0.85rem;
    pointer-events: none;
}
.student-signal-btn.is-compact.is-pause.is-active,
.student-signal-btn.is-compact.is-help.is-active,
.student-signal-btn.is-compact.is-slow.is-active {
    box-shadow: none;
}
.student-signal-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}
.student-signal-status {
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
}
.student-signal-status.is-idle {
    color: var(--muted);
    font-weight: 500;
}
.student-signal-status.is-waiting {
    color: var(--wtc-blue);
}
.student-signal-status.is-acknowledged {
    color: var(--wtc-green, #2E7D32);
}
.student-signal-status.is-pending {
    color: var(--muted);
    font-weight: 500;
}
.student-signal-status.is-error { color: var(--wtc-red); }
.instructor-signals-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.instructor-signal-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
}
.instructor-signal-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 220px;
}
.instructor-signal-student {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.instructor-signal-meta {
    flex: 1 1 100%;
    font-size: 0.9rem;
}
.student-ask-status.is-error { color: var(--wtc-red); }
.question-block-preview { margin-top: 18px; }
.answer-box-preview {
    border: 2px solid var(--input-border); border-radius: var(--radius-sm); background: var(--input-bg);
    padding: 0; overflow: hidden; margin-top: 8px;
}
.answer-box-preview textarea,
.answer-box-preview textarea:disabled {
    display: block;
    width: 100%; min-height: 140px; border: 0; border-bottom: 1px dashed var(--input-border);
    padding: 12px; resize: none; background: var(--input-bg);
    color: var(--text); cursor: not-allowed; font: inherit; box-sizing: border-box;
}
.paste-zone-preview {
    border: 2px dashed var(--input-border); border-radius: var(--radius-sm); padding: 14px;
    margin: 12px; text-align: center; color: var(--muted); font-size: 13px;
    background: var(--surface-muted);
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .save-status { transition: none; }
    .student-reply-notification,
    .instructor-question-notification,
    .instructor-signal-notification { transition: none; }
    .student-reply-notification.is-new,
    .instructor-question-notification.is-new,
    .instructor-signal-notification.is-new,
    #student-ask-instructor.has-new-reply,
    .instructor-signal-screen-flash.is-flashing { animation: none; }
}
.instructor-signal-screen-flash {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
}
.instructor-signal-screen-flash.is-pause { background: #C47F00; }
.instructor-signal-screen-flash.is-help { background: var(--wtc-red); }
.instructor-signal-screen-flash.is-slow { background: var(--wtc-blue); }
.instructor-signal-screen-flash.is-question { background: var(--wtc-green); }
.instructor-signal-screen-flash.is-flashing {
    animation: instructor-signal-screen-flash 1s ease-in-out 3;
}
@keyframes instructor-signal-screen-flash {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.42; }
}
.student-reply-notifications,
.instructor-notifications-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}
.instructor-signal-notifications,
.instructor-question-notifications {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    pointer-events: none;
}
.student-reply-notification,
.instructor-question-notification,
.instructor-signal-notification {
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--wtc-blue);
    border-radius: var(--radius-sm);
    background: var(--card);
    box-shadow: var(--shadow);
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: var(--text);
}
.instructor-question-notification.is-expanded,
.instructor-signal-notification.is-expanded {
    cursor: default;
    gap: 8px;
}
.instructor-notification-body {
    width: 100%;
    margin-top: 2px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 0.95rem;
    line-height: 1.45;
    max-height: 9rem;
    overflow: auto;
}
.instructor-notification-reply {
    width: 100%;
    min-height: 4.5rem;
    margin: 0;
    resize: vertical;
}
.instructor-notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}
.instructor-notification-actions .btn {
    margin: 0;
}
.instructor-notification-status {
    margin: 0;
    font-size: 0.88rem;
}
.instructor-notification-status.is-error {
    color: var(--wtc-red);
}
.instructor-signal-notification.is-pause { border-left-color: #C47F00; }
.instructor-signal-notification.is-help { border-left-color: var(--wtc-red); }
.instructor-signal-notification.is-slow { border-left-color: var(--wtc-blue); }
.student-reply-notification:hover,
.instructor-question-notification:not(.is-expanded):hover,
.instructor-signal-notification:not(.is-expanded):hover {
    border-color: var(--wtc-blue);
    background: var(--surface-muted);
}
.instructor-signal-notification.is-help:hover { border-color: var(--wtc-red); }
.instructor-signal-notification.is-pause:hover { border-color: #C47F00; }
.student-reply-notification.is-new,
.instructor-question-notification.is-new,
.instructor-signal-notification.is-new {
    animation: app-notification-flash 1s ease-in-out 2;
}
@keyframes app-notification-flash {
    0%, 100% { box-shadow: var(--shadow); }
    50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--wtc-blue) 35%, transparent), var(--shadow); }
}
.student-reply-notification-label,
.instructor-question-notification-label,
.instructor-signal-notification-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wtc-blue);
}
.instructor-signal-notification.is-pause .instructor-signal-notification-label { color: #C47F00; }
.instructor-signal-notification.is-help .instructor-signal-notification-label { color: var(--wtc-red); }
[data-theme="dark"] .student-reply-notification-label,
[data-theme="dark"] .instructor-question-notification-label,
[data-theme="dark"] .instructor-signal-notification-label { color: #6EB8D4; }
[data-theme="dark"] .instructor-signal-notification.is-pause .instructor-signal-notification-label { color: #E8B24D; }
[data-theme="dark"] .instructor-signal-notification.is-help .instructor-signal-notification-label { color: #F08A9B; }
.student-reply-notification-preview,
.instructor-question-notification-preview {
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--muted);
}
.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0 0 0 0.35rem;
    padding: 0;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    font: italic 700 0.72rem/1 Georgia, "Times New Roman", serif;
    text-transform: none;
    letter-spacing: 0;
    vertical-align: middle;
    cursor: help;
}
.info-tip::before { content: "i"; }
.info-tip:hover,
.info-tip:focus-visible { color: var(--link); }
.info-tip-bubble {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 300;
    width: max-content;
    max-width: min(20rem, calc(100vw - 24px));
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    background: var(--wtc-gray-85);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    font: normal 400 0.86rem/1.45 Calibri, "Segoe UI", Helvetica, Arial, sans-serif;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease;
}
.info-tip:hover .info-tip-bubble,
.info-tip:focus .info-tip-bubble {
    opacity: 1;
    visibility: visible;
}
[data-theme="dark"] .info-tip-bubble {
    background: #f0f0f0;
    color: #111;
}

/* Class information sheet (builder + public page) */
.class-info-builder .layout-list {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 160px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}
.class-info-builder .layout-list.empty::after {
    content: "Add includes or content blocks below";
    display: block;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
}
.class-info-builder .layout-item {
    border-bottom: 1px solid var(--border);
    background: var(--card);
}
.class-info-builder .layout-item:last-child { border-bottom: 0; }
.class-info-builder .layout-item.dragging { opacity: 0.5; }
.class-info-builder .layout-item.include-item {
    padding: 0.75rem;
    cursor: grab;
}
.class-info-builder .include-item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.class-info-builder .include-editor-panel {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}
.class-info-builder .include-editor-panel[hidden] {
    display: none;
}
.class-info-builder .include-raw-html {
    width: 100%;
    min-height: 180px;
    font-family: "Source Code Pro", monospace;
    font-size: 0.85rem;
}
.class-info-builder .btn-edit-include {
    margin-left: auto;
}
.class-info-builder .include-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.class-info-builder .dynamic-token-select {
    min-width: 150px;
}
.class-info-builder .layout-item.content-item { padding: 0.75rem; }
.class-info-builder .layout-item-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.class-info-builder .item-type {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 4.5rem;
}
.class-info-builder .include-name {
    flex: 1;
    font-family: "Source Code Pro", monospace;
    font-size: 0.9rem;
}
.class-info-builder .content-fields {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr);
    gap: 1rem;
}
.class-info-builder .content-save-include {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto;
    gap: 0.65rem;
    align-items: end;
}
@media (max-width: 760px) {
    .class-info-builder .content-save-include { grid-template-columns: 1fr; }
}
.class-info-builder .content-save-include label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}
.class-info-builder .content-save-status {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    margin: 0;
}
.class-info-builder .content-save-status.is-error { color: var(--wtc-red); }
.class-info-builder .content-save-status.is-success { color: var(--success, #1a7f37); }
.class-info-builder .include-scope-note {
    font-size: 0.8rem;
    color: var(--muted);
}
@media (max-width: 760px) {
    .class-info-builder .content-fields { grid-template-columns: 1fr; }
}
.class-info-builder .content-field label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}
.class-info-builder .rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}
.class-info-builder .rich-editor-toolbar .btn,
.class-info-builder .include-item-row .btn,
.class-info-builder .layout-item-header .btn,
.class-info-builder .include-actions .btn,
.class-info-builder .content-save-include .btn,
.class-info-builder .layout-actions .btn {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 11px 18px;
    font-size: 15px;
    line-height: 1.2;
    box-sizing: border-box;
    vertical-align: middle;
    border-radius: var(--radius-sm);
}
.class-info-builder .rich-editor-toolbar .dynamic-token-select {
    min-height: 2.5rem;
    width: auto;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
}
.class-info-builder .rich-editor {
    min-height: 160px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    color: var(--text);
    overflow-y: auto;
}
.class-info-builder .rich-editor:focus {
    outline: 2px solid var(--focus-ring);
    outline-offset: 1px;
}
.class-info-builder .rich-editor p { margin: 0 0 0.75rem; }
.class-info-builder .rich-editor p:last-child { margin-bottom: 0; }
.class-info-builder .rich-editor ul,
.class-info-builder .rich-editor ol { margin: 0 0 0.75rem 1.25rem; }
.class-info-builder .layout-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    margin-top: 0.75rem;
    align-items: end;
}
@media (max-width: 760px) {
    .class-info-builder .layout-actions { grid-template-columns: 1fr; }
}
.class-info-builder .drag-handle {
    color: var(--muted);
    user-select: none;
    font-size: 1.1rem;
    cursor: grab;
    touch-action: none;
}
.class-info-builder .layout-item.dragging .drag-handle {
    cursor: grabbing;
}
.class-info-builder .btn-remove {
    margin-left: auto;
}
.class-info-share-box {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 12px;
}
.class-info-share-box input { flex: 1; min-width: 220px; }
.card.class-info-public-card {
    padding: 20px 12px;
}
.class-info-page {
    max-width: none;
    margin: 0;
}
.class-info-page-title {
    font-family: Oswald, sans-serif;
    font-weight: 200;
    text-transform: none;
    letter-spacing: 0.02em;
    margin: 0 0 1.25rem;
}
.class-info-two-column,
.class-info-page .two-column-layout {
    display: flex;
    gap: 1rem;
    margin: 0;
}
.class-info-sidebar,
.class-info-page .column-sidebar {
    width: 25%;
    min-width: 140px;
}
.class-info-sidebar > h3,
.class-info-page .column-sidebar > h3 {
    font-size: 1.75rem;
    line-height: 1.2;
    margin: 0 0 0.75rem;
}
.class-info-main,
.class-info-page .column-main {
    width: 75%;
    flex: 1;
}
.class-info-page .column-main--video-center {
    display: block;
    width: 100%;
    align-self: stretch;
}
.class-info-page .column-main iframe,
.class-info-page .column-main video,
.class-info-page .class-info-main iframe,
.class-info-page .class-info-main video {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    background: #000;
}
.class-info-divider,
.class-info-page hr {
    border: 0;
    border-top: 3px solid var(--border);
    margin: 1.5rem 0;
}
.class-info-page .proficiency-table {
    width: 50%;
    border-collapse: collapse;
    margin-left: auto;
    margin-right: auto;
}
.class-info-page .course-table,
.class-info-page .proficiency-table {
    border-collapse: collapse;
}
.class-info-page .course-table-cell {
    border: 1px solid var(--border);
    background: var(--surface-muted);
    padding: 8px;
}
.class-info-page .course-table-header-row,
.class-info-page .course-table-header-row .course-table-cell {
    background: var(--lab-table-header-bg, var(--wtc-gray-85));
    color: var(--lab-table-header-text, #fff);
}
.class-info-page .proficiency-table .course-table-cell {
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
}
@media (max-width: 760px) {
    .class-info-two-column,
    .class-info-page .two-column-layout {
        flex-direction: column;
    }
    .class-info-sidebar,
    .class-info-main,
    .class-info-page .column-sidebar,
    .class-info-page .column-main {
        width: 100%;
    }
    .class-info-page .proficiency-table { width: 100%; }
}

/* Live monitor */
.class-live-quick-links {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}
.class-live-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.class-live-menu-toggle .class-live-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 5px;
    margin-left: 2px;
    border-radius: var(--radius-pill);
    border: 2px solid #fff;
    background: #fff;
    color: #BA0C2F;
    font-family: Calibri, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    flex-shrink: 0;
}
.btn.class-live-menu-toggle .class-live-badge,
.btn.class-live-menu-toggle:hover .class-live-badge,
.btn.class-live-menu-toggle:focus-visible .class-live-badge {
    background: #fff;
    color: #BA0C2F;
    border-color: #fff;
}
.class-live-badge:empty {
    display: none !important;
}
.class-live-menu-panel {
    min-width: 15rem;
    z-index: 40;
}
.class-live-menu-muted {
    color: var(--muted);
    cursor: default;
    font-weight: 600;
}
.class-live-menu-muted:hover {
    background: transparent;
}
.class-live-lab-action {
    display: inline-block;
    margin: 0;
}
.class-live-scope-hint {
    margin: 0;
    font-size: 0.85rem;
}
.class-live-labs-lab h3 {
    margin: 0 0 10px;
}
.class-live-labs-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.class-live-labs-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}
.class-live-labs-rows > .class-live-labs-row:first-child {
    border-top: 0;
    padding-top: 0;
}
.class-live-labs-row-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: min(100%, 16rem);
    flex: 1 1 14rem;
}
.class-live-labs-row-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.class-live-labs-schedule {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.9rem;
}
.class-live-labs-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.class-live-monitor-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.class-live-monitor-header h2 { margin: 0 0 4px; }
.class-live-lab-block + .class-live-lab-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.class-live-lab-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.class-live-lab-heading h3 { margin: 0; }
.class-live-lab-status {
    margin: 2px 0 0;
    font-size: 0.85rem;
}
.class-live-counts {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--muted);
}
.class-live-panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}
.class-live-panel h4 {
    margin: 0 0 8px;
    font-size: 1rem;
}
body.class-live-monitor-page .instructor-notifications-stack,
body.class-live-labs-page .instructor-notifications-stack {
    display: none !important;
}
body.class-live-monitor-page .shell > header,
body.class-live-monitor-page .brand-bar,
body.class-live-monitor-page .test-bar,
body.class-live-labs-page .shell > header,
body.class-live-labs-page .brand-bar,
body.class-live-labs-page .test-bar {
    display: none;
}
body.class-live-monitor-page .shell,
body.class-live-labs-page .shell {
    max-width: 1100px;
    padding-top: 12px;
}

/* Lab file downloads and resources manager */
.lab-file-downloads {
    margin: 0.85rem 0 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}
.lab-file-downloads-title {
    margin: 0 0 0.45rem;
    font-size: 1rem;
}
.lab-file-downloads-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}
.lab-file-downloads-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
}
.lab-file-download-link {
    font-weight: 600;
}
.lab-file-download-meta {
    font-size: 0.9rem;
}
.lab-resources-manager {
    display: grid;
    gap: 1rem;
}
.lab-resources-table {
    width: 100%;
    border-collapse: collapse;
}
.lab-resources-table th,
.lab-resources-table td {
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0.4rem;
    text-align: left;
    vertical-align: top;
}
.lab-resources-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.lab-resources-upload-warning {
    margin: 0.5rem 0 0;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, #f59e0b 18%, var(--surface-muted));
}
.lab-header .lab-file-downloads {
    margin-top: 0.75rem;
}

/* Course prep checklist */
.prep-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; margin:12px 0 0; }
.prep-summary-stat { padding:12px; border:1px solid var(--border,#d0d5dd); border-radius:8px; }
.prep-summary-stat strong { display:block; font-size:1.4rem; }
.prep-check { font-weight:700; margin-right:2px; }
.prep-check--ok { color:#1a7f37; }
.prep-check--missing { color:#BA0C2F; }
.prep-check--na { color:#667085; }
.prep-table { width:100%; border-collapse:collapse; }
.prep-table th, .prep-table td { padding:8px 10px; border-bottom:1px solid var(--border,#e4e7ec); text-align:left; vertical-align:top; }
.prep-table th { font-size:0.85rem; color:#667085; }
.prep-row-incomplete { background:rgba(186,12,47,0.04); }
.prep-upcoming { margin-bottom:1.5rem; }
.prep-lab-parts { list-style:none; padding:0; margin:0; }
.prep-lab-parts li { margin:4px 0; }
.prep-toggle-form { display:inline; }
.prep-bulk-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 12px; }
.prep-bulk-toolbar .prep-bulk-count { margin-right:4px; }
.prep-bulk-toolbar button:disabled { opacity:0.5; cursor:not-allowed; }
.prep-part-check, .prep-meeting-check { margin-right:6px; vertical-align:middle; }
.prep-select-col { width:2rem; }

/* Per-student lab extensions */
.lab-student-extension-note {
    margin: 0.5rem 0 0.75rem;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--save-ok) 10%, var(--card));
    border: 1px solid color-mix(in srgb, var(--save-ok) 40%, var(--border));
    font-weight: 600;
}
.lab-extension-tag {
    display: inline-block;
    margin-top: 0.3rem;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-sm);
    line-height: 1.3;
    font-size: 0.8rem;
    font-weight: 600;
    background: color-mix(in srgb, var(--save-ok) 14%, var(--card));
    border: 1px solid color-mix(in srgb, var(--save-ok) 40%, var(--border));
}
.lab-extensions-table tr.is-expired td:not(.submission-actions) { opacity: 0.6; }
.lab-extension-form { margin-top: 1rem; }
.lab-extension-form h4 { margin: 0; }
.lab-extension-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.25rem 1rem; }
.lab-extension-times > div { display: grid; gap: 0.25rem; }
.lab-extension-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
