/* The atlas is a reading spread around one anatomical specimen. All controls stay local to this page. */
.brain-atlas{--paper:#f7f4ed;--ink:#203338;--muted:#465b5b;--rule:#c8c6bb;--accent:#87472f;--surface:#213137;--cream:#fffaf1;--focus:#32657d;background:var(--paper);color:var(--ink);font-family:"Atkinson Hyperlegible Next",system-ui,sans-serif;font-size:1.04rem;line-height:1.58}
.brain-atlas *, .brain-atlas *::before,.brain-atlas *::after{box-sizing:border-box}
.brain-atlas [hidden]{display:none!important}
.atlas-wrap{width:min(1260px,calc(100% - clamp(2.25rem,8vw,8rem)));margin-inline:auto}
.brain-atlas :is(h1,h2,h3,h4,p,figure,dl,ol){margin:0}
.brain-atlas :is(h1,h2,h3){color:inherit;font-family:Baskervville,Georgia,serif;font-weight:400;letter-spacing:-.032em;line-height:1.06}
.brain-atlas :is(h1,h2,h3) em{font-weight:400;color:var(--accent)}
.brain-atlas h4,.brain-atlas label{font:650 .94rem/1.4 "Atkinson Hyperlegible Next",system-ui,sans-serif;letter-spacing:0}
.brain-atlas a{color:inherit;text-underline-offset:.24em;text-decoration-thickness:1px}
.brain-atlas a:hover,.brain-atlas summary:hover{color:var(--accent)}
.brain-atlas button,.brain-atlas select{font:inherit;color:inherit}
.brain-atlas button{cursor:pointer}
.brain-atlas button:disabled{opacity:.45;cursor:default}
.brain-atlas :focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.brain-atlas :is([id],details){scroll-margin-top:6rem}
.brain-atlas ::selection{background:#efd59b;color:var(--ink)}
.atlas-symbols{position:absolute;width:0;height:0;overflow:hidden}
.atlas-opening{display:grid;grid-template-columns:1.03fr 1fr;gap:6%;align-items:end;padding-block:clamp(1.6rem,4vw,3.35rem) clamp(1.6rem,3.25vw,3rem)}
.atlas-opening h1{font-size:clamp(3.15rem,5.7vw,5.45rem);line-height:.98}
.atlas-opening>div{max-width:55ch;padding-bottom:.15em}
.atlas-opening p,.atlas-section-intro>p{font-size:clamp(1.06rem,1.47vw,1.28rem);line-height:1.5}
.atlas-opening nav,.atlas-further nav{display:flex;flex-wrap:wrap;gap:.55rem 1.25rem;margin-top:.9rem}
.atlas-opening nav a,.atlas-further nav a,.atlas-note-actions a,.atlas-dossier,.atlas-method a{font-size:.95rem;font-weight:600}
.atlas-lab{padding-top:1.12rem;border-top:1px solid var(--rule)}
.atlas-lab>h2{font-size:clamp(1.45rem,2.15vw,2.1rem);margin-bottom:1rem}
.atlas-spread{display:grid;grid-template-columns:minmax(0,2.36fr) minmax(245px,1fr);align-items:start;gap:clamp(1.35rem,3.4vw,3.75rem)}
.atlas-figure{min-width:0}
.atlas-mode{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#e8e7df;border:1px solid var(--rule);border-radius:8px 8px 0 0;overflow:clip}
.atlas-mode button{display:inline-flex;gap:.5rem;align-items:center;justify-content:center;padding:.64rem .35rem;min-height:48px;font-size:.9rem;line-height:1.23;background:transparent;border:0;border-inline-end:1px solid #cbc9bf;color:var(--ink)}
.atlas-mode button:last-child{border-inline-end:0}
.atlas-mode button[aria-pressed=true]{background:var(--ink);color:#fff9ec}
.atlas-mode button:hover:not([aria-pressed=true]){background:#f3eee1}
.atlas-mode button:focus-visible{outline-offset:-4px}
.atlas-mode svg,.atlas-tools svg{width:1.25rem;height:1.25rem;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none}
.atlas-stage{position:relative;isolation:isolate;background:var(--surface);overflow:hidden;border-radius:6px;aspect-ratio:1.78;min-height:235px;max-height:590px}
.atlas-mode:not([hidden])+.atlas-stage{border-radius:0 0 6px 6px}
.atlas-stage>img,.atlas-stage>canvas{display:block;width:100%;height:100%;position:absolute;inset:0}
.atlas-stage>img{object-fit:contain}
.atlas-stage>canvas{touch-action:pan-y pinch-zoom;cursor:grab}
.atlas-stage>canvas:active{cursor:grabbing}
.atlas-stage>canvas:focus-visible{outline:3px solid #f3da9c;outline-offset:-5px}
.atlas-angle-badge{position:absolute;inset:.8rem auto auto .9rem;font-size:.78rem;letter-spacing:.045em;color:#f2e6cb;padding:.12rem .45rem;background:#213137ed;border-radius:3px;pointer-events:none}
.atlas-tools{position:absolute;right:.75rem;top:.65rem;display:flex;gap:2px;border:1px solid #647276;background:#213137ed;border-radius:5px}
.atlas-tools button{min-width:35px;min-height:36px;display:grid;place-items:center;padding:.37rem;border:0;color:#fff9ec;background:none}
.atlas-tools button:hover{background:#405458}
.atlas-tools button:focus-visible,.atlas-pin:focus-visible{outline-color:#f7d787}
.atlas-pins{position:absolute;inset:0;pointer-events:none}
.atlas-pin{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;min-width:25px;height:25px;line-height:22px!important;padding:0 3px;border-radius:50%;border:1px solid #fbf4dd;background:#22363af2;color:white!important;font-weight:650!important;font-size:.82rem!important;font-variant-numeric:tabular-nums;box-shadow:0 1px 3px #202e3a44}
.atlas-pin[aria-pressed=true]{color:#272d27!important;background:#ffe6a7;border-color:#fff4ce}
.atlas-key,.atlas-legend b,.atlas-story-links a span,.atlas-index{font-variant-numeric:tabular-nums}
.atlas-spread-control,.atlas-cameras,.atlas-legend{display:flex;align-items:center;gap:.55rem 1rem;flex-wrap:wrap}
.atlas-spread-control{padding:.65rem 0;border-bottom:1px solid var(--rule)}
.atlas-spread-control input{min-width:65px;flex:1;accent-color:#91583d;height:25px}
.atlas-spread-control output{width:3.25em;text-align:end;font-variant-numeric:tabular-nums}
.atlas-cameras{justify-content:space-between;border-bottom:1px solid var(--rule);padding:.38rem 0}
.atlas-cameras>div{display:flex;align-items:center;flex-wrap:wrap;gap:.1rem .25rem}
.atlas-cameras>div>span{font-size:.78rem;color:var(--muted);padding-inline-end:.35rem}
.atlas-cameras button,.atlas-legend button{border:0;background:transparent;min-height:36px;font-size:.89rem;border-radius:3px}
.atlas-cameras button{padding:.2rem .55rem}
.atlas-cameras button:hover,.atlas-legend button:hover,.atlas-cameras button[aria-pressed=true]{background:#e8e3d4}
.atlas-marker-switch::before{content:"";display:inline-block;background:var(--paper);border:1px solid currentColor;width:.65rem;height:.65rem;border-radius:50%;margin-right:.4rem}
.atlas-marker-switch[aria-pressed=true]::before{background:var(--ink)}
.atlas-legend{gap:.12rem .67rem;padding:.27rem 0}
.atlas-legend button{display:flex;align-items:center;gap:.38rem;padding:.12rem .3rem .12rem 0}
.atlas-legend b,.atlas-story-links a span,.atlas-key{display:inline-grid;place-items:center;border-radius:50%;background:#dfe6df;color:#183536;min-width:1.34rem;height:1.34rem;font:600 .78rem/1 system-ui,sans-serif}
.atlas-legend button[aria-pressed=true] b,.atlas-key{background:#f2d99b;color:#48371b}
.atlas-figure figcaption,.atlas-plates figcaption{font-size:.96rem;line-height:1.48}
.atlas-figure>figcaption{margin-top:.7rem;max-width:78ch}
.atlas-figure figcaption strong,.atlas-plates figcaption strong{margin-inline-end:.3em}
.atlas-gesture{font-size:.83rem;color:var(--muted);margin-top:.38rem!important}
.atlas-notes{padding:1rem 0 0;border-top:2px solid #526866}
.atlas-picker label{display:block;margin-bottom:.38rem}
.atlas-picker select{width:100%;min-height:44px;background:var(--cream);border:1px solid #85918a;border-radius:4px;padding:.4rem .65rem}
.atlas-region-heading{display:flex;align-items:baseline;gap:.58rem;margin-top:1.4rem}
.atlas-region-heading h3{font-size:clamp(1.7rem,2.6vw,2.65rem)}
.atlas-key{align-self:center;min-width:1.55rem;height:1.55rem;font-size:.86rem}
.atlas-location{color:var(--muted);font-size:.88rem;margin-top:.32rem!important}
.atlas-function{font-size:clamp(1.05rem,1.5vw,1.27rem);line-height:1.46;margin:1.05rem 0!important}
.atlas-notes h4,.atlas-story h4{margin:.85rem 0 .28rem}
.atlas-notes [data-current-observation]{font-size:.98rem}
.atlas-note-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1rem;margin:1rem 0}
.atlas-note-actions button{border:1px solid #82908a;border-radius:4px;background:transparent;padding:.45rem .67rem;font-size:.89rem}
.atlas-note-actions button[aria-pressed=true]{background:var(--ink);color:var(--cream)}
.brain-atlas summary{cursor:pointer}
.atlas-plates,.atlas-quick{margin:1.4rem 0 0;border-block:1px solid var(--rule)}
.atlas-plates summary,.atlas-quick summary,.atlas-method summary{padding:.8rem .1rem;font-weight:600;font-size:.96rem}
.atlas-plates-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.6rem;padding:0 0 1.3rem}
.atlas-plates img{display:block;width:100%;height:auto;border-radius:4px;margin-bottom:.5rem}
.atlas-stories,.atlas-reading,.atlas-method,.atlas-further{margin-top:clamp(2.8rem,5.8vw,5.5rem)}
.atlas-stories{background:#eae9e0;padding:clamp(2rem,4.8vw,4rem) 0}
.atlas-section-intro{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:6%;margin-bottom:1.5rem}
.atlas-section-intro h2,.atlas-method h2,.atlas-further h2{font-size:clamp(2.2rem,4.1vw,3.9rem)}
.atlas-section-intro>p{max-width:50ch}
.atlas-tabs{display:flex;flex-wrap:wrap;gap:.35rem 1.3rem;border-bottom:1px solid #aab4a9;margin-bottom:1.5rem}
.atlas-tabs a{position:relative;display:inline-block;padding:.65rem .14rem .7rem;text-decoration:none;font-weight:650;color:#344f50}
.atlas-tabs a[aria-current=true]{color:var(--accent);box-shadow:inset 0 -3px var(--accent)}
.atlas-story{display:grid;grid-template-columns:1.15fr 1fr;column-gap:clamp(2rem,6vw,6rem);row-gap:1.35rem;align-items:start}
.atlas-story+.atlas-story:not([hidden]){margin-top:2.1rem}
.atlas-story-main>h3{font-size:clamp(1.85rem,3vw,2.9rem);max-width:25ch}
.atlas-scene{font-family:Baskervville,Georgia,serif;font-size:clamp(1.27rem,1.75vw,1.55rem);line-height:1.48;margin:.85rem 0!important}
.atlas-schema{border:1px solid #c5c3b4;background:#faf7ef;padding:clamp(1rem,2.2vw,2rem);border-radius:5px}
.atlas-diagram{display:block;width:100%;height:auto;max-height:185px;border-bottom:1px solid #cecdc0;margin:0 0 .7rem;padding-bottom:.7rem}
.atlas-diagram__path{fill:none;stroke:#48686b;stroke-width:2}
.atlas-diagram__node{fill:#eeddb9;stroke:#85563b;stroke-width:1.8}
.atlas-diagram__mark{fill:none;stroke:#38565b;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.atlas-diagram__text{fill:#253f43;text-anchor:middle;font:600 14px/1 system-ui,sans-serif}
.atlas-schema h4{margin:0 0 .45rem}
.atlas-schema dl>div{display:grid;grid-template-columns:minmax(85px,.63fr) 1.37fr;gap:.7rem;padding:.32rem 0}
.atlas-schema dt{font-weight:600}
.atlas-schema dd{margin:0;color:var(--muted)}
.atlas-evidence,.atlas-story-links{border-top:1px solid #b8c0b5;padding-top:.6rem}
.atlas-cites{display:flex;flex-wrap:wrap;gap:.3rem .9rem;margin-top:.45rem!important;font-size:.85rem;color:#425e62}
.atlas-story-links>div{display:flex;gap:.4rem 1rem;flex-wrap:wrap;margin:.65rem 0}
.atlas-story-links a{font-size:.95rem}
.atlas-story-links a span{margin-right:.13rem}
.atlas-quick{margin-bottom:1.1rem}
.atlas-face{margin-top:0;border-top:0}
.atlas-face ol{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:1.1rem 2.4rem;padding:.4rem 1.5rem}
.atlas-face ol strong{display:block}
.atlas-face ol a{display:block;font-size:.85rem}
.atlas-face>p{padding:.5rem 0 1.1rem;color:var(--muted)}
.brain-region-summary{display:grid;grid-template-columns:1fr 1fr;gap:1rem 2rem;padding:0 0 1.25rem}
.brain-region-summary dt{font-weight:650}
.brain-region-summary dd{margin:0;color:var(--muted)}
.atlas-chapters{columns:2;column-gap:clamp(2rem,5vw,5rem)}
.atlas-chapters details{break-inside:avoid;border-top:1px solid var(--rule);min-width:0}
.atlas-chapters summary{display:grid;grid-template-columns:2rem 1fr auto;gap:0 .45rem;align-items:center;padding:.75rem .15rem;list-style:none}
.atlas-chapters summary::-webkit-details-marker{display:none}
.atlas-chapters summary::after{content:"+";grid-area:1/3/3/4;align-self:center;font:400 1.5rem/1 Georgia,serif}
.atlas-chapters details[open]>summary::after{content:"−"}
.atlas-index{grid-row:span 2;color:var(--accent);font-size:.83rem}
.atlas-chapters summary [data-region-name]{font:400 1.4rem/1.3 Baskervville,Georgia,serif}
.atlas-chapters summary small{grid-column:2;color:var(--muted);font-size:.83rem}
.atlas-chapter-copy{padding:0 .3rem 1.25rem 2.58rem}
.atlas-chapter-copy p{margin-bottom:.55rem}
.atlas-chapter-copy h3{font-size:1.3rem;margin:.9rem 0 .35rem}
.atlas-chapter-role{font-weight:650}
.atlas-method{background:#e6ebe6;padding:clamp(2rem,4.6vw,4rem) 0}
.atlas-method-grid{display:grid;grid-template-columns:1fr 1fr;gap:7%}
.atlas-method h2{font-size:clamp(1.8rem,3.4vw,3.25rem);margin-bottom:.8rem}
.atlas-method-grid p{margin-bottom:.7rem}
.atlas-method details{border-block-start:1px solid #aebcb3}
.atlas-method ol{padding-left:1.4rem}
.atlas-method li{padding:.5rem 0}
.atlas-method li small,.atlas-method li a{display:block}
.atlas-method li p{font-size:.93rem}
.atlas-further{padding-bottom:2rem}
.atlas-more{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.35rem;margin:1.25rem 0}
.atlas-disclaimer{border-top:1px solid var(--rule);margin-top:1.5rem!important;padding-top:1rem;font-size:.88rem;color:var(--muted);max-width:92ch}
.atlas-figure:fullscreen{overflow:auto;background:var(--paper);max-width:none;padding:clamp(.6rem,2vw,1.25rem);color:var(--ink)}
.atlas-figure:fullscreen .atlas-stage{height:clamp(200px,65dvh,900px);max-height:none;aspect-ratio:auto}
@media(max-width:800px){.atlas-spread{grid-template-columns:minmax(0,1.75fr) minmax(200px,1fr);gap:1.2rem}.atlas-mode button{flex-direction:column;gap:.2rem;font-size:.79rem}.atlas-stage{aspect-ratio:1.45}.atlas-story{column-gap:1.4rem}}
@media(max-width:680px){.atlas-wrap{width:calc(100% - 2rem)}.atlas-opening,.atlas-section-intro,.atlas-spread,.atlas-story,.atlas-method-grid,.atlas-plates-grid,.atlas-more{grid-template-columns:1fr}.atlas-opening,.atlas-section-intro{gap:.85rem}.atlas-opening h1{font-size:clamp(2.85rem,10vw,4.1rem)}.atlas-opening h1 br{display:none}.atlas-opening h1 em::before{content:" "}.atlas-opening nav{gap:.5rem 1.1rem}.atlas-mode button{min-height:54px;padding-inline:.2rem}.atlas-stage{min-height:225px;aspect-ratio:1.28}.atlas-tools{right:.4rem;top:.45rem}.atlas-tools button{min-width:32px;min-height:34px}.atlas-angle-badge{top:.65rem;left:.45rem;font-size:.7rem}.atlas-cameras{gap:.12rem}.atlas-cameras button{padding-inline:.35rem}.atlas-cameras>div>span{display:none}.atlas-notes{margin-top:.15rem}.atlas-region-heading{margin-top:1rem}.atlas-spread{gap:1.15rem}.atlas-tabs{gap:0 .75rem}.atlas-tabs a{font-size:.94rem}.atlas-schema{grid-row:2}.atlas-method-grid{gap:2rem}.atlas-chapters{columns:1}.brain-region-summary{grid-template-columns:1fr}.atlas-section-intro h2 br{display:none}.atlas-section-intro em::before{content:" "}.atlas-story{gap:1.05rem}.atlas-mode svg{width:1.05rem;height:1.05rem}.atlas-legend{gap:0 .6rem}}
@media(prefers-reduced-motion:reduce){.brain-atlas *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.brain-atlas{background:white;color:black}.atlas-wrap{width:100%}.atlas-stage{height:220px;max-height:220px}.brain-atlas .atlas-stage>img{display:block!important}.brain-atlas :is(.atlas-mode,.atlas-cameras,.atlas-tools,.atlas-pins,.atlas-spread-control,.atlas-stage>canvas,.atlas-picker,.atlas-legend,.atlas-tabs,.atlas-note-actions){display:none!important}.brain-atlas .atlas-story[hidden]{display:grid!important}.atlas-story,.atlas-section-intro,.atlas-method-grid,.atlas-spread{display:block}.atlas-stories,.atlas-method{background:white}.atlas-schema{break-inside:avoid}.atlas-opening{padding:.5rem 0}.atlas-stories,.atlas-reading,.atlas-method{margin-top:1.1rem}}
