/* Reset and Base Styles */
.screenshot-paste {
    margin-top: 12px;
    padding: 16px;
    border: 2px dashed #174c7a;
    border-radius: 8px;
    background: #f0f7ff;
    overflow-wrap: anywhere;
}

.screenshot-paste:focus {
    outline: 3px solid #174c7a;
    outline-offset: 3px;
}

.screenshot-preview {
    display: block;
    max-width: 100%;
    max-height: 420px;
    margin: 12px auto;
    object-fit: contain;
}

.screenshot-status { margin-top: 8px; font-size: 0.9rem; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[hidden] {
    display: none !important;
}

body {
    background-color: #faf9f6; /* Chalkboard off-white background */
    color: #1a1a1a;
    line-height: 1.6;
}

.student-locked {
    overflow: hidden;
}

.student-locked #studentSite {
    display: none;
}

.student-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 24px;
    background: #fef08a;
}

.student-gate-card {
    width: min(520px, 100%);
    padding: 32px;
    border: 4px solid #1a1a1a;
    border-radius: 14px;
    background: #fff;
    box-shadow: 8px 8px 0 #1a1a1a;
}

.student-gate-card h1 {
    margin-bottom: 8px;
    line-height: 1.2;
}

.student-gate-card > p:not(.submit-status) {
    margin-bottom: 22px;
}

.gate-kicker {
    margin-bottom: 5px !important;
    color: #174c7a;
    font-size: 0.85rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-secondary {
    width: 100%;
    margin-top: 12px;
    padding: 11px 18px;
    border: 0;
    background: transparent;
    color: #174c7a;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    text-decoration: underline;
}

.student-session {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px 18px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 0.9rem;
    font-weight: 750;
}

.student-session button {
    border: 0;
    background: transparent;
    color: #174c7a;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.identity-summary {
    margin-bottom: 20px;
    padding: 10px 12px;
    border-left: 5px solid #174c7a;
    background: #e8f4ff;
    font-weight: 700;
}

.previous-submission {
    margin: -6px 0 20px;
    padding: 11px 13px;
    border: 2px solid #6aae78;
    border-radius: 7px;
    background: #effbf1;
    font-size: 0.9rem;
}

.previous-submission p {
    margin: 2px 0 0;
}

.previous-submission a {
    display: inline-block;
    margin-top: 6px;
    color: #174c7a;
    font-weight: 700;
    text-underline-offset: 3px;
}

.previous-submission .previous-submission-note {
    margin-top: 8px;
    color: #4b5563;
    font-size: 0.84rem;
}

.previous-submission.has-error {
    border-color: #d6a1a1;
    background: #fff3f3;
    color: #8f1717;
}

.assignment-page-card {
    max-width: 1180px;
}

.assignment-workspace {
    --assignment-gap: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 28px;
    align-items: start;
    margin-top: 26px;
}

.assignment-workspace.assignment-workspace-reading {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

.assignment-workspace-reading > .assignment-details {
    /* Match the description column of an assignment with a response field. */
    width: min(calc((100% - var(--assignment-gap)) * 0.55), calc(100% - 320px - var(--assignment-gap)));
}

.assignment-workspace-reading .assignment-kicker {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    border: 2px solid #1a1a1a;
    border-radius: 5px;
    background: #fef08a;
    color: #1a1a1a;
}

.assignment-workspace-reading .assignment-details h3 {
    font-weight: 850;
}

.assignment-workspace-reading .assignment-copy strong,
.assignment-workspace-reading .assignment-markdown-heading {
    font-weight: 800;
}

.assignment-reading-note {
    margin: 16px 0 24px;
    padding: 14px 16px;
    border-left: 5px solid #b38a15;
    border-radius: 0 8px 8px 0;
    background: #f9edb8;
    color: #554313;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.6;
}

.assignment-part {
    margin: 20px 4px 0 0;
    border: 3px solid #1a1a1a;
    border-radius: 10px;
    background: #fffdf0;
    box-shadow: 4px 4px 0 #1a1a1a;
    overflow: hidden;
}

.assignment-part > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: #fef08a;
    cursor: pointer;
    font-weight: 850;
    line-height: 1.35;
    list-style: none;
    transition: background-color 0.15s ease;
}

.assignment-part > summary::-webkit-details-marker { display: none; }
.assignment-part:nth-of-type(even) > summary { background: #a2d2ff; }
.assignment-part > summary:hover { background: #ffe66d; }
.assignment-part:nth-of-type(even) > summary:hover { background: #89c6ff; }
.assignment-part[open] > summary { border-bottom: 3px solid #1a1a1a; }

.assignment-part-icon {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    background: #fff;
    font-size: 1.3rem;
    line-height: 1;
}

.assignment-part-icon::before { content: '+'; }
.assignment-part[open] .assignment-part-icon::before { content: '−'; }

.assignment-part > summary:focus-visible {
    outline: 3px solid #1a1a1a;
    outline-offset: -6px;
}

.assignment-part > .assignment-workspace {
    --assignment-gap: 20px;
    margin-top: 0;
    padding: 20px;
    gap: 20px;
}

.assignment-part .assignment-response {
    position: static;
}

.assignment-part form {
    min-width: 0;
}

.assignment-details,
.assignment-response {
    min-width: 0;
    padding: 24px;
    border: 3px solid #1a1a1a;
    border-radius: 10px;
}

.assignment-details {
    background: #fffdf0;
    box-shadow: 4px 4px 0 #1a1a1a;
}

.assignment-response {
    position: sticky;
    top: 18px;
    background: #fff;
}

.assignment-details h3,
.assignment-response h3 {
    margin-bottom: 12px;
    font-size: 1.35rem;
    line-height: 1.25;
}

.assignment-details h4 {
    margin: 24px 0 8px;
}

.assignment-kicker {
    margin-bottom: 5px;
    color: #174c7a;
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.assignment-deadline {
    width: fit-content;
    margin-bottom: 20px;
    padding: 5px 9px;
    border-radius: 5px;
    background: #fef08a;
    font-weight: 750;
}

.assignment-copy {
    white-space: pre-wrap;
}

.assignment-copy + .assignment-copy {
    margin-top: 14px;
}

.assignment-markdown-quote {
    margin: 18px 0;
    padding: 16px 20px;
    border-left: 4px solid #174c7a;
    border-radius: 0 6px 6px 0;
    background: #f1f5f9;
    overflow-wrap: anywhere;
}

.assignment-markdown-quote > :first-child {
    margin-top: 0;
}

.assignment-markdown-quote > :last-child {
    margin-bottom: 0;
}

.assignment-details .assignment-copy a,
.assignment-markdown-list a {
    color: #174c7a;
    font-weight: 700;
    text-underline-offset: 3px;
}

.assignment-markdown-heading {
    margin: 22px 0 8px;
    font-size: 1.08rem;
}

.assignment-markdown-list {
    margin: 10px 0 18px;
    padding-left: 24px;
}

.assignment-markdown-list li + li {
    margin-top: 6px;
}

.assignment-markdown-list .assignment-markdown-list {
    margin: 6px 0 3px;
    padding-left: 24px;
}

.assignment-markdown-list .assignment-markdown-list li + li {
    margin-top: 4px;
}

.assignment-inline-code {
    padding: 1px 5px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #f3f4f6;
    color: #7c2d12;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
}

.assignment-code-wrapper {
    position: relative;
    margin: 14px 0 18px;
}

.assignment-code-language {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #cbd5e1;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.72rem;
    text-transform: lowercase;
}

.assignment-code-block {
    overflow-x: auto;
    padding: 18px;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    background: #172033;
    color: #f8fafc;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre;
    tab-size: 4;
}

.assignment-code-block code {
    font: inherit;
}

.assignment-task-list,
.assignment-sources {
    padding-left: 24px;
}

.assignment-task-list li + li {
    margin-top: 8px;
}

.assignment-sources {
    display: grid;
    gap: 9px;
    padding-left: 0;
    list-style: none;
}

.assignment-sources li {
    display: flex;
    align-items: baseline;
    gap: 5px 8px;
    flex-wrap: wrap;
    padding: 11px 12px;
    border: 1px solid #d3ceb0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.72);
}

.assignment-sources a {
    color: #174c7a;
    font-weight: 700;
    text-underline-offset: 3px;
}

.assignment-sources a::after {
    content: " ↗";
    color: #6b7280;
    font-size: 0.78em;
    text-decoration: none;
}

.source-name-badge {
    padding: 1px 7px;
    border: 1px solid #a7a7a7;
    border-radius: 999px;
    background: #f2f2f2;
    color: #555;
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.5;
    white-space: nowrap;
}

.source-description {
    flex-basis: 100%;
    padding-left: 1px;
    color: #555;
    font-size: 0.88rem;
    line-height: 1.45;
}

.assignment-figure {
    margin-top: 22px;
}

.assignment-figure img {
    display: block;
    width: 100%;
    max-height: 440px;
    padding: 10px;
    object-fit: contain;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
}

.assignment-figure figcaption {
    margin-top: 7px;
    color: #555;
    font-size: 0.88rem;
}

.word-counter {
    margin-top: 9px;
    color: #444;
    font-size: 0.9rem;
    font-weight: 750;
    text-align: right;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Chalk Yellow */
header {
    background-color: #fef08a; 
    color: #1a1a1a;
    padding: 35px 0;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 4px solid #1a1a1a;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
}

header p {
    font-size: 1rem;
    margin-top: 5px;
    font-weight: 600;
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.tab-btn {
    padding: 10px 22px;
    border: 3px solid #1a1a1a;
    background-color: #ffffff;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 3px 3px 0px #1a1a1a;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.tab-btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px #1a1a1a;
}

/* Active Tab - Chalk Blue */
.tab-btn.active {
    background-color: #a2d2ff; 
}

/* Cards */
.card {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    border: 3px solid #1a1a1a;
    box-shadow: 6px 6px 0px #1a1a1a;
    margin-bottom: 30px;
}

.card h2 {
    color: #1a1a1a;
    margin-bottom: 15px;
    border-bottom: 3px solid #1a1a1a;
    padding-bottom: 10px;
    font-weight: 800;
}

.class-message {
    background: #fff8d6;
    text-align: center;
    overflow-wrap: anywhere;
}

.class-message > * + * {
    margin-top: 12px;
}

.class-message :is(h2, h3, h4, h5, h6) {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
    line-height: 1.3;
}

/* Download List - Chalk Green Buttons */
.file-list {
    list-style: none;
    margin-top: 20px;
}

.file-list li {
    margin-bottom: 15px;
}

.btn-download {
    display: inline-block;
    background-color: #b9fbc0; 
    color: #1a1a1a;
    padding: 12px 20px;
    text-decoration: none;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 4px 4px 0px #1a1a1a;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-download:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #1a1a1a;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.additional-file-field {
    margin-top: 16px;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a1a1a;
}

input[type="text"], textarea {
    width: 100%;
    padding: 12px;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    font-size: 16px;
    background-color: #ffffff;
    box-shadow: 3px 3px 0px #1a1a1a;
}

select,
input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
    color: #1a1a1a;
    font-size: 16px;
}

select:focus-visible,
input[type="file"]:focus-visible {
    outline: 3px solid #a2d2ff;
    outline-offset: 2px;
}

.form-intro {
    margin-bottom: 20px;
}

.field-help {
    margin-top: 7px;
    color: #555;
    font-size: 0.875rem;
}

.form-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.submit-status {
    min-height: 1.6em;
    margin-top: 14px;
    font-weight: 700;
}

.submit-status.success {
    color: #126128;
}

.submit-status.error {
    color: #a01616;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    background-color: #f0f7ff; 
}

/* Submit Button - Chalk Green */
.btn-primary {
    background-color: #b9fbc0; 
    color: #1a1a1a;
    padding: 14px 20px;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    width: 100%;
    box-shadow: 4px 4px 0px #1a1a1a;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #1a1a1a;
}

#statusMessage {
    margin-top: 15px;
    font-weight: 800;
    text-align: center;
}

/* Disabled Tab State */
.tab-btn.disabled {
    background-color: #e0e0e0;
    color: #888888;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
    border-color: #888888;
}

/* Rating Scale (Number Line) */
.rating-scale {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.rating-option {
    flex: 1;
    min-width: 32px;
    text-align: center;
}

input[type="radio"] {
    display: none; /* Hide default radio circle */
}

.rating-option span {
    display: block;
    padding: 10px 0;
    background-color: #ffffff;
    border: 3px solid #1a1a1a;
    border-radius: 6px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 2px 2px 0px #1a1a1a;
    transition: all 0.1s ease;
}

.rating-option input[type="radio"]:checked + span {
    background-color: #fef08a; /* Pastel Yellow when selected */
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px #1a1a1a;
}

/* Checkbox Grid */
/* Flexibele knoppen die meeschalen met de tekstlengte */
.checkbox-grid {
    display: flex;
    flex-wrap: wrap;       /* Zorgt dat knoppen naar de volgende regel springen als de rij vol is */
    gap: 10px;
    margin-top: 8px;
}

.custom-checkbox {
    display: inline-flex;
    width: auto;           /* Geen vaste kolombreedte meer */
    cursor: pointer;
}

.custom-checkbox span {
    width: auto;
    white-space: nowrap;   /* Houdt de tekst altijd strak op 1 regel */
    padding: 10px 16px;    /* Comfortabele klikruimte aan de zijkanten */
    font-size: 0.95rem;
    min-height: 44px;      /* Prettige hoogte voor touchscreens */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 3px solid #1a1a1a;
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
    box-shadow: 2px 2px 0px #1a1a1a;
    transition: all 0.1s ease;
}

/* Mobiele veiligheid: op hele kleine schermen mag een extra lange tekst toch afbreken */
@media (max-width: 480px) {
    .custom-checkbox span {
        white-space: normal;
        text-align: center;
    }
}

.custom-checkbox input[type="checkbox"] {
    display: none; /* Hide default checkbox */
}

.custom-checkbox input[type="checkbox"]:checked + span {
    background-color: #a2d2ff; /* Pastel Blue when selected */
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px #1a1a1a;
}

.other-input-container {
    margin-top: 12px;
}

/* Class Sub-Tabs */
.class-tab-nav {
    display: flex;
    gap: 8px;
    margin: 20px 0 15px 0;
    flex-wrap: wrap;
}

.class-btn {
    padding: 8px 16px;
    border: 3px solid #1a1a1a;
    background-color: #ffffff;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 2px 2px 0px #1a1a1a;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.class-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #1a1a1a;
}

/* Active Class Sub-Tab - Pastel Yellow */
.class-btn.active {
    background-color: #fef08a; 
}

/* Kennen & Kunnen */
.knowledge-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding: 14px 18px;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    background-color: #a2d2ff;
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    box-shadow: 4px 4px 0 #1a1a1a;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.knowledge-toggle:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #1a1a1a;
}

.knowledge-toggle:focus-visible {
    outline: 3px solid #1a1a1a;
    outline-offset: 4px;
}

.knowledge-toggle-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.knowledge-panel {
    margin-top: 14px;
    padding: 20px;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    background-color: #f0f7ff;
}

.knowledge-panel[hidden] {
    display: none;
}

.knowledge-panel h3 {
    margin-bottom: 2px;
    font-size: 1.15rem;
}

.knowledge-updated {
    margin-bottom: 16px;
    color: #555;
    font-size: 0.875rem;
    font-weight: 600;
}

.knowledge-section + .knowledge-section {
    margin-top: 18px;
}

.knowledge-section h4 {
    margin-bottom: 6px;
    font-size: 1rem;
}

.knowledge-section ul {
    padding-left: 24px;
}

.knowledge-section li {
    margin-bottom: 6px;
}

.knowledge-section li::marker {
    color: #1a1a1a;
    font-weight: 800;
}

.knowledge-section li.important {
    padding: 3px 6px;
    background-color: #fef08a;
    border-radius: 4px;
    font-weight: 700;
}

.knowledge-status {
    font-style: italic;
}

.presentation-heading {
    margin-top: 24px;
    font-size: 1.1rem;
}

/* Lesson roadmap and materials */
.lesson-overview {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
    gap: 28px;
    margin-top: 28px;
    align-items: start;
}

.roadmap-column,
.materials-column {
    min-width: 0;
}

.column-heading {
    margin-bottom: 18px;
}

.column-heading h3 {
    font-size: 1.35rem;
    line-height: 1.2;
}

.column-kicker {
    display: block;
    color: #555;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.roadmap-series {
    --series-color: #a2d2ff;
    padding: 0 0 14px;
}

.roadmap-series.series-1 { --series-color: #b9fbc0; }
.roadmap-series.series-2 { --series-color: #fef08a; }
.roadmap-series.series-3 { --series-color: #ffc6ff; }

.roadmap-series h4 {
    display: inline-block;
    margin: 0 0 14px 4px;
    padding: 6px 11px;
    border: 2px solid #1a1a1a;
    border-radius: 999px;
    background: var(--series-color);
    font-size: 0.88rem;
    line-height: 1.2;
}

.roadmap-item {
    position: relative;
    padding: 0 0 22px 0;
}

.roadmap-item:not(:last-child)::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: 48px;
    bottom: -2px;
    left: 24px;
    border-left: 3px dashed #1a1a1a;
}

.roadmap-lesson {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 13px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.lesson-number {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 3px solid #1a1a1a;
    border-radius: 10px;
    background: var(--series-color);
    box-shadow: 4px 4px 0 #1a1a1a;
    font-size: 1.2rem;
    font-weight: 900;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.roadmap-lesson:hover .lesson-number,
.roadmap-lesson[aria-expanded="true"] .lesson-number {
    transform: translate(-2px, -2px) rotate(-2deg);
    box-shadow: 6px 6px 0 #1a1a1a;
}

.roadmap-lesson:focus-visible {
    outline: 3px solid #1a1a1a;
    outline-offset: 5px;
    border-radius: 8px;
}

.lesson-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 8px;
}

.lesson-summary strong {
    flex-basis: 100%;
    line-height: 1.3;
}

.lesson-summary > span:not(.active-label) {
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
}

.active-label {
    padding: 2px 8px;
    border: 2px solid #1a1a1a;
    border-radius: 999px;
    background: #ff9f1c;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.roadmap-item.is-active .lesson-number {
    background: #ff9f1c;
}

.lesson-popover {
    position: relative;
    margin: 12px 0 0 63px;
    padding: 14px;
    border: 3px solid #1a1a1a;
    border-radius: 9px;
    background: #fff;
    box-shadow: 4px 4px 0 #1a1a1a;
}

.lesson-popover::before {
    content: "";
    position: absolute;
    top: -9px;
    left: 18px;
    width: 14px;
    height: 14px;
    border-top: 3px solid #1a1a1a;
    border-left: 3px solid #1a1a1a;
    background: #fff;
    transform: rotate(45deg);
}

.lesson-popover[hidden] { display: none; }
.lesson-popover p { margin-bottom: 10px; font-size: 0.92rem; }
.popover-files-label { display: block; margin: 10px 0 6px; font-size: 0.82rem; }

.popover-homework {
    margin-bottom: 11px;
    padding: 10px;
    border-left: 5px solid #a2d2ff;
    background: #f0f7ff;
}

.popover-homework-text {
    margin-top: 4px;
}

.popover-homework-text p {
    margin: 4px 0 0;
}

.popover-homework-text .assignment-markdown-heading {
    margin: 10px 0 4px;
    font-size: 0.92rem;
}

.popover-homework-text .assignment-markdown-list,
.popover-homework-text .assignment-task-list {
    margin: 6px 0 0;
    padding-left: 20px;
    font-size: 0.9rem;
}

.popover-homework-text a {
    color: #174c7a;
    font-weight: 700;
}

.popover-homework-text .assignment-code-block {
    max-height: 220px;
    padding: 11px;
    font-size: 0.78rem;
}

.submit-shortcut {
    margin-top: 10px;
    padding: 8px 10px;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    background: #fef08a;
    color: #1a1a1a;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.submit-shortcut:hover { transform: translateY(-1px); }
.submit-shortcut:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 3px; }

.lesson-files-card {
    padding: 17px;
    border: 3px solid #1a1a1a;
    border-radius: 10px;
    background: #fff;
    box-shadow: 4px 4px 0 #1a1a1a;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lesson-files-card + .lesson-files-card { margin-top: 10px; }
.lesson-files-card.is-active { border-left: 9px solid #ff9f1c; }
.lesson-files-card.is-selected { background: #f0f7ff; transform: translateX(3px); }

.files-card-heading {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 13px;
}

.files-card-heading > span {
    flex: 0 0 auto;
    padding: 3px 8px;
    border: 2px solid #1a1a1a;
    border-radius: 5px;
    background: #fef08a;
    font-size: 0.78rem;
    font-weight: 900;
}

.files-card-heading h4 { line-height: 1.3; }

.files-card-due {
    margin: -5px 0 12px;
    color: #555;
    font-size: 0.85rem;
    font-weight: 700;
}

.lesson-file-links {
    display: grid;
    gap: 9px;
    list-style: none;
}

.material-link {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border: 2px solid #1a1a1a;
    border-radius: 7px;
    background: #b9fbc0;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.25;
}

.material-link.type-assignment { background: #a2d2ff; }
.material-link.type-answer { background: #fef08a; }
.material-link:hover { filter: brightness(0.96); transform: translateY(-1px); }
.material-link:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 3px; }
.material-link small { margin-bottom: 2px; font-size: 0.72rem; font-weight: 900; text-transform: uppercase; }
.material-link span { font-weight: 750; overflow-wrap: anywhere; }
.lesson-file-links.compact .material-link { padding: 8px 10px; font-size: 0.88rem; }
.lesson-popover .lesson-file-links + .lesson-file-links { margin-top: 10px; }

.material-assignment-link {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 9px;
    padding: 10px 12px;
    border: 2px solid #1a1a1a;
    border-radius: 7px;
    background: #fef08a;
    color: #1a1a1a;
    cursor: pointer;
    text-align: left;
}

.material-assignment-link:hover {
    background: #fde978;
    transform: translateY(-1px);
}

.material-assignment-link:focus-visible {
    outline: 3px solid #1a1a1a;
    outline-offset: 3px;
}

.material-assignment-link small {
    margin-bottom: 2px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.material-assignment-link span {
    font-weight: 750;
    overflow-wrap: anywhere;
}

.assignment-file-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.lesson-file-links.compact .assignment-file-pair { grid-template-columns: 1fr; }

@media (max-width: 520px) {
    .assignment-file-pair { grid-template-columns: 1fr; }
}

.material-group {
    padding: 0;
    border: 3px solid #1a1a1a;
    border-radius: 12px;
    background: #f7f7f7;
    box-shadow: 5px 5px 0 #1a1a1a;
    overflow: hidden;
}

.material-group + .material-group { margin-top: 20px; }
.material-group.is-active { border-top: 9px solid #ff9f1c; }

.material-group-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    cursor: pointer;
    list-style: none;
}

.material-group-heading::-webkit-details-marker { display: none; }

.material-group-heading::after {
    content: "+";
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    background: #fff;
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
}

.material-group[open] > .material-group-heading::after { content: "−"; }
.material-group-heading:hover { background: #eeeeee; }
.material-group-heading:focus-visible { outline: 3px solid #1a1a1a; outline-offset: -5px; }
.material-group-heading h4 { font-size: 1.08rem; line-height: 1.3; }

.material-group-body {
    padding: 0 17px 17px;
}

.lesson-file-links.group-files { margin-bottom: 14px; }

.group-homework-note {
    margin-bottom: 7px;
    color: #555;
    font-size: 0.85rem;
    font-weight: 800;
}

.material-group .lesson-files-card {
    box-shadow: 3px 3px 0 #1a1a1a;
}

/* Huiswerk opdrachten */
.homework-section {
    margin-top: 28px;
}

.homework-section h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.homework-assignment {
    margin-bottom: 12px;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
    box-shadow: 3px 3px 0 #1a1a1a;
    overflow-wrap: anywhere;
}

.homework-assignment summary {
    padding: 14px 16px;
    border-radius: 5px;
    background: #fef08a;
    cursor: pointer;
    font-weight: 700;
}

.homework-assignment summary:hover {
    background: #fde978;
}

.homework-assignment summary:focus-visible {
    outline: 3px solid #1a1a1a;
    outline-offset: -5px;
}

.homework-due {
    display: block;
    margin-top: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.homework-body {
    padding: 16px;
    border-top: 2px solid #1a1a1a;
}

.homework-text {
    white-space: pre-wrap;
}

.homework-links {
    padding-left: 20px;
}

.homework-tasks {
    padding-left: 24px;
}

.homework-tasks li + li {
    margin-top: 10px;
}

.homework-text + .homework-links,
.homework-tasks + .homework-links {
    margin-top: 12px;
}

.homework-links a {
    color: #174c7a;
    text-underline-offset: 3px;
}

.homework-links li {
    display: flex;
    align-items: baseline;
    gap: 8px 16px;
    flex-wrap: wrap;
}

.homework-links .homework-answer-link {
    color: #236b2d;
    font-weight: 750;
}

.homework-section .knowledge-status {
    margin-bottom: 12px;
}

/* Docentenoverzicht */
.admin-container {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
}

.admin-filters {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-filters .form-group {
    flex: 1 1 220px;
    margin: 0;
}

.admin-switch { margin-bottom: 18px; }
.admin-switch a { color: #075985; font-weight: 700; }
.feedback-list { display: grid; gap: 16px; }
.feedback-item {
    padding: 18px;
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
    box-shadow: 3px 3px 0 #1a1a1a;
}
.feedback-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.feedback-meta time { margin-left: auto; color: #555; font-size: 0.9rem; }
.feedback-item p { overflow-wrap: anywhere; }

.admin-filter-button {
    min-height: 49px;
}

.admin-reset {
    padding: 10px 0;
    color: #174c7a;
}

.admin-count {
    margin: 22px 0 12px;
}

.table-scroll {
    overflow-x: auto;
}

.submission-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.submission-table th,
.submission-table td {
    padding: 11px;
    border: 2px solid #1a1a1a;
    text-align: left;
    vertical-align: top;
}

.submission-table th {
    background: #fef08a;
}

.submission-table small,
.latest-badge {
    display: block;
}

.answer-cell {
    min-width: 240px;
    max-width: 440px;
    white-space: normal;
    overflow-wrap: anywhere;
}

textarea.code-answer,
.submitted-code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    tab-size: 4;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

.submitted-code {
    max-width: 440px;
    margin: 0;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 6px;
}

.latest-badge {
    width: fit-content;
    margin-top: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #a2d2ff;
    font-size: 0.72rem;
    font-weight: 800;
}

.status-badge {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 5px;
    font-weight: 800;
    white-space: nowrap;
}

.status-badge.on-time {
    background: #b9fbc0;
}

.status-badge.late {
    background: #ffc5c5;
}

.download-link {
    color: #174c7a;
    font-weight: 700;
}

@media (max-width: 600px) {
    .card {
        padding: 20px;
    }

    .tab-nav {
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .tab-btn {
        flex: 0 0 auto;
    }
}

@media (max-width: 760px) {
    .lesson-overview { grid-template-columns: 1fr; gap: 34px; }
    .lesson-popover { margin-left: 0; }
    .lesson-popover::before { left: 18px; }
    .assignment-workspace { grid-template-columns: 1fr; }
    .assignment-workspace-reading > .assignment-details { width: 100%; }
    .assignment-response { position: static; }
}
.topic-layout.has-topics {
    position: relative;
}
.topic-content { min-width: 0; }
.topic-layout.feedback-active .topic-nav { display: none; }
.topic-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 14px;
}
.topic-btn {
    padding: 10px 12px;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: pointer;
}
.topic-btn:hover { background: #f0f7ff; }
.topic-btn.active {
    background: #a2d2ff;
    color: #1a1a1a;
    box-shadow: 3px 3px 0 #1a1a1a;
}
.topic-btn:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
.topic-btn:disabled { cursor: wait; opacity: 0.6; }
.topic-btn { max-width: 100%; }
/* Keep the content centered at its original width; use the outer margin for topics. */
@media (min-width: 1516px) {
    .topic-nav {
        position: absolute;
        top: 0;
        left: -148px;
        width: 148px;
        flex-direction: column;
        margin-bottom: 0;
    }
}
