/* One full-width exhibit; anatomy is explained on the model, mechanisms beside it. */
.organelle-atlas .atlas-header{padding:24px 28px 8px;align-items:center}
.organelle-atlas .atlas-header h1{font-size:clamp(30px,3.4vw,44px)}
.organelle-atlas .sub{font-size:14px;max-width:65ch;margin-top:8px}
.organelle-atlas #crumb{padding-bottom:8px}
.organelle-atlas .atlas-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px}
.organelle-atlas.cell-3d-active #stage{height:var(--atlas-stage-height,clamp(500px,calc(100dvh - 210px),900px));min-height:0;aspect-ratio:auto;border-radius:10px}
.organelle-atlas #cell-stage{inset:60px 0 26px}
.organelle-atlas.cell-3d-active.organelle-selected:not(.mechanisms-mode) #stage{min-height:var(--bubble-stage-min,860px)}
.organelle-atlas #cell-viewer .cell-toolbar{top:12px;left:18px;right:18px}
.organelle-atlas #cell-viewer #organelle-select{font-size:13px;width:280px;max-width:50%;height:40px}
.organelle-atlas #cell-viewer .cell-actions button{font-size:12px;min-height:40px}
.organelle-atlas.cell-3d-active #zone-navigation{display:none}
.organelle-atlas #panel[hidden]{display:none}
.organelle-atlas.mechanisms-mode .atlas-layout{grid-template-columns:minmax(0,1fr) 360px;align-items:start}
.organelle-atlas.mechanisms-mode #panel{margin-top:46px;max-height:var(--atlas-stage-height,680px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:22px}
.organelle-atlas #panel h2{font-size:27px}
.organelle-atlas .topic-search{margin-top:16px;padding-bottom:12px}
.organelle-atlas .topic-search-status{font-size:12px}
.organelle-atlas .mechanism-group h3{font-size:13px;line-height:1.4;font-weight:600;margin:22px 0 8px;color:var(--muted)}
.organelle-atlas .card.has-film{grid-template-columns:80px minmax(0,1fr);gap:12px;padding:14px 0}
.organelle-atlas .card-media,.organelle-atlas .card-thumb{width:80px}
.organelle-atlas .card-thumb{height:45px}
.organelle-atlas .card .nm{font-size:14px}
.organelle-atlas .card .one{font-size:12px;margin-top:5px}
.organelle-atlas .topic-kind{display:none}
.organelle-atlas .mechanism-start{font-size:14px;margin-top:22px}
.organelle-atlas .mechanism-start p{margin-top:20px;font-weight:600}
.organelle-atlas .mechanism-start span{display:block;color:var(--muted);font-size:13px;margin-top:5px}
#cell-viewer .organelle-bubble{position:absolute;left:50%;top:70px;width:min(340px,calc(100% - 24px));padding:18px 22px;border:1px solid #607c92;border-radius:16px;background:#102a40f5;color:#e6eff7;box-shadow:0 12px 38px #0005;z-index:4;font-family:"Segoe UI",Arial,sans-serif;visibility:hidden}
#cell-viewer .organelle-bubble h2{font:400 26px/1.15 Georgia,serif;letter-spacing:-.02em;color:#fff}
#cell-viewer #organelle-reference{display:block;color:#b5cfdf;font-size:11px;margin-top:10px;text-underline-offset:3px}
#cell-viewer #organelle-mechanisms{margin-top:12px;width:100%;padding:10px;border:1px solid #a5c4d8;border-radius:5px;background:#dceaf3;color:#09213a;font-size:13px;min-height:44px}
.organelle-atlas .atlas-footer{margin-top:0;font-size:12px;padding:14px 0}
.organelle-atlas dialog{width:min(1420px,calc(100% - 32px))}
.organelle-atlas .mechanism-pair{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:28px;align-items:start}
.organelle-atlas .mechanism-pair .film{margin:0}
.organelle-atlas .mechanism-explanation p:first-child{margin-top:30px!important}
.organelle-atlas .mechanism-explanation p{font-size:15px!important;line-height:1.65!important}
.organelle-atlas .mechanism-explanation .detail-intro{font-size:19px!important}
.organelle-atlas #atlas-shell:fullscreen{background:var(--bg);overflow:auto;width:100%;height:100%;--atlas-stage-height:calc(100dvh - 190px)}
.organelle-atlas #atlas-shell:fullscreen #stage{height:calc(100dvh - 190px)}
.organelle-atlas #atlas-shell:fullscreen #panel{max-height:calc(100dvh - 190px)}
.organelle-atlas #atlas-shell:fullscreen .atlas-footer{display:none}
@media(max-width:1050px){
  .organelle-atlas.mechanisms-mode .atlas-layout{grid-template-columns:minmax(0,1fr) 310px;gap:16px}
  .organelle-atlas.mechanisms-mode #panel{padding:18px}
  .organelle-atlas .mechanism-pair{grid-template-columns:1fr}
  .organelle-atlas .mechanism-explanation p:first-child{margin-top:0!important}
}
@media(max-width:760px){
  .organelle-atlas .atlas-header{padding:20px 16px 4px;gap:16px}
  .organelle-atlas #crumb{padding:8px 16px}
  .organelle-atlas .atlas-layout,.organelle-atlas.mechanisms-mode .atlas-layout{grid-template-columns:1fr;padding:0 12px 16px}
  .organelle-atlas.mechanisms-mode #panel{margin-top:0;max-height:none;overflow:visible}
  .organelle-atlas.cell-3d-active #stage{height:520px}
  .organelle-atlas.organelle-selected:not(.mechanisms-mode) #stage{height:680px}
  #cell-viewer .organelle-bubble{padding:16px}
  .organelle-atlas #cell-stage{inset:106px 0 26px}
  .organelle-atlas #cell-viewer .cell-toolbar{flex-wrap:wrap;gap:6px;left:12px;right:12px}
  .organelle-atlas #cell-viewer #organelle-select{width:100%;max-width:none}
  .organelle-atlas #cell-viewer .cell-actions{width:100%;justify-content:flex-end}
  .organelle-atlas #atlas-shell:fullscreen #stage{height:520px}
  .organelle-atlas.organelle-selected:not(.mechanisms-mode) #atlas-shell:fullscreen #stage{height:680px}
  .organelle-atlas #atlas-shell:fullscreen #panel{max-height:none}
}
#cell-viewer #organelle-connector{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;overflow:hidden}
#cell-viewer #organelle-connector[hidden]{display:none}
#organelle-connector line{stroke:#b5cfdf;stroke-width:1.5}
#organelle-connector circle{fill:#e5f4ff;stroke:#102a40;stroke-width:2;paint-order:stroke;stroke-opacity:.6}
#cell-viewer .organelle-facts{margin:12px 0 0;display:grid;gap:9px;font-size:13px;line-height:1.45}
#cell-viewer .organelle-facts>div{display:grid;grid-template-columns:60px minmax(0,1fr);gap:10px}
#cell-viewer .organelle-facts dt{color:#abc4d7}
#cell-viewer .organelle-facts dd{margin:0;color:#e6eff7}

/* The exhibit fills its frame; only the two exploration modes float over the cell. */
html:has(body.organelle-atlas),body.organelle-atlas{background:#031326}
.organelle-atlas #atlas-shell{position:relative;min-height:0;background:#031326}
.organelle-atlas .atlas-header{position:absolute;top:16px;right:16px;z-index:8;padding:0;gap:0}
.organelle-atlas .atlas-header .controls{width:auto}
.organelle-atlas .atlas-header .seg{border-color:#496177;background:#102a40;box-shadow:0 4px 18px #0003}
.organelle-atlas .atlas-header .seg button{color:#bfd1e0;background:transparent}
.organelle-atlas .atlas-header .seg button.on{background:#dceaf3;color:#09213a}
.organelle-atlas .atlas-layout,.organelle-atlas.mechanisms-mode .atlas-layout{padding:0;gap:0;margin:0}
.organelle-atlas #stage,.organelle-atlas.cell-3d-active #stage{border:0;border-radius:0;height:var(--atlas-stage-height,100dvh);aspect-ratio:auto;min-height:500px}
.organelle-atlas #cell-stage{inset:0}
.organelle-atlas.mechanisms-mode #panel{margin:72px 16px 16px;max-height:calc(var(--atlas-stage-height,100dvh) - 88px)}
@media(max-width:760px){
  .organelle-atlas .atlas-header{top:12px;right:12px}
  .organelle-atlas.mechanisms-mode #panel{margin:12px;max-height:none}
}
.organelle-atlas #atlas-shell>.sr-only{top:0;left:0}
.organelle-atlas.organelle-selected:not(.mechanisms-mode) #stage{height:var(--atlas-stage-height,100dvh)}

/* Mechanisms float above the unchanged canvas; switching modes never changes its bounds. */
.organelle-atlas .atlas-layout,.organelle-atlas.mechanisms-mode .atlas-layout{position:relative;grid-template-columns:minmax(0,1fr)}
.organelle-atlas.mechanisms-mode #panel{position:absolute;z-index:6;top:72px;right:16px;bottom:16px;width:360px;max-width:calc(100% - 32px);max-height:none;margin:0;overflow-y:auto;box-shadow:0 12px 38px #0005}
.organelle-atlas.cell-3d-active.organelle-selected #stage{min-height:var(--bubble-stage-min,750px)}
.organelle-atlas #cell-back{position:absolute;top:16px;left:16px;z-index:8;min-height:44px;padding:8px 14px;border:1px solid #496177;border-radius:5px;background:#102a40;color:#dceaf3;font-size:13px;box-shadow:0 4px 18px #0003}
.organelle-atlas #cell-back[hidden]{display:none}
@media(max-width:760px){
  .organelle-atlas #cell-back{top:12px;left:12px;padding:8px 10px;font-size:12px}
  .organelle-atlas .atlas-header .seg button{padding:8px 10px;font-size:12px}
  .organelle-atlas.mechanisms-mode #panel{top:72px;right:12px;bottom:12px;width:310px;max-width:calc(100% - 24px);max-height:calc(100% - 84px);margin:0;overflow-y:auto}
}

/* Keep the mechanism drawer to its search field and film titles. */
.organelle-atlas #panel .topic-search{position:relative;margin-top:0;padding-bottom:12px;border-bottom:0}
.organelle-atlas #panel .topic-search label.sr-only{margin:0}
.organelle-atlas #panel .topic-search-status.sr-only{top:0;left:0;margin:0}
.organelle-atlas #panel .card.has-film{align-items:center}
.organelle-atlas #panel .search-results-list{margin-top:0}
.organelle-atlas #panel .search-results-list .card{padding:14px 0}
/* A topic floats over the exhibit with two equal media columns. */
.organelle-atlas #lightbox{position:fixed;inset:auto;max-width:none;max-height:none;border:0;border-radius:10px;margin:0;overflow:auto;background:#fff;box-shadow:0 20px 70px #0006}
.organelle-atlas #lb-box{display:flex;flex-direction:column;padding:22px 28px;box-sizing:border-box}
.organelle-atlas #lb-title{font-size:clamp(26px,3vw,40px);margin:0 58px 0 0}
.organelle-atlas #lb-content{display:flex;flex-direction:column;gap:20px;margin-top:20px;min-height:0}
.organelle-atlas .mechanism-pair{display:grid;grid-template-columns:minmax(0,1fr) 1px minmax(0,1fr);column-gap:24px;row-gap:12px;align-items:center}
.organelle-atlas .mechanism-pair::before{content:"";grid-column:2;grid-row:1/3;align-self:stretch;background:var(--line)}
.organelle-atlas .mechanism-pair .film,.organelle-atlas .mechanism-pair .original-figure{margin:0;padding:0;border:0;border-radius:0;background:transparent;min-width:0}
.organelle-atlas .mechanism-pair .film{grid-column:1;grid-row:2}
.organelle-atlas .mechanism-pair .original-figure{display:contents}
.organelle-atlas .mechanism-figure-title{grid-column:3;grid-row:1;font-size:16px;font-weight:600;line-height:1.4;color:var(--ink)}
.organelle-atlas .mechanism-pair .original-figure-link{grid-column:3;grid-row:2;min-width:0}
.organelle-atlas .mechanism-pair .film-player{object-fit:contain;border-radius:0;width:100%;height:auto}
.organelle-atlas .mechanism-pair .original-figure-image{width:100%;height:auto;object-fit:contain}
.organelle-atlas #lb-content .evidence{margin-top:0;max-width:none;padding-top:12px}
.organelle-atlas #lb-content .evidence li{font-size:12px}
#cell-viewer #organelle-mechanisms{min-height:34px;padding:6px 10px;margin-top:10px}
.organelle-atlas.mechanisms-mode #panel{top:16px}
@media(max-width:600px){
  .organelle-atlas #lb-box{padding:18px 14px}
  .organelle-atlas .mechanism-pair{grid-template-columns:1fr;gap:16px}
  .organelle-atlas .mechanism-pair::before{display:none}
  .organelle-atlas .mechanism-pair .film{grid-column:1;grid-row:1}
  .organelle-atlas .mechanism-figure-title{grid-column:1;grid-row:2;border-top:1px solid var(--line);padding-top:18px}
  .organelle-atlas .mechanism-pair .original-figure-link{grid-column:1;grid-row:3}
  .organelle-atlas #lb-content{gap:18px}
  .organelle-atlas.mechanisms-mode #panel{top:72px}
}
