:root {
  color-scheme: light;
  --canvas: #f6f7f2;
  --surface: #ffffff;
  --surface-muted: #edf0e8;
  --ink: #20241f;
  --muted: #687066;
  --line: #d7ddd2;
  --green: #1f6f55;
  --green-dark: #155240;
  --green-soft: #dcebe4;
  --blue: #295f9b;
  --blue-soft: #e3edf8;
  --amber: #9a650c;
  --amber-soft: #fff0c9;
  --coral: #a84531;
  --coral-soft: #f7e3dd;
  --danger: #9f332b;
  --radius: 8px;
  --content: 760px;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
}

.auth-shell {
  min-height: 100dvh;
  background: var(--canvas);
}

.auth-brand {
  display: flex;
  min-height: 64px;
  padding: 12px 24px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.auth-main {
  display: grid;
  width: min(calc(100% - 48px), 512px);
  min-height: calc(100dvh - 64px);
  margin: 0 auto;
  padding: 48px 0;
  align-items: start;
}

.auth-panel {
  min-width: 0;
  padding: 32px 0;
  border-top: 4px solid var(--green);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.auth-panel h1 {
  margin-bottom: 12px;
}

.auth-lede {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.75;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
}

.auth-form input:focus {
  border-color: var(--blue);
}

.auth-note,
.auth-message {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-message:not(:empty) {
  padding: 10px 12px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}

.auth-message.is-error {
  border-left-color: var(--danger);
  color: var(--danger);
  background: var(--coral-soft);
}

.auth-actions {
  margin-top: 16px;
}

.auth-loading {
  display: grid;
  gap: 14px;
  color: var(--muted);
}

.auth-loading p {
  margin: 0;
}

.loading-line {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 3px;
  background: var(--line);
}

.loading-line::after {
  display: block;
  width: 35%;
  height: 100%;
  background: var(--green);
  animation: loading-slide 1.2s ease-in-out infinite alternate;
  content: "";
}

.account-email {
  display: block;
  overflow: hidden;
  max-width: 160px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes loading-slide {
  from { transform: translateX(0); }
  to { transform: translateX(185%); }
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(41, 95, 155, 0.28);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100dvh;
  padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 14px;
}

.brand-copy small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main {
  width: min(100%, calc(var(--content) + 48px));
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.page-header {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.editorial-index {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 2px;
  border-top: 4px solid var(--green);
}

.editorial-index span {
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.editorial-index small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.page-header-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 16px;
  font-size: 22px;
  line-height: 1.4;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.45;
}

.lede,
.muted {
  color: var(--muted);
}

.lede {
  max-width: 620px;
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.75;
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
}

.section {
  margin-top: 32px;
}

.section-title-row,
.row-between {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.section-title-row h2,
.section-title-row h3 {
  margin-bottom: 0;
}

.panel,
.lesson-card,
.knowledge-card,
.question-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel {
  padding: 24px;
}

.panel + .panel {
  margin-top: 16px;
}

.today-panel {
  padding: 24px 0;
  border-width: 3px 0 1px;
  border-radius: 0;
  background: transparent;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0;
}

.stat {
  min-height: 80px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.stat strong {
  display: block;
  margin-bottom: 3px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  overflow: hidden;
  height: 4px;
  border-radius: 2px;
  background: #e2e6de;
}

.progress-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--green);
  transition: width 180ms ease;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 10px 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.button:hover {
  border-color: var(--green);
}

.button.primary {
  color: #fff;
  background: var(--green);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.button.secondary:hover {
  border-color: #aeb8aa;
  background: var(--surface-muted);
}

.button.ghost {
  min-height: 38px;
  padding: 7px 10px;
  border-color: transparent;
  color: var(--green-dark);
  background: transparent;
}

.button.danger {
  border-color: #e5b9b4;
  color: var(--danger);
  background: #fff;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: var(--surface);
  font-size: 19px;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.icon-button.is-active {
  border-color: #e4bd69;
  color: var(--amber);
  background: var(--amber-soft);
}

.lesson-list {
  display: grid;
  gap: 8px;
}

.lesson-card {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  padding: 16px 16px 16px 0;
  align-items: center;
  border-width: 0 0 1px;
  border-radius: 0;
}

.lesson-card.is-current {
  border-color: var(--green);
  background: transparent;
}

.lesson-card.is-locked {
  opacity: 0.62;
}

.lesson-index {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 4px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 800;
}

.lesson-card h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.lesson-meta {
  color: var(--muted);
  font-size: 12px;
}

.status-badge,
.tag {
  display: inline-flex;
  min-height: 24px;
  padding: 4px 8px;
  align-items: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.done {
  color: var(--green-dark);
  background: var(--green-soft);
}

.status-badge.active {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-badge.locked {
  color: var(--muted);
  background: var(--surface-muted);
}

.tag.source {
  color: var(--coral);
  background: var(--coral-soft);
}

.tag.ai {
  color: var(--blue);
  background: var(--blue-soft);
}

.tag.extend {
  color: var(--amber);
  background: var(--amber-soft);
}

.tag.question {
  color: var(--green-dark);
  background: var(--green-soft);
}

.study-shell {
  max-width: var(--content);
  margin: 0 auto;
}

.study-head {
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
}

.study-title-grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.study-number {
  padding-top: 8px;
  border-top: 4px solid var(--green);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
}

.study-title-copy {
  min-width: 0;
}

.study-progress {
  margin-top: 14px;
}

.stage-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.stage-item {
  min-height: 38px;
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.stage-item.is-active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.stage-item.is-done {
  color: var(--green-dark);
  background: var(--green-soft);
}

.story-block {
  padding: 24px;
  border-left: 4px solid var(--amber);
  background: var(--surface);
}

.story-block .scenario-label {
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.story-block blockquote {
  margin: 16px 0 24px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.7;
}

.knowledge-card {
  padding: 24px;
  border-top-width: 4px;
}

.knowledge-card.is-source {
  border-top-color: var(--coral);
}

.knowledge-card.is-ai {
  border-top-color: var(--blue);
}

.knowledge-card.is-extend {
  border-top-color: var(--amber);
}

.knowledge-card-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.knowledge-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.knowledge-sequence {
  padding-top: 2px;
  color: var(--muted);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.knowledge-card-header h2 {
  margin: 8px 0 0;
  font-size: 23px;
}

.knowledge-body {
  font-size: 17px;
  line-height: 1.75;
}

.knowledge-body p:last-child,
.knowledge-body ul:last-child,
.knowledge-body ol:last-child {
  margin-bottom: 0;
}

.knowledge-body ul,
.knowledge-body ol,
.answer-box ul,
.answer-box ol {
  padding-left: 21px;
}

.knowledge-body li,
.answer-box li {
  margin: 7px 0;
}

.formula {
  margin: 16px 0;
  padding: 16px;
  border: 1px solid #adc7b8;
  border-left: 4px solid var(--green);
  border-radius: 4px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 17px;
  font-weight: 700;
  text-align: left;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 16px 0;
}

.compare-item {
  padding: 12px 0 0;
  border: 0;
  border-top: 2px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.compare-item strong {
  display: block;
  margin-bottom: 5px;
}

.lesson-controls {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 24px;
}

.lesson-controls .button {
  min-width: 116px;
}

.question-card {
  padding: 24px;
}

.question-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.question-text {
  margin: 16px 0 24px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.6;
}

.option-list {
  display: grid;
  gap: 8px;
}

.option {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  min-height: 56px;
  padding: 12px 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  background: var(--surface);
  text-align: left;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.option:hover {
  border-color: #aab6a7;
  background: var(--surface-muted);
}

.option.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.option.is-correct {
  border-width: 2px;
  border-color: var(--green);
  color: var(--green-dark);
  background: var(--green-soft);
}

.option.is-wrong {
  border-width: 2px;
  border-color: var(--danger);
  color: var(--danger);
  background: #fae7e5;
}

.option-key {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.text-answer {
  width: 100%;
  min-height: 184px;
  padding: 16px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fcfdfa;
  font-size: 17px;
  line-height: 1.75;
}

.voice-input {
  width: 100%;
}

.voice-toolbar {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  align-items: center;
}

.voice-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 12px;
}

.voice-button.is-listening {
  border-color: var(--danger);
  color: var(--danger);
  background: #fae7e5;
}

.voice-button.is-listening::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.voice-status {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.answer-box {
  margin-top: 24px;
  padding: 16px 16px 16px 20px;
  border: 1px solid #adc7b8;
  border-left: 4px solid var(--green);
  border-radius: 4px;
  background: var(--green-soft);
  line-height: 1.75;
}

.answer-box.is-wrong {
  border-color: #e0b5ae;
  border-left-color: var(--danger);
  background: #fae8e4;
}

.answer-box h3 {
  font-size: 15px;
}

.answer-section + .answer-section {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 111, 85, 0.2);
}

.mastery-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.mastery-row .button {
  min-height: 42px;
  padding: 8px;
  font-size: 12px;
}

.completion {
  padding: 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.completion-mark {
  display: grid;
  width: 40px;
  height: 40px;
  margin: 0 0 16px;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: var(--green);
  font-size: 20px;
  font-weight: 800;
}

.completion-summary {
  margin-top: 28px;
}

.completion-summary-head {
  align-items: end;
}

.completion-summary-head h2 {
  margin-bottom: 0;
}

.completion-summary-list {
  border-top: 1px solid var(--line);
}

.completion-summary-item {
  border-bottom: 1px solid var(--line);
}

.completion-summary-item summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  gap: 10px;
  padding: 16px 0;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.completion-summary-item summary::-webkit-details-marker {
  display: none;
}

.completion-summary-item summary::after {
  color: var(--green);
  content: "+";
  font-size: 22px;
  font-weight: 500;
  text-align: center;
}

.completion-summary-item[open] summary::after {
  content: "-";
}

.summary-index {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.summary-copy {
  min-width: 0;
}

.summary-copy strong {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.completion-summary-body {
  padding: 0 34px 18px 46px;
  color: var(--ink);
  line-height: 1.7;
}

.completion-summary-body p:last-child,
.completion-summary-body ul:last-child,
.completion-summary-body ol:last-child {
  margin-bottom: 0;
}

.completion-summary-body li + li {
  margin-top: 6px;
}

.empty-state {
  padding: 32px 20px;
  color: var(--muted);
  text-align: left;
}

.review-item,
.favorite-item,
.log-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.review-item:last-child,
.favorite-item:last-child,
.log-item:last-child {
  border-bottom: 0;
}

.review-item h3,
.favorite-item h3 {
  margin: 7px 0;
  font-size: 15px;
}

.review-answer {
  margin-top: 10px;
  padding: 12px;
  border-left: 3px solid var(--green);
  background: var(--surface-muted);
  font-size: 14px;
  line-height: 1.65;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.nav-button {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 6px 4px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.nav-button .nav-icon {
  font-size: 18px;
  line-height: 1;
}

.nav-button.is-active {
  color: var(--green-dark);
  background: var(--green-soft);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 18px;
  max-width: 420px;
  margin: auto;
  padding: 12px 14px;
  border-radius: 6px;
  color: #fff;
  background: #25312b;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.inline-note {
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 3px solid var(--blue);
  color: #244c75;
  background: var(--blue-soft);
  font-size: 13px;
  line-height: 1.6;
}

.danger-zone {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.lesson-output,
.completion-output {
  margin: 16px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--amber);
  color: var(--ink);
  font-size: 14px;
}

.course-chapters {
  display: grid;
  gap: 16px;
}

.chapter-section {
  border-top: 3px solid var(--green);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.chapter-section > summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 76px;
  padding: 16px 0;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.chapter-section > summary::-webkit-details-marker {
  display: none;
}

.chapter-number {
  color: var(--green);
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.chapter-summary-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.chapter-summary-copy strong {
  font-size: 19px;
}

.chapter-summary-copy small,
.chapter-description,
.chapter-count {
  color: var(--muted);
  font-size: 13px;
}

.chapter-count {
  min-width: 44px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chapter-section[open] > summary {
  border-bottom: 1px solid var(--line);
}

.chapter-description {
  margin: 16px 0;
}

.chapter-section .lesson-list {
  padding-bottom: 16px;
}

@media (min-width: 900px) {
  h1 {
    font-size: 36px;
  }

  .toast {
    bottom: 96px;
  }
}

@media (max-width: 560px) {
  .auth-brand {
    min-height: 56px;
    padding: 8px 16px;
  }

  .auth-main {
    width: calc(100% - 32px);
    min-height: calc(100dvh - 56px);
    padding: 32px 0;
  }

  .auth-panel {
    padding: 24px 0;
  }

  .account-email {
    max-width: 104px;
  }

  .main {
    padding: 24px 16px 40px;
  }

  .topbar {
    min-height: 56px;
    padding: 8px 16px;
  }

  .brand-copy small {
    display: none;
  }

  .page-header {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
  }

  .editorial-index span {
    font-size: 34px;
  }

  .editorial-index small {
    font-size: 10px;
    line-height: 1.3;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid .stat:last-child {
    grid-column: 1 / -1;
  }

  .lesson-card {
    grid-template-columns: 44px 1fr;
  }

  .lesson-index {
    width: 42px;
    height: 42px;
  }

  .lesson-card > :last-child {
    grid-column: 2;
    justify-self: start;
  }

  .chapter-section > summary {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .chapter-summary-copy strong {
    font-size: 17px;
  }

  .compare-grid,
  .mastery-row {
    grid-template-columns: 1fr;
  }

  .knowledge-card,
  .question-card,
  .panel {
    padding: 16px;
  }

  .today-panel {
    padding: 16px 0;
  }

  .study-title-grid {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
  }

  .study-title-grid .status-badge {
    grid-column: 2;
    justify-self: start;
  }

  .study-number {
    font-size: 32px;
  }

  .knowledge-heading {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
  }

  .knowledge-sequence {
    font-size: 21px;
  }

  h1 {
    font-size: 28px;
  }

  h2,
  .knowledge-card-header h2 {
    font-size: 20px;
  }

  .knowledge-body,
  .text-answer {
    font-size: 16px;
  }

  .question-text {
    font-size: 17px;
  }

  .lesson-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lesson-controls .button {
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
