@charset "UTF-8";
/* Reading surfaces: original page layouts and authored graphics remain intact. */
:root{--bw-ui-bg:#f8f9f6;--bw-ui-surface:#fff;--bw-ui-soft:#eef1ed;--bw-ui-ink:#202923;--bw-ui-muted:#59645d;--bw-ui-line:#dce2da;--bw-ui-control:#819084;--bw-ui-accent:#315b45;--bw-ui-on-accent:#fff;--bw-ui-focus:#246a47;--bw-document-measure:72ch}
:root[data-theme="dark"]{--bw-ui-bg:#171c19;--bw-ui-surface:#202722;--bw-ui-soft:#29322c;--bw-ui-ink:#e7eee6;--bw-ui-muted:#b0beb2;--bw-ui-line:#38463b;--bw-ui-control:#879c8c;--bw-ui-accent:#b7d9be;--bw-ui-on-accent:#14251a;--bw-ui-focus:#b7e2c1}
html:has(body.bw-unified){background:var(--bw-ui-bg);color:var(--bw-ui-ink);color-scheme:light;scroll-padding-top:104px;scrollbar-color:var(--bw-ui-control) var(--bw-ui-bg)}
html[data-theme="dark"]:has(body.bw-unified){color-scheme:dark}
html body.bw-unified{background-image:none;color-scheme:inherit}
html body.bw-unified :where(input,textarea,select){color-scheme:inherit;accent-color:var(--bw-ui-accent);caret-color:var(--bw-ui-ink)}
html body.bw-unified.bw-document{--plain-grain:none!important;--paper-grain:none!important;--bw-paper:var(--bw-ui-bg);--bw-ink:var(--bw-ui-ink);--bw-panel:var(--bw-ui-surface);--text:var(--bw-ui-ink);--dim:var(--bw-ui-muted);--rule:var(--bw-ui-line);--panel:var(--bw-ui-surface);--notes-dim:var(--bw-ui-muted);--notes-muted:var(--bw-ui-muted);--notes-line:var(--bw-ui-line);--hq-panel:var(--bw-ui-surface);--hq-rule:var(--bw-ui-line);--hq-muted:var(--bw-ui-muted);--rc-ink:var(--bw-ui-ink);--rc-muted:var(--bw-ui-muted);--rc-line:var(--bw-ui-line);--rc-panel:var(--bw-ui-surface);--s-paper:var(--bw-ui-bg);--s-ink:var(--bw-ui-ink);--s-muted:var(--bw-ui-muted);--s-line:var(--bw-ui-line);--s-panel:var(--bw-ui-surface);--s-inverse:var(--bw-ui-accent);--s-on-inverse:var(--bw-ui-on-accent);--s-focus:var(--bw-ui-focus);background-image:none!important}
html body.bw-unified.bw-document::before,html body.bw-unified.bw-document::after{background-image:none!important}
html body.bw-unified{--bg:var(--bw-ui-bg);--surface:var(--bw-ui-surface);--soft:var(--bw-ui-soft);--ink:var(--bw-ui-ink);--fg:var(--bw-ui-ink);--muted:var(--bw-ui-muted);--faint:var(--bw-ui-muted);--line:var(--bw-ui-line);--control:var(--bw-ui-control);--accent:var(--bw-ui-accent);--on-accent:var(--bw-ui-on-accent);--focus:var(--bw-ui-focus);--paper:var(--bw-ui-bg);--paper-ink:var(--bw-ui-ink);--paper-muted:var(--bw-ui-muted);--paper-line:var(--bw-ui-line);--paper-control:var(--bw-ui-control);--paper-panel:var(--bw-ui-surface);--paper-surface:var(--bw-ui-surface);--field:var(--bw-ui-soft);--plain-paper:var(--bw-ui-bg);--plain-ink:var(--bw-ui-ink);--plain-muted:var(--bw-ui-muted);--plain-line:var(--bw-ui-line);--plain-control:var(--bw-ui-control);--plain-panel:var(--bw-ui-surface);--plain-button-hover:var(--bw-ui-soft);--bw-book-paper:var(--bw-ui-bg);--bw-book-ink:var(--bw-ui-ink);--bw-book-muted:var(--bw-ui-muted);--bw-book-rule:var(--bw-ui-line);--bw-book-control:var(--bw-ui-control);--bw-book-panel:var(--bw-ui-surface);--bw-book-surface:var(--bw-ui-soft);--bw-book-accent:var(--bw-ui-accent);--bw-book-inverse:var(--bw-ui-accent);--bw-book-on-inverse:var(--bw-ui-on-accent);--bw-book-on-inverse-muted:var(--bw-ui-on-accent);--bw-line:var(--bw-ui-line);--bw-muted:var(--bw-ui-muted);--bwd-ink:var(--bw-ui-ink);--bwd-muted:var(--bw-ui-muted);--bwd-paper:var(--bw-ui-bg);--bwd-line:var(--bw-ui-line);--research-panel:var(--bw-ui-surface);--research-control:var(--bw-ui-control);--reader-fg:var(--bw-ui-ink);--reader-muted:var(--bw-ui-muted);--reader-line:var(--bw-ui-line);--reader-panel:var(--bw-ui-surface);--shell-ink:var(--bw-ui-ink);--shell-muted:var(--bw-ui-muted);--shell-line:var(--bw-ui-line);background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;-webkit-text-size-adjust:100%;margin:0}
html body.bw-document:not(.bw-artwork)>main,html body.bw-document:not(.bw-artwork)>.page{width:calc(100% - 64px);max-width:1080px;margin:0 auto;padding:56px 0 88px;min-width:0;box-sizing:border-box}
html body.bw-document:not(.bw-artwork) main{color:var(--ink);font-size:var(--reading-size,18px);line-height:1.7}
html body.bw-document:not(.bw-artwork) main :where(p,li,dd,dt,blockquote,summary){overflow-wrap:break-word}
html body.bw-document:not(.bw-artwork) main :where(p,li,dd,blockquote){line-height:1.72}
html body.bw-document:not(.bw-artwork) main :where(h1,h2,h3,h4){color:var(--ink);font-family:inherit;letter-spacing:-.025em;line-height:1.22;overflow-wrap:break-word;scroll-margin-top:106px}
html body.bw-document:not(.bw-artwork) main h1{font-size:clamp(30px,4.2vw,46px);font-weight:650;max-width:26ch;text-wrap:balance}
html body.bw-document:not(.bw-artwork) main h2{font-size:clamp(23px,2.6vw,30px);font-weight:620}
html body.bw-document:not(.bw-artwork) main h3{font-size:clamp(19px,2vw,23px);font-weight:620}
html body.bw-document main :where(p,blockquote,figure,pre,table){max-inline-size:100%}
html body.bw-document main>p,html body.bw-document main>section>p,html body.bw-document main>article>p{max-width:var(--bw-document-measure)}
html body.bw-document main :where(a){text-underline-offset:.22em;text-decoration-thickness:1px}
html body.bw-document main :where(a:hover){text-decoration-thickness:2px}
html body.bw-document main :where(hr){border:0;border-top:1px solid var(--line);margin-block:32px}
html body.bw-document main :where(input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),textarea,select){max-width:100%;min-width:0;background:var(--surface);color:var(--ink);border-color:var(--control);border-radius:10px;font-family:inherit}
html body.bw-document main :where(button){font-family:inherit;touch-action:manipulation}
html body.bw-document main :where(button,input,select,summary,a):focus-visible{outline:3px solid var(--focus);outline-offset:4px}
html body.bw-document main :where(textarea):focus-visible{outline:3px solid var(--focus);outline-offset:3px}
html body.bw-document main :where(pre){overflow-x:auto;overscroll-behavior-inline:contain;white-space:pre-wrap;overflow-wrap:break-word;border-radius:12px;padding:20px;background:var(--soft);color:var(--ink);font-size:.88em}
html body.bw-document main :where(code){overflow-wrap:anywhere}
html body.bw-document main :where(img,video,canvas){max-width:100%;height:auto}
html body.bw-document main :where(iframe){max-width:100%}
html body.bw-document main :where(table){border-collapse:collapse;font-size:.9em;line-height:1.55}
html body.bw-document main :where(th,td){border-color:var(--line)}
html body.bw-document main :where(summary){cursor:pointer;min-height:44px}
html body.bw-document main :where(details){border-color:var(--line)}
html body.bw-document main :where(blockquote){border-color:var(--control)}
html body.bw-document main :where(.caption,.muted,.kicker,.eyebrow){color:var(--muted)}
/* These existing paper surfaces use the shared palette, while demo internals keep their own rules. */
html body.bw-document main :where(.rc-card,.rc-feature,.bwr-card,.bwl-card,.bw-update-shell,.bwd-panel,.plain-question,.wi-annex-heading){border-color:var(--line);border-radius:14px}
html body.bw-unified.bw-document main :is(.plain-example,.plain-question,.plain-more-example,.card,.bwd-entry-card,.bwr-card,.bwl-card,.rc-card){border-color:var(--line);border-radius:16px;background-color:var(--surface);color:var(--ink)}
html body.bw-unified.bw-document main :is(.plain-route a,.plain-question-nav a,.app-links a,.bwd-button){border-radius:10px;border-color:var(--control)}
html body.bw-unified.bw-document main .bwd-entry-card .bwd-button{color:var(--ink);background:var(--surface)}
html body.bw-unified.bw-document main .bwd-entry-card .bwd-button--primary{color:var(--on-accent);background:var(--accent);border-color:var(--accent)}
/* The model update drawer has older literal colours rather than palette tokens. */
html body.bw-unified.bw-document .bw-update-shell{color:var(--ink);font-family:inherit;padding-inline:0}
html body.bw-unified.bw-document .bw-update-shell :is(.bw-update-label small,.bw-update-status,.bw-update-note,.bw-update-models dd){color:var(--muted)}
html body.bw-unified.bw-document .bw-update-shell :is(.bw-updates,.bw-update-body,.bw-update-github,.bw-update-follow,.bw-update-comparison,.bw-update-models>div,.bw-update-tasks p,.bw-update-results th,.bw-update-results td){border-color:var(--line)}
html body.bw-unified.bw-document .bw-update-shell :is(textarea,input[readonly]){color:var(--ink);background:var(--surface);border-color:var(--control);border-radius:12px;font-family:inherit}
html body.bw-unified.bw-document .bw-update-shell .bw-update-copy{color:var(--on-accent);background:var(--accent);border-color:var(--accent);border-radius:10px;font-family:inherit}
html body.bw-unified.bw-document .bw-update-shell .bw-update-result-selected{background:var(--soft)}
html body.bw-unified.bw-document .bw-update-shell :is(summary,button,input,textarea,a):focus-visible{outline-color:var(--focus)}
html body.bw-document main :where(.rc-topics,.rc-entry-links,.plain-route,.plain-question-nav,.wi-intro-links,.publication-reading-tools){gap:10px}
html body.bw-document main :where(.rc-topics,.rc-entry-links,.plain-route,.plain-question-nav,.wi-intro-links,.publication-reading-tools) a{min-height:44px;align-content:center}
html body.bw-document :where(.bw-update-shell){max-width:1080px;margin:24px auto 0;width:calc(100% - 64px)}
html body.bw-document :where(.skip-link,.beta-skip){position:fixed;top:8px;left:16px;z-index:10000;transform:translateY(-180%);background:var(--surface);color:var(--ink);border:1px solid var(--control);border-radius:10px;padding:12px 16px}
html body.bw-document :where(.skip-link,.beta-skip):focus{transform:none}
.bw-legacy-anchor{position:absolute;width:0;height:0;pointer-events:none}
.bw-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;border:1px solid var(--line);border-radius:12px;margin-block:24px;background:var(--surface)}
.bw-table-scroll>table{margin:0!important;min-width:min(600px,100%)}
.bw-table-scroll:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.bw-page-outline{margin:0 0 32px;padding:0 18px;border:1px solid var(--line);border-radius:12px;background:var(--surface);font-size:15px}
.bw-page-outline>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:54px;font-weight:550;list-style:none}
.bw-page-outline>summary::-webkit-details-marker{display:none}
.bw-page-outline>summary::after{content:"";width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);flex:none;margin:0 3px 4px}
.bw-page-outline[open]>summary::after{transform:rotate(225deg);margin-top:8px}
.bw-page-outline nav{padding:0 0 16px}
.bw-page-outline ol{margin:0;padding-left:22px;columns:2;column-gap:32px}
.bw-page-outline li{break-inside:avoid;padding:0 0 6px;line-height:1.5!important}
.bw-page-outline a{display:inline-block;padding:5px 0;line-height:1.5;color:var(--ink)}
.bw-document-toc{border-color:var(--line);scrollbar-gutter:stable}
.bw-document-toc a{scroll-margin-top:106px}
.bw-document-action-icon{width:16px;height:16px;display:inline-block;vertical-align:-2px;margin-inline-end:7px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
/* Exported documents keep their own controls and layout; no global navigation is added. */
html body.bw-standalone{--reading-size:18px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.7;padding:0}
html body.bw-standalone>main{max-width:1040px;width:calc(100% - 64px);margin:auto;padding-block:48px 72px}
html body.bw-standalone main :where(h1,h2,h3,h4){font-family:inherit;color:var(--ink)}
html body.bw-standalone :where(a){color:inherit;text-underline-offset:.2em}
@media(min-width:900px){html[data-beforeword-panel="side"] body.bw-document{width:calc(100% - var(--bw-reader-reserved,480px))!important;max-width:none!important;margin-inline:0!important}html[data-bw-reader-compact] body.bw-document .header-inner{padding-inline:20px;gap:12px}html[data-bw-reader-compact] body.bw-document .primary-nav{display:none}}
@media(max-width:760px){html body.bw-document:not(.bw-artwork)>main,html body.bw-document:not(.bw-artwork)>.page,html body.bw-standalone>main{width:calc(100% - 40px);padding-top:32px;padding-bottom:56px}html body.bw-document :where(.bw-update-shell){width:calc(100% - 40px)}html body.bw-document:not(.bw-artwork) main h1{font-size:clamp(29px,7.6vw,36px)}html body.bw-document:not(.bw-artwork) main{font-size:var(--reading-size,18px)}.bw-page-outline ol{columns:1}.bw-page-outline{margin-bottom:26px}html body.bw-document main :where(pre){padding:16px}.bw-table-scroll{margin-inline:0}}
@media(max-width:360px){html body.bw-document:not(.bw-artwork)>main,html body.bw-document:not(.bw-artwork)>.page,html body.bw-standalone>main{width:calc(100% - 32px)}html body.bw-document :where(.bw-update-shell){width:calc(100% - 32px)}}
@media(prefers-reduced-motion:reduce){html body.bw-document{scroll-behavior:auto}}
@media print{html body.bw-document{background:white!important;color:black!important;width:100%!important}body.bw-document>.app-header,body.bw-document>.site-footer,body.bw-document>dialog[data-bw-shell],.bw-page-outline,.bw-document-action-icon{display:none!important}html body.bw-document>main{width:100%!important;max-width:none!important;margin:0!important;padding:0!important}.bw-table-scroll{overflow:visible;border:0}.bw-table-scroll>table{min-width:0}html body.bw-document main :where(h1,h2,h3){break-after:avoid}html body.bw-document main :where(pre){white-space:pre-wrap}}

/* Final palette boundary: old paper pages contain literal !important colours. */
@media screen{
html:root:has(body.bw-unified.bw-document){background:var(--bw-ui-bg)!important;color:var(--bw-ui-ink)!important}
html:root body.bw-unified.bw-document{--bg:var(--bw-ui-bg)!important;--paper:var(--bw-ui-bg)!important;--paper-ink:var(--bw-ui-ink)!important;--paper-muted:var(--bw-ui-muted)!important;--paper-line:var(--bw-ui-line)!important;--paper-control:var(--bw-ui-control)!important;--paper-panel:var(--bw-ui-surface)!important;--paper-surface:var(--bw-ui-surface)!important;--ink:var(--bw-ui-ink)!important;--text:var(--bw-ui-ink)!important;--fg:var(--bw-ui-ink)!important;--muted:var(--bw-ui-muted)!important;--faint:var(--bw-ui-muted)!important;--dim:var(--bw-ui-muted)!important;--line:var(--bw-ui-line)!important;--rule:var(--bw-ui-line)!important;--surface:var(--bw-ui-surface)!important;--field:var(--bw-ui-soft)!important;--panel:var(--bw-ui-surface)!important;--research-panel:var(--bw-ui-soft)!important;--research-control:var(--bw-ui-control)!important;--bw-line:var(--bw-ui-line)!important;--bw-muted:var(--bw-ui-muted)!important;--accent:var(--bw-ui-accent)!important;--focus:var(--bw-ui-focus)!important;background:var(--bw-ui-bg)!important;color:var(--bw-ui-ink)!important;color-scheme:inherit!important}
html:root body.bw-unified.bw-document>.app-header,html:root body.bw-unified.bw-document>.site-footer{color:var(--bw-ui-ink)!important}
html:root body.bw-unified.bw-document>.app-header :is(.brand,.header-tools),html:root body.bw-unified.bw-document>.site-footer a{color:var(--bw-ui-ink)!important}
html:root body.bw-unified.bw-document .note-action :is(pre,.note-action-title,.note-action-label){color:var(--ink)!important}
html:root body.bw-unified.bw-document :is(.bwl-embed-item,.bwl-embed>.bwl-textlink){color:var(--ink)!important}
html:root body.bw-unified.bw-document .bwl-button--primary{color:var(--on-accent)!important;background:var(--accent)!important;border-color:var(--accent)!important}
}

/* ma has an independent work toolbar. Keep it in flow below the shared header. */
html.ma-with-footer:has(body.bw-artwork){--bw-reader-launcher-bottom:calc(138px + env(safe-area-inset-bottom,0px));height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto}
html.ma-with-footer body.bw-unified.bw-document.bw-artwork{display:block!important;place-items:normal;grid-template:none;height:auto;min-height:100%;overflow-x:hidden;overflow-y:visible}
html.ma-with-footer body.bw-artwork>.app-header{position:sticky;top:0;z-index:100;width:100%;max-width:none;margin:0}
html.ma-with-footer body.bw-unified.bw-artwork>.ma-actions{position:relative!important;inset:auto!important;z-index:1;display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px 22px;width:calc(100% - 64px);max-width:1080px;min-height:64px;margin:0 auto;padding:8px 0;box-sizing:border-box;grid-area:auto;background:var(--bg);border-bottom:1px solid var(--line)}
html.ma-with-footer body.bw-unified.bw-artwork>.ma-actions .ma-action{min-height:44px;color:var(--ink);font-family:inherit;font-size:13px;letter-spacing:.025em;border-color:var(--control)}
html.ma-with-footer body.bw-unified.bw-artwork #stage{display:block;position:relative;grid-area:auto;width:100%;max-width:calc((100dvh - var(--bw-ma-header-height,77px) - var(--bw-ma-toolbar-height,64px)) * 2.4);height:calc(100dvh - var(--bw-ma-header-height,77px) - var(--bw-ma-toolbar-height,64px));min-height:320px;margin:0 auto;padding:0;background:#000;overflow:hidden}
html.ma-with-footer body.bw-unified.bw-artwork>.site-footer{display:block;width:100%;max-width:none;grid-area:auto;margin:0}
@media(max-width:760px){html.ma-with-footer body.bw-unified.bw-artwork>.ma-actions{width:calc(100% - 40px);justify-content:flex-start;gap:8px 20px;min-height:60px;padding-block:6px}html.ma-with-footer body.bw-unified.bw-artwork #stage{height:calc(100dvh - var(--bw-ma-header-height,109px) - var(--bw-ma-toolbar-height,60px));max-width:100%}}
@media(max-width:360px){html.ma-with-footer body.bw-unified.bw-artwork>.ma-actions{width:calc(100% - 32px);gap:8px 16px}}

/* Named legacy reading surfaces and labels that predate theme tokens. */
@media screen{
html body.bw-unified.bw-document:not(.bw-artwork) main :is(.hq-boundary,.hq-added,.hq-continuations,.bwh-scope-item,.bwh-case,.bwh-pair figure,.bwh-diff-pair>div,.rc-human,.rc-card,.rc-topics>a,.rc-walkthrough,.bwl-card,.bwl-embed-item,.bwr-feature-card,.bwd-entry-card,.wi-material,.wi-archive-note,.scope-item,.study-card,.about-route,.reader-next-grid>a,.human-analysis,.human-contents,.human-downloads){color:var(--ink);background:var(--surface);border-color:var(--line);border-radius:14px}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(.hq-record-panel,.rc-specimen,.rc-material,.rc-example-records>div,.rc-practice,.bwl-reason-example,.bwl-statement,.bwl-latest-message,.bwl-message,.bwr-intro-example,.bwr-context,.bwd-example,.bwd-comparison,.wi-specimen,.wi-record,.wi-context,.wi-example,.wi-analysis-note,.plain-visual,.plain-speech-learning,.plain-ai-card,.example-body,.reader-workbench,.note-action,.rc-work,.wi-message,.record-text,.bw-update-question,.bw-update-request,.bw-update-comparison-body,.human-record,.bwa-entry-record,.bwa-entry-reading){color:var(--ink);background-color:var(--soft);background-image:none;border-color:var(--line);border-radius:12px}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(.hq-words,.hq-core,.bwl-embed,.bwr-entry,.bwr-series-invite,.bwl-metadata dd,.bwr-stats strong,.bwr-aside strong,.bwd-related p,.bwd-example pre,.rc-number,.rc-material,.wi-reading,.wi-proposal,.wi-prose,.wi-edition summary,.wi-toc summary,.written-sequence,.written-letter,.publication-editorial-note h2,.citation,.study-feature .study-name,.example-text,.example-note,.scope-title,.scope-item p,.frame-close,.text-button){color:var(--ink)}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(.bwl-kicker,.bwl-hero-note,.bwl-small,.bwl-status,.bwl-status-note,.bwl-hub-status,.bwl-number,.bwl-card-meta,.bwl-metadata,.bwl-metadata dt,.bwl-side p,.bwl-subtitle,.bwl-sources p,.bwl-history-note,.bwl-case dt,.bwl-reason-example dt,.bwl-reason-example>p,.bwl-statement-source,.bwl-quote-label,.bwl-delivery-addresses dt,.bwl-delivery-addresses small,.bwl-delivery-note,.bwl-delivery-label,.bwl-embed-item small,.bwl-timeline time,.bwr-stats,.bwr-row-meta,.bwr-tag,.bwr-meta dt,.bwr-meta dd small,.bwr-aside,.bwr-record-note,.bwr-screen-list figcaption,.bwr-screen-list p,.bwr-history time,.bwr-source-list .location,.bwr-source-list .note,.bwr-data-links,.bwr-toolbar output,.bwr-intro-example dt,.bwr-intro-example>p,.bwr-intro-example figcaption,.bwr-fragment,.human-record-label,.human-compare-label){color:var(--muted)}
html body.bw-unified.bw-document.human-page main :is(.human-button,.human-route-list a,.human-step-heading>.human-section-label,.human-step-links a[href^="#step-"],.human-manuscript .human-section-label,.human-manuscript .self-apply){color:var(--ink);background:var(--surface);border-color:var(--control);border-radius:10px}
html body.bw-unified.bw-document.human-page main :is(.human-primary,.human-route-list a[aria-current="step"]){color:var(--on-accent);background:var(--accent);border-color:var(--accent);border-radius:10px}
html body.bw-unified.bw-document.human-page main .human-route-list a[aria-current="step"] span{color:inherit}
html body.bw-unified.bw-document.human-page main #section-17>ol>li::marker{color:var(--ink)}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(.human-analysis,.human-contents,.bwr-reading-guide,.bwr-screens)>summary:hover{color:var(--ink);background:var(--soft)}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),textarea,select){color:var(--ink);background-color:var(--surface);border-color:var(--control);color-scheme:inherit;caret-color:var(--ink)}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(input,select,textarea,audio){color-scheme:inherit}
html body.bw-unified.bw-document:not(.bw-artwork) main :is(button,input,select,textarea,summary,a,audio):focus-visible{outline-color:var(--focus)}
html body.bw-unified.bw-document.bw-standalone>main{background:var(--bg);color:var(--ink)}
html body.bw-unified.bw-document.bw-standalone main :is(a,a:visited,[data-reader-tools],[data-reader-entry]){color:var(--ink)}
html body.bw-unified.bw-document.bw-standalone main th{background:var(--soft);color:var(--ink)}
html body.bw-unified.bw-document.bw-standalone .reader-contents>summary::marker{color:var(--muted)}
html body.bw-unified.bw-document .privacy-content :is(.intro,.steps p,.help-content p,.small,.number,.sample-placeholder){color:var(--muted)}
html body.bw-unified.bw-document .privacy-content .primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
html body.bw-unified.bw-document .privacy-content .setup-notice{background:var(--soft);color:var(--ink)}
html body.bw-unified.bw-document .privacy-content .secondary-action:hover{background:var(--soft);color:var(--ink)}
html body.bw-unified.bw-document>.page:has(>.privacy-content)>header.header{display:none}
/* The animation canvas stays black with its original white/warm pixels. Only its controls follow the theme. */
html body.bw-unified.bw-document.bw-artwork #tapHint{color:var(--ink);background:var(--bg)}
html body.bw-unified.bw-document.bw-artwork .tap-intro strong{color:var(--ink)}
html body.bw-unified.bw-document.bw-artwork .tap-intro span{color:var(--muted)}
html body.bw-unified.bw-document.bw-artwork :is(.ma-player,.ma-no-script,.listen-dialog,.listen-close){color:var(--ink);background:var(--surface);border-color:var(--control);border-radius:12px}
html body.bw-unified.bw-document.bw-artwork :is(.ma-player-row>span,.ma-status,.listen-kicker){color:var(--muted)}
html body.bw-unified.bw-document.bw-artwork :is(.listen-body,.listen-body h2,.listen-platforms,.listen-platforms a){color:var(--ink);border-color:var(--line)}
html body.bw-unified.bw-document.bw-artwork :is(.listen-platforms a,.listen-close):hover{color:var(--ink);background:var(--soft)}
html body.bw-unified.bw-document.bw-artwork .ma-player #playBtn{color:var(--on-accent);background:var(--accent);border-color:var(--accent);border-radius:8px}
html body.bw-unified.bw-document.bw-artwork :is(#ma-seek,.ma-native-audio){accent-color:var(--accent);color-scheme:inherit}
html body.bw-unified.bw-document.bw-artwork :is(a,button,input,audio):focus-visible{outline-color:var(--focus);box-shadow:0 0 0 2px var(--bg)}
html body.bw-unified.bw-document.reader-transcript :is(.lead,.kicker,.time,.transcript-status){color:var(--muted)}
html body.bw-unified.bw-document.reader-transcript :is(h1,.lyric,header a,.transcript-jumps a,.transcript-time:hover){color:var(--ink)}
html body.bw-unified.bw-document.reader-transcript #transcript>li[aria-current="true"]{color:var(--ink);background:var(--soft);border-color:var(--accent)}
html body.bw-unified.bw-document.reader-transcript #transcript>li[aria-current="true"] .time{color:var(--ink)}
html body.bw-unified.bw-document.reader-transcript audio{color-scheme:inherit;accent-color:var(--accent)}
}

/* v3 audit: scoped corrections for legacy content, with authored text intact. */
@media screen{
html:has(body.bw-document){--bw-document-header-height:77px}
html body.bw-unified.bw-document.bwa-page :is(.bwa-entry-record,.bwa-entry-reading){padding:18px 20px}
html body.bw-unified.bw-document.bwa-page .bwa-entry-records{gap:12px}
html body.bw-unified.bw-document.bwa-page .bwa-entry-record{border:1px solid var(--line)}
html body.bw-unified.bw-document.bwa-page :is(.about-record-label,.about-study-label,.example-label,.bwa-kicker){font-size:14px;line-height:1.5;color:var(--muted)}
html body.bw-unified.bw-document.hz-page{--hz-paper:var(--bg);--hz-ink:var(--ink);--hz-muted:var(--muted);--hz-line:var(--line)}
html body.bw-unified.bw-document :is(.hz-feature,.hz-crosslink){color:var(--ink)}
html body.bw-unified.bw-document .hz-feature .hz-feature-links>a:not(.hz-button){color:var(--ink)}
html body.bw-unified.bw-document :is(.hz-button,.bwl-button:not(.bwl-button--primary)){color:var(--ink);background:var(--surface);border-color:var(--control);border-radius:10px}
html body.bw-unified.bw-document :is(.hz-button,.bwl-button:not(.bwl-button--primary)):hover{color:var(--ink);background:var(--soft);border-color:var(--control)}
html body.bw-unified.bw-document .hz-button.primary{color:var(--on-accent);background:var(--accent);border-color:var(--accent)}
html body.bw-unified.bw-document .hz-button.primary:hover{color:var(--on-accent);background:var(--accent);border-color:var(--accent);filter:brightness(.96)}
html body.bw-unified.bw-document.hz-page :is(.hz-eyebrow,.hz-meta,.hz-file-meta,.hz-source-note){font-size:14px;line-height:1.5}
html body.bw-unified.bw-document.human-page{--human-record-surface:var(--soft);--human-record-line:var(--line)}
html body.bw-unified.bw-document.human-page :is(.human-opening,.human-records,.human-manuscript .record-block){color:var(--ink);background:var(--soft);border-color:var(--line);border-radius:12px}
html body.bw-unified.bw-document.human-page :is(.human-kicker,.human-record-label,.human-compare-label){font-size:14px;line-height:1.5;color:var(--muted)}
html body.bw-unified.bw-document.dr-page .table-wrap th{background:var(--soft);color:var(--ink)}
html body.bw-unified.bw-document.dr-page .reader-contents>summary::marker{color:var(--muted)}
html body.bw-unified.bw-document.dr-page .dr-start a{color:var(--on-accent);background:var(--accent);border-color:var(--accent);border-radius:10px}
html body.bw-unified.bw-document :is(.bwl-kicker,.bwl-breadcrumb span,.bwl-hero-note,.bwl-status,.bwl-status-note,.bwl-hub-status,.bwl-small,.bwl-letter p:first-child,.bwl-requests li::before,.bwl-reason-example figcaption,.bwl-message>summary small,.bwl-message-source){color:var(--muted)}
html body.bw-unified.bw-document :is(.bwl-kicker,.bwl-breadcrumb,.bwl-status,.bwl-status-note,.bwl-small,.bwl-card-meta,.bwr-row-meta,.bwr-tag,.bwr-record-note,.bwr-screen-list figcaption){font-size:14px;line-height:1.5}
/* In-page sticky navigation sits below the shared header, including enlarged UI. */
html body.bw-unified.bw-document :is(.human-route,.dr-reading-tools,.bws-toc){top:var(--bw-document-header-height);z-index:4}
html body.bw-unified.bw-document :is(.bwl-side,.bwr-aside,.bwd-toc,.wi-toc){top:calc(var(--bw-document-header-height) + 20px)}
html body.bw-unified.bw-document .note-section-head{top:calc(var(--bw-document-header-height) + 16px)}
/* ma's normal-flow artwork rules must not defeat modal scroll containment. */
html.ma-with-footer:has(body.bw-artwork):has(dialog[open]),html.ma-with-footer body.bw-unified.bw-document.bw-artwork:has(dialog[open]){overflow:hidden!important;overscroll-behavior:none}
}
@media screen and (max-width:760px){html:has(body.bw-document){--bw-document-header-height:109px}html body.bw-unified.bw-document.bwa-page :is(.bwa-entry-record,.bwa-entry-reading){padding:16px}}
/* Printing from dark appearance keeps dark ink on white paper. */
@media print{html:root:has(body.bw-document){--bw-ui-bg:#fff;--bw-ui-surface:#fff;--bw-ui-soft:#fff;--bw-ui-ink:#000;--bw-ui-muted:#444;--bw-ui-line:#bbb;--bw-ui-control:#777;--bw-ui-accent:#000;--bw-ui-on-accent:#fff;color-scheme:light!important}html body.bw-unified.bw-document{color-scheme:light!important}}

/* Beta walkthrough: readable labels and explanations at the existing touch sizes. */
@media screen{
html body.bw-unified.bw-document.beta-page :is(.beta-kicker,.beta-example-kind,.beta-example-status,.bw-guide-label,.bw-guide-path-item,.bw-guide-prepared,.bw-guide-field-label,.bw-guide-direction){font-size:14px;line-height:1.5}
html body.bw-unified.bw-document.beta-page :is(.beta-availability,.beta-frame-fallback,.beta-next p,.beta-explainer p,.beta-feedback p,.bw-guide-context,.bw-guide-placeholder,.bw-guide-panel-help,.bw-guide-step,.bw-guide-boundary){font-size:16px;line-height:1.6}
html body.bw-unified.bw-document.beta-page :is(.beta-button,.beta-more-examples>summary,.beta-explainer>summary,.beta-reader-heading>a,.beta-feedback a,.beta-example-action){font-size:16px;line-height:1.5}
html body.bw-unified.bw-document.beta-page :is(.bw-guide-control,.bw-guide-analyze){font-size:16px!important;line-height:1.5}
}

/* Constructed examples retain their colours as roles, with readable dark surfaces. */
@media screen{
html body.bw-unified.bw-document.bw-examples-page{--bw-gradebook-ink:#36566e;--bw-gradebook-line:#8198a9}
html[data-theme="dark"] body.bw-unified.bw-document.bw-examples-page{--bw-gradebook-ink:#b3d5ed;--bw-gradebook-line:#8ca7ba}
html body.bw-unified.bw-document.bw-examples-page #main :is(.case-gradebook,.case-gradebook .gradebook-subject){color:var(--bw-gradebook-ink)}
html body.bw-unified.bw-document.bw-examples-page #main .case-gradebook :is(th,td){border-color:var(--bw-gradebook-line)}
html body.bw-unified.bw-document.bw-examples-page #main :is(.case-message,.case-chat-question){color:var(--ink);background:var(--soft);border-color:var(--line)}
html body.bw-unified.bw-document.bw-examples-page #main .case-chat-answer{color:var(--ink);background:var(--surface);border-color:var(--line)}
html body.bw-unified.bw-document>.page:has(>.privacy-content)>footer{color:var(--muted);font-size:14px;line-height:1.5}
}

/* Correspondence controls and provenance remain readable in both appearances. */
@media screen{
html body.bw-unified.bw-document .bwr-series{color:var(--ink);border-color:var(--line);font-size:16px;line-height:1.5}
html body.bw-unified.bw-document .bwr-series a[aria-current="page"]{color:var(--ink);border-bottom-color:var(--accent)}
html body.bw-unified.bw-document :is(.bwl-metadata,.bwl-delivery-addresses dt,.bwl-delivery-addresses small,.bwl-statement-source,.bwl-quote-label,.bwl-delivery-label,.bwl-timeline time,.bwl-message-source,.bwl-reason-example figcaption,.bwl-reason-example dt,.bwl-case dt,.bwl-number,.bwl-requests li::before){font-size:14px;line-height:1.5}
html body.bw-unified.bw-document :is(.bwl-address-sources,.bwl-address-sources p,.bwl-embed-item small){font-size:14px;line-height:1.6}
html body.bw-unified.bw-document :is(.bwl-button,.bwl-textlink,.bwl-jumps a,.bwl-side a,.bwl-address-sources summary,.bwl-prompt summary){font-size:16px;line-height:1.5}
html body.bw-unified.bw-document :is(.bwl-hero-note,.bwl-delivery-note,.bwl-letter p:first-child){font-size:16px;line-height:1.6}
html body.bw-unified.bw-document .bwl-timeline li::before{background:var(--surface);border-color:var(--control)}
}

/* The study and its annexes share the same navigation, tables, and reading scale. */
@media screen{
html body.bw-unified.bw-document.wi-page :is(.wi-breadcrumb,.wi-eyebrow,.wi-label,.wi-date,.wi-caption,.wi-source-links,.wi-toc,.wi-edition details,.wi-hero-note){color:var(--muted)}
html body.bw-unified.bw-document.wi-page :is(.wi-breadcrumb,.wi-eyebrow,.wi-label,.wi-date,.wi-caption,.wi-source-links,.wi-hero-note){font-size:14px;line-height:1.6}
html body.bw-unified.bw-document.wi-page :is(.wi-toc,.wi-toc ol,.wi-toc summary,.wi-top,.wi-inline,.wi-button,.wi-feedback label,.wi-proposal-links,.wi-method-links){font-size:16px;line-height:1.5}
html body.bw-unified.bw-document.wi-page .wi-toc a[aria-current="location"]{color:var(--ink);border-left-color:var(--accent)}
html body.bw-unified.bw-document.wi-page .wi-button{color:var(--ink);background:var(--surface);border-color:var(--control);border-radius:10px}
html body.bw-unified.bw-document.wi-page .wi-button:hover{color:var(--ink);background:var(--soft);border-color:var(--control)}
html body.bw-unified.bw-document.wi-page .wi-button.wi-primary{color:var(--on-accent);background:var(--accent);border-color:var(--accent)}
html body.bw-unified.bw-document.wi-page .wi-material:hover{color:var(--ink);background:var(--soft)}
html body.bw-unified.bw-document.wi-page .wi-prose{font-family:inherit;font-size:var(--reading-size,18px);line-height:1.72}
html body.bw-unified.bw-document.wi-page .wi-prose th{color:var(--ink);background:var(--soft)}
html body.bw-unified.bw-document.wi-page .wi-prose table{font-family:inherit;font-size:16px;line-height:1.6}
html body.bw-unified.bw-document.wi-page .wi-prose table[data-columns="2"] td{font-size:16px;line-height:1.6}
html body.bw-unified.bw-document.wi-page .wi-prose table[data-columns="2"] td:first-child{color:var(--muted);font-size:14px}
html body.bw-unified.bw-document.wi-page .wi-table-wrap:has(table:not([data-columns="2"]))::before{color:var(--muted);font-size:14px}
html body.bw-unified.bw-document.wi-page :is(.wi-archive-note,.wi-edition details,.wi-reference>p,.wi-context,.wi-context ul,.wi-downloads p){font-size:16px;line-height:1.65}
/* Transcript's authored header rules must not uppercase the shared navigation. */
html body.bw-unified.bw-document.reader-transcript>.app-header{text-transform:none;letter-spacing:normal;font-size:16px}
html body.bw-unified.bw-document.reader-transcript>.bw-work-nav{width:calc(100% - 64px);max-width:1080px;margin:0 auto;padding:12px 0;border-bottom:1px solid var(--line);color:var(--muted);font-size:14px}
html body.bw-unified.bw-document.reader-transcript>.bw-work-nav nav{display:flex;align-items:center;flex-wrap:wrap;gap:4px 24px}
html body.bw-unified.bw-document.reader-transcript>.bw-work-nav a{display:inline-flex;align-items:center;min-height:44px;color:var(--ink)}
html body.bw-unified.bw-document.bw-standalone>.bw-header .bw-home{color:var(--ink)}
html body.bw-unified.bw-document.bwd-page .bwd-button{color:var(--ink);background:var(--surface);border-color:var(--control);border-radius:10px;font-size:16px;line-height:1.5}
html body.bw-unified.bw-document.bwd-page .bwd-button--primary{color:var(--on-accent);background:var(--accent);border-color:var(--accent)}
html body.bw-unified.bw-document.bwd-page .bwd-letterforms p:first-child{color:var(--muted)}
html body.bw-unified.bw-document.bwd-page .bwd-table--wide td::before{color:var(--muted);font-size:14px}
html body.bw-unified.bw-document .hz-feature .hz-feature-inner{border-color:var(--line)}
html body.bw-unified.bw-document .hz-feature :is(.hz-feature-kicker,.hz-feature-copy){color:var(--ink)}
html body.bw-unified.bw-document .bwpi-entry{color:var(--ink);background:var(--surface);border-color:var(--line);border-radius:14px}
html body.bw-unified.bw-document .bwpi-entry :is(.bwpi-kicker,.bwpi-boundary,.bwpi-scope){color:var(--muted);font-size:14px;line-height:1.6}
html body.bw-unified.bw-document .bwpi-entry .bwpi-link{color:var(--on-accent);background:var(--accent);border-color:var(--accent);border-radius:10px;font-size:16px;line-height:1.5}
html body.bw-unified.bw-document .bwpi-entry .bwpi-materials{color:var(--ink);font-size:16px}
html body.bw-unified.bw-document .rc-topics a.bwpi-topic{color:var(--ink);background:var(--surface);border-color:var(--control)}
/* A source appendix without section headings has no contents to disclose. */
html body.bw-unified.bw-document.wi-page .wi-toc details[data-reading-toc]:not(:has(nav a)){display:none}
html body.bw-unified.bw-document.wi-page .wi-reading-layout:has(>.wi-toc details[data-reading-toc]:not(:has(nav a))){grid-template-columns:minmax(0,1fr);gap:16px}
html body.bw-unified.bw-document.wi-page .wi-toc:has(details[data-reading-toc]:not(:has(nav a))){position:static;max-height:none;border:0;margin-bottom:0}
html body.bw-unified.bw-document.bw-standalone [data-reader-manuscript] :is(p,li,blockquote){max-width:var(--bw-document-measure,72ch)}
html body.bw-unified.bw-document.wi-page .wi-example{padding:20px;border:1px solid var(--line);border-radius:14px}
/* Authored bylines are sentences; a shared flex utility splits their inline spans. */
html body.bw-unified.bw-document main .byline{display:block;color:var(--muted);font-size:14px;line-height:1.6}
html body.bw-unified.bw-document.bwd-page .bwd-table{font-size:16px;line-height:1.6}
html body.bw-unified.bw-document.bwd-page .bwd-table th{color:var(--ink);background:var(--soft);font-family:inherit;font-size:14px;line-height:1.5}
html body.bw-unified.bw-document.bwd-page :is(.bwd-kicker,.bwd-meta,.bwd-label,.bwd-number,.bwd-example figcaption,.bwd-comparison figcaption,.bwd-toc a span,.bwd-mobile-toc a span){font-size:14px;line-height:1.5}
html body.bw-unified.bw-document.bwd-page :is(.bwd-text-link,.bwd-toc a,.bwd-mobile-toc a){font-size:16px;line-height:1.5}
html body.bw-unified.bw-document.bws-page main .bws-declaration :is(h2,h3){color:inherit}
}
@media screen and (max-width:760px){html body.bw-unified.bw-document.reader-transcript>.bw-work-nav{width:calc(100% - 40px)}}
@media screen and (max-width:360px){html body.bw-unified.bw-document.reader-transcript>.bw-work-nav{width:calc(100% - 32px)}}

/* The artwork reader lives in a closed shadow root, outside :has(dialog[open]). */
html.ma-with-footer[data-beforeword-panel="modal"]:has(body.bw-artwork),
html.ma-with-footer[data-beforeword-panel="modal"] body.bw-unified.bw-document.bw-artwork {
  overflow: hidden !important;
  overscroll-behavior: none;
}
