/* Reuse the original 1280 × 800 canvas. These rules apply in both parents. */
.chapter-one-visual.screen-slide,.chapter-explorer.screen-slide{font-family:var(--sans);font-size:16px;line-height:1.5;letter-spacing:normal;text-align:left}
.chapter-one-visual.screen-slide p,.chapter-explorer.screen-slide p{font-family:var(--sans)!important;font-weight:400;letter-spacing:normal}
.chapter-one-visual.screen-slide h4,.chapter-explorer.screen-slide h4{font-family:var(--sans)!important;letter-spacing:normal}
.chapter-one-visual.screen-slide button,.chapter-explorer.screen-slide button{min-width:0;letter-spacing:normal}
.chapter-one-visual.screen-slide button:focus-visible,.chapter-explorer.screen-slide button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
/* Keep long chapter titles and complete seven-row contents inside their allotted panel. */
.logic-explorer.screen-slide .logic-detail-heading h4{margin:6px 0 4px!important;font-size:23px!important;line-height:1.4!important}
.logic-explorer.screen-slide .logic-section-list>a{min-width:0;grid-template-columns:28px minmax(0,1fr) 15px;padding:9px 12px;gap:10px}
.logic-explorer.screen-slide .logic-section-list strong{line-height:1.45;overflow-wrap:anywhere}
.logic-explorer.screen-slide .logic-shared-tasks{padding-top:12px;margin-top:14px;border-top:1px solid var(--line)}
.logic-explorer.screen-slide .logic-shared-tasks small{font:12px/1.5 var(--sans);color:var(--brand)}
.logic-explorer.screen-slide .logic-shared-tasks p{font:14px/1.55 var(--sans)!important;margin:7px 0!important;color:var(--ink)}
.logic-explorer.screen-slide .logic-pillar-summary{display:grid;gap:10px;margin:22px 0}
.logic-explorer.screen-slide #logic-framework-detail .logic-pillar-summary p{display:flex;align-items:center;gap:14px;font-size:17px!important;line-height:1.5!important;margin:0!important;padding:10px 12px;background:var(--pale);border-left:3px solid var(--p1)}
.logic-explorer.screen-slide #logic-framework-detail .logic-pillar-summary p:nth-child(2){border-color:var(--p2)}
.logic-explorer.screen-slide #logic-framework-detail .logic-pillar-summary p:nth-child(3){border-color:var(--p3)}
.logic-explorer.screen-slide #logic-framework-detail .logic-pillar-summary p:nth-child(4){border-color:var(--p4)}
/* Both model views share the same header, tab strip, content envelope and footer. */
#fig-models.screen-slide .model-story-tabs{position:absolute;left:28px;right:28px;top:139px;height:36px;display:flex;align-items:center;gap:10px}
#fig-models .model-story-tabs button{padding:6px 15px;border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink);font-size:14px;line-height:1.5}
#fig-models .model-story-tabs button[aria-pressed=true]{background:var(--pale);border-color:var(--brand);box-shadow:inset 0 -2px var(--brand);color:var(--brand)}
#fig-models .model-story-tabs>span{margin-left:auto;font-size:12px;line-height:1.5;color:var(--muted)}
#fig-models.screen-slide .model-readout{top:204px;gap:22px}
#fig-models.screen-slide .model-readout strong{font-size:74px;margin:12px 0;line-height:1.1}
#fig-models.screen-slide .model-readout p{font-size:16px!important;line-height:1.7!important;margin:10px 0!important}
#fig-models.screen-slide .model-measures>div{padding:10px 0;font-size:17px}
#fig-models.screen-slide .model-measures b{font-size:25px}
#fig-models.screen-slide .stack-chart{top:204px;height:343px}
#fig-models.screen-slide .month-endpoints{top:565px}
#fig-models.screen-slide .month-control{top:610px;height:54px}
#fig-models.screen-slide .qwen-story-panel{position:absolute;left:28px;right:28px;top:188px;height:480px;display:grid;grid-template-columns:760px 436px;gap:28px}
#fig-models .qwen-story-graph{position:relative;width:760px;height:480px}
#fig-models .qwen-graph-label{position:absolute;top:0;left:0;right:0;text-align:center;color:var(--muted);font-size:15px;line-height:1.5}
#fig-models .qwen-story-graph svg{position:absolute;inset:0;width:760px;height:480px;max-width:none}
#fig-models .qwen-story-graph path{fill:none;stroke:var(--brand);stroke-width:2;opacity:.55}
#fig-models .qwen-story-node{display:flex;flex-direction:column;gap:10px;justify-content:center;min-height:90px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);padding:14px 18px;text-align:left;transition:border-color .15s,background .15s}
#fig-models .qwen-story-node small{font-size:12px;line-height:1.5;color:var(--muted)}
#fig-models .qwen-story-node strong{font:600 19px/1.45 var(--sans);overflow-wrap:anywhere}
#fig-models .qwen-story-node[aria-pressed=true],#fig-models .qwen-edge[aria-pressed=true]{background:var(--pale);border-color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand)}
#fig-models .qwen-base{position:absolute;left:20px;top:205px;width:245px;height:90px}
#fig-models .qwen-children{position:absolute;left:405px;top:45px;width:345px;display:grid;grid-template-rows:repeat(4,90px);gap:18px}
#fig-models .qwen-child-row{display:grid;grid-template-columns:30px 1fr;gap:15px;align-items:center}
#fig-models .qwen-edge{border:1px solid var(--line);background:var(--paper);color:var(--brand);border-radius:50%;width:30px;height:30px;padding:0;text-align:center;line-height:28px;font-size:18px}
#fig-models.screen-slide .qwen-story-detail{background:var(--pale);border:1px solid var(--line);border-radius:8px;padding:22px;height:480px;color:var(--ink);display:flex;flex-direction:column;align-items:stretch;gap:0}
#fig-models .qwen-story-detail>.viz-label{font-size:11px;line-height:1.5;margin-bottom:12px}
#fig-models .qwen-story-detail>strong{font:600 24px/1.4 var(--sans);overflow-wrap:anywhere}
#fig-models.screen-slide .qwen-story-detail p{font:16px/1.75 var(--sans)!important;margin:14px 0!important;color:var(--ink)!important}
#fig-models .qwen-story-detail dl{display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px;font:14px/1.65 var(--sans);border-top:1px solid var(--line);padding-top:14px;margin:0 0 18px}
#fig-models .qwen-story-detail dt{color:var(--muted);margin:0}
#fig-models .qwen-story-detail dd{margin:0;overflow-wrap:anywhere;font-family:var(--sans)}
#fig-models .qwen-story-detail a{font-size:13px;line-height:1.6;width:fit-content;margin-top:auto}
#fig-models .qwen-story-links{display:flex;flex-wrap:wrap;gap:9px 16px;margin-top:auto}
#fig-models.screen-slide [hidden]{display:none!important}
/* Independent evidence states fit into the original OSDI details, not the overview. */
.osdi-explorer.screen-slide .osdi-evidence-states{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0 13px}
.osdi-explorer.screen-slide .osdi-evidence-states>div{padding:9px 12px;background:var(--ex-bg);border:1px solid var(--ex-line);border-radius:4px}
.osdi-explorer.screen-slide .osdi-evidence-states small{display:block;font:11px/1.5 var(--sans);color:var(--ex-muted)}
.osdi-explorer.screen-slide .osdi-evidence-states strong{display:block;font:500 14px/1.55 var(--sans);color:var(--ex-ink)}
.osdi-explorer.screen-slide .osdi-screen-body .osdi-evidence-note{font:14px/1.7 var(--sans)!important;margin:10px 0!important}
.osdi-explorer.screen-slide .osdi-screen-body .osdi-evidence-scope{font:12px/1.65 var(--sans)!important;margin:10px 0!important;color:var(--muted)}
/* No media-query rearrangement inside the canvas; its frame scales as one object. */
@media(prefers-reduced-motion:reduce){#fig-models .qwen-story-node{transition:none}}
@media print{#fig-models .model-story-tabs{display:none}#fig-models.screen-slide .qwen-story-panel{position:relative!important;display:grid!important;grid-template-columns:60% 1fr!important;width:100%!important;height:auto!important;break-before:page}#fig-models .qwen-story-graph{width:760px;transform:scale(.6);transform-origin:top left;height:300px}#fig-models .qwen-story-detail{height:auto!important;padding:12px!important}#fig-models .qwen-story-detail p{font-size:11pt!important}}

.chapter-explorer.screen-slide .explorer-heading p{color:var(--ex-muted)!important}
.chapter-one-visual.screen-slide .sr-only{font:16px/1.5 var(--sans)!important;margin:0!important}

#fig-linux.screen-slide .linux-bar{padding-top:0;padding-bottom:0}
#fig-linux.screen-slide .bar-name{line-height:1.25}

/* Chapter opening and 1.1: a clearer reading hierarchy inside the approved canvases. */
[data-reading-page=chapter1] .reader-head h1{font-family:var(--sans);font-weight:650;line-height:1.45;letter-spacing:-.02em}
[data-reading-page=chapter1] .reader-head .deck{font-size:17px;line-height:1.85}
.foundation-reading .foundation-intro .manuscript>p,.foundation-reading #ch01-s01 .reading-module>p{font-family:var(--sans);line-height:1.9}
.foundation-reading .foundation-intro .manuscript>p:first-child{font-size:19px;margin-top:0}
.foundation-reading #ch01-s01 .reading-module>p>strong{font-weight:650;color:var(--brand)}
.foundation-intro .foundation-route{margin:26px 0 30px}
.foundation-intro .foundation-route a{padding:16px 18px;gap:7px}
.foundation-intro .foundation-route span{font-size:13px}
#ch01-s01 .foundation-modules{margin-bottom:26px}
#fig-linux,#fig-models,#fig-public-goods{--line:#9bb0bb}
[data-theme=dark] :is(#fig-linux,#fig-models,#fig-public-goods){--line:#597684}
#fig-linux.screen-slide .bar-name{font-size:18px;line-height:1.2}
#fig-linux.screen-slide .linux-kpis button{border-width:1.5px}
#fig-linux.screen-slide .linux-kpis button[aria-pressed=true]{box-shadow:inset 3px 0 var(--brand)}
#fig-linux.screen-slide .viz-selection{border:1.5px solid var(--line);border-left:3px solid var(--brand);border-radius:6px}
#fig-linux.screen-slide .viz-boundary{font-size:15px!important;line-height:1.8!important;top:562px}
#fig-models.screen-slide .model-story-tabs{height:40px;top:136px}
#fig-models.screen-slide .model-story-tabs button{font-size:17px;min-height:40px;padding:6px 18px}
#fig-models.screen-slide .month-endpoints{display:block;height:34px}
#fig-models.screen-slide .month-endpoints span{position:absolute;left:var(--tick);transform:translateX(-50%);font-size:14px;white-space:nowrap}
#fig-models.screen-slide .month-endpoints span:before{content:"";position:absolute;left:50%;top:-11px;height:6px;width:1px;background:var(--muted)}
#fig-models.screen-slide .month-control{padding:8px 14px;gap:14px}
#fig-models .month-control button{width:36px;height:36px;flex:none;padding:0;border:1px solid var(--line);border-radius:5px;background:var(--paper);color:var(--ink);font-size:25px;line-height:1}
#fig-models .month-control button:disabled{opacity:.35;cursor:default}
#fig-models .month-control input{min-width:0}
#fig-models .qwen-story-node{text-align:center;border-width:1.5px}
#fig-models .qwen-story-node small{font-size:14px;color:var(--brand)}
#fig-models .qwen-story-graph path{transition:stroke-width .18s,opacity .18s}
#fig-models.has-qwen-selection .qwen-story-graph path{opacity:.16}
#fig-models .qwen-story-graph path.is-selected{opacity:1;stroke-width:3.5}
#fig-public-goods.screen-slide .public-goods-layout .viz-label{font-size:15px;color:var(--ink);font-weight:600;text-align:center}
#fig-public-goods.screen-slide .dpg-grid button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;text-align:center;border-width:1.5px}
#fig-public-goods.screen-slide .dpg-grid button[aria-pressed=true]{box-shadow:inset 0 -3px var(--brand);border-color:var(--brand)}
#fig-public-goods.screen-slide .dpg-grid b{margin:0}
#fig-public-goods.screen-slide .dpg-selection{border:1.5px solid var(--line);border-left:3px solid var(--brand);border-radius:5px}
@media(max-width:800px){[data-reading-page=chapter1] .reader-head .deck{font-size:16px}.foundation-reading .foundation-intro .manuscript>p:first-child{font-size:18px}.foundation-intro .foundation-route a{padding:13px 10px}}
@media(max-width:520px){.foundation-intro .foundation-route{grid-template-columns:1fr;gap:8px}.foundation-intro .foundation-route a{display:grid;grid-template-columns:30px 1fr;gap:4px 9px}.foundation-intro .foundation-route small{grid-row:1/3;align-self:center}.foundation-intro .foundation-route span{grid-column:2}}
@media(prefers-reduced-motion:reduce){#fig-models .qwen-story-graph path{transition:none}}
@media print{.foundation-reading .foundation-intro .manuscript>p:first-child{font-size:12pt}.foundation-reading .foundation-intro .manuscript>p,.foundation-reading #ch01-s01 .reading-module>p{font-size:11pt;line-height:1.8}}
.chapter-download-edition{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;margin:0 0 28px;border:1px solid var(--line);border-left:3px solid var(--brand);background:var(--paper);border-radius:8px}
.chapter-download-edition strong{display:block;font-size:15px;line-height:1.5;color:var(--ink)}
.chapter-download-edition span{display:block;margin-top:5px;font-size:13px;line-height:1.7;color:var(--muted)}
.chapter-sample-pdf{flex-shrink:0;font-size:14px;line-height:1.5;color:var(--brand);border:1px solid currentColor;border-radius:6px;padding:10px 14px;text-decoration:none}
.chapter-sample-pdf:hover,.chapter-sample-pdf:focus-visible{background:var(--pale);outline:2px solid var(--brand);outline-offset:3px}
@media(max-width:600px){.chapter-download-edition{align-items:flex-start;flex-direction:column;gap:12px;padding:16px}.chapter-sample-pdf{align-self:flex-start}}
@media print{.chapter-download-edition{display:none!important}.foundation-reading .chapter-print-figure[src*="/print/"]{max-height:245mm;width:100%;object-fit:contain;break-before:auto;break-after:auto;break-inside:avoid}}

/* Publication captions sit below the content in both embedded and full-screen views. */
.foundation-figure.screen-slide>figcaption{display:block!important;text-align:center!important;font:13px/1.6 var(--sans)!important;color:var(--muted)!important}
.foundation-figure.screen-slide>figcaption *{text-align:inherit}
.foundation-reading .reading-chart-tools{margin-left:auto}
