/* PharmaBook EN V19 responsive reading shell. Never used by Print House. */
:root{--rd-bg:#f4f6f8;--rd-paper:#fff;--rd-text:#223243;--rd-dim:#596a7c;--rd-accent:#1265a0;--rd-nav:#122d49;--rd-line:#d8e1e9;--rd-font:1}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]):not([data-theme="dark"]){--rd-bg:#111a23;--rd-paper:#1d2935;--rd-text:#eef2f4;--rd-dim:#b9c6d0;--rd-accent:#80c8fa;--rd-nav:#102437;--rd-line:#405264}}
html[data-theme="dark"]{--rd-bg:#111a23;--rd-paper:#1d2935;--rd-text:#eef2f4;--rd-dim:#b9c6d0;--rd-accent:#80c8fa;--rd-nav:#102437;--rd-line:#405264}
html{scroll-behavior:smooth;scroll-padding-top:5rem}*{box-sizing:border-box}
body{margin:0!important;padding:0!important;max-width:none!important;background:var(--rd-bg)!important;color:var(--rd-text);font:16px/1.65 system-ui,-apple-system,'Segoe UI',Arial,sans-serif}
body.reading-app a{color:var(--rd-accent)}
body.reading-app :is(a,button,input,select,summary):focus-visible{outline:3px solid #49b8eb!important;outline-offset:3px}
.skip-link{position:absolute;top:-100px;left:8px;z-index:200;padding:8px;background:white;color:#122d49!important}
.skip-link:focus{top:8px}
.sitebar{position:sticky;top:0;z-index:80;display:flex;align-items:center;gap:1rem;justify-content:space-between;padding:.75rem max(1rem,calc((100vw - 1240px)/2));min-height:64px;background:var(--rd-nav);color:#f1f6fa;box-shadow:0 2px 12px #0002;font:500 .88rem/1.4 system-ui,Arial,sans-serif}
.sitebar a{color:white!important;text-decoration:none}.sitebar .brand{font-size:.92rem;font-weight:800;letter-spacing:.045em}
.sitebar .chapter-current{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:26rem;opacity:.88;font-size:.8rem}
.reader-tools{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.reader-button,.reader-tools select{font:600 .84rem system-ui,sans-serif;padding:.47rem .72rem;background:#254862;border:1px solid #4c6a80;color:white;border-radius:6px;cursor:pointer;min-height:36px}
.reader-button:hover,.reader-tools select:hover{background:#3c6482}.reader-tools select{max-width:115px}
.reader-button[aria-expanded="true"]{background:#0e6d8c}.font-value{min-width:3ch;text-align:center;color:white;font-size:.78rem}
.reader-panel{position:fixed;z-index:100;top:64px;right:0;bottom:0;width:min(470px,100vw);overflow:auto;padding:1.2rem 1.3rem 3rem;background:var(--rd-paper);box-shadow:-10px 6px 28px #0004;color:var(--rd-text);border-left:1px solid var(--rd-line)}
.reader-panel[hidden],.panel-screen[hidden]{display:none!important}.panel-screen{position:fixed;z-index:90;inset:64px 0 0;background:#071526a6}
.reader-panel h2{font:700 1.24rem/1.25 system-ui,sans-serif;margin:.4rem 0 1rem}.reader-panel .book-toc{padding:0;max-width:none}
.reader-panel .book-toc>li{padding:.65rem 0;border-bottom:1px solid var(--rd-line)}
.reader-panel .book-toc ol{padding-left:.8rem}.reader-panel .book-toc a{color:var(--rd-text);text-decoration:none}
.reader-panel .book-toc a:hover,.search-result a:hover{text-decoration:underline}
.reader-panel .toc-chapter{padding:.25rem 0 .25rem .7rem;border-left:2px solid var(--rd-line)}
.reader-panel .toc-part>a{font-weight:760}
.search-form{display:flex;gap:.5rem;margin:0 0 1rem}.search-form input{min-width:0;flex:1;padding:.7rem;border:1px solid var(--rd-line);border-radius:6px;color:var(--rd-text);background:var(--rd-paper)}
.search-form button{padding:.6rem .8rem;border:0;border-radius:6px;background:var(--rd-accent);color:var(--rd-paper);font-weight:700;cursor:pointer}
.search-result{padding:.65rem 0;border-bottom:1px solid var(--rd-line)}.search-result a{font-weight:750;display:block;color:var(--rd-accent)}.search-result small{display:block;color:var(--rd-dim);margin:.18rem 0}.search-result p{margin:.3rem 0;line-height:1.48;font-size:.9rem;overflow-wrap:anywhere}
body.reading-app>main{max-width:980px;min-width:0;margin:1.3rem auto 2.8rem;padding:clamp(1.25rem,3vw,3rem);background:var(--rd-paper);box-shadow:0 5px 24px #0001;border:1px solid var(--rd-line);border-radius:10px;color:var(--rd-text)}
body.reading-app>main p,body.reading-app>main li{line-height:1.6}
body.reading-app>main :is(.book-page,.source-page,[data-physical-page]){position:relative!important;float:none;min-width:0!important;width:auto!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;transform:none;break-before:auto!important;break-after:auto!important;page-break-before:auto!important;page-break-after:auto!important;margin:0 0 2rem!important;padding:0 0 1.65rem!important;border-bottom:1px solid var(--rd-line)}
body.reading-app>main [data-physical-page]{scroll-margin-top:5rem}
body.reading-app>main [data-physical-page] :is(.native-folio,.print-folio,.folio,.folio-text){display:none!important}
body.reading-app>main [data-physical-page] :is(p,blockquote,li):not(figure *):not(svg *){font-size:calc(1rem * var(--rd-font));max-width:none;overflow-wrap:break-word}
body.reading-app>main [data-physical-page] :is(h1,h2,h3):not(figure *){max-width:100%;overflow-wrap:break-word;line-height:1.22}
body.reading-app>main img,body.reading-app>main svg{max-width:100%;height:auto}
body.reading-app>main :is(figure,.digital-parity-inset){min-width:0;max-width:100%;margin:1.25rem 0;overflow-x:auto;overflow-y:visible;scrollbar-width:thin}
body.reading-app>main figure img{display:block;object-fit:contain;height:auto;max-height:none}
body.reading-app>main figure svg{display:block;width:auto;max-width:100%;height:auto;overflow:visible}
body.reading-app>main :is(table,.table-scroll){max-width:100%;overflow-x:auto}
body.reading-app>main table{border-collapse:collapse;width:max-content;min-width:100%;max-width:100%;display:block;overflow-x:auto}
body.reading-app>main :is(td,th){padding:.38rem .55rem;border:1px solid var(--rd-line);vertical-align:top;white-space:normal}
body.reading-app>main :is(.digital-compare-grid,.digital-benefit-grid,.digital-kpi-grid,.digital-matrix){min-width:0;max-width:100%}
body.reading-app>main [style*="167mm"][style*="240mm"]{max-width:100%!important;min-width:0!important;}
.reader-footer{max-width:980px;margin:auto auto 2.5rem;padding:1rem;display:flex;justify-content:space-between;flex-wrap:wrap;gap:1rem;font-size:.9rem}
.reader-footer a{color:var(--rd-accent)}.sitefooter{text-align:center;padding:1rem 1rem 2rem;color:var(--rd-dim);font-size:.76rem}
.home-main .hero{display:grid;grid-template-columns:minmax(180px,260px) 1fr;align-items:center;gap:clamp(1.2rem,4vw,4rem);border-bottom:1px solid var(--rd-line);padding-bottom:2rem}
.hero-cover{width:100%;height:auto;border:1px solid var(--rd-line);box-shadow:0 8px 25px #0002}
.home-main .eyebrow{font-size:.75rem;letter-spacing:.1em;font-weight:700;color:var(--rd-accent)}
.home-main h1{font-size:clamp(2rem,4vw,3rem);line-height:1.14;color:var(--rd-text)}
.home-main .subtitle{font-size:1.12rem;max-width:43ch}.home-main .edition{font-size:.85rem;color:var(--rd-dim)}
.start{display:inline-block;padding:.72rem 1rem;background:#1265a0!important;color:white!important;text-decoration:none;border-radius:6px;font-weight:700}
.home-main .contents{margin-top:2rem;max-width:760px}.home-main .book-toc,.home-main .book-toc ol{list-style:none;padding:0}
.home-main .book-toc .toc-part{padding:.7rem 0;border-bottom:1px solid var(--rd-line)}.home-main .book-toc .toc-part>a{font-weight:780}
.home-main .book-toc .toc-chapter{margin-left:1rem;padding:.25rem 0}
@media(max-width:900px){.sitebar .chapter-current{max-width:15rem}.sitebar{padding:.7rem 1rem}body.reading-app>main{margin:0 auto;border:0;border-radius:0;box-shadow:none}}
@media(max-width:640px){.sitebar{position:sticky;gap:.4rem;align-items:center;flex-wrap:wrap;min-height:64px}.sitebar .brand{font-size:.76rem}.sitebar .chapter-current{display:none}.reader-tools{gap:.24rem}.reader-button,.reader-tools select{padding:.44rem .48rem;font-size:.74rem}.reader-tools select{max-width:90px}.font-value{display:none}.reader-panel{top:64px}.home-main .hero{grid-template-columns:1fr}.hero-cover{max-width:240px;margin:auto}body.reading-app>main{padding:1.1rem}.home-main h1{font-size:2rem}body.reading-app>main :is(.digital-compare-grid,.digital-benefit-grid,.digital-kpi-grid,.digital-matrix,.digital-parity-grid){grid-template-columns:minmax(0,1fr)!important}.reader-footer{gap:1rem}body.reading-app>main figure{padding:.2rem}}
@media print{.sitebar,.reader-panel,.panel-screen,.reader-footer,.sitefooter{display:none!important}body.reading-app>main{border:0;box-shadow:none}}

/* Keep original diagram text/color semantics legible under reader dark themes. */
html[data-theme="dark"] body.reading-app>main figure,html[data-theme="dark"] body.reading-app>main .digital-parity-inset{color:#26333b;background:#fff;border-radius:4px;padding:.4rem}
@media (prefers-color-scheme:dark){html:not([data-theme="light"]):not([data-theme="dark"]) body.reading-app>main figure,html:not([data-theme="light"]):not([data-theme="dark"]) body.reading-app>main .digital-parity-inset{color:#26333b;background:#fff;border-radius:4px;padding:.4rem}}

/* V19 targeted delta: accessible UI controls and native-width author diagrams.
   Strictly output-layer: source figure CSS and printed pages are unchanged. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
body.reading-app>main .reader-figure-scroll{position:relative!important;display:block!important;max-width:100%!important;min-width:0!important;width:100%!important;margin:0 0 1.15rem!important;padding:0!important;overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-inline:contain;border:1px solid var(--rd-line);border-radius:5px;scrollbar-width:auto;background:white;box-sizing:border-box!important}
body.reading-app>main .reader-figure-scroll:focus-visible{outline:3px solid var(--rd-accent)!important;outline-offset:2px}
body.reading-app>main .reader-figure-scroll>.reader-figure-fixed{display:block!important;width:167mm!important;min-width:167mm!important;max-width:none!important;height:240mm!important;max-height:none!important;position:relative!important;left:0!important;top:0!important;right:auto!important;bottom:auto!important;transform:none!important;margin:0!important;padding:0!important;float:none!important}
body.reading-app>main .reader-figure-hint{font:600 .78rem/1.4 system-ui,Arial,sans-serif!important;color:var(--rd-dim)!important;margin:.55rem 0 .3rem!important}
@media(min-width:780px){body.reading-app>main .reader-figure-hint{display:none!important}}
/* Fixed original diagram panels intentionally keep their light palette in dark theme.
   Only regular chapter headings on dark paper take the high-contrast reader color. */
html[data-theme="dark"] body.reading-app #reader-main [data-physical-page] :is(h1,h2,h3,h4,h5,h6):not(figure *):not(.change-card *):not(.digital-parity-inset *):not(.p099-flow-card *){color:var(--rd-text)!important}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]):not([data-theme="dark"]) body.reading-app #reader-main [data-physical-page] :is(h1,h2,h3,h4,h5,h6):not(figure *):not(.change-card *):not(.digital-parity-inset *):not(.p099-flow-card *){color:var(--rd-text)!important}}

/* Preserve the original teal semantics on white before/after reader cards. */
body.reading-app #reader-main .change-card.after h3{color:#086a65!important}
/* Relative scrollport retains complete original vector artwork, no page overflow. */
body.reading-app>main .reader-figure-scroll>.reader-figure-wide{display:block!important;max-width:none!important;position:relative!important;left:0!important;top:0!important;right:auto!important;bottom:auto!important;transform:none!important;margin:0!important;float:none!important}


/* V19 independent QA R3: figure 043 keeps a native semantic table on desktop;
   small screens reflow each complete source row into a readable card.  No
   synthetic text, duplicated CID nodes or breaking inside English words. */
@media (max-width:640px){
body.reading-app>main #figure-043 table,
body.reading-app>main #figure-043 tbody,
body.reading-app>main #figure-043 tr{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;table-layout:auto!important}
body.reading-app>main #figure-043 tr{margin:.65rem 0!important;border:1px solid #b6cbd4!important;border-radius:5px!important;overflow:hidden!important;background:#fff!important}
body.reading-app>main #figure-043 th,
body.reading-app>main #figure-043 td{display:block!important;position:static!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;border:0!important;padding:.55rem .7rem!important;text-align:left!important;white-space:normal!important;overflow-wrap:normal!important;word-wrap:normal!important;word-break:normal!important;hyphens:none!important;line-height:1.45!important;font-size:calc(.9rem * var(--rd-font))!important}
body.reading-app>main #figure-043 th{background:#15324a!important;color:#fff!important;font-weight:800!important}
body.reading-app>main #figure-043 td{color:#193549!important;background:#fff!important;border-top:1px solid #e2eaed!important}
}
