.studio-form-page {
    display: grid;
    gap: var(--space-5);
}

.studio-form-hero {
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    color: var(--color-primary-contrast);
    background: linear-gradient(120deg, #11489d 0%, #1f6ac3 48%, #00a3c8 100%);
    box-shadow: var(--shadow-2);
}

.studio-form-title {
    margin: 0;
    font-size: var(--font-size-4);
    font-weight: var(--font-weight-bold);
}

.studio-form-subtitle {
    margin: var(--space-2) 0 0;
    opacity: 0.95;
}

.studio-form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: var(--space-5);
}

.studio-subject-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: 999px;
    background: rgba(21, 88, 192, 0.12);
    color: var(--color-text);
    font-size: var(--font-size-1);
    font-weight: var(--font-weight-medium);
    margin-bottom: var(--space-4);
}

.studio-form-grid {
    display: grid;
    gap: var(--space-4);
}

.studio-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.studio-form-card .table thead {
    background: var(--color-surface-muted);
}

.studio-form-card .table thead th {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-1);
    color: var(--color-text-muted);
    border-bottom-color: var(--color-border);
}

.studio-form-card .form-footer,
.studio-form-card .encoding-form-footer {
    padding: var(--space-4);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-muted);
    text-align: center;
}

.login-page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-studio-hero {
    border-radius: 0;
    padding: var(--space-5) var(--space-6);
    color: var(--color-primary-contrast);
    background: linear-gradient(120deg, #11489d 0%, #1f6ac3 48%, #00a3c8 100%);
    box-shadow: var(--shadow-2);
    text-align: center;
}

.login-studio-hero .studio-form-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.login-studio-hero .studio-form-subtitle {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.login-page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--space-5) var(--space-4);
}


.lesson-content-editor-page .card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.lesson-content-editor-page .card-header {
    background: var(--color-surface-muted);
    border-bottom: 1px solid var(--color-border);
}

.lesson-content-editor-page .breadcrumb {
    background: transparent;
}

.smh-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-4);
}

.smh-tree-header {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    padding: var(--space-4);
}

.smh-tree-content,
.smh-tree-lesson {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

/* A module hidden from students. Faculty still see the whole subtree — dimmed, and badged in the
   title — so the tree stays a faithful picture of the module rather than appearing to lose content.
   Dimming is paired with the badge: colour alone must never be the only signal. */
.smh-tree-content.smh-module-hidden {
    opacity: 0.65;
    border-style: dashed;
}

.smh-level-list {
    list-style: none;
    margin: var(--space-3) 0 0;
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

.smh-title {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

.smh-header-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-2);
    color: var(--color-uac-navy);
    text-decoration: none;
}

.smh-header-link:hover,
.smh-header-link:focus-visible {
    color: var(--color-primary);
    text-decoration: underline;
}

.smh-header-counts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.smh-header-counts .badge {
    background: var(--color-surface);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    font-weight: var(--font-weight-medium);
}

.smh-header-counts .badge.bg-secondary {
    background: var(--color-text-muted);
    color: var(--color-primary-contrast);
    border-color: transparent;
}

.smh-drag-handle {
    cursor: grab;
    margin-right: var(--space-2);
    color: var(--color-text-muted);
}

li[draggable="true"] {
    cursor: grab;
}

.smh-dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.smh-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.assessment-editor {
    display: grid;
    gap: var(--space-3);
}

.assessment-row {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-muted);
    padding: var(--space-3);
}

.smh-context-grid {
    display: grid;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.smh-context-grid .studio-subject-chip {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .studio-form-grid {
        grid-template-columns: 1fr;
    }
}
