/* Chapter 2 display layer. Original Canvas/SVG renderers and asset files are unchanged. */
body.bio-compact-v2 .wrap{width:100%;max-width:1080px;margin:0 auto}
body.bio-compact-v2 .floating-lang-container{border-radius:999px;gap:4px;padding:5px 7px;z-index:19000}
body.bio-compact-v2 .floating-lang-container .lang-btn{border-radius:999px;min-height:44px;padding:5px 10px}
body.bio-compact-v2 :is(.bio2-controls,.bio2-head-tools,.molecule-tools,.lab-options,.bio2-hierarchy .org-hierarchy-tools) :is(button,select){font-size:17px;line-height:1.35;min-height:44px;min-width:44px;padding:6px 9px;max-width:100%;white-space:normal}
body.bio-compact-v2 :is(.bio2-controls,.molecule-tools,.lab-options) :is(label,select){font-size:17px;line-height:1.4}
body.bio-compact-v2 .bio2-bench{display:grid;grid-template-columns:minmax(0,1fr);gap:0;min-width:0}
.bio2-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;border-bottom:1px solid var(--rule);position:relative;z-index:10;isolation:isolate;background:var(--bg-deep,#11261f)}
body.bio-compact-v2 .bio2-head h3{font-size:19px;line-height:1.4;flex:1 1 210px;margin:0;color:var(--teal)}
.bio2-head-tools{display:flex;flex-wrap:wrap;gap:6px;position:relative;z-index:11}
body.bio-compact-v2 .bio2-head-tools button{cursor:pointer;touch-action:manipulation}
body.bio-compact-v2 .bio2-controls{padding:10px 12px;min-height:0;min-width:0;border-bottom:1px solid var(--rule)}
.bio2-toolbar{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 12px;min-width:0}
.bio2-control-group{flex:1 1 170px;min-width:0;max-width:100%;display:flex;flex-direction:column;gap:4px}
body.bio-compact-v2 .bio2-group-label{font-size:15px;line-height:1.35;color:var(--muted);font-weight:700;margin:0}
body.bio-compact-v2 .bio2-controls :is(.control-row,.lab-options,.org-options){display:flex;flex-wrap:wrap;gap:6px;margin:0}
body.bio-compact-v2 .bio2-controls :is(.control-row,.lab-options,.org-options) button{flex:1 1 auto}
body.bio-compact-v2 .bio2-controls .lab-control{margin:0}
body.bio-compact-v2 .bio2-controls .lab-control label{font-size:16px;margin:0 0 4px}
body.bio-compact-v2 .bio2-controls :is(input,select){width:100%;min-height:44px;margin:0;font-size:17px}
body.bio-compact-v2 .bio2-view{padding:12px;display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0}
.bio2-media{width:100%;min-width:0;min-height:0;display:flex;flex-direction:column;align-items:center;gap:8px}
body.bio-compact-v2 .bio2-media :is(canvas,.org-photo){display:block;width:100%;height:auto;max-height:none;margin:0;flex:0 0 auto;aspect-ratio:var(--ar)}
body.bio-compact-v2 .bio2-media .org-photo{display:grid}
.bio2-caption{width:100%;min-width:0;border-left:4px solid var(--teal);border-radius:8px;background:var(--bg-card,#1c3d34);padding:12px 14px}
body.bio-compact-v2 .bio2-caption :is(p,figcaption,.status,.lab-caption,.org-caption){font-size:22px;line-height:1.6;margin:6px 0;min-height:0}
body.bio-compact-v2 .bio2-caption :is(h3,strong){font-size:24px;line-height:1.4;color:var(--yellow)}
body.bio-compact-v2 .bio2-caption :is(.status,.org-function,.tool-result){margin:0;padding:8px 0;border:0;background:transparent}
body.bio-compact-v2 .bio2-caption .org-function strong{margin:0}
body.bio-compact-v2 .bio2-caption .org-tag{font-size:16px;line-height:1.5}
body.bio-compact-v2 .bio2-caption .readouts{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
body.bio-compact-v2 .bio2-caption .readout{padding:6px 10px;font-size:17px;line-height:1.5;flex:1 1 150px}
body.bio-compact-v2 .bio2-caption .readout :is(b,strong){display:inline;font-size:22px;margin-left:6px}
body.bio-compact-v2 .bio2-caption .equivalence{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}
body.bio-compact-v2 .bio2-caption .unit-value{font-size:20px;line-height:1.4;padding:6px 8px}
body.bio-compact-v2 .bio2-caption :is(.photo-credit,.org-credit,.credit){font-size:16px;line-height:1.5;color:var(--muted);margin:6px 0}
body.bio-compact-v2 .bio2-caption .tool-comparisons{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}
body.bio-compact-v2 .bio2-caption .tool-option{padding:8px;gap:4px;font-size:17px;min-height:44px;line-height:1.5}
body.bio-compact-v2 .bio2-caption .tool-option strong{font-size:17px}
body.bio-compact-v2 .bio2-caption .tool-result.matched h3{color:var(--green)}
body.bio-compact-v2 .bio2-caption .tool-result.mismatch h3{color:var(--orange)}
.bio2-help{border-top:1px dashed var(--rule);padding-top:4px;margin-top:8px}
body.bio-compact-v2 .bio2-help summary{font-size:16px;line-height:1.5;min-height:44px;padding:10px 0;color:var(--teal);cursor:pointer}
body.bio-compact-v2 .bio2-help-body :is(p,span){font-size:17px;line-height:1.5;margin:6px 0}
body.bio-compact-v2 .bio2-photo-slot{width:100%;min-width:0;min-height:0;display:flex;justify-content:center;flex:0 0 auto}
body.bio-compact-v2 .bio2-media .bio2-photo-card{width:100%;max-width:none;margin:0;padding:0;border:0;flex:0 0 auto}
body.bio-compact-v2 .bio2-media-switch{display:none;gap:6px;flex-wrap:wrap}
body.bio-compact-v2 .bio2-full-view-group{display:none}
body.bio-compact-v2 .bio2-photo-caption h3{font-size:19px;line-height:1.4;margin:8px 0}
/* Fullscreen retains a small left rail, a large right figure and a separate scrollable caption. */
body.bio-compact-v2 .bio2-bench.is-expanded{display:grid;grid-template-columns:244px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:8px 12px;width:100%;height:100vh;height:100dvh;max-width:none;padding:10px;overflow:hidden}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-head{grid-column:1/-1;grid-row:1;min-height:54px;padding:4px var(--bio2-lang-clearance,180px) 8px 0}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-controls{grid-column:1;grid-row:2;overflow:auto;overscroll-behavior:contain;padding:8px;border:1px solid var(--rule);border-radius:10px;touch-action:pan-y}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-toolbar{flex-direction:column;gap:10px}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-controls :is(.control-row,.lab-options,.org-options){display:flex;flex-wrap:wrap;gap:6px}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-control-group{flex:0 0 auto;width:100%}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-view{grid-column:2;grid-row:2;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;height:100%;overflow:hidden;padding:0}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-media{height:100%;justify-content:center;overflow:hidden}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-media :is(canvas,.org-photo){width:min(100%,calc(var(--bio2-media-h,380px) * var(--ar)));max-height:var(--bio2-media-h,380px);height:auto}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-caption{max-height:min(27dvh,220px);min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 10px}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-photo-slot{flex:0 0 auto;width:min(100%,calc(var(--bio2-media-h,380px) * 1.6))}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-photo-card{max-width:100%;max-height:none}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-photo-card .photo-window{aspect-ratio:1.6;height:auto;min-height:0;max-height:var(--bio2-media-h,380px)}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-media-switch{display:flex}
body.bio-compact-v2 .bio2-bench.is-expanded .bio2-full-view-group{display:flex}
body.bio-compact-v2 #travelLab.is-expanded[data-bio2-view=ruler] .bio2-photo-slot{display:none}
body.bio-compact-v2 #travelLab.is-expanded[data-bio2-view=photo] .bio2-media canvas{display:none}
body.bio-compact-v2 .bio2-hierarchy{padding:12px;gap:10px}
body.bio-compact-v2 .bio2-hierarchy .org-hierarchy-toolbar{gap:8px}
body.bio-compact-v2 .bio2-hierarchy .org-hierarchy-toolbar h3{font-size:19px;line-height:1.4;flex:1 1 240px}
body.bio-compact-v2 .bio2-hierarchy.is-expanded .org-hierarchy-toolbar{padding-right:180px}
body.bio-compact-v2 .bio2-hierarchy .org-hierarchy-tools{gap:6px}
body.bio-compact-v2 .bio2-hierarchy .org-focus-copy button{font-size:17px;padding:6px 10px;min-height:44px}
@media(max-aspect-ratio:1/1){
 body.bio-compact-v2 .bio2-bench.is-expanded{grid-template-columns:minmax(0,1fr);grid-template-rows:auto clamp(130px,20dvh,220px) minmax(0,1fr)}
 body.bio-compact-v2 .bio2-bench.is-expanded .bio2-head{grid-column:1;grid-row:1}
 body.bio-compact-v2 .bio2-bench.is-expanded .bio2-controls{grid-column:1;grid-row:2}
 body.bio-compact-v2 .bio2-bench.is-expanded .bio2-view{grid-column:1;grid-row:3}
 body.bio-compact-v2 .bio2-bench.is-expanded .bio2-toolbar{flex-direction:row}
 body.bio-compact-v2 .bio2-bench.is-expanded .bio2-control-group{flex:1 1 190px;width:auto}
}
@media(max-width:600px){body.bio-compact-v2 .bio2-caption .equivalence{grid-template-columns:repeat(2,minmax(0,1fr))}body.bio-compact-v2 .bio2-caption .tool-comparisons{grid-template-columns:1fr}}
@media(max-width:480px){body.bio-compact-v2 .bio2-bench.is-expanded .bio2-head{padding-right:0;padding-top:62px}body.bio-compact-v2 .bio2-hierarchy.is-expanded .org-hierarchy-toolbar{padding-right:0;padding-top:62px}}
