/* Shared presentation: readable type, a quiet course menu and one clear accent. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #263f49;
  background: #f6f9f8;
  font-size: 16px;
  line-height: 1.6;
  --ink: #263f49;
  --muted: #5c7079;
  --accent: #16735d;
  --accent-hover: #105b49;
  --accent-soft: #edf7f2;
  --line: #dce6e2;
  --pinyin: #2a659a;
  --meadow-blue: #2a659a;
  --meadow-green: #16735d;
}
body { -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { transition: background-color .15s, border-color .15s, color .15s; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #297863;
  outline-offset: 3px;
}
button:disabled { cursor: default; opacity: .55; }
header {
  min-height: 76px;
  padding: 16px max(24px, calc((100vw - 1360px) / 2));
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
header .brand { color: var(--ink); font-size: 23px; font-weight: 650; letter-spacing: -.65px; }
header .brand b { color: var(--accent); font-weight: 650; }
.brand-button { min-height: 44px; }
.header-actions { display: flex; align-items: center; gap: 28px; }
.header-right { color: var(--muted); font-size: 13px; letter-spacing: .01em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav button { background: transparent; color: var(--muted); border: 0; border-radius: 8px; padding: 9px 14px; min-height: 44px; font-size: 14px; font-weight: 600; }
.site-nav button:hover, .site-nav button[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
main { max-width: 1360px; padding: 28px 24px; grid-template-columns: 252px minmax(0, 1fr); gap: 28px; }
.sidebar { border-color: var(--line); border-radius: 16px; padding: 18px 12px; top: 24px; max-height: calc(100dvh - 48px); box-shadow: none; scrollbar-width: thin; scrollbar-color: #cad7d0 transparent; }
.side-head { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .12em; margin: 4px 10px 24px; }
.level-heading { background: transparent; border-radius: 0; box-shadow: none; padding: 0 10px 0 12px; margin: 24px 0 12px; border-left: 2px solid #9cc6b4; }
.level-heading:first-child { margin-top: 4px; }
.level-kicker { color: var(--muted); font-size: 11px; line-height: 1.4; font-weight: 600; letter-spacing: .055em; }
.level-heading strong { color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.4; margin-top: 4px; }
.level-heading small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.level { position: relative; border: 1px solid transparent; border-left: 3px solid transparent; background: transparent; padding: 10px 30px 10px 10px; margin-bottom: 3px; border-radius: 8px; line-height: 1.4; min-height: 56px; font-weight: 500; }
.level span { float: none; opacity: 1; }
.level .course-number { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 3px; }
.level .course-name { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.level::after { content: ""; position: absolute; right: 12px; top: 26px; width: 6px; height: 6px; border-right: 1.5px solid #758c84; border-bottom: 1.5px solid #758c84; transform: rotate(-45deg); }
.level[aria-expanded="true"]::after { transform: rotate(45deg); top: 23px; }
.level:hover { background: #f3f7f5; }
.level.active { background: var(--accent-soft); color: var(--accent); border: 1px solid #d8e9df; border-left: 3px solid var(--accent); padding-left: 10px; box-shadow: none; }
.level.active .course-name { color: var(--accent); }
.lesson-list { border-left: 1px solid var(--line); margin: 5px 0 12px 13px; padding-left: 8px; gap: 2px; }
.lesson-nav { color: var(--muted); font-size: 13px; font-weight: 500; line-height: 1.5; padding: 9px 10px; min-height: 40px; border-radius: 7px; }
.lesson-nav:hover { background: #f3f7f5; color: var(--ink); }
.lesson-nav.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lesson-nav.done::after { color: var(--accent); }
.intro { background: #edf5f1; color: var(--ink); border: 1px solid #d8e7df; box-shadow: none; border-radius: 14px; padding: 18px 22px; gap: 28px; margin-bottom: 20px; align-items: center; }
.intro>div:first-child { min-width: 0; }
.intro .intro-title { font-size: 19px; color: var(--ink); line-height: 1.35; font-weight: 650; margin: 0 0 5px; letter-spacing: -.3px; }
.intro p { font-size: 14px; line-height: 1.65; color: #4c6860; max-width: 570px; }
.intro .progress { color: #4c6860; font-weight: 500; font-size: 12px; min-width: 124px; flex: 0 0 124px; line-height: 1.45; }
.intro .meter { height: 5px; background: #d0e1d7; margin-top: 10px; }
.intro .meter i { background: var(--accent); }
.stage:has(.lesson-title) .intro { display: none; }
.workspace { border-color: var(--line); border-radius: 18px; padding: 30px; box-shadow: 0 4px 18px #244b3b04; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 650; letter-spacing: .1em; line-height: 1.6; }
.home-head h1 { max-width: 680px; font-size: clamp(28px, 2.7vw, 34px); line-height: 1.22; letter-spacing: -.9px; font-weight: 650; margin: 10px 0 12px; color: var(--ink); text-wrap: balance; }
.home-head p { font-size: 16px; line-height: 1.7; max-width: 660px; color: var(--muted); margin-bottom: 24px; }
.home-starters { gap: 16px; margin: 24px 0 32px; }
.home-starter { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: none; background: #fff; }
.home-starter:hover { border-color: #b1d0c0; }
.home-starter .word-picture { width: 96px; height: 96px; border-radius: 10px; }
.home-starter .eyebrow { font-size: 10px; letter-spacing: .065em; }
.home-starter h3 { font-size: 19px; font-weight: 650; color: var(--ink); letter-spacing: -.3px; margin: 6px 0 8px; }
.home-starter p { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 12px; }
.home-word-preview { color: #466b59; font-size: 16px; line-height: 1.6; margin: 10px 0 14px; }
.home-starter .primary { font-size: 13px; padding: 10px 15px; }
.home-path-head { border-top: 1px solid var(--line); padding-top: 26px; margin-bottom: 20px; }
.home-path-heading { color: var(--ink); font-size: 22px; letter-spacing: -.4px; font-weight: 650; line-height: 1.4; margin: 0 0 5px; }
.home-path-head p { color: var(--muted); font-size: 14px; margin: 0; }
.home-levels { gap: 16px; }
.home-level { --stage-color: #16735d; --stage-bg: #f3faf6; border: 1px solid var(--line); border-top: 3px solid var(--stage-color); background: var(--stage-bg); border-radius: 12px; padding: 22px; min-height: 250px; }
.home-level[data-stage="2"] { --stage-color: #386b98; --stage-bg: #f5f8fc; }
.home-level[data-stage="3"] { --stage-color: #71628f; --stage-bg: #f8f6fb; }
.home-level[data-stage="4"] { --stage-color: #82653b; --stage-bg: #fbf8f2; }
.home-level-top { color: var(--stage-color); font-size: 11px; font-weight: 650; letter-spacing: .08em; line-height: 1.5; }
.home-level-top small { color: var(--muted); font-size: 12px; font-weight: 500; }
.home-level h3 { font-size: 21px; line-height: 1.35; font-weight: 650; letter-spacing: -.4px; color: var(--ink); margin: 16px 0 4px; }
.home-level p { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.home-level .home-stage-cn { font-size: 13px; color: var(--stage-color); margin: 0 0 12px; }
.home-level-foot { gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 500; }
.home-level-foot button { color: var(--accent); background: #fff; border: 1px solid #cadbd2; border-radius: 8px; padding: 9px 12px; min-height: 44px; font-size: 13px; font-weight: 600; }
.home-level-foot button:hover { color: var(--accent-hover); background: var(--accent-soft); border-color: #9bc3ae; }
.continue-card { background: var(--accent-soft); border-color: #d3e6da; border-radius: 12px; padding: 16px 20px; font-size: 14px; }
.continue-card b { font-weight: 600; color: var(--accent); }
.continue-card p { color: var(--muted); font-size: 14px; }
.home-note { background: #f6f9f7; color: var(--muted); border-radius: 10px; padding: 16px 18px; font-size: 13px; line-height: 1.75; margin-top: 24px; }
.primary, .worksheet-link { background: var(--accent); color: #fff; border-radius: 9px; padding: 12px 18px; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: none; }
.primary:hover, .worksheet-link:hover { background: var(--accent-hover); }
.secondary { background: #eef3f1; color: #3d6253; border: 1px solid #dbe6df; border-radius: 9px; padding: 11px 18px; min-height: 44px; font-size: 15px; font-weight: 600; }
.secondary:hover { background: #e4ede7; }
.lesson-location { gap: 9px; margin-bottom: 18px; }
.location-stage { border: 0; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; padding: 5px 9px; }
.location-course { font-size: 14px; font-weight: 600; color: var(--ink); }
.location-lesson { font-size: 13px; color: var(--muted); }
.location-separator { color: #87978e; }
.lesson-title { color: var(--ink); font-size: clamp(26px, 2.6vw, 32px); font-weight: 650; line-height: 1.3; letter-spacing: -.7px; margin: 8px 0; }
.lesson-desc, .panel-copy { font-size: 16px; line-height: 1.7; color: var(--muted); }
.panel-title { color: var(--ink); font-size: 23px; font-weight: 650; letter-spacing: -.3px; line-height: 1.4; margin-bottom: 8px; }
.stepper { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; border-bottom: 1px solid var(--line); gap: 6px; padding: 4px 0 14px; margin: 22px 0; }
.stepper button { flex: 0 0 auto; min-width: 106px; min-height: 70px; padding: 10px 12px; border: 1px solid #e2e9e5; border-radius: 10px; background: #f5f8f6; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; }
.stepper button:hover { background: #ecf3ee; }
.stepper button.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper button.finished { background: #e9f5ee; color: #276b4d; border-color: #cee4d5; }
.tab-percent { font-size: 11px; font-weight: 500; }
.tab-progress { height: 3px; background: #dbe6df; }
.current .tab-progress i { background: #cbe8ce; }
.tab-legend, .save-note { font-size: 13px; color: var(--muted); }
.task-progress { background: #f5f9f6; border-color: var(--line); border-radius: 12px; padding: 16px 18px; }
.task-progress span, .task-progress p, .remaining-task-list>summary { color: var(--muted); font-size: 13px; }
.task-progress b { font-weight: 600; }
.task-progress progress { height: 7px; accent-color: var(--accent); }
.task-progress progress::-webkit-progress-bar { background: #dee9e1; }
.task-progress progress::-webkit-progress-value { background: var(--accent); }
.task-progress progress::-moz-progress-bar { background: var(--accent); }
.task-link, .text-action, .paper-practice-link { color: var(--accent); font-weight: 500; }
.text-action { background: var(--accent-soft); border-radius: 7px; }
.sound { background: #eff5fb; color: var(--pinyin); border: 1px solid #d3e1ef; border-radius: 8px; font-weight: 600; font-size: 14px; }
.sound::before { content: none; }
.sound:hover, .sound:focus-visible { background: #e2eef9; }
.scene { background: #f3f8f5; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.scene-art { border: 1px solid #e0e9e2; border-radius: 12px; }
.scene h3 { color: var(--ink); font-size: 22px; font-weight: 600; }
.scene p { color: var(--muted); }
.phrase, .word-card, .picture-word-card, .learning-card, .support-row, .practice-question { border-color: var(--line); border-radius: 12px; }
.picture-word-card { box-shadow: none; }
.picture-word-body { padding: 16px 12px; }
.word-cn { color: var(--ink); font-weight: 600; }
.picture-word-body .word-cn { font-weight: 600; }
.picture-word-body .py, .picture-word-body .english { font-weight: 500; }
.word-card .py, .character-card strong, .sentence-detail em, .support-py, .dialogue-py { background: transparent; padding: 0; color: var(--pinyin); font-weight: 500; border-radius: 0; }
.word-card .english, .character-card em, .sentence-detail small, .support-en, .dialogue-line small { color: #397454; font-weight: 400; }
.sentence-card { border: 1px solid var(--line); background: #f8faf9; border-radius: 12px; padding: 18px; }
.sentence-word { font-weight: 600; color: var(--ink); }
.sentence-detail span { color: var(--ink); font-weight: 500; }
.dialogue-line { background: #eff5f2; border: 1px solid #e0e9e3; border-radius: 12px; padding: 18px; }
.dialogue-line.reply { background: #faf7ef; border-color: #eee6d4; }
.dialogue-line b { background: var(--accent); border-radius: 8px; font-size: 13px; font-weight: 600; }
.dialogue-line strong { color: var(--ink); font-weight: 500; line-height: 1.6; }
.reading-card { background: #f7faf8; border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.reading-cn { color: var(--ink); font-size: 25px; line-height: 1.95; }
.article-title { color: var(--ink); font-size: 27px; font-weight: 600; }
.article-title small, .reading-meta { color: var(--muted); }
.support-cn { color: var(--ink); }
.learning-card { background: #f5f9f6; }
.learning-card b { color: var(--accent); font-weight: 600; }
.choice { color: var(--ink); border-radius: 11px; border-width: 1px; border-color: #d6e3da; background: #f7faf8; font-weight: 600; }
.choice:hover { border-color: #79ad96; }
.choice.correct { background: #e8f6ed; border-color: #55a676; }
.choice.wrong { background: #fff1ed; border-color: #ca8978; }
.feedback, .practice-feedback { font-weight: 500; line-height: 1.6; }
.course-guide, .pilot-overview, .study-help, .more-examples, .reply-reveal, .short-reading, .reading-word-help, .optional-pilot-story, .pronunciation-help, .review-result-details, .learning-outcomes { border-color: var(--line); border-radius: 11px; background: #fff; }
.course-guide summary, .pilot-overview summary, .parent-guide summary, .study-help summary, .more-examples summary, .reply-reveal summary, .reading-word-help summary, .optional-pilot-story summary, .pronunciation-help summary, .review-result-details summary { color: var(--accent); font-weight: 600; }
.learning-outcomes { background: #f3f8f5; }
.session-grid article, .result-grid>div { border-color: var(--line); border-radius: 11px; }
.result-grid small { color: var(--muted); }
.guided-practice { border-top: 1px solid var(--line); }
.guided-practice h4, .starter-reading h4, .sentence-builder h4, .learning-outcomes h4 { color: var(--ink); font-size: 21px; font-weight: 600; }
.support-switches button[aria-pressed="true"] { background: #dfeee5; color: var(--accent-hover); border-color: #bad4c5; }
.builder-options button[aria-pressed="true"] { background: var(--accent); color: white; }
.tone-help>div { background: #f2f7f4; border-radius: 8px; }
.tone-help b { color: var(--pinyin); font-weight: 500; }
.flip-card-front { background: #f2f8f4; color: var(--ink); }
.flip-card-front, .flip-card-back { border-color: #d3e4d9; border-radius: 14px; }
.flip-char-cn { font-weight: 500; }
.flip-char-py { color: var(--pinyin); font-weight: 500; }
.flip-hint, .card-stroke-status { color: var(--muted); }
.flip-back-button { background: var(--accent-soft); color: var(--accent); border-radius: 7px; }
.supplementary-reading { border-width: 1px; border-color: var(--line); border-radius: 12px; }
.supplementary-reading>summary { background: #f1f7f3; color: var(--ink); }
.supplementary-reading>summary span, .supplementary-reading>summary strong { font-weight: 600; }
.audio-player { border-color: #c9ded0; box-shadow: 0 6px 28px #234d3820; border-radius: 12px; color: var(--ink); }
.audio-player button { background: var(--accent-soft); border-color: #c9ded0; color: var(--accent); font-size: 14px; font-weight: 600; border-radius: 8px; }
.footer-note { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 18px 4px 12px; }
.site-credits { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 12px 4px 20px; }
.site-credits a { color: var(--accent); }
@media (max-width: 1180px) {
  main { display: flex; max-width: 1000px; padding: 24px; gap: 18px; }
  .sidebar { padding: 0; position: static; max-height: none; }
  .course-toggle { border-radius: 14px; padding: 14px 18px; color: var(--ink); font-size: 14px; font-weight: 600; }
  .course-toggle small { color: var(--muted); font-size: 12px; font-weight: 400; }
  .course-toggle-status { background: var(--accent-soft); color: var(--accent); border-radius: 7px; padding: 7px 12px; font-size: 12px; font-weight: 600; }
  .sidebar[data-menu-open="true"] #nav { padding: 4px 18px 18px; border-top-color: var(--line); }
  .sidebar[data-menu-open="true"] .course-toggle { border-radius: 14px 14px 0 0; }
  .workspace { padding: 28px; }
  .lesson-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-starters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-starter { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .home-starter .word-picture { width: 88px; height: 88px; }
  .stepper button { min-width: 106px; }
}
@media (max-width: 760px) {
  header { min-height: 68px; padding: 12px 20px; gap: 12px; }
  header .brand { font-size: 21px; }
  .header-right { display: none; }
  .header-actions { gap: 0; }
  main { padding: 18px; }
  .workspace { padding: 24px; }
  .intro { padding: 16px 20px; }
  .intro .intro-title { font-size: 18px; }
  .intro p { font-size: 13px; }
  .home-head h1 { font-size: 30px; }
  .home-starters { grid-template-columns: 1fr; gap: 14px; margin: 22px 0 28px; }
  .home-starter { grid-template-columns: 100px minmax(0, 1fr); padding: 18px; }
  .home-starter .word-picture { width: 100px; height: 100px; }
  .home-levels { grid-template-columns: 1fr; gap: 14px; }
  .home-level { min-height: 0; }
  .home-level-foot { margin-top: 6px; }
  .lesson-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  header { padding: 10px 14px; min-height: 64px; gap: 8px; }
  header .brand { font-size: 19px; letter-spacing: -.5px; }
  .site-nav { gap: 0; }
  .site-nav button { font-size: 12px; padding: 9px 10px; }
  main { padding: 12px; gap: 14px; }
  .course-toggle { padding: 12px 14px; }
  .course-toggle>span:first-child { min-width: 0; }
  .intro { padding: 16px; margin-bottom: 14px; border-radius: 12px; }
  .intro .intro-title { font-size: 17px; }
  .workspace { padding: 20px 16px; border-radius: 14px; }
  .home-head h1 { font-size: 27px; letter-spacing: -.65px; }
  .home-head p { font-size: 15px; }
  .home-starter { grid-template-columns: 80px minmax(0, 1fr); padding: 16px; gap: 14px; }
  .home-starter .word-picture { width: 80px; height: 80px; }
  .home-starter h3 { font-size: 18px; }
  .home-starter .primary { width: auto; max-width: 100%; }
  .home-starter p { font-size: 13px; }
  .home-starter .eyebrow { font-size: 9px; }
  .home-word-preview { font-size: 14px; }
  .home-path-heading { font-size: 20px; }
  .home-level { padding: 20px; }
  .home-level h3 { font-size: 20px; }
  .lesson-title { font-size: 27px; }
  .lesson-location { gap: 7px; }
  .location-stage { flex-basis: auto; border-radius: 6px; }
  .location-stage+.location-separator { display: inline; }
  .location-course { font-size: 13px; }
  .panel-title { font-size: 21px; }
  .reading-card { padding: 18px 14px; }
  .reading-cn { font-size: 23px; }
  .article-title { font-size: 25px; }
  .picture-word-body { padding: 12px 8px; }
  .home-note { padding: 14px; }
  .continue-card { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
@media print { .site-nav, .header-right { display: none; } }
