@charset "UTF-8";

:root {
  color-scheme: light;
  --canvas: #f3fbf6;
  --surface: #ffffff;
  --surface-soft: #f5fcf7;
  --ink: #183b28;
  --ink-soft: #466452;
  --muted: #576d60;
  --line: #d8edde;
  --green: #15803d;
  --green-deep: #166534;
  --green-bright: #16a34a;
  --green-pale: #e4f8ea;
  --green-border: #bce7ca;
  --graph-line: #4a9968;
  --orange: #ca793e;
  --orange-pale: #fff0df;
  --error: #a24f42;
  --error-pale: #fdf0e9;
  --radius: 20px;
  --radius-small: 12px;
  --shadow: 0 5px 24px rgba(24, 97, 52, 0.045);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-synthesis: none;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button, select { cursor: pointer; }
button { touch-action: manipulation; }
button:disabled { cursor: not-allowed; }
input, select, textarea { min-width: 0; max-width: 100%; color: var(--ink); }
input, select, textarea { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; }
textarea { resize: vertical; }
a { color: var(--green); text-underline-offset: 3px; }
svg { display: block; max-width: 100%; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 650; }
p:last-child { margin-bottom: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 4px;
}
::selection { background: #ccf4db; color: var(--green-deep); }
[hidden], #dialog[hidden] { display: none !important; }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 32px 20px 22px;
  border-right: 1px solid var(--line);
  background: #fcfffd;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; text-decoration: none; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1;
}
.brand-mark svg { width: 25px; height: 25px; }
.brand-name { font-size: 20px; font-weight: 720; letter-spacing: 1.5px; line-height: 1.35; }
.brand-caption { color: var(--muted); font-size: 10px; letter-spacing: 1.4px; margin-top: 4px; }
.nav-list { display: flex; flex-direction: column; gap: 7px; margin-top: 47px; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 47px;
  padding: 11px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 140ms ease, background 140ms ease;
}
.nav-button:hover { color: var(--green); background: #eaf9ef; }
.nav-button.active { color: var(--green); background: var(--green-pale); font-weight: 650; }
.nav-icon { width: 20px; height: 20px; display: grid; place-items: center; flex: 0 0 20px; font-size: 17px; line-height: 1; }
.nav-icon svg { width: 20px; height: 20px; }
.sidebar-footer { margin-top: auto; padding: 18px 10px 0; color: var(--muted); font-size: 11px; line-height: 1.85; }
.sidebar-footer .badge { margin-bottom: 9px; }
.sidebar-footer p { margin-bottom: 6px; }
.main-area { min-width: 0; }
.topbar {
  min-height: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px clamp(24px, 3.5vw, 56px);
  border-bottom: 1px solid rgba(216, 237, 222, 0.85);
  background: rgba(255, 255, 255, 0.8);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.breadcrumb strong { color: var(--ink-soft); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); background: var(--surface); font-size: 11px; white-space: nowrap; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--green); background: #d7f5e2; font-size: 12px; font-weight: 650; flex: 0 0 34px; }
main#app { padding: 33px clamp(24px, 3.5vw, 56px) 28px; }
.page { width: 100%; max-width: 1180px; margin: 0 auto; }
.page-heading { margin-bottom: 26px; }
.eyebrow { margin-bottom: 6px; color: var(--orange); font-size: 10px; font-weight: 650; letter-spacing: 1.8px; text-transform: uppercase; }
.page-title { margin-bottom: 8px; font-size: clamp(25px, 2.4vw, 31px); letter-spacing: -0.7px; line-height: 1.35; }
.page-subtitle { margin-bottom: 0; max-width: 740px; color: var(--ink-soft); font-size: 13px; line-height: 1.85; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(180px, 1fr);
  align-items: center;
  gap: 28px;
  overflow: hidden;
  padding: 32px 35px;
  margin-bottom: 25px;
  border: 1px solid var(--green-border);
  border-radius: 24px;
  background: var(--green-pale);
}
.hero-copy { position: relative; z-index: 1; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--green); font-size: 11px; letter-spacing: 0.6px; }
.hero-title { margin-bottom: 12px; font-size: clamp(27px, 2.5vw, 34px); line-height: 1.4; letter-spacing: -0.9px; }
.hero-description { max-width: 480px; margin-bottom: 21px; color: var(--ink-soft); font-size: 13px; line-height: 1.85; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.hero-art { position: relative; display: grid; place-items: center; min-width: 0; min-height: 190px; }
.svg-art { width: 100%; max-width: 300px; height: auto; }
.hero-art svg { overflow: visible; }
.hero-art > span { font-family: Georgia, "Times New Roman", serif; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 11px;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.button svg { width: 16px; height: 16px; flex: 0 0 16px; }
.button-primary { background: var(--green); color: #fff; box-shadow: 0 3px 8px rgba(21, 128, 61, 0.13); }
.button-primary:hover { background: var(--green-deep); box-shadow: 0 4px 12px rgba(21, 128, 61, 0.19); }
.button-secondary { background: var(--surface); border-color: var(--line); color: var(--green); }
.button-secondary:hover { background: #edfaf1; border-color: #8bd2a6; }
.button-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.button-ghost:hover { background: #eaf8ef; color: var(--green); }
.button-small { min-height: 34px; padding: 7px 12px; border-radius: 9px; font-size: 11px; }
.button:disabled { opacity: 0.42; box-shadow: none; }
.button-primary:disabled:hover { background: var(--green); }
.button-secondary:disabled:hover { background: var(--surface); border-color: var(--line); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); gap: 23px; align-items: start; }
.card { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.dashboard-grid > .card + .card { margin-top: 0; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 21px; }
.card-title { margin-bottom: 5px; font-size: 16px; font-weight: 650; letter-spacing: -0.2px; }
.card-description { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.section-title { margin-bottom: 7px; font-size: 18px; font-weight: 650; line-height: 1.5; }
.section-subtitle { margin-bottom: 20px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 22px 0 26px; }
.journey-step { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; position: relative; min-width: 0; }
.journey-step:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: 44px; right: 1px; height: 1px; background: var(--line); }
.step-number { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 33px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 600; z-index: 1; }
.journey-step.active .step-number { color: #fff; border-color: var(--green); background: var(--green); box-shadow: 0 0 0 5px var(--green-pale); }
.journey-step.done .step-number { color: var(--green); border-color: var(--green-border); background: #ddf5e6; }
.step-copy { min-width: 0; }
.step-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.journey-step.active .step-label, .journey-step.done .step-label { color: var(--ink); }
.step-detail { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.skill-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.skill-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.skill-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 30px; border-radius: 9px; background: var(--green-pale); color: var(--green); font-family: Georgia, serif; font-size: 17px; }
.skill-icon svg { width: 17px; height: 17px; }
.skill-status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; font-size: 9px; font-weight: 500; line-height: 1.4; color: var(--muted); background: #edf7f0; white-space: nowrap; }
.skill-status.weak { background: var(--orange-pale); color: #b37438; }
.skill-status.mixed { background: #f6f0d9; color: #9d8441; }
.skill-status.strong { background: #dcfce7; color: var(--green-deep); }
.skill-status.unknown { background: #edf7f0; color: var(--muted); }
.skill-name { margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.skill-description { margin-bottom: 13px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.skill-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; }
.skill-footer strong { color: var(--ink-soft); font-weight: 500; }
.task-list { display: flex; flex-direction: column; gap: 0; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 17px 0; border-top: 1px solid var(--line); }
.task-row:first-child { border-top: 0; padding-top: 0; }
.task-row:last-child { padding-bottom: 0; }
.task-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; background: var(--green-pale); color: var(--green); font-size: 16px; }
.task-icon svg { width: 17px; height: 17px; }
.task-content { flex: 1; min-width: 0; }
.task-label { margin-bottom: 3px; font-size: 12px; font-weight: 550; }
.task-meta { color: var(--muted); font-size: 10px; line-height: 1.65; }
.task-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.empty-state { padding: 35px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.empty-state h3 { margin-bottom: 8px; font-size: 15px; }
.empty-state .button { margin-top: 12px; }
.empty-state svg { margin: 0 auto 15px; width: 48px; height: 48px; color: #63ba80; }

.assessment-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(230px, 0.85fr); gap: 23px; align-items: start; }
.assessment-main { min-width: 0; }
.assessment-aside { min-width: 0; }
.assessment-aside .card { padding: 22px; }
.assessment-main > .card { padding: 30px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 20px; background: #e2f4e8; }
.progress-fill { height: 100%; width: 0; border-radius: 20px; background: var(--green-bright); transition: width 240ms ease; }
.question-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 23px 0 15px; color: var(--muted); font-size: 11px; }
.question-title { margin-bottom: 24px; font-size: 19px; font-weight: 550; line-height: 1.85; overflow-wrap: anywhere; }
.option-list { display: grid; gap: 11px; }
.option-button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 60px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); text-align: left; transition: border-color 140ms ease, background 140ms ease; }
.option-button:hover { background: var(--surface-soft); border-color: #a0dcb4; }
.option-button.selected { background: var(--green-pale); border-color: var(--green-bright); box-shadow: inset 0 0 0 1px var(--green-bright); }
.option-letter { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 11px; font-weight: 600; }
.option-button.selected .option-letter { color: #fff; border-color: var(--green); background: var(--green); }
.option-copy { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.option-button:disabled { opacity: 0.7; }
.option-button:disabled.selected { opacity: 1; }
.question-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.feedback { margin-top: 20px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); font-size: 12px; line-height: 1.9; background: var(--surface-soft); }
.feedback.correct { background: #edfbf1; border-color: var(--green-border); }
.feedback.incorrect { background: #fff5e8; border-color: #f0dfc6; }
.feedback-title { margin-bottom: 8px; color: var(--green); font-size: 13px; font-weight: 650; }
.feedback.incorrect .feedback-title { color: #ae7740; }
.feedback p { margin-bottom: 8px; }
.hint { margin-top: 16px; padding: 15px 17px; border-left: 3px solid #8bd2a6; border-radius: 0 9px 9px 0; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
.help-note { color: var(--muted); font-size: 11px; line-height: 1.85; }
.help-note ul { margin: 10px 0 0; padding-left: 18px; }
.help-note li + li { margin-top: 8px; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin: 22px 0; }
.result-stat { min-width: 0; padding: 20px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface-soft); text-align: center; }
.result-value { display: block; margin-bottom: 4px; font-size: 28px; font-weight: 600; line-height: 1.25; letter-spacing: -1px; color: var(--green); }
.result-label { display: block; font-size: 11px; color: var(--muted); }
.lesson-steps { counter-reset: lesson; display: flex; flex-direction: column; gap: 17px; }
.lesson-step { position: relative; padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.lesson-step h3 { margin-bottom: 10px; font-size: 15px; }
.lesson-step p, .lesson-step li { color: var(--ink-soft); font-size: 13px; line-height: 1.95; }
.lesson-step ul, .lesson-step ol { padding-left: 20px; }
.math-line { padding: 13px 16px; margin: 13px 0; border-radius: 10px; background: var(--green-pale); color: var(--green-deep); font-family: Georgia, "Times New Roman", "PingFang SC", serif; font-size: 21px; line-height: 1.65; overflow-wrap: anywhere; }
.example-box { margin: 18px 0; padding: 21px 23px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.example-box h3 { margin-bottom: 11px; font-size: 14px; }
.example-box p { color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.checkpoint { margin-top: 23px; padding: 24px; border: 1px solid var(--green-border); border-radius: 17px; background: #f0fbf4; }
.checkpoint .option-button { background: var(--surface); }
.checkpoint .option-button.selected { background: var(--green-pale); }
.success-note, .warning-note { margin: 16px 0; padding: 16px 18px; border-radius: 12px; font-size: 12px; line-height: 1.85; }
.success-note { background: #e8faef; color: var(--green-deep); border: 1px solid var(--green-border); }
.warning-note { background: #fff4e4; color: #a97b43; border: 1px solid #f1e2c8; }

.report-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(240px, 1fr); gap: 23px; align-items: start; }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.report-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.report-table th { padding: 12px 11px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 500; background: var(--surface-soft); white-space: nowrap; }
.report-table th:first-child { border-top-left-radius: 8px; }
.report-table th:last-child { border-top-right-radius: 8px; }
.report-table td { padding: 15px 11px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.report-table tr:last-child td { border-bottom: 0; }
.report-table td:first-child { color: var(--ink); font-weight: 500; }
.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
.report-list li:first-child { padding-top: 0; border-top: 0; }
.report-list li:last-child { padding-bottom: 0; }
.report-list h4 { margin-bottom: 4px; font-size: 13px; }
.wrong-list { display: flex; flex-direction: column; gap: 17px; }
.wrong-card { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); }
.wrong-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-bottom: 15px; margin-bottom: 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.wrong-header > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.wrong-prompt { margin-bottom: 16px; font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.wrong-answer { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-bottom: 16px; color: var(--ink-soft); font-size: 12px; }
.wrong-answer strong { font-weight: 600; }
.wrong-explanation { padding: 14px 17px; border-radius: 10px; background: var(--surface-soft); color: var(--ink-soft); font-size: 12px; line-height: 1.9; }
.wrong-card .question-actions { margin-top: 17px; padding-top: 0; border-top: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 21px 0; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: #e9f7ee; width: fit-content; max-width: 100%; }
.tab-button { min-height: 33px; padding: 7px 14px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 500; }
.tab-button:hover { color: var(--green); }
.tab-button.active { background: var(--surface); color: var(--green); box-shadow: 0 2px 5px rgba(45, 65, 31, 0.05); }
.toast { position: fixed; z-index: 100; bottom: 26px; left: 50%; width: max-content; max-width: calc(100% - 34px); transform: translateX(-50%); padding: 12px 20px; border-radius: 11px; color: #fff; background: var(--green); box-shadow: 0 8px 28px rgba(28, 56, 33, 0.18); font-size: 12px; text-align: center; }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(27, 48, 36, 0.38); backdrop-filter: blur(4px); }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 29px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 20px 80px rgba(25, 50, 31, 0.18); }
.modal h2 { margin-bottom: 12px; font-size: 20px; }
.modal p { font-size: 13px; line-height: 1.9; color: var(--ink-soft); }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.footer-note { margin: 28px 0 0; color: var(--muted); font-size: 10px; text-align: center; line-height: 1.85; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.stack > .card + .card { margin-top: 0; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--green-deep); background: #edf9f1; font-size: 10px; font-weight: 500; line-height: 1.4; }
.divider { height: 1px; margin: 22px 0; background: var(--line); }

/* Final composition adjustments for the actual five-step workflow. */
.brand-name, .brand-caption { display: block; }
.brand-caption { font-size: 11px; letter-spacing: .3px; }
.dashboard-grid .journey { display: flex; flex-direction: column; list-style: none; padding: 0; margin: 20px 0 0; gap: 17px; }
.dashboard-grid .journey-step { flex-direction: row; align-items: flex-start; gap: 14px; }
.dashboard-grid .journey-step:not(:last-child)::after { top: 36px; bottom: -14px; left: 16px; right: auto; height: auto; width: 1px; }
.step-copy { border: 0; border-radius: 7px; text-align: left; padding: 0; }
.step-label { display: block; font-size: 13px; }
.step-detail { color: var(--muted); font-size: 11px; }
.section-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 28px 0 16px; }
.section-title h2 { margin: 0; font-size: 21px; }
.empty-state .skill-icon { margin: 0 auto 12px; }
.result-value small { font-size: 16px; font-weight: 400; letter-spacing: 0; }
.skill-status, .skill-description, .task-meta, .skill-footer, .card-description, .help-note, .result-label, .small, .button-small, .badge, .footer-note { font-size: 12px; }
.skill-status, .skill-description, .skill-footer, .result-label { color: var(--ink-soft); }
.skill-name, .task-label { font-size: 15px; }
.report-grid > .card + .card, .wrong-list > .card + .card { margin-top: 0; }
.report-grid { margin-top: 22px; }
.wrong-card label { display: block; margin: 14px 0 6px; }
.wrong-card select, .wrong-card textarea, .modal textarea { width: 100%; }
.lesson-step { display: flex; align-items: flex-start; gap: 13px; padding: 16px; }
.lesson-step p { margin: 0; }
.report-table tbody th { background: transparent; color: var(--ink); font-size: 12px; }

/* Content can stay readable when headings or mathematical expressions get long. */
.card-title, .card-description, .page-title, .page-subtitle, .hero-title,
.hero-description, .skill-name, .skill-description, .task-label, .task-meta,
.help-note, .lesson-step, .report-list, .feedback, .modal { overflow-wrap: break-word; }

@media (min-width: 1500px) {
  .hero { padding: 37px 42px; }
  main#app { padding-top: 40px; }
}

@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-left: 15px; padding-right: 15px; }
  .hero { padding: 28px; grid-template-columns: minmax(0, 1.8fr) minmax(155px, 0.8fr); gap: 15px; }
  .hero-title { font-size: 27px; }
  .card { padding: 21px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(235px, 1fr); gap: 17px; }
  .assessment-layout, .report-grid { gap: 17px; }
  .task-row { gap: 10px; }
  .task-actions .button { padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 960px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 19px 24px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 22px; }
  .brand-name { font-size: 18px; }
  .brand-caption { font-size: 9px; letter-spacing: 1px; margin-top: 2px; }
  .nav-list { flex-direction: row; gap: 7px; margin-top: 18px; padding: 2px 1px 5px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--green-border) transparent; }
  .nav-button { width: auto; flex: 0 0 auto; min-height: 39px; padding: 8px 12px; font-size: 12px; gap: 8px; border-radius: 9px; white-space: nowrap; }
  .nav-icon { width: 17px; height: 17px; flex-basis: 17px; font-size: 15px; }
  .nav-icon svg { width: 17px; height: 17px; }
  .sidebar-footer { display: none; }
  .topbar { min-height: 62px; padding: 15px 25px; }
  main#app { padding: 27px 25px 24px; }
  .page-heading { margin-bottom: 22px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.8fr) minmax(235px, 1fr); }
}

@media (max-width: 740px) {
  .dashboard-grid, .assessment-layout, .report-grid { grid-template-columns: 1fr; gap: 17px; }
  .hero { padding: 25px; gap: 14px; grid-template-columns: minmax(0, 1.7fr) minmax(135px, 0.8fr); }
  .hero-title { font-size: 25px; }
  .hero-description { font-size: 12px; }
  .hero-art { min-height: 155px; }
  .card { padding: 23px; }
  .assessment-main > .card { padding: 25px; }
  .assessment-aside .card { padding: 21px; }
  .assessment-aside .help-note ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 25px; }
  .assessment-aside .help-note li + li { margin-top: 0; }
  .report-grid > .card + .card { margin-top: 0; }
  .task-actions .button { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 520px) {
  .sidebar { padding: 16px 17px 10px; }
  .topbar { padding: 13px 18px; min-height: 58px; }
  .topbar-actions { gap: 9px; }
  .topbar .pill { font-size: 9px; padding: 5px 8px; }
  .breadcrumb { font-size: 11px; gap: 6px; }
  .avatar { width: 29px; height: 29px; flex-basis: 29px; font-size: 10px; }
  main#app { padding: 24px 17px; }
  .page-title { font-size: 26px; }
  .page-subtitle { font-size: 12px; }
  .hero { grid-template-columns: 1fr; padding: 24px; margin-bottom: 18px; border-radius: 19px; }
  .hero-title { font-size: 27px; }
  .hero-description { margin-bottom: 18px; font-size: 12px; }
  .hero-art { min-height: 0; height: 142px; width: 100%; margin-top: 1px; }
  .hero-art .svg-art { max-width: 220px; max-height: 145px; }
  .hero-meta { gap: 6px 12px; font-size: 10px; margin-top: 13px; }
  .card { padding: 20px; border-radius: 17px; }
  .card + .card { margin-top: 17px; }
  .card-header { gap: 12px; margin-bottom: 18px; }
  .card-title { font-size: 15px; }
  .card-description { font-size: 10px; }
  .card-header .button-small { padding: 6px 9px; font-size: 10px; }
  .journey { gap: 10px; margin: 20px 0 24px; }
  .journey-step:not(:last-child)::after { left: 36px; top: 14px; }
  .step-number { width: 29px; height: 29px; flex-basis: 29px; font-size: 10px; }
  .step-label { font-size: 11px; }
  .step-detail { font-size: 9px; }
  .skill-grid { gap: 10px; }
  .skill-card { padding: 14px; border-radius: 12px; }
  .skill-top { margin-bottom: 12px; }
  .skill-icon { width: 26px; height: 26px; flex-basis: 26px; font-size: 15px; }
  .skill-status { font-size: 8px; padding: 3px 5px; }
  .skill-name { font-size: 12px; }
  .skill-description { font-size: 9px; }
  .skill-footer { font-size: 8px; gap: 5px; }
  .task-row { gap: 10px; }
  .task-icon { width: 31px; height: 31px; flex-basis: 31px; border-radius: 10px; }
  .task-label { font-size: 12px; }
  .task-meta { font-size: 9px; }
  .task-actions .button { font-size: 10px; min-height: 32px; padding: 6px 9px; }
  .assessment-main > .card { padding: 21px; }
  .question-title { font-size: 17px; line-height: 1.9; margin-bottom: 20px; }
  .question-meta { font-size: 10px; gap: 7px; }
  .option-button { min-height: 57px; padding: 11px 13px; gap: 12px; }
  .option-copy { font-size: 13px; }
  .question-actions { gap: 8px; }
  .question-actions .button { padding: 9px 12px; font-size: 12px; }
  .assessment-aside .help-note ul { display: block; }
  .assessment-aside .help-note li + li { margin-top: 7px; }
  .result-grid { gap: 9px; }
  .result-stat { padding: 18px 8px; }
  .result-value { font-size: 25px; }
  .result-label { font-size: 10px; }
  .lesson-step { padding: 19px; }
  .lesson-step p, .lesson-step li { font-size: 12px; }
  .math-line { font-size: 19px; padding: 11px 13px; }
  .example-box { padding: 19px; }
  .checkpoint { padding: 20px; }
  .wrong-card { padding: 20px; }
  .wrong-prompt { font-size: 15px; }
  .wrong-answer { font-size: 11px; gap: 6px 15px; }
  .wrong-explanation { font-size: 11px; }
  .report-table { font-size: 11px; }
  .report-table th, .report-table td { padding-left: 8px; padding-right: 8px; }
  .modal-backdrop { padding: 17px; }
  .modal { max-height: calc(100vh - 34px); padding: 24px; }
  .modal-actions { gap: 8px; }
  .footer-note { margin-top: 23px; font-size: 9px; }
}

@media (max-width: 359px) {
  main#app { padding-left: 13px; padding-right: 13px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .topbar .pill { display: none; }
  .card { padding: 17px; }
  .hero { padding: 20px; }
  .hero-title { font-size: 25px; }
  .skill-grid { grid-template-columns: 1fr; }
  .skill-card { padding: 16px; }
  .skill-description { font-size: 10px; }
  .skill-footer { font-size: 9px; }
  .journey { gap: 7px; }
  .step-label { font-size: 10px; }
  .step-detail { font-size: 8px; }
  .card-header { flex-wrap: wrap; }
  .question-actions .button { padding: 9px 10px; font-size: 11px; }
}

@media (max-width: 520px) {
  .skill-grid { grid-template-columns: 1fr; }
  .skill-status, .skill-description, .task-meta, .skill-footer, .card-description, .help-note, .result-label, .small, .button-small, .badge, .footer-note { font-size: 12px; }
  .skill-name, .task-label { font-size: 15px; }
  .dashboard-grid .step-label { font-size: 13px; }
  .dashboard-grid .step-detail { font-size: 12px; }
  .dashboard-grid .journey-step:not(:last-child)::after { left: 14px; top: 32px; }
  .hero-meta { font-size: 11px; }
  .task-row { align-items: flex-start; flex-wrap: wrap; }
  .task-content { flex-basis: calc(100% - 46px); }
  .task-actions { padding-left: 41px; }
  .result-grid { gap: 6px; }
  .result-value small { font-size: 13px; }
  .topbar-actions { gap: 6px; }
  .topbar .pill { display: none; }
}

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

@media print {
  @page { size: A4; margin: 16mm; }
  :root { color: var(--ink); background: white; font-size: 10pt; }
  body { min-width: 0; background: white; }
  .app-shell { display: block; min-height: 0; }
  .sidebar, .topbar-actions, .button, .tabs, .toast, .modal-backdrop, .footer-note { display: none !important; }
  .topbar { min-height: 0; padding: 0 0 10mm; border-bottom: 0; background: none; }
  .breadcrumb { font-size: 9pt; }
  main#app { padding: 0; }
  .page { max-width: none; }
  .page-heading { margin-bottom: 8mm; }
  .page-title { font-size: 22pt; }
  .hero { padding: 7mm; margin-bottom: 6mm; background: var(--green-pale); }
  .hero-art { min-height: 100px; }
  .dashboard-grid, .assessment-layout, .report-grid { display: block; }
  .card, .wrong-card, .lesson-step, .checkpoint { margin-top: 6mm; padding: 6mm; box-shadow: none; border-color: var(--line); border-radius: 3mm; break-inside: avoid; }
  .report-grid > .card + .card, .dashboard-grid > .card + .card { margin-top: 6mm; }
  .card-header { margin-bottom: 4mm; }
  .report-table { font-size: 9pt; }
  .table-wrap { overflow: visible; }
  .result-grid { margin: 6mm 0; }
  .report-table tr, .report-list li, .wrong-header { break-inside: avoid; }
  .report-table thead { display: table-header-group; }
  .assessment-aside { display: none; }
  a { color: inherit; text-decoration: none; }
  svg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
