@import url('./style.css');
:root{--paper:#f5f1e8;--white:#fffdf5;--ink:#202822;--muted:#667168;--green:#23392f;--green-deep:#172820;--lime:#dbe6a8;--orange:#bd512f;--cyan:#9ac6d1;--border:#d9d8cb;--mono:ui-monospace,SFMono-Regular,Consolas,monospace;--sans:'Avenir Next',Avenir,'Helvetica Neue',sans-serif;--serif:Iowan Old Style,Baskerville,Georgia,serif}
body{background:var(--paper)}.sidebar{background:#eae8dd}.brand-icon{background:#172820;color:#dbe6a8}.brand-dot,.chapter-label{color:#bd512f}.course-switch:hover{background:#e1e6d7}.page{background:var(--paper)}.hero{border-bottom-color:#d0cbbc}.hero-art{background:#172820;color:#dbe6a8}.hero-art pre{color:#eff3de}.go-stamp{border-color:#bd512f;color:#e4a18a}.chapter-kicker .pill{background:#23392f;color:#eff3de}.chapter-article{max-width:850px}.topic-section{padding-block:38px;border-bottom:1px solid #d9d3c6}.topic-section h2{font:500 clamp(27px,3vw,38px)/1.12 var(--serif);letter-spacing:-.5px}.topic-intro{font-size:17px;color:#345342}.topic-lead{max-width:740px}.reading{max-width:730px}.reading h3{font:600 19px/1.3 var(--sans);margin-top:28px}.reading code,.trace-step code{background:#e8e5d9;color:#752e1b}.article-figure,.trace-figure,.example-figure{background:#eeebdf;border-color:#d7d1c2}.diagram-node{background:#fffdf5;border-color:#c9c4b6}.diagram-node small,.topic-index,.eyebrow{color:#9b482c}.diagram-node strong{color:#23392f}.trace-step{border-left-color:#bd512f}.trace-step strong{color:#23392f}.lesson-practice{background:#f0eadc;border-left-color:#bd512f}.editor-shell{background:#172820;color:#f5f1e8}.editor-toolbar{color:#dbe6a8}.editor-toolbar button{color:#f5f1e8}.code-area textarea{color:#eff3de;caret-color:#dbe6a8}.runbar .primary,.primary{background:#23392f;color:#fffdf5}.runbar .primary:hover,.primary:hover{background:#385d49}.output-head{color:#23392f}.checkpoint{border-top-color:#c8c0b1}.answer{background:#fffdf5;border-color:#d1cabb}.answer.correct{border-color:#4b7e54;background:#edf2e6}.answer.wrong{border-color:#bd512f;background:#f9e9e1}.feedback{color:#345d3b}.feedback.error{color:#9b3824}.sidebar-bottom{border-color:#c8c4b8}.sidebar-bottom progress{accent-color:#bd512f}.site-footer{border-color:#d9d3c6}.chapter-map button{display:flex;gap:14px;width:100%;padding:10px 8px;border:0;border-bottom:1px solid #e2ded3;background:transparent;text-align:left;font:12px/1.5 var(--sans)}.chapter-map button:hover,.chapter-map button.active{background:#e8e5d9;color:#23392f}.chapter-map button span{flex:none;color:#bd512f;font:11px/1.7 var(--mono)}.chapter-map{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.lesson-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:35px}.tabs{display:flex;gap:4px;padding:4px;border:1px solid #d1cabb;background:#eeebdf}.tabs button{padding:8px 14px;border:0;background:transparent;color:#667168;font-size:12px}.tabs button.selected{background:#23392f;color:#fffdf5}.chapter-opening{margin-bottom:24px}.chapter-opening p{font-size:13px}.roadmap-row{width:100%;align-items:center;border:0;border-bottom:1px solid #d7d1c2;background:transparent;text-align:left;cursor:pointer}.roadmap-row:hover{background:#eeebdf}.roadmap-row small{display:block;color:var(--muted)}.study-guide{background:#eeebdf;border-color:#d7d1c2}.study-guide summary{color:#345d3b}.study-guide p{max-width:850px}.lesson-footer{border-color:#d9d3c6}.secondary{background:transparent;border-color:#b7ae9e}.example-output{background:#fffdf5}.example-output small{color:#9b482c}.article-source a,.hero-actions a{color:#9b482c}.text-button{color:#825239}.chapter-lab{background:#e9e5d9}.dialog-head h2{font-family:var(--serif)}
@media(max-width:900px){:root{--paper:#f5f1e8}}
@media(max-width:650px){.lesson-heading{align-items:flex-start;flex-direction:column}.chapter-map{grid-template-columns:1fr}.tabs{width:100%}.tabs button{flex:1}.roadmap-row{font-size:13px}}
.hero-art .go-stamp{padding-top:16px;border-top:1px dashed #52695a;color:#e4a18a}.hero-art .go-stamp span{display:block;font:9px/1.6 var(--mono);letter-spacing:1px}
:root[data-theme="dark"] {
  --paper: #141a16;
  --white: #202722;
  --ink: #e8eee9;
  --muted: #b4beb5;
  --green: #a4c4a8;
  --green-deep: #101511;
  --lime: #d2e3ab;
  --orange: #f09a72;
  --cyan: #9bc6ce;
  --border: #3a463e;
  --sidebar: #1c241f;
  --surface: #202923;
  --surface-soft: #242f28;
  --surface-muted: #2c392f;
  --surface-code: #19221c;
  --surface-note: #2a3028;
  --surface-callout: #263229;
  --text-soft: #bac5bb;
  --text-reading: #d8e1da;
  --text-strong: #edf2ed;
  --accent-link: #ffad83;
  --accent-ink: #d7e6c1;
  --control-border: #48574c;
  --focus: #f2b579;
  --surface-hover: #303e33;
  --accent-wash: #2d3a30;
}
:root[data-theme="dark"] .sidebar {
  background: var(--sidebar);
}
:root[data-theme="dark"] .brand-icon {
  background: #293c31;
  color: var(--lime);
}
:root[data-theme="dark"] .brand-dot,
:root[data-theme="dark"] .chapter-label,
:root[data-theme="dark"] .topic-index,
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .diagram-node small {
  color: var(--orange);
}
:root[data-theme="dark"] .course-switch,
:root[data-theme="dark"] .chapter-picker select,
:root[data-theme="dark"] .theme-toggle {
  border-color: var(--control-border);
  background: var(--surface);
  color: var(--ink);
}
:root[data-theme="dark"] .course-switch:hover,
:root[data-theme="dark"] .theme-toggle:hover {
  background: var(--surface-hover);
}
:root[data-theme="dark"] .hero {
  border-bottom-color: var(--border);
}
:root[data-theme="dark"] .hero-art {
  border-color: #3e5547;
  background: #192a22;
  color: #e4eee5;
}
:root[data-theme="dark"] .go-stamp {
  border-color: var(--orange);
  color: #ffb28d;
}
:root[data-theme="dark"] .chapter-kicker .pill,
:root[data-theme="dark"] .tabs {
  border-color: var(--control-border);
  background: var(--surface-soft);
  color: var(--ink);
}
:root[data-theme="dark"] .topic-section,
:root[data-theme="dark"] .checkpoint,
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] .lesson-footer {
  border-color: var(--border);
}
:root[data-theme="dark"] .topic-intro {
  color: #c6d6ca;
}
:root[data-theme="dark"] .reading code,
:root[data-theme="dark"] .trace-step code {
  background: #29372e;
  color: #ffb28d;
}
:root[data-theme="dark"] .article-figure,
:root[data-theme="dark"] .trace-figure,
:root[data-theme="dark"] .example-figure,
:root[data-theme="dark"] .study-guide {
  border-color: #3d5043;
  background: #1d2922;
  color: var(--text-reading);
}
:root[data-theme="dark"] .flowchart.article-figure {
  background: #18231d;
  color: #edf3ee;
}
:root[data-theme="dark"] .diagram-node {
  border-color: #4b6353;
  background: #28382d;
}
:root[data-theme="dark"] .diagram-node strong,
:root[data-theme="dark"] .trace-step strong {
  color: #eaf1e8;
}
:root[data-theme="dark"] .trace-figure figcaption {
  color: #d1e3d4;
}
:root[data-theme="dark"] .trace-step {
  border-left-color: var(--orange);
  background: #28372d;
}
:root[data-theme="dark"] .trace-step p {
  color: #c2d0c4;
}
:root[data-theme="dark"] .lesson-practice {
  border-color: #465b49;
  background: var(--surface-callout);
}
:root[data-theme="dark"] .runbar .primary,
:root[data-theme="dark"] .primary {
  background: #b9d39f;
  color: #18231b;
}
:root[data-theme="dark"] .runbar .primary:hover,
:root[data-theme="dark"] .primary:hover {
  background: #cce5b3;
}
:root[data-theme="dark"] .output-head {
  color: #ceddce;
}
:root[data-theme="dark"] .answer {
  border-color: #4a5c4d;
  background: #28372d;
  color: #e8efe8;
}
:root[data-theme="dark"] .answer.correct {
  border-color: #9fc58b;
  background: #2b4634;
}
:root[data-theme="dark"] .answer.wrong {
  border-color: #dc9275;
  background: #4a302a;
}
:root[data-theme="dark"] .feedback {
  background: #263e30;
  color: #d9eadb;
}
:root[data-theme="dark"] .feedback.error {
  background: #4a302a;
  color: #ffd1bd;
}
:root[data-theme="dark"] .output-head,
:root[data-theme="dark"] .chapter-map button span {
  color: #efaa80;
}
:root[data-theme="dark"] .chapter-map button {
  border-color: var(--border);
  color: var(--text-reading);
}
:root[data-theme="dark"] .chapter-map button:hover,
:root[data-theme="dark"] .chapter-map button.active,
:root[data-theme="dark"] .roadmap-row:hover {
  background: var(--surface-hover);
  color: var(--ink);
}
:root[data-theme="dark"] .roadmap-row {
  border-color: #3d5043;
}
:root[data-theme="dark"] .study-guide summary {
  color: #d2e6bd;
}
:root[data-theme="dark"] .secondary {
  border-color: var(--control-border);
  background: transparent;
  color: var(--ink);
}
:root[data-theme="dark"] .example-output {
  background: var(--surface);
}
:root[data-theme="dark"] .example-output small,
:root[data-theme="dark"] .article-source a,
:root[data-theme="dark"] .hero-actions a {
  color: var(--accent-link);
}
:root[data-theme="dark"] .text-button {
  color: #d2b39e;
}
:root[data-theme="dark"] .chapter-lab {
  background: #1a2821;
}
.hero-actions a {
  color: #fff;
}
.hero-actions a + a {
  color: #9b482c;
}
:root[data-theme="dark"] .hero-actions a {
  color: #18231b;
}
:root[data-theme="dark"] .hero-actions a + a {
  color: var(--ink);
}
