/* ==========================================================================
   Daily Discovery · Core Layout, Teacher Dashboard, Student Space & Reports
   ========================================================================== */

:root {
  --paper: #f7f6f0;
  --surface: #fffefb;
  --ink: #243b36;
  --muted: #687872;
  --line: #dce2d9;
  --green: #174f46;
  --wash: #e8efe7;
  --gold: #a85d26;
  --gold-wash: #f7ebdc;
  --error: #a33838;
  --body: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --display: 'Songti SC', 'STSong', Georgia, serif;
  --shadow-sm: 0 2px 8px rgba(36, 59, 54, 0.04);
  --shadow-md: 0 6px 20px rgba(36, 59, 54, 0.07);
}

/* ==========================================================================
   1. Base Reset & Typography
   ========================================================================== */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.65;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: var(--green);
  text-underline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 500;
}
h1,
h2 {
  font-family: var(--display);
}
h1 {
  font-size: 38px;
  line-height: 1.3;
}
h2 {
  font-size: 25px;
}
h3 {
  font-size: 17px;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.loading {
  padding: 100px 24px;
  text-align: center;
}

/* ==========================================================================
   2. Application Shell, Sidebar & Topbar
   ========================================================================== */
.shell {
  max-width: 1400px;
  margin: auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
}
.sidebar {
  padding: 35px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 40px;
  background: linear-gradient(180deg, var(--wash), var(--paper) 60%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 42px;
  height: 48px;
  background: var(--green);
  color: var(--surface);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 26px;
  border-radius: 3px 14px 3px 3px;
  box-shadow: 0 3px 10px rgba(23, 79, 70, 0.18);
}
.brand strong {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 4px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav button:hover:not(.active) {
  background: rgba(23, 79, 70, 0.06);
  color: var(--ink);
}
.nav button.active {
  background: var(--green);
  color: var(--surface);
  box-shadow: 0 2px 8px rgba(23, 79, 70, 0.18);
}
.nav button span {
  display: inline-block;
  margin-right: 9px;
  font-family: Georgia, serif;
  opacity: 0.7;
}
.sidebar-foot {
  margin-top: auto;
  font-family: var(--display);
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
}
.main {
  padding: 28px 42px 56px;
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.account {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--green);
  font-weight: 500;
}
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 7px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 27px;
}
.page-head p {
  margin-top: 9px;
}
.date-stamp {
  font-family: Georgia, serif;
  color: var(--green);
  font-size: 23px;
  white-space: nowrap;
}

/* ==========================================================================
   3. Shared UI Primitives (Buttons, Badges, Forms, Tables, Toast)
   ========================================================================== */
.hero {
  padding: 30px 32px;
  background: var(--green);
  color: var(--surface);
  border-radius: 7px;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}
.hero:after {
  content: '';
  position: absolute;
  right: -45px;
  top: -60px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  pointer-events: none;
}
.hero .eyebrow {
  color: #c6dbd0;
}
.hero h2 {
  font-size: 28px;
  margin: 14px 0 10px;
}
.hero p {
  color: #d2e1d7;
  max-width: 580px;
}
.hero .button {
  margin-top: 20px;
  background: var(--surface);
  color: var(--green);
  border-color: var(--surface);
}
.hero .meta {
  color: #d2e1d7;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 17px;
  border-radius: 5px;
  min-height: 42px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.button:hover:not(:disabled) {
  border-color: #b5c4b7;
  background: #f5f7f2;
}
.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--surface);
}
.button.primary:hover:not(:disabled) {
  background: #124038;
  border-color: #124038;
}
.button.subtle {
  background: var(--wash);
  border-color: transparent;
  color: var(--green);
}
.button.subtle:hover:not(:disabled) {
  background: #dce8db;
}
.button.small {
  padding: 5px 12px;
  min-height: 34px;
  font-size: 12px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--wash);
  color: var(--green);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
}
.badge.warn {
  background: var(--gold-wash);
  color: var(--gold);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 27px 0 14px;
}
.empty {
  padding: 44px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 251, 0.5);
}
.empty h3 {
  font-family: var(--display);
  font-size: 23px;
  margin-bottom: 9px;
}
.empty p {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 18px;
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
.stat {
  padding: 0 20px 22px;
  border-right: 1px solid var(--line);
}
.stat:first-child {
  padding-left: 0;
}
.stat:last-child {
  border: 0;
}
.stat b {
  display: block;
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 34px;
  color: var(--green);
  margin: 3px 0;
}
.stat small {
  color: var(--muted);
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}
.field > span,
.field > label {
  font-size: 13px;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field textarea,
.field select,
.filter-select {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--surface);
  color: var(--ink);
  border: 1px solid #cbd6cb;
  border-radius: 4px;
  min-width: 0;
  box-sizing: border-box;
}
.field > input:not([type="checkbox"]):not([type="radio"]),
.field > select {
  height: 44px;
  min-height: 44px;
  padding: 0 12px;
  line-height: normal;
}
.field > input[type="file"] {
  padding: 7px 12px;
  line-height: 26px;
}
select,
input[type="search"],
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23536258' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 12px 12px;
  padding-right: 30px !important;
}
.field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.75;
}
.field small {
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
.full {
  grid-column: 1 / -1;
}
.panel {
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.panel h3 {
  margin-bottom: 17px;
}
.panel .field {
  margin-bottom: 13px;
}
.panel textarea {
  font-size: 13px;
  min-height: 100px;
}
.helper {
  padding: 12px 15px;
  background: var(--wash);
  color: var(--green);
  font-size: 12px;
  border-radius: 5px;
  margin: 16px 0;
}
.error {
  color: var(--error);
  font-size: 13px;
  white-space: pre-wrap;
}
.saved {
  font-size: 12px;
  color: var(--green);
  margin-top: 9px;
}
.tiny-progress {
  height: 5px;
  background: var(--wash);
  border-radius: 2px;
  overflow: hidden;
  margin: 10px 0;
}
.tiny-progress > span {
  display: block;
  height: 100%;
  background: var(--green);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  background: var(--wash);
  position: sticky;
  top: 0;
  z-index: 1;
}
td,
th {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
}
tbody tr:hover:not(.detail-row) td {
  background: rgba(232, 239, 231, 0.35);
}
td small {
  display: block;
  color: var(--muted);
}
.table-name {
  white-space: nowrap;
}
.filter-row {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-row label {
  display: grid;
  gap: 6px;
  min-width: 160px;
  font-size: 12px;
}
.filter-row label:first-child {
  flex: 1;
  max-width: 430px;
}
.filter-select {
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  line-height: normal;
  font-size: 13px;
}
.detail-row td {
  background: var(--surface);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-body {
  max-width: 680px;
  padding: 5px 0;
}
.detail-body p {
  margin: 6px 0;
}
.step-number {
  font-family: Georgia, serif;
  color: var(--gold);
  margin-right: 6px;
  font-size: 16px;
}
.back {
  margin-bottom: 18px;
}
.notice-inline {
  padding: 14px 0;
  color: var(--muted);
  font-size: 12px;
}
.paper-note {
  padding: 13px 0 20px;
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
#notice {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--surface);
  border-radius: 6px;
  padding: 11px 22px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
  max-width: 90%;
  z-index: 40;
  display: none;
}
#notice.visible {
  display: block;
}

/* ==========================================================================
   4. Login View
   ========================================================================== */
.login {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 35px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
  min-height: 100vh;
}
.login-story h1 {
  font-size: 51px;
  margin: 35px 0 20px;
  letter-spacing: 3px;
  line-height: 1.5;
}
.login-story p {
  color: var(--muted);
  max-width: 340px;
  line-height: 2;
}
.login-art {
  width: 250px;
  margin-top: 35px;
  color: var(--green);
}
.login-art svg {
  width: 100%;
  height: auto;
}
.login-panel {
  padding: 35px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 15px 40px rgba(24, 63, 41, 0.07);
}
.login-panel h2 {
  margin-bottom: 5px;
}
.login-panel > p {
  margin-bottom: 25px;
  color: var(--muted);
}
.login-panel .button.primary {
  width: 100%;
  margin-top: 5px;
}
.demo-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.demo-row button {
  flex: 1;
  font-size: 12px;
}
.login-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 15px;
}

/* ==========================================================================
   5. Teacher Dashboard & Assignment Cards
   ========================================================================== */
.dashboard-heading h1 {
  font-size: 32px;
  letter-spacing: 2px;
  margin-top: 7px;
}
.dashboard-heading p {
  font-size: 13px;
}
.dashboard-filters {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(145px, 1fr) minmax(110px, 1fr) minmax(170px, 1.5fr);
  align-items: start;
  gap: 16px;
  padding: 19px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.dashboard-filters > label {
  display: grid;
  grid-template-rows: 18px 42px;
  gap: 8px;
  line-height: 18px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}
.dashboard-filters .filter-select {
  display: block;
  width: 100%;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  line-height: normal;
  border: 1px solid var(--line);
  background-color: #f5f6f1;
  color: var(--ink);
  font-size: 13px;
}
.dashboard-filters input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
}
.dashboard-filters input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
  min-height: 1em;
}
.dashboard-filters input:focus,
.dashboard-filters select:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  background-color: var(--surface);
}
.dashboard-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  min-height: 0;
  gap: 20px;
}
.dashboard-filter-actions .button {
  white-space: nowrap;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  font-size: 12px;
}
.dashboard-filter-actions .text-button {
  font-size: 12px;
  white-space: nowrap;
}
.dashboard-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 23px 2px 14px;
  font-size: 13px;
}
.dashboard-list-head p {
  color: var(--green);
  font-weight: 500;
}
.dashboard-list-head p span {
  font-weight: 400;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-list-head label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}
.dashboard-list-head select {
  border: 0;
  background-color: transparent;
  background-position: right 4px center;
  color: var(--green);
  padding: 5px 22px 5px 4px !important;
  font-size: 12px;
  max-width: 175px;
}
.dashboard-cards {
  display: grid;
  gap: 19px;
}
.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.dashboard-card:hover {
  border-color: #c2cfc1;
  box-shadow: var(--shadow-md);
}
.dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
}
.dashboard-card-head > div {
  min-width: 0;
}
.dashboard-card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
}
.dashboard-card-meta time {
  color: var(--green);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dashboard-card-meta span {
  border-left: 1px solid var(--line);
  padding-left: 9px;
}
.dashboard-card-head h2 {
  font-size: 23px;
  line-height: 1.5;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.dashboard-card-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.dashboard-card-head > .button {
  flex-shrink: 0;
  background: transparent;
  color: var(--green);
}
.dashboard-class-list {
  padding: 0 16px 16px;
  display: grid;
  gap: 8px;
}
.dashboard-class {
  border: 1px solid transparent;
  border-radius: 6px;
  min-width: 0;
  background: #f3f6f1;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.dashboard-class.is-expanded {
  border-color: #9ab2a2;
  background: var(--surface);
}
.dashboard-class-row {
  display: grid;
  grid-template-columns: 112px minmax(90px, 1.2fr) minmax(76px, 1fr) 85px 195px;
  gap: 14px;
  align-items: center;
  min-height: 79px;
  padding: 11px 17px 11px 0;
}
.dashboard-class-name {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 5px;
  background: #e5ede3;
  overflow-wrap: anywhere;
}
.dashboard-class-name strong {
  font-weight: 500;
  color: var(--green);
  font-size: 14px;
}
.dashboard-class-name small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.dashboard-progress {
  min-width: 0;
}
.dashboard-progress > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.dashboard-progress span,
.dashboard-feedback > span,
.dashboard-needs > span {
  font-size: 11px;
  color: var(--muted);
}
.dashboard-class-row strong {
  font-variant-numeric: tabular-nums;
}
.dashboard-progress strong,
.dashboard-feedback strong,
.dashboard-needs strong {
  font-size: 16px;
  font-weight: 500;
  color: var(--green);
  white-space: nowrap;
}
.dashboard-progress strong small,
.dashboard-feedback strong small,
.dashboard-needs strong small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.dashboard-progress progress {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  border: 0;
  width: 100%;
  height: 5px;
  border-radius: 8px;
  overflow: hidden;
  background: #dce6da;
  color: var(--green);
  accent-color: var(--green);
}
.dashboard-progress progress::-webkit-progress-bar {
  background: #dce6da;
  border-radius: 8px;
}
.dashboard-progress progress::-webkit-progress-value {
  background: var(--green);
  border-radius: 8px;
}
.dashboard-progress progress::-moz-progress-bar {
  background: var(--green);
  border-radius: 8px;
}
.dashboard-feedback {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}
.dashboard-needs {
  border: 0;
  background: transparent;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
}
.dashboard-needs.has-needs {
  background: var(--gold-wash);
}
.dashboard-needs.has-needs strong,
.dashboard-needs.has-needs > span {
  color: var(--gold);
}
.dashboard-class-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  flex-wrap: wrap;
  white-space: normal;
  font-size: 12px;
}
.dashboard-class-actions a {
  text-decoration: none;
}
.dashboard-class-actions .text-button {
  font-size: 12px;
  color: var(--green);
  text-decoration: none;
}
.dashboard-class-actions .report-entry {
  font-weight: 600;
  color: var(--green);
}
.dashboard-class-actions .class-manage {
  font-size: 11px;
  color: var(--muted);
}
.dashboard-class-actions .text-button:hover,
.dashboard-class-actions a:hover {
  text-decoration: underline;
}
.dashboard-details {
  padding: 20px 21px 8px;
  border-top: 1px solid var(--line);
}
.dashboard-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dashboard-detail-head h3 {
  font-family: var(--display);
  font-size: 19px;
}
.dashboard-detail-head p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.dashboard-detail-head label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
}
.dashboard-detail-head select {
  width: 155px;
  height: 38px;
  min-height: 38px;
  font-size: 12px;
  padding: 0 10px;
}
.dashboard-materials {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 10px 0 15px;
  font-size: 11px;
}
.dashboard-materials .text-button {
  font-size: 11px;
  color: var(--green);
}
.paper-summary {
  display: flex;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-bottom: 17px;
  padding: 11px 13px;
  background: var(--paper);
  border-radius: 5px;
  font-size: 11px;
  color: var(--muted);
}
.paper-summary strong {
  color: var(--green);
  font-weight: 500;
}
.paper-summary small {
  font-size: 10px;
}
.dashboard-details .table-wrap {
  max-width: 100%;
}
.dashboard-details table {
  font-size: 12px;
  min-width: 630px;
}
.dashboard-details td,
.dashboard-details th {
  padding: 12px 9px;
}
.dashboard-details .detail-body {
  font-size: 12px;
}
.dashboard-details .detail-body .small {
  font-size: 11px;
}
.dashboard-note {
  font-size: 11px;
  max-width: 900px;
  line-height: 1.9;
}

/* ==========================================================================
   6. Direct Publish & Video Production Views
   ========================================================================== */
.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.upload-box {
  padding: 17px 15px;
  border: 1px dashed #b6c7b7;
  border-radius: 5px;
  background: var(--paper);
}
.upload-box input {
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 12px;
  max-width: 100%;
}
.upload-box strong {
  font-size: 13px;
  font-weight: 500;
}
.upload-box small {
  display: block;
  margin: 4px 0 13px;
}
.upload-modes,
.split-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.upload-modes .choice,
.split-options .choice {
  font-size: 13px;
  background: var(--surface);
}
.choice {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.choice input {
  accent-color: var(--green);
}
.choice:has(input:checked) {
  background: var(--wash);
  border-color: var(--green);
}
.combined-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 20px;
  border: 1px dashed #9bb6a2;
  background: var(--wash);
  border-radius: 6px;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.combined-drop strong {
  font-family: var(--display);
  font-size: 25px;
  font-weight: 500;
}
.combined-drop input {
  max-width: 100%;
  font-size: 13px;
}
.combined-drop.dragging {
  border-color: var(--green);
  background: #d9e8d9;
}
.split-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 25px 0 17px;
}
.split-header h3 {
  margin: 0 0 5px;
}
.split-header p {
  overflow-wrap: anywhere;
}
.split-setting {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 2fr;
  gap: 22px;
}
.split-setting input[type="range"] {
  padding: 0;
  accent-color: var(--green);
  min-height: 30px;
}
.split-page-preview {
  position: relative;
  max-width: 550px;
  margin: 15px auto;
  background: white;
  line-height: 0;
  user-select: none;
}
.split-page-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
}
.split-page-preview.can-split {
  cursor: crosshair;
}
.split-divider {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed #ad4f24;
  pointer-events: none;
}
.split-divider span {
  position: absolute;
  right: 0;
  top: 3px;
  padding: 4px 8px;
  background: #ad4f24;
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
}
.split-confirm {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 20px 0 15px;
  font-size: 13px;
}
.split-confirm input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.split-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 25px;
}
.split-result-grid h3 {
  font-size: 15px;
  margin-bottom: 10px;
}
.split-result-grid img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}
.split-result-grid a {
  display: block;
  font-size: 12px;
  margin-top: 7px;
}
#separate-upload {
  grid-template-columns: 1fr 1fr;
}
#publish-status {
  overflow-wrap: anywhere;
}
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr);
  gap: 24px;
  align-items: start;
}
.study-side {
  display: grid;
  gap: 20px;
}
.production-video {
  width: 100%;
  background: #142521;
}
.production-steps {
  padding-left: 22px;
  color: var(--muted);
  line-height: 2;
}
.production-steps li {
  margin: 10px 0;
}
.production-video + .saved {
  margin-top: 15px;
}

/* ==========================================================================
   7. Student Shell, Home & Study Workspace (with Split-Screen Mode)
   ========================================================================== */
.student-shell {
  --reading-paper: #f4f3eb;
  min-height: 100vh;
  background: radial-gradient(ellipse at 100% 0, rgba(225, 234, 221, 0.5), transparent 42%), var(--paper);
}
.student-masthead {
  max-width: 1248px;
  margin: auto;
  padding: 23px 48px;
  display: flex;
  align-items: center;
  gap: 54px;
  border-bottom: 1px solid var(--line);
}
.student-brand {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  text-align: left;
  flex-shrink: 0;
}
.student-brand .brand-mark {
  height: 40px;
  width: 35px;
  font-size: 24px;
}
.student-brand .brand small {
  font-size: 8px;
  letter-spacing: 1.6px;
}
.student-brand .brand strong {
  font-size: 23px;
}
.student-masthead nav {
  display: flex;
  align-self: stretch;
  gap: 30px;
}
.student-masthead nav button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  padding: 8px 0;
  font-size: 14px;
}
.student-masthead nav button.active {
  color: var(--green);
  border-color: var(--green);
}
.student-account {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 13px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.student-account .text-button {
  font-size: 12px;
}
.student-main {
  max-width: 1248px;
  margin: auto;
  padding: 48px 48px 24px;
  min-width: 0;
}
.student-kicker {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--green);
  margin-bottom: 10px;
}
.student-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}
.student-welcome h1 {
  font-size: 36px;
  letter-spacing: 1px;
}
.student-welcome p:last-child {
  color: var(--muted);
  margin-top: 10px;
}
.student-welcome time {
  font-family: Georgia, serif;
  font-size: 38px;
  color: var(--green);
  line-height: 1.15;
  text-align: right;
}
.student-welcome time span {
  display: block;
  font-size: 12px;
  letter-spacing: 3px;
  margin-top: 9px;
  color: var(--muted);
}
.today-lesson.hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 30px;
  background: var(--green);
  padding: 36px 40px 38px;
  border-radius: 6px;
  color: var(--surface);
  margin: 0 0 44px;
  box-shadow: 0 10px 30px rgba(23, 79, 70, 0.14);
}
.today-lesson.hero:after {
  display: none;
}
.today-lesson .student-kicker {
  color: #cfdfcf;
  display: flex;
  gap: 16px;
  align-items: center;
}
.today-lesson .student-kicker span {
  font-family: Georgia, serif;
  letter-spacing: 1px;
  font-size: 12px;
  opacity: 0.7;
}
.today-lesson.hero h2 {
  font-size: 34px;
  line-height: 1.4;
  margin: 22px 0 10px;
  max-width: 740px;
  overflow-wrap: anywhere;
}
.today-lesson.hero .today-topic {
  font-size: 14px;
  color: #d0dfd3;
  max-width: 620px;
}
.today-actions {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.today-lesson.hero .button {
  margin: 0;
  padding: 11px 20px;
  min-width: 156px;
  color: var(--green);
  border-color: var(--surface);
  background: var(--surface);
}
.today-lesson .text-button {
  color: #e1ece0;
  font-size: 13px;
}
.today-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(215, 233, 221, 0.16);
}
.today-aside p {
  font-size: 12px !important;
  white-space: pre-line;
  text-align: center;
  margin-top: 20px;
  color: #d0dfd3;
}
.lesson-orbit {
  display: grid;
  place-items: center;
  position: relative;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(220, 234, 217, 0.34);
  border-radius: 50%;
  transform: rotate(-25deg);
}
.lesson-orbit:before {
  content: '';
  position: absolute;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(220, 234, 217, 0.5);
  transform: rotate(45deg);
}
.lesson-orbit:after {
  content: '';
  position: absolute;
  width: 160px;
  height: 1px;
  background: rgba(220, 234, 217, 0.31);
}
.lesson-orbit b {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 400;
  transform: rotate(25deg);
  color: #e3eddf;
}
.lesson-orbit i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d2b879;
  left: -4px;
  top: 60px;
}
.lesson-orbit i + i {
  left: auto;
  right: -4px;
  background: #c6dac7;
}
.journal-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 20px;
}
.journal-heading h2 {
  font-size: 27px;
}
.journal-heading > span {
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 4px;
}
.journal-heading .student-kicker {
  margin-bottom: 5px;
}
.journal-list {
  border-top: 1px solid var(--line);
}
.journal-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.journal-date {
  display: grid;
  gap: 4px;
  font-family: Georgia, serif;
  color: var(--green);
}
.journal-date strong {
  font-size: 23px;
  font-weight: 400;
}
.journal-date span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
}
.journal-info h3 {
  font-family: var(--display);
  font-size: 23px;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.journal-info > p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.journal-info .meta {
  align-items: center;
  gap: 14px;
}
.journal-row > .button {
  background: transparent;
  border-color: #bdcbc0;
  font-size: 13px;
  padding: 8px 19px;
}
.journal-filters {
  display: flex;
  gap: 8px;
  margin: 22px 0;
}
.journal-filters button {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: transparent;
  color: var(--muted);
  padding: 7px 16px;
  font-size: 13px;
}
.journal-filters button.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--surface);
}
.student-empty {
  border-top: 1px solid var(--line);
  padding: 48px 20px;
  text-align: center;
}
.student-empty > span {
  display: block;
  font-family: var(--display);
  font-size: 36px;
  color: #a2b6a5;
}
.student-empty h3 {
  font-family: var(--display);
  font-size: 25px;
}
.student-empty p {
  color: var(--muted);
  margin: 10px 0 20px;
}
.student-footer {
  max-width: 1152px;
  margin: 40px auto 0;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
}

/* Student Study Workspace */
.is-studying .student-main {
  padding-top: 23px;
}
.study-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 19px;
}
.study-topline .text-button {
  text-decoration: none;
  font-size: 12px;
}
.lesson-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 24px;
}
.lesson-heading .student-kicker {
  margin-bottom: 7px;
}
.lesson-heading h1 {
  font-size: 33px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.lesson-heading-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.feedback-jump {
  font-size: 12px;
  background: transparent;
  flex-shrink: 0;
  border-color: #c8d3c7;
}
.study-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.learning-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 25px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.tabs button {
  padding: 12px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
}
.tabs button.active {
  border-bottom-color: var(--green);
  color: var(--green);
}
.learning-tabs.tabs {
  border: 0;
  margin: 0;
  gap: 30px;
  flex-wrap: nowrap;
}
.learning-tabs.tabs button {
  font-size: 14px;
  padding: 18px 0;
  white-space: nowrap;
}
.tab-pending {
  margin-left: 6px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.learning-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
.split-toggle,
.focus-toggle {
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  color: var(--green);
}
.split-toggle[aria-pressed="true"] {
  font-weight: 600;
}

/* Split-Screen Question Reference Pane */
.study-body {
  min-width: 0;
}
.study-main-panel {
  min-width: 0;
}
.study-split-pane {
  background: #fafaf5;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.split-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 20px;
  background: #f1f4ec;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}
.split-pane-head a,
.split-pane-head .text-button {
  font-size: 11px;
  font-weight: 400;
  text-decoration: none;
  color: var(--green);
}
.split-pane-body {
  max-height: 45dvh;
  overflow-y: auto;
}
.split-question-card {
  padding: 20px 22px !important;
  background: transparent !important;
}
.split-pdf-pages {
  padding: 12px !important;
}
.study-split-resizer {
  display: none;
}

@media (min-width: 960px) {
  .study-workspace.is-split .study-body {
    display: grid;
    grid-template-columns: minmax(280px, var(--split-left, 40%)) 8px minmax(0, 1fr);
    align-items: stretch;
  }
  .study-workspace.is-split .study-split-resizer {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    background: #eef1e8;
    border-right: 1px solid var(--line);
    user-select: none;
    touch-action: none;
    transition: background 0.15s ease;
  }
  .study-workspace.is-split .study-split-resizer::after {
    content: "";
    width: 2px;
    height: 36px;
    border-radius: 2px;
    background: #9eb0a0;
  }
  .study-workspace.is-split .study-split-resizer:hover,
  .study-workspace.is-split .study-split-resizer.is-dragging,
  .study-workspace.is-split .study-split-resizer:focus-visible {
    background: #dce5d8;
    outline: none;
  }
  .study-workspace.is-split .study-split-pane {
    position: sticky;
    top: 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    max-height: 85dvh;
    display: flex;
    flex-direction: column;
  }
  .study-workspace.is-split .split-pane-body {
    max-height: none;
    flex: 1;
  }
}

.video-stage {
  background: #172722;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 76vh;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.video-chapters {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 25px;
  background: #f5f6ef;
}
.video-chapters button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  flex: 1;
  border: 0;
  border-right: 1px solid var(--line);
  background: none;
  padding: 14px 18px;
  text-align: left;
  color: var(--ink);
  font-size: 12px;
}
.video-chapters button:first-child {
  padding-left: 0;
}
.video-chapters button:last-child {
  border: 0;
  padding-right: 0;
}
.video-chapters time {
  font-family: Georgia, serif;
  color: var(--green);
  font-size: 13px;
}
.video-chapters b {
  font-weight: 400;
  color: #839781;
}
.video-chapters button:hover {
  background: var(--wash);
}
.video-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 25px;
}
.video-caption strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.video-caption div > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.video-caption > span {
  font-size: 12px;
  color: var(--green);
  white-space: nowrap;
}
.reading-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 13px 25px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.reading-toolbar small {
  margin-left: 10px;
  color: var(--muted);
  font-size: 11px;
}
.reading-toolbar > div {
  display: flex;
  align-items: center;
  gap: 20px;
}
.reading-toolbar .text-button,
.reading-toolbar a {
  font-size: 12px;
  text-decoration: none;
  color: var(--green);
}
.pdf-pages {
  padding: 24px;
  background: #e9ece4;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.pdf-page {
  margin: 0 auto 24px;
  max-width: 900px;
  box-shadow: 0 2px 8px rgba(35, 60, 45, 0.04);
  background: white;
}
.pdf-page:last-child {
  margin-bottom: 0;
}
.pdf-page figcaption {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  background: #fdfdf9;
  color: var(--muted);
  border-bottom: 1px solid #eef0ea;
  font-size: 11px;
}
.pdf-page img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 100px;
  background: white;
}
.pdf-pages.zoomed .pdf-page {
  min-width: 1100px;
  max-width: 1400px;
}
.reading-help {
  padding: 12px 25px;
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
}
.reading-loading {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
  font-size: 13px;
}
.reading-loading .button {
  margin: 18px;
}
.reading-loading a {
  display: block;
}
.page-error {
  padding: 30px;
  color: var(--error);
  font-size: 13px;
}
.material-empty {
  padding: 70px 20px;
  text-align: center;
  background: linear-gradient(135deg, #f3f5ee, var(--surface));
}
.material-empty > span {
  font-size: 40px;
  color: #8ba18c;
  display: block;
  margin-bottom: 12px;
}
.material-empty h2 {
  font-size: 25px;
}
.material-empty p {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 23px;
}
.material-empty .row {
  justify-content: center;
}
.student-question-card {
  padding: 28px 35px;
  background: var(--surface);
}
.question-reading .bank-native-question {
  font-size: 17px;
  line-height: 2.1;
}
.question-reading .native-figures {
  justify-content: center;
  margin-top: 22px;
}
.question-reading .native-figure img {
  max-height: 300px;
  max-width: 100%;
  object-fit: contain;
}
.question-reading.text-enlarged .bank-native-question {
  font-size: 21px;
}
.question-source {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 18px;
}
.lesson-note {
  margin-top: 16px;
  background: rgba(236, 239, 229, 0.5);
  border-left: 2px solid #b6c6af;
  font-size: 13px;
}
.lesson-note summary {
  cursor: pointer;
  padding: 13px 18px;
  color: var(--green);
}
.lesson-note summary > span {
  float: right;
  font-size: 11px;
  color: var(--muted);
}
.lesson-note[open] summary > span {
  display: none;
}
.lesson-note p {
  padding: 0 18px 18px;
  white-space: pre-wrap;
  color: var(--muted);
  line-height: 1.9;
}
.preview-note {
  margin: 24px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}
.learning-feedback {
  scroll-margin-top: 24px;
  margin-top: 50px;
  padding-top: 32px;
  border-top: 1px solid #becdbd;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 48px;
}
.feedback-intro h2 {
  font-size: 27px;
  line-height: 1.5;
}
.feedback-intro > p:last-child {
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
}
.understanding-options {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.understanding-options label {
  position: relative;
  cursor: pointer;
}
.understanding-options input {
  position: absolute;
  left: 13px;
  top: 15px;
  accent-color: var(--green);
  width: 15px;
  height: 15px;
  margin: 0;
}
.understanding-card {
  padding: 13px 14px 17px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid #cbd6c7;
  border-radius: 5px;
  background: var(--surface);
  height: 100%;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.understanding-card:hover {
  border-color: #9ab2a2;
}
.understanding-card > small {
  align-self: end;
  font-family: Georgia, serif;
  color: #8d9c8b;
  font-size: 12px;
  margin-bottom: 8px;
}
.understanding-card > strong {
  font-size: 15px;
  font-weight: 500;
}
.understanding-card > span {
  color: var(--muted);
  font-size: 11px;
}
.understanding-options input:checked + .understanding-card {
  border-color: var(--green);
  background: #e5ede0;
}
.understanding-options input:focus-visible + .understanding-card {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.feedback-fields {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
}
.feedback-fields .field {
  margin-bottom: 17px;
}
.feedback-fields textarea {
  min-height: 80px;
  font-size: 13px;
}
.feedback-fields select {
  font-size: 13px;
}
.feedback-fields .field > span {
  font-size: 12px;
}
.feedback-save {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.feedback-save .saved {
  margin: 0;
}
.feedback-save .button {
  font-size: 13px;
}
.lesson-next {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  margin-top: 35px;
}
.lesson-next > span {
  font-size: 12px;
  white-space: nowrap;
  color: var(--muted);
}
.lesson-next .text-button {
  text-align: right;
  font-size: 13px;
}
.study-workspace.reading-focus {
  position: fixed;
  inset: 0;
  z-index: 30;
  border: 0;
  border-radius: 0;
  overflow: auto;
  background: var(--surface);
}
.reading-focus .learning-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
}
.reading-focus .pdf-page {
  max-width: 1050px;
}
.reading-focus .video-stage {
  height: calc(100dvh - 160px);
  aspect-ratio: auto;
}
.reading-focus .video-stage video {
  max-height: 100%;
  height: 100%;
}
.reading-focus .pdf-pages {
  min-height: calc(100dvh - 140px);
}

/* ==========================================================================
   8. Teaching Workflows, Dialogs & Roster Management
   ========================================================================== */
.workflow-dialog {
  width: min(660px, calc(100% - 28px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  padding: 25px;
  box-shadow: 0 24px 90px rgba(21, 47, 53, 0.2);
}
.workflow-dialog::backdrop {
  background: rgba(24, 59, 53, 0.35);
  backdrop-filter: blur(3px);
}
.workflow-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.workflow-dialog h2 {
  font-size: 25px;
}
.workflow-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.workflow-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.workflow-status-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}
.workflow-check {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 12px;
  margin: 13px 0;
}
.workflow-check input {
  accent-color: var(--green);
  margin-top: 4px;
}
.workflow-dialog textarea {
  white-space: pre-wrap;
}
.roster-preview-list {
  max-height: 230px;
  overflow: auto;
  background: var(--paper);
  padding: 12px 15px;
  margin-bottom: 18px;
  font-size: 12px;
}
.roster-preview-list p {
  padding: 5px 0;
}
.roster-preview-list small {
  color: var(--green);
}
.people-summary {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.people-summary > div {
  padding: 17px 22px;
  background: var(--wash);
  border-radius: 6px;
  min-width: 150px;
}
.people-summary strong {
  display: block;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
}
.people-summary span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.people-filters {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.people-filters label {
  display: grid;
  grid-template-rows: 18px 42px;
  gap: 6px;
  line-height: 18px;
  font-size: 12px;
  color: var(--muted);
  min-width: 150px;
}
.people-filters .filter-select {
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  margin: 0;
}
.people-filters > .button {
  height: 42px;
  min-height: 42px;
  padding: 0 18px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.people-search {
  flex: 1;
}
.people-table {
  margin-top: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.people-table table {
  min-width: 600px;
}
.people-table .text-button {
  font-size: 12px;
  margin-right: 15px;
}
.student-message {
  padding: 16px;
  background: var(--wash);
  border-radius: 5px;
  margin-bottom: 15px;
  font-size: 13px;
}
.student-message strong {
  font-weight: 500;
}
.student-message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 8px;
}
.reply-note {
  padding: 13px 15px;
  margin: 12px 0;
  background: #f2f4ed;
  border-left: 3px solid #a6b99b;
  white-space: normal;
}
.reply-note header {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 11px;
}
.reply-note header strong {
  font-weight: 500;
  color: var(--green);
}
.reply-note time {
  font-size: 10px;
  color: var(--muted);
}
.reply-note p {
  margin: 7px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.student-replies {
  margin: 25px 0;
  padding: 23px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.student-replies > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.student-replies h3 {
  font-family: var(--display);
  font-size: 21px;
}
.student-replies > p {
  margin-top: 12px;
}
.bank-context-filters {
  display: flex;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--wash);
  border-radius: 6px;
  margin-bottom: 10px;
}
.bank-context-filters label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  min-width: 160px;
  flex: 1;
}
.bank-context-filters p {
  font-size: 11px;
  color: var(--muted);
  padding-bottom: 10px;
}
.bank-class-usage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 5px 0 13px;
  color: var(--muted);
  font-size: 11px;
}
.bank-class-usage .text-button {
  font-size: 11px;
  color: var(--green);
  white-space: nowrap;
}
.bank-use-warning {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--gold);
  line-height: 1.8;
}
.bank-use-warning:empty {
  display: none;
}

/* ==========================================================================
   9. Class Learning Report View (#report/{id})
   ========================================================================== */
.learning-report {
  min-width: 0;
  animation: report-enter 0.25s ease-out;
}
.report-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 23px;
  font-size: 11px;
  color: var(--muted);
}
.report-heading {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  border-bottom: 2px solid var(--green);
  padding-bottom: 25px;
  background: radial-gradient(ellipse at right top, rgba(232, 239, 231, 0.65), transparent 65%);
}
.report-heading > div:first-child {
  min-width: 0;
}
.report-heading h1 {
  font-size: 33px;
  margin: 8px 0 16px;
  letter-spacing: 1px;
  outline: none;
}
.report-heading h2 {
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.report-heading p:not(.eyebrow) {
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}
.report-heading p span {
  padding: 0 10px;
  color: #a6b2a7;
}
.report-heading .report-topic {
  font-size: 11px;
}
.report-actions {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
  align-items: start;
}
.report-actions .button {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 13px;
}
.report-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px 26px;
  padding: 15px 0 23px;
  font-size: 12px;
  color: var(--muted);
}
.report-context strong {
  color: var(--green);
  font-size: 16px;
  margin: 0 3px;
}
.report-context label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.report-context select {
  width: 155px;
  min-height: 38px;
  height: 38px;
  padding: 0 10px;
  font-size: 12px;
}
.report-context > .text-button {
  margin-left: auto;
  font-size: 12px;
  color: var(--green);
}
.report-status-note {
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: var(--gold-wash);
  font-size: 12px;
  margin-bottom: 18px;
}
.report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.report-metric {
  padding: 18px 18px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}
.report-metric > span {
  font-size: 12px;
  color: var(--muted);
}
.report-metric > strong {
  display: block;
  font: 36px/1.6 Georgia, serif;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}
.report-metric strong small {
  font: 11px var(--body);
  color: var(--muted);
  margin-left: 4px;
}
.report-metric p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.8;
}
.report-metric.attention {
  background: #fcf6ed;
  border-color: #e7d4b9;
}
.report-metric.attention > strong {
  color: var(--gold);
}
.learning-report progress {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--wash);
  accent-color: var(--green);
}
.learning-report progress::-webkit-progress-bar {
  background: var(--wash);
}
.learning-report progress::-webkit-progress-value {
  background: var(--green);
}
.learning-report progress::-moz-progress-bar {
  background: var(--green);
}
.learning-report .attention progress {
  accent-color: var(--gold);
}
.learning-report .attention progress::-webkit-progress-value {
  background: var(--gold);
}
.learning-report .attention progress::-moz-progress-bar {
  background: var(--gold);
}
.learning-report .neutral progress {
  accent-color: #a6b2a7;
}
.learning-report .neutral progress::-webkit-progress-value {
  background: #a6b2a7;
}
.learning-report .neutral progress::-moz-progress-bar {
  background: #a6b2a7;
}
.report-reading {
  padding: 21px 24px;
  background: #eaf0e7;
  border-radius: 6px;
  margin-bottom: 22px;
}
.report-reading > div:first-child,
.report-panel > header > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.report-section-number {
  font: italic 18px Georgia, serif;
  color: #7d9687;
}
.report-reading h2,
.report-panel h2 {
  font-family: var(--display);
  font-size: 20px;
}
.report-reading > p {
  font-size: 13px;
  line-height: 1.95;
  margin: 10px 0 13px;
  max-width: 850px;
}
.report-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 23px;
}
.report-shortcuts button {
  font-size: 11px;
  color: var(--green);
  background: transparent;
  border: 0;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.report-distributions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 22px;
}
.report-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 22px;
  min-width: 0;
  box-shadow: var(--shadow-sm);
}
.report-panel > header {
  margin-bottom: 22px;
}
.report-panel > header > p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 6px;
  min-height: 40px;
}
.report-bars {
  display: grid;
  gap: 19px;
}
.report-bar > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 8px;
}
.report-bar strong {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.report-bar small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.report-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 15px 0;
  line-height: 1.9;
}
.report-followup {
  margin-bottom: 22px;
}
.report-followup > header > p {
  min-height: 0;
}
.report-followup-list {
  display: grid;
  gap: 12px;
}
.report-student-note {
  padding: 16px 18px;
  background: #faf8f1;
  border: 1px solid #e9e2d4;
  border-radius: 5px;
}
.report-student-note header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.report-student-note header > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.report-student-note header strong {
  font-size: 14px;
  font-weight: 500;
}
.report-student-note header span:not(.badge) {
  font-size: 11px;
  color: var(--muted);
}
.report-student-note .button {
  font-size: 11px;
  min-height: 32px;
  white-space: nowrap;
}
.report-student-note > p {
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.report-student-note footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  color: var(--muted);
  font-size: 11px;
}
.report-students {
  scroll-margin-top: 20px;
}
.report-students > header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.report-student-search {
  width: 230px;
  max-width: 100%;
}
.report-student-search input {
  font-size: 12px;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
}
.report-students .dashboard-materials,
.report-students .paper-summary {
  display: none;
}
.report-students .dashboard-detail-head {
  padding: 0 0 16px;
}
.report-students .dashboard-detail-head h3 {
  font-family: var(--body);
  font-size: 13px;
}
.report-students .dashboard-detail-head p {
  font-size: 11px;
}
.report-students table {
  font-size: 12px;
  min-width: 680px;
}
.report-students .table-wrap {
  max-width: 100%;
}
.report-students td,
.report-students th {
  padding: 13px 9px;
}
.report-students .detail-body {
  font-size: 12px;
}
.report-definitions {
  padding: 20px 3px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.report-definitions strong {
  font-weight: 500;
  color: var(--ink);
}
.report-definitions p {
  margin-top: 5px;
}

@keyframes report-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   10. Responsive Breakpoints & Print Styles
   ========================================================================== */
@media (min-width: 1500px) {
  .dashboard-filters {
    grid-template-columns: 1fr 1fr 1fr 1.4fr auto;
    align-items: end;
  }
  .dashboard-filter-actions {
    grid-column: auto;
    border: 0;
    padding: 0;
    height: 42px;
    align-items: center;
  }
}

@media (min-width: 1100px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .main {
    padding-left: 45px;
    padding-right: 45px;
  }
}

@media (min-width: 1001px) {
  .main:has(.bank-heading) .topbar {
    margin-bottom: 18px;
    padding-bottom: 18px;
  }
  .bank-context-filters {
    padding: 0;
    background: transparent;
    gap: 15px;
    margin: 0 0 8px;
  }
  .bank-context-filters label {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
  }
  .bank-context-filters .filter-select {
    width: auto;
    flex: 1;
    min-width: 0;
    max-width: 220px;
    font-size: 12px;
    height: 36px;
    min-height: 36px;
    padding: 0 9px;
  }
  .bank-context-filters p {
    font-size: 10px;
    padding: 0;
    max-width: 190px;
  }
  .bank-class-usage {
    margin: 0 0 6px;
  }
}

@media (min-width: 1000px) {
  .student-main {
    padding-bottom: 35px;
  }
  .student-shell.is-studying .student-masthead {
    padding-top: 17px;
    padding-bottom: 17px;
  }
}

@media (max-width: 1200px) {
  .dashboard-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-search {
    grid-column: auto;
  }
  .dashboard-class-row {
    grid-template-columns: 105px minmax(80px, 1fr) 80px 75px 175px;
    gap: 10px;
    padding-right: 12px;
  }
  .dashboard-class-name {
    padding: 9px 12px;
  }
  .dashboard-class-actions {
    gap: 8px;
  }
  .dashboard-class-actions .text-button,
  .dashboard-class-actions a {
    font-size: 11px;
  }
  .dashboard-feedback {
    padding-left: 13px;
    gap: 7px;
  }
  .dashboard-needs {
    gap: 7px;
    padding: 6px;
  }
  .dashboard-card-head h2 {
    font-size: 22px;
  }
  .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-distributions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .report-distributions > .report-panel:last-child {
    grid-column: 1 / -1;
  }
  .report-heading {
    display: grid;
  }
  .report-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 175px minmax(0, 1fr);
  }
  .sidebar {
    padding: 28px 18px;
  }
  .main {
    padding: 25px;
  }
  .study-layout {
    grid-template-columns: 1fr;
  }
  .study-side {
    grid-template-columns: 1fr 1fr;
  }
  .upload-grid {
    grid-template-columns: 1fr;
  }
  .login {
    gap: 35px;
    padding: 35px;
  }
  .login-story h1 {
    font-size: 41px;
  }
  .student-masthead {
    padding: 20px 28px;
    gap: 36px;
  }
  .student-main {
    padding: 35px 28px 20px;
  }
  .student-footer {
    margin-left: 28px;
    margin-right: 28px;
  }
  .today-lesson.hero {
    grid-template-columns: 1fr 160px;
    padding: 30px;
  }
  .learning-feedback {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .feedback-intro > p:last-child {
    margin-top: 6px;
  }
  .feedback-intro h2 {
    font-size: 25px;
  }
  .feedback-intro .student-kicker {
    margin-bottom: 5px;
  }
}

@media (max-width: 850px) {
  .dashboard-heading {
    flex-wrap: wrap;
  }
  .dashboard-heading > .row {
    gap: 8px;
  }
  .dashboard-class-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 14px;
  }
  .dashboard-class-name {
    grid-column: 1 / -1;
    grid-row: 1;
    background: transparent;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .dashboard-class-name small {
    margin: 0;
    font-size: 9px;
  }
  .dashboard-class-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: flex-end;
    gap: 20px;
    border-top: 1px solid var(--line);
    padding-top: 5px;
  }
  .dashboard-progress {
    grid-column: 1;
    grid-row: 2;
  }
  .dashboard-feedback {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    gap: 0;
    padding-left: 16px;
  }
  .dashboard-needs {
    grid-column: 3;
    grid-row: 2;
    display: grid;
    gap: 0;
    padding: 4px 7px;
  }
  .dashboard-detail-head {
    align-items: start;
  }
  .dashboard-detail-head label {
    display: grid;
    gap: 5px;
  }
  .dashboard-detail-head p {
    max-width: 230px;
    line-height: 1.9;
  }
  .dashboard-details {
    padding: 16px 15px 6px;
  }
  .dashboard-list-head {
    align-items: start;
  }
  .dashboard-list-head p span {
    display: block;
    margin-top: 3px;
  }
}

@media (max-width: 640px) {
  .shell {
    display: block;
  }
  .sidebar {
    padding: 14px 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-bottom: 1px solid var(--line);
    gap: 10px;
    background: var(--paper);
  }
  .sidebar .brand {
    gap: 5px;
  }
  .sidebar .brand-mark {
    width: 27px;
    height: 33px;
    font-size: 18px;
  }
  .sidebar .brand strong {
    font-size: 18px;
  }
  .brand small {
    display: none;
  }
  .sidebar .nav {
    display: flex;
    gap: 1px;
  }
  .sidebar .nav button {
    padding: 8px 5px;
    font-size: 10px;
  }
  .nav button span,
  .sidebar-foot {
    display: none;
  }
  .main {
    padding: 18px 20px 30px;
  }
  .topbar {
    margin-bottom: 25px;
    padding-bottom: 16px;
    font-size: 11px;
    align-items: start;
  }
  .topbar > .muted {
    max-width: 100px;
  }
  .account {
    gap: 8px;
    font-size: 12px;
  }
  .account .muted,
  .avatar {
    display: none;
  }
  .account .text-button {
    font-size: 11px;
  }
  .page-head {
    align-items: start;
  }
  .page-head h1 {
    font-size: 30px;
  }
  .page-head .date-stamp {
    font-size: 18px;
  }
  .hero {
    padding: 24px;
  }
  .hero h2 {
    font-size: 24px;
  }
  .hero:after {
    right: -100px;
  }
  .study-side,
  .form-grid,
  .upload-modes,
  .split-options,
  .split-setting,
  .split-result-grid,
  #separate-upload {
    grid-template-columns: 1fr;
  }
  .upload-modes,
  .split-options {
    display: grid;
  }
  .full {
    grid-column: auto;
  }
  .panel {
    padding: 20px;
  }
  .stat {
    padding-right: 8px;
    padding-left: 12px;
  }
  .stat b {
    font-size: 29px;
  }
  .stat > span {
    font-size: 12px;
  }
  .stat small {
    font-size: 10px;
  }
  .tabs {
    gap: 17px;
  }
  .tabs button {
    font-size: 13px;
  }
  .login {
    display: block;
    min-height: 0;
    padding: 28px 22px;
  }
  .login-story h1 {
    font-size: 35px;
    line-height: 1.3;
    margin: 25px 0 14px;
  }
  .login-story p {
    font-size: 12px;
  }
  .login-art {
    display: none;
  }
  .login-panel {
    margin-top: 25px;
    padding: 23px;
  }
  .login-panel > p {
    font-size: 12px;
  }
  .login-note {
    line-height: 1.8;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
  .filter-row label {
    min-width: 0;
    max-width: none !important;
    width: 100%;
    flex: auto;
  }
  .row .button {
    max-width: 100%;
  }
  .badge {
    white-space: normal;
  }
  .split-header {
    align-items: start;
  }
  .combined-drop {
    padding: 22px 14px;
  }
  .combined-drop strong {
    font-size: 22px;
  }
  .split-page-preview {
    margin-left: 0;
    margin-right: 0;
  }
  .split-result-grid img {
    height: 330px;
  }
  .split-divider span {
    font-size: 11px;
  }

  /* Teacher Dashboard Mobile */
  .dashboard-heading {
    gap: 12px;
    align-items: center;
  }
  .dashboard-heading h1 {
    font-size: 28px;
  }
  .dashboard-heading .eyebrow {
    font-size: 9px;
    letter-spacing: 1px;
  }
  .dashboard-heading p {
    font-size: 11px;
    max-width: 175px;
    line-height: 1.8;
  }
  .dashboard-heading > .button {
    font-size: 11px;
    padding: 8px 10px;
    min-height: 37px;
    white-space: nowrap;
  }
  .dashboard-filters {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 15px;
    gap: 13px;
  }
  .dashboard-filters > label {
    font-size: 11px;
    grid-template-rows: 18px 42px;
  }
  .dashboard-filters .filter-select {
    font-size: 13px;
    padding: 0 9px;
    min-height: 42px;
    width: 100%;
  }
  .dashboard-search {
    grid-column: auto;
  }
  .dashboard-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 22px;
    padding-top: 12px;
  }
  .dashboard-filter-actions .button {
    height: 36px;
    min-height: 36px;
    font-size: 11px;
  }
  .dashboard-list-head {
    padding: 19px 0 12px;
    gap: 8px;
    font-size: 12px;
  }
  .dashboard-list-head p span {
    font-size: 10px;
  }
  .dashboard-list-head label {
    display: grid;
    gap: 0;
    text-align: right;
    font-size: 10px;
  }
  .dashboard-list-head select {
    font-size: 10px;
    max-width: 130px;
  }
  .dashboard-cards {
    gap: 15px;
  }
  .dashboard-card-head {
    padding: 17px 15px 14px;
    align-items: start;
    gap: 10px;
  }
  .dashboard-card-head h2 {
    font-size: 19px;
    margin-top: 7px;
  }
  .dashboard-card-head p {
    font-size: 10px;
  }
  .dashboard-card-head > .button {
    font-size: 10px;
    min-height: 30px;
    padding: 5px 8px;
  }
  .dashboard-card-meta {
    font-size: 10px;
    gap: 7px;
  }
  .dashboard-card-meta span {
    padding-left: 7px;
  }
  .dashboard-class-list {
    padding: 0 9px 9px;
    gap: 7px;
  }
  .dashboard-class-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(85px, 1.1fr);
    gap: 10px;
    padding: 12px 10px;
  }
  .dashboard-class-name {
    display: grid;
    gap: 1px;
  }
  .dashboard-class-name strong {
    font-size: 13px;
  }
  .dashboard-class-name small {
    font-size: 9px;
    line-height: 1.5;
  }
  .dashboard-class-actions {
    gap: 0 7px;
    font-size: 10px;
  }
  .dashboard-class-actions .text-button,
  .dashboard-class-actions a,
  .dashboard-class-actions .class-manage {
    font-size: 11px;
    white-space: nowrap;
  }
  .dashboard-progress span,
  .dashboard-feedback > span,
  .dashboard-needs > span {
    font-size: 10px;
  }
  .dashboard-progress strong,
  .dashboard-feedback strong,
  .dashboard-needs strong {
    font-size: 15px;
  }
  .dashboard-progress > div {
    display: grid;
    gap: 0;
    margin-bottom: 5px;
  }
  .dashboard-progress strong small,
  .dashboard-feedback strong small,
  .dashboard-needs strong small {
    font-size: 10px;
  }
  .dashboard-feedback {
    padding-left: 12px;
    align-self: stretch;
    align-content: center;
  }
  .dashboard-needs {
    padding: 3px 5px;
    align-self: stretch;
  }
  .dashboard-details {
    padding: 14px 10px 4px;
  }
  .dashboard-detail-head {
    display: grid;
    gap: 11px;
  }
  .dashboard-detail-head h3 {
    font-size: 17px;
  }
  .dashboard-detail-head p {
    font-size: 10px;
    max-width: none;
  }
  .dashboard-detail-head label {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
  }
  .dashboard-detail-head select {
    width: 155px;
    min-height: 34px;
    font-size: 11px;
  }
  .dashboard-materials {
    gap: 8px 15px;
    margin: 10px 0;
    font-size: 10px;
  }
  .dashboard-materials .text-button {
    font-size: 10px;
  }
  .paper-summary {
    font-size: 10px;
    gap: 8px 12px;
    padding: 9px;
  }
  .dashboard-note {
    font-size: 10px;
    padding-top: 16px;
  }
  .dashboard-details td,
  .dashboard-details th {
    padding: 11px 8px;
  }

  /* Student Mobile */
  .student-masthead {
    padding: 15px 18px;
    gap: 18px;
    flex-wrap: wrap;
  }
  .student-brand .brand-mark {
    width: 29px;
    height: 34px;
    font-size: 21px;
  }
  .student-brand .brand strong {
    font-size: 20px;
  }
  .student-masthead .brand small {
    display: none;
  }
  .student-masthead nav {
    order: 3;
    width: 100%;
    gap: 28px;
    margin: 0 0 -15px;
  }
  .student-masthead nav button {
    font-size: 13px;
    padding: 7px 0 13px;
  }
  .student-account {
    font-size: 11px;
    gap: 6px 10px;
  }
  .student-account .text-button {
    font-size: 11px;
  }
  .student-main {
    padding: 28px 18px 15px;
  }
  .student-welcome {
    gap: 15px;
    align-items: start;
    margin-bottom: 26px;
  }
  .student-welcome h1 {
    font-size: 28px;
    line-height: 1.5;
    max-width: 250px;
    letter-spacing: 0;
  }
  .student-welcome p:last-child {
    font-size: 12px;
    max-width: 230px;
    line-height: 1.8;
    margin-top: 7px;
  }
  .student-welcome time {
    font-size: 26px;
    margin-top: 3px;
  }
  .student-welcome time span {
    font-size: 10px;
    letter-spacing: 2px;
  }
  .student-kicker {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .today-lesson.hero {
    display: block;
    padding: 26px 22px;
    margin-bottom: 32px;
  }
  .today-lesson.hero h2 {
    font-size: 28px;
    margin: 23px 0 12px;
    line-height: 1.5;
  }
  .today-lesson.hero .today-topic {
    font-size: 12px;
    line-height: 1.8;
  }
  .today-aside {
    display: none;
  }
  .today-actions {
    gap: 19px;
    margin-top: 24px;
    align-items: start;
    flex-direction: column;
  }
  .today-lesson.hero .button {
    width: 100%;
    font-size: 14px;
    justify-content: space-between;
    padding: 12px 17px;
  }
  .today-lesson .text-button {
    font-size: 12px;
    padding: 0;
  }
  .journal-heading h2 {
    font-size: 25px;
  }
  .journal-heading > span {
    font-size: 10px;
    max-width: 95px;
    text-align: right;
  }
  .journal-row {
    grid-template-columns: 49px minmax(0, 1fr);
    gap: 14px;
    padding: 21px 0;
    position: relative;
  }
  .journal-date {
    align-self: start;
    padding-top: 3px;
  }
  .journal-date strong {
    font-size: 19px;
  }
  .journal-date span {
    font-size: 10px;
  }
  .journal-info h3 {
    font-size: 21px;
    line-height: 1.5;
  }
  .journal-info > p {
    line-height: 1.8;
    font-size: 11px;
  }
  .journal-info .meta {
    gap: 8px;
    font-size: 10px;
  }
  .journal-row > .button {
    grid-column: 2;
    justify-self: start;
    font-size: 12px;
    padding: 7px 15px;
    min-height: 36px;
  }
  .journal-filters {
    gap: 7px;
  }
  .journal-filters button {
    font-size: 12px;
    padding: 7px 12px;
  }
  .student-footer {
    margin: 25px 18px 0;
    padding: 20px 0;
    font-size: 10px;
  }
  .is-studying .student-main {
    padding: 14px 14px 20px;
  }
  .is-studying .student-masthead {
    flex-wrap: nowrap;
    gap: 12px;
    padding: 12px 16px;
  }
  .is-studying .student-masthead nav {
    display: none;
  }
  .study-topline {
    font-size: 11px;
    margin-bottom: 13px;
    gap: 10px;
  }
  .study-topline .text-button {
    font-size: 11px;
  }
  .lesson-heading {
    display: block;
    margin-bottom: 16px;
  }
  .lesson-heading h1 {
    font-size: 27px;
    line-height: 1.4;
  }
  .lesson-heading .student-kicker {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .lesson-heading-actions {
    display: none;
  }
  .learning-toolbar {
    padding: 0 13px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .learning-tabs.tabs {
    gap: 20px;
    flex: 1;
  }
  .learning-tabs.tabs button {
    font-size: 13px;
    padding: 14px 0;
  }
  .learning-toolbar-actions {
    gap: 10px;
  }
  .split-toggle {
    font-size: 11px;
  }
  .focus-toggle {
    font-size: 0;
    line-height: 1;
  }
  .focus-toggle:after {
    content: '⤢';
    font-size: 21px;
    color: var(--green);
  }
  .focus-toggle[aria-pressed="true"]:after {
    content: '×';
  }
  .tab-pending {
    display: block;
    font-size: 9px;
    margin: 0;
    line-height: 1.3;
  }
  .video-stage {
    min-height: 0;
  }
  .video-stage video {
    max-height: none;
  }
  .video-chapters {
    padding: 0 12px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .video-chapters button,
  .video-chapters button:first-child,
  .video-chapters button:last-child {
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    gap: 12px;
  }
  .video-chapters button:last-child {
    border: 0;
  }
  .video-chapters time {
    font-size: 12px;
  }
  .video-chapters b {
    font-size: 13px;
  }
  .video-caption {
    padding: 12px;
    gap: 12px;
    align-items: start;
  }
  .video-caption strong {
    font-size: 12px;
  }
  .video-caption div > span {
    font-size: 10px;
    max-width: 210px;
  }
  .video-caption > span {
    font-size: 10px;
    padding-top: 2px;
  }
  .reading-toolbar {
    padding: 10px 12px;
    gap: 10px;
    align-items: center;
    font-size: 11px;
  }
  .reading-toolbar small {
    font-size: 10px;
    margin-left: 5px;
  }
  .reading-toolbar > div {
    gap: 12px;
  }
  .reading-toolbar .text-button,
  .reading-toolbar a {
    font-size: 10px;
  }
  .pdf-pages {
    padding: 10px 0;
    background: #e9ece4;
  }
  .pdf-page {
    margin-bottom: 12px;
    box-shadow: none;
  }
  .pdf-page figcaption {
    padding: 7px 12px;
    font-size: 10px;
  }
  .pdf-pages.zoomed .pdf-page {
    min-width: 760px;
  }
  .reading-help {
    padding: 11px 12px;
    font-size: 10px;
    line-height: 1.8;
  }
  .student-question-card {
    padding: 19px 17px;
  }
  .question-reading .bank-native-question {
    font-size: 15px;
    line-height: 2;
  }
  .question-reading.text-enlarged .bank-native-question {
    font-size: 19px;
  }
  .question-reading .native-figure img {
    max-height: 240px;
  }
  .lesson-note {
    font-size: 12px;
    margin-top: 13px;
  }
  .lesson-note summary {
    padding: 11px 13px;
  }
  .lesson-note p {
    padding: 0 13px 15px;
    font-size: 11px;
  }
  .learning-feedback {
    margin-top: 31px;
    padding-top: 25px;
    gap: 19px;
  }
  .feedback-intro h2 {
    font-size: 25px;
  }
  .feedback-intro > p:last-child {
    font-size: 12px;
  }
  .understanding-options {
    gap: 7px;
    margin-bottom: 19px;
  }
  .understanding-card {
    padding: 12px 9px 14px;
    gap: 5px;
  }
  .understanding-card > strong {
    font-size: 13px;
    white-space: nowrap;
  }
  .understanding-card > span {
    font-size: 10px;
    line-height: 1.7;
  }
  .understanding-card > small {
    font-size: 11px;
  }
  .understanding-options input {
    left: 9px;
    top: 12px;
    width: 14px;
    height: 14px;
  }
  .feedback-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .feedback-fields select,
  .feedback-fields textarea {
    font-size: 16px;
  }
  .feedback-fields .field > span {
    font-size: 12px;
  }
  .feedback-fields textarea {
    min-height: 90px;
  }
  .feedback-save {
    gap: 12px;
  }
  .feedback-save .button {
    width: 100%;
    justify-content: space-between;
    padding: 11px 15px;
    font-size: 14px;
  }
  .feedback-save .saved {
    font-size: 11px;
  }
  .material-empty {
    padding: 42px 18px;
  }
  .material-empty h2 {
    font-size: 23px;
  }
  .material-empty p {
    font-size: 12px;
  }
  .reading-loading {
    padding: 50px 15px;
  }
  .preview-note {
    font-size: 11px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .preview-note .text-button {
    font-size: 11px;
  }
  .reading-focus .learning-toolbar {
    flex-wrap: nowrap;
  }
  .reading-focus .video-stage {
    height: calc(100dvh - 145px);
  }
  .student-replies {
    padding: 17px;
    margin-top: 20px;
  }
  .student-replies h3 {
    font-size: 19px;
  }
  .reply-note {
    padding: 11px;
  }
  .reply-note p {
    font-size: 12px;
  }

  /* Workflows & People Mobile */
  .workflow-dialog {
    padding: 19px 16px;
    width: calc(100% - 20px);
    max-height: 92dvh;
  }
  .workflow-dialog h2 {
    font-size: 22px;
  }
  .workflow-dialog .field input,
  .workflow-dialog .field textarea,
  .workflow-dialog .field select {
    font-size: 16px;
  }
  .workflow-dialog .form-grid {
    gap: 0;
  }
  .workflow-footer .button {
    font-size: 12px;
    flex: 1;
  }
  .workflow-status-actions .button {
    font-size: 11px;
  }
  .people-summary {
    gap: 9px;
  }
  .people-summary > div {
    min-width: 0;
    flex: 1;
    padding: 14px;
  }
  .people-summary strong {
    font-size: 18px;
  }
  .people-summary span {
    font-size: 10px;
  }
  .people-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
  .people-filters label {
    min-width: 0;
  }
  .people-search {
    grid-column: 1 / -1;
  }
  .people-filters > .button {
    grid-column: 1 / -1;
    justify-self: start;
    font-size: 12px;
  }
  .people-table {
    max-width: 100%;
  }
  .people-table table {
    font-size: 12px;
  }
  .people-table .text-button {
    font-size: 11px;
  }
  .bank-context-filters {
    padding: 12px;
    gap: 10px;
  }
  .bank-context-filters label {
    min-width: 0;
    flex-basis: calc(50% - 10px);
  }
  .bank-context-filters select {
    max-width: 100%;
    font-size: 12px;
  }
  .bank-context-filters p {
    padding: 0;
    flex-basis: 100%;
    font-size: 10px;
  }
  .bank-class-usage {
    font-size: 10px;
    gap: 8px;
  }
  .bank-class-usage .text-button {
    font-size: 10px;
  }
  .bank-use-warning {
    font-size: 10px;
  }

  /* Report Mobile */
  .report-topline {
    align-items: start;
    gap: 12px;
    font-size: 10px;
  }
  .report-topline > span {
    max-width: 120px;
    text-align: right;
  }
  .report-topline .text-button {
    font-size: 12px;
  }
  .report-heading {
    gap: 16px;
    padding-bottom: 20px;
  }
  .report-heading h1 {
    font-size: 28px;
  }
  .report-heading h2 {
    font-size: 18px;
  }
  .report-heading p:not(.eyebrow) {
    font-size: 11px;
  }
  .report-heading p span {
    padding: 0 5px;
  }
  .report-context {
    gap: 10px 18px;
    padding-bottom: 18px;
    font-size: 11px;
  }
  .report-context > .text-button {
    margin: 0;
    font-size: 11px;
  }
  .report-context select {
    width: 135px;
  }
  .report-metrics {
    gap: 9px;
  }
  .report-metric {
    padding: 13px 12px;
  }
  .report-metric > strong {
    font-size: 29px;
  }
  .report-metric > span {
    font-size: 11px;
  }
  .report-metric strong small {
    font-size: 9px;
  }
  .report-metric p {
    font-size: 10px;
  }
  .report-reading {
    padding: 17px;
  }
  .report-reading h2,
  .report-panel h2 {
    font-size: 18px;
  }
  .report-reading > p {
    font-size: 12px;
  }
  .report-shortcuts {
    gap: 7px 17px;
  }
  .report-distributions {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .report-panel {
    padding: 17px;
  }
  .report-panel > header > p {
    min-height: 0;
  }
  .report-bars {
    gap: 17px;
  }
  .report-student-note {
    padding: 13px;
  }
  .report-student-note header {
    align-items: start;
  }
  .report-student-note header > div {
    gap: 7px;
  }
  .report-student-note > p {
    font-size: 12px;
  }
  .report-student-note footer {
    gap: 6px 13px;
    font-size: 10px;
  }
  .report-students > header {
    gap: 12px;
  }
  .report-student-search {
    width: 100%;
  }
  .report-student-search input {
    font-size: 16px;
  }
  .report-students .dashboard-detail-head {
    display: grid;
    gap: 12px;
  }
  .report-students .dashboard-detail-head label {
    display: flex;
    justify-content: space-between;
  }
  .report-students .dashboard-detail-head p {
    max-width: none;
    font-size: 10px;
  }
  .report-definitions {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .main,
  .login-panel {
    animation: arrive 0.28s ease-out;
  }
  .student-welcome,
  .lesson-heading {
    animation: arrive 0.3s ease-out;
  }
  .today-lesson {
    animation: arrive 0.45s ease-out;
  }
  .journal-section {
    animation: arrive 0.55s ease-out;
  }
  @keyframes arrive {
    from {
      opacity: 0;
      transform: translateY(7px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .learning-report {
    animation: none;
  }
}

@media print {
  body:has(.learning-report) {
    background: white;
    color: #182d28;
    font-size: 10pt;
  }
  body:has(.learning-report) .shell {
    display: block;
    max-width: none;
  }
  body:has(.learning-report) .sidebar,
  body:has(.learning-report) .topbar,
  body:has(.learning-report) .footer,
  .learning-report .report-topline,
  .learning-report .report-actions,
  .learning-report .report-context label,
  .learning-report .report-context button,
  .learning-report .report-shortcuts,
  .learning-report .report-student-search,
  .learning-report .dashboard-detail-head label,
  .learning-report button,
  .learning-report .detail-row {
    display: none !important;
  }
  body:has(.learning-report) .main {
    padding: 0;
  }
  .learning-report {
    animation: none;
  }
  .report-heading {
    display: block;
    background: none;
  }
  .report-heading h1 {
    font-size: 24pt;
  }
  .report-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .report-metric {
    padding: 10px;
  }
  .report-metric > strong {
    font-size: 24pt;
  }
  .report-distributions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .report-distributions > .report-panel:last-child {
    grid-column: auto;
  }
  .report-panel {
    padding: 12px;
  }
  .report-panel h2,
  .report-reading h2 {
    font-size: 14pt;
  }
  .report-panel > header > p {
    font-size: 8pt;
  }
  .report-bar > div {
    font-size: 8pt;
  }
  .report-bar small {
    font-size: 7pt;
  }
  .report-bar strong {
    font-size: 10pt;
  }
  .report-metric,
  .report-panel,
  .report-reading,
  .report-student-note {
    break-inside: avoid;
  }
  .report-students,
  .report-followup {
    break-inside: auto;
  }
  .report-students .table-wrap {
    overflow: visible;
  }
  .report-students table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
    font-size: 8pt;
  }
  .report-students td,
  .report-students th {
    padding: 8px 4px;
    overflow-wrap: anywhere;
  }
  .report-students small {
    font-size: 7pt;
  }
  .report-students th:last-child,
  .report-students tr:not(.detail-row) td:last-child {
    display: none;
  }
  .report-students thead {
    display: table-header-group;
  }
  .report-students tr {
    break-inside: avoid;
  }
  .report-student-note header {
    display: flex;
  }
  .report-students .badge {
    font-size: 8pt;
    padding: 2px 4px;
  }
  .report-definitions {
    font-size: 8pt;
  }
  .report-followup {
    break-inside: avoid;
  }
  .report-panel > header,
  .report-reading > div:first-child {
    break-after: avoid;
  }
}

/* Active Video Chapter & Student Reply Banner */
.video-chapters button.is-current {
  background: #e9f0e6;
  border-color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
}
.video-chapters button.is-current span {
  font-weight: 600;
  color: var(--green);
}
.student-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 22px;
  background: #fdf6ec;
  border: 1px solid #e3c49a;
  border-left: 4px solid #b86a1b;
}
.student-reply-banner > div {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
}

/* Student Longitudinal Profile Modal */
.student-profile-trigger {
  all: unset;
  cursor: pointer;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px dashed #9eb0a0;
}
.student-profile-trigger:hover,
.student-profile-trigger:focus-visible {
  color: var(--green);
  border-bottom-style: solid;
}
.profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}
.profile-metric {
  padding: 12px 14px;
  background: #f5f6f0;
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.profile-metric.attention {
  background: #fdf5ee;
  border-color: #e4c3a3;
}
.profile-metric span {
  font-size: 11px;
  color: var(--muted);
}
.profile-metric strong {
  font-family: var(--display);
  font-size: 22px;
  color: var(--green);
}
.profile-metric strong small {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.profile-timeline {
  display: grid;
  gap: 10px;
  max-height: 52dvh;
  overflow-y: auto;
  padding-right: 4px;
}
.profile-lesson-row {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  display: grid;
  gap: 6px;
}
.profile-lesson-row > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-lesson-row > header strong {
  display: block;
  font-size: 14px;
}
.profile-lesson-row > header span {
  font-size: 11px;
  color: var(--muted);
}
.profile-feedback-note {
  padding: 8px 10px;
  background: #f6f7f1;
  border-left: 2px solid var(--green);
  font-size: 12px;
}
@media (max-width: 640px) {
  .profile-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .student-reply-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* High-Resolution Figure Lightbox */
.image-lightbox {
  width: min(94vw, 1360px);
  max-height: 92dvh;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #141c18;
  color: #f3f6f2;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}
.image-lightbox::backdrop {
  background: rgba(12, 18, 15, 0.78);
  backdrop-filter: blur(4px);
}
.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  background: #1b2621;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}
.lightbox-toolbar strong {
  font-size: 13px;
  font-weight: 500;
  color: #e6ede7;
}
.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.lightbox-controls .button {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f6f2;
  border-color: rgba(255, 255, 255, 0.2);
}
.lightbox-controls .button.primary {
  background: var(--green);
  border-color: var(--green);
}
.lightbox-stage {
  height: min(78dvh, 820px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.lightbox-stage:active {
  cursor: grabbing;
}
.lightbox-stage img {
  max-width: 94%;
  max-height: 94%;
  object-fit: contain;
  transition: transform 0.06s ease-out;
  transform-origin: center center;
}
.native-figure a,
.solution-figures a {
  cursor: zoom-in;
}

/* Student Contextual Ask, Journal Search & Trace Tags */
.journal-filters {
  flex-wrap: wrap;
  align-items: center;
}
.journal-search {
  margin-left: auto;
  flex: 0 1 240px;
  min-width: 0;
}
.journal-search input {
  width: 100%;
  height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}
.journal-trace-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(31, 78, 61, 0.08);
  color: var(--green);
  font-size: 11px;
  font-weight: 500;
}
.video-caption-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.video-caption-meta > span {
  font-size: 12px;
  color: var(--green);
  white-space: nowrap;
}
.ask-context-btn {
  font-size: 12px;
  color: var(--green);
  white-space: nowrap;
  padding: 3px 9px;
  border: 1px solid rgba(31, 78, 61, 0.25);
  border-radius: 999px;
  background: rgba(31, 78, 61, 0.04);
}
.ask-context-btn:hover {
  background: rgba(31, 78, 61, 0.1);
}
.solution-card > header {
  flex-wrap: wrap;
}
.solution-card > header .ask-context-btn {
  margin-left: auto;
}
@media (max-width: 640px) {
  .journal-search {
    flex: 1 1 100%;
    margin-left: 0;
  }
  .journal-search input {
    font-size: 16px;
  }
  .video-caption {
    flex-wrap: wrap;
  }
  .video-caption-meta {
    gap: 8px;
  }
  .video-caption-meta > span,
  .ask-context-btn {
    font-size: 11px;
  }
}

/* 手机登录页：保持信息层级，同时减少首屏滚动和误触。 */
@media(max-width:640px){
  body:has(.login){background:linear-gradient(180deg,#f7f6f0 0%,#f3f6f0 100%)}
  .login{width:100%;padding:max(20px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));}
  .login-story{padding:0 4px}
  .login-story .brand{margin-bottom:22px}
  .login-story h1{font-size:clamp(29px,8.7vw,36px);letter-spacing:1px;line-height:1.25;margin:0 0 10px}
  .login-story p{font-size:13px;line-height:1.75;max-width:30em}
  .login-panel{margin-top:20px;padding:22px 18px 20px;border-radius:10px;box-shadow:0 8px 24px #183f2912}
  .login-panel h2{font-size:24px;line-height:1.35}
  .login-panel>p{margin-bottom:20px;font-size:13px}
  .login-panel .field{margin-bottom:14px}
  .login-panel .field>span{font-size:14px}
  .login-panel .field input{height:52px;padding:10px 13px;border-radius:7px}
  .login-panel .button.primary{height:52px;margin-top:7px;border-radius:7px;font-size:16px}
  .demo-row{gap:9px;margin-top:16px}
  .demo-row button{min-height:46px;padding:8px 9px;font-size:12px;line-height:1.4;border-radius:7px}
  .login-note{margin-top:13px;font-size:11px;line-height:1.65}
}
@media(max-width:360px){
  .login{padding-left:14px;padding-right:14px}
  .login-story p{font-size:12px}
  .login-panel{padding-left:15px;padding-right:15px}
  .demo-row{display:grid;grid-template-columns:1fr}
}
