/* Gypsy Tent application design. The inherited main.css stays unchanged. */
@font-face {
    font-family: "Manrope";
    src: url("../fonts/manrope-variable.ttf") format("truetype");
    font-weight: 200 800;
    font-display: swap;
}

:root {
    color-scheme: light;
    --gt-bg: #f4f3f8;
    --gt-surface: #fff;
    --gt-ink: #292638;
    --gt-muted: #706b80;
    --gt-accent: #63518f;
    --gt-accent-dark: #4d3c77;
    --gt-tint: #efebf7;
    --gt-border: #e8e5ef;
    --gt-shadow: 0 8px 28px -12px rgb(47 34 78 / 15%), 0 2px 5px rgb(47 34 78 / 3%);
    --gt-shadow-raised: 0 18px 50px -20px rgb(47 34 78 / 23%), 0 3px 8px rgb(47 34 78 / 4%);
    --gt-radius: 16px;
    --gt-motion: cubic-bezier(.22, 1, .36, 1);
}

[hidden] { display: none !important; }
body {
    margin: 0;
    background: var(--gt-bg);
    color: var(--gt-ink);
    font-family: "Manrope", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.app-root *, .app-root *::before, .app-root *::after { box-sizing: border-box; }
::selection { background: #ded5ef; color: #32264e; }
:where(a, button, input, textarea, select, summary):focus-visible {
    outline: 3px solid #b9a7db;
    outline-offset: 4px;
}
:where(input, textarea, select) { caret-color: var(--gt-accent); }
a { color: var(--gt-accent-dark); text-underline-offset: 4px; }
a:hover { text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, p { margin: 0; }
h1, h2, h3, h4, h5 { text-align: left; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; top: -70px; left: 24px; z-index: 5; padding: 12px 20px; border-radius: 10px; background: #fff; box-shadow: var(--gt-shadow); }
.skip-link:focus { top: 16px; }

/* Shell and navigation */
.workspace-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 42px;
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px 36px 24px 24px;
}
.workspace-sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 24px;
    align-self: start;
    min-height: calc(100dvh - 48px);
    padding: 28px 15px 16px;
    border-radius: 20px;
    background: #eeebf4;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 90%);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--gt-ink); font-size: 20px; font-weight: 800; letter-spacing: -.045em; line-height: 1.2; text-decoration: none; }
.workspace-sidebar .brand { padding: 0 9px; }
.brand-symbol { width: 36px; height: 36px; color: var(--gt-accent); stroke-width: 1.35; }
.brand-caption { display: block; margin-top: 6px; color: var(--gt-muted); font-size: 9px; font-weight: 500; letter-spacing: .025em; }
.workspace-nav { display: flex; flex-direction: column; gap: 6px; margin: 48px 0 30px; }
.workspace-nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 14px; border-radius: 11px; color: #6c637b; font-size: 13px; font-weight: 600; transition: background 180ms var(--gt-motion), color 180ms var(--gt-motion), box-shadow 180ms var(--gt-motion); }
.workspace-nav a:hover { color: var(--gt-accent-dark); background: #e5e0ef; }
.workspace-nav a[aria-current="page"] { background: #fff; color: var(--gt-accent-dark); box-shadow: 0 5px 14px -5px rgb(59 43 88 / 14%); }
.workspace-nav a[aria-current="page"] .icon { stroke-width: 1.9; }
.sidebar-bottom { margin-top: auto; padding: 20px 9px 0; }
.account-identity { display: flex; align-items: center; gap: 10px; padding-top: 20px; border-top: 1px solid #ded9e8; }
.account-identity > div { min-width: 0; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; background: #ded6ec; color: var(--gt-accent-dark); font-size: 13px; font-weight: 750; text-transform: uppercase; }
.account-role { display: block; font-size: 12px; font-weight: 700; }
#greeting { display: block; max-width: 145px; margin-top: 3px; color: var(--gt-muted); font-size: 10px; font-weight: 500; overflow-wrap: anywhere; }
.workspace-content { min-width: 0; max-width: 1120px; outline: none; }
.workspace-topbar { display: flex; align-items: center; gap: 10px; min-height: 42px; margin-bottom: 34px; color: #73667f; font-size: 11px; }
.workspace-topbar .icon { width: 11px; height: 11px; }
.workspace-topbar > span:last-child { color: #5b536b; font-weight: 600; }
.workspace-footer { display: flex; justify-content: space-between; gap: 18px; margin-top: 42px; padding: 20px 0 8px; color: #72677f; font-size: 11px; }
.workspace-footer > span:first-child { font-weight: 750; }
.page-heading { margin-bottom: 30px; }
.page-heading h1 { margin: 0; color: var(--gt-ink); font-size: 32px; font-weight: 750; line-height: 1.25; letter-spacing: -.035em; text-wrap: balance; }
.page-heading > p, .page-heading-actions > div > p { max-width: 65ch; margin-top: 10px; color: var(--gt-muted); font-size: 14px; line-height: 1.75; }
.surface { border-radius: var(--gt-radius); background: var(--gt-surface); box-shadow: var(--gt-shadow); }
.surface h2, .list-heading { color: var(--gt-ink); font-size: 17px; font-weight: 750; line-height: 1.4; letter-spacing: -.025em; }
.section-description { margin-top: 8px; color: var(--gt-muted); font-size: 13px; line-height: 1.75; }
.contact-section { margin: 0; padding: 0; border: 0; }

/* Fields and actions share the same vocabulary throughout the app. */
.form_labels { display: block; margin: 0 0 7px; color: #51495f; font-size: 12px; font-weight: 650; line-height: 1.5; }
.form_inputs { margin: 0 0 20px; padding: 0; border: 0; }
.form_inputs:has(+ .field-hint) { margin-bottom: 7px; }
.app-root input, .app-root select, .app-root textarea {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #e3deec;
    border-radius: 10px;
    background: #faf9fc;
    color: var(--gt-ink);
    font-size: 13px;
    line-height: 1.6;
    transition: border-color 180ms var(--gt-motion), background 180ms var(--gt-motion), box-shadow 180ms var(--gt-motion);
}
.app-root select { padding-right: 28px; }
.app-root textarea { resize: vertical; min-height: 110px; }
.app-root input::placeholder, .app-root textarea::placeholder { color: #746680; opacity: 1; }
.app-root :where(input, select, textarea):focus { border-color: #a38dc7; background-color: #fff; box-shadow: 0 4px 12px -6px rgb(88 62 131 / 22%); }
.app-root :where(input, select, textarea):disabled { background-color: #f5f4f8; color: #686071; cursor: default; opacity: 1; }
.auth_form, .lesson-form { margin: 0; padding: 0; }
.field-hint { margin: 0 0 22px; color: var(--gt-muted); font-size: 12px; line-height: 1.7; }
.linkButton, .button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: var(--gt-tint);
    color: var(--gt-accent-dark);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 180ms var(--gt-motion), box-shadow 180ms var(--gt-motion), transform 180ms var(--gt-motion);
}
.linkButton:hover { background: #e5def1; text-decoration: none; }
:where(.linkButton, .button-primary):active { transform: translateY(1px); }
.button-primary, .lesson-form > button[type="submit"] { background: var(--gt-accent); color: #fff; box-shadow: 0 5px 12px -5px rgb(79 54 122 / 40%), inset 0 1px 0 rgb(255 255 255 / 12%); }
.button-primary:hover, .lesson-form > button[type="submit"]:hover { background: var(--gt-accent-dark); color: #fff; box-shadow: 0 7px 18px -7px rgb(79 54 122 / 45%); }
.linkButton .icon, .button-primary .icon { width: 17px; height: 17px; }
.linkButton:disabled, .lesson-form > button[type="submit"]:disabled { background: #eeebf2; color: #746980; box-shadow: none; cursor: default; transform: none; }
.logout-button { justify-content: flex-start; gap: 10px; width: 100%; margin-top: 14px; padding: 9px 0; background: transparent; color: #72697f; font-size: 11px; }
.logout-button:hover { background: transparent; color: var(--gt-accent-dark); }
.logout-button .icon { width: 15px; height: 15px; }
.feedback-message:not(:empty), .content-note { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #eaf3ed; color: #315e45; font-size: 12px; }
.feedback-message:empty { display: none; }
.content-note p { margin: 8px 0; }
.content-note code { display: inline-block; padding: 3px 8px; border-radius: 5px; background: #fff; color: #2f563e; font-size: 14px; overflow-wrap: anywhere; }
.app-error:not(:empty) { position: fixed; bottom: 24px; left: 50%; z-index: 4; width: max-content; max-width: min(580px, calc(100% - 32px)); margin: 0; padding: 16px 22px; border-radius: 12px; background: #fff0ed; color: #913d31; box-shadow: var(--gt-shadow-raised); transform: translateX(-50%); font-size: 13px; }
.app-error:empty { display: none; }

/* Login */
.session-loading { display: flex; min-height: 100dvh; align-items: center; justify-content: center; gap: 14px; color: var(--gt-accent); font-size: 14px; }
.session-loading .icon { width: 30px; height: 30px; }
.auth-view { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 80px; width: min(1080px, 100%); min-height: 100dvh; margin: 0 auto; padding: 60px 40px; }
.auth-story { display: flex; flex-direction: column; align-self: stretch; justify-content: space-between; min-height: 540px; }
.auth-story .brand { font-size: 25px; }
.auth-story .brand-symbol { width: 43px; height: 43px; }
.auth-story-content h1 { color: #423651; font-size: 51px; font-weight: 700; letter-spacing: -.04em; line-height: 1.18; }
.auth-story-content p { max-width: 36ch; margin-top: 24px; color: #76667f; font-size: 15px; line-height: 1.9; }
.auth-footnote { color: #766783; font-size: 11px; }
.auth-card { padding: 38px; box-shadow: var(--gt-shadow-raised); }
.auth-card h2 { font-size: 25px; letter-spacing: -.035em; }
.auth-card .section-description { margin-bottom: 30px; }
.auth-card .button-primary { width: 100%; min-height: 48px; margin-top: 4px; }
.auth-help { margin-top: 25px; padding-top: 22px; border-top: 1px solid var(--gt-border); color: #74667f; font-size: 11px; line-height: 1.8; }

/* Home */
.welcome-surface { display: flex; align-items: center; justify-content: space-between; gap: 25px; overflow: hidden; padding: 38px 42px; border-radius: var(--gt-radius); background: #4d3e69; color: #fff; box-shadow: 0 15px 32px -19px rgb(58 37 88 / 42%); }
.welcome-surface h2 { margin: 0; color: #fff; font-size: 35px; font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
.welcome-surface p { margin-top: 16px; color: #d8d0e3; font-size: 13px; line-height: 1.8; }
.welcome-symbol { width: 180px; height: 180px; margin-right: -5px; color: #9686ae; stroke-width: .45; opacity: .65; }
.welcome-action { margin-top: 26px; background: #f1eaf6; color: #4d3c65; box-shadow: 0 5px 15px rgb(24 10 43 / 10%); }
.welcome-action:hover { background: #fff; color: #4d3c65; }
.home-sections { margin-top: 24px; padding: 26px 30px 10px; }
.home-sections h2 { margin-bottom: 8px; }
.home-sections > a { display: flex; align-items: center; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--gt-border); color: var(--gt-ink); }
.home-sections > a:last-child { border-bottom: 0; }
.home-sections > a > .icon:first-child { color: #8e7ba7; width: 23px; height: 23px; }
.home-sections > a > .icon:last-child { margin-left: auto; color: #9b8aad; transition: transform 180ms var(--gt-motion); }
.home-sections a:hover > .icon:last-child { transform: translateX(4px); }
.home-sections strong, .home-sections span { display: block; }
.home-sections strong { font-size: 14px; font-weight: 700; }
.home-sections span { margin-top: 3px; color: var(--gt-muted); font-size: 12px; }
.connection-tools { margin-top: 26px; color: var(--gt-muted); font-size: 12px; }
.connection-tools summary { cursor: pointer; }
#connection-status { display: inline; margin-left: 10px; color: #4d775e; }
.connection-tools form { max-width: 400px; margin-top: 20px; }
#reply { margin-top: 15px; overflow-wrap: anywhere; }

/* Contacts */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 24px; }
.contact-layout:has(.contact-form[hidden]) { grid-template-columns: 1fr; }
.contact-invite:has(.contact-form[hidden]) { display: none; }
.contacts-surface { padding: 25px 28px 14px; }
.surface-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; }
.surface-heading .icon { color: #a197b1; }
.contact-invite { padding: 26px; }
.contact-invite .section-description { margin-bottom: 25px; }
.contact-invite .button-primary { width: 100%; }
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list > li { display: flex; align-items: center; gap: 14px; padding: 19px 0; border-top: 1px solid #f0edf4; }
.contact-list .avatar { width: 44px; height: 44px; border-radius: 14px; background: #f0eaf7; color: #81629b; }
.contact-information { min-width: 0; }
.contact-name { display: block; color: var(--gt-ink); font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.contact-detail { display: block; margin-top: 3px; color: var(--gt-muted); font-size: 12px; overflow-wrap: anywhere; }
.contact-list > .lesson-empty { display: block; padding: 42px 10px; border: 0; }

/* Material libraries */
.library-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); align-items: start; gap: 24px; }
.compose-panel { padding: 26px; }
.compose-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; cursor: pointer; }
.compose-panel > summary::-webkit-details-marker { display: none; }
.compose-panel[open] > summary { margin-bottom: 22px; }
.compose-panel > summary .icon { width: 14px; height: 14px; color: var(--gt-muted); transition: transform 180ms var(--gt-motion); }
.compose-panel[open] > summary .icon { transform: rotate(90deg); }
.compose-panel h2 { margin: 0; }
.compose-panel .type-badge { margin: -8px 0 24px; }
.compose-panel .button-primary { width: 100%; }
.list-heading { margin: 0 0 16px; font-size: 13px; font-weight: 650; color: var(--gt-muted); }
.lesson-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.lesson-list > li { min-width: 0; padding: 26px; border-radius: var(--gt-radius); background: #fff; box-shadow: var(--gt-shadow); }
.lesson-list > .lesson-empty { padding: 42px 24px; color: var(--gt-muted); font-size: 13px; text-align: center; }
.template-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.template-header h3 { color: #42384f; font-size: 16px; font-weight: 700; line-height: 1.45; letter-spacing: -.02em; overflow-wrap: anywhere; }
.type-badge, .revision-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 6px; background: #f0edf6; color: #705b86; font-size: 11px; font-weight: 650; line-height: 1.5; }
.revision-badge { background: #f5f3f8; color: #72657f; font-weight: 500; }
.template-preview { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; margin-bottom: 20px; color: #6f657a; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.template-meta { margin: 0 0 16px; color: var(--gt-muted); font-size: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag-list > span { padding: 3px 8px; border-radius: 5px; background: #f5f1eb; color: #776143; font-size: 10px; }
.editor-disclosure { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eeeaf3; }
.editor-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; list-style: none; color: var(--gt-accent); font-size: 12px; font-weight: 650; cursor: pointer; }
.editor-disclosure > summary::-webkit-details-marker, .compose-disclosure > summary::-webkit-details-marker { display: none; }
.editor-disclosure > summary::after { width: 6px; height: 6px; margin-right: 4px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; content: ""; transform: rotate(45deg); transition: transform 180ms var(--gt-motion); }
.editor-disclosure[open] > summary::after { transform: rotate(225deg); }
.editor-disclosure > .lesson-form { margin-top: 22px; }
.template-list li:has(.editor-disclosure[open]) > .template-preview { display: none; }
.exercise-order-chooser { display: flex; align-items: start; gap: 8px; margin-bottom: 12px; }
.exercise-order-chooser select { flex: 1; min-width: 0; font-size: 11px; }
.exercise-order-chooser .linkButton { min-height: 46px; padding: 10px; font-size: 11px; }
.exercise-order-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.exercise-order-list > li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 9px; background: #f6f4f9; color: #766b83; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.exercise-order-list > li > span { flex: 1 1 120px; min-width: 0; }
.exercise-order-controls { display: flex; gap: 5px; align-items: center; }
.exercise-order-controls .linkButton { min-width: 32px; min-height: 32px; padding: 5px 8px; font-size: 11px; }
.exercise-order-list > .exercise-order-empty { background: #faf9fc; padding: 18px 12px; text-align: center; }

/* Assigned lessons */
.compose-disclosure { margin-bottom: 24px; padding: 22px 26px; }
.compose-disclosure > summary { display: flex; align-items: center; gap: 12px; color: #544365; font-size: 14px; font-weight: 700; list-style: none; cursor: pointer; }
.compose-disclosure > summary .icon:first-child { color: #8f78a5; }
.compose-disclosure > summary .icon:last-child { width: 14px; height: 14px; margin-left: auto; transform: rotate(90deg); transition: transform 180ms var(--gt-motion); }
.compose-disclosure:not([open]) > summary .icon:last-child { transform: rotate(0); }
.send-lesson-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 16px; margin-top: 24px; }
.send-lesson-form .form_inputs { margin-bottom: 0; }
.send-lesson-form > button[type="submit"] { min-height: 46px; }
.assigned-lesson-list { margin-top: 24px; }
.teacher-lesson-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 18px; }
.teacher-lesson-header h2 { margin-bottom: 8px; font-size: 20px; font-weight: 750; letter-spacing: -.025em; line-height: 1.4; }
.teacher-lesson-meta { margin-bottom: 22px; color: var(--gt-muted); font-size: 12px; }
.teacher-lesson-student { display: block; color: #76647f; font-size: 13px; overflow-wrap: anywhere; }
.lesson-exercise { padding: 22px 0; border-top: 1px solid #eeeaf3; }
.lesson-exercise > p:first-child { color: #42384f; font-size: 14px; font-weight: 600; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.teacher-answer { margin-top: 14px; padding: 15px 18px; border-radius: 10px; background: #f7f5fa; color: #70627f; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--gt-border); }
.lesson-status, .student-lesson-status { display: inline-flex; align-items: center; gap: 7px; min-height: 27px; padding: 5px 10px; border-radius: 7px; background: #eee8f6; color: #6b4e91; font-size: 11px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.lesson-status::before, .student-lesson-status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status-on_review { background: #fcf0d9; color: #8b641f; }
.status-checked { background: #e8f2ed; color: #366d52; }
.status-rework { background: #fbeae5; color: #985540; }

/* Student workspace: one quiet sheet, clear prompts and generous answer areas. */
#student-lesson-list > .student-lesson { padding: 0; overflow: clip; }
.student-lesson-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 18px; padding: 28px 32px; background: #ebe6f4; }
.student-lesson-title { color: #423450; font-size: 27px; font-weight: 750; line-height: 1.3; letter-spacing: -.03em; overflow-wrap: anywhere; }
.student-lesson-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 7px 20px; color: #6d5b7b; font-size: 12px; }
.student-lesson-status { align-self: start; margin-top: 3px; }
.student-lesson-form { margin: 0; padding: 0; }
.student-exercise-list { margin: 0; padding: 4px 32px; list-style: none; }
.student-exercise-list > .student-exercise { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 18px; row-gap: 0; margin: 0; padding: 28px 0; border: 0; border-bottom: 1px solid #eeeaf3; background: transparent; }
.student-exercise-list > .student-exercise:last-child { border-bottom: 0; }
.student-exercise-number { grid-column: 1; grid-row: 1 / span 3; display: grid; place-items: center; width: 31px; height: 31px; margin: 0; border-radius: 10px; background: #f1edf7; color: #725b8b; font-size: 13px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.student-exercise > p { grid-column: 2; max-width: 72ch; margin: 2px 0 22px; color: #4c405a; font-size: 15px; font-weight: 600; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.student-exercise label { grid-column: 2; margin-bottom: 9px; color: #7a6e86; font-size: 11px; font-weight: 600; }
.student-exercise textarea { grid-column: 2; min-height: 132px; padding: 16px 18px; border-color: #e9e4f0; border-radius: 11px; background: #faf9fc; font-size: 13px; }
.student-exercise textarea:disabled { color: #665c73; background: #f6f5f9; }
.student-lesson-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 32px; border-top: 1px solid #efebf5; background: #fdfcfe; }
.student-lesson-state { max-width: 48ch; color: #776782; font-size: 12px; line-height: 1.8; }
#student-lesson-list .student-submit { flex: 0 0 auto; padding: 12px 20px; font-size: 12px; }

/* Retained prose helpers. Interactive layouts never use .text. */
.text code { padding: 2px 5px; border-radius: 4px; background: #fff; }
.text pre { padding: 14px; overflow-x: auto; background: #fff; line-height: 1.7; }

@media (min-width: 1500px) {
    .workspace-shell { gap: 56px; padding-right: 48px; }
}
@media (max-width: 1200px) {
    .workspace-shell { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; padding-right: 28px; }
    .workspace-sidebar { padding-left: 12px; padding-right: 12px; }
    .workspace-nav a { padding-left: 12px; font-size: 12px; }
    .library-layout { grid-template-columns: 1fr; }
    .compose-panel .lesson-form { max-width: 680px; }
    .compose-panel .button-primary { width: auto; }
    .contact-layout { grid-template-columns: 1fr; }
    .contact-invite { max-width: none; }
    .contact-form { max-width: 600px; }
    .contact-invite .button-primary { width: auto; }
    .send-lesson-form { grid-template-columns: 1fr 1fr; }
    .send-lesson-form > button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 900px) {
    .workspace-shell { display: block; padding: 20px 24px; }
    .workspace-sidebar { display: grid; grid-template-columns: 1fr auto; gap: 20px; position: static; min-height: 0; margin-bottom: 32px; padding: 20px; border-radius: 16px; }
    .workspace-sidebar .brand { padding: 0; }
    .workspace-sidebar .brand-caption { font-size: 8px; }
    .workspace-nav { grid-column: 1 / -1; grid-row: 2; flex-direction: row; gap: 6px; overflow-x: auto; margin: 0 -5px -5px; padding: 5px 5px 7px; scrollbar-width: thin; scrollbar-color: #d5cce1 transparent; }
    .workspace-nav a { flex: 0 0 auto; min-height: 41px; padding: 9px 12px; font-size: 11px; }
    .workspace-nav .icon { width: 17px; height: 17px; }
    .sidebar-bottom { display: flex; align-items: center; gap: 14px; grid-row: 1; grid-column: 2; margin: 0; padding: 0; }
    .account-identity { padding: 0; border: 0; }
    .account-identity .avatar { width: 34px; height: 34px; border-radius: 10px; }
    .account-identity > div { display: none; }
    .logout-button { width: auto; margin: 0; padding: 8px; font-size: 0; min-height: 34px; }
    .logout-button .icon { width: 18px; height: 18px; }
    .workspace-topbar { display: none; }
    .workspace-content { max-width: 100%; }
    .page-heading h1 { font-size: 29px; }
    .page-heading { margin-bottom: 24px; }
    .auth-view { gap: 40px; padding: 40px 28px; }
    .auth-story-content h1 { font-size: 40px; }
    .auth-card { padding: 30px; }
}
@media (max-width: 600px) {
    .workspace-shell { padding: 12px; }
    .workspace-sidebar { gap: 18px 10px; margin-bottom: 28px; padding: 18px 14px 12px; }
    .brand { gap: 8px; font-size: 19px; }
    .brand-symbol { width: 31px; height: 31px; }
    .brand-caption { margin-top: 4px; }
    .sidebar-bottom { gap: 4px; }
    .workspace-nav a { gap: 7px; }
    .page-heading { padding: 0 7px; }
    .page-heading h1 { font-size: 27px; }
    .page-heading > p { margin-top: 9px; font-size: 12px; }
    .workspace-footer { padding: 18px 7px 8px; margin-top: 28px; font-size: 9px; }
    .workspace-footer > span:last-child { max-width: 150px; text-align: right; }
    .surface { border-radius: 14px; }
    .contacts-surface, .contact-invite, .compose-panel { padding: 22px; }
    .contact-layout, .library-layout { gap: 20px; }
    .contact-form { max-width: none; }
    .contact-invite .button-primary, .compose-panel .button-primary { width: 100%; }
    .contact-name { font-size: 12px; }
    .list-heading { margin-left: 7px; }
    .lesson-list > li { padding: 22px; border-radius: 14px; }
    .template-header { align-items: start; }
    .template-header h3 { font-size: 15px; }
    .template-header .revision-badge { font-size: 9px; }
    .exercise-order-chooser { flex-wrap: wrap; }
    .exercise-order-chooser select { flex-basis: 100%; }
    .compose-disclosure { padding: 20px; }
    .send-lesson-form { grid-template-columns: 1fr; }
    .send-lesson-form > button { width: 100%; }
    .teacher-lesson-header { flex-wrap: wrap; }
    .teacher-lesson-header h2 { font-size: 19px; }
    .lesson-actions { gap: 8px; }
    .lesson-actions .linkButton { flex: 1 1 auto; }
    .student-lesson-header { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px; }
    .student-lesson-title { font-size: 25px; }
    .student-lesson-status { grid-row: 2; justify-self: start; margin: 0; }
    .student-lesson-meta { grid-column: 1; gap: 6px 14px; font-size: 10px; }
    .student-exercise-list { padding: 0 22px; }
    .student-exercise-list > .student-exercise { grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; padding: 25px 0; }
    .student-exercise-number { width: 27px; height: 27px; font-size: 11px; border-radius: 8px; }
    .student-exercise > p { margin: 0 0 18px; font-size: 13px; }
    .student-exercise textarea { grid-column: 1 / -1; min-height: 140px; margin-top: 3px; padding: 14px; }
    .student-exercise label { margin-bottom: 10px; }
    .student-lesson-actions { flex-direction: column; align-items: stretch; gap: 15px; padding: 20px 22px; }
    #student-lesson-list .student-submit { width: 100%; }
    .welcome-surface { padding: 30px 26px; }
    .welcome-surface h2 { font-size: 28px; }
    .welcome-surface p { font-size: 12px; }
    .welcome-symbol { display: none; }
    .welcome-action { margin-top: 22px; }
    .home-sections { padding: 24px 24px 8px; }
    .home-sections > a { gap: 14px; }
    .home-sections strong { font-size: 13px; }
    .home-sections span { font-size: 11px; }
    .connection-tools { margin-left: 7px; margin-right: 7px; }
    #connection-status { display: block; margin: 7px 0 0 16px; }
    .auth-view { display: block; min-height: 100dvh; padding: 26px 20px; }
    .auth-story { display: block; min-height: 0; }
    .auth-story .brand { font-size: 22px; }
    .auth-story .brand-symbol { width: 36px; height: 36px; }
    .auth-story-content { margin: 40px 4px 30px; }
    .auth-story-content h1 { font-size: 34px; }
    .auth-story-content p { margin-top: 16px; font-size: 13px; }
    .auth-footnote { display: none; }
    .auth-card { padding: 28px; }
    .auth-card h2 { font-size: 23px; }
    .desktop-break { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

#main-content:focus { outline: none; }
#workspace-feedback:not(:empty) { margin: 0 0 24px; }
.student-lesson-header .tag-list { grid-column: 1 / -1; margin: -4px 0 0; }
.student-lesson-header .tag-list > span { background: #f8f5fc; color: #705e82; }

#access-denied { background: #fcf0d9; color: #805c1c; }

/* Typed exercise editors and answer controls */
.exercise-editor { display: grid; gap: 4px; }
.exercise-item-editor, .exercise-legacy-settings, .exercise-answer-group { min-width: 0; margin: 2px 0 18px; padding: 16px; border: 1px solid var(--gt-border); border-radius: 10px; background: #faf9fc; }
.exercise-item-editor > legend, .exercise-legacy-settings > legend, .exercise-answer-group > legend { padding: 0 7px; color: var(--gt-ink); font-size: 12px; font-weight: 700; }
.exercise-edit-list { display: grid; gap: 10px; }
.exercise-edit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.exercise-edit-row input[type="text"] { min-width: 0; }
.exercise-edit-row > input[type="text"] { grid-column: 1 / -1; }
.exercise-edit-row > .exercise-correct-choice, .exercise-edit-row > .exercise-truth-select-label { grid-column: 1; grid-row: 2; }
.exercise-edit-row > .exercise-remove-item { grid-column: 2; grid-row: 2; }
.exercise-correct-choice { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--gt-muted); font-size: 12px; white-space: nowrap; }
.exercise-correct-choice input, .exercise-answer-label input { width: 18px; min-width: 18px; min-height: 18px; height: 18px; flex: 0 0 18px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; accent-color: var(--gt-accent); }
.exercise-truth-select-label { display: grid; gap: 4px; min-width: 135px; color: var(--gt-muted); font-size: 12px; }
.exercise-truth-select-label select { min-height: 40px; padding: 8px 10px; }
.exercise-remove-item, .exercise-add-item { min-height: 38px; padding: 8px 11px; font-size: 12px; }
.exercise-remove-item:disabled { opacity: .55; }
.exercise-add-item { margin-top: 12px; }
.exercise-inline-error { min-height: 0; margin: 8px 0 0; color: #985540; font-size: 12px; line-height: 1.5; }
.exercise-inline-error:empty { display: none; }
.exercise-legacy-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.exercise-legacy-settings > legend { grid-column: 1 / -1; }
.exercise-legacy-settings .form_inputs { margin-bottom: 4px; }
.exercise-answer-group { display: grid; gap: 8px; margin: 0; padding: 15px; }
.exercise-answer-option, .exercise-answer-statement { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 10px 12px; border-radius: 9px; background: #fff; }
.exercise-answer-label { display: flex; align-items: center; gap: 11px; min-width: 0; margin: 0; color: var(--gt-ink); font-size: 13px; line-height: 1.6; cursor: pointer; }
.exercise-answer-label span { overflow-wrap: anywhere; }
.exercise-answer-statement > select { flex: 0 0 min(210px, 42%); }
.teacher-answer { display: block; }
.teacher-exercise-text { margin-top: 12px; padding: 14px 16px; border-radius: 10px; background: #faf9fc; color: #4c405a; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.teacher-answer > strong { display: block; margin-bottom: 8px; color: var(--gt-muted); font-size: 12px; }
.teacher-answer-content { margin: 0; color: var(--gt-muted); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.teacher-answer ul.teacher-answer-content { display: grid; gap: 5px; padding-left: 19px; }
.exercise-evaluation { margin: 12px 0 0; color: var(--gt-muted); font-size: 12px; font-weight: 650; }
.exercise-evaluation.is-correct { color: #366d52; }
.exercise-evaluation.is-incorrect { color: #985540; }
.student-exercise > .student-exercise-answer-target { grid-column: 2; min-width: 0; }
.student-exercise-answer-target > .exercise-answer { min-width: 0; }
.student-exercise .exercise-inline-error { margin: 8px 0 0; }
.exercise-gap-editor-list { display: grid; gap: 10px; margin: 12px 0 16px; }
.exercise-gap-editor { min-width: 0; padding: 15px; border-radius: 10px; background: #f7f5fa; }
.exercise-gap-editor-header { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.exercise-gap-editor-header h4 { margin: 0; color: var(--gt-ink); font-size: 14px; font-weight: 700; }
.exercise-gap-editor-header .exercise-remove-item { margin-left: auto; }
.exercise-gap-editor .form_inputs { margin-bottom: 10px; }
.exercise-gap-editor .form_inputs textarea { min-height: 72px; }
.exercise-gap-editor .exercise-edit-row { margin-top: 8px; }
.exercise-case-toggle { display: inline-flex; align-items: center; gap: 9px; margin: 4px 0 14px; color: var(--gt-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
.exercise-case-toggle input { width: 18px; min-width: 18px; min-height: 18px; height: 18px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; box-shadow: none; accent-color: var(--gt-accent); }
.exercise-gap-passage { max-width: 72ch; margin: 6px 0 16px; color: #4c405a; font-size: 15px; line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.exercise-gap-passage-label { display: block; margin-bottom: 8px; color: var(--gt-muted); font-size: 12px; font-weight: 650; }
.exercise-gap-answer-slot { display: inline-block; vertical-align: baseline; }
.exercise-gap-answer-slot > input, .exercise-gap-answer-slot > select { display: inline-block; width: auto; min-width: 96px; max-width: min(250px, 45vw); min-height: 40px; margin: 0 4px; padding: 7px 10px; vertical-align: middle; }
.exercise-gap-answer-slot > select { min-width: 130px; }
.exercise-answer-missing_letters .exercise-gap-answer-slot > input { min-width: 42px; max-width: 56px; text-align: center; }
.exercise-answer-bank { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--gt-border); }
.exercise-answer-bank > h4 { margin: 0 0 5px; color: var(--gt-ink); font-size: 13px; font-weight: 700; }
.exercise-bank-hint { margin: 0 0 10px; color: var(--gt-muted); font-size: 12px; }
.exercise-bank-tokens { display: flex; flex-wrap: wrap; gap: 8px; }
.exercise-bank-token { min-height: 40px; padding: 9px 13px; border: 1px solid var(--gt-border); border-radius: 8px; background: #fff; color: var(--gt-ink); font-size: 13px; font-weight: 600; cursor: grab; transition: background 180ms var(--gt-motion), border-color 180ms var(--gt-motion), transform 180ms var(--gt-motion); }
.exercise-bank-token:hover { border-color: #c9bddb; background: #f7f5fa; }
.exercise-bank-token:focus-visible { outline: 3px solid #b9a7db; outline-offset: 3px; }
.exercise-bank-token:active { transform: translateY(1px); cursor: grabbing; }
.exercise-bank-token:disabled { color: #746980; background: #eeebf2; cursor: default; }
.exercise-gap-answer-slot:has(select:focus), .exercise-gap-answer-slot:has(input:focus) { border-radius: 8px; background: #f0edf6; }

.exercise-matching-editor, .exercise-categorize-editor { display: grid; gap: 8px; min-width: 0; }
.exercise-match-left-row, .exercise-category-item-row { grid-template-columns: minmax(0, 1fr) auto; }
.exercise-match-left-row > input, .exercise-category-item-row > input { grid-column: 1 / -1; }
.exercise-match-assignment { display: grid; gap: 5px; min-width: 0; color: var(--gt-muted); font-size: 12px; font-weight: 600; }
.exercise-match-assignment select { width: 100%; min-width: 0; min-height: 40px; overflow-wrap: anywhere; }
.exercise-match-right-row.is-image { grid-template-columns: minmax(0, 1fr) auto; }
.exercise-match-right-row.is-image > input { grid-column: 1 / -1; width: 100%; min-width: 0; }
.exercise-match-right-row.is-image > .exercise-match-image-preview { grid-column: 1; width: 96px; height: 64px; border-radius: 7px; object-fit: cover; background: #eeebf2; }
.exercise-match-right-row.is-image > .exercise-remove-item { grid-column: 2; grid-row: 3; }
.exercise-match-prompt { min-width: 0; color: var(--gt-ink); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.exercise-order-editor-list, .exercise-order-answer-list, .exercise-order-bank-list { display: grid; gap: 9px; min-width: 0; }
.exercise-order-answer-list { min-height: 64px; }
.exercise-order-editor-row { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; padding: 12px; border-radius: 9px; background: #f7f5fa; }
.exercise-order-editor-index { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: #efebf7; color: var(--gt-accent); font-size: 12px; font-weight: 700; }
.exercise-order-editor-row > input, .exercise-order-editor-row > textarea { grid-column: 2; width: 100%; min-width: 0; }
.exercise-order-editor-row.is-letter > input { max-width: 120px; text-align: center; font-size: 17px; font-weight: 700; }
.exercise-order-editor-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.exercise-order-editor-actions > button, .exercise-order-action { min-height: 36px; padding: 7px 9px; font-size: 11px; }
.exercise-order-hint { margin: 0 0 12px; color: var(--gt-muted); font-size: 12px; line-height: 1.6; }
.exercise-order-answer-panel, .exercise-order-bank-panel { min-width: 0; margin: 0 0 14px; padding: 14px; border: 1px solid var(--gt-border); border-radius: 10px; background: #faf9fc; }
.exercise-order-answer-panel > h4, .exercise-order-bank-panel > h4 { margin: 0 0 10px; color: var(--gt-ink); font-size: 13px; font-weight: 700; }
.exercise-order-answer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--gt-border); border-radius: 9px; background: #fff; }
.exercise-order-answer-row[draggable="true"] { cursor: grab; }
.exercise-order-answer-row[draggable="true"]:active { cursor: grabbing; }
.exercise-order-answer-text { min-width: 0; color: var(--gt-ink); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.exercise-answer-build_word .exercise-order-answer-list { display: flex; flex-wrap: wrap; align-items: stretch; }
.exercise-answer-build_word .exercise-order-answer-row.is-letter-tile { flex: 0 0 118px; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 7px; }
.exercise-answer-build_word .exercise-order-answer-text { display: grid; min-height: 32px; place-items: center; font-size: 22px; font-weight: 750; }
.exercise-order-buildword-output { display: block; margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #efebf7; color: var(--gt-accent-dark); font-size: 16px; font-weight: 750; letter-spacing: .08em; overflow-wrap: anywhere; }
.exercise-order-bank-list { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.exercise-order-bank-item { min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid var(--gt-border); border-radius: 8px; background: #fff; color: var(--gt-ink); font-size: 13px; line-height: 1.45; text-align: left; overflow-wrap: anywhere; cursor: grab; }
.exercise-order-bank-item:hover { border-color: #c9bddb; background: #f7f5fa; }
.exercise-order-bank-item:focus-visible { outline: 3px solid #b9a7db; outline-offset: 2px; }
.exercise-order-bank-item:disabled { color: #746980; background: #eeebf2; cursor: default; }

@media (max-width: 600px) {
    .exercise-item-editor, .exercise-legacy-settings, .exercise-answer-group { padding: 12px; }
    .student-exercise > .student-exercise-answer-target { grid-column: 1 / -1; }
    .exercise-correct-choice { padding: 0 3px 4px; }
    .exercise-answer-statement { align-items: stretch; flex-direction: column; }
    .exercise-answer-statement > select { flex-basis: auto; width: 100%; }
    .exercise-gap-editor { padding: 12px; }
    .exercise-gap-passage { font-size: 14px; }
    .exercise-gap-answer-slot > input, .exercise-gap-answer-slot > select { max-width: 55vw; }
    .exercise-answer .exercise-match-answer-row, .exercise-answer .exercise-category-answer-row { grid-template-columns: minmax(0, 1fr); }
    .exercise-order-answer-row { grid-template-columns: minmax(0, 1fr); }
}

/* Student exercise refinements: quiet inline fields and generous hit areas. */
.app-root select {
    appearance: none;
    min-height: 38px;
    padding: 6px 38px 6px 10px;
    border: 1px solid var(--gt-border);
    border-radius: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2363518f' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-size: 16px;
    background-repeat: no-repeat;
}
.student-exercise > p { font-size: 16px; }
.student-lesson-meta { font-size: 14px; }
.student-exercise .exercise-answer-label,
.student-exercise .exercise-match-prompt,
.student-exercise .exercise-order-answer-text,
.student-exercise .exercise-order-bank-item,
.student-exercise .exercise-bank-token,
.student-exercise .exercise-answer select,
.student-exercise .exercise-answer textarea { font-size: 15px; }
.student-exercise .exercise-gap-passage { font-size: 17px; line-height: 2.3; }
.student-exercise .exercise-gap-answer-slot { max-width: 100%; }
.student-exercise .exercise-gap-answer-slot > input {
    width: auto;
    min-width: 2.5ch;
    max-width: min(28ch, 65vw);
    min-height: 32px;
    height: auto;
    margin: 0 4px;
    padding: 2px 4px;
    border: 0;
    border-bottom: 1px solid #9c93ad;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--gt-ink);
    font-size: inherit;
    line-height: 1.5;
    text-align: left;
    vertical-align: baseline;
}
.student-exercise .exercise-gap-answer-slot > input:focus {
    outline: none;
    border-bottom-color: var(--gt-accent);
    box-shadow: 0 1px 0 var(--gt-accent);
    background: transparent;
}
.student-exercise .exercise-gap-answer-slot > input:disabled { background: transparent; }
.student-exercise .exercise-gap-answer-slot:has(input:focus) { background: transparent; }
.student-exercise .exercise-gap-answer-slot > select {
    min-width: 0;
    min-height: 36px;
    padding: 4px 38px 4px 10px;
    border-radius: 6px;
    vertical-align: baseline;
}
.exercise-answer-single_choice .exercise-answer-group,
.exercise-answer-multiple_choice .exercise-answer-group,
.exercise-answer-odd_one_out .exercise-answer-group,
.exercise-answer-true_false .exercise-answer-group,
.exercise-answer-true_false_not_given .exercise-answer-group {
    border: 0;
    padding: 0;
    background: transparent;
    gap: 4px;
}
.exercise-answer-option { padding: 0; background: transparent; border: 0; }
.student-exercise .exercise-answer-label {
    width: 100%;
    min-height: 28px;
    margin: 0;
    padding: 4px 8px;
    align-items: center;
    line-height: 1.7;
}
.student-exercise .exercise-answer-label input { margin: 0; align-self: center; }
.exercise-answer-option:has(input:not(:disabled)):hover { background: #f7f5fa; }
.exercise-answer-statement { min-height: 28px; padding: 0; background: transparent; align-items: center; justify-content: flex-start; gap: 10px; }
.student-exercise .exercise-answer-statement { width: fit-content; max-width: 100%; padding: 4px 8px; gap: 8px; }
.student-exercise .exercise-answer-statement > .exercise-answer-label { width: auto; flex: 0 1 auto; padding: 4px 0; }
.exercise-truth-switch {
    display: inline-flex;
    align-items: center;
    position: relative;
    justify-content: center;
    flex: 0 0 auto;
    gap: 0;
    min-height: 28px;
    padding: 4px 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--gt-ink);
    font-size: 15px;
    cursor: pointer;
}
.exercise-truth-caption { position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 4; width: max-content; padding: 4px 8px; border-radius: 5px; background: var(--gt-ink); color: white; font-size: 12px; line-height: 1.5; opacity: 0; visibility: hidden; pointer-events: none; }
.exercise-truth-switch:hover .exercise-truth-caption,
.exercise-truth-switch:focus-visible .exercise-truth-caption { opacity: 1; visibility: visible; }
.exercise-truth-track { position: relative; width: 36px; height: 20px; border-radius: 12px; background: #b1a9bf; flex: 0 0 36px; }
.exercise-truth-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; transition: transform 180ms var(--gt-motion); }
.exercise-truth-switch[data-value='true'] .exercise-truth-track { background: var(--gt-accent); }
.exercise-truth-switch[data-value='true'] .exercise-truth-track::after { transform: translateX(16px); }
.exercise-truth-switch[data-value=''] .exercise-truth-track::after,
.exercise-truth-switch[data-value='not_given'] .exercise-truth-track::after { transform: translateX(8px); }
.exercise-truth-switch:disabled { cursor: default; opacity: .7; }
@media (max-width: 600px) {
    .student-exercise > p { font-size: 15px; }
    .student-exercise .exercise-gap-passage { font-size: 16px; }
    .student-exercise .exercise-answer-statement { flex-direction: row; flex-wrap: nowrap; gap: 8px; }
    .student-exercise .exercise-answer-statement > .exercise-answer-label { flex: 0 1 auto; min-width: 0; width: auto; }
    .exercise-truth-switch { margin-left: 0; }
}

#student-lessons .page-heading > p { font-size: 16px; }
.student-exercise .exercise-gap-passage-label,
.student-exercise .exercise-match-assignment,
.student-exercise .exercise-answer-group > legend,
.student-exercise .exercise-order-hint { font-size: 14px; }

/* Direct manipulation: word banks, category columns and paired lists. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.student-exercise .exercise-interaction-hint { margin: 0 0 16px; color: var(--gt-muted); font-size: 14px; line-height: 1.6; }
.student-exercise .exercise-interaction-status { margin: 10px 0 0; color: var(--gt-accent-dark); font-size: 13px; }
.exercise-order-answer-list, .exercise-order-bank-list { min-height: 32px; }
.exercise-order-bank-list { display: flex; flex-wrap: wrap; align-items: flex-start; }
.exercise-answer:not(.is-inline-order) .exercise-order-bank-list { flex-direction: column; }
.exercise-order-answer-row { display: block; width: fit-content; max-width: 100%; justify-self: start; padding: 6px 14px; font-size: 15px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; cursor: grab; touch-action: none; }
.exercise-order-answer-row[aria-disabled='true'] { cursor: default; }
.exercise-order-bank-item, .exercise-drag-token { width: auto; font-size: 15px; line-height: 1.5; touch-action: none; }
.is-inline-order .exercise-order-answer-list { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; }
.is-inline-order .exercise-order-answer-row { flex: 0 1 auto; width: auto; min-width: 0; }
.exercise-answer-build_word .exercise-order-answer-list { gap: 8px; }
.exercise-answer-build_word .exercise-order-answer-row { display: block; width: auto; min-width: 40px; min-height: 32px; padding: 4px 12px; text-align: center; font-size: 22px; font-weight: 700; }
.exercise-drop-hint { display: block; align-self: center; color: var(--gt-muted); font-size: 13px; line-height: 1.6; padding: 12px 4px; }
.is-dragging { opacity: .45; }
.is-drop-target { outline: 2px dashed var(--gt-accent); outline-offset: -2px; background-color: var(--gt-tint, #efebf7); }
.exercise-category-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 7px 14px; }
.exercise-category-zone, .exercise-category-bank { min-width: 0; padding: 16px; border: 1px solid var(--gt-border); border-radius: 10px; background: #faf9fc; }
.exercise-category-zone { min-height: 180px; }
.exercise-category-zone > h4, .exercise-category-bank > h4 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.exercise-category-drop-list { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 40px; }
.exercise-category-bank { margin-top: 16px; }
.exercise-category-bank .exercise-category-drop-list { flex-direction: row; flex-wrap: wrap; align-items: flex-start; min-height: 42px; }
.exercise-drag-token { min-width: 0; min-height: 44px; padding: 10px 13px; border: 1px solid var(--gt-border); border-radius: 7px; background: white; color: var(--gt-ink); text-align: left; overflow-wrap: anywhere; cursor: grab; }
.exercise-drag-token.is-selected { border-color: var(--gt-accent); background: #efebf7; }
.exercise-drag-token:disabled { cursor: default; }
.exercise-pair-board { position: relative; min-width: 0; }
.exercise-pair-lines { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.exercise-pair-lines path { fill: none; stroke: var(--gt-accent); stroke-width: 2; }
.exercise-pair-lines .is-preview { stroke-dasharray: 5 4; }
.exercise-pair-rows { display: grid; gap: 12px; }
.exercise-pair-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr); align-items: stretch; }
.exercise-pair-node { position: relative; z-index: 1; min-width: 0; min-height: 56px; padding: 12px 14px; border: 1px solid var(--gt-border); border-radius: 8px; background: white; color: var(--gt-ink); font-size: 15px; line-height: 1.6; text-align: left; overflow-wrap: anywhere; touch-action: none; cursor: crosshair; }
.exercise-pair-node.is-left { grid-column: 1; }
.exercise-pair-node.is-right { grid-column: 3; }
.exercise-pair-node.is-paired { border-color: #b9a7db; background: #f5f1fa; }
.exercise-pair-node:not(:disabled):hover,
.exercise-pair-node.is-pair-target { border-color: var(--gt-accent); box-shadow: 0 0 0 1px var(--gt-accent); }
.exercise-pair-node.is-selected { outline: 2px solid var(--gt-accent); outline-offset: 2px; }
.exercise-pair-node:disabled { cursor: default; }
.exercise-pair-node img { display: block; width: 100%; height: 100px; margin-bottom: 8px; object-fit: contain; border-radius: 5px; }
@media (max-width: 600px) {
    .exercise-pair-row { grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); }
    .exercise-pair-node { padding: 10px; font-size: 15px; }
    .exercise-category-zones { gap: 10px; }
}
.exercise-drag-preview { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 50; overflow: visible; pointer-events: none; }
.exercise-drag-preview rect { fill: #fff; stroke: #b9a7db; stroke-width: 1; }
.exercise-drag-preview text { fill: var(--gt-ink); font: 15px Manrope, sans-serif; }

.exercise-order-answer-row, .exercise-order-bank-item, .exercise-drag-token { user-select: none; }

/* Compact lesson rhythm: keep horizontal alignment and halve vertical whitespace. */
.student-lesson-header { padding-top: 14px; padding-bottom: 14px; row-gap: 9px; }
.student-exercise-list > .student-exercise { padding-top: 14px; padding-bottom: 14px; }
.student-exercise > p { margin-top: 1px; margin-bottom: 11px; }
.student-lesson-actions { padding-top: 11px; padding-bottom: 11px; }
.student-exercise .exercise-interaction-hint { margin-bottom: 8px; }
.student-exercise .exercise-interaction-status { margin-top: 5px; }
.student-exercise .exercise-interaction-status:empty { display: none; }
.student-exercise .exercise-order-answer-panel,
.student-exercise .exercise-order-bank-panel { padding-top: 5px; padding-bottom: 5px; margin-bottom: 6px; }
.student-exercise .exercise-order-answer-panel > h4,
.student-exercise .exercise-order-bank-panel > h4 { margin-bottom: 5px; }
.student-exercise .exercise-order-bank-item { min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
.student-exercise .exercise-order-answer-list,
.student-exercise .exercise-order-bank-list { gap: 5px; }
.student-exercise .exercise-drop-hint { padding-top: 4px; padding-bottom: 4px; }
.student-exercise .exercise-category-zone,
.student-exercise .exercise-category-bank { padding-top: 6px; padding-bottom: 6px; }
.student-exercise .exercise-category-zone { min-height: 76px; }
.student-exercise .exercise-category-bank { margin-top: 8px; }
.student-exercise .exercise-category-zone > h4,
.student-exercise .exercise-category-bank > h4 { margin-bottom: 7px; }
.student-exercise .exercise-drag-token { flex: 0 1 auto; width: fit-content; max-width: 100%; min-height: 30px; padding-top: 3px; padding-bottom: 3px; }
.student-exercise .exercise-pair-node { min-height: 32px; padding-top: 3px; padding-bottom: 3px; }
.student-exercise .exercise-pair-rows { gap: 4px; }
.student-exercise .exercise-gap-passage-label { margin-bottom: 4px; }

/* Teacher library, dedicated editor and student workspace. */
.page-heading-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.page-heading-actions > .button-primary { flex: 0 0 auto; }
.template-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; color: var(--gt-accent); font-size: 13px; font-weight: 650; }
.back-link .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.workspace-shell:has(.task-editor-page) { grid-template-columns: minmax(0, 1fr); max-width: 1280px; padding: 28px 32px; }
.workspace-shell:has(.task-editor-page) .workspace-sidebar,
.workspace-shell:has(.task-editor-page) .workspace-topbar,
.workspace-shell:has(.task-editor-page) .workspace-footer { display: none; }
.workspace-shell:has(.task-editor-page) .workspace-content { max-width: none; }
.task-editor-sheet { min-width: 0; padding: 24px 32px 0; }
.task-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--gt-border); }
.editor-mode-switch { display: inline-flex; padding: 4px; gap: 4px; border-radius: 10px; background: var(--gt-tint); }
.editor-mode-switch .linkButton { background: transparent; color: var(--gt-muted); box-shadow: none; }
.editor-mode-switch .linkButton[aria-pressed='true'] { background: white; color: var(--gt-accent-dark); box-shadow: var(--gt-shadow); }
.editor-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file-import { margin: 0; cursor: pointer; }
.task-editor-footer { position: sticky; bottom: 0; z-index: 3; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--gt-border); background: white; }
.task-editor-page .yaml-editor { display: block; width: 100%; min-height: 55vh; padding: 20px; margin-bottom: 14px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; line-height: 1.7; tab-size: 2; white-space: pre; overflow: auto; }
.editor-error:not(:empty) { margin: 16px 0; padding: 12px 16px; border-radius: 8px; background: #fff0ed; color: #913d31; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.student-contact-link { text-decoration: underline; text-decoration-color: var(--gt-border); text-underline-offset: 4px; }
.student-contact-link:hover { color: var(--gt-accent); text-decoration-color: currentColor; }
.student-send-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.student-send-form > .form-field { flex: 1 1 240px; }
.student-send-form .form_inputs { margin-bottom: 0; }
.student-workspace > .list-heading { margin-top: 28px; }
.student-lesson-archive { margin-top: 24px; }
.student-lesson-archive > summary { padding: 14px 0; color: var(--gt-muted); font-size: 15px; font-weight: 650; cursor: pointer; }
@media (max-width: 600px) {
    .page-heading-actions { flex-direction: column; }
    .workspace-shell:has(.task-editor-page) { padding: 16px 12px; }
    .task-editor-sheet { padding: 16px 16px 0; }
    .task-editor-toolbar { gap: 12px; }
    .task-editor-footer > .button-primary { flex: 1; }
    .task-editor-page .yaml-editor { padding: 12px; font-size: 13px; }
    .student-send-form { align-items: stretch; flex-direction: column; }
    .student-send-form > .form-field { flex-basis: auto; }
}
.student-workspace .page-heading h1 { overflow-wrap: anywhere; }

/* Student selects use the same surfaces and palette as the rest of the workspace. */
.exercise-select { position: relative; display: inline-block; max-width: 100%; margin: 0 4px; vertical-align: baseline; line-height: 1.5; }
.exercise-select-trigger { display: inline-flex; align-items: center; gap: 16px; min-height: 36px; max-width: min(250px, 75vw); padding: 4px 12px; border: 1px solid var(--gt-border); border-radius: 6px; background: #faf9fc; color: var(--gt-ink); font-size: 15px; text-align: left; cursor: pointer; }
.exercise-select-trigger::after { flex: 0 0 6px; width: 6px; height: 6px; margin: -3px 2px 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); content: ''; }
.exercise-select-trigger:hover, .exercise-select-trigger[aria-expanded='true'] { border-color: var(--gt-accent); background: white; }
.exercise-select-trigger:disabled { cursor: default; color: var(--gt-muted); }
.exercise-select:has(.exercise-select-trigger[aria-expanded='true']) { z-index: 5; }
.exercise-select-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 6; display: flex; flex-direction: column; width: max-content; min-width: 100%; max-width: min(260px, 80vw); max-height: 240px; padding: 5px; border-radius: 9px; background: white; box-shadow: var(--gt-shadow-raised); overflow-y: auto; }
.exercise-select.is-align-end .exercise-select-menu { right: 0; left: auto; }
.exercise-select-option { display: block; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--gt-ink); font-size: 15px; line-height: 1.5; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.exercise-select-option:hover, .exercise-select-option.is-active { background: var(--gt-tint); }
.exercise-select-option[aria-selected='true'] { color: var(--gt-accent-dark); font-weight: 750; }
.exercise-select-option:disabled { color: var(--gt-muted); opacity: .55; cursor: default; }
/* The placeholder occupies the insertion gap instead of targeting another tile. */
.exercise-order-answer-list { position: relative; }
.exercise-order-answer-list.has-insertion > .exercise-drop-hint { display: none; }
.exercise-order-answer-row.is-order-drag-source { position: absolute; visibility: hidden; pointer-events: none; }
.exercise-order-placeholder { border: 1px dashed var(--gt-accent); background: var(--gt-tint); color: transparent; pointer-events: none; }
.exercise-order-placeholder::selection { background: transparent; }
/* Quiet semantic feedback, with a textual verdict as well as color. */
.exercise-auto-feedback { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--gt-muted); }
.exercise-auto-feedback:not(.visually-hidden):empty { display: none; }
.exercise-answer[data-verdict='correct'] > .exercise-auto-feedback { color: #366d52; }
.exercise-answer[data-verdict='incorrect'] > .exercise-auto-feedback { color: #985540; }
.exercise-answer [data-feedback-id]:not(.exercise-gap-answer-slot)[data-verdict='correct'] { background-color: #edf6ef; border-color: #8bb39a; color: #315e45; }
.exercise-answer [data-feedback-id]:not(.exercise-gap-answer-slot)[data-verdict='incorrect'] { background-color: #fbefec; border-color: #c99c90; color: #874938; }
.exercise-gap-answer-slot[data-verdict='correct'] .exercise-select-trigger { background: #edf6ef; border-color: #8bb39a; }
.exercise-gap-answer-slot[data-verdict='incorrect'] .exercise-select-trigger { background: #fbefec; border-color: #c99c90; }
.student-exercise .exercise-gap-answer-slot[data-verdict='correct'] > input { border-bottom-color: #568568; color: #315e45; }
.student-exercise .exercise-gap-answer-slot[data-verdict='incorrect'] > input { border-bottom-color: #b87563; color: #874938; }
.exercise-pair-lines path[data-verdict='correct'] { stroke: #568568; }
.exercise-pair-lines path[data-verdict='incorrect'] { stroke: #b87563; }
.auto-check-setting { display: inline-flex; align-items: center; gap: 9px; margin: 12px 0; color: var(--gt-ink); font-size: 13px; line-height: 1.6; cursor: pointer; }
.app-root .auto-check-setting > input { flex: 0 0 18px; width: 18px; min-height: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--gt-accent); }
.student-send-form .auto-check-setting { align-self: center; margin: 0; }
.exercise-select.is-open-up .exercise-select-menu { top: auto; bottom: calc(100% + 6px); }
#student-lesson-list > .student-lesson:has(.exercise-select-trigger[aria-expanded='true']) { position: relative; z-index: 4; overflow: visible; }
.student-lesson-header { border-radius: var(--gt-radius) var(--gt-radius) 0 0; }
.student-lesson-actions { border-radius: 0 0 var(--gt-radius) var(--gt-radius); }

/* Editable YAML stays selectable; a mirrored code layer marks the exact invalid element. */
.yaml-code-editor { position: relative; margin-bottom: 14px; border-radius: 10px; background: #faf9fc; }
.task-editor-page .yaml-code-editor > .yaml-editor { position: relative; z-index: 1; margin: 0; background: transparent; color: transparent; caret-color: var(--gt-ink); }
.task-editor-page .yaml-code-editor > .yaml-editor:focus { background: transparent; color: transparent; }
.yaml-code-editor > pre { position: absolute; inset: 0; margin: 0; padding: 20px; border: 1px solid transparent; border-radius: inherit; overflow: hidden; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; line-height: 1.7; white-space: pre; pointer-events: none; color: var(--gt-ink); }
.yaml-code-line { display: block; min-height: 1.7em; }
.yaml-code-line.is-error { background: #fff0ed; }
.yaml-error-token { background: #f6dcd7; color: #913d31; text-decoration: underline; text-decoration-color: #b87563; text-underline-offset: 3px; }
.task-editor-page .yaml-code-editor > .yaml-editor[aria-invalid='true'] { border-color: #b87563; }
.task-editor-page .yaml-code-editor > .yaml-editor::selection { color: var(--gt-ink); }
.task-editor-copy { margin-right: auto; }
@media (max-width: 600px) {
    .yaml-code-editor > pre { padding: 12px; font-size: 13px; }
    .task-editor-copy { margin-right: 0; }
}

/* Feedback belongs to the answer control, never to its inline layout wrapper. */
.exercise-auto-feedback.visually-hidden { margin: -1px; }
.exercise-gap-answer-slot[data-verdict='correct'] .exercise-select-trigger { color: #315e45; }
.exercise-gap-answer-slot[data-verdict='incorrect'] .exercise-select-trigger { color: #874938; }
.student-exercise .exercise-gap-answer-slot[data-verdict='accepted'] > input { border-bottom-color: #b88c35; color: #85651f; }
.exercise-answer-free_answer > textarea[data-verdict='accepted'] { background: #fff8e5; border-color: #c7a45e; }

/* Compact learner tiles retain a full-content hit area without spanning the row. */
.student-exercise .exercise-answer-option { width: fit-content; max-width: 100%; justify-self: start; }
.student-exercise .exercise-answer-option > .exercise-answer-label { width: auto; }
.student-exercise .exercise-order-answer-row { padding-top: 3px; padding-bottom: 3px; }
.student-exercise .exercise-category-drop-list { min-height: 32px; }
.student-exercise .exercise-pair-node img { height: 80px; margin-bottom: 4px; }
.student-exercise .exercise-answer-build_word .exercise-order-answer-row { min-width: 28px; min-height: 30px; padding: 2px 8px; font-size: 16px; line-height: 1.4; }
.student-exercise .exercise-answer-build_word .exercise-order-bank-item { min-width: 28px; padding-right: 8px; padding-left: 8px; font-size: 14px; }

/* Shared lesson controls and durable connection state. */
.live-connection { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; color: var(--gt-muted); background: #eeebf4; }
.live-connection > .icon { display: none; width: 19px; height: 19px; }
.live-connection[data-state='connected'] > .live-connected,
.live-connection[data-state='sending'] > .live-sending,
.live-connection[data-state='waiting'] > .live-waiting { display: block; }
.live-connection[data-state='connected'] { color: #366d52; background: #e8f2ed; }
.live-connection[data-state='sending'] { color: #85651f; background: #fff8e5; }
.live-connection[data-state='waiting'] { color: #706b80; background: #eeebf4; }
.live-sending { animation: live-send 850ms ease-in-out infinite alternate; }
.live-waiting { animation: live-spin 1.4s linear infinite; transform-origin: center; }
@keyframes live-send { to { transform: translate(1px, -1px); } }
@keyframes live-spin { to { transform: rotate(360deg); } }
.assigned-exercise-editor { grid-column: 2; min-width: 0; margin-top: 8px; }
.student-lesson > .editor-disclosure, .student-lesson > .lesson-actions { margin: 12px 28px; }
.is-live-updated { animation: live-content-update 500ms ease-out; }
@keyframes live-content-update { from { background-color: #f5f1fa; } to { background-color: transparent; } }
.sync-conflicts { margin-bottom: 18px; }
.sync-conflict { padding: 12px 16px; background: #fff8e5; border-radius: 10px; margin-bottom: 8px; }
.sync-conflict > p { margin: 0 0 8px; color: #6d5427; font-size: 14px; }
.sync-conflict > button { margin-right: 8px; margin-bottom: 4px; }
@media (max-width: 600px) { .assigned-exercise-editor { grid-column: 1 / -1; } .student-lesson > .editor-disclosure, .student-lesson > .lesson-actions { margin: 10px 16px; } }
@media (prefers-reduced-motion: reduce) { .live-sending, .live-waiting { animation: none; } .is-live-updated { animation: none; } }

/* A lesson index leads into one focused, shared workspace. */
.lesson-index { gap: 10px; }
.lesson-index-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; background: var(--gt-surface); border-radius: 12px; color: var(--gt-ink); text-decoration: none; transition: background-color 160ms ease-out; }
.lesson-index-link:hover { background: var(--gt-tint); }
.lesson-index-link:focus-visible { outline: 2px solid var(--gt-accent); outline-offset: 3px; }
.lesson-index-content { display: grid; gap: 5px; min-width: 0; }
.lesson-index-title { font-size: 17px; font-weight: 750; overflow-wrap: anywhere; }
.lesson-index-meta { font-size: 12px; color: var(--gt-muted); }
.lesson-index-status { flex-shrink: 0; }
.lesson-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 22px; font-size: 13px; }
.lesson-breadcrumbs > * { margin: 0; overflow-wrap: anywhere; }
.lesson-breadcrumbs > [aria-current] { color: var(--gt-muted); }
.interaction-dialog { box-sizing: border-box; width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 28px; border: 0; border-radius: 16px; background: var(--gt-surface); color: var(--gt-ink); box-shadow: 0 20px 60px rgb(41 38 56 / 20%); }
.interaction-dialog::backdrop { background: rgb(41 38 56 / 38%); }
.interaction-dialog > h2 { margin: 0 0 12px; font-size: 24px; }
.interaction-dialog p { line-height: 1.6; }
.interaction-dialog .sync-conflict { margin: 18px 0 0; }
.interaction-dialog .sync-conflict > h3 { margin: 0 0 8px; font-size: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.sync-conflict-open { font-size: 12px; white-space: normal; text-align: left; }
@media (max-width: 600px) {
  .lesson-index-link { align-items: flex-start; padding: 16px; gap: 12px; }
  .lesson-index-title { font-size: 16px; }
  .interaction-dialog { padding: 20px; }
  .interaction-dialog .sync-conflict > button { display: block; width: 100%; margin: 8px 0 0; }
}
.lesson-index > .lesson-index-item { padding: 0; border-radius: 0; background: transparent; box-shadow: none; }
#lesson-detail-list > .student-lesson { padding: 0; overflow: clip; }
#lesson-detail-list > .student-lesson:has(.exercise-select-trigger[aria-expanded='true']) { position: relative; z-index: 4; overflow: visible; }
#lesson-detail-list .student-submit { flex: 0 0 auto; padding: 12px 20px; font-size: 12px; }
@media (max-width: 600px) { #lesson-detail-list .student-submit { width: 100%; } }
