:root {
  --ink: #223c3b;
  --muted: #586e6a;
  --green: #196451;
  --deep: #174e43;
  --mint: #dff1e7;
  --paper: #f8f9f5;
  --line: #dce5de;
  --yellow: #f9dd85;
  --peach: #fae6d8;
  --lav: #eee8f8;
  --white: #fff;
  --radius: 24px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-rounded, "Trebuchet MS", Arial, sans-serif;
  line-height: 1.5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
a {
  color: var(--green);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #406ccd;
  outline-offset: 4px;
}
button {
  min-height: 46px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -1px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 18px;
}
small,
.small {
  font-size: 13px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 800;
}
.demo {
  background: #223c3b;
  color: #fff;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font:
    12px/1.4 Arial,
    sans-serif;
  min-height: 48px;
}
.demo-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo select,
.demo button {
  background: #fff;
  color: var(--ink);
  border: 0;
  border-radius: 8px;
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12px;
}
.app {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
}
.rail {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -1.5px;
  padding: 0 12px;
}
.brandmark {
  width: 38px;
  height: 40px;
  border-radius: 13px;
  background: var(--yellow);
  display: grid;
  place-items: center;
  transform: rotate(-7deg);
  font-size: 24px;
}
.brand small {
  letter-spacing: 0;
  font-weight: 400;
  font-size: 10px;
  display: block;
  margin-top: -5px;
  color: var(--muted);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav button {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 13px 15px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
}
.nav button.active {
  background: var(--mint);
  color: var(--deep);
}
.nav button:hover {
  background: #edf3ed;
}
.nav-icon {
  font-size: 20px;
  width: 25px;
  text-align: center;
}
.count {
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  border-radius: 9px;
  min-width: 23px;
  height: 23px;
  font-size: 11px;
  padding: 0 5px;
  margin-left: auto;
}
.rail-bottom {
  margin-top: auto;
  background: #f3f6ef;
  border-radius: 18px;
  padding: 17px;
  font-size: 13px;
}
.rail-bottom .sprout {
  font-size: 29px;
  display: block;
  margin-bottom: 8px;
}
.rail-bottom p {
  margin-top: 6px;
  color: var(--muted);
}
.workspace {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 38px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.date {
  font-size: 13px;
  color: var(--muted);
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--lav);
  font-size: 22px;
}
.content {
  max-width: 1210px;
  margin: auto;
  padding: 32px 38px 50px;
  min-height: 75vh;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}
.page-title p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 15px;
}
.hero {
  background: var(--mint);
  border-radius: var(--radius);
  padding: 30px 32px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 12px;
  min-height: 240px;
  overflow: hidden;
  position: relative;
}
.hero h2 {
  font-size: 30px;
  line-height: 1.2;
  margin: 12px 0 10px;
  max-width: 390px;
}
.hero p {
  font-size: 15px;
  margin-bottom: 20px;
  max-width: 350px;
}
.hero-art {
  width: 100%;
  height: 215px;
  align-self: center;
}
.button {
  border: 1px solid var(--line);
  background: white;
  padding: 11px 18px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
  box-shadow: 0 3px 0 #104737;
}
.button.primary:hover {
  background: var(--deep);
}
.button.soft {
  background: #edf4ee;
  border-color: transparent;
}
.button.yellow {
  background: var(--yellow);
  border-color: transparent;
}
.button.text {
  background: none;
  border: 0;
  box-shadow: none;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 14px;
  gap: 10px;
}
.section-head h2 {
  font-size: 21px;
}
.dashboard-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 1fr);
  gap: 24px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
}
.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 16px;
  text-align: left;
  width: 100%;
}
.task-row:hover {
  border-color: #82a799;
  background: #fcfdf9;
}
.task-row .grow {
  flex: 1;
  min-width: 0;
}
.task-row b {
  display: block;
  font-size: 15px;
}
.task-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.task-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--peach);
  font-size: 25px;
  flex-shrink: 0;
}
.arrow {
  font-size: 22px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  padding: 4px 8px;
  background: #eef1ee;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.pill.returned {
  background: #fff0ce;
  color: #775000;
}
.pill.submitted {
  background: #eee8f8;
  color: #654183;
}
.pill.approved {
  background: #dff1e7;
  color: #175b43;
}
.pill.new {
  background: #e9efff;
  color: #365b93;
}
.tabs {
  display: flex;
  gap: 5px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}
.tab {
  border: 0;
  background: none;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
}
.tab.active {
  background: var(--ink);
  color: white;
}
.progress-track {
  height: 9px;
  background: #eaf0e9;
  border-radius: 7px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  background: #38896a;
  border-radius: 7px;
}
.progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 9px;
  color: var(--muted);
}
.progress-panel {
  background: #fffaf0;
  border-color: #eee4cb;
}
.progress-panel .star {
  font-size: 38px;
  margin-bottom: 9px;
}
.progress-panel h3 {
  margin-bottom: 6px;
}
.progress-panel p {
  font-size: 14px;
  margin-bottom: 23px;
}
.telegram {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
  background: #eaf0f7;
  border: 0;
  border-radius: 17px;
  padding: 17px;
  width: 100%;
  text-align: left;
}
.telegram span:first-child {
  font-size: 27px;
}
.telegram b {
  display: block;
  font-size: 14px;
}
.telegram small {
  font-size: 12px;
  color: var(--muted);
}
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.book {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.book:hover {
  transform: translateY(-2px);
  border-color: #8eaa99;
}
.book-cover {
  height: 130px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  flex-shrink: 0;
}
.book-cover strong {
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: -0.6px;
  max-width: 120px;
}
.book-cover .art {
  font-size: 55px;
  transform: rotate(-12deg);
  filter: drop-shadow(2px 6px 0 #ffffff70);
}
.book-cover:before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ffffff90;
}
.book-meta {
  padding: 0 5px 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.book-meta b {
  display: block;
  font-size: 14px;
}
.book-meta small {
  display: block;
  color: var(--muted);
  margin: 4px 0 12px;
}
.empty {
  text-align: center;
  padding: 35px 18px;
  background: #fff;
  border: 1px dashed #b9ccc0;
  border-radius: 18px;
  color: var(--muted);
}
.empty span {
  font-size: 34px;
  display: block;
  margin-bottom: 8px;
}
.crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
}
.crumb button {
  border: 0;
  background: none;
  padding: 0 7px;
  color: var(--green);
}
.book-banner {
  padding: 25px;
  display: flex;
  gap: 22px;
  align-items: center;
  border-radius: 22px;
  margin-bottom: 24px;
}
.book-banner .art {
  font-size: 60px;
}
.book-banner h1 {
  font-size: 28px;
}
.book-banner p {
  font-size: 14px;
  margin-top: 7px;
}
.module {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  margin: 12px 0;
  overflow: hidden;
}
.module summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  min-height: 56px;
}
.module .module-body {
  padding: 0 18px 18px;
}
.module .task-row {
  border: 0;
  background: #f7f9f4;
  margin-top: 8px;
}
.task-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}
.question {
  padding: 28px;
}
.question h1 {
  font-size: 27px;
  margin: 13px 0;
}
.question .prompt {
  margin: 20px 0;
  font-size: 17px;
  line-height: 1.6;
}
.input,
textarea,
select {
  border: 1px solid #a8bcb2;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  color: var(--ink);
  width: 100%;
}
textarea {
  min-height: 140px;
  resize: vertical;
}
label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 15px 0 8px;
}
.choices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.choice {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px;
  flex: 1;
  min-width: 140px;
  cursor: pointer;
}
.choice:has(input:checked) {
  background: var(--mint);
  border-color: var(--green);
}
.choice input {
  accent-color: var(--green);
  width: 19px;
  height: 19px;
}
.save-label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  min-height: 22px;
  margin: 10px 0 17px;
}
.notice {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--mint);
  font-size: 14px;
  margin: 16px 0;
}
.notice.warm {
  background: #fff3d6;
}
.notice p {
  margin-top: 5px;
}
.task-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.chat {
  padding: 0;
  overflow: hidden;
}
.chat-title {
  padding: 19px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: center;
}
.chat-title b {
  font-size: 14px;
}
.chat-title small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.messages {
  padding: 17px;
  max-height: 340px;
  min-height: 150px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  background: #f0f3ed;
  padding: 12px;
  border-radius: 13px;
  font-size: 13px;
  max-width: 95%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.bubble.me {
  background: var(--mint);
  align-self: flex-end;
}
.bubble small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 7px;
}
.chat-form {
  padding: 14px;
  border-top: 1px solid var(--line);
}
.chat-form textarea {
  min-height: 76px;
  font-size: 13px;
}
.chat-form button {
  margin-top: 8px;
  width: 100%;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}
.stat {
  padding: 21px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
}
.stat strong {
  font-size: 30px;
  display: block;
}
.stat span {
  font-size: 13px;
  color: var(--muted);
}
.stat:first-child {
  background: var(--mint);
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  padding: 13px 18px;
  background: #f3f6ef;
  white-space: nowrap;
}
td {
  padding: 15px 18px;
  border-top: 1px solid var(--line);
}
td b {
  font-size: 14px;
}
td .button {
  min-height: 38px;
  padding: 7px 11px;
  font-size: 12px;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 17px;
  flex-wrap: wrap;
}
.toolbar input {
  flex: 1;
  min-width: 160px;
}
.toolbar select {
  width: auto;
  max-width: 100%;
}
.group-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.group-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 13px;
}
.group-chip.active {
  background: var(--green);
  color: #fff;
}
.review-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 20px;
}
.student-pick {
  width: 100%;
  text-align: left;
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
}
.student-pick.active {
  background: var(--mint);
  border-color: #7daa95;
}
.student-pick small {
  display: block;
  margin: 5px 0;
  color: var(--muted);
}
.answer-text {
  padding: 17px;
  background: #f3f6ef;
  border-radius: 14px;
  margin: 15px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ai-panel {
  border: 1px dashed #b9aaca;
  background: #f6f1fc;
  padding: 17px;
  border-radius: 14px;
  font-size: 13px;
  margin: 18px 0;
}
.ai-panel p {
  margin: 7px 0;
}
.history {
  margin: 20px 0;
  font-size: 13px;
}
.history summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.history article {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.history p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 7px 0;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.wide {
  width: 100%;
}
.inline {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.review-main .task-layout {
  grid-template-columns: 1fr;
}
.review-main .messages {
  min-height: 80px;
}
.review-main h2 {
  margin: 8px 0;
}
.checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}
.checklist input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}
dialog {
  border: 0;
  border-radius: 25px;
  box-shadow: 0 24px 100px #18392e44;
  padding: 28px;
  max-width: 540px;
  width: calc(100% - 32px);
  max-height: 85vh;
  overflow: auto;
  color: var(--ink);
}
dialog::backdrop {
  background: #132c2966;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}
.dialog-head h2 {
  font-size: 23px;
}
.close {
  border: 0;
  border-radius: 12px;
  background: #eef2ec;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  font-size: 24px;
}
dialog p {
  font-size: 14px;
  margin: 12px 0;
}
dialog .actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  justify-content: flex-end;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  box-shadow: 0 4px 24px #0002;
  padding: 14px 24px;
  border-radius: 14px;
  z-index: 100;
  font-size: 14px;
  max-width: calc(100vw - 30px);
  display: none;
}
.toast.show {
  display: block;
}
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip {
  position: fixed;
  top: -80px;
  background: white;
  padding: 12px;
  z-index: 200;
}
.skip:focus {
  top: 0;
}
.role-teacher h1 {
  font-size: 30px;
}
.mobile-only {
  display: none;
}
@media (min-width: 1500px) {
  .content {
    padding-top: 40px;
  }
  .hero {
    min-height: 265px;
  }
  .hero-art {
    height: 240px;
  }
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .rail {
    padding: 25px 12px;
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 22px 25px;
  }
  .dashboard-cols {
    grid-template-columns: 1fr;
  }
  .support-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .support-col .section-head {
    grid-column: 1/-1;
    margin-bottom: 0;
  }
  .telegram {
    margin: 0;
  }
  .task-layout {
    grid-template-columns: 1fr;
  }
  .hero-art {
    height: 190px;
  }
  .book-cover {
    padding: 18px 14px;
  }
  .book-cover .art {
    font-size: 42px;
  }
}
@media (max-width: 760px) {
  .demo {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 5px;
  }
  .demo > span {
    font-size: 10px;
  }
  .demo-controls {
    width: 100%;
  }
  .demo select {
    flex: 1;
    width: auto;
  }
  .app {
    display: block;
  }
  .rail {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    z-index: 30;
    border-top: 1px solid var(--line);
    border-right: 0;
    display: block;
  }
  .brand,
  .rail-bottom {
    display: none;
  }
  .nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 3px;
  }
  .nav button {
    flex: 1;
    flex-direction: column;
    gap: 0;
    padding: 7px 3px;
    font-size: 10px;
    position: relative;
    min-height: 58px;
  }
  .nav-icon {
    font-size: 21px;
  }
  .nav .count {
    position: absolute;
    right: 10px;
    top: 2px;
    min-width: 17px;
    height: 17px;
    font-size: 9px;
  }
  .topbar {
    padding: 15px 19px;
  }
  .topbar .date {
    font-size: 12px;
  }
  .content {
    padding: 23px 18px 105px;
  }
  .page-title {
    margin-bottom: 21px;
  }
  .page-title h1 {
    font-size: 28px;
  }
  .page-title p {
    font-size: 13px;
  }
  .hero {
    padding: 24px;
    grid-template-columns: 1fr;
    min-height: 235px;
  }
  .hero h2 {
    font-size: 28px;
    max-width: 230px;
    position: relative;
    z-index: 1;
  }
  .hero p {
    max-width: 210px;
    font-size: 13px;
    position: relative;
    z-index: 1;
  }
  .hero-art {
    position: absolute;
    right: -65px;
    bottom: 15px;
    width: 210px;
    height: 180px;
    opacity: 0.45;
  }
  .hero .button {
    position: relative;
    z-index: 1;
  }
  .hero .eyebrow {
    font-size: 10px;
  }
  .dashboard-cols {
    gap: 0;
  }
  .support-col {
    display: block;
  }
  .support-col .telegram {
    margin-top: 13px;
  }
  .section-head {
    margin-top: 25px;
  }
  .section-head h2 {
    font-size: 20px;
  }
  .books-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .book-meta .pill {
    white-space: normal;
  }
  .book {
    flex-direction: row;
    align-items: center;
    padding: 12px;
    gap: 17px;
  }
  .book-cover {
    width: 104px;
    height: 112px;
    padding: 15px;
    display: block;
  }
  .book-cover strong {
    font-size: 14px;
    display: block;
  }
  .book-cover .art {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 36px;
  }
  .book-meta {
    flex: 1;
  }
  .task-row {
    padding: 13px;
    gap: 11px;
  }
  .task-row b {
    font-size: 14px;
  }
  .task-icon {
    width: 43px;
    height: 43px;
    font-size: 23px;
  }
  .task-row .pill {
    font-size: 10px;
  }
  .task-row .arrow {
    display: none;
  }
  .question {
    padding: 21px;
  }
  .question h1 {
    font-size: 25px;
  }
  .question .prompt {
    font-size: 16px;
  }
  .task-actions .button {
    width: 100%;
  }
  .stats {
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
  }
  .stat {
    padding: 14px 10px;
    border-radius: 14px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat span {
    font-size: 11px;
  }
  .review-layout {
    grid-template-columns: 1fr;
  }
  .review-picks {
    display: flex;
    gap: 8px;
    overflow: auto;
  }
  .student-pick {
    min-width: 190px;
  }
  .page-title > .button {
    font-size: 12px;
    padding: 10px;
  }
  .book-banner {
    padding: 20px;
    gap: 14px;
  }
  .book-banner h1 {
    font-size: 23px;
  }
  .book-banner .art {
    font-size: 42px;
  }
  .toast {
    bottom: 90px;
  }
  .table-wrap table {
    min-width: 590px;
  }
  .role-teacher h1 {
    font-size: 27px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  .book,
  .task-row {
    transition:
      background 0.15s,
      transform 0.15s,
      border-color 0.15s;
  }
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #edf4ec;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 32px;
}
.login-card h1 {
  margin: 24px 0 8px;
}
.login-card p {
  margin-bottom: 16px;
}
.login-card .brand {
  padding: 0;
}
.error-text {
  color: #913b22;
  font-size: 13px;
  min-height: 20px;
  margin: 12px 0;
}
.lesson-material {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.lesson-material video,
.lesson-material audio {
  width: 100%;
  max-height: 450px;
}
.lesson-material iframe {
  width: 100%;
  height: 480px;
  border: 0;
}
.lesson-body {
  white-space: pre-wrap;
  line-height: 1.75;
  margin: 22px 0;
}
.note-small {
  font-size: 12px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.login-card form label {
  display: block;
  margin: 12px 0 6px;
}
.lesson-card {
  background: white;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 14px;
}
.lesson-card h2 {
  margin-bottom: 7px;
}
.lesson-card .inline {
  margin: 12px 0;
}
.lesson-card p {
  margin-bottom: 10px;
}
.calendar-row {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin: 10px 0;
}
.calendar-day {
  padding: 12px;
  background: var(--mint);
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  min-width: 90px;
}
.quiz-panel {
  max-width: 760px;
  margin: 0 auto;
}
.quiz-panel .prompt {
  font-size: 22px;
  margin: 24px 0;
}
.quiz-panel .choice {
  width: 100%;
  flex: none;
}
.quiz-panel .choices {
  display: grid;
}
.quiz-feedback {
  padding: 20px;
  border-radius: 15px;
  background: var(--mint);
  margin-top: 20px;
}
.quiz-feedback.wrong {
  background: #fff3d6;
}
.integration-job {
  font-size: 13px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}
.status-failed,
.status-unknown {
  color: #913b22;
}
.status-completed {
  color: var(--green);
}
.topbar .logout {
  min-height: 35px;
  font-size: 12px;
  padding: 5px 9px;
}
.hint-box {
  padding: 15px;
  border-radius: 14px;
  background: var(--mint);
  font-size: 13px;
  margin-top: 20px;
}
.search-results .task-row {
  margin-top: 10px;
}
.choice:has(input:checked) {
  background: var(--mint);
}
.upload-progress {
  font-size: 13px;
  color: var(--muted);
}
.schedule-lesson-select {
  margin: 10px 0;
}
.save-error {
  color: #913b22;
}
.info-list {
  font-size: 13px;
  line-height: 1.8;
}
summary {
  cursor: pointer;
}
.empty a {
  display: inline-block;
  margin-top: 10px;
}
dialog form label {
  display: block;
  font-size: 13px;
  margin: 14px 0 6px;
}
dialog form .choices label,
dialog form .checklist label {
  display: flex;
  margin: 0;
}
.nav {
  max-height: 75vh;
  overflow-y: auto;
}
.form-actions {
  display: flex;
  gap: 9px;
  margin-top: 20px;
  justify-content: flex-end;
}
.teacher-list-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
@media (max-width: 760px) {
  .nav {
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
  }
  .nav button {
    min-width: 60px;
    flex-shrink: 0;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .calendar-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .calendar-day {
    min-width: 0;
  }
  .lesson-material iframe {
    height: 360px;
  }
  .app .rail .brand {
    display: none;
  }
  .login-card .brand {
    display: flex;
  }
  .role-teacher .nav button {
    min-width: 70px;
  }
}
@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .profile {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-title,
  .section-head {
    flex-wrap: wrap;
  }
  .lesson-card,
  .panel {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .task-row {
    flex-wrap: wrap;
  }
  .task-row .grow {
    flex-basis: 140px;
  }
  .task-row .pill {
    margin-left: auto;
  }
  .hero > div {
    min-width: 0;
  }
  .button {
    max-width: 100%;
  }
}
.community-panel {
  padding: 24px;
  min-width: 0;
}
.community-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.community-feed {
  height: min(52vh, 620px);
  min-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-block: 1px solid #dae6de;
}
.community-message {
  width: min(88%, 680px);
  padding: 14px 18px;
  border-radius: 18px 18px 18px 4px;
  background: #f1f5ee;
  overflow-wrap: anywhere;
  flex-shrink: 0;
}
.community-message.mine {
  align-self: flex-end;
  background: #e2f0e7;
  border-radius: 18px 18px 4px 18px;
}
.community-message.ai {
  background: #fff5d4;
}
.community-author {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.community-author span {
  font-size: 12px;
  color: #596b64;
}
.community-text {
  white-space: pre-wrap;
  margin: 8px 0;
}
.community-message blockquote {
  margin: 8px 0;
  padding: 8px 12px;
  border-left: 3px solid #91b9a5;
  font-size: 13px;
  background: #ffffff70;
}
.community-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.community-tools .button {
  font-size: 12px;
  padding: 4px 0;
  min-height: 32px;
}
.community-send {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.community-ask {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.chat-reply {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: #f0f5ef;
  border-radius: 12px;
  flex-wrap: wrap;
}
.chat-reply span {
  flex: 1;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.handbook-filters {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.handbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}
.handbook-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.handbook-card h2,
.handbook-card p {
  margin: 0;
}
.handbook-icon {
  font-size: 36px;
}
.handbook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}
.handbook-actions .button {
  font-size: 14px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .community-panel {
    padding: 14px;
  }
  .community-message {
    width: 95%;
    padding: 12px;
  }
  .community-send .inline {
    gap: 4px;
  }
  .community-send .inline .button {
    padding: 8px;
  }
  .handbook-filters {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .community-author {
    gap: 4px;
  }
}
