/* Admin panel styles, based on the approved admin mockup (Project Plan v3 §6). */

:root {
    --green: #2e6b3f;
    --green-dark: #1f4d2b;
    --green-light: #4f8f5b;
    --green-soft: #eef5ee;
    --border: #d5e3d6;
    --topbar: #2b3a2e;
    --sidebar: #f5f8f5;
    --text: #1e2b22;
    --muted: #6b7b70;
    --warn: #b07a14;
    --warn-soft: #fdf5e4;
    --danger: #c62f3f;
    --danger-soft: #fdecee;
    --radius: 10px;
    --font: "Segoe UI", system-ui, -apple-system, "Open Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    background: #fff;
}

a { color: var(--green); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h1:focus { outline: none; }
code { font-size: .85em; background: var(--green-soft); padding: 0 .25em; border-radius: 4px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ok { color: var(--green); }
.warn { color: var(--warn); }

/* ---------- Shell ---------- */

.shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    background: var(--topbar);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 1.25rem;
}

.brand { color: #fff; font-weight: 600; text-decoration: none; }
.topbar-user { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.topbar-user form { margin: 0; }
.btn-link-light { background: none; border: 0; color: #cfe3d3; cursor: pointer; font: inherit; text-decoration: underline; }

.shell-body { flex: 1; display: flex; }

.sidebar {
    width: 210px;
    flex-shrink: 0;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 1rem .5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: block;
    padding: .5rem .75rem;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

.nav-item:hover { background: var(--green-soft); }
.nav-item.active { background: var(--green-soft); color: var(--green); font-weight: 600; }
.nav-item.disabled { color: #a9b5ac; cursor: default; }
.nav-item.disabled:hover { background: none; }

.content { flex: 1; padding: 1.5rem 2rem 3rem; max-width: 1100px; }

@media (max-width: 760px) {
    .shell-body { flex-direction: column; }
    .sidebar { width: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
    .content { padding: 1rem; }
}

/* ---------- Page structure ---------- */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-header p { margin: .25rem 0 0; }
.back { display: inline-block; margin-bottom: .35rem; font-size: .9rem; text-decoration: none; }

.card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    background: #fff;
}

.card-muted { background: var(--sidebar); }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.empty { border: 1px dashed var(--border); border-radius: 14px; padding: 2rem; text-align: center; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin: 1rem 0; }
.tile {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
    text-decoration: none;
    color: var(--text);
}
.tile:hover { border-color: var(--green); background: var(--green-soft); }
.tile-number { font-size: 1.8rem; font-weight: 600; color: var(--green); }
.steps li { margin-bottom: .4rem; }

/* ---------- Tables ---------- */

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--muted); padding: .5rem .6rem; border-bottom: 2px solid var(--border); }
.table td { padding: .6rem; border-bottom: 1px solid var(--border); }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--green-soft); }
.table a { text-decoration: none; font-weight: 600; }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.field > span { font-weight: 600; font-size: .9rem; }
.field-narrow { max-width: 180px; }

.input, .field input:not([type=checkbox]):not([type=file]), .field select, .field textarea {
    width: 100%;
    font: inherit;
    padding: .5rem .65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
    outline: 2px solid var(--green-light);
    outline-offset: -1px;
    border-color: var(--green-light);
}

textarea.input { resize: vertical; }
.checkbox { display: inline-flex; align-items: center; gap: .45rem; margin: .25rem 1.25rem .6rem 0; cursor: pointer; }
.checkbox input { width: 1rem; height: 1rem; accent-color: var(--green); }
.checkbox-row { display: flex; flex-wrap: wrap; }

.form-actions { display: flex; gap: .5rem; align-items: center; margin-top: .5rem; flex-wrap: wrap; }
.push-right { margin-left: auto; }

.sticky-actions {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, .95);
    padding: .75rem 0;
    border-top: 1px solid var(--border);
}

.subsection { border-top: 1px solid var(--border); padding-top: .6rem; margin-top: .6rem; }
.subsection > summary { cursor: pointer; font-weight: 600; margin-bottom: .6rem; }

.invalid { outline: 1px solid var(--danger); }
.validation-message { color: var(--danger); font-size: .85rem; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    font: inherit;
    font-weight: 600;
    padding: .5rem 1rem;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-dark); }
.btn-secondary { background: #fff; color: var(--green); border-color: var(--green); }
.btn-secondary:hover:not(:disabled) { background: var(--green-soft); }
.btn-danger-outline { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger-outline:hover:not(:disabled) { background: var(--danger-soft); }
.btn-small { padding: .25rem .65rem; font-size: .85rem; }
.btn-block { width: 100%; }

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    color: var(--muted);
    flex-shrink: 0;
}

.btn-icon:hover:not(:disabled) { color: var(--text); border-color: var(--green); }
.btn-icon:disabled { opacity: .35; cursor: default; }

.chip {
    font: inherit;
    font-size: .85rem;
    padding: .2rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

.chip-on { background: var(--green); border-color: var(--green); color: #fff; }
.months { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------- Status ---------- */

.badge { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-draft { background: #eceff0; color: #52605a; }
.badge-inreview { background: var(--warn-soft); color: var(--warn); }
.badge-published { background: var(--green); color: #fff; }
.badge-archived { background: #eceff0; color: #8a948e; text-decoration: line-through; }

.status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid var(--border);
    background: var(--sidebar);
    border-radius: 14px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

.status-bar-state, .status-bar-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.risky-note { flex-basis: 100%; background: var(--warn-soft); color: #6e4d0d; border-radius: 8px; padding: .5rem .75rem; }
.risky-note .checkbox { margin: .4rem 0 0; display: flex; }

.alert { border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; }
.alert ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.alert-error { background: var(--danger-soft); color: #8a1f2b; border: 1px solid #f3c4ca; }
.alert-success { background: var(--green-soft); color: var(--green-dark); border: 1px solid var(--border); }

/* ---------- Knowledge items and photos ---------- */

.item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .7rem 0;
    border-top: 1px solid var(--border);
}

.item-thumbs { display: flex; gap: 4px; width: 180px; flex-shrink: 0; }
.item-thumbs img, .thumb-empty { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; background: var(--green-soft); display: flex; align-items: center; justify-content: center; }
.item-text { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }

.item-editor {
    border: 2px solid var(--green);
    background: var(--green-soft);
    border-radius: 14px;
    padding: 1rem;
    margin: .75rem 0;
}

.photo-grid { display: flex; flex-wrap: wrap; gap: .6rem; }

.photo {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0;
}

.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    cursor: pointer;
}

.photo-warning {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(253, 245, 228, .95);
    color: var(--warn);
    font-size: .72rem;
    padding: 2px 4px;
}

.photo-add {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--green-light);
    color: var(--green);
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    padding: .5rem;
}

.photo-add input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick { cursor: pointer; }
.photo-pick:hover { outline: 3px solid var(--green); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.media-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.media-card img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--green-soft); }
.media-card-body { padding: .6rem .75rem; display: flex; flex-direction: column; gap: .35rem; }
.media-card-body .input { padding: .3rem .5rem; font-size: .85rem; }

/* ---------- Lists, activity details, tasks ---------- */

.list-editor { display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; }
.list-editor-row { display: flex; gap: .35rem; align-items: center; width: 100%; }
.list-editor-number { width: 1.5rem; color: var(--muted); text-align: right; flex-shrink: 0; }
.motivation-row { display: grid; grid-template-columns: 200px 1fr 1fr auto; gap: .35rem; margin-bottom: .35rem; }
.link-row { display: grid; grid-template-columns: 200px 1fr auto auto; gap: .35rem; margin-bottom: .35rem; align-items: center; }
.ai-suggestions { border-left: 4px solid var(--warning, #c8932a); }
.ai-suggestions.reviewed { border-left-color: var(--success, #3daa5c); }
.ai-suggestions ul { margin: .5rem 0 .75rem 1.1rem; }

.task { border: 1px solid var(--border); border-radius: 12px; padding: .6rem .75rem; margin-bottom: .6rem; background: #fff; }
.task-header { display: flex; gap: .4rem; align-items: center; }
.task-header .input { flex: 1; }
.task-header .task-type { flex: 0 0 150px; }

.task-number {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-summary { display: flex; flex-wrap: wrap; gap: .9rem; margin: .35rem 0 0 2.2rem; }
.task-summary:empty { display: none; }
.task-body { margin: .75rem 0 0 2.2rem; }

/* ---------- Login ---------- */

.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar); padding: 1rem; }
.login-card { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 2rem; }
.login-card h1 { font-size: 1.3rem; }

/* ---------- Blazor ---------- */

#blazor-error-ui {
    background: var(--warn-soft);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- Generation (sprint 2) ---------- */

.alert-warning { background: var(--warn-soft); color: #6e4d0d; border: 1px solid #f0dcaa; }

.job { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .8rem; margin: .75rem 0; background: var(--sidebar); }
.job-header { display: flex; flex-wrap: wrap; gap: .75rem; align-items: baseline; }
.job progress { width: 100%; height: 8px; margin-top: .4rem; accent-color: var(--green); }
.job-done { border-color: var(--green-light); background: var(--green-soft); }
.job-failed { border-color: #f3c4ca; background: var(--danger-soft); color: #8a1f2b; }

.unit-link {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .55rem .75rem; border: 1px solid var(--border); border-radius: 10px;
    text-decoration: none; color: var(--text); margin-bottom: .4rem;
}
.unit-link:hover { border-color: var(--green); background: var(--green-soft); }

.level > .section-header h2 { margin-bottom: .5rem; }
.lesson { border: 1px solid var(--border); border-radius: 12px; margin-bottom: .6rem; background: #fff; }
.lesson > summary { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem .8rem; cursor: pointer; list-style: none; }
.lesson > summary::-webkit-details-marker { display: none; }
.lesson > summary::before { content: "▸"; color: var(--muted); }
.lesson[open] > summary::before { content: "▾"; }
.lesson[open] > summary { border-bottom: 1px solid var(--border); }
.lesson-actions { display: flex; gap: .4rem; }
.lesson > .item-editor, .lesson > .job { margin: .6rem .8rem; }

.exercise-row { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem .8rem; border-top: 1px solid #edf2ed; }
.exercise-row:first-of-type { border-top: 0; }
.exercise-row.flagged { background: var(--warn-soft); }
.exercise-number { width: 1.6rem; color: var(--muted); text-align: right; flex-shrink: 0; padding-top: .1rem; }
.exercise-text { flex: 1; display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.exercise-type { font-size: .75rem; font-weight: 600; color: var(--green); text-transform: uppercase; letter-spacing: .03em; }
.exercise-actions { display: flex; gap: .3rem; flex-shrink: 0; }

.info-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.info-card { border: 1px solid var(--border); border-radius: 12px; padding: .75rem; background: #fff; }
.info-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; background: var(--green-soft); }
.info-card h3 { font-size: 1rem; margin: .5rem 0 .25rem; }
.info-card p { margin: .3rem 0; }

.challenge-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; padding: .6rem .8rem; border-radius: 10px; background: var(--sidebar); }

.editor-photo { width: 160px; height: 120px; object-fit: cover; border-radius: 8px; }
.photo-correct { outline: 3px solid var(--green); }

/* ---------- Lesson preview player (phone frame, like the mockups) ---------- */

.player-backdrop {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(30, 43, 34, .55);
    display: flex; align-items: center; justify-content: center; padding: 1rem;
}

.phone {
    position: relative; width: 380px; max-width: 100%; height: min(760px, 95vh);
    background: #fff; border: 3px solid #2f3a33; border-radius: 36px;
    padding: 1.6rem 1.1rem 1.1rem; display: flex; flex-direction: column; overflow: hidden;
}
.phone-notch { position: absolute; top: .6rem; left: 50%; transform: translateX(-50%); width: 60px; height: 5px; border-radius: 3px; background: #2f3a33; }

.player-top { display: flex; align-items: center; gap: .6rem; }
.player-progress { flex: 1; height: 10px; border-radius: 999px; background: #e3ebe4; overflow: hidden; }
.player-progress > div { height: 100%; background: var(--green-light); border-radius: 999px; transition: width .3s; }

.player-body { flex: 1; overflow-y: auto; padding: .9rem 0; }
.player-body h3 { font-size: 1.15rem; margin: .25rem 0 .8rem; }
.player-type { margin-top: .2rem; }
.player-statement { font-size: 1.05rem; margin: 0 0 1rem; }
.player-photo { width: 100%; height: 200px; object-fit: cover; border-radius: 14px; background: var(--green-soft); margin-bottom: .8rem; }

.player-options { display: flex; flex-direction: column; gap: .5rem; }
.player-options.grid-2 { display: grid; grid-template-columns: 1fr 1fr; }
.player-options.chips { flex-direction: row; flex-wrap: wrap; }

.player-option {
    font: inherit; text-align: center; padding: .7rem .6rem; border-radius: 12px;
    border: 1.5px solid var(--border); background: #fff; cursor: pointer; color: var(--text);
}
.player-option:hover:not(:disabled) { border-color: var(--green); }
.player-options.chips .player-option { padding: .45rem .9rem; border-radius: 999px; }

.player-photo-option { padding: 0; border: 3px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; cursor: pointer; aspect-ratio: 1; }
.player-photo-option img { width: 100%; height: 100%; object-fit: cover; display: block; }

.opt-selected { border-color: var(--green); border-width: 2px; background: var(--green-soft); }
.opt-correct { border-color: var(--green) !important; background: var(--green-soft); font-weight: 600; }
.opt-wrong { border-color: var(--danger) !important; background: var(--danger-soft); }
.opt-dim { opacity: .5; }

.player-matching { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.player-matching > div { display: flex; flex-direction: column; gap: .5rem; }

.player-feedback { border-radius: 14px; padding: .8rem; margin-top: auto; }
.player-feedback p { margin: .35rem 0 .7rem; }
.player-feedback.ok { background: var(--green-soft); border: 1px solid var(--green-light); color: var(--green-dark); }
.player-feedback.bad { background: var(--danger-soft); border: 1px solid #f3c4ca; color: #8a1f2b; }

.player-finish { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: .6rem; text-align: center; }
.player-finish-emoji { font-size: 3.5rem; }
.player-xp { font-size: 1.4rem; font-weight: 700; color: var(--green); }

.generated-units { margin-top: 1rem; }

/* Feedback: moderation of shared results */
.tabs { display: flex; gap: .25rem; margin: 0 0 1rem; border-bottom: 1px solid var(--border, #d5e3d6); }
.tab { background: none; border: 0; padding: .5rem .9rem; cursor: pointer; color: inherit; border-bottom: 3px solid transparent; font: inherit; }
.tab.active { border-bottom-color: var(--green); font-weight: 600; }
.shared-item .actions { display: flex; gap: .5rem; align-items: flex-start; }
.shared-text { white-space: pre-line; }
.shared-photos { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.shared-photos figure { margin: 0; max-width: 220px; }
.shared-photos img { width: 220px; height: 165px; object-fit: cover; border-radius: 8px; display: block; }

/* ---------- Nieuw vanuit tekst / Vraag de AI ---------- */

.nav-cta { background: var(--green); color: #fff; font-weight: 600; margin-bottom: .5rem; }
.nav-cta:hover, .nav-cta.active { background: var(--green-dark); color: #fff; }
.nav-group { margin: 1rem .75rem .25rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.intro { max-width: 760px; }
.new-source textarea { font-family: inherit; line-height: 1.45; }
.step-label { display: flex; align-items: center; gap: .5rem; }
.step-number { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--green); color: #fff; font-size: .8rem; font-weight: 700; }
.step-number-light { background: #fff; color: var(--green); margin-right: .25rem; }
.btn-large { font-size: 1.05rem; padding: .7rem 1.4rem; }
.btn-link { background: none; border: 0; color: var(--green); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.file-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .75rem; border: 1px solid var(--border); border-radius: 8px; background: var(--green-soft); }
.checkbox-help { margin: .1rem 0 0 1.6rem; }

.cta-card { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: var(--text); background: var(--green-soft); border-color: var(--green-light); }
.cta-card > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.cta-icon { font-size: 2rem; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.todo li:last-child { border-bottom: 0; }

.ai-suggestions h3, .proposal h3 { font-size: 1rem; margin: .75rem 0 .25rem; }
.ask-ai { border-left: 4px solid var(--green-light); }
.ask-row { display: flex; gap: .5rem; }
.ask-row .input { flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.proposal ul { margin: .3rem 0 .6rem 1.1rem; }
.proposal .removed { background: var(--danger-soft); border-radius: 8px; padding: .5rem .75rem; margin: .5rem 0; color: #7d1d27; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .75rem 0; }
.compare-side { border: 1px solid var(--border); border-radius: 8px; padding: .75rem; display: flex; flex-direction: column; gap: .25rem; }
.compare-side:last-child { border-color: var(--green-light); background: var(--green-soft); }
.compare-side ol { margin: .4rem 0 0 1.2rem; padding: 0; }
.compare-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } }

.source-card summary { cursor: pointer; }
.source-text { white-space: pre-wrap; font-family: inherit; background: var(--sidebar); border-radius: 8px; padding: .75rem; max-height: 320px; overflow: auto; }
.compare-side li.task-changed { margin-bottom: .35rem; }
.compare-side li.task-changed ul { margin: .2rem 0 0 1rem; color: var(--text); }
.hidden { display: none !important; }

/* ---------- AI coach ---------- */
.coach { border-left: 4px solid var(--green-light); }
.coach.quality-thin { border-left-color: var(--warn); background: var(--warn-soft); }
.coach.quality-rich { border-left-color: var(--green); }
.quality-badge { font-size: .8rem; font-weight: 600; padding: .15rem .65rem; border-radius: 999px; background: var(--green-soft); color: var(--green); }
.quality-badge.quality-thin { background: #fff; color: var(--warn); border: 1px solid #f0dcaa; }
.coach-note { margin: .25rem 0 .5rem; }
.coach-question { display: flex; flex-direction: column; gap: .25rem; margin: .75rem 0; }
.coach-question textarea { font-family: inherit; }
