/* Atlas v321 — restore exact approved v319 Lysmata DOM/classes for every first-10 species.
   FIX: right scientific rail follows document scroll, never an independent scrollbar. */
body.atlas-v321-canonical{background:#eaf3f8!important;color:#17344f}
body.atlas-v321-canonical .invert-hero-inner{max-width:1570px!important}
body.atlas-v321-canonical .layout{max-width:1570px!important;display:grid!important;grid-template-columns:minmax(190px,225px) minmax(0,1fr) minmax(250px,295px)!important;gap:18px!important;align-items:start}
body.atlas-v321-canonical .content{min-width:0!important;width:100%!important}
body.atlas-v321-canonical .side{min-width:0!important}
body.atlas-v321-canonical .hero-top{grid-template-columns:minmax(0,1fr) minmax(0,1.13fr) minmax(250px,.8fr)!important}
body.atlas-v321-canonical .hero-stats-panel{display:flex!important;flex-direction:column!important;justify-content:center;grid-column:auto!important;grid-template-columns:none!important;background:#fff!important;border-color:#d8e8f2!important;padding:14px 18px!important;border-radius:25px}
body.atlas-v321-canonical .hero-stats-panel .stat{display:grid!important;grid-template-columns:52px minmax(0,1fr)!important;align-items:center!important;gap:13px!important;border-left:0!important;border-right:0!important;border-bottom:0!important;padding:12px 0!important;margin:0!important;min-width:0!important}
body.atlas-v321-canonical .hero-stats-panel .stat+.stat{border-top:1px solid #d9e7ee!important}
body.atlas-v321-canonical .hero-stats-panel .icon{display:grid!important;place-items:center!important;width:50px!important;height:50px!important;border-radius:50%!important;background:#0c4869!important;border:1px solid #2a6986!important;overflow:hidden!important;flex:0 0 50px!important}
body.atlas-v321-canonical .hero-stats-panel .icon img{display:block;width:25px;height:25px;object-fit:contain}
body.atlas-v321-canonical .hero-stats-panel .stat b{font-size:15px!important;line-height:1.3!important;color:#082f4a!important}
body.atlas-v321-canonical .hero-stats-panel .stat span{font-size:14px!important;line-height:1.55!important;color:#23516c!important;overflow-wrap:anywhere!important}
body.atlas-v321-canonical .hero-media-panel img{object-fit:contain!important;background:#123b52!important}
body.atlas-v321-canonical .atlas321-science{display:block!important;position:static!important;top:auto!important;max-height:none!important;min-height:0!important;height:auto!important;overflow:visible!important;overscroll-behavior:auto!important;scrollbar-width:auto!important;align-self:start;background:#fff;border:1px solid #d3e5ed;border-radius:27px;padding:23px 18px;box-shadow:0 14px 34px rgba(11,38,57,.06);min-width:0}
body.atlas-v321-canonical .atlas321-science-inner{height:auto!important;max-height:none!important;overflow:visible!important;position:static!important}
body.atlas-v321-canonical .atlas321-science h2{font-family:Georgia,serif;font-size:20px!important;line-height:1.3;color:#0e3956!important;margin:8px 0 12px!important}
body.atlas-v321-canonical .atlas321-science dl{display:grid;grid-template-columns:40% minmax(0,60%);margin:0 0 20px;padding:0}
body.atlas-v321-canonical .atlas321-science dt,body.atlas-v321-canonical .atlas321-science dd{font-size:13px;line-height:1.55;margin:0;padding:10px 3px;border-bottom:1px solid #dfeaf0;overflow-wrap:anywhere;color:#15425c}
body.atlas-v321-canonical .atlas321-science dt{font-weight:800}
body.atlas-v321-canonical .atlas321-science dd{font-weight:450}
body.atlas-v321-canonical .atlas321-science #atl321-geo{padding:16px 0 8px;border-top:1px solid #d1e3e8}
body.atlas-v321-canonical .atlas321-science .atlas321-map{border:1px solid #c7dfeb;border-radius:15px;background:#edf6fa;padding:4px;display:block;cursor:zoom-in;width:100%;box-sizing:border-box}
body.atlas-v321-canonical .atlas321-science .atlas321-map img{width:100%;height:auto;max-height:260px;object-fit:contain;display:block}
body.atlas-v321-canonical .atlas321-science p{color:#315a70!important;line-height:1.55;font-size:13px;margin:10px 0}
body.atlas-v321-canonical .atlas321-science .atlas321-map-note{font-size:12px!important}
body.atlas-v321-canonical .atlas321-science-source{border-top:1px solid #d1e3e8;padding:16px 0 0}
body.atlas-v321-canonical .atlas321-science a{color:#00718b!important;text-decoration:underline}
body.atlas-v321-canonical #intro .free-card{min-width:0;overflow:hidden}
body.atlas-v321-canonical #intro .free-card .card-body p{line-height:1.65;color:#31546b!important}
body.atlas-v321-canonical #intro .free-card .card-media img{max-width:100%;object-fit:cover}
body.atlas-v321-canonical .atlas321-gallery{margin-top:18px}
body.atlas-v321-canonical .atlas321-gallery-scroll{display:flex;gap:13px;overflow-x:auto;scroll-snap-type:x mandatory;padding:6px 3px 13px}
body.atlas-v321-canonical .atlas321-gallery-card{flex:0 0 clamp(180px,35%,260px);background:#f4f9fc;border:1px solid #d8e9ed;border-radius:15px;overflow:hidden;scroll-snap-align:start;min-width:0}
body.atlas-v321-canonical .atlas321-gallery-card button{display:block;width:100%;border:0;padding:0;background:#12374d;cursor:zoom-in}
body.atlas-v321-canonical .atlas321-gallery-card img{display:block;width:100%;height:175px;object-fit:contain}
body.atlas-v321-canonical .atlas321-gallery-card h3{color:#11415d!important;font-size:15px!important;margin:11px 12px 5px}
body.atlas-v321-canonical .atlas321-gallery-card p{color:#486678!important;font-size:12px!important;line-height:1.5!important;margin:0 12px 14px}
body.atlas-v321-canonical .atlas318-section h2,body.atlas-v321-canonical .atlas318-section h3,body.atlas-v321-canonical .atlas318-section p,body.atlas-v321-canonical .atlas318-section .atlas318-panel p{color:#183c51!important;-webkit-text-fill-color:#183c51!important;text-shadow:none!important;opacity:1!important}
body.atlas-v321-canonical .reader-zone .atlas318-section{background:#fffdf7!important}
body.atlas-v321-canonical .reader-zone-head .section-kicker{color:#15394e!important;background:#edf7fb!important;-webkit-text-fill-color:#15394e!important;opacity:1!important}
body.atlas-v321-canonical #readerZone .reader-detail-card p{color:#335a70!important}
body.atlas-v321-canonical .similar-grid>a{min-width:0}
body.atlas-v321-canonical .similar-grid img{object-fit:contain;background:#0f3042}
@media(max-width:1220px){
 body.atlas-v321-canonical .layout{grid-template-columns:minmax(175px,205px) minmax(0,1fr)!important}
 body.atlas-v321-canonical .atlas321-science{grid-column:2;position:static!important}
 body.atlas-v321-canonical .hero-top{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
 body.atlas-v321-canonical .hero-stats-panel{grid-column:1/-1!important}
 body.atlas-v321-canonical .hero-stats-panel .stat{grid-template-columns:52px minmax(0,1fr)!important}
}
@media(max-width:800px){
 body.atlas-v321-canonical .layout{display:flex!important;flex-direction:column!important;padding:14px!important;gap:14px!important}
 body.atlas-v321-canonical .layout>aside.side{position:static!important;width:100%!important;order:6;box-sizing:border-box}
 body.atlas-v321-canonical .layout>article.content{display:contents!important}
 body.atlas-v321-canonical #intro{order:1;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .atlas318-free{order:2;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .atlas321-gallery{order:3;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .atlas321-science{order:4;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .reader-preview{order:5;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .reader-zone{order:5;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .similar-species{order:7;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .source-note{order:8;width:100%!important;box-sizing:border-box}
 body.atlas-v321-canonical .hero-top{grid-template-columns:1fr!important}
 body.atlas-v321-canonical .hero-stats-panel{grid-column:1!important;display:block!important}
 body.atlas-v321-canonical .hero-stats-panel .stat{display:grid!important;grid-template-columns:50px minmax(0,1fr)!important;border-left:0!important;border-top:0!important}
 body.atlas-v321-canonical .hero-stats-panel .stat+.stat{border-top:1px solid #dce9f1!important}
 body.atlas-v321-canonical .reader-card-grid,body.atlas-v321-canonical .reader-detail-grid{grid-template-columns:1fr!important}
 body.atlas-v321-canonical .free-card-grid{grid-template-columns:1fr!important}
 body.atlas-v321-canonical .free-card.span-3,body.atlas-v321-canonical .free-card.span-5,body.atlas-v321-canonical .free-card.span-7{grid-column:auto!important}
}

/* v321 editorial QA: dark reader cards MUST keep high-contrast white text. */
body.atlas-v321-canonical .reader-zone .reader-detail-card{background:#174764!important;color:#fff!important;border-color:#39718f!important}
body.atlas-v321-canonical .reader-zone .reader-detail-card :is(p,li,ul,span,h3,b,strong){color:#f2faff!important;-webkit-text-fill-color:#f2faff!important;text-shadow:none!important;opacity:1!important}
body.atlas-v321-canonical .reader-zone .reader-detail-card .num,body.atlas-v321-canonical .reader-zone .reader-detail-card .eyebrow{color:#cdeffe!important;-webkit-text-fill-color:#cdeffe!important}
