:root{--paper:#f4f1e9;--surface:#fffdf8;--surface-2:#ebe6da;--ink:#202622;--muted:#6d736b;--line:#d8d3c7;--accent:#194d3b;--accent-2:#c2673b;--gold:#d8a340;--soft-green:#dce8db;--soft-red:#f5e4d9;--shadow:0 12px 40px rgba(29,39,31,.07);--radius:18px;--sidebar:260px;color-scheme:light}
*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:110px}body{margin:0;background:var(--paper);color:var(--ink);font-family:"Microsoft YaHei UI","PingFang SC","Noto Sans CJK SC",system-ui,sans-serif;font-size:15px;line-height:1.75}button,input,select{font:inherit}button{cursor:pointer;color:inherit}.skip-link{position:absolute;left:-999px;top:6px;background:var(--surface);padding:8px 12px;z-index:100}.skip-link:focus{left:8px}.topbar{height:76px;position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:26px;padding:0 30px;background:rgba(255,253,248,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:11px;text-decoration:none;color:var(--ink);min-width:195px}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:var(--accent);color:#fff;font:700 13px/1 Georgia,serif;letter-spacing:.05em}.brand strong,.brand small{display:block}.brand strong{font:700 16px/1.25 Georgia,"Microsoft YaHei UI",serif;letter-spacing:.04em}.brand small{margin-top:3px;color:var(--muted);font-size:11px;letter-spacing:.08em}.module-nav{display:flex;align-items:center;gap:5px;overflow-x:auto;scrollbar-width:none;flex:1}.module-nav::-webkit-scrollbar{display:none}.module-nav button{border:0;background:transparent;color:var(--muted);white-space:nowrap;padding:9px 11px;border-radius:10px;font-size:13px;transition:.2s}.module-nav button:hover,.module-nav button.active{background:var(--soft-green);color:var(--accent)}.top-actions{position:relative;display:flex;align-items:center;gap:9px}.search-wrap{display:flex;align-items:center;gap:8px;padding:0 10px;height:38px;border:1px solid var(--line);background:var(--surface);border-radius:11px;color:var(--muted)}.search-wrap input{width:190px;border:0;outline:0;background:transparent;color:var(--ink);font-size:12px}.search-wrap kbd{font-size:10px;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:0 4px}.icon-button{width:38px;height:38px;border:1px solid var(--line);border-radius:11px;background:var(--surface);font-size:17px;display:grid;place-items:center}.icon-button:hover{border-color:var(--accent);color:var(--accent)}.menu-toggle{display:none}.search-results{position:absolute;right:86px;top:48px;width:min(400px,calc(100vw - 28px));max-height:65vh;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:8px}.search-result{display:block;width:100%;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:9px}.search-result:hover{background:var(--surface-2)}.search-result strong{display:block;font-size:13px}.search-result small{color:var(--muted);font-size:11px}.search-empty{padding:12px;color:var(--muted);font-size:13px}
.app-shell{display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);min-height:calc(100vh - 112px)}.sidebar{height:calc(100vh - 76px);position:sticky;top:76px;overflow:auto;padding:27px 18px 18px 24px;border-right:1px solid var(--line);background:rgba(255,253,248,.46)}.side-heading{display:flex;justify-content:space-between;align-items:center;font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--muted)}.progress-label{font-size:11px;letter-spacing:0;font-weight:500}.progress-track{height:4px;background:var(--line);border-radius:9px;margin:12px 0 20px;overflow:hidden}.progress-track span{display:block;height:100%;width:0;background:var(--accent);border-radius:9px;transition:width .3s}.chapter-nav{display:grid;gap:5px}.chapter-link{width:100%;display:flex;align-items:center;gap:10px;text-align:left;padding:9px 9px;border:0;background:transparent;border-radius:10px;color:var(--muted);font-size:13px}.chapter-link:hover,.chapter-link.active{background:var(--surface);color:var(--accent)}.chapter-number{width:25px;height:25px;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;font:600 11px Georgia,serif;flex:none}.chapter-link.done .chapter-number{background:var(--accent);border-color:var(--accent);color:white}.side-note{margin-top:28px;padding:11px 10px;display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);color:var(--muted);font-size:11px}.note-dot{width:7px;height:7px;background:var(--gold);border-radius:50%}.main-content{min-width:0;padding:36px clamp(20px,4vw,64px) 64px}.page-wrap{max-width:1150px;margin:0 auto}.eyebrow{font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);margin-bottom:8px}.page-title{font:700 clamp(28px,4vw,42px)/1.2 Georgia,"Songti SC",serif;letter-spacing:-.03em;margin:0 0 9px}.page-lede{max-width:800px;color:var(--muted);font-size:15px;margin:0 0 26px}.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:33px 0 15px}.section-heading h2{font:700 22px/1.3 Georgia,"Songti SC",serif;margin:0}.section-heading p{color:var(--muted);font-size:12px;margin:0}.hero{position:relative;overflow:hidden;border-radius:24px;padding:34px clamp(24px,4vw,48px);background:var(--accent);color:#f6f1e4;box-shadow:var(--shadow)}.hero:after{content:"";position:absolute;width:360px;height:360px;right:-100px;top:-190px;border:1px solid rgba(255,255,255,.25);border-radius:50%;box-shadow:0 0 0 35px rgba(255,255,255,.035),0 0 0 75px rgba(255,255,255,.035)}.hero .eyebrow{color:#dfc081}.hero h1{max-width:680px;font:700 clamp(31px,5vw,55px)/1.13 Georgia,"Songti SC",serif;letter-spacing:-.04em;margin:0 0 15px}.hero p{max-width:690px;color:rgba(255,255,255,.78);margin:0;font-size:15px}.hero-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}.pill{display:inline-flex;align-items:center;gap:6px;border-radius:99px;padding:5px 10px;background:rgba(255,255,255,.12);font-size:11px;color:inherit}.grid{display:grid;gap:14px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:19px 20px;box-shadow:0 4px 18px rgba(29,39,31,.025)}.card h3{margin:0 0 7px;font:700 16px/1.35 Georgia,"Songti SC",serif}.card p{margin:0;color:var(--muted);font-size:13px}.chapter-card{position:relative;min-height:165px;display:flex;flex-direction:column;align-items:flex-start}.chapter-card .chapter-kicker{font-size:10px;letter-spacing:.12em;color:var(--accent);font-weight:700}.chapter-card h3{margin:6px 0}.chapter-card .hours{position:absolute;right:17px;top:16px;color:var(--muted);font-size:11px}.chapter-card button{margin-top:auto;padding:6px 0 0;color:var(--accent);border:0;background:transparent;font-weight:600;font-size:12px}.tag-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.tag{padding:3px 8px;border-radius:6px;background:var(--surface-2);font-size:10px;color:var(--muted)}.notice{padding:15px 17px;border-radius:13px;background:#f6ecd4;border:1px solid #ead9ad;color:#5d4d2a;font-size:13px}.notice strong{display:block;margin-bottom:3px}.notice.restricted{background:var(--soft-red);border-color:#eacdbb;color:#704a38}.notice.neutral{background:var(--surface-2);border-color:var(--line);color:var(--muted)}.model-card{border-top:3px solid var(--accent)}.model-card .model-label{font-size:10px;color:var(--accent);font-weight:700;letter-spacing:.1em}.model-card h3{margin-top:8px}.model-card ul{margin:10px 0 0;padding-left:18px;color:var(--muted);font-size:12px}.route-list{counter-reset:route;display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));gap:7px;overflow-x:auto;padding-bottom:5px}.route-step{counter-increment:route;min-width:120px;padding:14px 12px;background:var(--surface);border:1px solid var(--line);border-radius:13px}.route-step:before{content:"0" counter(route);display:block;color:var(--accent-2);font:700 12px Georgia,serif;margin-bottom:8px}.route-step strong{font-size:12px;display:block}.route-step small{display:block;color:var(--muted);font-size:10px;margin-top:4px}.relation-flow{display:flex;align-items:center;gap:9px;overflow:auto;padding:15px 4px}.relation-node{min-width:126px;padding:12px 14px;border-radius:12px;background:var(--surface);border:1px solid var(--line);text-align:center;font-size:12px;font-weight:600}.relation-node small{display:block;color:var(--muted);font-size:10px;font-weight:400}.relation-arrow{color:var(--accent-2);font-size:19px;flex:none}.mind-tree{display:grid;gap:8px}.mind-tree details{border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:11px 14px}.mind-tree summary{cursor:pointer;font-weight:700;color:var(--accent);list-style:none}.mind-tree summary::-webkit-details-marker{display:none}.mind-tree summary:before{content:"＋";display:inline-block;width:22px;color:var(--accent-2)}.mind-tree details[open]>summary:before{content:"－"}.mind-children{display:flex;flex-wrap:wrap;gap:7px;padding:13px 0 2px 22px}.mind-chip{padding:5px 9px;border-radius:8px;background:var(--surface-2);font-size:11px;color:var(--ink)}.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:15px 0}.toolbar input,.toolbar select{min-height:38px;border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:7px 11px;color:var(--ink);outline-color:var(--accent);font-size:12px}.toolbar input{min-width:220px;flex:1}.filter-button,.primary-button,.secondary-button,.quiet-button{border:1px solid var(--line);border-radius:9px;padding:8px 12px;background:var(--surface);font-size:12px}.filter-button.active,.primary-button{background:var(--accent);border-color:var(--accent);color:#fff}.secondary-button{color:var(--accent);border-color:var(--accent)}.quiet-button{border-color:transparent;background:transparent;color:var(--muted)}.dictionary-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.term-card{padding:17px 18px}.term-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.term-head h3{font:700 16px/1.3 Georgia,"Songti SC",serif}.term-letter{font:700 11px Georgia,serif;color:var(--accent-2)}.term-card dl{margin:10px 0 0}.term-card dt{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-top:9px}.term-card dd{margin:2px 0 0;font-size:12px}.term-foot{display:flex;justify-content:space-between;gap:8px;margin-top:13px;color:var(--muted);font-size:10px}.chapter-article{margin:16px 0;border:1px solid var(--line);border-radius:17px;background:var(--surface);overflow:hidden}.chapter-article>summary{display:flex;align-items:center;gap:14px;padding:17px 20px;cursor:pointer;list-style:none}.chapter-article>summary::-webkit-details-marker{display:none}.chapter-article>summary:after{content:"⌄";margin-left:auto;color:var(--muted);font-size:19px}.chapter-article[open]>summary:after{content:"⌃"}.chapter-article .chapter-number{width:34px;height:34px}.chapter-article h2{font:700 19px/1.25 Georgia,"Songti SC",serif;margin:0}.chapter-article summary small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.article-body{padding:0 20px 22px;border-top:1px solid var(--line)}.article-body h3{font:700 15px/1.4 Georgia,"Songti SC",serif;margin:20px 0 8px}.article-body p,.article-body li{font-size:13px}.article-body ul,.article-body ol{padding-left:21px}.article-body li{margin:4px 0}.framework{margin:14px 0;padding:15px;background:var(--surface-2);border-radius:12px}.framework strong{display:block;color:var(--accent);font-size:13px}.framework p{margin:5px 0 0;color:var(--muted);font-size:12px}.framework-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin-top:10px}.framework-grid span{padding:9px;background:var(--surface);border-radius:8px;font-size:11px}.case-card{display:flex;flex-direction:column;gap:9px}.case-meta{font-size:10px;color:var(--muted)}.case-card .case-actions{display:flex;gap:8px;margin-top:4px}.case-card .case-actions button{font-size:11px;padding:6px 9px}.priority{font-size:10px;border-radius:6px;padding:3px 7px;background:var(--soft-green);color:var(--accent);font-weight:700}.priority.p2{background:#f6ecd4;color:#72551d}.priority.p3{background:var(--surface-2);color:var(--muted)}.qa-card{margin-bottom:11px}.qa-card summary{cursor:pointer;font-weight:700;font-size:14px;list-style:none}.qa-card summary::-webkit-details-marker{display:none}.qa-card summary:before{content:"Q";display:inline-grid;place-items:center;width:23px;height:23px;margin-right:9px;border-radius:7px;background:var(--accent);color:#fff;font:700 11px Georgia,serif}.qa-answer{border-top:1px solid var(--line);margin-top:13px;padding-top:12px;font-size:12px}.qa-answer p{margin:6px 0}.score-points{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:6px;margin:10px 0}.score-points span{padding:7px 9px;border-radius:8px;background:var(--surface-2);font-size:10px}.quiz-question{margin:11px 0;padding:17px 19px}.quiz-question h3{font-family:inherit;font-size:14px;font-weight:700;line-height:1.5;margin:8px 0 12px}.quiz-options{display:grid;gap:7px}.quiz-option{display:flex;gap:9px;align-items:flex-start;padding:8px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);font-size:12px}.quiz-option:has(input:checked){border-color:var(--accent);background:var(--soft-green)}.quiz-feedback{margin-top:10px;padding:10px 12px;border-radius:9px;font-size:12px}.quiz-feedback.correct{background:var(--soft-green);color:var(--accent)}.quiz-feedback.incorrect{background:var(--soft-red);color:#754733}.quiz-feedback.neutral{background:var(--surface-2);color:var(--muted)}.quiz-actions{display:flex;gap:8px;margin-top:12px}.flashcard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.flashcard{min-height:208px;perspective:900px;cursor:pointer}.flash-inner{position:relative;height:100%;min-height:208px;transition:transform .55s;transform-style:preserve-3d}.flashcard.flipped .flash-inner{transform:rotateY(180deg)}.flash-face{position:absolute;inset:0;backface-visibility:hidden;border:1px solid var(--line);border-radius:17px;padding:20px;background:var(--surface);display:flex;flex-direction:column;justify-content:space-between;box-shadow:0 4px 18px rgba(29,39,31,.03)}.flash-back{transform:rotateY(180deg);background:var(--accent);color:#f7f3e9;border-color:var(--accent)}.flash-face strong{font:700 18px Georgia,"Songti SC",serif}.flash-face p{font-size:12px;color:var(--muted);margin:10px 0}.flash-back p{color:rgba(255,255,255,.84)}.flash-face small{font-size:10px;color:var(--muted)}.flash-back small{color:#d5d8cf}.progress-check{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}.progress-check input{accent-color:var(--accent)}.empty-state{padding:28px;text-align:center;border:1px dashed var(--line);border-radius:15px;color:var(--muted);font-size:13px}.quick-sheet{columns:2;column-gap:32px}.quick-sheet li{break-inside:avoid;margin:0 0 8px;font-size:12px}.footer-rule{height:1px;background:var(--line);margin:35px 0 15px}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:var(--ink);color:var(--surface);padding:9px 16px;border-radius:10px;font-size:12px;z-index:60;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}.site-footer{display:flex;justify-content:space-between;gap:10px;padding:17px 30px;border-top:1px solid var(--line);color:var(--muted);font-size:10px}
body.dark{--paper:#171c19;--surface:#202824;--surface-2:#29332d;--ink:#e8ece5;--muted:#a5b0a5;--line:#39443d;--accent:#9bc8a6;--accent-2:#e59a6a;--soft-green:#2f4737;--soft-red:#4a342e;--shadow:0 12px 40px rgba(0,0,0,.18);color-scheme:dark}body.dark .topbar{background:rgba(32,40,36,.94)}body.dark .sidebar{background:rgba(32,40,36,.45)}body.dark .hero{background:#254333}body.dark .notice{background:#3f3827;border-color:#635638;color:#e8d49a}body.dark .notice.restricted{background:#44332d;border-color:#674838;color:#e4bba0}
@media(max-width:1250px){.topbar{gap:14px;padding:0 18px}.brand{min-width:160px}.module-nav button{padding:8px}.search-wrap input{width:140px}.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:980px){:root{--sidebar:230px}.module-nav{max-width:48vw}.top-actions{gap:6px}.search-wrap kbd{display:none}.dictionary-list{grid-template-columns:1fr}.flashcard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.topbar{height:64px;padding:0 12px;gap:10px}.menu-toggle{display:grid;flex:none}.brand{min-width:auto;gap:7px}.brand-mark{width:36px;height:36px}.brand small{display:none}.brand strong{font-size:14px}.module-nav{display:none}.top-actions{margin-left:auto}.search-wrap{width:38px;justify-content:center;padding:0}.search-wrap input{position:absolute;left:0;top:49px;width:calc(100vw - 24px);height:42px;padding:0 12px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);display:none}.search-wrap:focus-within input{display:block}.search-wrap kbd{display:none}.app-shell{display:block}.sidebar{position:fixed;z-index:25;top:64px;bottom:0;left:0;width:min(300px,86vw);height:auto;transform:translateX(-105%);transition:transform .25s;background:var(--surface);box-shadow:var(--shadow)}body.menu-open .sidebar{transform:translateX(0)}body.menu-open:after{content:"";position:fixed;inset:64px 0 0;background:rgba(0,0,0,.3);z-index:20}.main-content{padding:22px 14px 44px}.hero{border-radius:19px;padding:25px 22px}.hero h1{font-size:34px}.grid.two,.grid.three,.grid.four{grid-template-columns:1fr}.route-list{grid-template-columns:repeat(7,130px)}.section-heading{align-items:flex-start;flex-direction:column;gap:4px}.flashcard-grid{grid-template-columns:1fr}.flashcard,.flash-inner{min-height:175px}.quick-sheet{columns:1}.site-footer{padding:14px;flex-direction:column}.search-results{right:0;top:50px}.chapter-article>summary{padding:14px}.article-body{padding:0 14px 17px}}
@media print{body{background:#fff;color:#111;font-size:11pt}.topbar,.sidebar,.site-footer,.toolbar,.icon-button,.menu-toggle,.case-actions,.quiz-actions,.toast{display:none!important}.app-shell{display:block}.main-content{padding:0}.hero,.card,.chapter-article{box-shadow:none;break-inside:avoid}.hero{background:#fff;color:#111;border:1px solid #777}.hero p{color:#333}.chapter-article{border-color:#888}.chapter-article .article-body{display:block!important}.chapter-article:not([open]) .article-body{display:block}a{color:#111;text-decoration:none}.page-wrap{max-width:none}.page-title{font-size:24pt}.notice{color:#333!important;background:#fff!important;border-color:#888!important}}

.side-module-list{display:grid;gap:4px}.side-divider{height:1px;background:var(--line);margin:14px 5px}.side-module-list .chapter-link{font-size:12px}.answer-input{width:100%;margin-top:8px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);resize:vertical}

.font-control{position:relative;flex:none}.font-panel{position:absolute;top:48px;right:0;z-index:45;display:flex;align-items:center;gap:7px;min-width:252px;padding:10px 11px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}.font-panel[hidden]{display:none}.font-panel strong{margin-right:auto;font-size:12px;white-space:nowrap}.font-panel span{min-width:37px;text-align:center;color:var(--muted);font-size:11px}.font-step,.font-reset{min-width:34px;height:32px;padding:0 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:var(--ink);font-size:13px}.font-step:hover,.font-reset:hover{border-color:var(--accent);color:var(--accent)}.font-reset{font-size:11px}
@media(max-width:390px){.topbar{gap:6px}.top-actions{gap:4px}.top-actions>.icon-button,.font-control>.icon-button{width:32px;height:32px}.brand-mark{width:32px;height:32px}.brand strong{font-size:13px}.font-panel{right:0;min-width:244px}}

/* Editorial forest-and-paper visual system, matched to the Investment study site. */
:root {
  --paper: #f1f0e8;
  --surface: #fcfbf7;
  --surface-2: #e9eae1;
  --ink: #182622;
  --muted: #71807a;
  --line: #e2e2d8;
  --accent: #183b34;
  --accent-2: #b66a57;
  --gold: #c79242;
  --soft-green: #dce9df;
  --soft-red: #f5e4d9;
  --shadow: 0 18px 50px rgba(23, 43, 36, .08);
  --radius: 4px;
  --sidebar: 250px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

.topbar {
  height: 64px;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 42px);
  background: rgba(252, 251, 247, .96);
  border-bottom-color: rgba(24, 38, 34, .1);
  box-shadow: 0 4px 18px rgba(23, 43, 36, .025);
}

.brand { min-width: 178px; gap: 12px; }
.brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(236, 217, 169, .7);
  border-radius: 0;
  background: var(--accent);
  color: #e9ce92;
  font: 600 16px/1 var(--serif);
  transform: rotate(-3deg);
}
.brand strong { font: 600 16px/1.25 var(--serif); letter-spacing: .08em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.module-nav { gap: 2px; }
.module-nav button {
  padding: 8px 9px;
  border-radius: 3px;
  color: #68766e;
  font-size: 12px;
}
.module-nav button:hover,
.module-nav button.active {
  color: var(--accent);
  background: #e6eee6;
}
.top-actions { gap: 7px; }
.search-wrap {
  height: 36px;
  padding: 0 9px;
  border-radius: 3px;
  background: var(--surface);
}
.search-wrap input { width: 168px; font-size: 12px; }
.search-wrap kbd { border-radius: 2px; font: 10px var(--mono); }
.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  background: var(--surface);
}
.search-results { border-radius: 4px; }
.search-result { border-radius: 3px; }

.app-shell {
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: calc(100vh - 98px);
}
.sidebar {
  top: 64px;
  height: calc(100vh - 64px);
  padding: 25px 16px 20px;
  border: 0;
  color: #f4f3e8;
  background: var(--accent);
}
.side-heading {
  color: #d8e0d8;
  font: 11px var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.progress-label { color: #b3c0b4; font: 11px var(--mono); letter-spacing: 0; }
.progress-track { background: rgba(255, 255, 255, .15); border-radius: 0; }
.progress-track span { background: #d7b66f; border-radius: 0; }
.chapter-nav { gap: 4px; }
.chapter-link {
  min-height: 40px;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 3px;
  color: #d4ded5;
  font-size: 12px;
  transition: background .18s ease, color .18s ease;
}
.chapter-link:hover,
.chapter-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .1);
}
.chapter-number {
  width: 25px;
  height: 25px;
  border-radius: 0;
  border-color: rgba(232, 207, 149, .36);
  color: #dfc887;
  font: 11px var(--mono);
}
.chapter-link.done .chapter-number {
  color: #1e3b31;
  background: #dfc887;
  border-color: #dfc887;
}
.side-divider { background: rgba(255, 255, 255, .17); }
.side-note {
  border-color: rgba(255, 255, 255, .15);
  color: #b3c0b4;
  font-size: 10px;
}
.note-dot { background: #d7b66f; }

.main-content { padding: 30px clamp(20px, 3.4vw, 56px) 64px; }
.page-wrap { max-width: 1420px; }
.eyebrow {
  margin-bottom: 9px;
  color: #8b7553;
  font: 10px var(--mono);
  letter-spacing: .17em;
}
.page-title {
  margin-bottom: 10px;
  font: 600 clamp(30px, 4vw, 44px)/1.25 var(--serif);
  letter-spacing: .015em;
}
.page-lede { max-width: 820px; color: var(--muted); font-size: 14px; }
.section-heading { margin: 36px 0 16px; }
.section-heading h2 { font: 600 22px/1.4 var(--serif); letter-spacing: .02em; }
.section-heading p { color: var(--muted); font-size: 12px; }

.hero {
  position: relative;
  min-height: 252px;
  padding: clamp(30px, 4vw, 48px);
  border-radius: 0;
  background: var(--accent);
  box-shadow: none;
}
.hero::before {
  content: "";
  position: absolute;
  right: clamp(42px, 12%, 170px);
  top: 50%;
  width: 156px;
  height: 156px;
  transform: translateY(-50%);
  border: 1px solid rgba(232, 207, 149, .42);
  border-radius: 50%;
  box-shadow: 0 0 0 23px rgba(232, 207, 149, .045), 0 0 0 47px rgba(232, 207, 149, .03);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: calc(50% - 77px);
  right: clamp(115px, calc(12% + 100px), 270px);
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: #e0bd6a;
  box-shadow: 0 0 0 5px rgba(224, 189, 106, .12);
}
.hero .eyebrow { color: #d3bc82; }
.hero h1 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 0 14px;
  font: 600 clamp(34px, 4.5vw, 54px)/1.2 var(--serif);
  letter-spacing: .015em;
}
.hero p { position: relative; z-index: 1; color: #cbd7ce; font-size: 14px; }
.hero-meta { position: relative; z-index: 1; gap: 8px; margin-top: 22px; }
.pill {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  color: #e4e9df;
}

.grid { gap: 13px; }
.card {
  padding: 19px 20px;
  border-radius: 4px;
  border-color: var(--line);
  box-shadow: 0 4px 18px rgba(23, 43, 36, .025);
}
.card h3,
.term-head h3,
.chapter-article > summary h2,
.flash-face strong { font-family: var(--serif); }
.card p { color: #68766e; }
.chapter-card {
  min-height: 174px;
  border-top: 2px solid #b8c7b7;
}
.chapter-card .chapter-kicker {
  color: #8b7553;
  font: 10px var(--mono);
  letter-spacing: .14em;
}
.chapter-card .hours { color: var(--muted); font: 11px var(--mono); }
.chapter-card h3 { font-size: 18px; line-height: 1.5; }
.chapter-card button { color: var(--accent); }
.chapter-card:hover,
.model-card:hover { border-color: #aebdac; box-shadow: 0 10px 28px rgba(23, 43, 36, .07); }
.route-list { gap: 8px; }
.route-step {
  border-radius: 0;
  border-top: 2px solid #b8c7b7;
  background: rgba(252, 251, 247, .7);
}
.route-step:before { color: var(--gold); font: 11px var(--mono); }
.route-step strong { font: 600 13px/1.5 var(--serif); }
.relation-flow { gap: 10px; }
.relation-node {
  border-radius: 3px;
  background: var(--surface);
  font: 600 13px var(--serif);
}
.relation-arrow { color: var(--gold); }
.mind-tree { gap: 7px; }
.mind-tree details { border-radius: 3px; background: rgba(252, 251, 247, .8); }
.mind-tree summary { font-family: var(--serif); }
.mind-chip { border-radius: 2px; background: var(--surface-2); }
.notice { border-radius: 3px; }
.toolbar input,
.toolbar select,
.filter-button,
.primary-button,
.secondary-button,
.quiet-button { border-radius: 3px; }
.filter-button.active,
.primary-button { background: var(--accent); border-color: var(--accent); }
.secondary-button { color: var(--accent); border-color: #aebdac; }
.tag { border-radius: 2px; background: var(--surface-2); }
.chapter-article { border-radius: 3px; }
.chapter-article > summary { background: rgba(252, 251, 247, .5); }
.chapter-article > summary:hover { background: var(--surface); }
.term-card { border-radius: 3px; }
.term-letter { color: var(--accent-2); font-family: var(--mono); }
.quiz-question { border-radius: 3px; }
.quiz-option { border-radius: 3px; }
.quiz-feedback,
.empty-state,
.answer-input,
.score-points span { border-radius: 3px; }
.flashcard { border-radius: 3px; }
.flash-face { border-radius: 3px; }
.flash-back { background: var(--accent); }
.font-panel { border-radius: 4px; }
.font-step,
.font-reset { border-radius: 3px; }
.toast { border-radius: 3px; background: var(--accent); }
.site-footer { color: var(--muted); }

body.dark {
  --paper: #171c19;
  --surface: #202824;
  --surface-2: #29332d;
  --ink: #e8ece5;
  --muted: #a5b0a5;
  --line: #39443d;
  --accent: #254333;
  --accent-2: #e59a6a;
  --gold: #dfbd70;
  --soft-green: #2f4737;
  --soft-red: #4a342e;
  --shadow: 0 12px 40px rgba(0, 0, 0, .22);
  color-scheme: dark;
}
body.dark .topbar { background: rgba(32, 40, 36, .96); border-bottom-color: var(--line); }
body.dark .sidebar { background: #142c25; }
body.dark .module-nav button { color: #b5c0b5; }
body.dark .module-nav button:hover,
body.dark .module-nav button.active { color: #e8ece5; background: #33473a; }
body.dark .hero { background: #254333; }
body.dark .route-step,
body.dark .mind-tree details { background: rgba(32, 40, 36, .8); }
body.dark .card p { color: var(--muted); }

@media (max-width: 1250px) {
  .topbar { gap: 12px; padding-inline: 18px; }
  .brand { min-width: 155px; }
  .module-nav button { padding-inline: 7px; font-size: 11px; }
  .search-wrap input { width: 135px; }
}
@media (max-width: 980px) {
  :root { --sidebar: 218px; }
  .topbar { gap: 10px; }
  .module-nav { max-width: 45vw; }
  .top-actions { gap: 5px; }
  .brand { min-width: 145px; }
  .hero::before { right: 42px; }
  .hero::after { right: 116px; }
}
@media (max-width: 720px) {
  .topbar { height: 64px; padding-inline: 12px; gap: 9px; }
  .brand { min-width: auto; gap: 8px; }
  .brand small { display: none; }
  .module-nav { display: none; }
  .app-shell { display: block; min-height: calc(100vh - 94px); }
  .sidebar {
    top: 64px;
    bottom: 0;
    width: min(300px, 86vw);
    height: auto;
    background: var(--accent);
    box-shadow: 12px 0 30px rgba(0, 0, 0, .18);
  }
  .main-content { padding: 22px 14px 44px; }
  .hero { min-height: unset; padding: 27px 23px; }
  .hero h1 { font-size: 35px; }
  .hero::before { right: -55px; top: 20%; width: 150px; height: 150px; }
  .hero::after { right: 18px; top: calc(20% - 75px); }
  .page-title { font-size: 32px; }
  .section-heading { margin-top: 30px; }
  .chapter-card { min-height: 156px; }
}
@media print {
  body { background: #fff; }
  .hero { border: 1px solid #777; background: #fff; color: #111; }
  .hero::before,
  .hero::after { display: none; }
  .hero .eyebrow { color: #333; }
  .hero p { color: #333; }
}
@media (max-width: 390px) {
  .topbar { gap: 6px; }
  .top-actions { gap: 4px; }
  .top-actions > .icon-button,
  .font-control > .icon-button { width: 32px; height: 32px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand strong { font-size: 13px; }
  .font-panel { right: 0; min-width: 244px; }
}

/* Chapter-first navigation and chapter module shortcuts. */
.chapter-nav {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  margin-top: 10px;
  padding: 0 2px 12px;
}
.chapter-group {
  border-bottom: 1px solid rgba(255,255,255,.13);
  padding-bottom: 7px;
}
.chapter-group-head { display: grid; grid-template-columns: minmax(0,1fr) 30px; gap: 4px; align-items: center; }
.chapter-group-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 6px 7px;
  border: 0;
  background: transparent;
  color: #d4ded5;
  text-align: left;
  font-size: 12px;
}
.chapter-group-title:hover,
.chapter-group.selected .chapter-group-title { color: #fff; }
.chapter-group-title .chapter-number { border-color: rgba(232,207,149,.36); color: #dfc887; }
.chapter-group.done .chapter-group-title .chapter-number { background: #dfc887; color: #1e3b31; }
.chapter-expand {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 3px;
  background: transparent;
  color: #d8e0d8;
}
.chapter-expand:hover { background: rgba(255,255,255,.1); }
.chapter-module-list { display: grid; gap: 2px; margin: 4px 0 0 31px; }
.chapter-module-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 8px;
  border: 0;
  border-left: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #b9c9bd;
  text-align: left;
  font-size: 11px;
}
.chapter-module-link span:last-child { opacity: 0; color: #dfc887; }
.chapter-module-link:hover,
.chapter-module-link.active { border-left: 2px solid #dfc887; color: #fff; background: rgba(255,255,255,.08); }
.chapter-module-link.active span:last-child,
.chapter-module-link:hover span:last-child { opacity: 1; }
.chapter-module-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.chapter-module-card {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  gap: 4px 10px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.chapter-module-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.chapter-module-card > span { grid-row: span 2; color: var(--gold); font: 12px var(--mono); }
.chapter-module-card strong { font-family: var(--serif); font-size: 14px; }
.chapter-module-card small { color: var(--muted); font-size: 10px; }
.quick-memory-card { border-left: 3px solid var(--gold); }
.unassigned-cases,
.full-course-sprint { margin-top: 28px; }
.unassigned-cases > summary,
.full-course-sprint > summary { cursor: pointer; padding: 14px 0; color: var(--accent); font-weight: 700; }
.unassigned-cases .grid { margin-top: 10px; }
body.dark .chapter-module-card { background: var(--surface); }
body.dark .unassigned-cases > summary,
body.dark .full-course-sprint > summary { color: var(--accent); }
@media (max-width: 980px) {
  .chapter-module-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .chapter-nav { gap: 7px; }
  .chapter-module-cards { grid-template-columns: 1fr; }
  .chapter-module-card { min-height: 66px; }
}
@media print {
  .chapter-module-cards, .unassigned-cases > summary, .full-course-sprint > summary { display: none; }
  .unassigned-cases[open], .full-course-sprint[open] { display: block; }
}
