/* CodedileRead reading editions. This layer unifies the shared interface. */
body { background:var(--canvas); }
.workspace { width:min(1200px,calc(100% - 80px)); }
.site-header { padding-inline:max(28px,calc((100vw - 1280px)/2)); gap:34px; background:var(--surface); border-color:var(--border); }
.brand-fallback { font-size:25px; letter-spacing:-1.3px; }
.brand-edition { font-size:23px; }
.header-nav { gap:24px; margin:0; }
.header-nav a { padding:26px 0; color:var(--body); }
.header-nav a.active { color:var(--accent); font-weight:650; }
.header-tools { gap:12px; }
.search-trigger { background:var(--surface-soft); border:1px solid var(--line); border-radius:8px; padding:0 12px; }
.search-trigger kbd { background:var(--surface); }
.appearance-trigger { border:1px solid var(--border); border-radius:50%; width:38px; min-width:38px; height:38px; color:var(--ink); }
.header-tools-menu summary { padding:0 8px; }
.header-dropdown { padding:9px; border-radius:14px; width:238px; }
.header-dropdown :is(button,a) { min-height:46px; }
.button { border-radius:8px; min-height:50px; box-shadow:none; }
.button-primary:hover { box-shadow:var(--card-shadow); }
.button-secondary { background:var(--surface); }
.eyebrow { font-size:11px; letter-spacing:.13em; }
.home-hero { grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:76px; padding:82px 0 64px; }
.hero-kicker { color:var(--body); letter-spacing:.14em; font-size:10px; margin-bottom:28px; }
.hero-copy h1 { font-family:var(--serif); font-size:clamp(48px,4.7vw,66px); font-weight:400; letter-spacing:-2.6px; line-height:1.07; margin-bottom:25px; }
.hero-copy h1>span { font-style:italic; color:var(--accent); }
.hero-description { font-size:17px; line-height:1.85; max-width:460px; }
.hero-reassurance { font-size:11px; gap:20px; line-height:1.8; }
.hero-secondary { font-size:13px; text-decoration:underline; text-underline-offset:5px; text-decoration-color:var(--border); }
.concept-preview { background:var(--surface); color:var(--ink); border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); }
.demo-topline { background:var(--surface-soft); color:var(--muted); border-color:var(--border); padding:17px 23px; font-size:9px; letter-spacing:.1em; }
.demo-note-number { color:var(--accent); font:11px var(--mono); }
.demo-language { color:var(--body); border-color:var(--border); background:var(--surface); }
.demo-body { padding:26px; }
.demo-caption { color:var(--muted); font-size:12px; margin-bottom:25px; }
.demo-code { font-size:28px; padding:14px 0 4px; }
.demo-code [data-code-part="type"] { color:var(--kw); }
.demo-code [data-code-part="name"] { color:var(--ink); }
.demo-code [data-code-part="value"] { color:var(--number); }
.demo-punctuation { color:var(--muted); }
.concept-preview[data-selected-concept="type"] [data-code-part="type"],.concept-preview[data-selected-concept="name"] [data-code-part="name"],.concept-preview[data-selected-concept="value"] [data-code-part="value"] { background:var(--accent-soft); box-shadow:0 2px 0 var(--accent); }
.demo-connectors { color:var(--border); }
.demo-connectors circle { fill:var(--accent); stroke:var(--accent); }
.demo-concepts button { color:var(--body); border-color:var(--border); background:var(--surface); border-radius:7px; padding:13px 12px; min-height:77px; }
.demo-concepts button:hover { border-color:var(--accent); background:var(--surface-hover); }
.demo-concepts button[aria-pressed="true"] { background:var(--accent-soft); border-color:var(--accent); box-shadow:inset 0 -2px var(--accent); }
.demo-concepts button>span { color:var(--muted); font-size:9px; }
.demo-concepts button strong { color:var(--ink); font-size:15px; }
.demo-explanation { color:var(--body); min-height:76px; margin:21px 0; font-size:14px; }
.demo-hint { border-color:var(--line); color:var(--muted); font-size:11px; }
.home-context { border-color:var(--border); padding:22px 0; font-size:12px; }
.home-context strong { color:var(--ink); }
.reading-editions { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:23px 0 0; }
.reading-editions>div:first-child { display:flex; align-items:center; gap:10px; font-size:12px; color:var(--muted); }
.reading-editions>div>svg { width:17px; }
.edition-switch { display:flex; gap:3px; background:var(--surface); border:1px solid var(--border); border-radius:9px; padding:4px; }
.edition-switch button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:0 13px; border:1px solid transparent; border-radius:6px; font-size:12px; color:var(--muted); }
.edition-switch button svg { width:15px; height:15px; }
.edition-switch button[aria-pressed="true"] { background:var(--accent-soft); color:var(--accent); border-color:var(--border); font-weight:650; }
.edition-switch button:hover { color:var(--ink); }
.path-preview { padding-top:64px; }
.section-heading h2 { font:400 35px/1.25 var(--serif); letter-spacing:-1px; }
.section-heading p { color:var(--body); }
.path-cards { gap:0; border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface); }
.path-card { border:0; border-radius:0; padding:30px; background:var(--surface); box-shadow:none; }
.path-card+.path-card { border-left:1px solid var(--border); }
.path-card.first { background:var(--surface); }
.path-card:hover { background:var(--surface-soft); transform:none; box-shadow:none; }
.path-card-top { margin-bottom:27px; }
.path-step { width:auto; height:auto; border:0; font:24px var(--serif); color:var(--muted); }
.start-badge { background:var(--accent-soft); border-radius:4px; margin-left:4px; }
.path-card h3 { font-size:20px; line-height:1.4; }
.path-card p { color:var(--body); font-size:14px; min-height:80px; }
.path-card-art { color:var(--accent); opacity:.75; }
.art-memory i { border-color:var(--muted); }
.art-memory i:nth-child(2) { border-color:var(--accent); }
.path-card-bottom { font-size:11px; }
.home-philosophy { margin:64px 0 36px; padding:42px; border:1px solid var(--border); background:var(--surface); border-radius:14px; gap:72px; }
.home-philosophy h2 { font:400 36px/1.2 var(--serif); letter-spacing:-1px; }
.home-philosophy>div>p { color:var(--body); font-size:15px; margin-bottom:17px; }
.philosophy-steps { gap:0; }
.philosophy-steps>div { padding:16px 0; border-bottom:1px solid var(--line); }
.philosophy-steps>div:last-child { border-bottom:0; }
.philosophy-steps p { font-size:13px; }
.philosophy-steps strong { font-size:15px; }
.study-tools { gap:18px; }
.study-tools>a { border-radius:12px; background:var(--surface); padding:27px; }
.study-tools .review-home-card { background:var(--surface); border-top:3px solid var(--accent); }
.study-tools h2 { font-size:23px; line-height:1.35; }
.collection-note { font-size:12px; }
.home-progress { font-size:12px; padding:22px 0; }
.page-footer { margin-top:64px; padding:32px 0; font-size:12px; line-height:1.8; }
.breadcrumb { margin-bottom:30px; }
.index-header { padding-bottom:34px; }
.index-header h1 { font-family:var(--serif); font-weight:400; font-size:clamp(38px,4.5vw,56px); letter-spacing:-1.6px; }
.filter-bar { background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px; }
.filter-button { min-height:42px; }
.reference-grid { gap:16px; }
.reference-item { grid-template-rows:auto 1fr; align-content:start; border-radius:12px; box-shadow:var(--card-shadow); padding:26px; }
.reference-item:hover { background:var(--surface-soft); }
.reference-item>div { display:flex; flex-direction:column; }
.reference-item .row-meta { margin-top:auto; }
.reference-item h2 { font-size:19px; }
.ref-number { font-size:12px; padding-bottom:13px; border-bottom:1px solid var(--line); }
.path-unit { border-radius:12px; overflow:clip; }
.path-unit[open]>summary { border-bottom:1px solid var(--line); }
.chapter-row { min-height:90px; }
.chapter-row:hover { background:var(--surface-soft); }
.reader-shell { max-width:920px; padding:30px 0 0; }
.reader-topbar { margin:0 0 24px; padding:0 4px; }
.reader-topbar :is(button,a) { color:var(--body); min-height:44px; }
.reader-layout { background:var(--surface); border:1px solid var(--border); border-radius:16px; padding:48px 58px; box-shadow:var(--card-shadow); }
.chapter-header h1 { font-size:clamp(36px,4vw,49px); letter-spacing:-1.5px; line-height:1.16; }
.chapter-kicker { font-size:11px; line-height:1.8; flex-wrap:wrap; }
.chapter-description { font-size:17px; line-height:1.8; }
.chapter-meta { font-size:12px; }
.reader-actions { gap:10px; flex-wrap:wrap; padding-top:20px; }
.reader-actions button { background:var(--surface-soft); border:1px solid var(--line); padding:0 12px; border-radius:7px; min-height:40px; color:var(--body); font-size:12px; }
.reader-actions button:hover { border-color:var(--accent); }
.reader-actions button[aria-pressed="true"] { background:var(--accent-soft); border-color:var(--accent); }
.chapter-guide { background:var(--surface-soft); border-radius:9px; }
.chapter-guide>summary { min-height:52px; }
.lesson-copy { font-family:var(--reading-font); font-size:calc(18px * var(--reader-scale)); line-height:1.95; }
.lesson-copy h2 { font-size:1.5em; letter-spacing:-.6px; }
.lesson-copy .callout { border-left-color:var(--accent); border-radius:0 9px 9px 0; }
.callout.version-note { border-left-style:double; border-left-width:5px; }
.code-block { border-radius:9px; }
.code-block[data-code-theme="dark"] { --code-bg:#14171d; --code-ink:#e0e4ee; --kw:#c8afff; --string:#a1d4b8; --number:#efc38c; --comment:#a4acb9; --fn:#adc8f7; --ink:#f0f1f5; --body:#c6cad2; --muted:#a4acb9; --surface:#191c22; --surface-soft:#22262e; --surface-hover:#292e38; --border:#363c48; }
.code-block[data-code-theme="light"] { --code-bg:#f3f5f9; --code-ink:#263247; --kw:#6845a0; --string:#27694d; --number:#994812; --comment:#626b7c; --fn:#31599c; --ink:#1c2130; --body:#4c5565; --muted:#626b7c; --surface:#fff; --surface-soft:#edf0f5; --surface-hover:#e7ebf3; --border:#d6dbe5; }
.code-toolbar { background:var(--surface-soft); font-size:11px; flex-wrap:wrap; }
.code-tools button { min-height:36px; }
.lesson-copy summary { min-height:48px; }
.lesson-copy table { font-size:.84em; }
.chapter-pagination a { background:var(--surface-soft); }
.chapter-pagination a:hover { background:var(--accent-soft); }
.chapter-end-top { align-items:flex-start; }
.sidebar { background:var(--surface); }
.sidebar-top { max-height:44dvh; overflow-y:auto; flex-shrink:0; padding-bottom:16px; }
.drawer-heading { padding:24px; }
.sidebar-curriculum { min-height:80px; }
.side-link { font-size:14px; min-height:44px; }
.nav-lesson { min-height:44px; }
.side-dialog { width:min(460px,100vw); padding:30px; }
.dialog-head h2 { font-family:var(--sans); font-size:25px; }
.dialog-head .eyebrow { font-size:10px; }
.setting-group { padding:24px 0; }
.theme-options { gap:9px; }
.theme-options button { padding:7px; border-color:var(--border); border-radius:10px; background:var(--canvas); }
.theme-options button[aria-pressed="true"] { box-shadow:0 0 0 1px var(--accent); background:var(--accent-soft); }
.theme-options strong { display:block; font-size:13px; font-weight:650; }
.theme-options small { display:block; font-size:10px; line-height:1.7; }
.theme-preview { position:relative; height:82px; font:30px var(--serif); justify-content:flex-start; align-items:flex-start; padding:10px; margin-bottom:8px; border-color:#80808050; overflow:hidden; }
.theme-preview i { position:absolute; width:55%; height:3px; background:currentColor; opacity:.35; left:12px; bottom:18px; box-shadow:0 7px currentColor; }
.preview-light { background:#fff; color:#1c2130; }
.preview-dark { background:#191c22; color:#f0f1f5; }
.preview-paper { background:#faf9f5; color:#252523; }
.theme-description { margin:16px 0 0; color:var(--muted); font-size:12px; line-height:1.8; min-height:3.6em; }
.search-dialog { border-radius:16px; }
.search-result { border:1px solid transparent; }
.search-result:focus { outline-offset:-3px; }
.search-result mark { background:var(--accent-soft); color:var(--accent); font-weight:650; }
.panel-search { min-height:46px; }
.panel-tabs { gap:20px; }
.notebook-card { padding:22px 0; }
.notebook-card blockquote { border-left-color:var(--accent); font:15px/1.8 var(--reading-font); }
.note-meta .tag { font-size:10px; }
.note-actions :is(a,button) { min-height:36px; display:inline-flex; align-items:center; }
.concepts-page,.revision-desk,.models-page,.checks-page,.offline-page { max-width:960px; }
:is(.concept-collection,.review-topic,.model-gallery-item,.check-collection,.offline-unit) { border-radius:12px; box-shadow:var(--card-shadow); }
:is(.concept-collection,.review-topic,.model-gallery-item,.check-collection)>summary { padding:24px; }
.review-stats>div { background:var(--surface); border-radius:12px; padding:24px; }
.review-stats strong { font:34px var(--serif); }
.review-stats span { font-size:12px; }
.concepts-quicklinks a,.models-quicklinks a { background:var(--surface); min-height:44px; }
.concepts-quicklinks a:hover,.models-quicklinks a:hover { border-color:var(--accent); }
.concept-guide,.review-topic-body { font-size:calc(15px * var(--reader-scale)); }
.concept-lab { border-radius:12px; }
.lab-controls button,.lab-timeline button { min-height:44px; }
.lab-timeline button { min-width:40px; }
.check-choice { padding:16px; }
.check-choice:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
html[data-theme="dark"] .user-highlight[data-color="yellow"] { background:#655222; }
html[data-theme="dark"] .user-highlight[data-color="green"] { background:#2d573f; }
html[data-theme="dark"] .user-highlight[data-color="pink"] { background:#643e51; }
html[data-theme="dark"] .user-highlight[data-color="blue"] { background:#344f72; }
html[data-theme="epaper"] { scroll-behavior:auto; }
html[data-theme="epaper"] .path-card.first { background:var(--surface); }
html[data-theme="epaper"] .concept-preview { border-top:3px solid var(--ink); }
html[data-theme="epaper"] .button { box-shadow:none; }
html[data-theme="epaper"] .hero-kicker>span { box-shadow:none; }
html[data-theme="epaper"] :is(.code-block,.code-block[data-code-theme]) { --code-bg:#f0eee8; --code-ink:#30302c; --kw:#30302c; --string:#41413d; --number:#30302c; --comment:#62625b; --fn:#30302c; --surface:#faf9f5; --surface-soft:#f0eee8; --surface-hover:#e5e2da; --ink:#252523; --border:#bbb9af; --muted:#62625b; --body:#41413d; }
html[data-theme="epaper"] .tok-keyword { font-weight:700; }
html[data-theme="epaper"] .tok-comment { font-style:italic; }
html[data-theme="epaper"] .user-highlight { background:#dfddd4; color:#252523; text-decoration:underline; text-decoration-style:dotted; }
html[data-theme="epaper"] :is(.art-memory i,.path-card-art) { color:var(--ink); border-color:var(--muted); }
html[data-theme="epaper"] :is(.preview-light,.preview-dark) { filter:grayscale(1); }
html[data-theme="epaper"] *,html[data-theme="epaper"] *::before,html[data-theme="epaper"] *::after { animation:none !important; transition:none !important; }
html.focus-mode[data-focus-page="chapter"] .reader-layout { border:0; box-shadow:none; }
@media(max-width:1150px) {
 .site-header { gap:22px; }
 .header-nav { gap:16px; }
 .header-tools { gap:9px; }
 .home-hero { gap:44px; }
 .hero-copy h1 { font-size:54px; }
 .path-card { padding:24px; }
}
@media(max-width:980px) {
 .workspace { width:calc(100% - 56px); }
 .home-hero { gap:30px; }
 .hero-copy h1 { font-size:48px; }
 .reader-layout { padding:38px; }
 .path-card p { min-height:120px; }
 .home-philosophy { gap:40px; padding:32px; }
}
@media(max-width:800px) {
 .home-hero { padding:48px 0 38px; display:block; max-width:620px; }
 .hero-copy h1 { font-size:58px; }
 .hero-description { max-width:540px; }
 .concept-preview { max-width:100%; margin-top:36px; }
 .demo-explanation { min-height:50px; }
 .home-context { max-width:none; }
 .path-card h3 { min-height:56px; }
 .path-card p { min-height:144px; }
 .reader-layout { padding:30px; }
}
@media(max-width:620px) {
 :root { --header:66px; }
 .site-header { padding:0 16px; gap:10px; }
 .brand-fallback { font-size:21px; letter-spacing:-1.1px; }
 .brand-edition { font-size:19px; margin-left:3px; }
 .brand-images { width:112px; }
 .header-tools { gap:5px; }
 .search-trigger { padding:0; background:none; border:0; min-width:32px; width:32px; }
 .appearance-trigger { width:32px; min-width:32px; height:36px; border:0; }
 .appearance-trigger svg { width:18px; }
 .language-button { min-width:28px; }
 .mobile-menu { width:32px; min-width:32px; }
 .workspace { width:calc(100% - 36px); }
 .home-hero { padding:40px 0 32px; }
 .hero-kicker { font-size:9px; margin-bottom:22px; }
 .hero-copy h1 { font-size:clamp(39px,10.7vw,55px); letter-spacing:-1.7px; }
 .hero-description { font-size:16px; line-height:1.8; }
 .hero-actions { gap:17px; }
 .hero-actions .button { font-size:13px; padding:0 17px; }
 .hero-secondary { font-size:12px; }
 .hero-reassurance { font-size:10px; gap:14px; flex-wrap:wrap; }
 .concept-preview { margin-top:33px; }
 .demo-topline { padding:15px 19px; }
 .demo-body { padding:22px 19px; }
 .demo-code { font-size:25px; }
 .demo-concepts { gap:7px; }
 .demo-concepts button { padding:12px 10px; }
 .demo-explanation { min-height:76px; font-size:13px; }
 .home-context { justify-content:space-between; font-size:10px; padding:18px 0; }
 .reading-editions { flex-direction:column; align-items:stretch; gap:13px; margin-top:20px; }
 .reading-editions>div:first-child { font-size:12px; }
 .edition-switch button { flex:1; min-height:40px; }
 .path-preview { padding-top:42px; }
 .section-heading h2 { font-size:30px; }
 .path-cards { grid-template-columns:1fr; gap:0; }
 .path-card { padding:25px; }
 .path-card+.path-card { border-left:0; border-top:1px solid var(--border); }
 .path-card-top { margin-bottom:15px; }
 .path-card h3,.path-card p { min-height:0; }
 .path-card h3 { font-size:21px; }
 .path-card p { margin-bottom:20px; }
 .home-philosophy { margin:40px 0 26px; padding:26px; }
 .home-philosophy h2 { font-size:31px; }
 .philosophy-steps { margin-top:22px; }
 .study-tools>a { padding:24px; }
 .study-tools h2 { font-size:22px; }
 .collection-note { line-height:1.8; }
 .page-footer { margin-top:40px; }
 .reader-shell { padding-top:16px; }
 .reader-topbar { margin-bottom:16px; gap:10px; }
 .reader-layout { padding:25px 20px; border-radius:11px; margin-inline:-5px; }
 .chapter-header h1 { font-size:35px; letter-spacing:-1.1px; }
 .chapter-description { font-size:16px; }
 .chapter-kicker { gap:9px; font-size:10px; }
 .chapter-kicker>span+span { padding-left:9px; }
 .chapter-meta { gap:12px; font-size:11px; }
 .reader-actions { gap:7px; }
 .reader-actions button { font-size:11px; gap:6px; padding:0 9px; }
 .lesson-copy { font-size:calc(17px * var(--reader-scale)); line-height:1.95; }
 .lesson-copy h2 { font-size:1.4em; }
 .chapter-guide>summary { padding:12px; flex-wrap:wrap; gap:8px; }
 .chapter-guide>summary>small { font-size:10px; }
 .guide-body { padding:0 15px 18px; }
 .code-toolbar { font-size:10px; padding:10px; }
 .code-block pre { padding:17px 13px; }
 .chapter-pagination { grid-template-columns:1fr; }
 .chapter-pagination a { min-height:86px; }
 .chapter-end-top .button { white-space:normal; }
 .index-header h1 { font-size:39px; }
 .filter-bar { padding:8px; gap:4px; }
 .filter-button { padding:0 9px; }
 .reference-filter { margin-top:5px; }
 .reference-item { padding:23px; }
 .side-dialog { padding:24px 20px; }
 .theme-options { gap:7px; }
 .theme-options button { padding:5px; }
 .theme-options small { font-size:9px; }
 .theme-preview { height:74px; }
 .search-input-row { padding:15px; }
 .review-stats>div { padding:15px 11px; }
 .review-stats span { font-size:11px; }
 :is(.concept-collection,.review-topic,.model-gallery-item,.check-collection)>summary { padding:18px; }
 .concept-collection-body,.review-topic-body { padding:20px 17px; }
 .concept-guide,.review-topic-body { font-size:calc(14px * var(--reader-scale)); }
}
@media(max-width:365px) {
 .site-header { padding-inline:10px; gap:5px; }
 .header-tools { gap:2px; }
 .brand-fallback { font-size:20px; }
 .brand-edition { font-size:18px; }
 .hero-actions { gap:10px; }
 .hero-actions .button { font-size:12px; padding:0 14px; }
 .hero-reassurance { display:flex; }
 .hero-reassurance>span { margin:0; }
 .reader-layout { padding:23px 16px; }
 .chapter-header h1 { font-size:32px; }
}
@media print {
 html[data-theme] { --canvas:#fff; --surface:#fff; --surface-soft:#f4f4f4; --ink:#111; --body:#222; --muted:#555; --accent:#222; --border:#ccc; --line:#ddd; --reading-font:Georgia,serif; }
 .workspace,.reader-shell,.reader-layout { width:100%; max-width:none; padding:0; margin:0; border:0; box-shadow:none; }
 .reading-editions { display:none; }
 .lesson-copy { font-size:11pt; }
 .chapter-header h1 { font-size:28pt; }
}
