/* Reading appearance is independent of textbook and study progress. */
:root{--ink:#262c35;--muted:#687180;--line:#e1e5eb;--canvas:#f5f6f8;--paper:#ffffff;--theme-canvas:#f5f6f8;--theme-paper:#ffffff;--theme-soft:#f0f2f5;--theme-hero:#f4f6f9;--theme-text:#262c35;--theme-secondary:#576273;--theme-muted:#687180;--theme-line:#e1e5eb;--theme-dot:#d6dce5;--theme-node:#ffffff;--theme-edge:#9da9b8;--theme-relation:#b66854;--theme-shadow:#2933430b;--theme-sidebar:#ffffff;--theme-sidebar-field:#f1f3f6;color-scheme:light}
html[data-appearance="eye"]{--ink:#40382f;--muted:#75634e;--green:#895637;--green-light:#eadbc5;--accent-deep:#6c4029;--accent-rgb:137,86,55;--line:#dfd1b8;--canvas:#f1e9d8;--paper:#faf5e8;--theme-canvas:#f1e9d8;--theme-paper:#faf5e8;--theme-soft:#efe5d2;--theme-hero:#f5eddd;--theme-text:#40382f;--theme-secondary:#6b5946;--theme-muted:#75634e;--theme-line:#dfd1b8;--theme-dot:#d3c3a6;--theme-node:#faf5e8;--theme-edge:#b5a080;--theme-relation:#a56848;--theme-shadow:#6a503509;--theme-sidebar:#eee4d1;--theme-sidebar-field:#f7f0e1}
html[data-appearance="night"]{--ink:#e1e4e7;--muted:#a1a9b2;--green:#e4a17f;--green-light:#3c302c;--accent-deep:#c18465;--accent-rgb:228,161,127;--line:#39424c;--canvas:#171c23;--paper:#222931;--coral:#e7a18c;--amber:#d7bb76;--theme-canvas:#171c23;--theme-paper:#222931;--theme-soft:#2b333e;--theme-hero:#2e2f32;--theme-text:#e1e4e7;--theme-secondary:#b1bac4;--theme-muted:#9aa6b4;--theme-line:#39424c;--theme-dot:#3c4652;--theme-node:#29333d;--theme-edge:#66737e;--theme-relation:#ce977f;--theme-shadow:#00000017;color-scheme:dark}
html[data-appearance="eye"] body{--green:#895637;--green-light:#eadbc5;--accent-deep:#6c4029;--accent-rgb:137,86,55}
html[data-appearance="eye"] body[data-subject="film"]{--green:#52697a;--green-light:#e1e3df;--accent-deep:#3a4f5d;--accent-rgb:82,105,122}
html[data-appearance="night"] body{--green:#e4a17f;--green-light:#3c302c;--accent-deep:#c18465;--accent-rgb:228,161,127}
html[data-appearance="night"] body[data-subject="film"]{--green:#92bbd6;--green-light:#283d4c;--accent-deep:#6491af;--accent-rgb:146,187,214}
html[data-appearance="night"]{--theme-sidebar:#181f28;--theme-sidebar-field:#232d39}
.appearance-toggle{flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;border:1px solid var(--line);border-radius:9px;height:37px;padding:0 10px;font-size:11px;background:var(--theme-paper);color:var(--theme-secondary)}.appearance-toggle svg{width:16px;height:16px}.appearance-toggle:hover{background:var(--theme-soft)}.appearance-toggle:focus-visible{outline:2px solid var(--green);outline-offset:3px}
html[data-appearance] body{background:var(--theme-canvas)}
html[data-appearance] .topbar,html[data-appearance] .metric,html[data-appearance] .chapter-route,html[data-appearance] #chapterOverview a,html[data-appearance] .study-toolbar select,html[data-appearance] .knowledge,html[data-appearance] .empty,html[data-appearance] .chapter-navigation button,html[data-appearance] dialog,html[data-appearance] .map-toolbar,html[data-appearance] .node-detail,html[data-appearance] .node-detail .topic-list button,html[data-appearance] .node-detail .small-button,html[data-appearance] .record-button,html[data-appearance] .source-body #ocrText{background:var(--theme-paper);border-color:var(--theme-line)}
html[data-appearance] .book-heading,html[data-appearance] .map-heading{background:linear-gradient(125deg,var(--theme-paper),var(--theme-hero));border-color:var(--theme-line)}
html[data-appearance] .book-heading p,html[data-appearance] .metric-value,html[data-appearance] .card-head h2,html[data-appearance] .answer,html[data-appearance] .study-coach b,html[data-appearance] .node-detail h2,html[data-appearance] dialog h2,html[data-appearance] .record-summary{color:var(--theme-text)}
html[data-appearance] .chapter-meta,html[data-appearance] .book-art>span,html[data-appearance] .hero-tags,html[data-appearance] #chapterOverview a,html[data-appearance] .study-coach,html[data-appearance] .question,html[data-appearance] .card-footer,html[data-appearance] .node-detail li,html[data-appearance] #recordsInfo,html[data-appearance] .tabs button{color:var(--theme-secondary)}
html[data-appearance] .metric-meta,html[data-appearance] .metric-value small,html[data-appearance] .chapter-route summary>small,html[data-appearance] .chapter-route summary>svg,html[data-appearance] .answer-layer,html[data-appearance] .records-dialog small,html[data-appearance] .metric-label{color:var(--theme-muted)}
html[data-appearance] .study-toolbar>.tabs,html[data-appearance] .question,html[data-appearance] .card-footer,html[data-appearance] .source-tools,html[data-appearance] .source-body,html[data-appearance] dialog header,html[data-appearance] .record-summary{background:var(--theme-soft);border-color:var(--theme-line)}
html[data-appearance] .tabs button.active{background:var(--theme-paper);color:var(--green)}
html[data-appearance] .card-head>.icon,html[data-appearance] .ratings button,html[data-appearance] .source-tools input,html[data-appearance] .map-heading select,html[data-appearance] .book-heading>#print{background:var(--theme-paper);border-color:var(--theme-line);color:var(--theme-secondary)}
html[data-appearance] .card-head>.icon.saved,html[data-appearance] .answer-layer button{background:var(--green-light);color:var(--green)}
html[data-appearance] .ratings button.active{color:#fff}html[data-appearance] .ratings button[data-rate="known"].active{background:#577661;border-color:#577661}html[data-appearance] .ratings button[data-rate="learning"].active{background:#876c36;border-color:#876c36}html[data-appearance] .ratings button[data-rate="again"].active{background:#915b4b;border-color:#915b4b}
html[data-appearance] .unit-num,html[data-appearance] .answer li::marker,html[data-appearance] .aux summary{color:var(--green)}html[data-appearance] .aux{color:var(--theme-secondary);border-color:var(--theme-line)}html[data-appearance] .answer-layer:before{background:var(--theme-edge)}html[data-appearance] .record-summary strong{color:var(--green)}html[data-appearance] .tabs button>span#dueCount{background:var(--green-light);color:var(--green)}
html[data-appearance] .map-workspace #graph{background-color:var(--theme-canvas);background-image:radial-gradient(var(--theme-dot) .8px,transparent .8px)}html[data-appearance] .node-detail .topic-list button:hover{background:var(--theme-soft)}html[data-appearance] .legend-line{background:var(--theme-edge)}html[data-appearance] .legend-line.relation{background:var(--theme-relation)}
html[data-appearance="night"] .sidebar{background:#11161d}html[data-appearance="night"] .subject-switch{background:#242c37}html[data-appearance="night"] .subject-switch button.active{background:#3d464f;color:#e6d6bd}html[data-appearance="night"] .search{background:#232a35}html[data-appearance="night"] .chapter-button.active{background:#343333}html[data-appearance="night"] .metric-icon{background:var(--green-light);color:var(--green)}html[data-appearance="night"] .metric[data-metric="due"] .metric-icon{color:#dfbd77;background:#3d3525}html[data-appearance="night"] .metric[data-metric="today"] .metric-icon{color:#9ac3a4;background:#2c3c33}html[data-appearance="night"] .metric[data-metric="saved"] .metric-icon{color:#bcabdd;background:#393248}html[data-appearance="night"] .reveal{color:#191e24}html[data-appearance="night"] .workspace-intro>span:last-child{color:#95bc9e}
/* The entire chapter rail follows the selected appearance. */
html[data-appearance] .sidebar{background:var(--theme-sidebar);color:var(--theme-text);border-right:1px solid var(--theme-line);box-shadow:none}
html[data-appearance] .subject-switch,html[data-appearance] .search{background:var(--theme-sidebar-field);border-color:var(--theme-line)}
html[data-appearance] .subject-switch button{color:var(--theme-secondary)}
html[data-appearance] .subject-switch button.active{background:var(--theme-paper);color:var(--green);box-shadow:0 1px 5px var(--theme-shadow)}
html[data-appearance] .search input,html[data-appearance] .search svg{color:var(--theme-text)}
html[data-appearance] .search input::placeholder{color:var(--theme-muted)}
html[data-appearance] .side-progress,html[data-appearance] .chapter-button,html[data-appearance] .nav-subtopics button,html[data-appearance] .side-footer a,html[data-appearance] .side-footer button{color:var(--theme-secondary)}
html[data-appearance] .part-label{color:var(--theme-secondary)}
html[data-appearance] .chapter-button .chapter-number{color:var(--theme-muted)}
html[data-appearance] .chapter-button:hover,html[data-appearance] .nav-subtopics button:hover{background:var(--theme-soft);color:var(--theme-text)}
html[data-appearance] .chapter-button.active{background:var(--green-light);color:var(--green)}
html[data-appearance] .chapter-button.active .chapter-number,html[data-appearance] .chapter-button.active .chapter-progress{color:var(--green)}
html[data-appearance] .chapter-progress,html[data-appearance] .chapter-button.active .chapter-progress{color:var(--theme-secondary);border-color:var(--theme-line)}
html[data-appearance] .side-footer{border-color:var(--theme-line)}
html[data-appearance] progress::-webkit-progress-bar{background:var(--theme-line)}
html[data-appearance] progress::-webkit-progress-value{background:var(--green)}
html[data-appearance] .point-preview,html[data-appearance] .note-origin{color:var(--theme-secondary)}
html[data-appearance] .book-heading>#print{background:var(--theme-paper);color:var(--theme-secondary)}
@media(max-width:760px){.appearance-toggle{width:36px;height:40px;padding:0}.appearance-toggle span{display:none}}
@media(max-width:430px){.view-nav span{display:none}.view-nav a{padding:8px 9px}.view-nav{gap:4px}.topbar{gap:6px}.brand{gap:5px}.brand strong{font-size:14px}}
@media(max-width:760px){.ratings button{min-height:40px;padding-left:13px;padding-right:13px}.reveal{min-height:44px}.card-head>.icon{width:38px;height:38px}.topbar .icon,.record-button,.appearance-toggle{height:40px;min-width:36px}.view-nav a{min-height:40px}}
@media print{html[data-appearance] body{--green:#333;--green-light:#fff}html[data-appearance] body,html[data-appearance] main,html[data-appearance] .knowledge,html[data-appearance] .book-heading,html[data-appearance] .question,html[data-appearance] .card-footer{background:#fff!important;color:#222!important}html[data-appearance] .answer,html[data-appearance] .card-head h2,html[data-appearance] .book-heading p,html[data-appearance] .aux,html[data-appearance] .question,html[data-appearance] .hero-copy .eyebrow,html[data-appearance] .unit-num,html[data-appearance] .answer li::marker,html[data-appearance] .aux summary,html[data-appearance] .chapter-meta span,html[data-appearance] .answer-layer,html[data-appearance] .reference,html[data-appearance] .aux a{color:#333!important}html[data-appearance] .answer-layer button{background:#fff!important;color:#333!important}.appearance-picker{display:none!important}}
