@charset "UTF-8";

.sidebar { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 40; padding: 30px 20px 22px; border-right: 1px solid var(--line); background: var(--paper); overflow-y: auto; }
.sidebar .brand { margin-bottom: 38px; }
.sidebar .eyebrow { margin: 0 10px 15px; }
.chapter-link { display: flex; gap: 10px; width: 100%; align-items: flex-start; padding: 11px 10px; border: 1px solid transparent; border-radius: 7px; text-align: left; font-size: 12px; line-height: 1.5; color: var(--muted); background: transparent; }
.chapter-link .chapter-index { font-size: 10px; font-weight: 700; min-width: 21px; padding-top: 2px; }
.chapter-link .chapter-label { flex: 1; }
.chapter-link .chapter-label small { display: block; font-size: 10px; opacity: .85; margin-top: 3px; }
.chapter-link:hover, .chapter-link.active { background: var(--sage-soft); color: var(--ink); border-color: var(--line); }
.chapter-link .completed-mark { width: 16px; height: 16px; color: var(--sage); }
.sidebar-progress { margin: 25px 8px 16px; font-size: 10px; }
.sidebar-progress strong { font-size: 12px; }
progress { width: 100%; height: 6px; margin-top: 11px; border: 0; border-radius: 8px; overflow: hidden; accent-color: var(--sage); background: var(--line); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--sage); }
.side-action { width: 100%; display: flex; align-items: center; gap: 10px; background: transparent; padding: 11px 8px; text-decoration: none; color: var(--ink); font-size: 12px; text-align: left; }
.side-action:hover { color: var(--accent); }
.side-action .count { margin-left: auto; font-size: 10px; border-radius: 20px; padding: 2px 7px; background: var(--sage-soft); }
.sidebar-bottom { margin-top: 23px; padding-top: 15px; border-top: 1px solid var(--line); }
.sidebar-bottom p { line-height: 1.8; font-size: 10px; }
.shell { margin-left: 268px; }
.topbar { min-height: 90px; position: sticky; top: 0; z-index: 30; display: flex; gap: 15px; align-items: center; justify-content: space-between; padding: 15px 36px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-context { color: var(--muted); font-size: 11px; line-height: 1.5; max-width: 210px; }
.workspace { max-width: 1360px; padding: 40px 45px 50px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; margin-bottom: 35px; }
.hero-introduction { max-width: 920px; }
.hero h1 { font-size: clamp(33px, 3.3vw, 49px); margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-description { font-size: var(--reading-size); color: var(--muted); line-height: 1.9; margin-bottom: 23px; }
.hero-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.workshop-figure { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.workshop-image-button { position: relative; display: block; width: 100%; padding: 0; background: #faf7ee; cursor: zoom-in; }
.workshop-image-button img { display: block; width: 100%; height: auto; }
.workshop-image-button:focus-visible { outline-offset: -5px; }
.workshop-zoom-label { display: inline-flex; align-items: center; gap: 8px; position: absolute; right: 14px; bottom: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 12px; box-shadow: var(--shadow); }
.workshop-figure figcaption { padding: 23px 28px; border-top: 1px solid var(--line); }
.workshop-figure figcaption h2 { font-size: 24px; margin-bottom: 12px; }
.workshop-figure figcaption p { margin: 0; color: var(--muted); }
.infographic-dialog { width: min(1650px, calc(100% - 28px)); }
.infographic-scroll { overflow: auto; max-height: 63vh; background: #faf7ee; }
.infographic-scroll img { display: block; width: auto; min-width: 100%; max-width: none; height: auto; }
.infographic-caption { margin: 0; padding: 21px 25px; border-top: 1px solid var(--line); color: var(--muted); }
.overview { display: grid; grid-template-columns: repeat(3, 1fr); margin: 27px 0 35px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--paper); }
.stat { display: flex; gap: 14px; align-items: center; padding: 19px 20px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat > .icon { color: var(--sage); width: 27px; height: 27px; }
.stat strong { display: block; font-family: var(--serif); font-size: 30px; line-height: 1.3; }
.stat small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.chapter-heading { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 25px; }
.chapter-heading h2 { margin: 0 0 13px; }
.chapter-heading p { color: var(--muted); margin-bottom: 16px; }
.chapter-number { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 11px; font-weight: 700; margin-bottom: 12px; }
.chapter-art { width: 95px; height: 95px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 22px; background: var(--sage-soft); display: grid; place-items: center; color: var(--sage); transform: rotate(-5deg); }
.chapter-art .icon { width: 46px; height: 46px; }
.lesson-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.lesson-article { padding: 31px 36px 20px; }
.lesson-article > p:first-child::first-letter { font-size: 1.12em; color: var(--accent); }
.lesson-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 19px 30px; background: var(--sage-soft); border-top: 1px solid var(--line); }
.bookmark-button { display: inline-flex; align-items: center; gap: 8px; background: transparent; padding: 10px 0; font-size: 12px; color: var(--muted); }
.bookmark-button.active { color: var(--accent); }
.hint-box, .exercise-box, .reflection-box { border: 1px solid var(--line); border-radius: 9px; margin-bottom: 22px; padding: 18px 22px; }
.hint-box { background: var(--highlight); }
.hint-box summary { display: flex; align-items: center; gap: 9px; font-family: var(--sans); font-size: 13px; font-weight: 700; }
.hint-box p { margin: 15px 0 0; }
.exercise-box { background: var(--sage-soft); }
.box-label { font-family: var(--sans); display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; color: var(--sage); margin-bottom: 13px; }
.exercise-box p, .reflection-box p { margin: 0; }
.transcript-details { padding: 20px 28px; margin-top: 25px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.transcript-details > summary { font-size: 13px; font-weight: 700; }
.transcript-details .reader-segment { padding-top: 18px; }
.note-card { margin-top: 25px; padding: 25px 30px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.note-card h3 { font-size: 24px; margin-bottom: 12px; }
.note-card textarea { width: 100%; min-height: 145px; resize: vertical; padding: 15px 18px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; font-family: var(--serif); font-size: var(--reading-size); font-weight: var(--reading-weight); line-height: 1.8; }
.note-card .note-help { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); margin-top: 9px; }
.quiz-section { padding: 28px 30px; margin-top: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--sage-soft); }
.quiz-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.quiz-heading h3 { margin-bottom: 10px; }
.quiz-heading p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.quiz-question { padding: 24px; margin: 19px 0; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.question-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 10px; margin-bottom: 12px; }
.question-prompt { font-family: var(--serif); font-size: var(--reading-size); font-weight: 600; margin: 0 0 18px; line-height: 1.8; }
.quiz-choice { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; margin: 9px 0; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-family: var(--serif); font-size: var(--reading-size); font-weight: var(--reading-weight); line-height: 1.75; }
.quiz-choice input { accent-color: var(--sage); flex: 0 0 auto; margin-top: .45em; }
.quiz-choice:has(input:checked) { border-color: var(--sage); background: var(--sage-soft); }
.quiz-choice.correct { background: var(--sage-soft); border-color: var(--sage); }
.quiz-choice.incorrect { background: var(--accent-soft); border-color: var(--accent); }
.quiz-explanation { padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.quiz-result { margin: 20px 0; padding: 22px; border: 1px solid var(--sage); border-radius: 9px; background: var(--paper); }
.quiz-result strong { display: block; font-family: var(--serif); font-size: 36px; }
.quiz-result p { margin: 8px 0 0; }
.quiz-history { margin-top: 24px; font-size: 12px; color: var(--muted); }
.history-row { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding: 9px 0; }
.chapter-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 29px; }
.menu-backdrop { position: fixed; inset: 0; background: rgb(var(--overlay) / 55%); z-index: 45; }
.mobile-menu { display: none; }
:root[data-theme="pixel"] .lesson-card, :root[data-theme="pixel"] .quiz-section, :root[data-theme="pixel"] .overview, :root[data-theme="pixel"] .note-card { border-radius: 3px; border-width: 2px; box-shadow: var(--shadow); }
:root[data-theme="pixel"] .chapter-art { border-radius: 3px; transform: rotate(0); box-shadow: 5px 5px 0 var(--line); }
:root[data-theme="pixel"] .workshop-figure { border-radius: 3px; border-width: 2px; }
@media (max-width: 1250px) { .sidebar { width: 240px; padding: 25px 14px; } .shell { margin-left: 240px; } .workspace { padding: 34px 30px; } .topbar { padding: 14px 26px; } .hero { gap: 15px; } }
@media (max-width: 1050px) { .topbar-context { display: none; } .topbar { justify-content: flex-end; } }
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); width: min(300px, 88vw); z-index: 50; transition: transform .2s; }
  .sidebar.open { transform: translateX(0); }
  .shell { margin-left: 0; }
  .mobile-menu { display: inline-flex; margin-right: auto; }
  .topbar { padding: 11px 17px; min-height: 84px; gap: 10px; }
  .preferences-controls { gap: 6px; }
  .preference select { padding-left: 7px; padding-right: 19px; max-width: 130px; font-size: 11px; }
  .workspace { padding: 30px 19px 40px; }
  .lesson-article { padding: 25px 23px 15px; }
  .lesson-tools { padding: 17px 22px; }
  .overview .stat { padding: 17px 12px; gap: 9px; }
  .stat > .icon { display: none; }
  .note-card, .quiz-section { padding: 23px 20px; }
  .quiz-question { padding: 20px 17px; }
}
@media (max-width: 480px) {
  .topbar { align-items: flex-start; }
  .mobile-menu { margin-top: 14px; width: 35px; height: 35px; }
  .preferences-controls { flex: 1; justify-content: flex-end; }
  .preference select { max-width: 105px; padding: 5px; }
  .preference { font-size: 9px; }
  .workshop-figure figcaption { padding: 19px; }
  .workshop-zoom-label { position: static; display: flex; justify-content: center; padding: 9px; border-radius: 0; border-width: 1px 0 0; box-shadow: none; }
  .infographic-caption { padding: 19px; }
  .chapter-art { width: 60px; height: 60px; border-radius: 12px; }
  .chapter-art .icon { width: 32px; height: 32px; }
  .hint-box, .exercise-box, .reflection-box { padding: 16px; }
  .chapter-footer .button { flex: 1 1 130px; }
  .stat strong { font-size: 25px; }
}
@media print { .sidebar, .topbar, .overview, .lesson-tools, .note-card, .quiz-section, .chapter-footer, .workshop-zoom-label { display: none !important; } .shell { margin: 0; } .workspace { max-width: none; padding: 0; } .workshop-figure { box-shadow: none; } }
.chapter-heading > div:first-child { min-width: 0; flex: 1; }
#chapter-content > .source-note { margin-bottom: 24px; }

.hero[hidden] { display: none; }
