/* Readability guardrails. Preserve each page's layout, palette, and content. */
html{font-size:16px}
body{font-size:16px;line-height:1.75}
body :is(button,input,select,textarea,.button){font-size:16px!important;line-height:1.5;min-height:44px}
body :is(button,.button){white-space:normal;overflow-wrap:break-word}
body :is(pre,.question-code,.code-card pre,.book-body pre){font-size:14px!important;line-height:1.85;max-width:100%;overflow-x:auto}
body pre code{font-size:inherit}
body :is(p,li,h1,h2,h3,h4,summary,label){overflow-wrap:break-word}
body :is(.lab-nav a,.learn-nav a,.book-nav a,.lesson-tools a,.section-jumps a,.scenario-picker button,.playback button,.code-head button,.pool-settings label,.pool-region h4,.worker,.pool-stats,.source-links,.references,.boundary-note,.timeline-foot,.speed-control,.lab-label,.lane-head,.metric>span,.thread-status,.lock-bracket,.expected,.code-steps code,.heatmap,.heatmap small,.bar-row,.subtle,.safe-note,.muted-link,.book-body .version,.state-info code,.reading-check){font-size:14px!important;line-height:1.7}
body :is(.lab-nav a,.learn-nav a,.book-nav a,.lesson-tools a,.code-head button,.q-nav button){min-height:44px}
body :is(.lesson-card p,.lifecycle-sample small){font-size:14px!important}
body :is(.lab-breadcrumb,.eyebrow,.sidebar-topic,.lesson-card .card-top,.lesson-card .card-foot,.book-nav-head small,.book-number,.nav-num,.code-line i,.badge){font-size:14px!important;line-height:1.7}
body :is(.code-head,.state-heading,.step-count,.metric>span,#progress-label,#timeline .value){font-size:14px;line-height:1.7}
body :is(.boundary-note,.references,.source-links,.timeline-foot,.pool-stats,.pool-region h4,.lab-label,.speed-control,.lesson-count,.local-progress p,.trace-step,.search-summary,.site-footer,.nav-group){color:var(--muted,#526176)}
body :is(.trace-step .step-index,.nav-num){color:#67675f}
body .q-nav button{min-width:44px}
body :is(.grid2,.grid3,.code-grid)>*{min-width:0}
body :is(.book-body p,.lead,.scene-detail,.intro>p:not(.eyebrow)){font-size:16px!important}
body .book-body pre{white-space:pre}
body .thread h2{white-space:normal}
body .code-steps{overflow-x:auto}
body :is(.lesson-tools,.q-top,.code-head,.scene-top){flex-wrap:wrap}
body .learning-page .bar-row{min-width:0}
body .bar-row>*{min-width:0;overflow-wrap:anywhere}
body .practice-page pre{font-size:14px}
/* Geometry may scale; all diagram text is ordinary HTML, never SVG text. */
.lifecycle-page.workspace-prototype .state-map{height:350px;margin:16px 24px 0}
.lifecycle-page.workspace-prototype .state-node{width:24%;height:80px;padding:10px 6px}
.lifecycle-page.workspace-prototype .state-node span{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.lifecycle-page.workspace-prototype .state-node small{font-size:14px;line-height:1.6}
.lifecycle-page.workspace-prototype .state-map .n1,.lifecycle-page.workspace-prototype .state-map .n4{left:38%}
.edge-label{position:absolute;display:grid;place-items:center;width:28px;height:28px;border:1px solid #99adc5;border-radius:50%;font:600 14px/1 system-ui;background:#fff;color:#34465e;transform:translate(-50%,-50%)}
.e1{left:30.5%;top:18%}.e2{left:69%;top:18%}.e3{left:28%;top:47%}.e4{left:48%;top:51%}.e5{left:72%;top:47%}.e6{left:30.5%;top:79%}.e7{left:50%;top:96%}
.transition-guide{padding:22px 24px 24px;border-top:1px solid var(--line);margin-top:12px}
.transition-guide h3{font-size:17px;margin:0 0 16px}
.transition-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 38px;margin:0;padding-left:26px;font-size:14px;line-height:1.75}
.transition-list li{padding-left:4px;min-width:0}.transition-list li::marker{font-weight:700;color:#1557ac}.transition-list b{display:block;font:600 14px/1.7 ui-monospace,Consolas,monospace;overflow-wrap:anywhere}.transition-list p{margin:5px 0 0}
.lifecycle-page.workspace-prototype .state-info p,.lifecycle-page.workspace-prototype .state-info code{font-size:14px;line-height:1.85}
.lifecycle-page.workspace-prototype .state-info>div{min-width:0}
.lifecycle-page.workspace-prototype .timeline{grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:10px}
.lifecycle-page.workspace-prototype .timeline button{height:100%;min-height:92px;padding:12px;align-items:flex-start;text-align:left;line-height:1.6}
.lifecycle-page.workspace-prototype .timeline small{font-size:14px;line-height:1.6;max-width:none;white-space:normal;overflow-wrap:break-word}
.lifecycle-page.workspace-prototype .timeline span{font-size:16px;margin-bottom:5px}
.lifecycle-page.workspace-prototype .thread strong{font-size:14px;letter-spacing:0;overflow-wrap:anywhere}
.lifecycle-page.workspace-prototype .thread>span:last-child,.lifecycle-page.workspace-prototype .monitor{font-size:14px;line-height:1.7}
.lifecycle-page.workspace-prototype :is(.footnote,.story-note,.continue-hint,.sources,.code-head span,.code-grid h4){font-size:14px;line-height:1.8}
.lifecycle-page.workspace-prototype .thread{min-width:0}
.lifecycle-page.workspace-prototype .stage{height:auto;min-height:280px;padding:24px 12px;gap:16px}
.lifecycle-page.workspace-prototype .scene-top h3{min-width:0}
@media(max-width:800px){
 .lifecycle-page.workspace-prototype .state-map{height:auto;margin:18px}
 .lifecycle-page.workspace-prototype .state-map>svg,.edge-markers{display:none}
 .lifecycle-page.workspace-prototype #state-nodes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .lifecycle-page.workspace-prototype .state-node{position:static;width:100%;height:auto;min-height:80px}
 .transition-guide{padding:20px 18px}.transition-list{grid-template-columns:1fr;gap:17px}
 .lifecycle-page.workspace-prototype .state-info{display:block;padding:18px}
 .lifecycle-page.workspace-prototype .state-info h3{margin-bottom:12px}
}
@media(max-width:600px){
 .lifecycle-page.workspace-prototype #state-nodes{grid-template-columns:1fr}
 .lifecycle-page.workspace-prototype .state-node{align-items:flex-start;padding:12px 16px;min-height:72px}
 .lifecycle-page.workspace-prototype .stage{display:grid;grid-template-columns:1fr;padding:20px;gap:20px}
 .lifecycle-page.workspace-prototype .stage .connections{display:none}
 .lifecycle-page.workspace-prototype .thread{width:100%;display:grid;grid-template-columns:56px minmax(0,1fr);column-gap:16px;text-align:left;align-items:center}
 .lifecycle-page.workspace-prototype .thread .avatar{grid-row:1 / span 2}
 .lifecycle-page.workspace-prototype .thread>span:last-child{grid-column:2}
 .lifecycle-page.workspace-prototype .monitor{width:100%;max-width:none;padding:14px;justify-self:center}
 .lifecycle-page.workspace-prototype .timeline{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .bar-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}
 body .bar-row progress{grid-column:1 / -1;grid-row:2}
 body .code-head h3{white-space:normal}
}
@media print{.lifecycle-page.workspace-prototype .state-map{break-inside:avoid}.transition-list{display:block}.transition-list li{margin-bottom:12px}}

/* Compact labels remain legible; numbering is not a reason to shrink the type. */
body :is(.lesson-count,.local-progress,.local-progress p,.nav-group,.search-summary,.site-footer,.learn-footer,.simulation-label,.trace-step .step-index,.code-steps li>span,.scene-top span,.section-head>span,.map-group-title>span,.nav-num,.event-kicker,.quiz-label,.card-top,.card-foot,footer),body #timeline .index,body #timeline .badge,body .learn-nav a::before{font-size:14px!important;line-height:1.7}
body :is(small,.brand small,.search-wrap kbd,.breadcrumb,.mobile-count,.lane-mark,.section-title .section-number,.quiz-option .letter,.original-link,.lifecycle-sample span,.intro nav){font-size:14px!important;line-height:1.7}
body :is(.scenario-description,.takeaways p,.event-card>p:last-child,.map-note p,.route-card p,.pool-description,.pool-message,.transition-list p,.state-info p,.reading details p){font-size:16px!important;line-height:1.8}
body .lesson-meta{font-size:14px;line-height:1.7;white-space:normal}
