:root {
  --canvas: #f5f1e9;
  --paper: #fffdfa;
  --red: #b5402f;
  --red-soft: #f5e7e1;
  --ink: #262a2b;
  --muted: #7b7b73;
  --line: #e4e0d8;
  --green: #427664;
  --side: #eeeae2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  color: inherit;
  background: none;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
}
#app {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 28px 17px 14px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.school-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 33px;
}
.school-brand strong {
  font-size: 13px;
  letter-spacing: 0.2px;
}
.school-brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.school-seal {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--red);
  outline: 1px solid var(--red);
  outline-offset: 3px;
  color: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.school-seal span {
  font-size: 12px;
}
.new-task {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid #d9d2c7;
  border-radius: 8px;
  text-align: left;
  margin-bottom: 25px;
  font-weight: 600;
}
.nav-label {
  font-size: 10px;
  color: #949188;
  padding: 0 12px;
  margin: 0 0 9px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 7px;
  margin: 3px 0;
  color: #6c6b64;
  font-size: 13px;
}
nav a:hover {
  background: #e7e1d7;
}
nav a.active {
  background: #e5d9ce;
  color: #943c2f;
  font-weight: 650;
}
nav svg {
  width: 18px;
  height: 18px;
}
.sidebar-recent {
  margin-top: 35px;
}
.sidebar-recent a {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  color: #75746d;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sidebar-recent i {
  width: 5px;
  height: 5px;
  background: #bdb5a8;
  border-radius: 50%;
  flex-shrink: 0;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 24px;
}
.demo-mark {
  font-size: 10px;
  color: #87857d;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
}
.demo-mark i {
  width: 5px;
  height: 5px;
  background: #a39c8f;
  border-radius: 50%;
}
.utility {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #87857d;
  padding: 8px 12px;
}
.utility svg {
  width: 14px;
}
.profile {
  border-top: 1px solid #d9d4cb;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 8px 0;
  margin-top: 12px;
}
.profile strong {
  font-size: 12px;
}
.profile small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  background: #dccfbe;
  color: #665344;
  font-size: 12px;
}
.avatar.small {
  width: 28px;
  height: 28px;
  margin-right: 10px;
}
main {
  margin-left: 246px;
  width: calc(100% - 246px);
  min-width: 0;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  background: #fffdfa99;
  gap: 15px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 11px;
  color: #87847b;
}
.breadcrumb b {
  font-weight: 400;
  color: #c8c0b5;
}
.breadcrumb strong {
  font-weight: 500;
  color: #474843;
}
.role-area {
  display: flex;
  align-items: center;
  gap: 10px;
}
.role-area label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
select {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 25px 7px 10px;
  color: var(--ink);
  max-width: 100%;
}
.role-area select {
  font-size: 12px;
}
.content {
  max-width: 1450px;
  margin: 0 auto;
  padding: 34px 42px 20px;
}
.content.teacher {
  max-width: 1270px;
}
.teacher-welcome {
  max-width: 790px;
  margin: 20px auto 53px;
}
.eyebrow {
  font-size: 11px;
  color: #9a8b77;
  letter-spacing: 0.5px;
}
.teacher-welcome > h1 {
  font-size: clamp(25px, 3vw, 39px);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -1px;
  margin: 15px 0 9px;
}
.teacher-welcome > h1 span {
  color: var(--red);
}
.teacher-welcome > p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 25px;
}
.composer {
  border: 1px solid #d7cdbf;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 5px 18px #50331e04;
  padding: 18px 20px 14px;
}
.composer textarea {
  resize: none;
  border: 0;
  outline: 0;
  width: 100%;
  height: 84px;
  padding: 0;
  background: transparent;
  font-size: 13px;
  line-height: 1.8;
}
.composer textarea::placeholder {
  color: #aaa499;
}
.composer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.composer-bottom > span {
  font-size: 10px;
  color: #9c9386;
  display: flex;
  align-items: center;
  gap: 6px;
}
.composer-bottom svg {
  width: 14px;
}
.primary,
.secondary,
.chip,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
  padding: 10px 15px;
  white-space: nowrap;
}
.primary {
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
}
.primary:hover {
  background: #963628;
}
.secondary {
  background: var(--paper);
  border: 1px solid #dcd5ca;
}
.secondary:hover,
.chip:hover {
  background: #f1e9df;
}
.text-button {
  color: var(--red);
  padding: 6px 0;
}
.quick-tasks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.chip {
  border: 1px solid #e2dbd0;
  background: transparent;
  color: #7a7469;
  font-size: 11px;
  padding: 7px 10px;
}
.chip svg {
  width: 13px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
}
.section-heading h2,
h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 7px;
}
.section-heading p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.section-heading > a {
  font-size: 11px;
  color: #8f8171;
}
.section-heading > a svg {
  width: 14px;
}
.section-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.course-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  overflow: hidden;
}
.course-cover {
  height: 154px;
  position: relative;
  overflow: hidden;
  background: #e5dcca;
  padding: 18px 22px;
  color: #544a39;
}
.course-cover > span {
  font-size: 9px;
  border: 1px solid #ab9a7766;
  border-radius: 4px;
  padding: 3px 7px;
  position: relative;
  z-index: 1;
}
.course-cover > strong {
  display: block;
  margin-top: 33px;
  font-size: 20px;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
  max-width: 80%;
}
.course-cover > small {
  display: block;
  font-size: 9px;
  margin-top: 6px;
  letter-spacing: 1px;
  color: #8d7b60;
}
.course-cover.heat {
  background: #dce5e1;
  color: #385e55;
}
.course-cover.heat > small {
  color: #678579;
}
.cover-art {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}
.mountain {
  position: absolute;
  right: -10px;
  bottom: -18px;
  width: 170px;
  height: 110px;
  background: #a68f6a;
  clip-path: polygon(0 100%, 40% 4%, 56% 45%, 75% 15%, 100% 100%);
}
.machine {
  position: absolute;
  right: 28px;
  top: 36px;
  width: 55px;
  height: 48px;
  border: 2px solid #8d7656;
  transform: rotate(-20deg);
}
.machine:after {
  content: "";
  position: absolute;
  width: 110px;
  height: 12px;
  background: #ad9877;
  right: -34px;
  bottom: -15px;
  border-radius: 10px;
}
.tube {
  position: absolute;
  right: 25px;
  top: -30px;
  width: 30px;
  height: 220px;
  border: 1px solid #739e8e;
  border-radius: 50%;
  transform: rotate(28deg);
}
.t2 {
  right: 66px;
}
.t3 {
  right: 106px;
}
.heatline {
  position: absolute;
  width: 180px;
  height: 50px;
  border: 2px solid #94b8a9;
  right: -10px;
  top: 50px;
  border-radius: 50%;
  transform: rotate(-20deg);
}
.course-info {
  padding: 18px 22px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.row > small {
  font-size: 10px;
  color: #a09687;
}
.badge {
  font-size: 10px;
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eee7dc;
  color: #8d775e;
}
.badge.published,
.badge.approved {
  background: #e8efea;
  color: #47715c;
}
.badge.review {
  background: #f6ecd8;
  color: #967339;
}
.badge.rejected {
  background: #f9e5df;
  color: #a64736;
}
.course-info h3 {
  font-size: 16px;
  line-height: 1.5;
  margin: 12px 0 7px;
  font-weight: 600;
}
.course-info > p {
  font-size: 11px;
  color: #8a857c;
  line-height: 1.8;
  min-height: 20px;
  margin: 0 0 17px;
}
.course-bottom {
  border-top: 1px solid #eee9e0;
  padding-top: 12px;
}
.course-bottom > span {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 10px;
  color: #9a9184;
}
.course-bottom svg {
  width: 13px;
}
.teacher-bottom {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 24px;
  margin-bottom: 20px;
}
.teacher-bottom .panel {
  margin: 0;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-top: 1px solid #ebe6dd;
}
.task-row > svg {
  color: #9b8a75;
  width: 18px;
}
.task-row > div {
  flex: 1;
  min-width: 0;
}
.task-row strong {
  font-size: 12px;
  font-weight: 550;
}
.task-row small {
  display: block;
  color: #9a9388;
  font-size: 10px;
  margin-top: 4px;
}
.tip-panel {
  padding: 24px;
  border: 1px solid #e1d5c2;
  background: #eee6d7;
  border-radius: 9px;
}
.tip-panel > span {
  font-size: 10px;
  color: #9b8158;
}
.tip-panel h3 {
  font-size: 18px;
  font-weight: 500;
  margin: 15px 0 10px;
}
.tip-panel p {
  font-size: 12px;
  color: #8c806c;
  line-height: 1.9;
}
.tip-panel a {
  font-size: 11px;
  color: #8d6b43;
}
.tip-panel svg {
  width: 14px;
}
.content-footer {
  display: flex;
  justify-content: space-between;
  margin: 36px 0 5px;
  color: #aaa295;
  font-size: 9px;
  gap: 10px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 5px 0 27px;
}
.page-heading h1 {
  font-size: 27px;
  line-height: 1.4;
  letter-spacing: -0.6px;
  margin: 0 0 9px;
  font-weight: 600;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 11px;
}
.toolbar label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.toolbar select {
  font-size: 12px;
}
.search {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 7px 12px;
  border-radius: 6px;
}
.search svg {
  width: 15px;
}
.search input {
  border: 0;
  background: none;
  outline: none;
  min-width: 0;
  width: 220px;
  font-size: 12px;
}
.form {
  max-width: 730px;
}
.form label,
#editForm label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 17px 0;
  font-size: 12px;
  font-weight: 550;
}
input:not([type="radio"]),
textarea {
  border: 1px solid #dcd5ca;
  background: var(--paper);
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--ink);
  min-width: 0;
}
textarea {
  line-height: 1.8;
  resize: vertical;
  width: 100%;
}
input:focus,
textarea:focus {
  outline: 1px solid #b98c76;
}
.form select {
  padding: 11px 12px;
}
.notice {
  border-left: 3px solid #c6a470;
  background: #eee6d8;
  padding: 13px 17px;
  margin-bottom: 24px;
  font-size: 12px;
  color: #877257;
}
.steps {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 25px;
  gap: 20px;
}
.step {
  font-size: 12px;
  color: #9a9185;
  padding: 8px 0 16px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.step b {
  font-weight: 500;
  background: #e7dfd3;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.step.active {
  color: var(--red);
  border-color: var(--red);
}
.step.active b {
  background: var(--red);
  color: white;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: 22px;
}
.editor-grid h2 {
  margin-top: 12px;
  font-size: 21px;
}
.editor-context h3 {
  font-size: 13px;
}
.editor-context p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--muted);
}
.editor-context .panel {
  padding: 20px;
}
.output-item {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.output-item svg {
  width: 15px;
  color: #a28165;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.outline-input {
  line-height: 2.6;
}
.question-preview {
  background: #f5f1e9;
  padding: 14px;
  border-radius: 6px;
  margin-top: 10px;
  font-size: 12px;
}
.question-preview p,
.question-preview small {
  color: #878072;
}
.preview-paper {
  border: 1px solid #ded6c9;
  padding: 30px;
  background: #fffdf6;
  margin-top: 20px;
}
.preview-paper h2 {
  font-size: 24px;
}
.preview-paper p {
  font-size: 13px;
}
.preview-paper b {
  color: var(--red);
  padding-right: 8px;
}
.preview-paper small {
  font-size: 10px;
  color: #8e7a62;
}
.preview-paper hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.preline {
  white-space: pre-line;
}
.resource-list > .panel {
  display: flex;
  align-items: center;
  gap: 24px;
}
.resource-list > .panel > div:nth-child(2) {
  flex: 1;
}
.resource-list h2,
.resource-list h3 {
  margin: 0 0 7px;
  font-size: 16px;
}
.resource-list p {
  color: var(--muted);
  font-size: 12px;
}
.resource-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.table-wrap {
  overflow: auto;
  padding: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
  font-size: 12px;
}
th {
  font-weight: 500;
  color: #958775;
  background: #f3ede3;
  font-size: 11px;
}
td,
th {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
td strong {
  font-size: 12px;
  font-weight: 550;
}
tbody tr:last-child td {
  border: 0;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.empty {
  padding: 45px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.learning-banner {
  background: #e9dfcd;
  border: 1px solid #ddcfb8;
  border-radius: 9px;
  padding: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}
.learning-banner > svg {
  width: 65px;
  height: 65px;
  color: #b39b78;
}
.learning-banner h2 {
  font-size: 24px;
  margin-top: 10px;
}
.learning-banner p {
  color: #97836a;
  font-size: 12px;
}
.exam-form {
  max-width: 800px;
}
fieldset {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 25px;
  padding: 0 0 22px;
}
legend {
  font-size: 16px;
  font-weight: 550;
  margin: 10px 0 17px;
}
legend span {
  color: var(--red);
  font-size: 12px;
  margin-right: 12px;
}
.answer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 17px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 8px 0;
  font-size: 13px;
}
.answer:has(input:checked) {
  background: #f5e8e1;
  border-color: #b97462;
}
input[type="radio"] {
  accent-color: var(--red);
}
.score {
  font-size: 34px;
  color: var(--red);
  min-width: 75px;
}
.score.good {
  color: var(--green);
}
.score small {
  font-size: 12px;
  margin-left: 4px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.metric {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  text-align: left;
}
.metric > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #8a8072;
}
.metric svg {
  color: #a28365;
}
.metric > strong {
  display: block;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.5;
  margin: 8px 0;
}
.metric > small {
  font-size: 10px;
  color: #a2998a;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0 22px;
}
.dashboard-grid h2 {
  font-size: 16px;
}
.bar-chart {
  margin: 28px 0 24px;
}
.chart-row {
  width: 100%;
  text-align: left;
  margin: 15px 0;
}
.chart-row > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 9px;
}
.chart-row strong {
  font-size: 11px;
  color: #9c8870;
}
.bar-track {
  height: 12px;
  background: #eee7dd;
  border-radius: 3px;
  overflow: hidden;
}
.bar-track i {
  display: block;
  height: 100%;
  background: #b5402f;
  border-radius: 3px;
}
.donut {
  width: 150px;
  height: 150px;
  margin: 20px auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--red) var(--pct), #e8dfd2 0);
}
.donut > div {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.donut strong {
  font-size: 26px;
}
.donut span {
  font-size: 10px;
  color: var(--muted);
}
.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--red);
  margin-right: 5px;
}
.legend i.pale {
  background: #e8dfd2;
}
.trend {
  display: flex;
  justify-content: space-around;
  align-items: end;
  height: 165px;
  border-bottom: 1px solid var(--line);
  padding-top: 15px;
}
.trend > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.trend i {
  display: block;
  width: 27px;
  background: #b96a54;
  border-radius: 3px 3px 0 0;
}
.trend strong,
.trend span {
  font-size: 10px;
  color: #978c7d;
}
.trend strong {
  font-weight: 400;
}
.admin .panel {
  background: white;
}
.admin .content-footer {
  margin-top: 15px;
}
body[data-role="admin"] .sidebar {
  background: #252829;
  border-color: #252829;
}
body[data-role="admin"] .school-brand strong {
  color: #f5f1e9;
}
body[data-role="admin"] nav a {
  color: #bbb9b3;
}
body[data-role="admin"] nav a.active {
  background: var(--red);
  color: white;
}
body[data-role="admin"] nav a:hover {
  background: #47433c;
}
body[data-role="admin"] .profile {
  border-color: #444440;
  color: #eee6d9;
}
body[data-role="admin"] .school-seal {
  color: #d89d84;
  border-color: #d89d84;
  outline-color: #d89d84;
}
dialog {
  border: 1px solid #d8cbb8;
  border-radius: 12px;
  box-shadow: 0 24px 80px #29221933;
  padding: 27px;
  width: min(630px, calc(100vw - 30px));
  max-height: 85vh;
  background: var(--paper);
  color: var(--ink);
}
dialog::backdrop {
  background: #28251e66;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}
.modal-head h2 {
  margin: 0;
  font-size: 20px;
}
.icon-button {
  font-size: 25px;
  width: 35px;
  height: 35px;
}
.result-list section {
  border-top: 1px solid var(--line);
  padding: 17px 0;
  font-size: 12px;
}
.result-list p {
  margin: 7px 0;
}
.result-list small {
  color: var(--muted);
}
.correct {
  color: var(--green);
}
.incorrect {
  color: var(--red);
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 10px);
  background: #302d27;
  color: white;
  padding: 12px 23px;
  border-radius: 8px;
  z-index: 100;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.15s;
  max-width: 90vw;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.menu {
  display: none;
}
@media (min-width: 1450px) {
  .teacher .course-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .teacher .course-grid:has(.course-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 218px;
    padding-inline: 13px;
  }
  main {
    margin-left: 218px;
    width: calc(100% - 218px);
  }
  .school-brand strong {
    font-size: 11px;
  }
  .content {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .editor-context {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .teacher-bottom {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .teacher-welcome {
    margin-top: 12px;
  }
  .course-cover > strong {
    font-size: 17px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 246px;
    box-shadow: 10px 0 50px #29221920;
  }
  body.nav-open .sidebar {
    transform: translateX(0);
  }
  main {
    margin-left: 0;
    width: 100%;
  }
  .menu {
    display: block;
    padding: 0;
    font-size: 20px;
    color: #817667;
  }
  .topbar {
    height: 61px;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 15;
    background: var(--paper);
  }
  .breadcrumb {
    gap: 9px;
  }
  .breadcrumb > span,
  .breadcrumb > b {
    display: none;
  }
  .breadcrumb strong {
    font-size: 11px;
  }
  .role-area {
    gap: 4px;
  }
  .role-area label {
    font-size: 0;
    gap: 0;
  }
  .role-area select {
    padding: 6px;
    font-size: 11px;
  }
  .content {
    padding: 24px 18px 12px;
  }
  .teacher-welcome {
    margin: 12px 0 32px;
  }
  .teacher-welcome > h1 {
    font-size: 27px;
    letter-spacing: -0.8px;
  }
  .teacher-welcome > p {
    font-size: 11px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .composer {
    padding: 15px;
  }
  .composer textarea {
    height: 112px;
    font-size: 12px;
  }
  .composer-bottom > span {
    font-size: 9px;
    max-width: 140px;
  }
  .composer-bottom .primary {
    font-size: 11px;
    padding: 9px 11px;
  }
  .quick-tasks {
    gap: 6px;
  }
  .chip {
    font-size: 10px;
    padding: 6px;
  }
  .course-grid {
    grid-template-columns: 1fr;
  }
  .section-heading h2 {
    font-size: 16px;
  }
  .section-heading p {
    font-size: 10px;
  }
  .course-cover {
    height: 145px;
  }
  .teacher-bottom {
    gap: 16px;
  }
  .content-footer {
    flex-direction: column;
    font-size: 8px;
    gap: 4px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .toolbar {
    align-items: start;
    flex-direction: column;
  }
  .search {
    width: 100%;
  }
  .search input {
    width: 100%;
  }
  .panel {
    padding: 18px;
  }
  .table-wrap {
    padding: 0;
  }
  .resource-list > .panel {
    align-items: start;
    flex-wrap: wrap;
    gap: 12px;
  }
  .resource-list > .panel > div:nth-child(2) {
    min-width: 180px;
  }
  .steps {
    gap: 10px;
    overflow: auto;
  }
  .step {
    font-size: 10px;
    white-space: nowrap;
    gap: 4px;
  }
  .step b {
    width: 18px;
    height: 18px;
  }
  .editor-context {
    grid-template-columns: 1fr;
  }
  .editor-grid h2 {
    font-size: 18px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 15px;
  }
  .metric > span {
    font-size: 10px;
  }
  .metric > strong {
    font-size: 29px;
  }
  .metric > small {
    font-size: 9px;
  }
  .learning-banner {
    padding: 20px;
  }
  .learning-banner h2 {
    font-size: 21px;
  }
  .learning-banner > svg {
    width: 40px;
  }
  .preview-paper {
    padding: 20px;
  }
  .answer {
    font-size: 12px;
  }
  legend {
    font-size: 14px;
  }
  .role-area select#studentSelect {
    max-width: 58px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.learning-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
  font-size: 10px;
  color: var(--muted);
}
.learning-progress progress {
  width: 90px;
  height: 5px;
  accent-color: var(--red);
}
.school-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}
.question-preview label {
  font-size: 11px !important;
  margin: 9px 0 !important;
}
.page-heading .actions {
  margin: 0;
  justify-content: flex-end;
}
body[data-role="admin"] nav a.active:hover {
  background: var(--red);
}
@media (min-width: 1200px) {
  .metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .metric {
    padding: 17px;
  }
  .metric > small {
    font-size: 9px;
  }
}

/* School identity: charcoal navigation and school-red actions across all roles. */
:root {
  --canvas: #f5f5f5;
  --paper: #ffffff;
  --red: #b5402f;
  --red-soft: #f8e9e6;
  --ink: #252829;
  --muted: #747779;
  --line: #e2e3e4;
  --side: #252829;
}
.sidebar {
  background: var(--side);
  border-color: var(--side);
}
.school-brand strong {
  color: #fff;
}
.school-brand small,
.nav-label {
  color: #a8abad;
}
.school-logo {
  background: #fff;
  border-radius: 50%;
  padding: 3px;
}
.new-task {
  color: #fff;
  background: #b5402f;
  border-color: #b5402f;
}
.new-task:hover {
  background: #963628;
}
nav a {
  color: #c7c9ca;
}
nav a:hover {
  background: #35393b;
}
nav a.active,
body[data-role="admin"] nav a.active,
body[data-role="admin"] nav a.active:hover {
  color: #fff;
  background: #b5402f;
}
.sidebar-recent a,
.demo-mark,
.utility {
  color: #a8abad;
}
.sidebar-recent i,
.demo-mark i {
  background: #85898b;
}
.profile,
body[data-role="admin"] .profile {
  color: #fff;
  border-color: #414648;
}
.profile small {
  color: #a8abad;
}
.avatar {
  color: #fff;
  background: #a53b2d;
}
.topbar {
  background: #fff;
}
.eyebrow {
  color: #9f4437;
}
.teacher-welcome > h1 span,
.text-button {
  color: #b5402f;
}
.composer {
  border-color: #d8dadd;
}
.composer textarea::placeholder,
.composer-bottom > span {
  color: #929698;
}
.chip {
  color: #63686b;
  border-color: #dddfe0;
  background: #fff;
}
.chip:hover,
.secondary:hover {
  background: #f8e9e6;
}
.section-heading > a,
.course-info > p,
.course-bottom > span {
  color: #777d80;
}
.secondary {
  border-color: #d8dadd;
}
.course-cover {
  background: #eadbd8;
  color: #722c23;
}
.course-cover > small {
  color: #91635d;
}
.course-cover > span {
  border-color: #b88c85;
}
.mountain {
  background: #b37469;
}
.machine {
  border-color: #a35b4f;
}
.machine:after {
  background: #b17d72;
}
.course-cover.heat {
  background: #dde1e3;
  color: #343c42;
}
.course-cover.heat > small {
  color: #747c82;
}
.tube {
  border-color: #79868d;
}
.heatline {
  border-color: #8b979d;
}
.course-bottom,
.task-row {
  border-color: #e5e6e7;
}
.tip-panel {
  background: #f7eae7;
  border-color: #e6d0cb;
}
.tip-panel > span,
.tip-panel a {
  color: #a54132;
}
.tip-panel p {
  color: #82635d;
}
.task-row > svg {
  color: #a64a3b;
}
.step b {
  background: #e4e6e7;
}
.step.active b {
  background: #b5402f;
}
.question-preview {
  background: #f5f5f5;
}
.preview-paper {
  background: #fff;
  border-color: #dedfe0;
}
.learning-banner {
  background: #f6e8e5;
  border-color: #e3cbc5;
}
.learning-banner p,
.learning-banner > svg {
  color: #9a6258;
}
th {
  background: #f1f2f3;
  color: #6a6f72;
}
.bar-track,
.legend i.pale {
  background: #e4e6e7;
}
.notice {
  background: #f7eeec;
  border-color: #b5402f;
  color: #8a4b40;
}
.content-footer {
  color: #959b9e;
}
@media (max-width: 760px) {
  .topbar {
    background: #fff;
  }
}
.course-bottom > div {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.preview-entry {
  margin: 18px 0 22px;
}
.preview-entry .muted {
  font-size: 11px;
}
