@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --paper: #f4f6f1;
    --white: #fff;
    --ink: #202922;
    --muted: #737d74;
    --line: #e1e7df;
    --green: #28634b;
    --green-dark: #1b4937;
    --mint: #dcece1;
    --lime: #d5f279;
    --coral: #d7684e;
    --red-pale: #fff0ec;
    --shadow: 0 18px 55px rgba(26, 49, 34, .08);
    font-family: 'DM Sans', 'Trebuchet MS', sans-serif;
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: 'DM Sans', 'Trebuchet MS', sans-serif; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 2; display: flex; flex-direction: column; width: 246px; padding: 30px 22px 20px; background: #eaf0e8; border-right: 1px solid #dde5dc; }
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; color: var(--ink); font: 800 18px/1 'Manrope', sans-serif; text-decoration: none; }
.brand-mark { display: grid; width: 35px; height: 35px; place-items: center; color: var(--lime); background: var(--green-dark); font: 800 17px/1 'Manrope', sans-serif; }
.brand-sub { display: block; margin-top: 5px; color: #77857a; font: 500 8px/1 'DM Mono', monospace; }
.side-rule { height: 1px; margin: 35px 0 30px; background: #d8e2d7; }
.nav-caption, .eyebrow, .banner-kicker { margin: 0; color: #718177; font: 500 10px/1.4 'DM Mono', monospace; }
.side-nav { display: grid; gap: 7px; margin-top: 14px; }
.side-nav a { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 12px; color: #59665c; font-size: 13px; text-decoration: none; }
.side-nav a.active { color: var(--green-dark); background: #dbe8dc; font-weight: 700; }
.nav-icon { color: #89978b; font: 10px 'DM Mono', monospace; }
.side-account { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 12px 0; border-top: 1px solid #d8e2d7; }
.avatar { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; color: white; background: var(--green); border-radius: 50%; font-weight: 700; }
.account-copy { display: grid; min-width: 0; gap: 3px; font-size: 11px; }
.account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy small { color: var(--muted); font-size: 10px; }
.signout { margin-left: auto; color: #536358; font-size: 10px; text-decoration: none; }
.sidebar-note { max-width: 172px; margin-top: 51px; color: #67766c; font: 15px/1.65 'Manrope', sans-serif; }
.note-dot { display: block; width: 8px; height: 8px; margin-bottom: 14px; background: var(--coral); border-radius: 50%; }
.sidebar-bottom { display: flex; justify-content: space-between; color: #879388; font: 8px 'DM Mono', monospace; }
.main-area { display: flex; flex: 1; flex-direction: column; min-width: 0; margin-left: 246px; }
.topbar { display: flex; justify-content: space-between; min-height: 58px; align-items: center; padding: 0 5.4%; border-bottom: 1px solid var(--line); color: #69756b; font: 10px 'DM Mono', monospace; }
.topbar-date { color: #8d978e; }
.content-wrap { width: min(1160px, 100%); flex: 1; margin: 0 auto; padding: 34px 5.4% 56px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 25px; }
.page-heading h1 { margin: 7px 0 0; font: 700 29px/1.12 'Manrope', sans-serif; }
.page-footer { display: flex; justify-content: space-between; padding: 18px 5.4%; border-top: 1px solid var(--line); color: #859087; font: 9px 'DM Mono', monospace; }
.notice { margin: 0 0 20px; padding: 12px 15px; border: 1px solid #c8dfcb; color: #315e3e; background: #edf6e9; font-size: 13px; }
.notice.error { border-color: #efc7bb; color: #9a4334; background: var(--red-pale); }
.notification-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.notification-list li { padding-top: 8px; border-top: 1px solid rgba(49, 94, 62, .16); }
.notification-list li > div { display: grid; gap: 3px; }
.notification-list small { color: #657b68; font-size: 10px; }
.notification-detail { color: #344c38; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.student-banner, .admin-banner { position: relative; display: flex; justify-content: space-between; align-items: center; overflow: hidden; min-height: 218px; padding: 30px 36px; color: #f5f6eb; background: var(--green-dark); }
.student-banner::after, .admin-banner::after { position: absolute; top: -125px; right: 16%; width: 325px; height: 325px; border: 1px solid rgba(216, 239, 189, .25); border-radius: 50%; content: ''; box-shadow: 0 0 0 38px rgba(216, 239, 189, .035), 0 0 0 78px rgba(216, 239, 189, .025); }
.student-banner > div, .admin-banner > div { position: relative; z-index: 1; }
.banner-kicker { color: #c8d8c4; }
.student-banner h2, .admin-banner h2 { margin: 13px 0 10px; font: 600 27px/1.23 'Manrope', sans-serif; }
.student-banner p:not(.banner-kicker), .admin-banner p:not(.banner-kicker) { max-width: 440px; margin: 0; color: #c5d3c8; font-size: 12px; line-height: 1.65; }
.banner-stat { display: flex; align-items: center; gap: 14px; margin-right: 5%; color: #c9d9ca; font: 9px/1.65 'DM Mono', monospace; }
.stat-number { color: var(--lime); font: 500 45px/1 'Manrope', sans-serif; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 36px 0 15px; }
.section-heading h2 { margin: 6px 0 0; font: 700 19px 'Manrope', sans-serif; }
.count-pill { padding: 7px 9px; color: #526552; background: #e4ece2; font: 9px 'DM Mono', monospace; }
.exam-form { display: grid; gap: 12px; }
.question-card { min-width: 0; margin: 0; padding: 18px 20px 20px; border: 1px solid var(--line); background: var(--white); }
.question-card legend { display: flex; align-items: center; gap: 12px; padding: 0; }
.question-number { color: var(--green); font: 500 11px 'DM Mono', monospace; }
.question-teacher { color: #89948a; font: 9px 'DM Mono', monospace; }
.question-card h3 { margin: 14px 0 16px; font: 600 16px/1.5 'Manrope', sans-serif; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.option-choice { display: flex; align-items: center; gap: 10px; min-height: 43px; padding: 7px 10px; border: 1px solid #e6ebe5; color: #4c574e; cursor: pointer; font-size: 12px; line-height: 1.4; }
.option-choice:has(input:checked) { border-color: #75a487; background: #f1f7f1; }
.option-choice input { accent-color: var(--green); }
.option-letter { display: grid; flex: 0 0 23px; width: 23px; height: 23px; place-items: center; color: #617567; background: #edf2ec; font: 10px 'DM Mono', monospace; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 10px 0 0; color: var(--muted); font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 45px; padding: 0 17px; border: 0; cursor: pointer; font-weight: 700; font-size: 12px; text-decoration: none; }
.button-primary { color: white; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-wide { width: 100%; }
.empty-state { display: grid; justify-items: center; padding: 38px 20px; border: 1px dashed #ccd7cc; background: rgba(255,255,255,.44); text-align: center; }
.empty-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--green); background: var(--mint); border-radius: 50%; }
.empty-state h3 { margin: 13px 0 4px; font: 700 16px 'Manrope', sans-serif; }
.empty-state p, .muted-copy { max-width: 480px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.history-heading { margin-top: 44px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: white; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 14px; color: #7b877d; background: #f8faf7; font: 9px 'DM Mono', monospace; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 14px; border-top: 1px solid #edf0ec; color: #566157; font-size: 11px; vertical-align: middle; }
td strong { display: block; color: #303b33; font-size: 11px; }
td small { display: block; margin-top: 4px; color: #879188; font-size: 10px; }
.score-chip { display: inline-block; padding: 5px 8px; color: #3e654b; background: #e8f3e8; font: 10px 'DM Mono', monospace; white-space: nowrap; }
.score-wrong { color: #a54d3a; background: #fff0ec; }
.score-correct { color: #3e654b; background: #e8f3e8; }
.result-panel { display: grid; grid-template-columns: 190px 1fr; margin-top: 18px; border: 1px solid #cbdccc; background: #f9fcf7; }
.result-score { display: flex; flex-direction: column; justify-content: center; gap: 9px; padding: 20px; color: #66776a; border-right: 1px solid #dce8dc; font-size: 10px; }
.result-score strong { color: var(--green-dark); font: 700 37px 'Manrope', sans-serif; }
.result-score strong.pending-score { font-size: 20px; }
.result-score strong small { color: #809283; font-size: 15px; }
.result-review { padding: 18px 20px; }
.result-review h3 { margin: 0 0 8px; font: 700 13px 'Manrope', sans-serif; }
.review-row { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #e6eee5; }
.review-index { color: #748376; font: 10px 'DM Mono', monospace; }
.review-row strong { display: block; font-size: 11px; line-height: 1.45; }
.review-row small { display: block; margin-top: 4px; color: #758176; font-size: 10px; }
.review-row b { font-size: 10px; }
.mark-good { color: #2f7650; }
.mark-bad { color: #b7523b; }
.teacher-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(220px, .75fr); gap: 18px; align-items: start; }
.teacher-menu { display: flex; gap: 5px; margin: 0 0 27px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.teacher-menu a { flex: 0 0 auto; padding: 12px 15px; border-bottom: 2px solid transparent; color: #69766c; font-size: 12px; text-decoration: none; }
.teacher-menu a.active { border-color: var(--green); color: var(--green-dark); font-weight: 700; }
.workspace-switch { display: flex; gap: 0; width: fit-content; margin: 0 0 24px; border-bottom: 1px solid var(--line); }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-switch a { padding: 11px 15px; border-bottom: 2px solid transparent; color: #69766c; font-size: 12px; text-decoration: none; }
.workspace-switch a.active { border-bottom-color: var(--green); color: var(--green-dark); font-weight: 700; }
.teacher-welcome { display: flex; justify-content: space-between; align-items: center; gap: 22px; min-height: 190px; padding: 28px 30px; color: #f5f6eb; background: var(--green-dark); }
.teacher-welcome h2 { margin: 12px 0 8px; font: 600 25px/1.25 'Manrope', sans-serif; }
.teacher-welcome p:not(.banner-kicker) { max-width: 450px; margin: 0; color: #c5d3c8; font-size: 12px; line-height: 1.65; }
.teacher-home-stats { display: flex; gap: 22px; }
.teacher-home-stats div { display: grid; gap: 5px; }
.teacher-home-stats strong { color: var(--lime); font: 500 30px 'Manrope', sans-serif; }
.teacher-home-stats span { color: #c8d8c8; font: 8px 'DM Mono', monospace; white-space: nowrap; }
.teacher-profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--line); background: var(--line); }
.teacher-profile div { padding: 14px 16px; background: white; }
.teacher-profile dt { color: #7b877d; font: 9px 'DM Mono', monospace; text-transform: uppercase; }
.teacher-profile dd { margin: 6px 0 0; color: #303b33; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.teacher-form { display: grid; gap: 18px; padding: 21px; border: 1px solid var(--line); background: white; }
.teacher-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.teacher-form-compact { max-width: 760px; }
.teacher-description { grid-column: 1 / -1; }
.teacher-description textarea, .feedback-form textarea { min-height: 130px; }
.topic-library { display: grid; gap: 10px; }
.topic-row { padding: 17px 18px; border: 1px solid var(--line); background: white; }
.topic-row h3 { margin: 12px 0 7px; font: 700 14px 'Manrope', sans-serif; }
.topic-row p { margin: 0; color: #59665c; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.question-list { display: grid; gap: 12px; }
.question-edit { position: relative; display: grid; gap: 14px; min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--line); }
.question-edit legend { padding: 0 7px; color: var(--green-dark); font: 700 13px 'Manrope', sans-serif; }
.question-edit > .remove-question { position: absolute; top: 14px; right: 18px; }
.remove-question:disabled { visibility: hidden; }
.teacher-options { display: grid; gap: 8px; }
.teacher-options .options-label { margin: 0; }
.question-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.button-secondary { color: var(--green-dark); border: 1px solid #cddacd; background: #f5f8f3; }
.button-secondary:hover { background: #eaf1e8; }
.feedback-form { max-width: 760px; }
.feedback-note { margin-top: 10px; }
.feedback-content { min-width: 260px; max-width: 600px; line-height: 1.65; overflow-wrap: anywhere; }
.feedback-state { display: inline-flex; align-items: center; width: fit-content; padding: 4px 7px; font-size: 10px; line-height: 1.4; }
.feedback-state.pending { color: #79572b; background: #f6efdf; }
.feedback-state.resolved { color: #315f48; background: #e7f2e8; }
.feedback-resolution { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.panel { padding: 22px; border: 1px solid var(--line); background: white; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 21px; }
.panel-heading h2 { margin: 5px 0 0; font: 700 19px 'Manrope', sans-serif; }
.panel-mark { display: grid; width: 34px; height: 34px; place-items: center; color: var(--green); background: var(--mint); font-size: 20px; }
.form-stack { display: grid; gap: 13px; }
.field-label { display: grid; gap: 7px; color: #525f55; font-size: 11px; font-weight: 600; }
.field-label input, .field-label select, .field-label textarea { width: 100%; min-height: 42px; padding: 10px 11px; border: 1px solid #dce4dc; border-radius: 0; outline: 0; color: var(--ink); background: #fff; font-size: 12px; font-weight: 400; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 82px; transition: border-color .18s ease, box-shadow .18s ease; }
.password-toggle { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); min-width: 54px; min-height: 29px; padding: 5px 9px; border: 1px solid transparent; border-radius: 3px; color: #426b4d; background: #edf4ed; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.password-toggle:hover { border-color: #cadbca; color: var(--green-dark); background: #e2eee2; }
.password-toggle:focus-visible { outline: 2px solid #568f69; outline-offset: 2px; }
.password-toggle[data-visible="true"] { color: #fff; background: var(--green); }
.password-toggle[data-visible="true"]:hover { background: var(--green-dark); }
@media (prefers-reduced-motion: reduce) {
    .password-field input, .password-toggle { transition: none; }
}
.field-label textarea { resize: vertical; line-height: 1.55; }
.field-label input:focus, .field-label select:focus, .field-label textarea:focus { border-color: #77a98a; box-shadow: 0 0 0 2px rgba(86, 143, 105, .12); }
.options-label { margin: 2px 0 -7px; }
.option-input { display: flex; align-items: center; min-height: 39px; border: 1px solid #dce4dc; }
.option-input span { display: grid; align-self: stretch; width: 38px; flex: 0 0 38px; place-items: center; color: var(--green); background: #edf4ed; font: 11px 'DM Mono', monospace; }
.option-input input { width: 100%; height: 37px; padding: 0 10px; border: 0; outline: 0; font-size: 11px; }
.teacher-aside { display: grid; gap: 12px; }
.metric-panel { padding: 19px; color: white; background: var(--green); }
.metric-panel .eyebrow { color: #c7daca; }
.metric-panel > strong { display: block; margin: 16px 0 0; color: var(--lime); font: 600 43px 'Manrope', sans-serif; }
.metric-panel > span { color: #e2ece1; font-size: 11px; }
.metric-foot { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.2); color: #d5e3d5; font: 9px 'DM Mono', monospace; }
.teacher-tip { padding: 18px; border: 1px solid #e3e8df; background: #eef3e9; }
.tip-symbol { display: grid; width: 22px; height: 22px; place-items: center; color: white; background: var(--coral); border-radius: 50%; font: italic 13px Georgia, serif; }
.teacher-tip h3 { margin: 13px 0 6px; font: 700 13px 'Manrope', sans-serif; }
.teacher-tip p { margin: 0; color: #6c786d; font-size: 11px; line-height: 1.65; }
.question-library { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.library-row { padding: 15px 16px; border: 1px solid var(--line); background: white; }
.library-meta, .library-bottom { display: flex; justify-content: space-between; gap: 10px; color: #79857a; font: 9px 'DM Mono', monospace; }
.library-meta span { color: var(--green); }
.library-row h3 { min-height: 45px; margin: 13px 0; font: 600 13px/1.55 'Manrope', sans-serif; }
.library-option-text { align-self: center; padding: 0 10px; color: #566157; font-size: 11px; }
.student-result-list { display: grid; width: 100%; border-top: 1px solid var(--line); }
.student-result-row { display: grid; grid-template-columns: minmax(160px, 1.3fr) repeat(2, minmax(100px, .65fr)) minmax(130px, 1fr) 20px; align-items: center; gap: 18px; min-height: 76px; padding: 13px 17px; border: 1px solid var(--line); border-top: 0; color: inherit; background: white; text-decoration: none; }
.student-result-row:hover { background: #f8faf7; }
.student-result-row > span:not(.student-result-latest, .student-result-arrow) { display: grid; gap: 4px; }
.student-result-row strong { color: #303b33; font-size: 13px; }
.student-result-row small, .student-result-latest { color: #79857a; font-size: 10px; }
.student-result-name strong { color: var(--green-dark); }
.student-result-arrow { color: var(--green); font-size: 18px; }
.student-result-detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 19px; }
.student-result-detail-heading h2 { margin: 6px 0 0; font: 700 22px 'Manrope', sans-serif; }
.student-attempt { display: grid; gap: 8px; margin-top: 18px; }
.student-attempt-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.student-attempt-heading h3 { margin: 5px 0 0; font: 700 14px 'Manrope', sans-serif; }
.student-attempt-heading time { color: var(--muted); font: 10px 'DM Mono', monospace; }
.bulk-grade-form { display: grid; gap: 12px; }
.bulk-grade-label { display: grid; gap: 5px; min-width: 105px; color: var(--muted); font-size: 10px; }
.bulk-grade-label input { width: 110px; min-height: 36px; padding: 7px 8px; border: 1px solid var(--line); background: white; }
.bulk-grade-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.grade-inline { display: grid; grid-template-columns: minmax(105px, 1fr) auto; align-items: end; gap: 7px; min-width: 230px; }
.grade-inline .field-label { min-width: 105px; }
.grade-inline .field-label input { min-height: 36px; padding: 7px 8px; }
.grade-inline .button { min-height: 36px; padding: 0 10px; white-space: nowrap; }
.grade-saved { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.resource-teacher-list { display: grid; width: min(760px, 100%); border-top: 1px solid var(--line); }
.resource-teacher { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 62px; padding: 11px 15px; border: 1px solid var(--line); border-top: 0; color: inherit; background: white; text-decoration: none; }
.resource-teacher:hover, .resource-teacher.active { background: #edf4ed; }
.resource-teacher > span:first-child { display: grid; gap: 4px; }
.resource-teacher strong { color: var(--green-dark); font-size: 12px; }
.resource-teacher small { color: var(--muted); font-size: 10px; }
.resource-teacher > span:last-child { color: var(--green); }
.favorite-action { margin-top: 12px; }
.question-select { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--green-dark); font-size: 11px; font-weight: 700; cursor: pointer; }
.question-select input { width: 16px; height: 16px; accent-color: var(--green); }
.question-type-badge { display: inline-block; padding: 4px 6px; color: #7b5832; background: #f6eddf; font: 9px 'DM Mono', monospace; }
.selectable-question.is-selected { border-color: #75a487; background: #f7fbf6; }
.selectable-question [data-question-answer] { display: grid; gap: 13px; }
.question-favorite-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 9px; border-top: 1px solid #edf0ec; color: var(--muted); font-size: 10px; }
.library-bottom { padding-top: 9px; border-top: 1px solid #edf0ec; }
.compact-empty { margin-top: 10px; padding: 25px; }
.question-cell { min-width: 190px; max-width: 300px; line-height: 1.45; }
.admin-banner { min-height: 193px; }
.admin-banner h2 { font-size: 25px; }
.admin-stats { display: flex; gap: 28px; margin-right: 2%; }
.admin-stats div { display: grid; gap: 6px; }
.admin-stats strong { color: var(--lime); font: 500 32px 'Manrope', sans-serif; }
.admin-stats span { color: #c8d8c8; font: 9px 'DM Mono', monospace; }
.role-tag { padding: 5px 7px; color: #315f48; background: #e7f2e8; font: 9px 'DM Mono', monospace; }
.role-tag.teacher { color: #9c523c; background: #fff0e9; }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; }
.status-dot::before { width: 6px; height: 6px; border-radius: 50%; background: #4b9a67; content: ''; }
.status-dot.inactive::before { background: #c96850; }
.presence-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; white-space: nowrap; }
.presence-status::before { width: 7px; height: 7px; border-radius: 50%; background: #c96850; content: ''; }
.presence-status.online::before { background: #4b9a67; }
.text-button { padding: 4px 0; border: 0; color: var(--green); background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; white-space: nowrap; }
.password-mask { color: #8a958b; font-size: 11px; }
.security-note { margin: 15px 0 0; padding: 12px 14px; color: #69766b; background: #e9efe7; font-size: 11px; line-height: 1.6; }
.security-note strong { color: #405947; }

.auth-body { min-height: 100vh; background: #edf1eb; }
.auth-layout { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(460px, 1.05fr); min-height: 100vh; }
.auth-story { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 35px 8%; color: white; background: var(--green-dark); }
.brand-light { position: relative; z-index: 1; color: white; }
.brand-light .brand-sub { color: #afc1b4; }
.story-copy { position: relative; z-index: 1; width: min(450px, 100%); margin: auto 0; padding: 75px 0; }
.story-copy .eyebrow { color: var(--lime); }
.story-copy h1 { margin: 17px 0; font: 600 58px/1.09 'Manrope', sans-serif; }
.story-copy h1 em { color: var(--lime); font: 500 italic 1em Georgia, serif; }
.story-copy > p:last-child { max-width: 365px; margin: 0; color: #c1d1c5; font-size: 14px; line-height: 1.75; }
.story-bottom { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: #a9bcad; font: 9px 'DM Mono', monospace; }
.story-bottom span:last-child { margin-left: auto; }
.story-line { width: 37px; height: 1px; background: var(--lime); }
.story-orbit { position: absolute; border: 1px solid rgba(211, 241, 166, .12); border-radius: 50%; }
.orbit-one { top: 16%; right: -190px; width: 470px; height: 470px; }
.orbit-two { top: 25%; right: -110px; width: 310px; height: 310px; border-color: rgba(211, 241, 166, .2); }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 8%; background: #f6f8f4; }
.auth-card { width: min(390px, 100%); }
.auth-card h2 { margin: 10px 0 6px; font: 700 27px 'Manrope', sans-serif; }
.auth-intro { margin: 0 0 21px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 20px; border-bottom: 1px solid #dbe3db; }
.auth-tabs a { padding: 11px 0; border-bottom: 2px solid transparent; color: #7d887e; font-size: 12px; text-align: center; text-decoration: none; }
.auth-tabs a.selected { border-color: var(--green); color: var(--green-dark); font-weight: 700; }
.role-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #e9efe8; }
.role-switch label { cursor: pointer; }
.role-switch input { position: absolute; opacity: 0; }
.role-switch span { display: block; padding: 10px; color: #6a776d; font-size: 11px; text-align: center; }
.role-switch input:checked + span { color: var(--green-dark); background: white; box-shadow: 0 2px 8px rgba(30,60,38,.08); font-weight: 700; }
.auth-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 15px; border-top: 1px solid #e1e7e0; color: #7c887e; font-size: 10px; }
.auth-foot a { color: var(--green); font-weight: 700; text-decoration: none; }
.auth-legal { display: flex; justify-content: space-between; width: min(390px, 100%); margin-top: 42px; color: #9aa49b; font: 8px 'DM Mono', monospace; }
.mobile-brand { display: none; }
.admin-auth { display: grid; place-items: center; padding: 28px; }
.admin-login-wrap { width: min(420px, 100%); }
.admin-login-wrap > .brand { margin: 0 0 28px 4px; }
.admin-login-card { width: 100%; padding: 30px; border: 1px solid var(--line); background: white; box-shadow: var(--shadow); }
.admin-login-card .auth-foot { justify-content: flex-start; }
.admin-config-note { margin: 13px 3px; color: #78847a; font-size: 10px; line-height: 1.5; }

@media (max-width: 980px) {
    .sidebar { width: 205px; padding-right: 17px; padding-left: 17px; }
    .main-area { margin-left: 205px; }
    .admin-stats { gap: 14px; }
    .teacher-grid { grid-template-columns: minmax(0, 1.2fr) minmax(190px, .8fr); }
    .teacher-welcome { align-items: flex-start; flex-direction: column; }
    .teacher-home-stats { gap: 27px; }
    .content-wrap { padding-right: 4%; padding-left: 4%; }
    .topbar, .page-footer { padding-right: 4%; padding-left: 4%; }
}
@media (max-width: 820px) {
    .sidebar { position: relative; inset: auto; width: auto; min-height: 0; padding: 13px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
    .app-shell { display: block; }
    .brand { font-size: 16px; }
    .side-rule, .nav-caption, .side-nav, .sidebar-note, .sidebar-bottom { display: none; }
    .side-account { position: absolute; top: 9px; right: 14px; margin: 0; padding: 0; border: 0; }
    .side-account .avatar { width: 31px; height: 31px; flex-basis: 31px; }
    .account-copy { display: none; }
    .main-area { margin-left: 0; }
    .topbar { min-height: 43px; }
    .content-wrap { padding: 25px 17px 40px; }
    .page-heading h1 { font-size: 25px; }
    .student-banner, .admin-banner { min-height: 210px; padding: 23px 20px; }
    .student-banner h2, .admin-banner h2 { font-size: 24px; }
    .banner-stat { gap: 8px; margin: 0; }
    .stat-number { font-size: 35px; }
    .admin-stats { position: absolute !important; right: 15px; bottom: 15px; gap: 14px; }
    .admin-stats strong { font-size: 22px; }
    .admin-stats span { font-size: 8px; }
    .admin-banner { padding-bottom: 78px; }
    .options-grid { grid-template-columns: 1fr; }
    .submit-row { align-items: stretch; flex-direction: column; }
    .submit-row .button { align-self: stretch; }
    .result-panel { grid-template-columns: 1fr; }
    .result-score { display: grid; grid-template-columns: auto 1fr; align-items: center; border-right: 0; border-bottom: 1px solid #dce8dc; }
    .result-score .eyebrow, .result-score > span:last-child { grid-column: 1 / -1; }
    .result-score strong { grid-column: 1; grid-row: 2; }
    .result-review { padding: 15px; }
    .teacher-grid { grid-template-columns: 1fr; }
    .teacher-aside { grid-template-columns: 1fr 1fr; }
    .teacher-form-grid, .teacher-profile { grid-template-columns: 1fr; }
    .teacher-description { grid-column: auto; }
    .question-form-actions { align-items: stretch; flex-direction: column; }
    .question-form-actions .button { width: 100%; }
    .section-heading:has(.workspace-actions) { align-items: flex-start; flex-direction: column; gap: 12px; }
    .question-library { grid-template-columns: 1fr; }
    .student-result-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 14px; }
    .student-result-row > span:nth-child(2), .student-result-row > span:nth-child(3) { display: none !important; }
    .student-result-latest { grid-column: 1; }
    .student-result-arrow { grid-column: 2; grid-row: 1 / span 2; }
    .student-result-detail-heading { align-items: flex-start; }
    .question-favorite-row { align-items: flex-start; flex-direction: column; }
    .student-attempt-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .page-footer { padding: 15px 17px; }
    .auth-layout { display: block; }
    .auth-story { display: none; }
    .auth-panel { min-height: 100vh; padding: 20px 23px 30px; }
    .mobile-brand { display: block; width: min(390px, 100%); margin-bottom: 43px; }
    .auth-card { width: min(390px, 100%); }
    .auth-card h2 { font-size: 24px; }
    .auth-legal { margin-top: 40px; }
}
@media (max-width: 430px) {
    .student-banner { align-items: flex-start; min-height: 235px; }
    .student-banner > div:first-child { max-width: 75%; }
    .banner-stat { position: absolute; right: 14px; bottom: 21px; }
    .student-banner h2 { font-size: 21px; }
    .student-banner p:not(.banner-kicker) { font-size: 11px; }
    .teacher-aside { grid-template-columns: 1fr; }
    .admin-stats { left: 18px; right: auto; }
    .review-row { grid-template-columns: 22px minmax(0,1fr); }
    .review-row b { grid-column: 2; }
    .auth-foot { align-items: flex-start; flex-direction: column; }
}

@media (min-width: 768px) {
    .content-wrap:has(> .teacher-menu) { padding-left: 5.4%; }
    .teacher-menu {
        position: fixed;
        z-index: 10;
        top: 210px;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
        width: 246px;
        margin: 0;
        padding: 4px 22px;
        overflow: visible;
        border-right: 0;
        border-bottom: 0;
        background: #eaf0e8;
    }
    .teacher-menu a {
        padding: 11px 12px;
        border-bottom: 0;
        border-left: 2px solid transparent;
    }
    .teacher-menu a.active { border-color: transparent; border-left-color: var(--green); }
}
@media (min-width: 768px) and (max-width: 820px) {
    .app-shell:has(.teacher-menu) { display: flex; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 205px;
        min-height: 100vh;
        padding: 30px 17px 20px;
        border-right: 1px solid #dde5dc;
        border-bottom: 0;
    }
    .sidebar .side-rule { display: block; }
    .sidebar .nav-caption { display: block; }
    .sidebar .side-nav { display: grid; }
    .sidebar .side-account { position: static; margin-top: auto; padding: 12px 0; border-top: 1px solid #d8e2d7; }
    .sidebar .account-copy { display: grid; }
    .main-area { margin-left: 205px; }
    .content-wrap:has(> .teacher-menu) { padding-left: 17px; }
    .teacher-menu { width: 205px; padding-right: 17px; padding-left: 17px; }
}
@media (min-width: 821px) and (max-width: 980px) {
    .content-wrap:has(> .teacher-menu) { padding-left: 4%; }
    .teacher-menu { width: 205px; padding-right: 17px; padding-left: 17px; }
}
@media (max-width: 767px) {
    .content-wrap:has(> .teacher-menu) { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
    .teacher-menu {
        position: fixed;
        z-index: 50;
        inset: auto 0 0;
        display: flex;
        justify-content: space-around;
        gap: 0;
        margin: 0;
        padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
        overflow-x: auto;
        border-top: 1px solid var(--line);
        border-bottom: 0;
        background: var(--white);
        box-shadow: 0 -8px 24px rgba(26, 49, 34, .09);
    }
    .teacher-menu a {
        flex: 1 0 auto;
        padding: 11px 9px 9px;
        border: 0;
        border-top: 2px solid transparent;
        text-align: center;
        white-space: nowrap;
    }
    .teacher-menu a.active { border-color: transparent; border-top-color: var(--green); }
}