:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dbe5f1;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --blue-soft: #edf4ff;
  --green: #13a36b;
  --green-soft: #ecfdf5;
  --amber: #d97706;
  --amber-soft: #fff7ed;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --code: #111827;
  --shadow: 0 14px 36px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #12b4a6);
  font-size: 20px;
  font-weight: 800;
}

.brand strong,
.brand span,
.side-note span,
.model-pill span,
.model-pill strong {
  display: block;
}

.brand span,
.side-note span,
.model-pill span,
.subtitle {
  color: var(--muted);
}

.brand span,
.side-note span,
.model-pill span {
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 8px;
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.role-switch button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.role-switch button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.nav-button {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.nav-button.active {
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 800;
}

.side-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.main {
  min-width: 0;
  padding: 22px 28px 36px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.topbar h1,
.hero-panel h2,
.panel h2,
.question-card h3,
.task h3 {
  margin: 0;
}

.topbar h1 {
  font-size: 25px;
  line-height: 1.25;
}

.subtitle {
  margin: 8px 0 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.top-actions {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.date-pill,
.model-pill {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
}

.model-pill {
  min-width: 220px;
}

.date-pill {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
}

.teacher-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.05fr) minmax(340px, 1fr);
  gap: 16px;
}

.panel,
.hero-panel,
.flow-card,
.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
  min-width: 0;
}

.hero-panel {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.6fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-panel h2 {
  font-size: 34px;
  line-height: 1.15;
}

.hero-panel p {
  max-width: 780px;
  line-height: 1.7;
}

.hero-card {
  padding: 18px;
  background: linear-gradient(160deg, #eff6ff, #ffffff);
}

.hero-card span {
  color: var(--muted);
  font-size: 13px;
}

.hero-card strong {
  display: block;
  margin: 6px 0;
  font-size: 28px;
}

.unit-select-label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.unit-select {
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
}

.unit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.unit-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
}

.class-selector-panel {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.class-select-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.flow-card {
  padding: 18px;
}

.flow-card span {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
  margin-bottom: 12px;
}

.flow-card strong {
  display: block;
  font-size: 18px;
}

.flow-card p,
.rail-text,
.task p,
.feedback p,
.empty,
.hint-box p {
  line-height: 1.65;
}

.feature-list,
.advice-list,
.student-list,
.demo-actions.vertical {
  display: grid;
  gap: 10px;
}

.feature-list div,
.advice-list div,
.student-list button,
.student-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list span {
  color: var(--muted);
  margin-top: 4px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.task-panel .section-title {
  flex-direction: column;
}

.task-panel .select {
  width: 100%;
}

.task-panel h2 {
  font-size: 24px;
  line-height: 1.25;
}

.action-row,
.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary,
.secondary,
.ghost {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 14px;
  font-weight: 800;
}

.primary {
  color: #fff;
  background: var(--blue);
}

.primary:hover {
  background: var(--blue-2);
}

.secondary {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #bfdbfe;
}

.ghost {
  color: var(--muted);
  background: #f8fafc;
  border-color: var(--line);
}

.full {
  width: 100%;
}

.learning-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.right-rail {
  display: grid;
  gap: 16px;
  align-content: start;
}

.main-question {
  min-height: 620px;
}

.count-pill,
.level-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  min-height: 360px;
}

.question-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.question-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.question-card h3 {
  font-size: 22px;
  line-height: 1.55;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
}

.answer-option {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
}

.answer-option.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.question-actions {
  margin-top: 18px;
}

.score-ring {
  width: 148px;
  height: 148px;
  margin: 8px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, #fff 59%, transparent 60%),
    conic-gradient(var(--blue) calc(var(--score, 0) * 1%), #e5e7eb 0);
  border: 1px solid var(--line);
}

.score-ring div {
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.score-ring span {
  font-size: 16px;
}

.score-ring small {
  color: var(--muted);
  margin-top: -42px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stats span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--muted);
  background: #f8fafc;
}

.stats strong {
  display: block;
  color: var(--text);
  font-size: 22px;
}

.stats.mini strong {
  font-size: 18px;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.question-grid button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
}

.question-grid button.done {
  color: var(--blue);
  border-color: #bfdbfe;
  background: var(--blue-soft);
}

.question-grid button.current {
  outline: 2px solid var(--blue);
}

.legend {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: #cbd5e1;
}

.dot.done {
  background: var(--blue);
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 360px;
  gap: 16px;
  margin-bottom: 16px;
}

.result-hero {
  display: flex;
  gap: 22px;
  align-items: center;
}

.trophy {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  font-size: 46px;
  font-weight: 900;
}

.result-hero h2 {
  font-size: 42px;
}

.portrait-tags {
  display: grid;
  gap: 8px;
}

.portrait-tags span {
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8fafc;
  color: var(--muted);
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.answer-grid div {
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f8fafc;
}

.answer-grid strong,
.answer-grid span {
  display: block;
}

.answer-grid .right {
  color: var(--green);
  background: var(--green-soft);
  border-color: #a7f3d0;
}

.answer-grid .wrong {
  color: var(--red);
  background: var(--red-soft);
  border-color: #fecaca;
}

.level-box {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.level-box strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
}

.level-box p {
  margin: 0;
  line-height: 1.65;
}

.level-box.A {
  border-color: #86efac;
  background: var(--green-soft);
}

.level-box.B {
  border-color: #bfdbfe;
  background: var(--blue-soft);
}

.level-box.C {
  border-color: #fed7aa;
  background: var(--amber-soft);
}

.practice-header {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.practice-header h2 {
  font-size: 26px;
}

.practice-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(460px, 1.25fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.task dl {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 9px 12px;
}

.task dt {
  color: var(--muted);
  font-weight: 800;
}

.task dd {
  margin: 0;
  line-height: 1.6;
}

.sample-table,
.test-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 14px 0;
}

.test-table {
  grid-template-columns: repeat(4, 1fr);
}

.sample-table > *,
.test-table > * {
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.sample-table > div,
.test-table > div {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 800;
}

.require-list {
  padding-left: 20px;
  line-height: 1.7;
}

.hint-box,
.feedback,
.empty,
.strategy-box,
.todo-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: #f1f5f9;
  cursor: pointer;
}

.tabs button.active {
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 800;
}

.tab-panel {
  min-height: 560px;
}

#codeEditor {
  width: 100%;
  min-height: 470px;
  resize: vertical;
  border: 1px solid #0f172a;
  border-radius: 8px;
  padding: 18px;
  color: #e5e7eb;
  background: var(--code);
  line-height: 1.55;
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 14px;
}

.editor-helper {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.empty-tab {
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  padding: 18px;
  background: #eff6ff;
  color: #1e3a8a;
}

.empty-tab strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.empty-tab p {
  margin: 0;
  line-height: 1.7;
}

.submission-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.submission-summary div,
.submission-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.submission-summary span,
.submission-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.submission-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
}

.submission-list {
  display: grid;
  gap: 10px;
}

.submission-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.submission-item p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.submission-meta {
  text-align: right;
  white-space: nowrap;
}

.submission-meta em {
  display: inline-block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 900;
}

.feedback {
  margin-top: 12px;
}

.feedback.pass {
  background: var(--green-soft);
  border-color: #86efac;
}

.feedback.warn {
  background: var(--amber-soft);
  border-color: #fed7aa;
}

.chat-list {
  display: grid;
  gap: 10px;
}

.chat {
  border-radius: 8px;
  padding: 12px;
  line-height: 1.65;
}

.chat.assistant {
  background: #f8fafc;
  border: 1px solid var(--line);
}

.clear-chat {
  min-height: 32px;
  padding: 0 12px;
  white-space: nowrap;
}

.clear-chat:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.quick-prompts {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.todo-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.todo-box div {
  display: grid;
  gap: 5px;
}

.todo-box span {
  color: var(--green);
  font-weight: 800;
}

.todo-box code {
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.policy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.bars {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 108px 1fr 52px;
  gap: 10px;
  align-items: center;
}

.bar-row span {
  color: var(--muted);
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.profile-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.profile-summary div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.profile-summary span,
.profile-summary strong {
  display: block;
}

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

.profile-summary strong {
  margin-top: 5px;
  color: var(--blue);
  font-size: 18px;
}

.live-data-panel h2 {
  margin-bottom: 12px;
}

.live-metrics {
  display: grid;
  gap: 10px;
}

.live-metrics div {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.live-metrics div::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--value);
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.live-metrics span,
.live-focus span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.live-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 22px;
}

.live-focus {
  margin-top: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
}

.live-focus strong {
  display: block;
  margin: 5px 0;
}

.live-focus p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.solution-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.solution-timeline.compact {
  grid-template-columns: 1fr;
}

.solution-timeline div {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.solution-timeline div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #cbd5e1;
}

.solution-timeline div.done::before {
  background: linear-gradient(90deg, #2563eb, #14b8a6);
}

.solution-timeline div.current {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.solution-timeline span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #94a3b8;
  font-weight: 900;
}

.solution-timeline .done span,
.solution-timeline .current span {
  background: var(--blue);
}

.solution-timeline strong {
  display: block;
  margin: 10px 0 6px;
}

.solution-timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.radar-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
  margin: 14px 0 18px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.12), transparent 32%),
    linear-gradient(135deg, #ffffff, #f8fafc);
}

.radar-card svg {
  width: 220px;
  height: 220px;
  display: block;
}

.radar-ring {
  fill: none;
  stroke: #dbeafe;
  stroke-width: 1.4;
}

.radar-axis {
  stroke: #e2e8f0;
  stroke-width: 1.2;
}

.radar-fill {
  fill: rgba(37, 99, 235, 0.26);
  stroke: none;
}

.radar-stroke {
  fill: none;
  stroke: #2563eb;
  stroke-width: 3;
  stroke-linejoin: round;
}

.radar-card text {
  fill: #334155;
  font-size: 12px;
  font-weight: 800;
}

.radar-card strong,
.radar-card span {
  display: block;
}

.radar-card strong {
  color: var(--blue);
  font-size: 20px;
}

.radar-card span {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.heatmap div {
  min-height: 78px;
  display: grid;
  align-content: space-between;
  border-radius: 12px;
  padding: 12px;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.22);
}

.heatmap div.mid {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.heatmap div.high {
  background: linear-gradient(135deg, #059669, #14b8a6);
}

.heatmap strong {
  font-size: 24px;
}

.heatmap span {
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.94;
}

.action-list,
.next-step-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.action-list div {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.action-list span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.action-list p,
.next-step-list div,
.weak-advice p,
.weak-advice li,
.empty-record-guide p,
.empty-record-guide li {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.growth-line {
  height: 190px;
  display: flex;
  align-items: end;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.growth-line span {
  width: 42px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #2563eb, #14b8a6);
}

.trend-chart {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #f8fafc;
}

.trend-chart svg {
  width: 100%;
  max-height: 250px;
  display: block;
}

.trend-chart .axis {
  stroke: #cbd5e1;
  stroke-width: 1.5;
}

.trend-chart .grid-line line {
  stroke: #e2e8f0;
  stroke-dasharray: 4 5;
}

.trend-chart .grid-line text,
.trend-chart .trend-point text {
  fill: var(--muted);
  font-size: 12px;
}

.trend-chart .trend-area {
  fill: rgba(37, 99, 235, 0.12);
}

.trend-chart .trend-line {
  fill: none;
  stroke: #2563eb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-chart .trend-point circle {
  fill: #fff;
  stroke: #13a36b;
  stroke-width: 4;
}

.trend-chart .trend-point text {
  text-anchor: middle;
  font-weight: 800;
}

.trend-chart .trend-point .x-label {
  fill: #475569;
  font-weight: 700;
}

.progress-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.progress-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.progress-card span,
.progress-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.progress-card strong {
  display: block;
  margin: 5px 0;
  color: var(--blue);
  font-size: 28px;
}

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

.record-list div {
  display: grid;
  grid-template-columns: 92px 1fr 56px;
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.record-list span,
.record-list p {
  color: var(--muted);
}

.record-list strong,
.record-list em {
  font-style: normal;
  font-weight: 900;
}

.record-list em {
  color: var(--green);
  text-align: right;
}

.record-list p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}

.empty-record-guide,
.weak-advice,
.next-step-list div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.empty-record-guide strong,
.weak-advice strong {
  display: block;
  margin-bottom: 6px;
}

.empty-record-guide ol,
.weak-advice ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.weak-advice {
  margin-top: 14px;
  background: #fff7ed;
  border-color: #fed7aa;
}

.weak-advice.pass {
  background: var(--green-soft);
  border-color: #86efac;
}

.next-step-list div::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.student-trend-block {
  margin-top: 18px;
}

.teacher-overview {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1fr) minmax(360px, 1.25fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
  background:
    radial-gradient(circle at 8% 15%, rgba(37, 99, 235, 0.12), transparent 28%),
    #fff;
}

.teacher-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teacher-overview-grid div,
.teacher-team-list div,
.teacher-class-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.teacher-overview-grid span,
.teacher-overview-grid strong,
.teacher-team-list strong,
.teacher-team-list span,
.teacher-team-list em,
.teacher-class-grid strong,
.teacher-class-grid span,
.teacher-class-grid em {
  display: block;
}

.teacher-overview-grid span,
.teacher-team-list span,
.teacher-team-list em,
.teacher-class-grid span,
.teacher-class-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.teacher-overview-grid strong {
  margin-top: 6px;
  color: var(--blue);
  font-size: 22px;
}

.teacher-team-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teacher-team-list div.active,
.teacher-class-grid div.active {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
}

.teacher-team-list strong,
.teacher-class-grid strong {
  margin-bottom: 4px;
  color: var(--text);
}

.teacher-team-list em,
.teacher-class-grid em {
  margin-top: 6px;
  line-height: 1.55;
}

.teacher-class-map {
  margin-top: 16px;
}

.teacher-class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: 36px;
}

.metric span,
.good {
  color: var(--green);
}

.danger {
  color: var(--red);
}

.ranking {
  display: grid;
  gap: 8px;
}

.ranking div {
  display: grid;
  grid-template-columns: 32px 1fr 64px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.ranking span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 900;
}

.ranking em {
  font-style: normal;
  color: var(--amber);
  font-weight: 900;
}

.student-list button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  text-align: left;
}

.student-list button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.form {
  display: grid;
  gap: 14px;
}

.form label {
  display: grid;
  gap: 6px;
}

.form input,
.form select,
.select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.switch-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.switch-row input {
  width: 18px;
  height: 18px;
  min-height: auto;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 16% 12%, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(19, 163, 107, 0.14), transparent 24%),
    var(--bg);
}

.login-panel {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.18;
}

.login-demo,
.login-form {
  display: grid;
  gap: 12px;
}

.login-demo {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
}

.login-demo strong {
  color: var(--text);
}

.login-form {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fafc;
}

.auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.auth-tabs button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.login-form input,
.login-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-size: 13px;
}

@media (max-width: 1240px) {
  .learning-layout,
  .practice-layout,
  .teacher-detail-grid,
  .result-grid,
  .grid.two,
  .teacher-grid,
  .hero-panel,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .login-page {
    padding: 18px;
  }

  .login-panel {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .login-panel h1 {
    font-size: 26px;
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main {
    padding: 18px 14px 28px;
  }

  .topbar,
  .top-actions,
  .practice-header,
  .section-title {
    flex-direction: column;
  }

  .option-grid,
  .right-rail,
  .answer-grid {
    grid-template-columns: 1fr;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }
}
