/* Editorial Tech / Command Center. Local assets, shared teacher/student primitives. */
:root {
  --navy:#101827; --graphite:#202938; --accent:#176bff; --cyan:#00b8d9;
  --bg:#f5f5f2; --surface:#fff; --ink:#172033; --muted:#5e6b7e; --line:#dee4ec;
  --accent-soft:#edf3ff; --cyan-soft:#e9f7fa; --cyan-ink:#00677a;
  --green:#176747; --green-soft:#eaf5ee; --amber:#865008; --amber-soft:#fff5e6;
  --red:#a12b3a; --red-soft:#fff0f1; --radius:12px;
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s6:24px; --s8:32px;
  --sidebar-width:232px; --shadow:0 2px 8px rgb(16 24 39 / 4%);
  --mono:"Cascadia Code",Consolas,monospace;
}
*,*::before,*::after {box-sizing:border-box}
[hidden] {display:none!important}
html {scroll-behavior:smooth; scroll-padding-top:24px}
body {margin:0; background:var(--bg); color:var(--ink); font:14px/1.55 "Segoe UI",Arial,sans-serif}
a {color:inherit; text-decoration:none}
a:hover {text-decoration:none}
button,input,textarea,select {font:inherit}
button,a,input,select,textarea,summary {touch-action:manipulation}
:focus-visible {outline:3px solid var(--accent); outline-offset:3px}
h1,h2,h3,p {margin:0 0 12px}
h1 {font-size:32px; letter-spacing:-.9px; line-height:1.18; font-weight:730}
h2 {font-size:20px; letter-spacing:-.35px; line-height:1.3; font-weight:700}
h3 {font-size:16px; line-height:1.4; font-weight:650}
strong,b {font-weight:650}
small,.small {font-size:12px}
svg {max-width:100%}
hr {border:0; border-top:1px solid var(--line); margin:24px 0}
fieldset {min-width:0}
.icon-defs {position:absolute; width:0; height:0; overflow:hidden}
.icon {width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; vertical-align:middle}
.icon-tile,.object-icon {display:inline-grid; place-items:center; width:40px; height:40px; flex-shrink:0; background:var(--accent-soft); color:var(--accent); border-radius:8px; font-style:normal}
.icon-tile.compact {width:28px; height:28px}
.icon-tile.cyan {color:var(--cyan-ink); background:var(--cyan-soft)}
.icon-tile.amber {color:var(--amber); background:var(--amber-soft)}
.icon-tile.rose {color:var(--cyan-ink); background:var(--cyan-soft)}
.icon-tile.violet {color:var(--accent); background:var(--accent-soft)}
.muted,.metadata {color:var(--muted)}
.eyebrow {color:var(--muted); font-size:11px; font-weight:650; letter-spacing:1.2px; text-transform:uppercase}
.text-accent {color:var(--accent); font-weight:600}
.text-accent:hover,.section-heading>a:hover,.page-crumbs a:hover {text-decoration:underline}
.skip-link {position:fixed; top:-100px; left:16px; z-index:100; background:var(--surface); color:var(--ink); padding:12px 16px; border:1px solid var(--line); border-radius:8px}
.skip-link:focus {top:12px}
.sidebar {position:fixed; inset:0 auto 0 0; width:var(--sidebar-width); display:flex; flex-direction:column; padding:24px 12px 16px; background:var(--navy); color:#c1ccdc; z-index:40}
.brand {display:flex; align-items:center; gap:10px; padding:0 12px; color:#fff; font-size:21px; font-weight:700; letter-spacing:-.5px}
.brandmark {display:grid; place-items:center; width:32px; height:32px; border-radius:8px; background:var(--accent); color:white}
.brand-dot {color:var(--cyan); margin-left:-8px}
.role-card {display:flex; gap:10px; align-items:center; margin:24px 12px 20px; font-size:12px; color:#eef2f7}
.role-card small {display:block; font-size:11px; color:#a9b7cc}
.role-light {width:6px; height:6px; border-radius:50%; background:var(--cyan); flex-shrink:0}
.workspace-label,.nav-label {margin:0 12px 8px; font-size:10px; letter-spacing:1.3px; color:#9aaac0; text-transform:uppercase}
.sidebar nav {display:flex; flex-direction:column; gap:4px; overflow-y:auto; min-height:0; scrollbar-width:thin; scrollbar-color:#465469 var(--navy)}
.sidebar nav a {position:relative; display:flex; align-items:center; gap:12px; padding:10px 12px; min-height:42px; border-radius:8px; font-size:13px}
.sidebar nav a .icon {width:18px; height:18px}
.sidebar nav a:hover {color:white; background:var(--graphite)}
.sidebar nav a.active {color:white; background:#22344f}
.sidebar nav a.active::before {content:""; position:absolute; width:3px; height:18px; background:var(--cyan); border-radius:2px; left:0}
.sidebar :focus-visible {outline-color:#84b3ff}
.nav-divider {height:1px; background:#354153; margin:12px}
.nav-label {margin-top:8px}
.sidebar-foot {margin:auto 12px 0; padding-top:20px; font-size:11px; color:#a9b7cc}
.sidebar-foot strong {display:block; color:#eef2f7; font-size:12px; font-weight:500}
.sidebar-foot .icon-tile {display:none}
.main {margin-left:var(--sidebar-width); min-height:100vh; display:flex; flex-direction:column}
.topbar {display:flex; align-items:center; justify-content:space-between; gap:16px; height:68px; flex-shrink:0; padding:0 32px; border-bottom:1px solid var(--line); background:var(--surface)}
.breadcrumb {font-size:13px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted)}
.breadcrumb>a {font-weight:600; color:var(--ink)}
.breadcrumb>span {margin:0 10px; color:var(--muted)}
.top-actions {display:flex; align-items:center; gap:20px; flex-shrink:0}
.top-actions form {margin:0}
.date {display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px}
.profile-link {display:flex; align-items:center; gap:10px}
.avatar,.mini-avatar {display:inline-grid; place-items:center; background:var(--accent-soft); color:#164fa8; border:1px solid var(--line); width:36px; height:36px; border-radius:50%; font-size:13px; font-weight:650; flex-shrink:0}
.profile-copy {max-width:140px; line-height:1.4}
.profile-copy strong {font-size:13px; display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.profile-copy small {display:block; color:var(--muted); font-size:11px}
.icon-button {display:inline-grid; place-items:center; background:transparent; border:1px solid transparent; border-radius:8px; height:44px; width:44px; color:var(--muted); cursor:pointer}
.icon-button:hover {background:var(--bg); color:var(--ink)}
.menu-toggle,.nav-scrim,.drawer-close {display:none}
main {width:100%; max-width:1600px; margin:0 auto; padding:32px; flex:1; min-width:0}
main:focus-visible {outline:2px solid var(--accent); outline-offset:-2px}
footer {display:flex; justify-content:space-between; gap:16px; margin-top:8px; border-top:1px solid var(--line); padding:20px 32px; color:var(--muted); font-size:11px}
.panel {background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:24px; margin-bottom:24px; min-width:0}
.section-heading {display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px}
.section-heading h2,.section-heading h3 {margin:0}
.section-heading>a {color:var(--accent); font-size:12px; font-weight:600; flex-shrink:0}
h2 .icon,h3 .icon {width:18px; height:18px; margin-right:6px; color:var(--muted)}
.page-heading {display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:24px}
.page-heading .eyebrow {margin-bottom:8px}
.page-heading h1 {margin-bottom:8px}
.page-heading p {color:var(--muted); margin:0}
.page-crumbs {display:flex; gap:8px; flex-wrap:wrap; font-size:12px; color:var(--muted); margin:0 0 16px}
.page-crumbs a {color:var(--accent)}
.columns,.dashboard-top,.content-sidebar,.review-grid {display:grid; gap:24px; align-items:start; min-width:0}
.columns {grid-template-columns:minmax(0,1.55fr) minmax(0,1fr)}
.columns.equal {grid-template-columns:repeat(2,minmax(0,1fr))}
.columns>*,.dashboard-top>*,.content-sidebar>*,.review-grid>* {min-width:0}
.cards {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-bottom:24px}
.cards>.panel {margin:0}
.task-card,.group-card {display:block; transition:border-color .15s}
.task-card:hover,.group-card:hover {border-color:#98b6e8}
.task-card h3,.group-card h2 {margin-top:12px; overflow-wrap:anywhere}
.task-card .eyebrow {display:block; margin-top:16px; font-size:11px; letter-spacing:.5px}
.card-foot {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-top:20px; padding-top:16px; border-top:1px solid var(--line); color:var(--muted); font-size:12px}
.card-foot .icon {width:15px; height:15px; margin-right:4px}
.button {display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 16px; border:1px solid transparent; border-radius:8px; background:var(--accent); color:white; font-size:13px; line-height:1.35; font-weight:600; text-align:center; cursor:pointer}
.button:hover {background:#105bdc}
.button.secondary {background:white; color:var(--ink); border-color:#aebacd}
.button.secondary:hover {background:var(--bg); border-color:#718096}
.button.ghost {background:transparent; color:var(--accent)}
.button.ghost:hover {background:var(--accent-soft)}
.button.danger {background:var(--red); color:white; border-color:var(--red)}
.button.danger:hover {background:#861f2e}
.button:disabled {opacity:.55; cursor:not-allowed}
.actions {display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:16px 0 24px}
.actions form {margin:0}
.action-bar {padding:16px; background:var(--surface); border:1px solid var(--line); border-radius:10px}
.pill,.count-badge {display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:4px 8px; border:1px solid transparent; border-radius:5px; background:#eef1f5; color:#4c596b; font-size:11px; line-height:1.4; font-weight:600; white-space:normal; flex-shrink:0}
.pill[class*="status-"]::before {content:""; width:5px; height:5px; border-radius:50%; background:currentColor; flex-shrink:0}
.status-draft,.status-archived,.status-cancelled,.status-missing {background:#eef1f5; color:#4c596b}
.status-draft::before {border-radius:1px!important}
.status-published,.status-prepared,.status-reviewed,.status-ready {background:var(--accent-soft); color:#154eaa}
.status-submitted,.status-ai_draft,.status-generated,.status-generating {background:var(--cyan-soft); color:var(--cyan-ink)}
.status-accepted,.status-conducted,.status-approved {background:var(--green-soft); color:var(--green)}
.status-rework,.status-template_missing,.status-requires_teacher_confirmation,.status-rejected_draft {background:var(--amber-soft); color:var(--amber)}
.status-rejected,.status-failed,.status-provider_failed,.status-validation_failed {background:var(--red-soft); color:var(--red)}
.notice {border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:8px; padding:12px 16px; background:var(--accent-soft); color:#24436a; margin:0 0 24px; font-size:13px}
.notice .icon {width:18px; margin-right:6px}
.notice.error {background:var(--red-soft); color:var(--red); border-left-color:var(--red)}
.notice.warning {background:var(--amber-soft); color:var(--amber); border-left-color:#bf761d}
.notice.success {background:var(--green-soft); color:var(--green); border-left-color:var(--green)}
.row-link,.lesson-row,.attention-row,.student-row {display:flex; align-items:center; gap:12px; padding:16px 0; border-bottom:1px solid var(--line); min-width:0}
.row-link:last-child,.lesson-row:last-child,.student-row:last-child {border-bottom:0}
a.row-link:hover,a.lesson-row:hover,a.attention-row:hover {background:#f8fafc}
.row-copy {flex:1; min-width:0; overflow-wrap:anywhere}
.row-copy strong {display:block; font-size:14px; line-height:1.45}
.row-copy small,.row-copy>span {display:block; font-size:12px; color:var(--muted); margin-top:4px}
.row-copy p {font-size:13px; margin:4px 0}
.row-action {color:var(--accent); font-size:12px; font-weight:600; white-space:nowrap; padding:8px; min-height:40px; display:inline-flex; align-items:center}
.row-arrow {color:var(--muted)}
.date-tile {display:flex; flex-direction:column; align-items:center; justify-content:center; min-width:48px; height:52px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--ink)}
.date-tile strong {font-family:var(--mono); font-size:18px}
.date-tile small {font-size:11px}
.lesson-time {display:block; color:var(--ink); font-weight:650; font-size:12px; font-variant-numeric:tabular-nums; margin:0 0 4px}
.attention-row>div {flex:1; min-width:0}
.attention-row strong,.student-row strong {display:block; font-size:13px}
.attention-row small,.student-row small {display:block; color:var(--muted); font-size:12px}
.welcome-banner {margin-bottom:24px}
.semester {border-left:1px solid var(--line); padding-left:24px; font-size:14px; font-weight:600; flex-shrink:0}
.semester small {display:block; color:var(--muted); font-size:12px; font-weight:400}
.kpis {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px}
.kpis>a {display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 8px; padding:16px 20px; border:1px solid var(--line); border-radius:10px; background:var(--surface)}
.kpis>a:hover {border-color:#98b6e8}
.kpis>a>span {font-size:12px; font-weight:600; color:var(--muted)}
.kpis .icon-tile {grid-column:2; grid-row:1 / 3; width:32px; height:32px}
.kpis strong {font-size:34px; line-height:1.2; font-variant-numeric:tabular-nums; letter-spacing:-1px}
.kpis small {grid-column:1 / -1; font-size:11px; color:var(--muted)}
.dashboard-top {grid-template-columns:minmax(0,1.08fr) minmax(0,1fr); margin-bottom:24px}
.dashboard-top>.panel {margin:0}
.next-card {position:relative; min-width:0; padding:24px; background:var(--navy); color:white; border:1px solid var(--graphite); border-radius:12px; overflow:hidden}
.next-card::before {content:""; pointer-events:none; position:absolute; right:0; top:0; width:104px; height:100%; background-image:linear-gradient(#ffffff09 1px,transparent 1px),linear-gradient(90deg,#ffffff09 1px,transparent 1px); background-size:24px 24px; border-left:1px solid #ffffff10}
.next-card>* {position:relative}
.next-card .eyebrow {color:#b8c9df}
.next-card .section-heading>.icon {color:var(--cyan)}
.next-card .next-time {font-size:36px; font-weight:650; font-variant-numeric:tabular-nums; line-height:1.2; letter-spacing:-1px; margin:24px 0 8px}
.hero-meta {display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:12px; color:#c1ccdc; margin:8px 0 16px}
.next-card h2 {font-size:25px; line-height:1.3; letter-spacing:-.6px; margin:24px 0 12px}
.next-card p {color:#d4dce8; font-size:14px; margin-bottom:8px}
.next-card .location {font-size:12px}
.next-card .location .icon {width:16px; height:16px; margin-right:6px}
.next-card .actions {margin:24px 0 0}
.next-card .button.secondary {background:transparent; color:#fff; border-color:#62748b}
.next-card .button.secondary:hover {background:var(--graphite)}
.next-card .pill {background:#283a50; color:#dde8f8}
.next-card .preparation-note {display:flex; align-items:center; gap:8px; border-top:1px solid #354153; padding-top:16px; margin-top:20px; font-size:12px; color:#d4dce8}
.week-strip {display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; border-bottom:1px solid var(--line); padding-bottom:16px}
.week-day {position:relative; display:flex; flex-direction:column; align-items:center; gap:2px; padding:8px 4px; color:var(--muted); font-size:11px; border-radius:6px}
.week-day strong {font-size:16px; font-variant-numeric:tabular-nums}
.week-day.today {background:var(--accent); color:white}
.week-day.has-lessons::after {content:""; width:3px; height:3px; background:currentColor; border-radius:50%}
.day-label {display:flex; justify-content:space-between; gap:8px; align-items:center; font-size:11px; text-transform:uppercase; font-weight:650; letter-spacing:.6px; color:var(--muted); margin:16px 0 4px}
.day-empty {font-size:12px; color:var(--muted); padding:12px 0; margin:0}
.upcoming .lesson-row {gap:12px; padding:12px 0}
.upcoming .date-tile {display:none}
.upcoming .row-copy strong {font-size:13px}
.upcoming .row-copy>span {font-size:11px}
.upcoming .row-arrow {display:none}
.upcoming .pill {font-size:10px}
.section-tabs {display:flex; flex-wrap:wrap; gap:16px; font-size:12px; border-bottom:1px solid var(--line); margin-bottom:4px}
.section-tabs>* {padding:8px 0}
.section-tabs .active {border-bottom:2px solid var(--accent); color:var(--accent); font-weight:600}
.section-tabs b {background:var(--accent-soft); color:var(--accent); padding:1px 5px; border-radius:4px}
.quick-grid {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px}
.quick-grid>a {display:flex; gap:12px; align-items:center; border:1px solid var(--line); border-radius:10px; padding:16px; background:var(--surface)}
.quick-grid>a:hover {border-color:#98b6e8}
.quick-grid>a>div {flex:1; min-width:0}
.quick-grid strong {font-size:13px}
.quick-grid small {display:block; font-size:11px; color:var(--muted)}
.quick-grid>a>.icon {color:var(--muted)}
.empty-state {display:flex; flex-direction:column; align-items:flex-start; gap:8px; padding:20px 0; color:var(--muted)}
.empty-state .icon-tile {width:32px; height:32px; background:var(--bg); color:var(--muted)}
.empty-state strong {font-size:14px; color:var(--ink)}
.empty-state p {font-size:13px; max-width:55ch; margin:0}
.empty {font-size:13px; color:var(--muted); padding:16px 0}
.list-toolbar {display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:16px}
.list-count {font-size:12px; color:var(--muted)}
.list-search {display:flex; align-items:center; gap:8px; padding-left:12px; background:var(--surface); border:1px solid #8997ab; border-radius:8px; color:var(--muted)}
.list-search input {border:0!important; background:transparent!important; max-width:280px}
.object-header {display:flex; align-items:center; gap:16px; margin:0 0 24px; padding-bottom:24px; border-bottom:1px solid var(--line)}
.object-header>div:not(.object-icon) {flex:1; min-width:0}
.object-header h1 {margin:6px 0 8px; overflow-wrap:anywhere}
.object-header p {margin:0; color:var(--muted)}
.object-icon {width:48px; height:48px}
.detail-facts {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; padding:16px 0; margin-bottom:16px; border-bottom:1px solid var(--line)}
.detail-facts>div {display:flex; gap:12px; min-width:0}
.detail-facts .icon {color:var(--muted); width:18px; margin-top:4px}
.detail-facts small {display:block; font-size:11px; color:var(--muted); margin-bottom:4px}
.detail-facts strong {font-size:13px; font-weight:600; overflow-wrap:anywhere}
.content-sidebar {grid-template-columns:minmax(0,1fr) 280px}
.content-sidebar>aside {min-width:0}
.prose {line-height:1.8; overflow-wrap:anywhere}
.prose p {margin-bottom:16px}
.prose a {color:var(--accent); text-decoration:underline}
.prose h2 {margin-top:24px}
.prose h2:first-child {margin-top:0}
.prose section+section {margin-top:24px}
.prose pre {white-space:pre-wrap; overflow-wrap:anywhere}
.assignment-prose {max-width:80ch}
.policy-card {border-top:3px solid var(--cyan)}
.policy-card h3 {margin-top:12px}
.material {padding:16px 0; border-bottom:1px solid var(--line)}
.material:last-child {border-bottom:0}
.deadline {display:inline-flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; margin-right:auto}
.roster-summary {display:flex; flex-wrap:wrap; gap:24px; margin-bottom:8px; padding:16px; background:var(--bg); border-radius:8px; color:var(--muted); font-size:12px}
.roster-summary strong {font-size:24px; color:var(--ink); margin-right:6px; font-variant-numeric:tabular-nums}
.form-panel {max-width:880px}
.form-panel p,.form-field {margin-bottom:20px}
.form-panel label,.form-field>label {display:block; font-size:13px; font-weight:600; margin-bottom:6px}
.form-field:has(input[type=checkbox])>label {display:inline; margin-right:10px}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea {width:100%; min-height:44px; background:var(--surface); border:1px solid #8390a4; border-radius:6px; padding:10px 12px; color:var(--ink); max-width:100%}
textarea {resize:vertical; min-height:116px; line-height:1.6}
input[type=checkbox],input[type=radio] {width:18px; height:18px; accent-color:var(--accent); margin:0 8px 0 0; vertical-align:middle; flex-shrink:0}
input:disabled,textarea:disabled,select:disabled {background:#f0f2f5; color:var(--muted)}
input[aria-invalid=true],textarea[aria-invalid=true],select[aria-invalid=true] {border-color:var(--red)}
input[type=file] {font-size:12px; padding:8px}
input[type=file]::file-selector-button {border:0; background:var(--accent-soft); color:#154eaa; padding:8px 12px; margin-right:12px; border-radius:4px; cursor:pointer}
.helptext {display:block; color:var(--muted); font-size:12px; margin-top:6px}
.errorlist {color:var(--red); background:var(--red-soft); border-left:3px solid var(--red); padding:12px 16px 12px 32px; margin:8px 0; font-size:13px; border-radius:6px}
.form-field .errorlist {margin-top:0}
.choice-editor {background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:16px; margin:16px 0}
details {border-top:1px solid var(--line); padding:12px 0; margin-top:16px}
summary {font-size:12px; color:var(--muted); font-weight:600; cursor:pointer; padding:4px 0}
details textarea {margin-top:12px; font-family:var(--mono); font-size:12px}
[data-rubric-row] {border:1px solid var(--line); border-radius:8px; padding:16px; margin:0 0 16px; display:grid; grid-template-columns:minmax(0,1fr) 140px; gap:12px}
[data-rubric-row] legend {padding:0 8px; color:var(--muted); font-size:12px}
[data-rubric-row] label {margin:0}
[data-rubric-row] .criterion-description {grid-column:1 / -1}
[data-rubric-row] textarea {min-height:72px}
[data-rubric-row] .criterion-actions {grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:8px; margin:0}
[data-rubric-row] .criterion-actions .button {min-height:40px; font-size:12px}
[data-rubric-row] .criterion-advanced {grid-column:1 / -1; margin:0}
.rubric-tools {display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:16px}
.rubric-total {font-size:13px; font-weight:600; font-variant-numeric:tabular-nums}
.rubric-grid {display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:start; padding:16px 0; border-bottom:1px solid var(--line)}
.rubric-grid:last-child {border:0}
.rubric-grid p {font-size:13px; color:var(--muted); margin:4px 0}
.review-grid {grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
.review-grid .answer-paper {position:sticky; top:24px}
.document-body {padding:24px; border:1px solid var(--line); border-radius:8px; margin-bottom:16px; background:#fcfcfa; min-height:260px}
.document-label {font-size:11px; color:var(--muted); letter-spacing:1px; padding-bottom:16px; border-bottom:1px solid var(--line); margin-bottom:24px}
.decision-card {border-top:3px solid var(--accent)}
.decision-card textarea {min-height:84px}
.ai-recommendation {border-top:3px solid var(--cyan)}
.ai-score {font-size:32px; font-weight:650; line-height:1.2; font-variant-numeric:tabular-nums; margin:12px 0}
.ai-score small {font-size:14px; color:var(--muted)}
.ai-criterion {border-bottom:1px solid var(--line); padding:12px 0; font-size:13px}
.ai-criterion h3 {font-size:14px}
.ai-signal {background:var(--surface); border-left:3px solid #869cae}
.decision-history {padding:16px 0; border-bottom:1px solid var(--line); font-size:13px}
.decision-history:last-child {border:0}
.feedback-card {border-left:3px solid var(--green)}
.workflow-grid {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; align-items:start; margin-bottom:24px}
.workflow-grid .section-heading {flex-wrap:wrap}
.dashboard-command {display:grid; grid-template-columns:minmax(0,1.3fr) minmax(0,1fr); gap:24px; align-items:start}
.dashboard-command>* {min-width:0}
.dashboard-command .next-card {margin-bottom:24px}
.workflow-grid .panel {margin:0}
.progression-summary {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:16px; margin:16px 0; border:1px solid var(--line); background:var(--bg); border-radius:8px}
.progression-summary small {display:block; color:var(--muted); margin-bottom:4px}
.progression-summary strong {display:block}
.workflow-steps {display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; color:var(--muted); font-size:12px}
.workflow-steps span {border:1px solid var(--line); border-radius:5px; padding:4px 8px}
.workflow-steps .current {background:var(--accent-soft); color:#154eaa; border-color:#bad0f5}
.student-progress {padding:16px 20px; background:var(--surface); border:1px solid var(--line); border-radius:10px; margin-bottom:24px}
.student-progress .section-heading {margin-bottom:8px}
.student-progress h2 {font-size:16px}
.student-progress .section-heading>span {font-size:12px; color:var(--muted)}
.student-links .row-link {font-size:13px}
.quiz-entry-head {padding:24px; border:1px solid var(--line); border-left:3px solid var(--accent); background:var(--surface); border-radius:12px; margin-bottom:24px}
.quiz-entry-head>.icon-tile {margin-bottom:16px}
.quiz-entry-head h1 {margin-top:8px}
.quiz-shell {max-width:800px; margin:auto}
.quiz-shell h1 {margin:24px 0}
.quiz-progress-label {display:flex; justify-content:space-between; gap:16px; font-size:12px; color:var(--muted)}
.quiz-progress {display:block; width:100%; height:6px; border:0; border-radius:4px; overflow:hidden; appearance:none; background:var(--line); margin:12px 0 24px}
.quiz-progress::-webkit-progress-bar {background:var(--line)}
.quiz-progress::-webkit-progress-value {background:var(--accent)}
.quiz-progress::-moz-progress-bar {background:var(--accent)}
.quiz-question {padding:24px}
.quiz-question h2 {font-size:22px; margin:16px 0 24px}
.answer-choice {display:flex!important; align-items:center; gap:8px; padding:16px; margin-bottom:12px!important; min-height:56px; border:1px solid #8390a4; border-radius:8px; font-size:14px!important; font-weight:400!important; cursor:pointer}
.answer-choice:has(input:checked) {border-color:var(--accent); background:var(--accent-soft)}
.question-nav {display:flex; flex-wrap:wrap; gap:8px}
.question-nav a {display:grid; place-items:center; width:44px; height:44px; border:1px solid #8390a4; border-radius:6px; background:var(--surface)}
.question-nav a.active {color:white; background:var(--accent); border-color:var(--accent)}
.result-panel {max-width:800px; margin:0 auto 24px; padding:32px; text-align:center}
.result-emblem {display:inline-grid; place-items:center; width:48px; height:48px; border-radius:10px; background:var(--accent-soft); color:var(--accent); margin-bottom:24px}
.result-score {font-size:72px; font-weight:700; letter-spacing:-2px; font-variant-numeric:tabular-nums; color:var(--accent)}
.result-score span {font-size:32px}
.result-passed .result-score,.result-passed .result-emblem {color:var(--green)}
.result-facts {display:flex; justify-content:center; gap:32px; margin:24px 0; padding:20px 0; border-block:1px solid var(--line)}
.result-facts span {display:flex; flex-direction:column; color:var(--muted); font-size:12px}
.result-facts strong {font-size:24px; color:var(--ink)}
.bottom-nav {display:none}
.auth .main {margin:0}
.auth.student .main {padding-bottom:0}
.auth .topbar {height:68px}
.auth .topbar .date {display:none}
.auth main {display:grid; align-content:center; padding:32px 24px}
.login-wrap {width:100%; max-width:440px; margin:24px auto}
.login-wrap h1 {font-size:36px; margin:16px 0}
.login-wrap .panel {margin-top:24px; box-shadow:var(--shadow)}
.login-wrap .button {width:100%}
@media(max-width:1280px) {
  :root {--sidebar-width:208px}
  main {padding:24px}
  .topbar,footer {padding-inline:24px}
  .kpis>a {padding:16px}
  .kpis {gap:12px}
  .next-card h2 {font-size:22px}
  .next-card .next-time {font-size:32px}
  .quick-grid small {display:none}
  .row-action {padding:4px}
  .detail-facts {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1100px) {
  .dashboard-top,.dashboard-command,.columns,.review-grid,.workflow-grid {grid-template-columns:1fr}
  .columns.equal {grid-template-columns:repeat(2,minmax(0,1fr))}
  .review-grid .answer-paper {position:static}
  .content-sidebar {grid-template-columns:minmax(0,1fr) 230px}
  .date {display:none}
  .next-card {min-height:0}
  .kpis {grid-template-columns:repeat(4,minmax(0,1fr))}
  .kpis small {font-size:10px}
}
@media(max-width:780px) {
  .sidebar {width:248px; transform:translateX(-100%); transition:transform .18s}
  .main {margin-left:0}
  .menu-toggle {display:inline-grid}
  .drawer-close {display:inline-grid; position:absolute; right:8px; top:14px; color:white; font-size:24px}
  .menu-open .sidebar {transform:translateX(0)}
  .menu-open .nav-scrim {display:block; position:fixed; inset:0; border:0; background:rgb(16 24 39 / 55%); z-index:35}
  .menu-open {overflow:hidden}
  .sidebar-foot {padding-top:12px}
  .topbar {height:64px; padding:0 16px; gap:8px}
  .top-actions {gap:8px}
  .profile-copy {display:none}
  main {padding:24px 16px}
  h1 {font-size:28px}
  .panel {padding:20px; margin-bottom:16px}
  .columns,.columns.equal,.content-sidebar,.review-grid,.workflow-grid {grid-template-columns:1fr; gap:16px}
  .cards {gap:12px}
  .semester {display:none}
  .kpis {grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
  .kpis small {font-size:11px}
  .quick-grid {grid-template-columns:1fr; gap:12px}
  .quick-grid small {display:block}
  .student .menu-toggle {display:none}
  .student .main {padding-bottom:80px}
  .student .bottom-nav {display:flex; align-items:stretch; justify-content:space-around; position:fixed; inset:auto 0 0; background:var(--surface); border-top:1px solid var(--line); padding:8px 8px max(8px,env(safe-area-inset-bottom)); z-index:30}
  .bottom-nav a {display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:64px; min-height:48px; font-size:11px; color:var(--muted); border-radius:6px}
  .bottom-nav a.active {color:#154eaa; background:var(--accent-soft); font-weight:600}
  .bottom-nav .icon {width:20px; height:20px}
  .object-header {gap:12px; flex-wrap:wrap}
  .object-header .object-icon {display:none}
  .object-header>div {width:100%}
  .object-header .pill {margin-top:4px}
  .detail-facts {gap:16px}
  footer {padding:16px; font-size:11px}
}
@media(max-width:560px) {
  h1 {font-size:26px}
  h2 {font-size:18px}
  .page-heading {gap:12px; align-items:flex-start; flex-wrap:wrap}
  .page-heading p {font-size:13px}
  .cards {grid-template-columns:1fr}
  .dashboard-top {gap:16px; margin-bottom:16px}
  .next-card {padding:20px}
  .next-card .next-time {font-size:32px}
  .next-card h2 {font-size:23px}
  .next-card .actions {gap:8px}
  .next-card .actions .button:first-child {flex:1}
  .next-card .hero-meta {margin:8px 0}
  .list-toolbar {flex-wrap:wrap}
  .list-search {width:100%}
  .list-search input {max-width:none}
  .row-link,.lesson-row {flex-wrap:wrap; gap:8px; padding:12px 0}
  .row-copy {flex-basis:calc(100% - 64px)}
  .row-link>.pill,.lesson-row>.pill {margin-left:0}
  .row-action {min-height:40px; margin-left:auto}
  .row-arrow {display:none}
  .section-heading {gap:8px}
  .section-heading>a {font-size:11px}
  .upcoming .row-copy {flex-basis:100%}
  .upcoming .pill {font-size:11px}
  .action-bar .button,.action-bar form {flex:1; min-width:140px}
  .action-bar form .button {width:100%}
  .content-sidebar>aside {display:block}
  .document-body {padding:16px; min-height:180px}
  [data-rubric-row] {grid-template-columns:1fr; padding:12px}
  .rubric-grid {gap:12px}
  .student-progress {padding:16px}
  .student-progress .section-heading {align-items:flex-start; flex-direction:column; gap:4px}
  .progression-summary {grid-template-columns:1fr}
  .result-panel {padding:24px 16px}
  .result-facts {gap:20px}
  .quiz-question {padding:20px}
  .quiz-question h2 {font-size:20px}
  footer>span {display:none}
  .login-wrap h1 {font-size:32px}
}
/* Learning-module refinements, scoped to Assignment and template preview. */
.module-metadata {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:24px}
.module-metadata .panel {padding:16px; margin:0; display:flex; flex-direction:column; align-items:flex-start; gap:8px}
.module-metadata strong {font-size:14px; overflow-wrap:anywhere}
.module-metadata small {font-size:12px; color:var(--muted)}
.learning-layout {display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:24px; align-items:start}
.learning-layout>* {min-width:0}
.learning-reading {font-size:15px; line-height:1.8; overflow-wrap:anywhere; width:100%}
.module-section>div {max-width:76ch}
.module-materials,.module-submission {max-width:calc(100% - 304px)}
.module-section+.module-section {margin-top:32px; padding-top:24px; border-top:1px solid var(--line)}
.module-section h2 {font-size:23px; margin-bottom:16px}
.module-section h3 {font-size:19px; margin:24px 0 12px}
.module-section h4,.module-section h5,.module-section h6 {font-size:16px; margin:20px 0 8px}
.learning-reading p {margin-bottom:16px}
.learning-reading ul,.learning-reading ol {padding-left:24px; margin:12px 0 24px}
.learning-reading li+li {margin-top:8px}
.learning-reading dt {font-weight:650}
.learning-reading dd {margin-left:24px; margin-bottom:16px}
.learning-reading blockquote {margin:24px 0; padding:16px 20px; border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:8px; background:var(--accent-soft); color:#24436a}
.learning-reading blockquote p:last-child {margin-bottom:0}
.learning-reading a {color:var(--accent); text-decoration:underline}
.learning-reading code {font:13px/1.7 var(--mono); background:var(--bg); padding:2px 4px; border-radius:4px; overflow-wrap:anywhere}
.learning-reading pre {overflow-x:auto; max-width:100%; padding:16px; border:1px solid var(--line); border-radius:8px; background:var(--bg); margin:20px 0; white-space:pre; overflow-wrap:normal}
.learning-reading pre code {padding:0; background:none; overflow-wrap:normal}
.module-table {overflow-x:auto; max-width:100%; margin:20px 0; border:1px solid var(--line); border-radius:8px}
.module-table table {width:100%; border-collapse:collapse; font-size:13px; line-height:1.6; min-width:520px}
.module-table th,.module-table td {text-align:left; vertical-align:top; border-bottom:1px solid var(--line); padding:12px}
.module-table th {background:var(--bg); font-weight:650}
.module-toc h2,.learning-support h2 {font-size:18px}
.module-toc a {display:block; padding:8px 0; font-size:13px; color:var(--muted); border-bottom:1px solid var(--line)}
.module-toc a:hover {color:var(--accent)}
.learning-support .rubric-grid {font-size:13px; gap:8px}
.learning-support .rubric-grid>.pill {font-size:10px}
@media(max-width:1100px) {
  .module-metadata {grid-template-columns:repeat(2,minmax(0,1fr))}
  .learning-layout {grid-template-columns:minmax(0,1fr) 240px; gap:16px}
  .module-materials,.module-submission {max-width:calc(100% - 256px)}
}
@media(max-width:780px) {
  .learning-layout {grid-template-columns:1fr; gap:0}
  .module-materials,.module-submission {max-width:100%}
  .learning-header>div:not(.object-icon) {flex-basis:100%}
  html:has(.learning-layout) {scroll-padding-bottom:96px}
  .module-submission input,.module-submission select,.module-submission textarea,.module-submission button {scroll-margin-bottom:96px}
  .module-metadata {gap:8px; margin-bottom:16px}
  .module-metadata .panel {padding:12px}
  .module-section h2 {font-size:21px}
  .module-section h3 {font-size:18px}
  .module-toc {display:none}
  .learning-support .rubric-grid>.pill {font-size:11px}
}
@media(prefers-reduced-motion:reduce) {
  html {scroll-behavior:auto}
  *,*::before,*::after {transition:none!important; animation:none!important}
}
