:root {
    --dt-navy: #0F2942;
    --dt-teal: #0F766E;
    --dt-teal-dark: #115E59;
    --dt-cyan: #0891B2;
    --dt-background: #F5F7FA;
    --dt-surface: #FFFFFF;
    --dt-text: #172033;
    --dt-text-muted: #64748B;
    --dt-border: #E5E7EB;
    --dt-error: #B91C1C;
}

html, body {
    font-family: Inter, "Segoe UI", sans-serif;
    background-color: var(--dt-background);
    color: var(--dt-text);
}

a {
    color: var(--dt-teal);
}

.content {
    padding-top: 1.1rem;
}

html {
    scroll-padding-top: 5rem;
}

h1 {
    scroll-margin-top: 5rem;
}

h1:focus {
    outline: none;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.app-bar {
    border-bottom: 1px solid var(--dt-border);
    background: var(--dt-surface) !important;
    color: var(--dt-text);
    z-index: 1200;
}

.app-main {
    padding: calc(var(--mud-appbar-height, 64px) + 1.5rem) 1.5rem 2.5rem;
}

@media (min-width: 960px) {
    .app-main {
        padding: calc(var(--mud-appbar-height, 64px) + 1.75rem) 2rem 2.5rem;
    }
}

@media (max-width: 600px) {
    .app-user-name {
        display: none;
    }
}

.app-user-menu {
    position: relative;
}

.app-user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0.35rem 0.25rem 0.25rem;
    border-radius: 999px;
    list-style: none;
    color: inherit;
}

.app-user-chip::-webkit-details-marker {
    display: none;
}

.app-user-chip:hover,
.app-user-menu[open] > .app-user-chip {
    background: var(--dt-background);
}

.app-user-chip:focus-visible {
    outline: 2px solid var(--dt-teal);
    outline-offset: 2px;
}

.app-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--dt-teal);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 650;
    flex: none;
}

.app-user-name {
    font-size: 0.875rem;
    line-height: 1.43;
}

.app-user-chevron {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    flex: none;
}

.app-user-menu-panel {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 2;
    min-width: 11rem;
    padding: 0.35rem;
    background: var(--dt-surface);
    color: var(--dt-text);
    border: 1px solid var(--dt-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.app-user-menu-panel a,
.app-logout-button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: var(--dt-text);
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.43;
}

.app-user-menu-panel a:hover,
.app-logout-button:hover {
    background: var(--dt-background);
}

.app-logout-form {
    margin: 0;
}

.app-logout-button {
    appearance: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.app-sidebar {
    background-color: var(--dt-navy);
    background-image:
        radial-gradient(ellipse 140% 55% at 0% 100%, rgba(15, 118, 110, 0.45), transparent 62%),
        radial-gradient(ellipse 80% 40% at 100% 85%, rgba(8, 145, 178, 0.22), transparent 55%);
    border-right: none;
}

.app-sidebar::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(8.5rem, 38%, 18rem);
    pointer-events: none;
    background:
        linear-gradient(to bottom,
            #0F2942 0%,
            rgba(15, 41, 66, 0.28) 24%,
            rgba(15, 41, 66, 0.4) 58%,
            rgba(15, 41, 66, 0.86) 100%),
        url("/images/wreck.png") center 34% / cover no-repeat;
}

.app-sidebar .mud-drawer-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
}

.app-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    padding: 0.75rem 0.85rem 1.25rem;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.65rem 1.15rem;
    color: #fff;
}

.app-sidebar-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    background: rgba(15, 118, 110, 0.9);
    color: #fff;
}

.app-sidebar-nav {
    flex: 1 1 auto;
}

.app-sidebar .mud-nav-link {
    color: #E2E8F0;
    border-radius: 12px;
    margin: 0.15rem 0;
    font-weight: 500;
}

.app-sidebar .mud-nav-link .mud-nav-link-icon {
    color: #CBD5E1;
}

.app-sidebar .mud-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.app-sidebar .mud-nav-link.active,
.app-sidebar .mud-nav-link.active .mud-nav-link-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.app-sidebar-footer {
    padding: 1.25rem 0.75rem 0.25rem;
    color: #94A3B8;
}

.dashboard-card.mud-paper,
.dashboard-card {
    border: 1px solid var(--dt-border);
    border-radius: 16px;
    box-shadow: none;
    background: var(--dt-surface);
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.stat-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.stat-label {
    color: var(--dt-text-muted);
}

.stat-value {
    font-weight: 650;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0.15rem 0 0.5rem;
}

.mud-paper.dashboard-promo {
    overflow: hidden;
    border: 1px solid var(--dt-border);
    border-radius: 16px;
    background: var(--dt-surface);
}

.dashboard-promo-photo {
    height: 10rem;
    background: #0c3348 url("/images/turtle.png") 18% 42% / cover no-repeat;
}

.dashboard-promo-copy {
    padding: 1rem 1.25rem 1.15rem;
}

.dashboard-promo-org {
    color: var(--dt-text);
    font-weight: 600;
}

@media (max-width: 960px) {
    .app-sidebar::after {
        height: clamp(7.5rem, 32%, 14rem);
    }
}

.coming-soon-wrap {
    display: block;
    width: 100%;
}

.lesson-body,
.lesson-lead,
.lesson-prose,
.lesson-concepts {
    line-height: 1.7;
}

.lesson-body,
.lesson-lead {
    white-space: pre-wrap;
}

.lesson-lead {
    color: var(--dt-text-muted);
}

.lesson-illustration {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--dt-border);
    border-radius: 12px;
}

.lesson-prose p,
.lesson-prose ul {
    margin: 0 0 1rem;
}

.lesson-prose p:last-child,
.lesson-prose ul:last-child {
    margin-bottom: 0;
}

.lesson-prose h3 {
    margin: 1.75rem 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
}

.lesson-prose h3:first-child {
    margin-top: 0;
}

.lesson-prose ul,
.lesson-concepts ul {
    padding-left: 1.25rem;
}

.lesson-concepts ul {
    margin: 0.35rem 0 0;
}

.student-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--dt-surface);
    border: 1px solid var(--dt-border);
    border-radius: 16px;
    overflow: hidden;
    min-height: 8.5rem;
}

.student-hero-copy {
    padding: 1.5rem 1.75rem;
    max-width: 40rem;
}

.student-art {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.88);
    background:
        radial-gradient(circle at 30% 40%, rgba(8, 145, 178, 0.55), transparent 55%),
        linear-gradient(160deg, #0f2942 0%, #0f766e 100%);
}

.student-photo {
    display: block;
    object-fit: cover;
    min-width: 0;
}

.student-hero-art {
    width: min(50%, 34rem);
    font-size: 3rem;
    object-position: 35% 45%;
}

.student-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: var(--dt-teal);
    flex: 0 0 auto;
}

.continue-card {
    display: flex;
    min-height: 16rem;
    overflow: hidden;
}

.continue-card-main {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1 1 auto;
    padding: 1.5rem;
}

.continue-kicker {
    color: var(--dt-teal);
    letter-spacing: 0.08em;
}

.continue-title,
.quiz-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.continue-art {
    width: min(38%, 16rem);
    font-size: 3rem;
}

.student-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 1rem;
}

.student-course-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
}

.student-course-card:hover {
    color: inherit;
}

.student-art-card {
    width: 100%;
    height: 6.5rem;
    font-size: 2rem;
}

img.student-art-card {
    height: 8rem;
    object-position: center 40%;
}

.student-course-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem 1rem 1.1rem;
}

.student-course-name {
    font-weight: 600;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--dt-text-muted);
    font-size: 0.85rem;
}

.progress-row .student-progress {
    flex: 1 1 auto;
}

.student-due {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.next-steps,
.activity-list,
.quiz-key {
    list-style: none;
    margin: 0;
    padding: 0;
}

.next-steps {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.next-steps a,
.section-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
}

.next-steps a {
    padding: 0.35rem 0;
}

.next-steps a:hover .next-step-title,
.section-item:hover {
    color: var(--dt-teal);
}

.next-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: var(--dt-teal);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    flex: 0 0 auto;
}

.next-step-copy,
.activity-copy,
.section-select-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.next-step-title,
.activity-title,
.section-select-title {
    font-weight: 600;
}

.next-step-detail,
.activity-detail,
.section-select-meta {
    color: var(--dt-text-muted);
    font-size: 0.85rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--dt-border);
}

.activity-list li:first-child {
    border-top: none;
}

.school-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.activity-icon {
    display: inline-flex;
    color: var(--dt-teal);
    margin-top: 0.1rem;
}

.activity-time {
    margin-left: auto;
    color: var(--dt-text-muted);
    font-size: 0.8rem;
    white-space: nowrap;
}

.course-header-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
}

.course-header-copy {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    flex: 1 1 auto;
}

.course-header-action {
    flex: 0 0 auto;
}

.course-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    color: var(--dt-text-muted);
    font-size: 0.9rem;
}

.course-journey {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.course-journey-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    position: relative;
    padding: 0 0.4rem 0.25rem;
}

.course-journey-stage:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.05rem;
    left: calc(50% + 1.15rem);
    right: calc(-50% + 1.15rem);
    height: 2px;
    background: var(--dt-border);
}

.course-journey-stage.is-completed:not(:last-child)::after {
    background: var(--dt-teal);
}

.course-journey-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: var(--dt-background);
    color: #94a3b8;
    z-index: 1;
}

.course-journey-stage.is-completed .course-journey-dot {
    color: #10b981;
}

.course-journey-stage.is-current .course-journey-dot {
    color: var(--dt-teal);
}

.course-journey-stage.is-attention .course-journey-dot {
    color: #b45309;
}

.course-journey-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
}

.course-journey-timeline.mud-timeline {
    padding-inline: 0;
}

@media (max-width: 600px) {
    .course-journey {
        flex-direction: column;
        gap: 0.85rem;
        align-items: stretch;
    }

    .course-journey-stage {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0 0 0.15rem;
    }

    .course-journey-copy {
        align-items: flex-start;
    }

    .course-journey-stage:not(:last-child)::after {
        top: 2.15rem;
        left: 1.02rem;
        right: auto;
        width: 2px;
        height: calc(100% + 0.85rem);
    }
}

.course-section-heading {
    padding: 0.35rem 0.5rem 0.75rem;
}

.section-block.selected {
    background: rgba(15, 118, 110, 0.06);
    border-radius: 12px;
}

.section-select {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.55rem;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.section-items {
    display: flex;
    flex-direction: column;
    padding: 0 0.4rem 0.55rem 2.2rem;
}

.section-item {
    padding: 0.4rem 0.35rem;
    border-radius: 8px;
}

.section-item.current-item {
    background: rgba(15, 118, 110, 0.1);
}

.section-item-chevron {
    margin-left: auto;
    color: var(--dt-text-muted);
}

.section-continue {
    display: flex;
    justify-content: flex-end;
}

.status-completed {
    color: #10b981;
}

.status-current {
    color: var(--dt-teal);
}

.status-available {
    color: #94a3b8;
}

.lesson-sheet {
    min-height: 24rem;
}

.lesson-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.5rem;
}

.lesson-outline {
    position: static;
}

.quiz-question {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--dt-border);
    border-radius: 12px;
    background: var(--dt-surface);
    color: inherit;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.quiz-option.selected {
    border-color: var(--dt-teal);
    background: rgba(15, 118, 110, 0.08);
}

.quiz-option-mark {
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid #94a3b8;
    border-radius: 999px;
    flex: 0 0 auto;
}

.quiz-option.selected .quiz-option-mark {
    border-color: var(--dt-teal);
    box-shadow: inset 0 0 0 3px var(--dt-surface), inset 0 0 0 8px var(--dt-teal);
}

.quiz-map {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.quiz-map-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.6rem;
    border-radius: 999px;
    border: none;
    background: #e2e8f0;
    color: var(--dt-text);
    font-weight: 600;
    cursor: pointer;
}

.quiz-map-item.answered,
.quiz-key-dot.answered {
    background: var(--dt-teal);
    color: #fff;
}

.quiz-map-item.current,
.quiz-key-dot.current {
    background: #5eead4;
    color: var(--dt-navy);
}

.quiz-map-item.open,
.quiz-key-dot.open {
    background: #e2e8f0;
    color: var(--dt-text);
}

.quiz-key {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 1rem;
    color: var(--dt-text-muted);
    font-size: 0.9rem;
}

.quiz-key li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quiz-key-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
}

.quiz-score {
    letter-spacing: -0.03em;
}

.quiz-review {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.quiz-review-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--dt-border);
}

.quiz-incorrect {
    color: var(--dt-error);
}

@media (min-width: 1280px) {
    .lesson-outline {
        position: sticky;
        top: calc(var(--mud-appbar-height, 64px) + 1rem);
    }
}

@media (max-width: 960px) {
    .student-hero-art,
    .continue-art {
        display: none;
    }

    .course-header-layout,
    .lesson-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* MudBlazor opens a collapse with minmax(0, 1fr). In an auto-height grid that track
   resolves to 0px, so an expanded course stays blank. */
.instructor-courses .mud-collapse-entering,
.instructor-courses .mud-collapse-entered {
    display: block;
    height: auto;
    overflow: visible;
    grid-template-rows: none;
}

/* Instructor course content */
.content-outline-heading {
    padding: 0.75rem 0.4rem 0.25rem;
}

.content-outline-heading:first-child {
    padding-top: 0.25rem;
}

.content-outline-count {
    margin-left: auto;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: var(--dt-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.answer-key,
.answer-key-options,
.attempt-answers-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.answer-key {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.answer-key-question {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dt-border);
}

.answer-key-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.answer-key-options .quiz-option {
    cursor: default;
}

.quiz-option.is-correct {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.answer-key-label {
    margin-left: auto;
    color: #047857;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.attempt-answers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attempt-answers details {
    border: 1px solid var(--dt-border);
    border-radius: 12px;
    padding: 0.5rem 0.9rem;
}

.attempt-answers summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    cursor: pointer;
}

.attempt-answers-title {
    font-weight: 600;
}

.attempt-answers-date {
    margin-left: auto;
    font-size: 0.85rem;
}

.attempt-answers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 0 0.25rem;
}

.attempt-answers-list li {
    padding-left: 0.75rem;
    border-left: 3px solid #10b981;
}

.attempt-answers-list li.is-incorrect {
    border-left-color: var(--dt-error);
}

/* Legal documents (/legal/...) and the links to them in the sidebar. */
.app-sidebar-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.app-sidebar-legal a {
    color: #94A3B8;
    text-decoration: none;
}

.app-sidebar-legal a:hover,
.app-sidebar-legal a:focus-visible {
    color: #E2E8F0;
    text-decoration: underline;
}

.legal-document {
    max-width: 46rem;
    padding-block: 1rem 3rem;
}

.legal-language {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.legal-language span {
    font-weight: 600;
}

.legal-document h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    text-wrap: balance;
}

.legal-document h2 {
    margin: 2rem 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
}

.legal-document ol,
.legal-document ul {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.legal-document li {
    margin-bottom: 0.35rem;
}

/* Interface language switch in the app bar. */
.language-switch {
    display: inline-flex;
    margin: 0 0.5rem 0 0;
    border: 1px solid var(--dt-border);
    border-radius: 999px;
    padding: 2px;
}

.language-switch-option {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--dt-text-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
}

.language-switch-option:hover {
    color: var(--dt-text);
}

.language-switch-option.is-current {
    background: var(--dt-teal);
    color: #FFFFFF;
}

.language-switch-option:focus-visible {
    outline: 2px solid var(--dt-teal);
    outline-offset: 2px;
}

/* Account pages (sign-in, registration, invites, password, account settings). They render
   without interactivity, as plain HTML forms, so they use these classes instead of MudBlazor
   components, styled to match them. */
.auth-page {
    display: flex;
    justify-content: center;
    padding-block: 1.5rem 3rem;
}

.auth-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: min(100%, 27rem);
}

.auth-stack.is-wide {
    width: min(100%, 40rem);
}

.auth-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: var(--dt-surface);
    border: 1px solid var(--dt-border);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
}

@media (min-width: 600px) {
    .auth-card {
        padding: 2.25rem 2.25rem 2rem;
    }
}

.auth-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--dt-teal);
    margin-bottom: 0.25rem;
}

.auth-mark svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: currentColor;
}

.auth-mark.is-error {
    background: rgba(185, 28, 28, 0.08);
    color: var(--dt-error);
}

.auth-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.auth-section-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.auth-lead,
.auth-text {
    margin: 0;
    color: var(--dt-text-muted);
    line-height: 1.6;
}

.auth-text strong {
    color: var(--dt-text);
    font-weight: 600;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.auth-field label,
.auth-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dt-text);
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 1rem;
    color: var(--dt-text);
    background: var(--dt-surface);
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.auth-input:hover {
    border-color: #94A3B8;
}

.auth-input:focus {
    outline: none;
    border-color: var(--dt-teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

.auth-input:disabled {
    background: var(--dt-background);
    color: var(--dt-text-muted);
}

.auth-input.invalid {
    border-color: var(--dt-error);
}

.auth-input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.auth-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--dt-text-muted);
    line-height: 1.5;
}

.auth-form .validation-message {
    font-size: 0.8125rem;
    color: var(--dt-error);
}

.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--dt-text);
    cursor: pointer;
}

.auth-field label.auth-check {
    font-size: 0.9rem;
    font-weight: 400;
}

.auth-check input[type=checkbox] {
    flex: none;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.15rem 0 0;
    accent-color: var(--dt-teal);
    cursor: pointer;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
    border-radius: 10px;
    padding: 0.8rem 1.1rem;
    border: 1px solid var(--dt-teal);
    background: var(--dt-teal);
    color: #FFFFFF;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.auth-button:hover {
    background: var(--dt-teal-dark);
    border-color: var(--dt-teal-dark);
    color: #FFFFFF;
}

.auth-button:focus-visible,
.auth-link-button:focus-visible {
    outline: 2px solid var(--dt-cyan);
    outline-offset: 2px;
}

.auth-form > .auth-button {
    width: 100%;
    margin-top: 0.25rem;
}

.auth-button.is-secondary {
    background: transparent;
    color: var(--dt-teal);
}

.auth-button.is-secondary:hover {
    background: rgba(15, 118, 110, 0.08);
}

.auth-link-button {
    appearance: none;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--dt-teal);
    text-decoration: underline;
    cursor: pointer;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--dt-border);
    font-size: 0.9rem;
}

.auth-links a {
    font-weight: 500;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-alert {
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid transparent;
}

.auth-alert a {
    font-weight: 600;
}

.auth-alert.is-error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

.auth-alert.is-success {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #166534;
}

.auth-alert.is-info {
    background: #F0F9FF;
    border-color: #BAE6FD;
    color: #075985;
}

/* Admin tables list long email addresses; let them wrap instead of widening the page on phones. */
.admin-table td.mud-table-cell {
    overflow-wrap: anywhere;
}

/* The field names MudTable shows beside each value on small screens stay whole. */
.admin-table td.mud-table-cell::before {
    white-space: nowrap;
    padding-right: 12px;
}

.admin-wrap {
    overflow-wrap: anywhere;
}

.admin-facts th {
    text-align: left;
    font-weight: 500;
    width: 40%;
    vertical-align: top;
}

.two-factor-steps {
    padding-left: 1.25rem;
    display: grid;
    gap: 0.75rem;
}

.two-factor-qr {
    display: block;
    margin: 0.75rem 0 0.5rem;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
}

.recovery-codes {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.5rem;
}

.recovery-codes code {
    font-size: 1rem;
    letter-spacing: 0.05em;
}
