/* d3 Atlas: a guide with a map. A sidebar of sections, coloured by topic, rounded cards. */
:root{--maxw:none;--radius:12px;--accent:#2a4fd6;--link:#2548c4;--card:#eef1fb;--line:#d3d9ee;--note-bg:#eaf0ff;--bg:#fafbff}
@media (prefers-color-scheme:dark){:root{--accent:#9db4ff;--link:#a8bcff;--bg:#10121a;--card:#181b27;--line:#2b3046;--note-bg:#18203a}}
@media (min-width:62rem){
 body.theme-d3 .wrap{display:grid;grid-template-columns:17rem minmax(0,1fr);grid-template-areas:"side main" "side foot";column-gap:2rem;max-width:84rem;padding:0 1.5rem}
 body.theme-d3 header.top{grid-area:side;position:sticky;top:0;align-self:start;height:100vh;overflow:auto;padding:2.6rem 0 1.5rem;border-right:1px solid var(--line);padding-right:1.2rem}
 body.theme-d3 .main-nav ul{flex-direction:column;gap:.15rem;font-size:1rem}
 body.theme-d3 .main-nav a{display:block;padding:.35rem .7rem;border-radius:8px;width:100%}
 body.theme-d3 .main-nav a[aria-current],body.theme-d3 .main-nav a:hover{background:var(--card);text-decoration:none}
 body.theme-d3 main{grid-area:main;max-width:60rem}
 body.theme-d3 .foot{grid-area:foot;max-width:60rem}
 
}
body.theme-d3 h1{color:var(--accent)}
body.theme-d3 h2{padding-left:.7rem;border-left:5px solid var(--accent)}
body.theme-d3 a.card{box-shadow:0 1px 0 var(--line);border-top:5px solid var(--accent)}
body.theme-d3 .scroll{border-radius:var(--radius)}
@media (max-width:61.99rem){
 /* Atlas on a phone: a bar of sections fixed to the bottom, like a map legend */
 body.theme-d3{padding-bottom:3.6rem}
 body.theme-d3 .menu{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--bg);border-top:3px solid var(--accent)}
 body.theme-d3 .menu summary{display:block;border:0;border-radius:0;text-align:center;padding:.8rem;color:var(--accent);font-size:1rem}
 body.theme-d3 .menu summary::before{content:"\2630  "}
 body.theme-d3 .menu ul{position:absolute;bottom:100%;left:0;right:0;margin:0;border-radius:var(--radius) var(--radius) 0 0;max-height:70vh;overflow:auto}
}
