:root {
  color-scheme: light;
  --ink: #18263e;
  --ink-soft: #46536a;
  --muted: #7b8797;
  --line: #e4e8e8;
  --paper: #f6f7f3;
  --white: #fff;
  --navy: #17263f;
  --navy-light: #253550;
  --green: #2d8175;
  --green-soft: #e5f1ed;
  --orange: #d97852;
  --orange-soft: #fbede6;
  --blue-soft: #e8edf5;
  --shadow: 0 18px 45px rgba(25, 44, 66, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
button, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(45, 129, 117, .45);
  outline-offset: 3px;
}
a { color: inherit; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  display: flex;
  width: 264px;
  flex-direction: column;
  padding: 25px 17px 18px;
  background: var(--navy);
  color: #f4f6f8;
}
.sidebar[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 29px; text-decoration: none; }
.brand-mark { position: relative; display: grid; width: 36px; height: 36px; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; transform: rotate(-8deg); }
.brand-mark span { border: 1px solid #91bdb4; border-radius: 4px; }
.brand-mark span:nth-child(2) { background: #72a99e; border-color: #72a99e; }
.brand-mark span:nth-child(3) { background: #d67d58; border-color: #d67d58; }
.brand-mark i, .brand-mark b { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #f3dfb9; }
.brand-mark i { top: 0; right: -3px; }
.brand-mark b { bottom: -2px; left: -3px; background: #99b5cd; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; letter-spacing: .04em; }
.brand-copy strong { font-size: 15px; font-weight: 700; }
.brand-copy small { margin-top: 4px; color: #9eabc0; font-size: 10px; letter-spacing: .18em; }
.sidebar-label { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 11px; color: #9eabc0; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.sidebar-label span { color: #c7d0dc; font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0; }
.lesson-nav { display: flex; flex: 1; flex-direction: column; gap: 4px; overflow-y: auto; padding: 0 0 18px; }
.nav-item {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 28px 1fr 16px;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #c3cbd6;
  text-align: left;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: white; }
.nav-item.active { border-color: rgba(160, 202, 190, .12); background: #263852; color: #fff; }
.nav-number { color: #8290a6; font-family: "DM Mono", monospace; font-size: 11px; }
.nav-item.active .nav-number { color: #a7cfc2; }
.nav-title { overflow: hidden; font-size: 12px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.nav-status { color: #90bfb2; font-size: 13px; text-align: center; }
.nav-item.done .nav-status { color: #8ec8a2; }
.sidebar-progress { margin: auto 7px 17px; padding: 14px 13px 12px; border: 1px solid rgba(208,222,231,.14); border-radius: 9px; background: rgba(255,255,255,.035); }
.progress-heading { display: flex; justify-content: space-between; color: #b6c0cf; font-size: 11px; }
.progress-heading strong { color: #fff; font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500; }
.progress-track { height: 5px; margin: 10px 0 8px; overflow: hidden; border-radius: 5px; background: #3a4a62; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #82b7a7; transition: width .35s ease; }
.sidebar-progress p { margin: 0; color: #8593a8; font-size: 10px; }
.sidebar-foot { display: flex; align-items: center; gap: 7px; padding: 0 9px; color: #8290a6; font-size: 10px; }
.sidebar-foot > span:last-child { line-height: 1.65; }
.local-dot { width: 6px; height: 6px; border-radius: 50%; background: #80b49f; box-shadow: 0 0 0 3px rgba(128,180,159,.12); }

.main-content { min-height: 100vh; margin-left: 264px; padding: 0 48px; }
.topbar { display: flex; height: 66px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6e9e5; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #788393; font-size: 11px; }
.breadcrumb strong { color: #3d4b60; font-weight: 600; }
.crumb-slash { color: #bac1c8; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.version-pill { padding: 5px 9px; border: 1px solid #e1e5e2; border-radius: 5px; color: #687586; font-family: "DM Mono", monospace; font-size: 10px; }
.text-button { padding: 5px 0; border: 0; background: none; color: #8a95a1; font-size: 11px; }
.text-button:hover { color: var(--orange); }
.text-button:disabled { cursor: not-allowed; opacity: .45; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 252px; align-items: start; gap: 21px; }
.lesson-column { min-width: 0; }
.lesson-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 3px 0 16px; }
.chapter-overline { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--green); font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.chapter-number { display: inline-grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: var(--green-soft); font-size: 10px; letter-spacing: 0; }
.lesson-heading h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.03em; line-height: 1.3; }
.lesson-subtitle { margin: 6px 0 0; color: #748091; font-size: 11px; }
.unit-state { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-top: 23px; padding: 6px 8px; border: 1px solid #e1e6e2; border-radius: 20px; color: #778392; font-size: 9px; }
.unit-state.done { border-color: #c8e0d6; background: #f0f7f3; color: var(--green); }
.unit-state-dot { width: 5px; height: 5px; border-radius: 50%; background: #b9c2c4; }
.unit-state.done .unit-state-dot { background: var(--green); }

.chapter-intro { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 10px; margin-bottom: 13px; padding: 13px 15px; border: 1px solid #e4ebe5; border-left: 3px solid #8fb7a3; border-radius: 7px; background: #f8faf7; }
.intro-label { padding-top: 2px; color: #56816e; font-size: 9px; font-weight: 700; white-space: nowrap; }
.chapter-intro p { margin: 0; color: #68796e; font-size: 11px; line-height: 1.8; }
.chapter-lead { display: flex; align-items: flex-start; gap: 11px; margin-top: 16px; padding: 13px 15px; border: 1px solid #dfe9e2; border-radius: 8px; background: #f4f8f4; }
.lead-icon { display: grid; flex: 0 0 auto; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: #e3efe6; color: #58816b; font-size: 12px; }
.chapter-lead strong { display: block; margin: 1px 0 4px; color: #4d7560; font-size: 10px; }
.chapter-lead p { margin: 0; color: #6e7f72; font-size: 10px; line-height: 1.75; }
.annotation-highlight { padding: 0 1px; border-radius: 2px; background: rgba(230, 184, 127, .12); color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: #cf7954; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.annotation-highlight:hover, .annotation-highlight:focus-visible { background: rgba(230, 184, 127, .3); }
.annotation-popover { position: fixed; z-index: 20; width: min(320px, calc(100vw - 24px)); max-height: min(65vh, 420px); overflow: auto; padding: 13px; border: 1px solid #dce4df; border-radius: 9px; background: #fff; box-shadow: 0 14px 36px rgba(25, 44, 66, .18); color: #46536a; font-size: 11px; }
.annotation-popover[hidden] { display: none; }
.annotation-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #314258; font-size: 11px; }
.annotation-close { width: 24px; height: 24px; flex: 0 0 auto; border: 0; border-radius: 5px; background: #f2f5f2; color: #687586; font-size: 17px; line-height: 1; }
.annotation-quote { max-height: 115px; overflow: auto; margin: 10px 0; padding: 8px 9px; border-left: 2px solid #d98863; background: #fbf7f2; color: #746251; font-size: 10px; line-height: 1.7; white-space: pre-wrap; }
.annotation-comment-text { margin: 9px 0; color: #536174; font-size: 11px; line-height: 1.75; overflow-wrap: anywhere; }
.annotation-meta { color: #9aa3aa; font-size: 9px; }
.annotation-label { display: block; margin: 10px 0 5px; color: #536174; font-size: 10px; font-weight: 700; }
.annotation-input { display: block; width: 100%; min-height: 90px; resize: vertical; padding: 9px; border: 1px solid #dfe6e1; border-radius: 6px; color: #46536a; font-size: 11px; line-height: 1.65; }
.annotation-input::placeholder { color: #a2aaa9; }
.annotation-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.annotation-delete { color: #b36243; }

.learning-card, .practice-card { border: 1px solid #e5e9e5; border-radius: 9px; background: var(--white); box-shadow: 0 2px 8px rgba(22,40,62,.025); }
.learning-card { padding: 20px 22px 18px; }
.recap-card { margin-top: 15px; }
.section-label { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #4d5d6f; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.section-label .label-mark { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 5px; background: var(--blue-soft); color: #576984; font-size: 10px; }
.learning-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.learning-point { min-height: 98px; padding: 13px 14px; border: 1px solid #edf0ed; border-radius: 7px; background: #fcfcfa; }
.learning-point h3 { margin: 0 0 5px; color: #314258; font-size: 11px; font-weight: 700; }
.learning-point p { margin: 0; color: #738091; font-size: 10px; line-height: 1.75; }
.learning-point strong { color: #516a64; font-weight: 700; }
.scenario-box { display: flex; gap: 12px; margin-top: 13px; padding: 12px 14px; border-left: 2px solid #d98863; border-radius: 0 6px 6px 0; background: #fbf5f0; }
.scenario-card .scenario-box { margin-top: 0; }
.scenario-icon { flex: 0 0 auto; color: #c57956; font-size: 13px; }
.scenario-box strong { display: block; margin-bottom: 2px; color: #775846; font-size: 10px; }
.scenario-box p { margin: 0; color: #816d5e; font-size: 10px; line-height: 1.7; }

.study-card, .walkthrough-card, .misconception-card, .resources-card { margin-top: 15px; border: 1px solid #e5e9e5; border-radius: 9px; background: var(--white); box-shadow: 0 2px 8px rgba(22,40,62,.025); }
.study-card, .walkthrough-card, .misconception-card, .resources-card { padding: 20px 22px; }
.study-lead { margin: -3px 0 15px; color: #829087; font-size: 10px; line-height: 1.65; }
.study-sections { display: grid; gap: 0; }
.study-section { padding: 2px 0 0; }
.study-section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.study-section-heading > span { display: grid; flex: 0 0 auto; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: #eef4f1; color: #608173; font-family: "DM Mono", monospace; font-size: 9px; }
.study-section-heading h3, .walkthrough-card > h3 { margin: 0; color: #304258; font-size: 14px; font-weight: 700; line-height: 1.5; }
.study-section p, .walkthrough-intro { margin: 7px 0 0; color: #667587; font-size: 12px; line-height: 1.9; }
.study-section ul { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 18px; color: #63776f; font-size: 11px; line-height: 1.8; }
.concept-bridge { position: relative; margin: 12px 0 17px 11px; padding: 0 0 0 16px; border-left: 1px solid #cddfd2; }
.bridge-arrow { position: absolute; top: 0; left: -9px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #e8f1ea; color: #5e8d73; font-size: 11px; }
.concept-bridge > div { padding: 8px 11px; border: 1px solid #e8eee8; border-radius: 6px; background: #f8faf7; }
.concept-bridge strong { display: block; margin-bottom: 3px; color: #527361; font-size: 9px; }
.concept-bridge p { margin: 0; color: #718074; font-size: 10px; line-height: 1.75; }
.walkthrough-card { border-color: #e7dfd4; background: #fbf8f3; }
.walkthrough-card .label-mark { background: #f4ece2; color: #a2734f; }
.walkthrough-card > h3 { margin-top: 2px; }
.walkthrough-intro { margin-top: 5px; color: #806c5c; }
.walkthrough-card ol { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; counter-reset: walkthrough; }
.walkthrough-card li { position: relative; min-height: 25px; padding-left: 34px; color: #6e6a63; font-size: 11px; line-height: 1.75; counter-increment: walkthrough; }
.walkthrough-card li:before { position: absolute; top: 0; left: 0; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #f1e7db; color: #a06e48; content: counter(walkthrough); font-family: "DM Mono", monospace; font-size: 9px; }
.walkthrough-close { margin: 13px 0 0; padding: 9px 11px; border: 1px solid #eee5d9; border-radius: 6px; background: #fffdf9; color: #7b6c5d; font-size: 10px; line-height: 1.7; }
.walkthrough-close strong { margin-right: 7px; color: #a06e48; }
.misconception-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.misconception { padding: 12px 13px; border: 1px solid #edf0ed; border-radius: 7px; background: #fcfcfa; }
.misconception h4 { margin: 0 0 5px; color: #536276; font-size: 11px; }
.misconception p { margin: 0; color: #748091; font-size: 10px; line-height: 1.75; }
.resource-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.resource-link { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 11px; border: 1px solid #e8ece8; border-radius: 6px; background: #fcfdfa; color: inherit; text-decoration: none; transition: border-color .16s ease, background .16s ease; }
.resource-link:hover { border-color: #a9c8bb; background: #f4f8f4; }
.resource-link strong { display: block; color: #486b60; font-size: 10px; line-height: 1.55; }
.resource-link small { display: block; margin-top: 3px; color: #818c97; font-size: 9px; line-height: 1.55; }
.resource-link i { flex: 0 0 auto; color: #92a79d; font-size: 11px; font-style: normal; }

.practice-card { margin-top: 15px; overflow: hidden; }
.practice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 17px 20px 13px; border-bottom: 1px solid #eef0ed; }
.practice-title-wrap { display: flex; gap: 10px; }
.practice-icon { display: grid; flex: 0 0 auto; width: 25px; height: 25px; place-items: center; border-radius: 7px; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 700; }
.practice-heading h3 { margin: 0; color: #293a51; font-size: 12px; font-weight: 700; }
.practice-heading p { margin: 3px 0 0; color: #84909b; font-size: 9px; }
.practice-tag { flex: 0 0 auto; padding: 4px 7px; border-radius: 4px; background: #f2f4f1; color: #768292; font-family: "DM Mono", monospace; font-size: 8px; }
.practice-body { padding: 15px 20px 18px; }
.prompt { margin: 0 0 12px; color: #4b596a; font-size: 11px; line-height: 1.75; }
.choice-list { display: grid; gap: 7px; }
.choice-option { display: flex; width: 100%; align-items: flex-start; gap: 9px; padding: 9px 11px; border: 1px solid #e9ece9; border-radius: 6px; background: #fff; color: #536174; text-align: left; font-size: 10px; line-height: 1.6; transition: border .18s ease, background .18s ease; }
.choice-option:hover { border-color: #aecfc3; background: #fbfdfb; }
.choice-option.selected { border-color: #75aa9b; background: #f1f8f4; color: #315e55; }
.choice-option.correct { border-color: #8dc4a3; background: #eff8f0; }
.choice-option.incorrect { border-color: #e3a58c; background: #fff5f1; }
.choice-letter { display: grid; flex: 0 0 auto; width: 18px; height: 18px; place-items: center; border: 1px solid #dde3df; border-radius: 50%; color: #7f8b98; font-family: "DM Mono", monospace; font-size: 8px; }
.choice-option.selected .choice-letter { border-color: #75aa9b; background: #75aa9b; color: white; }
.exercise-actions { display: flex; align-items: center; gap: 9px; margin-top: 13px; }
.small-primary, .small-secondary { display: inline-flex; min-height: 31px; align-items: center; justify-content: center; padding: 0 11px; border-radius: 5px; font-size: 9px; font-weight: 700; }
.small-primary { border: 1px solid var(--green); background: var(--green); color: white; }
.small-primary:hover { border-color: #246e64; background: #246e64; }
.small-secondary { border: 1px solid #e0e5e0; background: #fff; color: #6d7988; }
.small-secondary:hover { border-color: #bbc9c2; color: #345c55; }
.feedback { min-height: 18px; margin: 10px 0 0; color: #778592; font-size: 10px; }
.feedback.success { color: #287863; }
.feedback.error { color: #b36243; }

.code-editor { display: block; width: 100%; min-height: 170px; resize: vertical; padding: 13px 14px; border: 1px solid #293a52; border-radius: 6px; background: #19283d; color: #dce8e5; font-family: "DM Mono", "SFMono-Regular", Consolas, monospace; font-size: 10px; line-height: 1.75; tab-size: 2; }
.code-editor::placeholder { color: #94a3b4; }
.editor-caption { display: flex; justify-content: space-between; margin: 6px 0 0; color: #8a96a4; font-size: 8px; }
.editor-caption span:first-child { color: #8fb9ac; }
.editor-short { min-height: 150px; }
.check-list { display: grid; gap: 6px; margin: 11px 0 0; }
.check-row { display: flex; align-items: flex-start; gap: 7px; color: #778493; font-size: 9px; }
.check-row .check-symbol { color: #b1b9be; font-size: 11px; line-height: 1.3; }
.check-row.pass { color: #3b7d68; }
.check-row.pass .check-symbol { color: #3b9b76; }
.hint-box { margin-top: 10px; padding: 9px 11px; border-radius: 5px; background: #f3f6f2; color: #768477; font-size: 9px; line-height: 1.65; }
.mapping-list { display: grid; gap: 7px; }
.mapping-row { display: grid; grid-template-columns: minmax(115px, 1fr) 20px minmax(150px, 1.2fr); align-items: center; gap: 8px; }
.mapping-source { overflow: hidden; padding: 7px 8px; border: 1px solid #e9ece9; border-radius: 5px; background: #fafbf9; color: #526176; font-family: "DM Mono", "PingFang SC", sans-serif; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mapping-arrow { color: #9ca9a6; text-align: center; }
.mapping-select { width: 100%; min-height: 31px; padding: 5px 7px; border: 1px solid #e2e7e3; border-radius: 5px; background: #fff; color: #596779; font-size: 9px; }
.score-grid { display: grid; gap: 11px; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 24px; align-items: center; gap: 10px; }
.score-row label { color: #5b6878; font-size: 10px; }
.score-row input { width: 100%; accent-color: var(--green); }
.score-row output { color: #3e7468; font-family: "DM Mono", monospace; font-size: 10px; text-align: right; }
.score-summary { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; padding: 10px 11px; border-radius: 6px; background: #f2f6f2; color: #647466; font-size: 9px; }
.score-summary strong { color: #2d7465; font-family: "DM Mono", monospace; font-size: 12px; }
.path-result { margin-top: 11px; padding: 11px; border: 1px solid #e1e9e3; border-radius: 6px; background: #f8fbf8; }
.path-result strong { display: block; margin-bottom: 7px; color: #477363; font-size: 9px; }
.path-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.path-node { padding: 4px 6px; border: 1px solid #dbe7df; border-radius: 4px; background: #fff; color: #546777; font-family: "DM Mono", monospace; font-size: 8px; }
.path-arrow { color: #a3b1a8; font-size: 9px; }
.path-evidence-list { display: grid; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e7ede8; }
.path-evidence { display: flex; flex-wrap: wrap; gap: 4px 9px; color: #748476; font-size: 8px; line-height: 1.6; }
.path-evidence strong { display: inline; margin: 0; color: #557568; font-size: 8px; }

.lesson-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 2px 0; border-top: 1px solid #e4e8e4; }
.deliverable { color: #798694; font-size: 9px; }
.deliverable strong { margin-right: 5px; color: #526174; }
.footer-actions { display: flex; gap: 7px; }
.complete-button { display: inline-flex; min-height: 32px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #9abcb1; border-radius: 5px; background: #f0f7f3; color: #3c7c6c; font-size: 9px; font-weight: 700; }
.complete-button:disabled { cursor: not-allowed; opacity: .45; }
.complete-button:not(:disabled):hover { background: #e4f2eb; }
.complete-button.done { border-color: #5a9b83; background: #e5f2e9; }
.complete-button .complete-check { font-size: 12px; }
.step-button { min-height: 32px; padding: 0 9px; border: 1px solid #e1e6e1; border-radius: 5px; background: #fff; color: #6c7988; font-size: 9px; }
.step-button:hover:not(:disabled) { border-color: #afc8bd; color: #3b7365; }
.step-button:disabled { cursor: not-allowed; opacity: .4; }

.lesson-aside { position: sticky; top: 20px; display: grid; gap: 12px; }
.aside-card { padding: 15px 15px 14px; border: 1px solid #e5e9e5; border-radius: 8px; background: #fff; }
.aside-label { display: flex; align-items: center; gap: 7px; margin-bottom: 11px; color: #506075; font-size: 10px; font-weight: 700; }
.aside-label span { color: var(--green); font-size: 12px; }
.objective-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.objective-list li { display: flex; align-items: flex-start; gap: 7px; color: #758191; font-size: 9px; line-height: 1.6; }
.objective-list li:before { flex: 0 0 auto; width: 5px; height: 5px; margin-top: 5px; border: 1px solid #7aa899; border-radius: 50%; content: ""; }
.output-card { background: #eff5f1; }
.output-card .aside-label { color: #416c5e; }
.output-card p { margin: 0; color: #668073; font-size: 10px; line-height: 1.7; }
.tip-card { position: relative; overflow: hidden; }
.tip-card:after { position: absolute; right: -16px; bottom: -29px; width: 90px; height: 90px; border: 1px solid #e5eae4; border-radius: 50%; content: ""; }
.tip-card p { margin: 0; color: #7d8895; font-size: 9px; line-height: 1.7; }
.tip-card strong { color: #53666b; }

.workspace.home-workspace { grid-template-columns: minmax(0, 1fr); }
.lesson-aside[hidden] { display: none; }
.home-view { display: grid; gap: 27px; padding-top: 24px; }
.home-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, .78fr); align-items: center; gap: 30px; min-height: 340px; overflow: hidden; padding: 34px; border: 1px solid rgba(174, 204, 192, .12); border-radius: 14px; background: radial-gradient(ellipse at 4% 0%, rgba(74, 128, 119, .28), transparent 42%), linear-gradient(118deg, #17263f 0%, #1d3047 58%, #25464a 100%); box-shadow: 0 18px 45px rgba(25, 44, 66, .1); color: #f5f7f5; }
.home-hero:after { position: absolute; right: 32%; bottom: -178px; width: 340px; height: 340px; border: 1px solid rgba(197, 221, 206, .08); border-radius: 50%; content: ""; pointer-events: none; }
.home-hero-copy { position: relative; z-index: 1; max-width: 560px; }
.home-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 15px; color: #a8c8bb; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .13em; }
.home-eyebrow span { width: 6px; height: 6px; border-radius: 50%; background: #d58965; box-shadow: 0 0 0 4px rgba(213, 137, 101, .13); }
.home-hero h1 { margin: 0; color: #fbfcfa; font-size: clamp(28px, 3.15vw, 39px); font-weight: 650; letter-spacing: -.045em; line-height: 1.22; }
.home-intro { max-width: 535px; margin: 15px 0 20px; color: #bdc9cd; font-size: 12px; line-height: 1.9; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.home-primary { display: inline-flex; min-height: 40px; align-items: center; gap: 15px; padding: 0 15px; border: 1px solid #83b5a3; border-radius: 6px; background: #8bb9a7; color: #183342; font-size: 11px; font-weight: 750; transition: background .16s ease, transform .16s ease; }
.home-primary:hover { transform: translateY(-1px); background: #a0cbb8; }
.home-primary span { font-size: 15px; line-height: 1; }
.home-secondary { display: inline-flex; align-items: center; gap: 7px; padding: 8px 0; color: #d0d8d8; font-size: 10px; text-decoration: none; }
.home-secondary:hover { color: white; }
.home-secondary span { color: #9fc5b5; font-size: 13px; }
.home-start-note { margin: 10px 0 0; color: #8799a8; font-size: 9px; }
.home-route { position: relative; z-index: 1; padding: 18px 19px 14px; border: 1px solid rgba(231, 239, 232, .78); border-radius: 10px; background: rgba(248, 250, 246, .97); color: var(--ink); box-shadow: 0 12px 30px rgba(10, 25, 38, .16); }
.route-heading { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid #e8ece7; color: #5d6e70; font-size: 9px; font-weight: 700; }
.route-pulse { width: 6px; height: 6px; border-radius: 50%; background: #d77e5a; box-shadow: 0 0 0 4px #f8ebe4; }
.route-case { margin-left: auto; padding: 3px 6px; border-radius: 4px; background: #eef3ed; color: #748579; font-family: "DM Mono", monospace; font-size: 8px; font-weight: 500; }
.route-steps { display: grid; gap: 7px; padding: 12px 0 8px; }
.route-step { display: grid; grid-template-columns: 24px minmax(0, 1fr) 17px; align-items: center; gap: 9px; min-height: 43px; padding: 5px 8px; border: 1px solid #edf0ec; border-radius: 6px; background: #fff; }
.route-step-index { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: #edf4ef; color: #5b8676; font-family: "DM Mono", monospace; font-size: 8px; }
.route-step > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.route-step small { color: #84918f; font-size: 8px; line-height: 1.35; }
.route-step strong { overflow: hidden; color: #3d5260; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.route-step > i { color: #a1b5aa; font-size: 11px; font-style: normal; }
.route-step-final { border-color: #dce9de; background: #f5f9f3; }
.route-step-final .route-step-index { background: #e2efe5; color: #3d8168; }
.route-check { color: #43856d; font-size: 13px; text-align: center; }
.route-footnote { margin: 0; padding-top: 10px; border-top: 1px solid #e8ece7; color: #7f8c87; font-size: 8px; }
.home-course { display: grid; gap: 15px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.home-section-kicker { margin: 0 0 4px; color: #789383; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .12em; }
.home-section-heading h2 { margin: 0; color: #263951; font-size: 19px; font-weight: 700; letter-spacing: -.025em; }
.home-section-heading > div:first-child > p:last-child { margin: 5px 0 0; color: #84908f; font-size: 10px; }
.home-progress { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 7px; min-width: 110px; }
.home-progress strong { color: #3e796b; font-family: "DM Mono", monospace; font-size: 14px; font-weight: 600; }
.home-progress strong span { color: #a2ada8; font-size: 10px; }
.home-progress small { color: #8a9694; font-size: 8px; }
.home-progress-track { grid-column: 1 / -1; height: 4px; margin-top: 5px; overflow: hidden; border-radius: 4px; background: #e8ece7; }
.home-progress-track span { display: block; height: 100%; border-radius: inherit; background: #7eae9d; transition: width .25s ease; }
.home-unit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.home-unit { position: relative; display: flex; min-width: 0; min-height: 95px; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 13px; border: 1px solid #e4e9e4; border-radius: 8px; background: #fff; color: inherit; text-align: left; box-shadow: 0 2px 8px rgba(22,40,62,.02); transition: border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease; }
.home-unit:hover { transform: translateY(-2px); border-color: #a6c6b6; background: #fcfefb; box-shadow: 0 8px 18px rgba(22, 55, 47, .07); }
.home-unit-top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 5px; color: #84958e; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .03em; }
.home-unit-status { overflow: hidden; color: #9aa49f; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.home-unit > strong { max-width: calc(100% - 15px); color: #34465a; font-size: 11px; font-weight: 650; line-height: 1.55; }
.home-unit-arrow { position: absolute; right: 12px; bottom: 12px; color: #a5b6ad; font-size: 11px; }
.home-unit.is-done { border-color: #d5e6d9; background: #f8fbf7; }
.home-unit.is-done .home-unit-status { color: #4c8b70; }
.home-note { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid #e5ebe4; border-radius: 7px; background: #f2f6f1; }
.home-note-icon { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: #e1ece1; color: #5d8872; font-size: 12px; }
.home-note p { margin: 0; color: #7a897f; font-size: 9px; line-height: 1.65; }
.home-note strong { color: #4d7060; }
.page-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 34px; padding: 15px 0 22px; border-top: 1px solid #e5e9e5; color: #9aa3aa; font-family: "DM Mono", "PingFang SC", monospace; font-size: 8px; letter-spacing: .03em; }
.github-link { display: inline-flex; min-width: 0; align-items: center; gap: 5px; margin-left: auto; color: #939e9f; font-family: "DM Mono", "PingFang SC", monospace; font-size: 8px; letter-spacing: 0; text-decoration: none; transition: color .16s ease; }
.github-link svg { width: 13px; height: 13px; flex: 0 0 auto; }
.github-link:hover { color: #526b68; }
.toast { position: fixed; z-index: 10; right: 25px; bottom: 24px; max-width: 320px; padding: 11px 14px; border-radius: 7px; background: #20354b; color: #f4f7f5; box-shadow: var(--shadow); font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (min-width: 1500px) {
  .main-content { padding-right: 60px; padding-left: 60px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 270px; gap: 25px; }
}
@media (max-width: 1180px) {
  .main-content { padding-right: 30px; padding-left: 30px; }
  .workspace { grid-template-columns: minmax(0,1fr) 225px; gap: 14px; }
}
@media (max-width: 940px) {
  .sidebar { width: 220px; padding-right: 12px; padding-left: 12px; }
  .main-content { margin-left: 220px; padding-right: 22px; padding-left: 22px; }
  .workspace { grid-template-columns: 1fr; }
  .lesson-aside { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(255px, .82fr); gap: 18px; padding: 27px; }
  .home-unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; padding: 10px 13px 9px; }
  .brand { padding: 0 2px 9px; }
  .brand-mark { width: 27px; height: 27px; gap: 3px; }
  .brand-copy strong { font-size: 12px; }
  .brand-copy small { display: none; }
  .sidebar-label, .sidebar-progress, .sidebar-foot { display: none; }
  .lesson-nav { flex: 0 0 auto; flex-direction: row; gap: 5px; overflow-x: auto; padding: 0 0 1px; scrollbar-width: thin; }
  .nav-item { display: flex; width: 32px; min-width: 32px; min-height: 30px; justify-content: center; padding: 3px; border-radius: 5px; }
  .nav-title, .nav-status { display: none; }
  .nav-number { color: #c1cbd5; font-size: 9px; }
  .nav-item.active { border-color: rgba(160,202,190,.15); background: #31445e; }
  .nav-item.active .nav-number { color: #a7cfc2; }
  .main-content { margin-left: 0; padding: 0 15px; }
  .topbar { height: auto; min-height: 48px; gap: 7px; padding: 5px 0; }
  .breadcrumb { font-size: 9px; gap: 6px; }
  .topbar-actions { gap: 8px; }
  .version-pill { display: none; }
  .text-button { font-size: 9px; }
  .workspace { gap: 12px; }
  .lesson-heading { margin-bottom: 12px; }
  .lesson-heading h2 { font-size: 19px; }
  .lesson-subtitle { font-size: 10px; }
  .unit-state { margin-top: 17px; padding: 5px 7px; }
  .chapter-intro { grid-template-columns: 1fr; gap: 4px; padding: 11px; }
  .chapter-intro p { font-size: 10px; }
  .chapter-lead { padding: 11px; }
  .chapter-lead p { font-size: 9px; }
  .learning-card { padding: 15px 13px 13px; }
  .recap-card { margin-top: 12px; }
  .learning-grid { grid-template-columns: 1fr; gap: 7px; }
  .learning-point { min-height: 0; padding: 11px 12px; }
  .study-card, .walkthrough-card, .misconception-card, .resources-card { padding: 15px 13px; }
  .study-lead { font-size: 9px; }
  .study-sections { gap: 0; }
  .concept-bridge { margin: 10px 0 14px 9px; padding-left: 14px; }
  .concept-bridge p { font-size: 9px; }
  .study-section-heading h3, .walkthrough-card > h3 { font-size: 12px; }
  .study-section p, .walkthrough-intro { font-size: 11px; line-height: 1.85; }
  .study-section ul, .walkthrough-card li { font-size: 10px; }
  .walkthrough-close { font-size: 9px; }
  .misconception-grid, .resource-list { grid-template-columns: 1fr; }
  .scenario-box { padding: 10px; }
  .practice-head { padding: 14px 13px 11px; }
  .practice-body { padding: 13px; }
  .practice-tag { font-size: 7px; }
  .mapping-row { grid-template-columns: minmax(84px,.8fr) 14px minmax(124px,1.2fr); gap: 5px; }
  .score-row { grid-template-columns: minmax(0,1fr) 84px 18px; gap: 6px; }
  .lesson-footer { align-items: flex-start; flex-direction: column; }
  .footer-actions { width: 100%; }
  .complete-button { flex: 1; }
  .lesson-aside { grid-template-columns: 1fr; }
  .aside-card { padding: 13px; }
  .home-view { gap: 21px; padding-top: 15px; }
  .home-hero { grid-template-columns: 1fr; gap: 20px; min-height: 0; padding: 22px 19px 18px; }
  .home-hero:after { right: -150px; bottom: 110px; width: 260px; height: 260px; }
  .home-eyebrow { margin-bottom: 11px; font-size: 7px; letter-spacing: .1em; }
  .home-hero h1 { font-size: 27px; }
  .home-intro { margin: 11px 0 15px; font-size: 10px; line-height: 1.8; }
  .home-actions { gap: 10px; }
  .home-primary { min-height: 37px; }
  .home-start-note { font-size: 8px; }
  .home-route { padding: 13px 12px 11px; }
  .route-steps { gap: 5px; padding: 9px 0 7px; }
  .route-step { min-height: 39px; }
  .home-section-heading { align-items: flex-start; }
  .home-section-heading h2 { font-size: 16px; }
  .home-section-heading > div:first-child > p:last-child { max-width: 235px; font-size: 9px; }
  .home-progress { min-width: 82px; column-gap: 4px; }
  .home-progress strong { font-size: 12px; }
  .home-progress small { font-size: 7px; }
  .home-unit-grid { gap: 7px; }
  .home-unit { min-height: 83px; gap: 9px; padding: 10px; }
  .home-unit-top { font-size: 7px; }
  .home-unit-status { max-width: 56px; font-size: 7px; }
  .home-unit > strong { font-size: 10px; }
  .home-unit-arrow { right: 9px; bottom: 9px; font-size: 10px; }
  .home-note { align-items: flex-start; padding: 10px; }
  .home-note p { font-size: 8px; }
  .page-footer { align-items: flex-start; gap: 9px; flex-direction: column; margin-top: 23px; }
  .github-link { margin-left: 0; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
