/* Reading space: the mechanism first, research apparatus last. */
body:has(#detail-panel[open]){overflow:hidden}
#detail-panel,#detail-panel.event-detail,.event-detail #detail-panel{position:fixed;inset:3dvh auto auto 50%;transform:translateX(-50%);margin:0;width:min(1380px,96vw);max-width:96vw;height:94dvh;max-height:94dvh;padding:0;border:1px solid #b6cabb;border-radius:16px;background:#f9faf3;box-shadow:0 25px 100px #183b3d50;display:flex;flex-direction:column}
#detail-panel[hidden]{display:none}#detail-panel::backdrop{background:#193b3d80;backdrop-filter:blur(3px)}
.atlas.has-detail .map-stage,.atlas.has-detail .map-heading,.atlas.has-detail .map-toolbar,.atlas.has-detail .story-context,.atlas.has-detail .scene-controls,.atlas.has-detail .story-legend,.atlas.has-detail .map-bottom{width:100%!important}
.atlas.has-detail .map-stage{height:660px}.atlas.has-detail .map-heading h1{font-size:25px}.atlas.has-detail .map-footnote{padding-right:26px}
.detail-head,.event-detail .detail-head{padding:14px 28px;background:#f9faf3;gap:20px}.detail-head h2,.event-detail #detail-title{font-size:20px;margin:2px 0}.detail-head .eyebrow{font-size:12px;letter-spacing:0}.detail-head button{flex-shrink:0;width:44px;height:44px}.event-detail .detail-head{border-bottom:1px solid #dbe4d4}.event-detail #detail-tabs{display:none}
#detail-content{padding:24px 34px 36px;font-size:17px;line-height:1.8;scrollbar-gutter:stable}.reading-title{margin-bottom:24px}.reading-title>p{font-size:14px;color:#65776b;margin:0 0 7px;line-height:1.6}.reading-title h3{font-size:27px;font-weight:650;line-height:1.45;margin:0 0 10px;letter-spacing:-.65px}.reading-title .tag{font-size:12px;padding:3px 9px}.system-context{padding:24px 0;border-block:1px solid #d9e3d3;margin-bottom:25px}.system-context h3{font-size:23px;letter-spacing:-.5px;line-height:1.5;margin:0 0 9px}.context-summary{margin:0 0 16px;font-size:17px;color:#536e5e;line-height:1.8;max-width:1100px}.context-diagram-scroll{overflow:auto;scrollbar-width:thin}.context-diagram{width:100%;height:auto;min-width:1000px;display:block;margin:8px 0 18px}.context-diagram.generic{min-width:840px;max-height:650px}.context-block{cursor:pointer;outline:none}.context-block rect{fill:#ecf2e6;stroke:#afc5aa;stroke-width:1.2}.context-block.selected rect{fill:#f3e4c8;stroke:#b58746;stroke-width:2}.context-block:hover rect,.context-block:focus-visible rect{stroke:#427c5a;stroke-width:3}.context-block.unknown rect{stroke-dasharray:5 4}.context-block-title{font-size:21px;fill:#294c3a;font-weight:600;letter-spacing:-.4px}.context-block-body{font-size:16px;fill:#5e7263;letter-spacing:-.3px}.context-step{font-size:14px;fill:#78906f}.context-block.compact .context-block-title{font-size:17px;font-weight:500}.context-column{font-size:16px;fill:#6d8068}.overview-edge path,.detail-graph-edge path{fill:none;stroke:#658d6d;stroke-width:2}.overview-edge text{fill:#6f806b;font-size:12px;paint-order:stroke;stroke:#f9faf3;stroke-width:4}.overview-edge.interpretation path,.detail-graph-edge.interpretation path{stroke:#b48a44;stroke-dasharray:6 4}.detail-graph-edge.sequence path,.detail-graph-edge.unknown path{stroke:#8b9985;stroke-dasharray:2 5}#detail-arrow path{fill:#648b6d}.context-stage-events{display:flex;gap:8px;flex-wrap:wrap;margin-top:5px}.context-stage-events button{padding:7px 13px;background:#edf2e6;border:1px solid #c5d4bd;border-radius:7px;min-height:42px;font-size:14px;max-width:100%;text-align:left;line-height:1.5}.context-stage-events button[aria-pressed=true]{background:#dce8ce;color:#345534;border-color:#9eb98e}.mechanism-notes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin-top:24px}.mechanism-notes h4,.selected-explanation h4{font-size:17px;margin:0 0 8px;color:#32553e}.mechanism-notes p,.selected-explanation p{font-size:16px;line-height:1.85;margin:0;color:#5b6f5e}.selected-explanation{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:30px;margin:0 0 25px}.selected-explanation p{font-size:18px;color:#365140}.context-map-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:15px}.context-map-heading button{background:#e3ecd9;border:1px solid #b9cfaa;border-radius:6px;padding:9px 14px;font-size:14px;min-height:42px;white-space:nowrap}.reading-metrics>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.event-reading>section>h3{font-size:21px}.event-reading .metric{margin:0;background:#edf2e6;border:1px solid #d7e3cf;border-radius:9px;padding:18px}.event-reading .metric-label{font-size:15px}.event-reading .metric strong{font-size:29px;margin:10px 0}.event-reading .metric strong small{font-size:18px}.event-reading .metric p{font-size:14px}.event-reading .tag{font-size:12px}.reading-metrics,.reading-flows{margin:25px 0}.detail-money-route{margin-bottom:15px;border:1px solid #d2deca;padding:18px;border-radius:10px}.detail-money-route h4{font-size:18px;margin:0 0 14px}.detail-money-route p{font-size:15px;line-height:1.8;color:#5a715c}.money-route{display:flex;align-items:stretch;gap:15px}.money-route span{flex:1;min-width:0;background:#e8efdf;border-radius:7px;padding:13px;font-size:17px}.money-route small{display:block;font-size:12px;color:#6b8163;margin-bottom:4px}.money-route b{align-self:center;color:#8f9b64;font-weight:400}.reading-relations,.reading-notes,.reading-sources{border-top:1px solid #d6e0cd;padding:15px 0}.event-reading summary{cursor:pointer;font-size:16px;font-weight:500;min-height:35px;line-height:35px}.relation-explanation{display:grid;grid-template-columns:1fr 1fr;gap:24px;border-bottom:1px solid #dfe6d8;padding:18px 0}.relation-explanation span{display:block;font-size:12px;color:#7c8874;margin-bottom:5px}.relation-explanation.interpretation span{color:#a67b2c}.relation-explanation button{display:block;text-align:left;font-size:17px;line-height:1.65;background:none;padding:0;text-decoration:underline;text-underline-offset:4px}.relation-explanation p{font-size:16px;line-height:1.8;margin:0;color:#586f59}.reading-notes p{font-size:14px;color:#71806a}.reading-sources{margin-top:0}.reading-sources ol{padding-left:25px;margin-top:12px;columns:2;column-gap:40px}.reading-sources li{break-inside:avoid;font-size:14px;line-height:1.8;margin-bottom:12px;overflow-wrap:anywhere}.reading-sources a{color:#42694e}.reading-sources small{font-size:12px;color:#7d8e74}
#edge-dialog{max-width:1000px;width:92vw;padding:28px 34px}#edge-dialog .dialog-head h2{font-size:24px}#edge-content .inspector-body h3{font-size:25px}#edge-content .inspector-body p{font-size:19px;line-height:1.9}#edge-content .edge-endpoints button{font-size:17px;padding:15px}#edge-content .story-sources a{font-size:14px}#edge-content .meaning-badge{font-size:13px}
/* Compact main canvas: controls, not an instruction sheet. */
.masthead,body:has(.event-mode) .masthead{height:58px}.mast-caption{display:none}.brand small{display:none}.brand{font-size:23px}.brand svg{width:31px;height:31px}.timebar,body:has(.event-mode) .timebar{padding-block:12px}.time-caption>label{visibility:hidden}.timebar .year-block output,body:has(.event-mode) .year-block output{font-size:32px}.event-nav-head{margin:0 5px 6px}.event-stop{min-height:58px!important;padding:8px 12px!important}.event-stop .stop-year{font-size:12px}.event-stop strong{font-size:13px;margin-top:4px}.event-rail{padding-bottom:5px}.event-navigation{margin-bottom:7px}.event-mode .map-heading{padding:16px 24px 10px;display:flex;align-items:center;justify-content:space-between;gap:15px}.event-mode .map-heading h1{font-size:25px;margin:0}.event-mode #map-subtitle{display:none}.event-mode .story-context{padding:0 24px 12px;gap:12px;flex-wrap:wrap}.event-mode .scene-controls{display:none}.event-mode #story-period{font-size:12px;gap:0}.event-mode #story-period>span:empty,.event-mode .scene-node-count{display:none}.scene-range{font-size:12px;padding:5px 8px}.event-mode #story-scenes{margin-left:auto}.event-mode #story-scenes button{font-size:12px;min-height:37px}.event-mode #story-scenes button span{display:none}.layout-switch button,.scene-tools button{font-size:12px;min-height:37px;border:1px solid #b5cdb7;border-radius:6px;padding:7px 11px;background:#e5eddd;color:#48683e}.layout-switch button[aria-pressed=true]{background:#355e46;color:#fffef3}.scene-tools button[hidden]{display:none}.scene-tools button:disabled{display:none}.event-mode .story-legend{padding:10px 24px;min-height:40px;font-size:11px;gap:20px}.event-mode .story-swipe{display:none}.event-mode .map-stage,.event-mode.has-detail .map-stage{height:clamp(540px,65vh,760px)}.footer{padding-block:10px}.footer-dot{display:none}body:has(.event-mode) label:has(#uncertain){display:none}.event-card h3{font-size:19px}.event-date{font-size:13px}.detail-copy,.flow-note{font-size:16px}.source-list{font-size:14px}.connection button{font-size:17px}.connection p{font-size:15px}.connection small{font-size:12px}.detail-tabs button{font-size:16px}.flow-card h3{font-size:22px}.flow-node{font-size:17px}.flow-node small{font-size:12px}.flow-card details summary{font-size:15px}.section-label{font-size:14px}
@media(max-width:1000px){.mechanism-notes{grid-template-columns:1fr;gap:18px}.event-mode .story-context{flex-direction:row;align-items:center}.event-mode #story-scenes{margin-left:0}.event-mode .scene-tools{margin-left:auto}.reading-sources ol{columns:1}.relation-explanation{grid-template-columns:1fr;gap:10px}}
@media(max-width:720px){#detail-panel,.event-detail #detail-panel{inset:0;margin:0;transform:none;width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;border:0}.detail-head,.event-detail .detail-head{padding:10px 16px}.detail-head h2,.event-detail #detail-title{font-size:17px}.detail-head .eyebrow{font-size:11px}#detail-content{padding:18px 18px 30px}.reading-title{margin-bottom:18px}.reading-title>p{font-size:13px}.reading-title h3{font-size:23px}.system-context{padding-block:18px}.system-context h3{font-size:21px}.context-summary{font-size:16px}.context-diagram{min-width:1000px}.context-diagram.generic{min-width:840px;max-height:none}.context-stage-events button{font-size:15px}.mechanism-notes p{font-size:16px}.selected-explanation{display:block}.selected-explanation>div{margin-bottom:20px}.selected-explanation p{font-size:17px}.money-route{flex-direction:column;gap:5px}.money-route b{transform:rotate(90deg);align-self:center}.reading-metrics>div{display:block}.reading-metrics .metric{margin-bottom:12px}.context-map-heading{align-items:flex-start}.context-map-heading button{font-size:12px;padding:7px 9px}.masthead,body:has(.event-mode) .masthead{height:49px;padding-inline:16px}.brand{font-size:21px}.timebar{gap:8px;padding:9px 5px}.era-control{display:none}.event-nav-head{margin-bottom:5px}.event-rail{padding-bottom:4px}.event-stop{flex-basis:137px;min-width:137px}.event-mode .map-heading{padding:13px 12px 8px;display:flex;flex-wrap:wrap;gap:10px}.event-mode .map-heading h1{font-size:23px}.event-mode .map-heading .layout-switch{flex-basis:100%;width:100%}.layout-switch button{min-height:40px}.event-mode .story-context{padding:0 12px 9px;gap:8px}.event-mode #story-period{display:none}.event-mode #story-scenes{width:100%}.event-mode #story-scenes button{font-size:12px;min-height:38px}.event-mode .mobile-scene-nav{order:4;gap:4px}.event-mode .mobile-scene-nav button{min-height:36px;min-width:32px}.event-mode .scene-tools{width:auto;flex:1;justify-content:flex-end}.scene-tools #expand-scene{margin:0}.scene-tools button{font-size:11px}.event-mode .map-stage,.event-mode.has-detail .map-stage{height:480px}.event-mode .story-legend{padding:10px 12px;font-size:11px;gap:16px}#edge-dialog{padding:22px;max-width:100%;width:96vw}#edge-content .inspector-body p{font-size:18px}.detail-tabs button{font-size:14px}}

.event-mode #story-inspector,.event-mode.has-detail #story-inspector{display:none}

.map-heading .layout-switch{pointer-events:auto}

.event-detail .detail-head{height:0;min-height:0;padding:0;border:0;overflow:visible}.event-detail .detail-head>div{display:none}.event-detail .detail-head>button{position:absolute;right:16px;top:12px;z-index:5}.event-detail #detail-content{padding-top:28px}.event-detail .reading-title{padding-right:52px}
@media(max-width:720px){.event-detail #detail-content{padding-top:22px}.event-detail .reading-title{padding-right:37px}.event-detail .detail-head>button{right:8px;top:8px}}

.mobile-overview{display:none}
@media(max-width:720px){.desktop-overview{display:none}.mobile-overview{display:block;margin:20px 0}.mobile-causal-stage{display:block;width:100%;text-align:left;background:#ecf2e6;border:1px solid #b4caa9;border-radius:12px;padding:18px;color:#35563e}.mobile-causal-stage.selected{background:#f3e4c8;border-color:#b58746}.mobile-causal-stage>span{display:block;font-size:12px;color:#7e9171;margin-bottom:7px}.mobile-causal-stage strong{font-size:20px;line-height:1.5}.mobile-causal-stage p{font-size:16px;line-height:1.85;margin:12px 0 0;color:#61735f}.mobile-causal-arrow{text-align:center;font-size:23px;color:#6b8c63;height:48px;line-height:48px}.mobile-causal-arrow span{font-size:12px;vertical-align:middle;margin-left:8px}}

.context-years{font-size:14px;font-weight:400;color:#7c8e75;white-space:nowrap;margin-left:10px}
