/* Shared reading/workspace system. Sources and figures retain original colors. */
:root{--ui-bg:#fff;--ui-panel:#f7f8fa;--ui-raised:#fff;--ui-hover:#eef0f4;--ui-text:#20242b;--ui-muted:#606a78;--ui-line:#e3e6eb;--ui-accent:#4964bd;--ui-tint:#edf1fc;--ui-danger:#a1393e;--ui-warning:#806327;--ui-warning-bg:#fbf6e9;--ui-shadow:0 14px 48px #202a3b17;--ui-font:Inter,-apple-system,BlinkMacSystemFont,'PingFang SC','Microsoft YaHei',sans-serif}
:root[data-theme=dark]{--ui-bg:#151719;--ui-panel:#111315;--ui-raised:#1b1e22;--ui-hover:#252930;--ui-text:#e5e7eb;--ui-muted:#a4acb8;--ui-line:#30353d;--ui-accent:#a4b6f5;--ui-tint:#252e44;--ui-danger:#f0a0a5;--ui-warning:#d4ba7d;--ui-warning-bg:#2d281e;--ui-shadow:0 14px 48px #0005}
html[data-theme] body{--paper:var(--ui-bg);--soft:var(--ui-panel);--ink:var(--ui-text);--muted:var(--ui-muted);--border:var(--ui-line);--line:var(--ui-line);--blue:var(--ui-accent);--accent:var(--ui-accent);--nav:var(--ui-panel);--nav-deep:var(--ui-panel);--amber:var(--ui-warning);background:var(--ui-bg);color:var(--ui-text);font-family:var(--ui-font);-webkit-font-smoothing:antialiased}
html[data-theme] :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}
html[data-theme] :is(input,select,textarea){color:var(--ui-text);accent-color:var(--ui-accent)}
html[data-theme] :is(.field input,.field select,.field textarea,.topic-note textarea,.source-pages-toolbar select){background:var(--ui-raised);border-color:var(--ui-line)}
html[data-theme] input::placeholder,html[data-theme] textarea::placeholder{color:var(--ui-muted);opacity:.85}
html[data-theme] :is(.topbar,.project-header,.research-header,body>header){background:var(--ui-bg);color:var(--ui-text);border-bottom:1px solid var(--ui-line);box-shadow:none;backdrop-filter:none}
html[data-theme] :is(.topbar,.project-header,.research-header){gap:24px;padding-left:20px;padding-right:20px}
html[data-theme] :is(.brand,.research-brand){color:var(--ui-text)}
html[data-theme] :is(.brand-en,.brand em,.research-brand small){font-family:var(--ui-font);font-style:normal;color:var(--ui-muted);font-size:10px}
html[data-theme] :is(.top-nav button,.top-nav a,.project-header nav a,.research-header nav a){color:var(--ui-muted);font-size:12px}
html[data-theme] :is(.top-nav .active,.project-header nav a.active,.research-header nav a.active){color:var(--ui-text);border-color:var(--ui-accent);font-weight:600}
html[data-theme] :is(.global-search,.global-search kbd){background:var(--ui-panel);border:1px solid var(--ui-line);color:var(--ui-muted);box-shadow:none}
html[data-theme] .global-search{border-radius:6px;max-width:280px}
.project-header .site-controls,.research-header .site-controls{margin-left:0}
.site-controls{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-left:auto}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--ui-muted);cursor:pointer}
.theme-toggle:hover{background:var(--ui-hover);color:var(--ui-text)}
.theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
.theme-toggle .theme-sun{display:none}:root[data-theme=dark] .theme-toggle .theme-sun{display:block}:root[data-theme=dark] .theme-toggle .theme-moon{display:none}
.account-entry{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 12px;border:1px solid var(--ui-line);border-radius:6px;font-size:12px;font-weight:500;color:var(--ui-text);background:var(--ui-raised);white-space:nowrap;text-decoration:none}
.account-entry:hover{background:var(--ui-hover);text-decoration:none}
html[data-theme] :is(.primary,.home-query-row .primary){background:#4964bd;color:#fff;border-color:#4964bd;box-shadow:none}
html[data-theme] :is(.primary,.home-query-row .primary):hover{background:#3f56a3}
html[data-theme] :is(.secondary,.import-trigger,.icon-btn,.avatar,.quiet){color:var(--ui-muted)}
html[data-theme] .secondary{background:var(--ui-raised);border:1px solid var(--ui-line);border-radius:6px}
html[data-theme] :is(.icon-btn:hover,.secondary:hover,.avatar){background:var(--ui-hover)}
/* UpCodes-style document hierarchy, with neutral navigation chrome. */
html[data-theme] :is(.config-pane,.condition-pane,.project-list){background:var(--ui-panel);color:var(--ui-muted);border-color:var(--ui-line)}
html[data-theme] :is(.reader-top,.reading-mode,.segmented,.view-tabs){background:var(--ui-panel);border-color:var(--ui-line);color:var(--ui-muted)}
html[data-theme] :is(.reading-mode button.active,.reading-mode label:has(input:checked),.segmented .selected,.view-tabs button[aria-pressed=true]){background:var(--ui-raised);color:var(--ui-text);box-shadow:0 1px 2px #0000000c}
html[data-theme] .content{max-width:960px;padding:24px 40px 0}
html[data-theme] .content h1{font-size:28px;line-height:1.45;letter-spacing:-.5px;font-weight:650;margin-bottom:12px}
html[data-theme] .document-chapter-title{font-size:22px;line-height:1.5;font-weight:600;gap:10px;margin:24px 0 12px}
html[data-theme] .section-title{font-size:18px;line-height:1.5;margin:20px 0 8px;font-weight:600;color:var(--ui-text)}
html[data-theme] .clause{padding:14px 10px 16px;border-radius:0;border-bottom:1px solid var(--ui-line);background:transparent;margin:0}
html[data-theme] .clause:hover{background:color-mix(in srgb,var(--ui-tint) 35%,transparent)}
html[data-theme] .clause.selected{background:var(--ui-tint);border-left:2px solid var(--ui-accent);padding-left:8px}
html[data-theme] .clause-title{font-size:15px;font-weight:650;line-height:24px;margin-bottom:6px}
html[data-theme] .clause-title a{color:var(--ui-text);font-variant-numeric:tabular-nums}
html[data-theme] .clause-text{line-height:var(--reader-line);max-width:760px;letter-spacing:.08px}
html[data-theme] .clause-tools{background:var(--ui-raised);border-color:var(--ui-line);box-shadow:none;border-radius:5px;padding:1px;gap:1px}
html[data-theme] .clause-tools .icon-btn{width:26px;height:26px;min-width:26px;min-height:26px;border-radius:4px}
html[data-theme] .clause-tools .icon-btn svg{width:14px;height:14px;stroke-width:1.6}
html[data-theme] .clause-tools .icon-btn.bookmarked{color:var(--ui-accent);background:var(--ui-tint)}
html[data-theme] .clause-tools .icon-btn.bookmarked svg{fill:color-mix(in srgb,var(--ui-accent) 16%,transparent)}
html[data-theme] .clause-commentary{border-color:var(--ui-line);margin-top:10px}
html[data-theme] .clause-commentary[open]{border-left:2px solid var(--ui-line);padding-left:12px}
html[data-theme] :is(.clause-commentary summary,.commentary-content,.commentary-text){color:var(--ui-muted)}
html[data-theme] .commentary-content{font-size:14px;line-height:1.85;padding-top:4px}
html[data-theme] :is(.book-detail h3,.section-title span,.document-chapter-title span){color:var(--ui-muted)}
html[data-theme] :is(.code-table th,.code-table thead,.notice,.import-area,.source-context){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.side-panel,.panel-head,.panel-body,.modal,.modal-head,.modal-body,.modal-foot,.search-box,.search-mode-tabs button.selected){background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.search-mode-tabs,.search-options,.search-result,.search-footer,.library-toolbar,.library-filters,.discipline-nav){border-color:var(--ui-line)}
html[data-theme] :is(.search-result:hover,.search-book-result:hover,.book-card:hover,.discipline-nav button:hover){background:var(--ui-hover)}
html[data-theme] :is(.ai-interpretation,.ai-implication,.ai-evidence blockquote,.ai-source-card,.ai-answer,.search-resume-note){background:var(--ui-panel);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.ai-gaps,.ai-condition-warning,.repeal-label,.compare-scope,.topic-conditions,.condition-chip.pending,.tag.pending){color:var(--ui-warning);background:var(--ui-warning-bg);border-color:color-mix(in srgb,var(--ui-warning) 35%,var(--ui-line))}
html[data-theme] :is(.search-result-meta,.search-result small,.ai-answer-note,.ai-source-card small,.ai-interpretation p,.search-mode-help,.source-meta){color:var(--ui-muted)}
html[data-theme] mark{background:var(--ui-warning-bg);color:var(--ui-text)}
/* Projects use the same typography, layers and controls as the reader. */
html[data-theme] .project-shell{grid-template-columns:264px minmax(0,1fr)}
html[data-theme] #outline-main{padding:28px 28px 40px}
html[data-theme] :is(.field,.more-conditions>summary,.plan-status,.topic-path,.topic-panel .editorial,.topic-evidence blockquote,.topic-evidence details summary,.topic-list .list-profession,.standard-uses,.coverage){color:var(--ui-muted)}
html[data-theme] :is(.topic-panel,.outline-view,.export-menu>div,.function-node,.map-topic,.save-panel,.project-row,.project-card,.research-tabs,.context-pane){background:var(--ui-bg);border-color:var(--ui-line)}
html[data-theme] :is(.condition-chip,.tag,.profession-node){background:var(--ui-panel);border-color:var(--ui-line);color:var(--ui-muted)}
html[data-theme] :is(.discipline-filters button[aria-pressed=true],.map-topic[aria-pressed=true],.project-row.active){background:var(--ui-tint);color:var(--ui-accent);border-color:var(--ui-accent)}
html[data-theme] :is(.text-group,.topic-list li,.standard-card,.summary-strip,.topic-evidence){border-color:var(--ui-line)}
html[data-theme] .map-viewport{background-color:var(--ui-panel);background-image:radial-gradient(var(--ui-line) .7px,transparent .7px)}
html[data-theme] .map-edges path{stroke:var(--ui-line)}
html[data-theme] .map-root{background:#3d527b;color:#fff}
html[data-theme] .topic-list strong{font-size:14px;line-height:1.65}
html[data-theme] .topic-list small,html[data-theme] .topic-list .list-profession{font-size:11px;color:var(--ui-muted)}
html[data-theme] .topic-panel .editorial,html[data-theme] .topic-evidence blockquote,html[data-theme] .topic-evidence details pre{font-size:14px;line-height:1.85}
html[data-theme] :is(.topic-evidence h4,.topic-panel h3){font-size:13px}
html[data-theme] :is(.source-meta,.source-actions,.condition-chip,.tag,.field,.config-note,.coverage){font-size:12px}
html[data-theme] .topic-panel h2{font-size:19px}
html[data-theme] .eyebrow{font-size:10px;letter-spacing:1.2px;color:var(--ui-muted)}
/* Home follows the selected theme; discipline cover art is intentionally stable. */
html[data-theme] body.at-home,html[data-theme] #home{--ink:var(--ui-text);--muted:var(--ui-muted);--border:var(--ui-line);--line:var(--ui-line);--soft:var(--ui-panel);--home-accent:var(--ui-accent);background:var(--ui-bg);color:var(--ui-text)}
html[data-theme] :is(.home-hero h1,.home-library h2,.home-section-head h2,.home-code-row strong){color:var(--ui-text)}
html[data-theme] :is(.home-hero .home-english p,.home-english>span,.home-query-help,.home-topics,.home-topics button,.home-library-status,.home-list-head,.home-card-meta,.home-code-row,.home-row-code,.home-row-edition,.home-row-discipline){color:var(--ui-muted)}
html[data-theme] :is(.home-search,.home-search-options,.home-library-views,.home-more-disciplines select){background:var(--ui-panel);border-color:var(--ui-line);box-shadow:none;color:var(--ui-text)}
html[data-theme] .home-query-row input{color:var(--ui-text)}
html[data-theme] :is(.home-discipline-tabs button,.home-mandatory,.home-library-views button,.home-search-options label){color:var(--ui-muted);border-color:var(--ui-line);background:transparent}
html[data-theme] :is(.home-discipline-tabs button[aria-pressed=true],.home-library-views button[aria-pressed=true],.home-search-options label:has(input:checked)){background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.home-library-toolbar,.home-code-row,.home-list-head,.home-library-pagination){border-color:var(--ui-line)}
html[data-theme] .home-code-row:hover{background:var(--ui-panel)}
html[data-theme] #home .home-search-options label span{color:var(--ui-muted);background:transparent;border-color:transparent;box-shadow:none}
html[data-theme] #home .home-search-options label:has(input:checked) span{color:var(--ui-text);background:var(--ui-raised);border-color:var(--ui-line)}
html[data-theme] #home :is(.home-eyebrow,.home-heading-actions,.home-replay,.home-english>span,.home-library h2>span,.home-list-head,.home-row-discipline,.home-card-meta,.home-library-status){color:var(--ui-muted)}
html[data-theme] #home :is(.home-section-head a,.home-section-head button,.home-library-heading a,.home-library-pagination button){color:var(--ui-accent)}
html[data-theme] body .topbar .secondary{background:var(--ui-raised);border-color:var(--ui-line);color:var(--ui-muted)}
html[data-theme] body{--doc-paper:var(--ui-bg);--doc-ink:var(--ui-text);--doc-soft:var(--ui-panel);--doc-line:var(--ui-line)}
html[data-theme] :is(.local-surface,.local-card,.catalog-card,.catalog-toolbar,.local-layout,.record,.local-record){background:var(--ui-bg);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.controls input,.controls select,.local-filters input,.local-filters select,.pagination button,header nav button){background:var(--ui-raised);color:var(--ui-text);border-color:var(--ui-line)}
html[data-theme] :is(.local-province-nav,.segments,.local-status){background:var(--ui-panel);color:var(--ui-muted);border-color:var(--ui-line)}
html[data-theme] :is(.segments [aria-pressed=true],.local-province-nav button[aria-pressed=true],aside button[aria-pressed=true]){background:var(--ui-tint);color:var(--ui-accent)}
@media(min-width:1100px){html[data-theme] .sidebar{--toc-width:286px}html[data-theme] .top-end{gap:8px}.top-end .private-label{display:none}}
@media(max-width:1100px){html[data-theme] :is(.topbar,.project-header,.research-header){gap:14px}.top-end .import-trigger,.top-end .private-label{display:none}}
@media(max-width:760px){html[data-theme] :is(.topbar,.project-header,.research-header){padding-left:12px;padding-right:12px;gap:10px}html[data-theme] .top-end{display:flex;gap:5px;margin-left:auto}html[data-theme] .top-end .avatar{display:none}html[data-theme] .global-search{min-width:0;flex:1;max-width:none}html[data-theme] .site-controls{gap:4px}html[data-theme] .content{padding:18px 18px 0}html[data-theme] .content h1{font-size:24px}html[data-theme] .clause{padding:12px 6px 14px}html[data-theme] .clause.selected{padding-left:4px}html[data-theme] .clause-tools{background:transparent;border:0}html[data-theme] .clause-text{font-size:max(15px,var(--reader-size));line-height:max(1.85,var(--reader-line))}html[data-theme] .project-shell{display:block}html[data-theme] #outline-main{padding:24px 16px}.project-header .site-controls,.research-header .site-controls{margin-left:0}html[data-theme] .config-pane{padding:16px}html[data-theme] .research-header{flex-wrap:wrap;height:auto;min-height:60px;padding-top:10px;padding-bottom:10px}html[data-theme] .research-header nav{order:3;width:100%;overflow:auto;min-height:32px;flex:none}.research-header #session{margin-left:auto}html[data-theme] .field input,html[data-theme] .field select,html[data-theme] .field textarea{font-size:16px}}
@media(max-width:450px){html[data-theme] .topbar{gap:8px}html[data-theme] .topbar .brand>span{font-size:21px}html[data-theme] .topbar .brand>svg{width:24px;height:24px}html[data-theme] .topbar .global-search{max-width:36px;min-width:36px;padding:0;justify-content:center;margin-left:auto}html[data-theme] .topbar .global-search #search-placeholder,html[data-theme] .topbar .global-search kbd{display:none}html[data-theme] .topbar .top-end{margin-left:0}}
@media print{html[data-theme] body{--ui-bg:white;--ui-panel:white;--ui-raised:white;--ui-text:#111;--ui-muted:#444;--ui-line:#ddd;--ui-accent:#222;background:white;color:#111}.site-controls{display:none!important}html[data-theme] .content{max-width:none;padding:0}}

/* Workbench 2026-10-29: shared navigation, full-page library and reading rhythm. */
:root{--ui-accent:#3f5fc7;--ui-tint:#eef2fc;--ui-panel:#f7f8fa;--ui-line:#e2e5eb;--ui-text:#202734;--ui-muted:#606a78;--ui-navigation:#30445e;--ui-rail:#22344c;--ui-nav-text:#f5f7fb;--ui-nav-muted:#c8d3e2;--ui-nav-line:#ffffff24;--ui-nav-hover:#405673;--ui-nav-active:#eaf0fa;--ui-nav-active-ink:#172a43}
:root[data-theme=dark]{--ui-accent:#a8bcff;--ui-tint:#27344e;--ui-navigation:#1c2b40;--ui-rail:#142135;--ui-nav-text:#f5f7fb;--ui-nav-muted:#c4d0e1;--ui-nav-line:#ffffff24;--ui-nav-hover:#314660;--ui-nav-active:#dbe7f9;--ui-nav-active-ink:#16263b}
html[data-theme] body>.site-header{height:60px;min-height:60px;max-width:none;margin:0;padding:0 24px;gap:24px;display:flex;align-items:center;flex-wrap:nowrap;position:sticky;top:0;z-index:70;box-sizing:border-box}
/* The reader owns its scroll canvas and already reserves the fixed header height. */
html[data-theme] body>.site-header.topbar{position:fixed}
.site-header>.brand,.site-header>.research-brand{display:flex;align-items:center;gap:8px;flex-shrink:0;text-decoration:none}
.site-header .brand>span,.site-header .brand>strong,.site-header .research-brand strong{font-size:23px;line-height:1;font-weight:650;letter-spacing:-.7px}
.site-header .brand-en,.site-header .brand>em,.site-header .brand>span>span,.site-header .research-brand small{font-size:9px;letter-spacing:.3px;margin-left:4px;font-weight:400}
.site-header .brand>svg,.site-header .research-brand>svg{width:28px;height:28px;color:var(--ui-accent);fill:none;stroke:currentColor;stroke-width:1.6}
html[data-theme] .site-header .global-search{width:clamp(190px,23vw,380px);max-width:380px;min-width:0;flex:0 1 380px;height:36px;border-radius:7px;font-size:12px}
.site-navigation{display:flex;align-items:center;gap:7px;height:100%;flex-shrink:0;font-size:13px;margin:0}
.site-navigation>a,.site-nav-group>summary{padding:10px 12px;display:flex;align-items:center;gap:9px;color:var(--ui-muted);border:0;border-radius:6px;cursor:pointer;white-space:nowrap;font:inherit;font-weight:500;text-decoration:none;list-style:none}
.site-nav-group>summary::-webkit-details-marker{display:none}
.site-navigation>a:hover,.site-nav-group>summary:hover,.site-nav-group[open]>summary{background:var(--ui-hover);color:var(--ui-text)}
.site-navigation>a[aria-current=page],.site-nav-group>summary.active{color:var(--ui-accent);background:var(--ui-tint)}
.site-nav-group{position:relative}.site-nav-group>summary>span{font-size:15px;line-height:1}.site-nav-group[open]>summary>span{transform:rotate(180deg)}
.site-nav-menu{position:absolute;top:calc(100% + 11px);left:0;width:290px;padding:12px;background:var(--ui-raised);border:1px solid var(--ui-line);border-radius:8px;box-shadow:var(--ui-shadow);z-index:90;color:var(--ui-text)}
.site-nav-label{display:block;font-size:10px;letter-spacing:.06em;color:var(--ui-muted);padding:6px 12px 8px}
.site-nav-menu a{display:block;padding:12px;border-radius:5px;text-decoration:none;color:var(--ui-text);line-height:1.6;border:0}
.site-nav-menu a:hover,.site-nav-menu a[aria-current=page]{background:var(--ui-panel)}
.site-nav-menu strong{display:block;font-size:13px;font-weight:600;color:var(--ui-text)}
.site-nav-menu small{display:block;font-size:11px;color:var(--ui-muted);font-weight:400;margin-top:3px}
.site-menu-toggle{display:none;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-text);background:var(--ui-raised);padding:8px}
.site-menu-toggle svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7}
.site-header #session{margin-left:auto;font-size:12px;white-space:nowrap}.site-header .site-controls{margin-left:0}.site-header>.site-controls{margin-left:auto}.site-header #session~.site-controls{margin-left:0}
html[data-theme] .site-header .top-end{margin-left:auto;gap:8px}.site-header .top-end .private-label,.site-header .top-end .import-trigger,.site-header .top-end .avatar{display:none}
/* Navigation owns its text palette; reading-body colors must never leak into it. */
html[data-theme] .rail,html[data-theme] #toc-sidebar{--ink:var(--ui-nav-text);--muted:var(--ui-nav-muted);--blue:var(--ui-nav-text);--border:var(--ui-nav-line);color:var(--ui-nav-text);border-color:var(--ui-nav-line)}
html[data-theme] .rail{background:var(--ui-rail);padding-top:6px}
html[data-theme] #toc-sidebar,html[data-theme] #library-page .discipline-nav{background:var(--ui-navigation);color:var(--ui-nav-text);border-color:var(--ui-nav-line)}
html[data-theme] .rail button{color:var(--ui-nav-muted);background:transparent;border:0;border-left:2px solid transparent;border-radius:0;margin:0;gap:3px;height:46px;font-size:11px}
html[data-theme] .rail button svg{width:19px;height:19px}
html[data-theme] .rail button:hover{background:var(--ui-nav-hover);color:var(--ui-nav-text)}
html[data-theme] .rail button.active{background:var(--ui-nav-active);color:var(--ui-nav-active-ink);border-left-color:#95b1e0}
html[data-theme] #toc-sidebar .book-head{padding:12px 12px 10px}
html[data-theme] #toc-sidebar .book-title-row{align-items:flex-start;gap:7px;padding-right:12px}
html[data-theme] #toc-sidebar .book-title-row .icon-btn{width:22px;min-width:22px;height:24px;color:var(--ui-nav-muted)}
html[data-theme] #toc-sidebar #book-title{color:var(--ui-nav-text);font-size:14px;font-weight:600;line-height:1.5;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
html[data-theme] #toc-sidebar .edition{padding:4px 0 0 29px;margin:0;font-size:12px;line-height:1.6;gap:4px;white-space:normal;flex-wrap:wrap;overflow:visible;color:var(--ui-nav-muted)}
html[data-theme] #toc-sidebar .edition span{color:var(--ui-nav-muted);overflow:visible;text-overflow:clip}
html[data-theme] #toc-sidebar .edition #book-code:not([hidden])+#book-edition::before{color:var(--ui-nav-muted)}
html[data-theme] #toc-sidebar .book-actions{gap:7px;margin-top:8px;flex-wrap:wrap;overflow:visible}
html[data-theme] #toc-sidebar .book-actions .book-action{height:28px;padding:3px 7px;color:var(--ui-nav-text);background:transparent;border:1px solid var(--ui-nav-line);border-radius:4px;font-size:12px}
html[data-theme] #toc-sidebar .book-actions .book-action:hover,html[data-theme] #toc-sidebar .icon-btn:hover{background:var(--ui-nav-hover);color:var(--ui-nav-text);text-decoration:none}
html[data-theme] #toc-sidebar .toc-filter{height:34px;min-height:34px;margin:0;padding:0 12px;gap:7px;border-color:var(--ui-nav-line);color:var(--ui-nav-muted)}
html[data-theme] #toc-sidebar .toc-filter input{color:var(--ui-nav-text);font-size:12px;background:transparent;min-width:0}
html[data-theme] #toc-sidebar .toc-filter input::placeholder{color:var(--ui-nav-muted);opacity:1}
html[data-theme] #toc-sidebar .toc-filter kbd,html[data-theme] #toc-sidebar .toc-toggle-all{color:var(--ui-nav-muted)}
html[data-theme] #toc-sidebar .toc-toggle-all:hover{background:var(--ui-nav-hover);color:var(--ui-nav-text)}
html[data-theme] #toc-sidebar .toc-filter:focus-within{border-color:var(--ui-nav-line);outline:none;box-shadow:none}
html[data-theme] #toc-sidebar #toc-filter:focus-visible{background-image:linear-gradient(var(--ui-nav-muted),var(--ui-nav-muted))}
html[data-theme] #toc-sidebar .toc{padding:5px 0;scrollbar-color:#9caec278 transparent}
html[data-theme] #toc-sidebar .toc-row{margin:0;min-height:32px;border:0;border-left:2px solid transparent;border-left-color:transparent;border-radius:0;background:transparent;color:var(--ui-nav-text)}
html[data-theme] #toc-sidebar .toc-row .toc-link{min-width:0;padding:6px 12px 6px 2px;color:var(--ui-nav-text);font-size:13px;line-height:20px;font-weight:500;white-space:normal;overflow-wrap:anywhere}
html[data-theme] #toc-sidebar .toc-row .expand,html[data-theme] #toc-sidebar .toc-leaf-spacer{width:24px;min-width:24px;color:var(--ui-nav-muted)}
html[data-theme] #toc-sidebar .toc-row.sub{min-height:30px;margin-left:14px}
html[data-theme] #toc-sidebar .toc-row.sub .toc-link{padding-top:5px;padding-bottom:5px;color:var(--ui-nav-muted);font-size:13px;line-height:20px;font-weight:400}
html[data-theme] #toc-sidebar .toc-row:hover{background:var(--ui-nav-hover)}
html[data-theme] #toc-sidebar .toc-row:hover .toc-link{color:var(--ui-nav-text)}
html[data-theme] #toc-sidebar .toc-row.active{background:var(--ui-nav-active);color:var(--ui-nav-active-ink);border-left-color:#95b1e0}
html[data-theme] #toc-sidebar .toc-row.active .toc-link,html[data-theme] #toc-sidebar .toc-row.active .expand{color:var(--ui-nav-active-ink);font-weight:600}
html[data-theme] #toc-sidebar .toc-divider{margin:6px 12px;border-color:var(--ui-nav-line)}
html[data-theme] #toc-sidebar .book-foot{height:32px;min-height:32px;padding:0 12px;font-size:12px;border-color:var(--ui-nav-line);color:var(--ui-nav-muted)}
html[data-theme] #toc-sidebar :is(button,a,input):focus-visible,html[data-theme] .rail button:focus-visible{outline-color:var(--ui-nav-text);outline-offset:-3px}
html[data-theme] #toc-sidebar .toc-row.active :is(button,a):focus-visible,html[data-theme] .rail button.active:focus-visible{outline-color:var(--ui-nav-active-ink)}
@media(max-width:760px){html[data-theme] .rail{padding-top:0}html[data-theme] .rail button{height:55px;border-left:0;border-top:2px solid transparent}html[data-theme] .rail button.active{border-left:0;border-top-color:#95b1e0}html[data-theme] #toc-sidebar .toc-row,html[data-theme] #toc-sidebar .toc-row.sub{min-height:40px}html[data-theme] #toc-sidebar .toc-row .toc-link,html[data-theme] #toc-sidebar .toc-row.sub .toc-link{padding-top:10px;padding-bottom:10px}html[data-theme] #toc-sidebar .toc-filter{height:40px;min-height:40px}html[data-theme] #toc-sidebar .book-actions .book-action{height:36px}}
html[data-theme] .reader-top{background:var(--ui-bg);height:48px;padding:0 32px;gap:16px;border-bottom:1px solid var(--ui-line)}
html[data-theme] .breadcrumbs{font-size:12px;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html[data-theme] .content{max-width:960px;padding:28px 40px 0}
html[data-theme] .content h1{font-size:28px;font-weight:600;line-height:1.4;letter-spacing:-.5px;margin:8px 0 12px}
html[data-theme] .chapter-kicker{font-size:11px;line-height:1.6;color:var(--ui-muted)}
html[data-theme] .chapter-description{font-size:12px;line-height:1.7;margin-bottom:16px;padding-bottom:14px;border-bottom:1px solid var(--ui-line)}
html[data-theme] :is(.book-status-notice,.source-context){padding:10px 14px;margin:12px 0 20px;font-size:12px;line-height:1.65;border-radius:5px;box-shadow:none}
html[data-theme] .clause{padding:14px 8px 16px;border-bottom:1px solid var(--ui-line)}
html[data-theme] .clause-title{font-size:15px;line-height:1.7;margin-bottom:5px}
html[data-theme] .clause-commentary{margin-top:8px}html[data-theme] .clause-commentary summary{font-size:12px;line-height:1.8;padding:2px 0}
html[data-theme] .commentary-content{font-size:14px;line-height:1.85;padding-top:6px}
/* The library is a route with its own scrolling canvas, not an interrupting dialog. */
#library-page[hidden]{display:none}
#library-page{flex:1;min-width:0;height:100%;overflow:hidden;background:var(--ui-panel)}
.at-library .workspace>:is(.sidebar,.column-resizer,.collapse-button,#reading,.side-panel){display:none}
#library-page .library-layout{height:100%;max-height:none;grid-template-columns:228px minmax(0,1fr)}
#library-page .discipline-nav{padding:22px 12px;border-right:0}
#library-page .discipline-nav-label{color:var(--ui-nav-muted);font-size:10px;padding:0 12px 16px}
#library-page .discipline-nav button{font-size:13px;line-height:20px;padding:9px 12px;color:var(--ui-nav-text);gap:12px}
#library-page .discipline-nav .discipline-count{color:var(--ui-nav-muted);font-size:11px}
#library-page .discipline-nav button:hover,#library-page .discipline-nav button.selected{background:#ffffff18;color:white;border:0}
#library-page .discipline-nav button:focus-visible{outline-color:#d8e5ff;outline-offset:-2px}
#library-page .library-main{padding:32px 40px 48px;scrollbar-gutter:stable}
.library-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.library-page-heading h1{font-size:30px;font-weight:600;letter-spacing:-.6px;line-height:1.35;margin:5px 0 10px;color:var(--ui-text)}
.library-page-heading p{margin:0;color:var(--ui-muted);font-size:12px;line-height:1.7}
.library-page-heading .page-eyebrow{font-size:10px;letter-spacing:1.3px;color:var(--ui-accent)}
#library-page .library-toolbar{padding:0;border:0;gap:10px;margin-bottom:12px}
#library-page .library-search{background:var(--ui-raised);border:1px solid var(--ui-line);padding:11px 14px;border-radius:6px;gap:12px}
#library-page .library-search:focus-within{outline:none;box-shadow:none;border-color:var(--ui-line)}
#library-page .library-search input{font-size:14px;line-height:20px}
#library-page .library-filters{padding:0 0 16px;gap:18px;margin-bottom:16px}
#library-page .library-filters select{font-size:12px;background:var(--ui-raised);padding:7px 24px 7px 9px;border-radius:5px}
#library-page .library-results-meta{font-size:12px;margin-bottom:24px}
#library-page .library-group{margin-bottom:28px}
#library-page .library-group>h3{font-size:14px;margin:0 0 12px;gap:10px}
#library-page .library-group>h3>span{font-size:11px}
#library-page .library-list{border:0;border-radius:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:12px;overflow:visible}
#library-page .library-record{display:block;border:1px solid var(--ui-line);background:var(--ui-raised);border-radius:7px;overflow:hidden;transition:border-color .15s}
#library-page .library-record:hover{border-color:color-mix(in srgb,var(--ui-accent) 55%,var(--ui-line))}
#library-page .book-card{width:100%;height:100%;text-align:left;padding:18px;gap:16px;align-items:center}
#library-page .library-book-title{font-size:14px;line-height:1.55;margin-bottom:6px;font-weight:600}
#library-page .library-book-code{font-size:12px;color:var(--ui-accent);line-height:1.6}
#library-page .library-book-meta{font-size:11px;line-height:1.6;margin-top:7px}
#library-page .book-card>svg{display:none}
#library-page .book-discipline{padding:0 16px 14px}
#library-page .library-pagination{border-top:1px solid var(--ui-line);padding-top:20px;font-size:12px}
.catalog-page-actions{display:flex;justify-content:flex-end;gap:12px;margin-bottom:12px;font-size:12px;color:var(--ui-accent)}
html[data-theme] .home-shell{max-width:1320px}html[data-theme] .home-hero-centered{padding:32px 0 26px}
html[data-theme] .home-hero h1{font-size:clamp(32px,3vw,44px);font-weight:550;line-height:1.32;letter-spacing:-1.5px}
html[data-theme] .home-search{border-radius:8px;background:var(--ui-raised)}
html[data-theme] #home .home-english p{font-size:clamp(20px,2vw,28px);line-height:1.4;color:var(--ui-muted)}
html[data-theme] :is(.project-header nav,.research-header nav){display:flex;flex:none;overflow:visible;height:100%;order:initial;width:auto;min-height:0}
html[data-theme] :is(.project-header,.research-header) .site-nav-menu a{border:0;padding:12px;color:var(--ui-text);font-size:13px}
html[data-theme] :is(.project-header,.research-header) .site-navigation>a{border:0;padding:10px 12px;font-size:13px}
@media(max-width:1100px){html[data-theme] body>.site-header{gap:16px;padding:0 16px}.site-header .brand-en,.site-header .brand>em,.site-header .research-brand small{display:none}#library-page .library-main{padding:28px 24px}#library-page .library-layout{grid-template-columns:194px minmax(0,1fr)}}
@media(max-width:760px){
 html[data-theme] body>.site-header{padding:0 12px;gap:10px;height:60px;flex-wrap:nowrap}
 html[data-theme] body>.site-header .site-navigation{display:none;position:absolute;left:8px;right:8px;top:60px;width:auto;height:auto;min-height:0;padding:12px;background:var(--ui-raised);border:1px solid var(--ui-line);border-radius:8px;box-shadow:var(--ui-shadow);flex-direction:column;align-items:stretch;gap:4px;z-index:90}
 html[data-theme] body>.site-header.navigation-open .site-navigation{display:flex}
 .site-menu-toggle{display:flex;flex-shrink:0;order:9}.site-nav-menu{position:static;width:auto;box-shadow:none;border:0;padding:6px 0 6px 10px;background:var(--ui-panel);margin-top:4px}
 .site-navigation>a,.site-nav-group>summary{min-height:44px;padding:8px 12px;box-sizing:border-box;font-size:14px;justify-content:space-between}
 .site-nav-menu a{padding:10px 12px;min-height:44px}.site-nav-menu strong{font-size:13px}.site-nav-menu small{font-size:12px}
 html[data-theme] .site-header #session{font-size:11px;max-width:110px;overflow:hidden;text-overflow:ellipsis}.site-header .site-controls{gap:3px}.site-header .account-entry{padding:0 10px}.site-header .theme-toggle{width:32px}
 html[data-theme] .site-header .global-search{flex:1;width:auto;max-width:none}.site-header .global-search kbd{display:none}
 .home-mobile-nav{display:none}
 #library-page .library-layout{display:flex;flex-direction:column;height:100%;max-height:none}
 #library-page .discipline-nav{display:flex;overflow-x:auto;overflow-y:hidden;flex-shrink:0;padding:10px;gap:4px}
 #library-page .discipline-nav-label{display:none}#library-page .discipline-nav button{width:auto;flex-shrink:0;margin:0;padding:8px 10px;font-size:12px}
 #library-page .library-main{padding:20px 16px 32px;flex:1;min-height:0}.library-page-heading{margin-bottom:18px;gap:12px}.library-page-heading h1{font-size:25px}.library-page-heading>.secondary{font-size:11px;padding:8px;white-space:nowrap}
 #library-page .library-toolbar{flex-wrap:wrap}#library-page .library-search{flex-basis:100%;padding:10px 12px}#library-page .library-search input{font-size:16px}
 #library-page .library-filters{gap:10px;align-items:flex-start;flex-wrap:wrap}#library-page .library-filters label{flex:1;min-width:0}#library-page .library-filters select{max-width:150px;min-width:0}
 #library-page .book-card{padding:14px;gap:12px}#library-page .library-book-title{font-size:14px}#library-page .library-book-meta{font-size:11px}
 html[data-theme] .reader-top{padding:0 14px;gap:8px}.reader-top .breadcrumbs{font-size:11px}.reader-top .reading-mode{margin-left:auto}
 html[data-theme] .sidebar .toc-row .toc-link{font-size:13px}html[data-theme] .content h1{font-size:24px}
 html[data-theme] .home-hero-centered{padding:25px 0 20px}
}
@media(max-width:450px){html[data-theme] .site-header .global-search{max-width:34px;min-width:34px;margin-left:auto}html[data-theme] .site-header .global-search #search-placeholder{display:none}.site-header .brand-en{display:none}html[data-theme] .site-header .top-end{margin-left:0}.site-header #session{max-width:90px}}
@media(prefers-reduced-motion:reduce){#library-page .library-record{transition:none}}
@media print{.site-header,#library-page{display:none!important}}

/* Full destinations: navigation replaces the page; contextual editing stays beside a clause. */
.section-navigation,.records-tabs{display:flex;align-items:center;gap:24px;border-bottom:1px solid var(--ui-line);margin:0 0 28px;overflow-x:auto;white-space:nowrap}
.section-navigation a,.records-tabs :is(a,button){padding:0 0 12px;border:0;border-bottom:2px solid transparent;color:var(--ui-muted);font-size:13px;text-decoration:none;border-radius:0}
.section-navigation [aria-current=page],.records-tabs [aria-current=page]{color:var(--ui-text);border-bottom-color:var(--ui-text);font-weight:600}
.section-navigation a:hover,.records-tabs :is(a,button):hover{color:var(--ui-text)}
#workspace-page[hidden]{display:none}
#workspace-page{flex:1;min-width:0;height:100%;overflow:auto;background:var(--ui-bg);scrollbar-gutter:stable}
.at-workspace-page .workspace>:is(.sidebar,.column-resizer,.collapse-button,#reading,.side-panel){display:none}
.workspace-page-inner{max-width:1160px;margin:0 auto;padding:32px 40px 60px}
.workspace-page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 26px}
.workspace-page-heading h1{font-size:28px;font-weight:600;line-height:1.4;letter-spacing:-.5px;margin:5px 0 0;color:var(--ui-text)}
.workspace-page-heading .page-eyebrow{font-size:10px;letter-spacing:1.2px;color:var(--ui-muted)}
.records-location{font-size:12px;color:var(--ui-muted);margin:-12px 0 24px}
#workspace-page .toolbar-line{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--ui-muted);margin-bottom:12px}
.records-list .list-card,.record-unavailable{display:flex;width:100%;flex-direction:column;align-items:flex-start;text-align:left;padding:22px 0;margin:0;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;gap:7px;background:transparent}
.records-list .list-card:hover{background:var(--ui-panel)}
.records-list .list-card b,.record-unavailable b{font-size:15px;line-height:1.65;color:var(--ui-text)}
.records-list .list-card p,.record-unavailable p{font-size:14px;line-height:1.85;max-width:850px;color:var(--ui-muted)}
.records-list .list-card small,.record-unavailable small{font-size:12px;color:var(--ui-muted)}
#workspace-page .empty{padding:64px 20px}#workspace-page .empty p{margin:8px 0 20px}
#workspace-page .search-box{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-bg)}
#workspace-page #search-input{flex:1;min-width:0;border:0;padding:8px 0;font-size:15px;background:transparent;color:var(--ui-text)}
#workspace-page .search-mode-tabs{display:flex;gap:2px;flex:none;margin:0;padding:3px;border:0;border-radius:5px;background:var(--ui-panel)}
#workspace-page .search-mode-tabs button{min-height:32px;padding:6px 10px;font-size:12px;white-space:nowrap;border:0;border-radius:3px;color:var(--ui-muted)}
#workspace-page .search-mode-tabs button.selected{color:var(--ui-text);background:var(--ui-raised)}
#workspace-page .search-submit{white-space:nowrap;font-size:13px;padding:10px 14px}
#workspace-page .search-options{gap:16px;flex-wrap:wrap;padding:16px 0;border-bottom:1px solid var(--ui-line)}
#workspace-page .search-options select{background:transparent;color:var(--ui-muted);font-size:12px;border:0;max-width:240px}
#workspace-page #search-count{flex:1;min-width:140px;font-size:12px}
#workspace-page .search-coverage{border-top:1px solid var(--ui-line);padding-top:16px;margin-top:28px;color:var(--ui-muted);font-size:12px;line-height:1.7}
/* Quiet search inputs: no outer glow, no nested focus rectangle. */
html[data-theme] #home .home-search.home-search-compact:focus-within,html[data-theme] body :is(.home-search,.search-box,.library-search,.toc-filter):focus-within{outline:none;box-shadow:none;border-color:var(--ui-line)}
html[data-theme] body :is(input[type=search],#home-query,#search-input,#toc-filter,#library-search):is(:focus,:focus-visible){outline:none;box-shadow:none;border-color:var(--ui-line);text-decoration:none}
html[data-theme] body :is(input[type=search],#home-query,#search-input,#toc-filter,#library-search):focus-visible{background-image:linear-gradient(var(--ui-muted),var(--ui-muted));background-size:100% 1px;background-position:left bottom;background-repeat:no-repeat}
html[data-theme] body .global-search:focus-visible{outline:none;box-shadow:none;text-decoration:underline;text-underline-offset:4px}
@media(max-width:900px){#workspace-page .search-box{flex-wrap:wrap}#workspace-page .search-mode-tabs{order:4;width:100%}#workspace-page .search-mode-tabs button{flex:1}}
@media(max-width:760px){.workspace-page-inner{padding:24px 16px 40px}.workspace-page-heading h1{font-size:25px}.workspace-page-heading .secondary{white-space:nowrap;font-size:11px;padding:8px}.section-navigation,.records-tabs{gap:20px;margin-bottom:22px}.section-navigation a,.records-tabs :is(a,button){font-size:12px}.records-list .list-card{padding:18px 0}#workspace-page #search-input{font-size:16px}#workspace-page .search-options{gap:12px}#workspace-page .search-options select{max-width:100%}#workspace-page .search-box>svg{width:17px}#workspace-page .search-submit{padding:10px;font-size:12px}}
@media print{#workspace-page{height:auto;overflow:visible}.workspace-page-heading>button,.records-tabs,.section-navigation{display:none!important}}

/* Shared standard cards: subject symbols, one color family per discipline. */
.library-view-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 24px}
#library-page .library-view-row .library-results-meta,.library-view-row #local-count{margin:0;flex:1;min-width:160px}
.code-view-switch{display:flex;align-items:center;gap:2px;flex:none;padding:3px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-panel)}
.code-view-switch button{min-height:32px;padding:6px 12px;border:0;border-radius:3px;background:transparent;color:var(--ui-muted);font:inherit;font-size:12px;cursor:pointer}
.code-view-switch button[aria-pressed=true]{color:var(--ui-text);background:var(--ui-raised);box-shadow:0 1px 3px #0000000a}
.standard-list-content{display:flex;align-items:flex-start;gap:13px;width:100%;min-width:0;text-align:left;white-space:normal}
.standard-symbol{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;margin-top:2px;border-radius:50%;background:var(--standard-color);color:#fff}
.standard-symbol svg,.local-record .standard-symbol svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.standard-list-text{display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.standard-list-title,#home .home-code-row .standard-list-title{display:block;margin:0;font-size:15px;line-height:1.55;font-weight:600;color:var(--ui-text);letter-spacing:0;overflow-wrap:anywhere}
.standard-list-meta{display:flex;align-items:baseline;gap:6px 9px;flex-wrap:wrap;line-height:1.5;font-size:12px}
.standard-code{display:inline;color:color-mix(in srgb,var(--standard-color) 88%,#000);background:color-mix(in srgb,var(--standard-color) 12%,var(--ui-raised));padding:1px 6px;border-radius:4px;font-size:12px;font-weight:600;overflow-wrap:anywhere}
.standard-discipline,.standard-list-detail,.standard-list-status{color:var(--ui-muted);font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.standard-list-detail,.standard-list-status{display:block}
html[data-theme=dark] .standard-code{color:color-mix(in srgb,var(--standard-color) 55%,#fff);background:color-mix(in srgb,var(--standard-color) 22%,var(--ui-raised))}
#home .home-code-list,#library-page .library-view-list,#local-results[data-view=list] .local-book-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:14px;border:0;border-radius:0;overflow:visible}
#home .home-code-list{grid-template-columns:repeat(3,minmax(0,1fr))}
#home .home-code-row{display:block;min-height:0;padding:20px;border:1px solid var(--ui-line);border-radius:7px;background:var(--ui-raised);text-decoration:none;box-shadow:0 1px 3px #00000004;transition:border-color .15s}
#home .home-code-row:hover{background:var(--ui-raised);border-color:var(--ui-muted)}
#library-page .library-record{display:flex;flex-direction:column;min-width:0;box-shadow:0 1px 3px #00000004}
#library-page .book-card{display:block;height:auto;flex:1;padding:20px;color:var(--ui-text);background:transparent;border:0;border-radius:0}
#library-page .book-card:hover{background:transparent}
#library-page .book-card:focus-visible,.local-record .book-card:focus-visible{outline-offset:-3px}
#library-page .library-record:has(.book-card:focus-visible),#local-results .local-record:has(.book-card:focus-visible){border-color:var(--ui-accent)}
#library-page .library-view-gallery,#local-results[data-view=gallery] .local-book-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:20px;border:0;border-radius:0;overflow:visible}
#library-page .library-view-gallery .book-card,#local-results[data-view=gallery] .book-card{padding:12px;display:block}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .library-cover{display:block;flex:none;width:100%;height:auto;overflow:visible;box-shadow:none}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .library-cover .code-cover{box-sizing:border-box;transform:none;width:100%;height:290px;padding:16px 18px 12px}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-title{font-size:21px;line-height:1.45;margin-top:15px}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-long .cover-title{font-size:16px}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-top>span:first-child{font-size:10px}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-top [lang]{font-size:6px;letter-spacing:.5px}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-code{font-size:9px}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-drawing{width:110px;height:105px;bottom:54px}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-description{font-size:8px;max-width:100%;line-height:1.6}
:is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-bottom{font-size:6px;line-height:1.5;margin-top:7px;padding-top:5px}
.gallery-record-meta{display:flex;flex-direction:column;gap:5px;margin-top:12px;font-size:12px;line-height:1.6;color:var(--ui-text);overflow-wrap:anywhere}
.gallery-record-meta small{color:var(--ui-muted);font-size:11px;line-height:1.6}
#local-results .local-record{display:flex;flex-direction:column;min-width:0;padding:0;border:1px solid var(--ui-line);border-radius:7px;background:var(--ui-raised);overflow:hidden;box-shadow:0 1px 3px #00000004}
#local-results .local-record:hover{border-color:var(--ui-muted)}
#local-results .book-card{display:block;flex:1;padding:20px;background:transparent;color:var(--ui-text)}
#local-results .local-source-details{padding:0 20px 16px}
#local-results .local-source-details summary{font-size:12px;color:var(--ui-muted);line-height:1.6}
#local-results .local-source-details p,#local-results .local-links a{font-size:12px}
#local-results .local-group>h3{font-size:14px;margin-bottom:12px}
#local-results .local-group>h3>span{font-size:11px}
#local-results .local-links{gap:10px}
@media(min-width:761px) and (max-width:1050px){#home .home-code-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:1500px){#home .home-code-list,#library-page .library-view-list,#local-results[data-view=list] .local-book-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){
 .library-view-row{margin-bottom:20px;gap:10px}.code-view-switch button{min-height:38px;padding:7px 12px}
 #home .home-code-list,#library-page .library-view-list,#local-results[data-view=list] .local-book-list{grid-template-columns:1fr;gap:10px}
 #home .home-code-row,#library-page .library-view-list .book-card,#local-results[data-view=list] .book-card{padding:16px}
 .standard-list-title,#home .home-code-row .standard-list-title{font-size:15px}.standard-list-content{gap:12px}
 #library-page .library-view-gallery,#local-results[data-view=gallery] .local-book-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #library-page .library-view-gallery .book-card,#local-results[data-view=gallery] .book-card{padding:8px}
 :is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .library-cover .code-cover{height:258px;padding:12px}
 :is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-title{font-size:18px}
 :is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-long .cover-title{font-size:14px}
 :is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-top [lang]{display:none}
 :is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-code{font-size:8px}
 :is(#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-drawing{width:80px;height:76px;bottom:54px}
 #local-results .local-source-details{padding:0 16px 14px}
 #local-results[data-view=gallery] .local-source-details{padding:0 8px 12px}
}
@media(max-width:360px){#library-page .library-view-gallery,#local-results[data-view=gallery] .local-book-list{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#home .home-code-row{transition:none}}

/* Compact working rhythm. Keep document text, status and touch controls legible. */
html[data-theme] .content{max-width:960px;padding:16px 28px 0}
html[data-theme] .chapter-kicker{margin:0 0 4px;gap:6px}
html[data-theme] .content h1{font-size:24px;line-height:1.35;margin:0 0 12px}
html[data-theme] .document-chapter-title{font-size:20px;line-height:1.4;margin:18px 0 6px}
html[data-theme] .section-title{font-size:17px;line-height:1.45;margin:14px 0 4px;gap:8px}
html[data-theme] .section{margin-bottom:6px}
html[data-theme] .clause{padding:9px 8px 10px}
html[data-theme] .clause-title{line-height:1.5;min-height:23px;margin-bottom:3px}
html[data-theme] .clause-text{line-height:var(--reader-line);letter-spacing:0}
html[data-theme] .clause-commentary{margin-top:4px}
html[data-theme] .clause-commentary summary{line-height:1.5;min-height:26px;padding:3px 0}
html[data-theme] .clause-commentary[open]{padding-left:10px}
html[data-theme] :is(.commentary-content,.commentary-text){font-size:14px;line-height:1.65;padding-top:0}
html[data-theme] .commentary-text .clause-text{font-size:inherit;line-height:inherit}
html[data-theme] .commentary-source{margin-top:4px}
html[data-theme] .content :is(.code-table,.code-figure){margin-top:8px;margin-bottom:8px}
html[data-theme] .content :is(.book-status-notice,.repeal-intro){margin:8px 0 12px;padding:8px 10px}
html[data-theme] .content .source-context{margin:0 0 8px;padding:0;background:transparent;border:0;border-bottom:1px solid var(--ui-line);border-radius:0}
html[data-theme] .content .source-context>summary{padding:6px 0;min-height:32px;gap:4px 16px;line-height:1.6;flex-direction:row;flex-wrap:wrap}
html[data-theme] .source-context-body{padding:4px 0 10px;line-height:1.65}
html[data-theme] .source-context .source-boundary{margin-top:8px;padding-top:6px}
html[data-theme] .reader-top{height:42px;padding:0 28px;gap:10px}
html[data-theme] .chapter-pagination{width:calc(100% - 56px);max-width:904px;margin:12px auto 0;padding:10px 0;gap:12px}
html[data-theme] .reader-footer{max-width:960px;margin:0 auto;padding:10px 28px 18px;justify-content:flex-end}
html[data-theme] #toc-sidebar .book-head{padding:10px 12px 8px}
html[data-theme] #toc-sidebar .book-actions{margin-top:6px}
html[data-theme] #toc-sidebar .toc-row .toc-link{padding-top:5px;padding-bottom:5px}
html[data-theme] #toc-sidebar .toc-row.sub .toc-link{padding-top:4px;padding-bottom:4px}
.section-navigation,.records-tabs{gap:20px;margin-bottom:16px}
.section-navigation a,.records-tabs :is(a,button){padding-bottom:8px}
#library-page .library-main,.workspace-page-inner{padding:20px 28px 32px}
.library-page-heading,.workspace-page-heading{margin-bottom:14px;gap:12px}
.library-page-heading h1,.workspace-page-heading h1{font-size:24px;line-height:1.35;margin:0}
#library-page .library-search{padding:8px 12px}
#library-page .library-toolbar{margin-bottom:10px}
#library-page .library-filters{padding-bottom:10px;margin-bottom:10px;gap:12px}
.library-view-row{margin-bottom:14px;gap:10px}
#library-page .library-group{margin-bottom:18px}
#library-page .library-group>h3{margin-bottom:8px}
#library-page .discipline-nav{padding:12px 10px}
#library-page .discipline-nav-label{padding-bottom:8px}
#library-page .discipline-nav button{padding:7px 10px}
#home .home-code-list,#library-page .library-view-list,#local-results[data-view=list] .local-book-list{gap:10px}
#home .home-code-row,#library-page .library-view-list .book-card,#local-results[data-view=list] .book-card{padding:14px}
.standard-list-content{gap:10px}.standard-list-text{gap:4px}
.standard-list-title,#home .home-code-row .standard-list-title{line-height:1.45}
.standard-symbol{width:30px;height:30px;flex-basis:30px}
.standard-list-meta{gap:4px 8px}
.gallery-record-meta{gap:3px;margin-top:8px}
#workspace-page .search-box{padding:6px 10px;gap:10px}
#workspace-page #search-input{padding:6px 0}
#workspace-page .search-mode-help{margin-top:6px;line-height:1.5}
#workspace-page .search-options{padding:9px 0;gap:12px}
#workspace-page .search-coverage{padding-top:10px;margin-top:16px}
.search-coverage summary{cursor:pointer;line-height:1.6}
.search-coverage p{margin-top:6px}
html[data-theme] .search-result{padding:12px 0}
html[data-theme] .search-result p{line-height:1.65;margin-top:4px}
html[data-theme] :is(.ai-answer,.ai-interpretation){padding:12px;margin:10px 0 14px}
html[data-theme] :is(.ai-answer-point,.ai-conditions,.ai-gaps,.ai-source-card){padding-top:9px;padding-bottom:9px;line-height:1.65}
html[data-theme] :is(.ai-evidence blockquote,.ai-source-card p){line-height:1.65}
.records-list .list-card,.record-unavailable{padding:14px 0;gap:4px}
.records-list .list-card p,.record-unavailable p{line-height:1.65}
.records-location{margin:0 0 14px}
html[data-theme] .home-shell{padding-top:14px}
html[data-theme] .home-hero-centered{padding:18px 0}
html[data-theme] .home-hero-centered .home-statement{gap:10px}
html[data-theme] #home .home-english p{margin:0;font-size:22px}
html[data-theme] .home-section{margin-top:20px}
html[data-theme] .home-topics{padding-bottom:10px}
html[data-theme] .home-library-status{padding-top:10px;padding-bottom:10px}
@container (max-width:540px){html[data-theme] .content{padding:14px 16px 0}html[data-theme] .reader-top{padding:0 12px;gap:8px}}
@media(max-width:760px){
 html[data-theme] .content{padding:14px 16px 0}
 html[data-theme] .content h1{font-size:22px}
 html[data-theme] .reader-top{height:44px;padding:0 12px;gap:8px}
 html[data-theme] .chapter-pagination{width:auto;margin:10px 16px 0;padding:10px 0}
 html[data-theme] .reader-footer{padding:8px 16px 18px}
 html[data-theme] #toc-sidebar .toc-row .toc-link,html[data-theme] #toc-sidebar .toc-row.sub .toc-link{padding-top:10px;padding-bottom:10px}
 html[data-theme] .clause-commentary summary{min-height:36px;padding:7px 0}
 html[data-theme] .clause-tools .icon-btn{min-width:40px;min-height:40px}
 #library-page .library-main,.workspace-page-inner{padding:16px 16px 28px}
 #library-page .discipline-nav{padding:8px}
 #library-page .discipline-nav button{min-height:40px}
 .section-navigation,.records-tabs{margin-bottom:12px}
 .library-page-heading h1,.workspace-page-heading h1{font-size:22px}
 #workspace-page .search-mode-tabs button{min-height:40px}
 #workspace-page .search-options select{max-width:100%;min-width:0}
 html[data-theme] .home-hero-centered{padding:14px 0 18px}
 html[data-theme] #home .home-english p{font-size:18px}
}
@media print{html[data-theme] .content{max-width:none;padding:0}}

/* Reader: one search entry, one document navigation, text first. */
html[data-theme] body.is-reading{--header:52px;--rail:0px}
html[data-theme] body.is-reading>.site-header{height:52px;min-height:52px;gap:16px;padding:0 20px}
body.is-reading .workspace{height:calc(100dvh - 52px);margin-top:52px}
body.is-reading .workspace>.rail,body.is-reading .workspace>.collapse-button{display:none}
body.is-reading .site-header .brand-en{display:none}
html[data-theme] body.is-reading .site-header .global-search{max-width:640px;flex:1}
body.is-reading .site-header .top-end{margin-left:auto}
body.is-reading .site-header .site-menu-toggle{display:inline-flex}
html[data-theme] body.is-reading .site-header .site-navigation{display:none;position:absolute;right:16px;left:auto;top:calc(100% + 6px);width:220px;max-width:calc(100vw - 32px);height:auto;padding:6px;flex-direction:column;align-items:stretch;gap:2px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:6px;box-shadow:0 8px 24px #00000014}
html[data-theme] body.is-reading .site-header.navigation-open .site-navigation{display:flex}
body.is-reading .site-navigation>a{padding:9px 12px;min-height:40px}
html[data-theme] body.is-reading #toc-sidebar .book-foot{display:none}
html[data-theme] body.is-reading .reader-top{height:40px;padding:0 20px;gap:12px;z-index:40;overflow:visible}
.reader-toc-toggle{flex-shrink:0;gap:5px;font-size:12px;min-height:32px;color:var(--ui-muted)}
.reader-toc-toggle svg{width:16px;height:16px}
.reader-top .breadcrumbs{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.is-reading:not(.collapsed) .reader-top .breadcrumbs{visibility:hidden}
.reader-options{position:relative;margin-left:auto;flex-shrink:0;color:var(--ui-muted);font-size:12px}
.reader-options>summary{display:flex;align-items:center;gap:4px;cursor:pointer;list-style:none;min-height:32px;padding:4px 0}
.reader-options>summary::-webkit-details-marker{display:none}
.reader-options>summary svg{width:14px;height:14px}
.reader-options-menu{position:absolute;right:0;top:calc(100% + 5px);width:210px;max-width:calc(100vw - 32px);padding:8px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:6px;box-shadow:0 8px 24px #00000014;z-index:45}
.reader-options:not([open])>.reader-options-menu{display:none}
.reader-options .reading-mode{display:flex;width:100%;margin:0 0 6px}
.reader-options .reading-mode[hidden]{display:none!important}
.reader-options .reading-mode button{flex:1;min-height:34px}
html[data-theme] .reader-options .read-actions{display:flex;flex-direction:column;gap:2px;align-items:stretch}
.reader-options .read-actions button{width:100%;min-height:36px;justify-content:flex-start;text-align:left;padding:7px 10px;gap:8px;border-radius:4px;font-size:13px;color:var(--ui-text)}
.reader-options .read-actions button[hidden]{display:none}
.reader-options .read-actions svg{width:16px;height:16px;color:var(--ui-muted)}
.reader-options .read-actions button:hover{background:var(--ui-panel)}
.reader-options>summary:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px;border-radius:3px}
.reader-top .search-return{display:flex;min-width:0;max-width:calc(100% - 170px);gap:6px;align-items:center;padding:5px 0}
.reader-top .search-return>span:not(.return-query){flex-shrink:0}
.return-query{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;color:var(--ui-muted)}
.return-query:not(:empty)::before{content:'· ';color:var(--ui-muted)}
html[data-theme] body.is-reading .content{padding-top:12px}
@media(max-width:760px){
 html[data-theme] body.is-reading>.site-header{padding:0 12px;gap:8px}
 body.is-reading .sidebar,body.is-reading .side-panel{top:52px;bottom:0}
 html[data-theme] body.is-reading .reader-top{height:40px;padding:0 14px;gap:8px}
 .reader-toc-toggle,.reader-options>summary{min-height:40px}
 .reader-options .read-actions button,.reader-options .reading-mode button{min-height:40px}
 .reader-top .search-return{max-width:calc(100% - 140px);min-height:40px}
 html[data-theme] body.is-reading .site-header .global-search{max-width:36px;min-width:36px;margin-left:auto}
 body.is-reading .site-header .top-end{margin-left:0}
 body.is-reading .site-header .global-search #search-placeholder{display:none}
}
@media print{.reader-options,.reader-toc-toggle{display:none!important}body.is-reading .workspace{height:auto;margin:0}}

/* Query-led home: a single alignment axis, then the last working position. */
html[data-theme] #home .home-hero-centered{padding:20px 0 24px}
html[data-theme] #home .home-hero-centered .home-statement{max-width:100%;width:100%;gap:10px}
html[data-theme] #home .home-hero h1{font-size:clamp(30px,3vw,42px);line-height:1.3;font-weight:600;letter-spacing:-1px}
#home .home-title-break{display:none}
html[data-theme] #home .home-english p{display:block;font-family:Georgia,'Times New Roman',serif;font-size:22px;line-height:1.4;letter-spacing:-.3px}
html[data-theme] #home .home-search-compact{max-width:none;padding:6px 8px 6px 14px;border-radius:7px;background:var(--ui-raised)}
#home .home-search-compact #home-query{min-height:40px}
#home .home-search-compact #home-search-submit{min-height:40px;border-radius:5px;padding:8px 16px}
#home .home-search-compact .home-search-options{border:0;border-radius:5px;background:var(--ui-panel);padding:3px}
#home .home-search-compact .home-search-options span{padding:8px 10px;border-radius:3px}
#home .home-search-compact .home-search-options input:focus-visible+span{outline-color:var(--ui-accent)}
#home .home-query-help,#home .home-topics{max-width:none;font-size:12px}
html[data-theme] #home .home-query-help{margin:6px 0 0;line-height:1.5;color:var(--ui-muted)}
html[data-theme] #home :is(.home-discipline-tabs small,.home-library-status>span){color:var(--ui-muted)}
html[data-theme] #home .home-library-status{min-height:36px;padding:8px 0}
html[data-theme] #home .home-topics{padding:4px 0 8px;gap:0 18px}
#home .home-topics button{color:var(--ui-text);font-size:12px}
#home .home-resume{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:7px 0;border-top:1px solid var(--ui-line);border-bottom:1px solid var(--ui-line)}
#home .home-resume-reading{display:flex;align-items:center;gap:10px;min-width:0;min-height:36px;padding:4px 0;text-align:left;color:var(--ui-text);font-size:13px}
#home .home-resume-label{flex-shrink:0;color:var(--ui-muted);font-size:12px}
#home .home-resume-title{font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#home .home-resume-meta{flex-shrink:0;color:var(--ui-muted);font-size:12px;font-variant-numeric:tabular-nums}
#home .home-resume-reading>svg{width:14px;height:14px;flex-shrink:0;color:var(--ui-muted)}
#home .home-resume-reading:hover .home-resume-title{color:var(--ui-accent)}
#home .home-resume-actions,#home .home-footer-actions{display:flex;align-items:center;gap:16px;flex-shrink:0}
#home .home-resume-actions button{min-height:36px;font-size:12px;padding:4px 0;color:var(--ui-muted)}
#home .home-resume-actions button:hover{color:var(--ui-accent)}
html[data-theme] #home .home-library{margin-top:18px}
#home .home-section-head{margin-bottom:10px}
#home .home-section-head h2{font-size:17px;font-weight:600;line-height:1.5}
#home .home-library-toolbar{padding-bottom:10px;gap:10px}
#home .home-card-meta{font-size:12px;line-height:1.5;opacity:1;padding-top:8px}
#home .home-footer{margin-top:20px;padding-top:12px;font-size:12px}
#home .home-code-card:hover>.code-cover{transform:none;box-shadow:inset 4px 0 7px #00000012,0 5px 12px #0002}
/* Version text remains on the cover; remove only the decorative second footer label. */
:is(#home,#library-page,#local-results) .cover-bottom>span:last-child{display:none}
:is(#home,#library-page,#local-results) .cover-bottom>span:first-child{max-width:none}
:is(#home,#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-bottom{font-size:9px;line-height:1.5;gap:0;padding:6px 10px}
:is(#home,#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-description{font-size:10px;line-height:1.5}
:is(#home,#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-top [lang]{font-size:8px;letter-spacing:.1px}
:is(#home,#library-page .library-view-gallery,#local-results[data-view=gallery]) .cover-code{font-size:11px}
/* One toolbar for finding and filtering standards. */
#library-page .library-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px}
#library-page .library-toolbar .library-search{flex:1;min-width:220px;min-height:38px;padding:7px 10px}
#library-page .library-toolbar .library-filters{flex:none;display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin:0;padding:0;border:0}
#library-page .library-toolbar .library-filters label{flex:none;gap:6px;white-space:nowrap}
#library-page .library-toolbar .library-filters select{min-height:38px;max-width:160px;padding:7px 24px 7px 8px}
#library-page .library-toolbar .code-view-switch{min-height:38px}
#library-page .library-toolbar .code-view-switch button{min-height:30px}
#library-page .library-toolbar .library-import{min-height:38px;padding:7px 10px;white-space:nowrap;font-size:12px}
#library-page .library-view-row{margin-bottom:12px}
#library-page .library-results-meta{line-height:1.5}
@media(min-width:761px) and (max-width:1200px){
 #library-page .library-toolbar .library-search{flex-basis:100%}
 #library-page .library-toolbar .code-view-switch{margin-left:auto}
}
@media(max-width:900px){
 #home .home-resume{align-items:flex-start;flex-wrap:wrap;gap:0}
 #home .home-resume-reading{width:100%}
 #home .home-resume-actions{padding-left:58px}
 #home .home-resume-meta{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
}
@media(max-width:760px){
 html[data-theme] #home .home-shell{padding:12px 16px 20px}
 html[data-theme] #home .home-hero-centered{padding:12px 0 18px}
 html[data-theme] #home .home-hero h1{font-size:32px;line-height:1.3;letter-spacing:-.6px}
 #home .home-title-break{display:block}
 html[data-theme] #home .home-english p{font-size:18px;letter-spacing:-.25px}
 #home .home-search-compact .home-search-options span{min-height:38px;display:flex;align-items:center;justify-content:center;padding:7px 5px}
 #home .home-search-compact #home-query{font-size:16px;min-height:42px}
 #home .home-search-compact #home-search-submit{min-height:42px;padding:8px 12px}
 #home .home-topics>span{display:none}
 #home .home-topics button{min-height:36px}
 #home .home-resume-reading{display:grid;grid-template-columns:auto minmax(0,1fr) 14px;gap:3px 10px;min-height:42px}
 #home .home-resume-label{grid-row:1/3;align-self:center}
 #home .home-resume-title{grid-column:2;grid-row:1;line-height:1.5}
 #home .home-resume-meta{grid-column:2;grid-row:2;line-height:1.5;font-size:11px}
 #home .home-resume-reading>svg{grid-column:3;grid-row:1/3}
 #home .home-resume-actions{gap:20px;padding-left:58px}
 #home .home-resume-actions button{min-height:40px}
 #home .home-footer{align-items:flex-start;flex-wrap:wrap;gap:4px}
 #home .home-footer-actions button{min-height:40px}
 #library-page .library-toolbar .library-search{min-width:0;flex-basis:100%;min-height:42px}
 #library-page .library-toolbar .library-filters{width:100%;min-width:0}
 #library-page .library-toolbar .library-filters label{flex:1;min-width:0}
 #library-page .library-toolbar .library-filters select{min-width:0;max-width:100%;width:100%;min-height:40px}
 #library-page .library-toolbar .code-view-switch button,#library-page .library-toolbar .library-import{min-height:40px}
 #library-page .library-toolbar .library-import{margin-left:auto}
}

/* Historical clauses: a red rule carries status; body text stays readable. */
:root{--revision-red:#b42332}
:root[data-theme=dark]{--revision-red:#ff929c}
.revision-line,.revision-origin,.revision-missing,.repeal-effective{font-size:12px;line-height:1.55}
.revision-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 12px;margin:0 0 6px;color:var(--muted)}
.revision-line strong{color:var(--revision-red);font-weight:600}
.revision-line a,.revision-origin a,.repeal-line>a{color:var(--blue);text-underline-offset:3px}
.revision-origin,.revision-missing{margin:6px 0 0;color:var(--muted)}
.revision-origin a{margin-left:12px}
.revision-history>.clause-text+.clause-text{margin-top:4px}
html[data-theme] .repeal-line{gap:4px 10px;margin:0 0 6px}
html[data-theme] .repeal-line .repeal-label{color:var(--revision-red);background:none;border:0;padding:0;font-size:12px}
html[data-theme] .repeal-line a{font-size:12px;color:var(--blue)}
.repeal-entry{display:inline-flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline}
html[data-theme] .repeal-effective{color:var(--muted)}
html[data-theme] :is(.repealed-text,.repealed-text a,.repeal-media-label s,.legend-sample s,.revision-old-media td,.revision-old-media th,.revision-old-media caption,.revision-old-media .code-formula,.revision-old-media .table-notes){text-decoration-line:line-through;text-decoration-color:var(--revision-red);text-decoration-thickness:1.5px;text-decoration-skip-ink:none}
html[data-theme] .revision-old-media .code-table{margin:6px 0}
@media print{html[data-theme] :is(.repealed-text,.repealed-text a,.repeal-media-label s,.revision-old-media td,.revision-old-media th,.revision-old-media caption,.revision-old-media .code-formula,.revision-old-media .table-notes){text-decoration-color:#b42332}.revision-line,.revision-origin{break-inside:avoid}}

.page-clause-history{margin:10px 0;padding:8px 0;border-block:1px solid var(--border)}
.page-clause-history h3{font-size:15px;line-height:1.5;margin:0 0 5px}

.deleted-part-history{display:block}
.deleted-part-note{display:block;margin:3px 0 6px;font-size:12px;line-height:1.55;color:var(--muted);white-space:normal}
.deleted-part-note a{margin-left:10px}
/* Conversational queries: coverage, known conditions and explicit follow-up. */
.ai-scope,.ai-reference-list{font-size:12px;line-height:1.6;color:var(--ui-muted,var(--muted));padding:10px 0;border-bottom:1px solid var(--ui-line,var(--border))}
.ai-scope details{display:inline-block;margin-left:10px}.ai-scope details[open]{display:block;margin:6px 0}.ai-scope summary,.ai-reference-list summary{cursor:pointer}
.ai-known-conditions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:8px}.ai-known-conditions span{padding:2px 6px;background:var(--ui-panel,var(--soft));border-radius:3px;color:var(--ui-text,var(--ink))}
.ai-conditions-changed{color:var(--ui-text,var(--ink));border-left:2px solid var(--ui-accent,#4263ce);padding-left:8px;margin-top:8px}
.ai-continue{padding:16px 0}.ai-continue label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}.ai-continue form>div{display:flex;gap:8px;align-items:stretch}
.ai-continue input{min-width:0;flex:1;font:inherit;font-size:14px;color:var(--ui-text,var(--ink));background:var(--ui-panel,var(--paper));border:1px solid var(--ui-line,var(--border));border-radius:5px;padding:10px 12px;box-shadow:none}
.ai-continue small{display:block;color:var(--ui-muted,var(--muted));font-size:11px;margin-top:6px}.ai-continue input:focus-visible{outline:1px solid var(--ui-muted,var(--muted));outline-offset:1px}
@media(max-width:600px){.ai-continue form>div{flex-wrap:wrap}.ai-continue input{flex-basis:100%}.ai-continue button{min-height:40px}}
html[data-theme] .voice-input-button,.voice-input-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex-shrink:0;width:36px;height:36px;padding:7px;border:0;border-radius:5px;color:var(--ui-muted,#606a78);background:transparent;cursor:pointer;box-shadow:none}
.voice-input-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;flex-shrink:0}
html[data-theme] .voice-input-button:hover{background:var(--ui-hover);color:var(--ui-text)}
html[data-theme] .voice-input-button[aria-pressed=true]{background:var(--ui-warning-bg);color:var(--ui-danger)}
html[data-theme] .voice-description{width:auto;font-size:12px;margin:-4px 0 10px;padding:5px 8px}
.voice-input-status{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 32px);padding:10px 14px;background:var(--ui-raised,#fff);color:var(--ui-text,#20242b);border:1px solid var(--ui-line,#e3e6eb);box-shadow:var(--ui-shadow);border-radius:7px;font:12px/1.6 var(--ui-font,sans-serif);z-index:1000;pointer-events:none}
.home-query-row .voice-input-button{color:inherit}.voice-input-button[aria-pressed=true] svg{stroke-width:2}
@media(max-width:600px){html[data-theme] .voice-input-button{min-width:40px;min-height:40px}.ai-continue .voice-input-button{flex-basis:auto}}
.home-search-compact .home-query-row:has(.voice-input-button){grid-template-columns:20px minmax(150px,1fr) 36px auto auto}
@media(max-width:760px){.home-search-compact .home-query-row:has(.voice-input-button){grid-template-columns:18px minmax(0,1fr) 40px auto}.home-search-compact .voice-input-button{grid-row:1;grid-column:3}.home-search-compact .home-query-row:has(.voice-input-button) #home-search-submit{grid-column:4}.home-search-compact .home-query-row:has(.voice-input-button) .home-search-options{grid-column:1/-1}}
