/* Full-page atlas: overview first, real knowledge chapters below. */
html.has-atlas-home { scroll-padding-top:0; }
body .atlas-home { --atlas-bg:#101d65; color:#eff3ff; background:var(--atlas-bg); transition:background-color .7s ease; min-height:100vh; }
body .atlas-home .home-shell { width:100%; max-width:none; padding:0 14px; margin:0; }
body .atlas-home .home-nav { display:flex; align-items:center; flex-wrap:nowrap; gap:16px; position:sticky; top:0; z-index:40; min-height:58px; height:58px; padding:8px 4px; margin:0; border-bottom:1px solid #ffffff24; border-radius:0; background:var(--atlas-bg); color:#fff; backdrop-filter:blur(16px); transition:background-color .7s; }
body .atlas-home .home-brand-text b { color:#fff; font-size:15px; white-space:nowrap; }
body .atlas-home .home-mark { width:30px; height:30px; border-radius:5px; }
body .atlas-home .home-links { flex:1 1 0; width:auto; height:auto; min-width:0; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; justify-content:safe flex-end; }
body .atlas-home .home-link { color:#d1daff; font-size:11px; flex-shrink:0; background:transparent; }
body .atlas-home .site-theme { color:#fff; background:#ffffff0c; border-color:#ffffff40; }
body .atlas-home .home-shell > :is(.home-hero,.interest-section,#products,#workflow,#tasks) { display:none; }
body .atlas-home .atlas-hero { display:grid; grid-template-columns:110px 240px minmax(0,1fr); gap:14px; min-height:calc(100svh - 58px); padding:14px 0; scroll-margin-top:58px; }
body .atlas-wordmark { display:flex; flex-direction:column; align-items:center; justify-content:space-between; border-right:1px solid #ffffff24; padding:6px 12px 4px 0; }
body .atlas-wordmark h1 { writing-mode:vertical-rl; font-family:'Songti SC','Noto Serif SC',serif; font-weight:400; font-size:clamp(70px,8.5vh,112px); line-height:1; letter-spacing:.05em; margin:0; }
body .atlas-wordmark > span { writing-mode:vertical-rl; font:10px ui-monospace,monospace; letter-spacing:.18em; color:#aebcf1; }
body .atlas-intro { display:flex; flex-direction:column; min-width:0; }
body .atlas-eyebrow { font:10px ui-monospace,monospace; letter-spacing:.12em; color:#b3c2f0; margin:0 0 15px; line-height:1.8; }
body .atlas-intro > .atlas-eyebrow { padding:10px 0 0; }
body .atlas-outline { border:1px solid #ffffff38; padding:9px 12px; }
body .atlas-outline a { display:flex; justify-content:space-between; color:#d8e2ff; padding:8px 2px; text-decoration:none; font-size:13px; border-bottom:1px solid #ffffff0d; transition:color .2s,padding .2s; }
body .atlas-outline a:hover { color:#fff; padding-left:9px; }
body .atlas-outline small { color:#96a9e8; font-family:ui-monospace,monospace; }
body .atlas-manifesto { border:1px solid #ffffff28; padding:20px 14px; margin-top:14px; flex:1; display:flex; flex-direction:column; justify-content:space-between; }
body .atlas-manifesto p { font:24px/1.8 'Songti SC',serif; margin:0 0 24px; color:#f0f3ff; }
body .atlas-manifesto span { font:12px/1.9 ui-monospace,monospace; color:#b1c1f1; }
body .atlas-start { display:flex; justify-content:space-between; padding:15px 0 0; color:#fff; text-decoration:none; font-size:12px; }
body .atlas-home #globalGraph { padding:0; margin:0; min-width:0; border:0; scroll-margin-top:72px; }
body .atlas-home .global-graph-heading { display:none; }
body .atlas-home .global-graph-shell { height:100%; border:1px solid #ffffff32; border-radius:0; display:flex; flex-direction:column; overflow:hidden; }
body .atlas-home .global-graph-toolbar { padding:10px; gap:8px; flex-wrap:wrap; background:#080e26; }
body .atlas-home .global-graph-counts { font-size:10px; gap:10px; }
body .atlas-home .global-graph-counts b { font-size:13px; }
body .atlas-home .global-graph-controls { flex:1; flex-wrap:wrap; gap:5px; }
body .atlas-home .global-graph-search-wrap { width:auto; flex:1; min-width:140px; }
body .atlas-home .global-graph-controls :is(input,select,button) { height:32px; font-size:10px; padding-top:4px; padding-bottom:4px; }
body .atlas-home .global-graph-controls select { width:118px; }
body .atlas-home .global-graph-search-wrap::before { top:8px; }
body .atlas-home .global-graph-search-wrap::after { top:19px; }
body .atlas-home .global-graph-mode { padding:2px; }
body .atlas-home .global-graph-stage { display:block; min-height:480px; flex:1; }
body .atlas-home #globalGraphCanvas { height:100%; min-height:480px; position:absolute; inset:0; }
body .atlas-home .global-graph-inspector { display:none; position:absolute; right:12px; top:12px; bottom:auto; width:270px; max-height:calc(100% - 70px); border:1px solid #ffffff30; padding:25px 18px 18px; border-radius:4px; box-shadow:0 20px 70px #0008; background:#0a142ded; }
body .atlas-home .has-graph-selection .global-graph-inspector { display:block; }
body .atlas-home .global-graph-legend { display:none; }
body .atlas-home .global-graph-browse { height:100%; max-height:70vh; padding:18px; }
body .atlas-inspector-chapter { display:block; color:#b5d6ff; font-size:12px; padding-top:20px; }
body .atlas-inspector-close { position:absolute; right:8px; top:4px; background:transparent; border:0; font-size:22px; color:#b5d6ff; cursor:pointer; }
body .atlas-chapters { position:relative; z-index:1; margin:0 11vw 0 max(170px,13vw); }
body .atlas-reading #globalGraphCanvas { position:fixed; inset:58px 0 0; width:100%; height:calc(100vh - 58px); opacity:.12; pointer-events:none; z-index:0; }
body .atlas-chapter { padding:100px 0 60px; scroll-margin-top:55px; }
body .atlas-chapter-head { position:relative; padding:30px 0 60px; border-top:1px solid #ffffff35; }
body .atlas-chapter-head > h2 { margin:0 0 60px; font:500 clamp(48px,6.8vw,108px)/1.1 'Songti SC','Noto Serif SC',serif; letter-spacing:-.04em; color:#fff; }
body .atlas-chapter-lead { max-width:650px; padding-left:24px; border-left:1px solid var(--chapter-accent); }
body .atlas-chapter-lead h3 { margin:0 0 15px; font-size:clamp(22px,3vw,40px); font-weight:450; color:#fff; }
body .atlas-chapter-lead p { font-size:16px; line-height:1.9; color:#d3d9e8; max-width:530px; }
body .atlas-chapter-lead > a { display:inline-block; color:var(--chapter-accent); text-decoration:none; padding:8px 0; font-size:13px; }
body .atlas-chapter-count { position:absolute; right:0; bottom:45px; font:44px ui-monospace,monospace; color:var(--chapter-accent); }
body .atlas-chapter-count small { display:block; font:10px/2 ui-monospace,monospace; text-align:right; color:#c0c9de; }
body .atlas-story-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; align-items:stretch; }
body .atlas-story { min-width:0; position:relative; padding:26px 22px; min-height:260px; display:flex; flex-direction:column; background:#ffffff08; border:1px solid #ffffff26; transition:background .25s,transform .25s,border-color .25s; }
body .atlas-story:hover { background:#ffffff10; border-color:var(--chapter-accent); transform:translateY(-4px); }
body .atlas-story-category { display:flex; justify-content:space-between; gap:10px; color:var(--chapter-accent); font:10px/1.5 ui-monospace,monospace; letter-spacing:.07em; }
body .atlas-story-category small { opacity:.6; }
body .atlas-story h3 { font-size:20px; font-weight:500; line-height:1.55; margin:22px 0 14px; overflow-wrap:anywhere; }
body .atlas-story h3 a { color:#f3f5ff; text-decoration:none; }
body .atlas-story p { font-size:13px; line-height:1.9; color:#bfc9dc; margin:0 0 25px; overflow-wrap:anywhere; }
body .atlas-story-actions { margin-top:auto; display:flex; gap:18px; flex-wrap:wrap; }
body .atlas-story-actions a,body .atlas-story-actions button { font-family:inherit; line-height:1.7; font-size:11px; color:var(--chapter-accent); border:0; background:transparent; padding:0; cursor:pointer; text-decoration:none; text-align:left; }
body .atlas-story-featured { grid-column:span 2; min-height:330px; background:linear-gradient(135deg,#ffffff15,#ffffff03); }
body .atlas-story-featured h3 { font-family:'Songti SC',serif; font-size:clamp(28px,3.2vw,44px); max-width:750px; }
body .atlas-story-featured p { max-width:650px; font-size:15px; }
body .atlas-chapter-actions { display:flex; justify-content:space-between; align-items:center; gap:16px; border-bottom:1px solid #ffffff24; padding:25px 0; }
body .atlas-chapter-actions button,body .atlas-chapter-actions a { border:1px solid #ffffff40; color:#e4edff; background:transparent; padding:12px 20px; cursor:pointer; text-decoration:none; font-size:12px; }
body .atlas-chapter-actions button:hover,body .atlas-chapter-actions a:hover { border-color:var(--chapter-accent); }
body .atlas-chapter-actions button[hidden] { display:none; }
body .atlas-rail { position:fixed; z-index:35; left:22px; top:50%; transform:translateY(-50%); width:130px; opacity:0; pointer-events:none; transition:opacity .25s; }
body .atlas-reading .atlas-rail { opacity:1; pointer-events:auto; }
body .atlas-rail a { display:flex; align-items:center; gap:10px; color:#aebbd4; text-decoration:none; padding:9px 0; font-size:11px; }
body .atlas-rail small { font:9px ui-monospace,monospace; opacity:.6; }
body .atlas-rail i { width:3px; height:3px; margin-left:auto; border:1px solid currentColor; border-radius:50%; }
body .atlas-rail a[aria-current] { color:#fff; }
body .atlas-rail a[aria-current] i { background:#fff; box-shadow:0 0 10px #fff; }
body .atlas-rail .atlas-rail-home { padding-bottom:25px; font-size:10px; }
body .atlas-home .home-footer { margin:90px 11vw 0 max(170px,13vw); color:#aebbd4; border-color:#ffffff30; padding:30px 0; }
body .atlas-home a:focus-visible,body .atlas-home button:focus-visible { outline:2px solid #b9d6ff; outline-offset:5px; }
@media(min-width:1700px) { body .atlas-home .atlas-hero { grid-template-columns:145px 280px minmax(0,1fr); } }
@media(max-width:1100px) {
 body .atlas-home .atlas-hero { grid-template-columns:210px minmax(0,1fr); }
 body .atlas-wordmark { display:none; }
 body .atlas-story-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 body .atlas-chapter-count { position:static; display:block; margin-top:35px; font-size:28px; }
 body .atlas-chapter-count small { display:inline; text-align:left; }
}
@media(max-width:700px) {
 body .atlas-home .home-shell { padding:0 12px; }
 body .atlas-home .home-nav { display:flex; flex-wrap:nowrap; min-height:54px; height:54px; }
 body .atlas-home .home-links { display:none; }
 body .atlas-home .home-nav-tools { margin-left:auto; }
 body .atlas-home .atlas-hero { display:flex; flex-direction:column; padding-top:18px; }
 body .atlas-intro { display:block; }
 body .atlas-intro > .atlas-eyebrow { font-size:10px; }
 body .atlas-outline { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 20px; }
 body .atlas-outline a { padding:7px 0; font-size:12px; }
 body .atlas-manifesto { padding:16px 0 6px; margin:0; border:0; }
 body .atlas-manifesto p { font-size:25px; line-height:1.5; margin:0; }
 body .atlas-manifesto p br { display:none; }
 body .atlas-manifesto span { display:none; }
 body .atlas-start { padding-bottom:4px; }
 body .atlas-home .global-graph-toolbar { display:block; }
 body .atlas-home .global-graph-counts { margin-bottom:8px; }
 body .atlas-home .global-graph-controls { display:flex; }
 body .atlas-home .global-graph-stage { height:450px; min-height:450px; }
 body .atlas-home #globalGraphCanvas { min-height:450px; }
 body .atlas-home #globalGraphCanvas { touch-action:pan-y; }
 body .atlas-home .global-graph-inspector { width:min(270px,calc(100% - 24px)); max-height:370px; }
 body .atlas-home .global-graph-hint { font-size:10px; }
 body .atlas-chapters { margin:0; padding-top:30px; }
 body .atlas-chapter { padding:75px 0 25px; scroll-margin-top:100px; }
 body .atlas-chapter-head { padding-bottom:30px; }
 body .atlas-chapter-head > h2 { margin-bottom:35px; font-size:48px; }
 body .atlas-chapter-lead { padding-left:16px; }
 body .atlas-chapter-lead p { font-size:14px; }
 body .atlas-story-grid { grid-template-columns:1fr; }
 body .atlas-story-featured { grid-column:auto; min-height:280px; }
 body .atlas-story { min-height:220px; }
 body .atlas-rail { top:54px; left:0; right:0; width:auto; transform:none; display:flex; overflow-x:auto; background:var(--atlas-bg); padding:0 12px; border-bottom:1px solid #ffffff30; }
 body .atlas-rail a { flex-shrink:0; padding:12px 8px; font-size:10px; gap:5px; }
 body .atlas-rail .atlas-rail-home { padding:12px 8px; }
 body .atlas-rail i { display:none; }
 body .atlas-home .home-footer { margin:50px 0 0; font-size:11px; }
}
@media(prefers-reduced-motion:reduce) {
 body .atlas-home,body .atlas-home *,body .atlas-home .home-nav { scroll-behavior:auto!important; transition:none!important; }
 body .atlas-story:hover { transform:none; }
}

/* Paper atlas: the existing appearance switch controls both page and canvas. */
:root[data-theme="light"] body .atlas-reading #globalGraphCanvas { visibility:hidden; }
:root[data-theme="light"] body .atlas-home {
  color:#26342f; background:color-mix(in srgb,var(--atlas-bg) 4%,#fafaf6);
}
:root[data-theme="light"] body .atlas-home .home-nav,
:root[data-theme="light"] body .atlas-home .atlas-rail {
  background:#f6f6f0f5; color:#26342f; border-color:#d6ddd4;
}
:root[data-theme="light"] body .atlas-home :is(.home-brand-text b,.atlas-start,.atlas-manifesto p,.atlas-chapter-head > h2,.atlas-chapter-lead h3,.atlas-story h3 a) { color:#26342f; }
:root[data-theme="light"] body .atlas-home :is(.home-link,.atlas-outline a,.atlas-rail a,.home-footer,.atlas-story p,.atlas-chapter-lead p) { color:#53645e; }
:root[data-theme="light"] body .atlas-home :is(.atlas-eyebrow,.atlas-wordmark > span,.atlas-outline small,.atlas-manifesto span,.atlas-chapter-count small) { color:#62746c; }
:root[data-theme="light"] body .atlas-home :is(.atlas-wordmark,.atlas-outline,.atlas-manifesto,.atlas-outline a,.atlas-chapter-head,.atlas-chapter-actions,.home-footer) { border-color:#d6ddd4; }
:root[data-theme="light"] body .atlas-home .atlas-outline a:hover { color:#286b58; }
:root[data-theme="light"] body .atlas-home .site-theme { color:#446457; border-color:#cbd7cd; background:#fff9; }
:root[data-theme="light"] body .atlas-home .global-graph-shell.is-star-map {
  --ds-paper:#f5f7f2; --ds-surface:#ffffff; --ds-soft:#edf1e9;
  --ds-ink:#283a32; --ds-muted:#62746a; --ds-line:#d1dbd0;
  --ds-edge:#cbd7cb; --ds-accent:#326e59;
  color-scheme:light; border-color:var(--ds-edge); background:var(--ds-paper);
}
:root[data-theme="light"] body .atlas-home .global-graph-toolbar { background:#fafbf7; }
:root[data-theme="light"] body .atlas-home .global-graph-counts b { color:#283a32; }
:root[data-theme="light"] body .atlas-home .global-graph-inspector { background:#fffffff5; border-color:#cbd7cb; box-shadow:0 12px 45px #243c2b18; }
:root[data-theme="light"] body .atlas-home :is(.atlas-inspector-chapter,.atlas-inspector-close) { color:#326e59; }
:root[data-theme="light"] body .atlas-home .global-graph-hint { color:#566d60; background:#ffffffe0; border-color:#cbd7cb; }
:root[data-theme="light"] body .atlas-home #globalGraphAppearance { color:#326e59; border-color:#a8bfb0; }
:root[data-theme="light"] body .atlas-home .atlas-chapter { --chapter-accent:var(--chapter-light-accent)!important; }
:root[data-theme="light"] body .atlas-home .atlas-story { background:#ffffff90; border-color:#d3dcd1; }
:root[data-theme="light"] body .atlas-home .atlas-story:hover { background:#fff; border-color:var(--chapter-accent); }
:root[data-theme="light"] body .atlas-home .atlas-story-featured { background:linear-gradient(135deg,#fff,#edf1e8); }
:root[data-theme="light"] body .atlas-home .atlas-chapter-actions :is(button,a) { color:#405c4e; border-color:#b8c9ba; }
:root[data-theme="light"] body .atlas-home .atlas-rail a[aria-current] { color:#205a45; }
:root[data-theme="light"] body .atlas-home .atlas-rail a[aria-current] i { background:#326e59; box-shadow:none; }
:root[data-theme="light"] body .atlas-home :is(a,button):focus-visible { outline-color:#326e59; }
