:root {
  color-scheme: light;
  --ink: #172442;
  --muted: #72809c;
  --blue: #187cff;
  --line: #dce8fc;
  --shadow: 0 4px 16px #4e8dd914, inset 0 1px 1px #fff;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #eef5ff;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button { border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,p { margin: 0; }
h3 { font-size: 15px; line-height: 1.6; }
p { line-height: 1.7; }
button:disabled { opacity: .5; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #378bff; outline-offset: 3px; }
.ico { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 216px; padding: 28px 12px 16px; display: flex; flex-direction: column; background: linear-gradient(180deg, #f5f9ff 0%, #e6f1ff 54%, #e6f1ff00 84%) center / 100% 100% no-repeat, url("images/sidebar-portal.webp") center bottom / 100% auto no-repeat, #e6f1ff; border-right: 1px solid #dce8fa; z-index: 30; overflow-y: auto; }
.edu-brand { display: block; padding: 0 12px 32px; }
.edu-brand strong { display: block; color: #0864ed; font-size: 26px; letter-spacing: -.04em; }
.edu-brand span { display: block; color: #6f7d99; font-size: 12px; margin-top: 10px; }
.sidebar nav { display: grid; gap: 9px; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; text-align: left; font-size: 15px; color: #394b70; }
.nav-item.active { color: #fff; background: linear-gradient(105deg,#2782ff,#29d9ee); border: 1px solid #ffffffa8; box-shadow: 0 5px 10px #377dde2b,inset 0 1px 5px #ffffff4d; }
.sidebar-art { flex: 1; min-height: 160px; }
.back-link { display: block; padding: 10px 12px; border-radius: 10px; background: #f1f7ffdb; color: #426487; font-size: 12px; }
.app-body { margin-left: 216px; min-height: 100vh; background: radial-gradient(ellipse at 20% 0,#fff8,transparent 60%),#eef5ff; }
.topbar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 12px 26px; background: #f5f8ff; border-bottom: 1px solid #e0e9f8; z-index: 20; }
.global-search { display: flex; align-items: center; gap: 10px; width: min(560px,52%); border: 1px solid #d2def2; border-radius: 999px; padding: 8px 13px; color: #74829c; background: linear-gradient(130deg,#fff,#edf3fc); }
.global-search input { border: 0; outline: 0; min-width: 0; flex: 1; background: none; padding: 0; font-size: 13px; }
kbd { border: 1px solid #dbe5f6; padding: 0 4px; border-radius: 5px; font: 12px system-ui; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; color: #657693; }
.help { border: 1px solid #a4b5ce; border-radius: 50%; width: 23px; height: 23px; font-weight: 750; }
.profile { display: flex; align-items: center; gap: 10px; border-left: 1px solid #dce7f7; padding-left: 16px; }
.profile b { font-size: 13px; }
.profile small { display: block; color: #8090aa; font-size: 11px; margin-top: 3px; }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid #fff; background: linear-gradient(140deg,#daeaff,#b5d5ff); border-radius: 50%; color: #3566b3; font-weight: 750; }
.demo-strip { display: flex; justify-content: space-between; gap: 12px; padding: 7px 26px; color: #6d82a4; font-size: 11px; border-bottom: 1px solid #e6edfa; }
.demo-strip i { display: inline-block; width: 6px; height: 6px; background: #23cfae; border-radius: 50%; margin-right: 6px; }
.demo-strip button { color: #4074bd; font-size: 11px; }
main { padding: 18px 20px 0; outline: none; }
.page-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-toolbar p { font-size: 11px; color: #8b98ad; margin-bottom: 3px; }
.page-toolbar h2 { font-size: 17px; font-weight: 700; color: #42597d; }
.workspace-controls { display: flex; align-items: center; gap: 8px; }
.workspace-controls select { max-width: 170px; font-size: 12px; padding: 7px 26px 7px 9px; }
input, select, textarea { border: 1px solid #d2dff4; border-radius: 9px; background: #f8fbff; padding: 10px 12px; color: var(--ink); max-width: 100%; }
input::placeholder,textarea::placeholder { color: #93a0b5; }
textarea { resize: vertical; width: 100%; line-height: 1.7; }
.quota-pill { display: flex; align-items: center; gap: 4px; white-space: nowrap; color: #4783d0; font-size: 12px; }
.quota-pill .ico { width: 16px; height: 16px; }
.panel { padding: 18px; background: linear-gradient(145deg,#ffffffeb,#f6faffc9); border: 1px solid #e0eafd; border-radius: 20px; box-shadow: var(--shadow); min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.panel-title h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; line-height: 1.5; }
.panel-title h2 .ico { color: #1680ff; }
.panel-sub { font-size: 12px; color: #6b7a96; margin-top: -6px; margin-bottom: 18px; }
.top-grid { display: grid; grid-template-columns: 1.04fr 1fr; gap: 16px; margin-bottom: 18px; }
.three-grid { display: grid; grid-template-columns: 1fr .88fr 1.15fr; gap: 16px; margin-bottom: 18px; }
.teacher-grid { display: grid; grid-template-columns: .9fr .95fr 1.15fr; gap: 16px; margin-bottom: 18px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 1.65fr; gap: 16px; margin-bottom: 18px; }
.welcome { position: relative; padding: 22px 18px 18px; overflow: hidden; background: linear-gradient(150deg,#157fff,#7fb8ff 50%,#dceaff 90%); min-height: 292px; display: flex; flex-direction: column; justify-content: space-between; }
.welcome-art {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #073b9f55, transparent 85%), url("images/welcome-banner.webp") center / cover no-repeat;
}
.welcome-copy { position: relative; color: white; max-width: 90%; z-index: 1; }
.welcome-copy h1 { font-size: clamp(20px,2vw,29px); font-weight: 750; text-shadow: 0 2px 8px #2875c46b; }
.welcome-copy h1 span { color: #ffe06d; }
.welcome-copy p { font-size: 12px; margin-top: 10px; max-width: 360px; color: #f5faff; }
.welcome-bottom { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 38px; }
.ring { width: 113px; height: 113px; flex: none; padding: 9px; border: 5px solid #fff; border-radius: 50%; background: conic-gradient(#22cce7 var(--pct),#abd3ff 0); box-shadow: 0 5px 14px #2582cf38; }
.ring > div { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; border-radius: 50%; background: #f4f9ff; }
.ring strong { font-size: 26px; }
.ring small { font-size: 10px; color: #66758e; margin-top: 4px; }
.welcome-stats { display: grid; grid-template-columns: repeat(3,1fr); flex: 1; padding: 15px 3px; border: 1px solid #ffffff75; border-radius: 14px; background: #f5faffc7; }
.welcome-stats div { padding: 0 8px; border-right: 1px solid #dce7f8; }
.welcome-stats div:last-child { border: 0; }
.welcome-stats span { display: block; white-space: nowrap; font-size: 10px; }
.welcome-stats strong { display: block; font-size: 21px; margin-top: 10px; }
.ai-panel .panel-title { margin-bottom: 10px; }
.badge { display: inline-block; color: #637692; background: #eaf0f9; padding: 3px 7px; border-radius: 6px; font-size: 10px; white-space: nowrap; font-weight: 500; }
.badge.blue { color: #1683e6; background: #e3f4ff; }
.badge.green { color: #17a47d; background: #e0f8ee; }
.badge.warm { color: #d28623; background: #fff0d7; }
.ai-modes { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }
.mode { display: flex; flex-direction: column; align-items: center; gap: 9px; border: 1px solid #fff; border-radius: 14px; background: linear-gradient(145deg,#fff,#e9f2ff); padding: 13px 3px; box-shadow: 0 3px 8px #4588d61a; }
.mode .ico { width: 28px; height: 28px; color: #1681ff; }
.mode b { font-size: 12px; }
.mode small { font-size: 9px; color: #8490a8; }
.mode.selected { color: #fff; background: linear-gradient(150deg,#319eff,#2575ff 65%,#25d9f0); border-color: #b7f0ff; box-shadow: 0 4px 10px #289efa40,inset 0 1px 5px #ffffff70; }
.mode.selected :is(.ico,small) { color: #fff; }
.composer { border: 1px solid #cadcf5; border-radius: 15px; background: linear-gradient(145deg,#fff,#edf5ff); padding: 10px; box-shadow: 0 4px 9px #4689d215; }
.composer textarea { border: 0; padding: 0; background: none; resize: vertical; min-height: 48px; font-size: 12px; }
.composer > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.send { color: #fff; background: linear-gradient(130deg,#36ccf1,#267cff); width: 38px; height: 30px; border-radius: 999px; box-shadow: inset 0 1px 2px #ffffff80; }
.send .ico { width: 18px; height: 18px; }
.muted { color: #8190a8; font-size: 11px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 11px; font-size: 13px; border: 1px solid transparent; line-height: 1.5; }
.btn.primary { color: #fff; background: linear-gradient(105deg,#249bff,#2777ff 60%,#9792ff); border-color: #fff; box-shadow: 0 4px 10px #258de32e,inset 0 1px 3px #fff5; }
.btn.subtle { color: #2782ed; background: linear-gradient(120deg,#e0f0ff,#ecf4ff); border-color: #d6e7fc; }
.btn.danger { color: #ba5f6c; background: #fff4f5; border-color: #f3d9df; }
.text-link { color: #6882a6; font-size: 11px; white-space: nowrap; }
.task-list { display: grid; gap: 9px; }
.task { display: flex; align-items: center; gap: 9px; padding: 10px; border: 1px solid #e4edfa; border-radius: 10px; font-size: 12px; background: #f6f9ff; cursor: pointer; }
.task span { flex: 1; line-height: 1.6; }
.task .ico { width: 14px; height: 14px; color: #8295b4; }
.task.done { background: #e8f9f2; border-color: #e1f6ee; }
input[type="checkbox"],input[type="radio"] { accent-color: #258cff; width: 16px; height: 16px; flex: none; }
.practice-preview { display: flex; align-items: stretch; flex-direction: column; gap: 12px; }
.practice-preview h3 { font-size: 15px; }
.practice-preview p { font-size: 11px; color: #8b97aa; }
.topic-orb { width: 54px; height: 54px; border: 1px solid #c6e8ff; border-radius: 18px; background: linear-gradient(145deg,#e2f6ff,#d1dbff); display: grid; place-items: center; color: #4086ed; font-size: 30px; }
.mini-stats { display: flex; gap: 20px; padding: 10px 0; }
.mini-stats small { display: block; color: #8a96ab; font-size: 10px; margin-top: 5px; font-weight: 400; }
.metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.stat-tile { display: flex; flex-direction: column; gap: 7px; padding: 12px; border: 1px solid #e1eefc; border-radius: 12px; background: linear-gradient(140deg,#fff,#eff8ff); min-width: 0; }
.stat-tile .ico { color: #2289ff; width: 20px; height: 20px; }
.stat-tile strong { font-size: 22px; }
.stat-tile span { font-size: 10px; color: #71809a; }
.stat-tile.warm { background: #fff8eb; border-color: #ffedca; }
.chart svg { width: 100%; display: block; }
.chart text { fill: #7a8aa5; font-size: 9px; }
.grid-line { fill: none; stroke: #dfe8f6; stroke-width: 1; }
.fine-print { color: #8a98af; font-size: 10px; line-height: 1.7; }
.error-summary { display: flex; align-items: center; gap: 12px; padding: 25px 10px; color: #6c80a5; }
.error-summary img { width: clamp(60px, 6vw, 94px); height: 94px; object-fit: contain; flex: none; }
.error-summary strong { font-size: 48px; color: #213358; }
.error-summary + .btn { width: 100%; }
.course-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.course { border-radius: 16px; overflow: hidden; background: #f6faff; border: 1px solid #dbe9fc; box-shadow: 0 4px 10px #376ba317; }
.course-art { position: relative; padding: 6px 18px; height: 91px; display: flex; align-items: center; color: #dbf7ff; background: linear-gradient(140deg,#2d68db,#70cfff); font-size: 58px; font-family: Georgia,serif; font-style: italic; overflow: hidden; }
.course-art::after { content:""; position:absolute; border:1px solid #fff6; border-radius:50%; width:130px; height:60px; right:-20px; transform:rotate(-20deg); }
.course-art:has(img) { padding: 0; }
.course-art:has(img)::after { content: none; }
.course-art img { width: 100%; height: 100%; object-fit: cover; }
.course-art small { position: absolute; bottom: 8px; right: 8px; font: 9px system-ui; color: #fff; }
.art-1 { background: linear-gradient(140deg,#c18439,#f0ce9f); }
.art-2 { background: linear-gradient(140deg,#247cc8,#72d7e8); }
.course-content { padding: 12px; }
.course-content h3 { font-size: 12px; }
.course-content p { color: #8c9ab1; font-size: 10px; margin: 5px 0 12px; }
.progress { height: 6px; background: #dce6f5; border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg,#3e90ff,#44def0); border-radius: inherit; }
.course-content > div:last-child { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.course-content small { color: #8594ac; font-size: 10px; }
.circle-btn { width: 29px; height: 29px; border-radius: 50%; border: 1px solid #b9d9ff; color: #2487ff; background: #e1f2ff; }
.circle-btn .ico { width: 17px; height: 17px; }
.metric-large { font-size: 42px; color: #2a7ce4; padding: 10px; }
.metric-large small { font-size: 11px; color: #8b9ab0; }
.feature-list { display: grid; gap: 12px; padding: 16px 6px; color: #5b7094; font-size: 12px; }
.class-list,.stack { display: grid; gap: 10px; }
.class-item,.list-row,.model-row { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid #e1ebfa; background: linear-gradient(130deg,#f5faff,#edf5ff); border-radius: 12px; }
.class-item > .ico,.list-row > .ico,.model-row > .ico { color: #3c9cf3; }
.class-item > div:first-of-type,.list-row > div,.model-row > div { flex: 1; min-width: 0; }
.class-item small,.list-row small,.model-row small { display: block; color: #8695ad; font-size: 10px; margin-top: 4px; }
.class-item b,.list-row b,.model-row b { font-size: 12px; }
.assignment,.mistake { display: flex; justify-content: space-between; gap: 15px; align-items: center; border: 1px solid #e0eafa; border-radius: 12px; padding: 14px; }
.assignment h3,.mistake h3 { margin-top: 6px; }
.assignment p,.mistake p { font-size: 12px; color: #7585a0; margin-top: 5px; }
.assignment small,.mistake small { font-size: 11px; color: #8796ac; }
.assignment .btn,.mistake .btn { flex: none; }
.panel > .stack + .btn { margin-top: 14px; }
.admin-shortcuts { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.admin-shortcuts button { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 4px; background: linear-gradient(130deg,#fff,#edf5ff); border: 1px solid #e0ebfc; border-radius: 12px; }
.admin-shortcuts .ico { color: #2c8aff; }
.admin-shortcuts b { font-size: 11px; }
.org { display: grid; gap: 10px; }
.org > b,.org > div { display: flex; align-items: center; gap: 10px; padding: 12px 8px; font-size: 12px; }
.org > div { margin-left: 20px; border-left: 1px solid #cbdef4; }
.org small { color: #8698b2; margin-left: auto; font-size: 10px; }
.org .ico { color: #258bff; }
.switch { display: inline-flex; position: relative; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { width: 36px; height: 20px; border-radius: 20px; background: #c6d4e7; pointer-events: none; }
.switch span::after { content: ""; display: block; width: 16px; height: 16px; margin: 2px; background: white; border-radius: 50%; }
.switch input:checked + span { background: #18c99e; }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 3px solid #378bff; outline-offset: 2px; }
.log-row { display: flex; gap: 15px; padding: 10px; border-bottom: 1px solid #edf1fa; font-size: 12px; }
.log-row time { font-size: 10px; color: #8b9ab1; flex: none; }
.notice { background: #edf6ff; border: 1px solid #d7e9ff; color: #607da4; font-size: 12px; line-height: 1.8; padding: 12px; border-radius: 12px; margin-bottom: 18px; }
.empty { display: grid; justify-items: center; gap: 14px; padding: 30px 15px; color: #9aa8be; text-align: center; }
.empty > .ico { width: 38px; height: 38px; color: #b6cbe7; }
.empty p { font-size: 12px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 15px; padding: 24px 5px; color: #9aabc2; font-size: 11px; }
.workspace-footer button { font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: #8294af; background: #f0f6ff; padding: 12px; font-weight: 500; white-space: nowrap; }
td { padding: 14px 12px; border-bottom: 1px solid #e6eef9; }
td small { color: #90a0b6; }
td .btn { font-size: 11px; padding: 5px 8px; }
.question-text { margin: 8px 0; max-width: 620px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.toolbar input { width: min(360px,100%); }
.row-actions { display: flex; gap: 7px; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; max-width: 900px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > span { font-size: 12px; color: #6f84a5; }
.field:has(textarea) { grid-column: 1/-1; }
.form-grid > button,.form-grid > fieldset,.form-grid > p,.form-grid > .checkbox-row { grid-column: 1/-1; }
.form-grid > button { justify-self: start; }
.inline-form { display: flex; gap: 10px; margin-top: 20px; }
.inline-form input { min-width: 0; flex: 1; }
.inline-form .btn { flex: none; }
.field input,.field select { width: 100%; }
fieldset { border: 1px solid #dfe9f8; border-radius: 14px; padding: 16px; margin: 0; }
legend { padding: 0 6px; color: #6682a8; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.8; padding: 7px 0; }
.section-caption { margin: 24px 0 14px; }
.upload-zone { display: grid; place-items: center; gap: 10px; padding: 30px 15px; border: 1px dashed #b0caed; background: #f5faff; border-radius: 14px; color: #6c89af; margin-bottom: 18px; font-size: 12px; }
.upload-zone .ico { width: 36px; height: 36px; color: #489df9; }
.upload-zone input { font-size: 11px; width: min(100%,300px); }
.tutor-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; font-size: 12px; color: #7b8dab; }
.tutor-tools select { padding: 7px; font-size: 12px; }
.image-upload { position: relative; overflow: hidden; }
.image-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
#image-preview { color: #7d91af; font-size: 11px; }
#image-preview img { max-width: 220px; max-height: 180px; object-fit: contain; border-radius: 12px; }
.chat-log { max-height: 52vh; overflow-y: auto; min-height: 260px; padding: 10px 0 20px; display: flex; flex-direction: column; gap: 15px; }
.chat-welcome { margin: auto; display: grid; justify-items: center; gap: 14px; color: #8299ba; }
.chat-welcome > .ico { width: 46px; height: 46px; color: #4aa7ff; }
.chat-welcome p { font-size: 12px; text-align: center; }
.chat-bubble { border: 1px solid #e0eaf9; border-radius: 16px; padding: 14px 18px; width: min(85%,700px); background: #fff; }
.chat-bubble.user { margin-left: auto; background: #e3efff; }
.chat-bubble small { font-size: 10px; color: #7993b5; }
.chat-bubble p { white-space: pre-wrap; margin-top: 7px; font-size: 13px; }
.practice-start { display: grid; justify-items: center; gap: 18px; padding: 30px 15px; }
.practice-start p { color: #8293ad; font-size: 13px; text-align: center; }
dialog { width: min(580px,calc(100% - 28px)); max-height: 90dvh; padding: 0; border: 1px solid #fff; border-radius: 22px; color: var(--ink); background: #f8fbff; box-shadow: 0 30px 90px #16376c38; }
dialog.wide { width: min(850px,calc(100% - 28px)); }
dialog::backdrop { background: #142d605e; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 18px 22px; border-bottom: 1px solid #e1eafa; position: sticky; top: 0; background: #f1f7ff; z-index: 1; }
.dialog-header h2 { font-size: 18px; }
.dialog-body { padding: 22px; }
.dialog-body .form-grid { grid-template-columns: 1fr; }
.dialog-body > p { color: #7b8eaa; margin-bottom: 20px; font-size: 13px; }
.help-content p { padding: 10px 0; font-size: 13px; color: #7086a5; }
.quiz-questions { display: grid; gap: 22px; margin-bottom: 20px; }
.quiz-questions legend small { display: block; font-size: 10px; margin-bottom: 5px; color: #8fa2be; }
.quiz-questions legend b { color: #344e76; font-size: 14px; }
.answer-option { display: flex; align-items: center; gap: 10px; padding: 10px; margin-top: 6px; border-radius: 9px; background: #eef5ff; cursor: pointer; }
.answer-option:has(input:checked) { background: #dcecff; color: #216bcd; }
.score-hero { text-align: center; padding: 12px 0 25px; color: #2383f2; }
.score-hero strong { font-size: 56px; }
.score-hero small { font-size: 16px; margin-left: 8px; }
.score-hero p { color: #8196b3; font-size: 12px; }
.result-item { border-radius: 14px; background: #eff8f5; padding: 16px; }
.result-item.incorrect { background: #fff6ec; }
.result-item h3 { margin-top: 10px; }
.result-item p { font-size: 12px; margin-top: 10px; }
.result-item small { display: block; margin-top: 10px; color: #8595ad; line-height: 1.8; }
.lesson-preview { display: grid; place-items: center; min-height: 180px; background: linear-gradient(135deg,#2f71dc,#8fd4ee); border-radius: 15px; font: italic 72px Georgia; color: #fff; margin-bottom: 20px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%,15px); max-width: calc(100% - 30px); padding: 12px 20px; border-radius: 14px; color: #fff; background: #264675; box-shadow: 0 8px 28px #1c3d6f33; z-index: 100; opacity: 0; pointer-events: none; font-size: 13px; }
#toast.visible { opacity: 1; transform: translate(-50%,0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.mobile-toggle,.mobile-scrim { display: none; }
@media (hover:hover) {
  .nav-item:not(.active):hover { background: #e3efff; color: #2784ec; }
  .btn:hover { filter: brightness(1.035); }
  .icon-btn:hover,.text-link:hover { color: #137aff; background: #e8f1ff; }
  .mode:not(.selected):hover,.admin-shortcuts button:hover { background: #e2efff; border-color: #b8d9ff; }
}
@media (prefers-reduced-motion:no-preference) {
  .btn,.mode,.nav-item { transition: background-color .2s,color .2s,box-shadow .2s; }
  #toast { transition: opacity .2s,transform .2s; }
  .panel { animation: panel-in .28s ease-out; }
  @keyframes panel-in { from { opacity:.8; translate:0 6px; } to { opacity:1; translate:0 0; } }
}
@media(min-width:1500px) { main { max-width: 1600px; margin-inline: auto; } .welcome { min-height: 320px; } .panel { padding: 22px; } }
@media(max-width:1250px) {
  .sidebar { width: 190px; }
  .app-body { margin-left: 190px; }
  .edu-brand strong { font-size: 23px; }
  .nav-item { padding-inline: 10px; font-size: 14px; }
  .three-grid,.teacher-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .three-grid > :last-child,.teacher-grid > :last-child { grid-column: 1/-1; }
  .welcome-stats div { padding: 0 5px; }
  .ring { width: 90px; height: 90px; padding: 6px; border-width: 4px; }
  .welcome-stats strong { font-size: 18px; }
  .welcome-bottom { gap: 8px; }
  .mode small { display: none; }
  .mode b { font-size: 11px; }
  .profile { padding-left: 8px; }
  .topbar-actions { gap: 8px; }
}
@media(max-width:1000px) {
  .top-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
  .welcome { min-height: 285px; }
  .welcome-stats { padding: 18px 10px; }
  .ai-modes { gap: 12px; }
  .mode small { display: block; }
  .profile > div { display: none; }
  .page-toolbar { align-items: flex-start; flex-direction: column; }
  .workspace-controls { flex-wrap: wrap; }
  .global-search { width: 75%; }
  .welcome-copy h1 { font-size: 26px; }
}
@media(max-width:720px) {
  .sidebar { width: 216px; transform: translateX(-100%); visibility: hidden; }
  .app-body { margin-left: 0; }
  .mobile-toggle { display: inline-grid; flex: none; }
  .topbar { padding: 10px 12px; gap: 8px; min-height: 58px; }
  .global-search { flex: 1; width: auto; padding: 7px 9px; }
  .global-search .ico { width: 18px; height: 18px; }
  .global-search kbd { display: none; }
  .topbar-actions { gap: 3px; }
  .topbar-actions > .icon-btn { display: none; }
  .profile { padding-left: 0; border: 0; }
  .avatar { width: 30px; height: 30px; }
  .demo-strip { padding: 7px 12px; font-size: 10px; }
  .demo-strip button { font-size: 10px; }
  main { padding: 14px 12px 0; }
  .three-grid,.teacher-grid { grid-template-columns: 1fr; }
  .panel { padding: 15px; border-radius: 17px; }
  .panel-title h2 { font-size: 16px; }
  .workspace-controls { gap: 6px; width: 100%; }
  .workspace-controls select { font-size: 11px; max-width: 145px; padding-right: 15px; }
  .quota-pill { font-size: 11px; margin-left: auto; }
  .welcome { min-height: 275px; }
  .welcome-copy h1 { font-size: 23px; }
  .welcome-copy p { max-width: 240px; font-size: 11px; }
  .welcome-stats span { font-size: 9px; }
  .welcome-stats strong { font-size: 17px; }
  .welcome-stats { padding: 15px 0; }
  .ring { width: 82px; height: 82px; }
  .ring strong { font-size: 22px; }
  .ring small { font-size: 8px; }
  .mode small { display: none; }
  .mode b { font-size: 11px; }
  .mode .ico { width: 25px; height: 25px; }
  .ai-modes { gap: 6px; }
  .course-grid { grid-template-columns: 1fr; }
  .course { display: grid; grid-template-columns: 95px 1fr; }
  .course-art { height: 100%; min-height: 130px; font-size: 46px; }
  .course-art small { font-size: 8px; right: 5px; }
  .course-content h3 { font-size: 14px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .row-actions { justify-content: flex-end; }
  .assignment,.mistake { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-shortcuts { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .admin-shortcuts b { font-size: 10px; }
  .dialog-body { padding: 16px; }
  .dialog-header { padding: 14px 16px; }
  .chat-bubble { width: 92%; }
  .workspace-footer { font-size: 10px; }
  .menu-open .sidebar { visibility: visible; transform: translateX(0); }
  .menu-open .mobile-scrim { display: block; position: fixed; inset: 0; z-index: 25; background: #142c5b55; }
  .log-row { flex-direction: column; gap: 5px; }
}
@media(max-width:360px) {
  .workspace-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .quota-pill { grid-column: 1/-1; margin: 0; }
  .welcome-bottom { flex-wrap: wrap; }
  .welcome-stats { flex-basis: 100%; }
  .welcome { min-height: 330px; }
  .ring { margin-top: 8px; }
}


.welcome-guide { display: grid; gap: 18px; }
.welcome-guide > p { color: #657d9f; font-size: 13px; }
.guide-steps { display: grid; gap: 12px; padding-left: 23px; }
.guide-steps li { padding-left: 4px; color: #5a7397; font-size: 13px; line-height: 1.8; }
.guide-steps b { display: block; color: #243f68; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 8px; }
