:root {
  --ink: #17202a;
  --muted: #637083;
  --line: #d9e0e8;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --blue: #2563eb;
  --green: #138a5e;
  --amber: #b7791f;
  --red: #c24134;
  --violet: #6d4bc3;
  --shadow: 0 16px 40px rgba(23, 32, 42, 0.09);
}

.question-card-list {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

.practice-question-card {
  border: 1px solid #d8e0ef;
  background: #f8fbff;
  border-radius: 8px;
  padding: 10px 12px;
}

.question-source-label {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1d7;
  color: #8a3b00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.practice-question-card strong,
.question-text {
  display: block;
  color: #102033;
  line-height: 1.55;
}

.guided-answer-steps {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef6ff;
  border: 1px solid #d7e8fb;
}

.student-attempt-box {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.student-attempt-box label {
  color: #344054;
  font-weight: 700;
  font-size: 13px;
}

.student-attempt-box textarea {
  width: 100%;
  min-height: 68px;
  resize: vertical;
}

.student-attempt-box .small {
  width: fit-content;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.attempt-notice {
  min-height: 20px;
  margin: 0;
  color: #8a3b00;
  font-size: 13px;
  line-height: 1.5;
}

.guided-answer-steps p,
.answer-reveal p {
  margin: 4px 0;
}

.answer-reveal {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d8e0ef;
}

.answer-reveal summary {
  cursor: pointer;
  font-weight: 700;
  color: #12529b;
}

.question-tone-语文 .question-text {
  color: #9a2f1f;
}

.question-tone-数学 .question-text {
  color: #12529b;
}

.question-tone-英语 .question-text {
  color: #1d6c44;
}

.question-tone-物理 .question-text {
  color: #5d3db4;
}

.question-tone-化学 .question-text {
  color: #8b3d12;
}

.question-tone-生物 .question-text,
.question-tone-生物学 .question-text {
  color: #216b58;
}

.question-tone-历史 .question-text {
  color: #7a4b16;
}

.question-tone-地理 .question-text {
  color: #0f6b7a;
}

.question-tone-道德与法治 .question-text {
  color: #7c2d6d;
}

.real-exam-question {
  border-color: #d9a35f;
  background: #fffaf0;
}

.real-exam-question .question-source-label {
  background: #8a3b00;
  color: #fff8e8;
}

#questionText,
.real-exam-question .question-text {
  color: #0284c7;
  font-family: KaiTi, STKaiti, "楷体", "华文楷体", serif;
  font-size: 17px;
  font-weight: 700;
}

#questionText sub,
.question-text sub,
.option sub,
.answer-reveal sub,
#answerResult sub,
.wrong-list sub {
  font-size: 0.72em;
  line-height: 0;
  vertical-align: sub;
}

.question-image-list {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}

.question-image-frame {
  margin: 0;
  padding: 8px;
  border: 1px solid #e0c18c;
  border-radius: 6px;
  background: #fff;
  overflow-x: auto;
}

.question-image-frame img {
  display: block;
  max-width: min(100%, 780px);
  height: auto;
}

.question-image-fallback,
.manual-review-notice {
  display: block;
  padding: 10px 12px;
  border: 1px solid #c45b2f;
  border-radius: 6px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 14px;
  line-height: 1.5;
}

.question-image-fallback[hidden] {
  display: none;
}

.main-question-images {
  margin: 10px 0 14px;
}

.practice-question-card p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.question-preview-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #314158;
}

.question-preview-head strong {
  color: #102033;
}

.processing-table-wrap {
  overflow-x: auto;
  margin: 12px 0 18px;
  border: 1px solid #d8e0ef;
  border-radius: 8px;
}

.processing-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.processing-table th,
.processing-table td {
  border-bottom: 1px solid #e4eaf2;
  padding: 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.processing-table th {
  background: #eef5ff;
  color: #102033;
  font-weight: 700;
}

.processing-table td:nth-child(4),
.processing-table td:nth-child(6) {
  min-width: 240px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #eef3f8;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: #16202b;
  color: #fff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 8px 22px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f6c356;
  color: #17202a;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #b6c3d0;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  color: #dfe8f4;
  background: transparent;
  border-radius: 8px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #17202a;
  background: #ffffff;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.action-status {
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid #d8e0ef;
  border-radius: 8px;
  background: #f8fbff;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.action-status.flash {
  border-color: var(--blue);
  background: #eff6ff;
  color: #1d4ed8;
}

.action-status.error {
  border-color: var(--red);
  background: #fff3f0;
  color: #a33024;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

.student-panel {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

input,
select {
  min-height: 40px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-band,
.panel,
.metric,
.question-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-band {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-left: 5px solid var(--green);
}

.hero-band h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.hero-band p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.research-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--violet);
}

.homework-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--blue);
}

.loop-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--green);
}

.adaptive-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--amber);
}

.language-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--red);
}

.omni-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--blue);
}

.ai-subject-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--green);
}

.iteration-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--violet);
}

.syllabus-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
  border-left: 5px solid var(--amber);
}

.research-hero h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

.research-hero p:last-child,
.homework-hero p:last-child,
.loop-hero p:last-child,
.adaptive-hero p:last-child,
.language-hero p:last-child,
.omni-hero p:last-child,
.ai-subject-hero p:last-child,
.iteration-hero p:last-child,
.syllabus-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions,
.answer-row,
.tool-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary,
.secondary,
.small,
.chip {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--blue);
}

.secondary {
  color: var(--ink);
  background: #e8edf4;
}

.small {
  min-height: 34px;
  color: var(--blue);
  background: #eaf1ff;
}

.chip {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.chip.active {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.feature-note {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  margin-bottom: 16px;
  background: #fffdf7;
  border: 1px solid #ead8a7;
  border-left: 5px solid var(--amber);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature-note p {
  margin: 0;
  line-height: 1.75;
  color: #384454;
}

.metric {
  min-height: 118px;
  padding: 18px;
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 9px 0;
  font-size: 32px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.tal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.tal-engine {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.tal-engine article {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.tal-engine strong,
.tal-engine span {
  display: block;
}

.tal-engine span {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.6;
}

.tal-loop {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.loop-card {
  min-height: 140px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.loop-card strong,
.loop-card span {
  display: block;
}

.loop-card span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.homework-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.loop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.adaptive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.omni-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.ai-subject-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.ai-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.iteration-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.button-stack {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.iteration-result {
  display: grid;
  gap: 12px;
}

.iteration-round-card,
.iteration-subject-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.iteration-round-card h4,
.iteration-subject-card h4 {
  margin: 0 0 10px;
  font-size: 17px;
}

.iteration-round-card p {
  margin: 6px 0;
  line-height: 1.65;
}

.iteration-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.round-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.round-pill {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  color: #17202a;
  background: #eaf1ff;
  border: 1px solid #c9dafc;
  font-size: 12px;
  font-weight: 800;
}

.ai-route-card {
  min-height: 210px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.ai-route-card strong {
  display: block;
  margin-bottom: 10px;
}

.ai-route-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.resource-card {
  min-height: 170px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.resource-card strong,
.resource-card span {
  display: block;
}

.resource-card span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.hardware-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.boundary-grid article {
  min-height: 130px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.boundary-grid strong,
.boundary-grid span {
  display: block;
}

.boundary-grid span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.skill-editor {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.skill-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 150px;
  gap: 10px;
  align-items: center;
}

.skill-row span {
  font-weight: 800;
}

.graph-board {
  min-height: 320px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.graph-node {
  position: relative;
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.graph-node::before {
  content: "";
  position: absolute;
  top: 17px;
  right: 17px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
}

.graph-node.weak::before {
  background: var(--red);
}

.graph-node.mid::before {
  background: var(--amber);
}

.graph-node strong,
.graph-node span {
  display: block;
}

.graph-node span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.center-card {
  padding: 18px;
  margin-bottom: 14px;
  border-radius: 8px;
  color: #17202a;
  background: #fff7df;
  border: 1px solid #ecd28b;
}

.center-card strong,
.center-card span {
  display: block;
}

.center-card strong {
  font-size: 26px;
}

.center-card span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.center-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.center-metrics article {
  min-height: 86px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.center-metrics strong {
  font-size: 24px;
}

.center-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.loop-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.loop-steps article {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.loop-steps span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.loop-steps strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.loop-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ink-preview {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #aab2bd;
  border-radius: 8px;
  background: #f8f8f3;
  color: #1f2933;
  filter: grayscale(1);
  line-height: 1.8;
}

body.ink-mode {
  background: #ededdf;
}

body.ink-mode .panel,
body.ink-mode .hero-band,
body.ink-mode .metric,
body.ink-mode .course-card,
body.ink-mode .loop-steps article {
  box-shadow: none;
  filter: grayscale(1);
}

.mini-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  margin-bottom: 12px;
}

.system-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.system-card {
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.system-card h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.system-card ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tool-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tool-matrix article {
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.tool-matrix strong,
.tool-matrix span {
  display: block;
}

.tool-matrix span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin-bottom: 5px;
}

.panel-head p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.path-list {
  display: grid;
  gap: 10px;
  padding-left: 22px;
  margin: 0;
}

.path-list li {
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
  line-height: 1.6;
}

.path-list p {
  margin: 6px 0 0;
}

.path-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.path-title span {
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.course-detail {
  display: grid;
  gap: 6px;
  padding: 10px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fafc;
}

.course-detail span {
  color: var(--muted);
  line-height: 1.55;
}

.diagnosis-detail {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.diagnosis-detail section {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.diagnosis-detail span {
  color: var(--muted);
}

.exercise-list {
  display: grid;
  gap: 5px;
  margin: 6px 0 0;
  padding-left: 22px;
}

.exercise-list li {
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.compact-list {
  display: grid;
  gap: 5px;
  margin: 6px 0 0;
  padding-left: 20px;
}

.compact-list li {
  line-height: 1.55;
}

.radar-wrap {
  width: 100%;
  overflow: hidden;
}

.diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ai-result {
  margin-top: 14px;
  padding: 14px;
  min-height: 54px;
  border-radius: 8px;
  background: #f7fafc;
  border: 1px dashed #c8d3df;
  color: #243140;
  line-height: 1.7;
}

.ai-result:empty {
  display: none;
}

.result-highlight {
  animation: resultPulse 1.4s ease;
}

@keyframes resultPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35);
  }
  55% {
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

.syllabus-paper {
  display: grid;
  gap: 14px;
}

.syllabus-title {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.syllabus-title h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.syllabus-title p,
.syllabus-block p,
.syllabus-card p {
  color: var(--muted);
  line-height: 1.7;
}

.syllabus-block {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.syllabus-block h4 {
  margin: 0;
}

.syllabus-block ul,
.syllabus-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.syllabus-topic {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5ebf2;
}

.syllabus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.syllabus-audit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.syllabus-audit article {
  min-height: 138px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.syllabus-audit h4 {
  margin: 0 0 8px;
}

.syllabus-audit p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.syllabus-card {
  min-height: 170px;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.syllabus-card.active-syllabus-card {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), var(--shadow);
}

.syllabus-card button {
  justify-self: start;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.course-card {
  min-height: 190px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.course-card h3 {
  margin-bottom: 8px;
}

.course-card p {
  color: var(--muted);
  line-height: 1.6;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  color: #fff;
  background: var(--violet);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.question-card {
  padding: 20px;
}

.question-card h3 {
  margin: 12px 0 16px;
  font-size: 22px;
}

.options {
  display: grid;
  gap: 9px;
}

.option {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.option.selected {
  border-color: var(--blue);
  background: #edf4ff;
}

.answer-row {
  margin-top: 14px;
}

.answer-row input {
  flex: 1 1 260px;
}

.wrong-list {
  display: grid;
  gap: 12px;
}

.wrong-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: #fff;
}

.wrong-item strong {
  display: block;
  margin-bottom: 6px;
}

.speaking-box {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--soft);
  border-radius: 8px;
}

.speaking-box p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.report-paper {
  min-height: 320px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.8;
}

.report-paper h2 {
  font-size: 22px;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .topbar,
  .hero-band,
  .research-hero,
  .homework-hero,
  .loop-hero,
  .adaptive-hero,
  .language-hero,
  .omni-hero,
  .ai-subject-hero,
  .iteration-hero,
  .panel-head,
  .speaking-box,
  .feature-note {
    flex-direction: column;
  }

  .metric-grid,
  .diagnosis-grid,
  .course-grid,
  .two-column,
  .tal-engine,
  .tal-loop,
  .tal-grid,
  .homework-grid,
  .loop-grid,
  .loop-steps,
  .adaptive-grid,
  .language-grid,
  .omni-grid,
  .ai-subject-grid,
  .ai-route-grid,
  .iteration-board,
  .syllabus-grid,
  .syllabus-audit,
  .system-map,
  .tool-matrix,
  .resource-grid,
  .boundary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 16px;
  }

  .nav,
  .metric-grid,
  .diagnosis-grid,
  .course-grid,
  .two-column,
  .tal-engine,
  .tal-loop,
  .tal-grid,
  .homework-grid,
  .loop-grid,
  .loop-steps,
  .adaptive-grid,
  .language-grid,
  .omni-grid,
  .ai-subject-grid,
  .ai-route-grid,
  .iteration-controls,
  .iteration-board,
  .syllabus-grid,
  .syllabus-audit,
  .resource-grid,
  .hardware-tools,
  .boundary-grid,
  .graph-board,
  .center-metrics,
  .skill-row,
  .system-map,
  .tool-matrix,
  .mini-form,
  .student-panel {
    grid-template-columns: 1fr;
  }

  .student-panel {
    display: grid;
    width: 100%;
  }

  h1 {
    font-size: 22px;
  }
}
