/* Two scientific workspaces: the colour belongs to the subject, the data to the model. */
body.studio-page[data-science-subject="biology"]{--lab-ink:#17372e;--lab-muted:#466c60;--lab-rule:#c0d9d0;--lab-paper:#f9fcfa;--lab-accent:#176d5b;background:#eaf4ef}
body.studio-page[data-science-subject="chemistry"]{--lab-ink:#40301e;--lab-muted:#75634d;--lab-rule:#e2d5bf;--lab-paper:#fffdfa;--lab-accent:#91632f;background:#f5f1e8}

/* Subject diagrams are separate, noninteractive flex items in the heading.
   They cannot sit on top of copy, controls, labels, the table or the canvas. */
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading{
 display:flex;align-items:center;justify-content:space-between;gap:22px;
 min-height:144px;margin-bottom:24px;padding:22px 28px;
 border:1px solid var(--lab-rule);border-left:4px solid var(--lab-accent);border-radius:10px;
 background:var(--lab-paper);color:var(--lab-ink);overflow:visible;
}
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading>div:first-child{flex:1 1 380px;min-width:0}
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading h1{color:var(--lab-ink);font-size:clamp(31px,3vw,43px);line-height:1.1;letter-spacing:-.045em;margin:0 0 10px}
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading p{color:var(--lab-muted);font-size:15px;line-height:1.65;max-width:680px}
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading .science-kicker{display:block;margin-bottom:10px;color:var(--lab-accent);font-size:11px;font-weight:600;letter-spacing:.08em}
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading::after{
 content:"";display:block;flex:0 0 clamp(145px,15vw,225px);align-self:stretch;min-height:112px;
 background-repeat:no-repeat;background-position:center;background-size:contain;pointer-events:none;order:3
}
body.studio-page[data-science-subject="biology"] .science-heading::after{background-image:url('/assets/subject-backdrops/biology.svg')}
body.studio-page[data-science-subject="chemistry"] .science-heading::after{background-image:url('/assets/subject-backdrops/chemistry.svg')}
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) :is(.science-panel,.organ-detail,.organ-index){border-color:var(--lab-rule);border-radius:10px;box-shadow:none}
body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) :focus-visible{outline:3px solid var(--lab-accent);outline-offset:3px}

/* Biology: a restrained specimen viewer and a legible structure notebook. */
body.studio-page[data-science-subject="biology"] .cell-type-switch{gap:6px;padding:5px;border:1px solid #c4ded3;border-radius:8px;background:#e8f3ed}
body.studio-page[data-science-subject="biology"] .cell-type-switch .pill-button{min-height:42px;border:0;border-radius:5px;padding:9px 14px;background:transparent;color:#386457}
body.studio-page[data-science-subject="biology"] .cell-type-switch .pill-button[aria-pressed="true"]{background:#1d6a55;color:#fff}
body.studio-page[data-science-subject="biology"] .cell-layout{gap:20px}
body.studio-page[data-science-subject="biology"] .science-panel.cell-workspace{background:#132630;color:#e8f3f1;border:1px solid #263f48}
body.studio-page[data-science-subject="biology"] .cell-toolbar{padding:16px 20px;border-bottom:1px solid #36504f;background:#17303a}
body.studio-page[data-science-subject="biology"] .cell-type-label{color:#e0f1e9;font-weight:600;letter-spacing:.01em}
body.studio-page[data-science-subject="biology"] .cell-tool{min-height:40px;border-radius:5px;border-color:#49655f;background:#213d42;color:#d8ebe5}
body.studio-page[data-science-subject="biology"] .cell-tool[aria-pressed="true"]{background:#315e50;border-color:#77a99a;color:#effff1}
body.studio-page[data-science-subject="biology"] .cell-tool:disabled{opacity:.48}
body.studio-page[data-science-subject="biology"] .cell-controls{background:#17303a;border-top-color:#36504f}
body.studio-page[data-science-subject="biology"] .cell-controls p{color:#b7d2c9}
body.studio-page[data-science-subject="biology"] .cell-sidebar{background:#fff;border-color:#c0d9d0}
body.studio-page[data-science-subject="biology"] .organelle-detail{padding:26px 24px 18px}
body.studio-page[data-science-subject="biology"] .organelle-title h2{color:#17372e;font-size:30px;letter-spacing:-.04em}
body.studio-page[data-science-subject="biology"] .organelle-function{color:#227c64;font-weight:600}
body.studio-page[data-science-subject="biology"] .organelle-description{color:#365b50;line-height:1.75}
body.studio-page[data-science-subject="biology"] .organelle-observe{background:#eaf6ee;border-left:3px solid #55a98a;color:#476e5e;padding:12px 14px}
body.studio-page[data-science-subject="biology"] .organelle-index{border-top:1px solid #d2e4da;background:#f7fbf8;padding:20px 18px}
body.studio-page[data-science-subject="biology"] .organelle-index h2{color:#416c5e;font-size:14px;font-weight:600}
body.studio-page[data-science-subject="biology"] .organelle-item{min-height:42px;color:#496d60;border-radius:5px}
body.studio-page[data-science-subject="biology"] .organelle-item[aria-pressed="true"]{background:#d6eee1;color:#165e46;border-color:#a6d5bd}
body.studio-page[data-science-subject="biology"] .cell-note{border-top:1px solid #c4dcd0;margin-top:22px;padding:20px 4px 0}
body.studio-page[data-science-subject="biology"] .cell-note :is(h2,p){color:#537566}
body.studio-page[data-science-subject="biology"] .anatomy-panel .science-toolbar{background:#1a5143;border-bottom-color:#1a5143;color:#f2faf5}
body.studio-page[data-science-subject="biology"] .anatomy-panel .science-toolbar h2{color:#f2faf5}
body.studio-page[data-science-subject="biology"] .organ-detail{background:#fff}
body.studio-page[data-science-subject="biology"] .organ-detail h2{color:#17372e}
body.studio-page[data-science-subject="biology"] .organ-index-item[aria-pressed="true"]{background:#d8eee0;color:#185e46}

/* Chemistry: preserve the categorised tile colours and the table's scroll area. */
body.studio-page[data-science-subject="chemistry"] .science-count{flex:0 0 auto;min-width:104px;padding:13px 18px;border-left:1px solid #e2d5bf;color:#806b51}
body.studio-page[data-science-subject="chemistry"] .science-count b{color:#895d2e;font-size:36px;font-weight:500;line-height:1;text-align:left}
body.studio-page[data-science-subject="chemistry"] .science-count span{display:block;margin-top:5px;font-size:12px}
body.studio-page[data-science-subject="chemistry"] .science-main>.science-panel{background:#fffdfa;border:1px solid #e2d5bf;border-radius:10px}
body.studio-page[data-science-subject="chemistry"] .science-toolbar{padding:20px 24px;background:#f8f2e7;border-bottom:1px solid #e9dcc8}
body.studio-page[data-science-subject="chemistry"] .periodic-axis-key strong{color:#70502f}
body.studio-page[data-science-subject="chemistry"] .periodic-axis-key span{color:#816d54}
body.studio-page[data-science-subject="chemistry"] .science-tag{border-color:#ddceb8;background:#fffdfa;color:#765e3f}
body.studio-page[data-science-subject="chemistry"] .table-scroll{padding:22px 22px 24px;scrollbar-color:#b59b77 #f5eee3}
body.studio-page[data-science-subject="chemistry"] .element-tile{border-radius:5px;transition:border-color .18s,box-shadow .18s}
body.studio-page[data-science-subject="chemistry"] .element-tile:hover{transform:none;box-shadow:0 0 0 2px #765a36;z-index:2}
body.studio-page[data-science-subject="chemistry"] .element-tile:focus-visible{transform:none;outline:3px solid #805323;outline-offset:2px;z-index:3}
body.studio-page[data-science-subject="chemistry"] .table-bottom{padding:16px 24px 22px;border-top:1px solid #eee2d1;background:#faf6ee}
body.studio-page[data-science-subject="chemistry"] .science-legend{gap:8px 18px;color:#75654f}
body.studio-page[data-science-subject="chemistry"] .chem-learning{gap:28px;margin-top:22px;padding:26px 28px;border:1px solid #e4d5bd;border-radius:9px;background:#f5ead7}
body.studio-page[data-science-subject="chemistry"] .chem-learning h2{margin:0 0 10px;color:#684927;font-size:23px;font-weight:500;letter-spacing:-.03em}
body.studio-page[data-science-subject="chemistry"] .chem-learning p{color:#6e614d;line-height:1.75}
body.studio-page[data-science-subject="chemistry"] .science-footer{color:#786e60}

@media(max-width:1000px){
 body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading::after{flex-basis:130px;min-height:100px}
}
@media(max-width:800px){
 body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading{min-height:0;padding:22px;gap:16px;flex-wrap:wrap}
 body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading::after{display:none}
 body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading>div:first-child{flex-basis:100%}
 body.studio-page[data-science-subject="biology"] .cell-type-switch{width:100%}
 body.studio-page[data-science-subject="biology"] .cell-type-switch .pill-button{flex:1}
 body.studio-page[data-science-subject="biology"] .cell-sidebar{max-height:none}
 body.studio-page[data-science-subject="chemistry"] .science-count{padding:0;border:0;min-width:0}
 body.studio-page[data-science-subject="chemistry"] .science-count b{font-size:26px}
}
@media(max-width:600px){
 body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading{padding:20px}
 body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading h1{font-size:31px;line-height:1.16}
 body.studio-page[data-science-subject="biology"] .cell-toolbar,body.studio-page[data-science-subject="biology"] .cell-controls{padding:12px}
 body.studio-page[data-science-subject="biology"] .cell-tool{min-height:40px;font-size:13px;padding:7px 8px}
 body.studio-page[data-science-subject="biology"] .organelle-detail{padding:22px 19px 16px}
 body.studio-page[data-science-subject="biology"] .organelle-title h2{font-size:26px}
 body.studio-page[data-science-subject="chemistry"] .science-toolbar{padding:17px}
 body.studio-page[data-science-subject="chemistry"] .table-scroll{padding:16px}
 body.studio-page[data-science-subject="chemistry"] .table-bottom{padding:16px}
 body.studio-page[data-science-subject="chemistry"] .chem-learning{grid-template-columns:1fr;gap:20px;padding:22px}
}
@media(prefers-reduced-motion:reduce){body.studio-page[data-science-subject="chemistry"] .element-tile{transition:none}}
@media print{body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]){background:#fff!important}body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading{background:#fff;border-color:#999}body.studio-page:is([data-science-subject="biology"],[data-science-subject="chemistry"]) .science-heading::after{display:none}}
