/* Course typography and the harbour share one palette. */
:root{--district-1:#0969bd;--district-2:#906011;--district-3:#366fad;--district-4:#147a83;--district-5:#467354;--district-6:#836342;--district-7:#895a9a;--district-8:#9a593a;--correct:#22613c;--wrong:#9c3e26;--ring-reach:6px}
[data-theme=dark]{--district-1:#80c6ff;--district-2:#e5ba68;--district-3:#91bbef;--district-4:#7cd1d2;--district-5:#9bcea4;--district-6:#d3b286;--district-7:#cfabe2;--district-8:#e5b097;--correct:#a4e4b7;--wrong:#ffc5ad}
#main.port-beats{display:block;padding:0;overflow:clip;min-height:0}.port-beat{position:relative;height:100%;width:100%;max-width:none;margin:0;padding:26px 44px 0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:24px;min-height:0;min-width:0}.port-beat>header{position:relative;min-width:0;padding:0}#main .port-beat h1{font:750 var(--h1-size)/1.15 Manrope,sans-serif;letter-spacing:-1.5px;color:var(--ink);margin:0;max-width:33ch;overflow-wrap:break-word}.port-beat h1:focus{outline:none}.beat-crew{position:absolute;right:0;top:0;pointer-events:none}.beat-crew span{display:none}.beat-crew svg{width:78px;height:44px;opacity:.75}.port-beat>header:has(h1:not(:only-child)){padding-right:84px}
.beat-body{width:100%;max-width:none;margin:0;min-width:0;min-height:0;padding:var(--ring-reach) var(--ring-reach) 28px;overflow:auto;overscroll-behavior:contain;scroll-padding:12px;font:var(--body-size)/1.65 Manrope,sans-serif;container-type:inline-size}.beat-body>*{min-width:0}.beat-body p,.beat-body li,.beat-body dt,.beat-body dd,.beat-body label{font:inherit;color:var(--ink)}.beat-body p{margin:0 0 20px;max-width:62ch}.beat-body ul,.beat-body ol{padding-left:24px}.beat-body h2{font:700 var(--h2-size)/1.25 Manrope,sans-serif;margin:0 0 20px;color:var(--ink);letter-spacing:-.5px}.beat-body h3{font:700 var(--h3-size)/1.35 Manrope,sans-serif;margin:24px 0 12px;color:var(--ink)}.beat-body :is(.eyebrow,.kicker,.quiz-meta,.level-tag,.tag,.badge,.chip,.progress-bar,hr){display:none!important}.beat-body :is(small,.learning-note,.research-field-footer,.terminal-note,.challenge-brief-line){font:var(--small-size)/1.6 Manrope,sans-serif;color:var(--muted)}
#main .port-beat :is(.panel,.lesson-chunk,.case-focus,.case-focus-decision,.case-context,.case-solved,.challenge-focus,.lab-instructions,.graduate-section,.graduate-arguments,.graduate-argument,.graduate-transfer,.graduate-sources,.capstone-contract,.capstone-defense,.experiment-contract,.experiment-launch,.published-validation,.research-field,.checkpoint-feedback,.feedback,.passed-answer,.chunk-insight,.terminal-hint,.check-row,.checks,.module-code-example,.flow-code,.worked-example,.cpu-budget,.capstone-capacity,.capacity-metrics>div,.cpu-metrics>div,.journal-entry){background:transparent;border:0;border-radius:0;box-shadow:none;padding:0;min-width:0;max-width:none;height:auto;min-height:0;overflow:visible;color:var(--ink)}#main .port-beat .lesson-chunk,#main .port-beat .worked-example{display:block;margin:0;width:100%}.port-beat .chunk-prose{font:inherit;max-width:62ch}.port-beat .chunk-insight{margin:24px 0!important;padding-left:18px!important;border-left:2px solid var(--beat-tone)!important}.port-beat .feedback,.port-beat .checkpoint-feedback{font:inherit;margin:20px 0!important}.port-beat .feedback p{display:block;margin:12px 0}.port-beat .feedback:empty{display:none}.port-beat .checkpoint-feedback :is(h3,b,p,li){font-size:inherit}.port-beat .passed-answer{font:inherit;margin:12px 0}.port-beat .case-study-links,.port-beat .case-practice-actions{display:flex;flex-wrap:wrap;gap:16px}.port-beat .case-focus{display:block!important}.port-beat .case-focus-decision h2{font-size:var(--h2-size)}
#main .port-beat .screen-navigation{display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:20px;position:static;min-height:64px;width:100%;max-width:none;margin:0;padding:9px 0;background:transparent;border:0;box-shadow:none;overflow:visible}.screen-navigation>[data-frame-back]{margin-right:auto;order:0}.screen-navigation>.primary{order:3}.screen-navigation>.text-button:not([data-frame-back]){order:1}#main .port-beat :is(button,a,summary){hyphens:none;word-break:normal;overflow-wrap:break-word}#main .port-beat :is(button:not(.primary):not(.quiz-option),a:not(.primary),summary){border:0;border-radius:0;box-shadow:none;background:transparent;color:var(--purple);font:var(--small-size)/1.5 Manrope,sans-serif;text-decoration:underline;text-underline-offset:4px;min-height:44px;padding:10px 0;display:inline-flex;align-items:center;gap:8px}#main .port-beat :is(button.primary,a.primary){background:var(--purple);color:var(--paper);border:0;border-radius:6px;font:700 var(--small-size)/1.4 Manrope,sans-serif;min-height:44px;padding:12px 20px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:14px;flex-shrink:0}#main .port-beat .primary kbd{font:var(--mono-size) 'IBM Plex Mono',monospace;color:inherit;margin:0;opacity:.85}#main .port-beat .confidence-toggle[aria-pressed=true]::before{content:'✓ '}
#main .port-beat .quiz-option{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap;width:100%;min-height:56px;text-align:left;border:0;border-radius:0;background:transparent;box-shadow:none;padding:12px 4px;margin:0 0 12px;color:var(--ink);font:var(--body-size)/1.6 Manrope,sans-serif;opacity:1;transform:none}.port-beat .option-letter{font:var(--mono-size)/1.8 'IBM Plex Mono',monospace;flex-shrink:0;width:26px;height:auto;color:var(--muted);border:0;background:transparent;border-radius:0;padding:0}.port-beat .option-letter:after{content:'.'}#main .port-beat .quiz-option:is(.selected,[aria-pressed=true]){color:var(--purple)}#main .port-beat .quiz-option:is(.selected,[aria-pressed=true]):not(.wrong,.correct) .option-letter:after{content:' ✓'}#main .port-beat .quiz-option.correct,#main .port-beat .quiz-option.correct .option-letter{color:var(--correct)}#main .port-beat .quiz-option.wrong,#main .port-beat .quiz-option.wrong .option-letter{color:var(--wrong)}.port-beat .beat-verdict{font-size:var(--small-size);flex:1 1 100%}.port-beat .quiz-option.wrong .option-letter:after{content:' ✕'}.port-beat .quiz-option.correct .option-letter:after{content:' ✓'}
#main .port-beat :is(pre,.code-block,.beat-output,.cpu-config,textarea.editor,textarea.parameter-code){font:var(--mono-size)/1.65 'IBM Plex Mono',monospace;background:#0e2235;color:#e4f0f5;border:0;border-radius:8px;padding:20px;white-space:pre-wrap;overflow-wrap:anywhere;margin:0 0 20px;max-height:none;overflow:auto;box-shadow:none}#main .port-beat :is(pre,code) code{font:inherit;color:inherit;background:transparent;padding:0}#main .port-beat code{font-family:'IBM Plex Mono',monospace;font-size:var(--mono-size)}.port-beat .flow-code pre{margin:0}.port-beat .flow-code{margin:12px 0!important}.port-beat .module-code-example h3{font-size:var(--h3-size)}.port-beat textarea{width:100%;max-width:100%;min-height:120px;font:var(--body-size)/1.6 Manrope,sans-serif;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--ink);padding:12px;resize:vertical}.port-beat .research-field{margin:24px 0!important}.port-beat .research-field label{display:block;margin-bottom:12px}.port-beat textarea.parameter-code{display:block;min-height:130px;resize:vertical}.parameter-error{color:var(--wrong);font-size:var(--small-size)}
#main .port-beat details{background:transparent;border:0;border-radius:0;box-shadow:none;padding:0;margin:16px 0}#main .port-beat summary{display:list-item;list-style:disclosure-closed;min-height:44px;padding:10px 0;width:fit-content;color:var(--purple);font-size:var(--small-size)}#main .port-beat details[open]>summary{list-style:disclosure-open}#main .port-beat details>summary:after{display:none}.port-beat details[open]>:not(summary){margin-top:16px}.port-beat .beat-sources a{display:flex!important;width:fit-content}.port-beat .beat-notes>.graduate-section>h3{display:none}.port-beat .beat-mechanism{width:100%;margin:0!important;padding:0!important;border:0!important;background:transparent;min-width:0}.beat-mechanism .embedded-flow{display:block}.beat-mechanism .embedded-heading,.beat-mechanism .embedded-caption,.beat-mechanism .embedded-reading,.beat-mechanism .embedded-scenes,.beat-mechanism .mechanism-share,.beat-mechanism .embedded-trace,.beat-mechanism .lecture-visual-top,.beat-mechanism .mechanism-map-help,.beat-mechanism .mechanism-transfer,.beat-mechanism .mechanism-legend,.beat-mechanism .lecture-mode,.beat-mechanism .embedded-command{display:none!important}.beat-controls :is(.embedded-heading,.embedded-caption,.embedded-reading,.embedded-scenes,.mechanism-share,.embedded-trace,.embedded-command){display:block!important}.beat-controls .embedded-heading .eyebrow,.beat-controls .embedded-reading .eyebrow{display:none!important}#main .beat-mechanism .lecture-visual{display:flex;flex-direction:column;padding:0;border:0;border-radius:0;background:transparent;min-height:0;overflow:visible}.beat-mechanism .mechanism-event{border:0;border-radius:0;background:transparent;padding:0;margin:0 0 18px;min-height:0}.beat-mechanism .mechanism-event-line{display:block}.beat-mechanism .mechanism-event-line strong{display:block;font:700 var(--h3-size)/1.35 Manrope,sans-serif;margin-bottom:12px}.beat-mechanism [data-mechanism-output]{display:block;font:var(--mono-size)/1.65 'IBM Plex Mono',monospace;background:#0e2235;color:#e4f0f5;border-radius:8px;padding:16px;white-space:pre-wrap}.beat-mechanism .mechanism-viewport{height:350px;max-height:none;min-height:160px;margin:0;overflow:auto;border:0;background:transparent}.beat-mechanism .lecture-stage{height:100%!important;background:transparent}.beat-mechanism .mechanism-diagram{height:100%!important;object-fit:contain}.beat-mechanism .lecture-transport{display:flex;align-items:center;justify-content:space-between;gap:16px;order:2;padding:0;background:transparent;border:0}.beat-mechanism [data-mechanism-next]{min-width:44px}.beat-mechanism .mechanism-scrub{display:none}.beat-mechanism .mechanism-event-index{display:none}.beat-mechanism .mechanism-roadmap{display:block;margin:0;padding-left:24px}.beat-mechanism .mechanism-roadmap li{background:transparent;border:0;padding:12px 0}.beat-mechanism .mechanism-step-number{border:0;background:transparent}.beat-mechanism .mechanism-model-notes{display:block}.beat-mechanism .mechanism-model-notes section{background:transparent;border:0;padding:0}.mechanism-choices{display:flex;flex-wrap:wrap;gap:8px 20px}.mechanism-choices [aria-pressed=true]{font-weight:700}.mechanism-choices [aria-pressed=true]:before{content:'✓ '}
.lab-pips{display:flex;flex-direction:column;gap:20px;max-height:240px;min-height:64px;overflow:auto;scroll-padding:8px;padding:8px var(--ring-reach);margin:0 0 20px}.lab-pips>span{display:flex;align-items:flex-start;gap:16px;min-height:44px;border:0;background:transparent;color:var(--muted);font:var(--body-size)/1.6 Manrope,sans-serif}.lab-pips>span>i{position:relative;display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border:1px solid var(--line);border-radius:50%;font:var(--mono-size) 'IBM Plex Mono',monospace;font-style:normal}.lab-pips>span:not(:last-child)>i:after{content:'';position:absolute;top:32px;left:15px;height:20px;border-left:1px solid var(--line)}.lab-pips .done{color:var(--correct)}.lab-pips .done>i{border-color:var(--correct)}.lab-pips>span:not(.done):has(~span),.lab-pips>span:last-child:not(.done){color:var(--ink)}.lab-terminal{display:flex;flex-direction:column;min-width:0;min-height:220px;max-height:100%;height:100%;overflow:hidden;background:#0e2235;color:#e4f0f5;border-radius:10px;padding:18px;font:var(--mono-size)/1.65 'IBM Plex Mono',monospace}.lab-terminal-title{color:#b8d2e4;font:inherit;margin-bottom:16px}#terminal-output{flex:1;min-height:0;overflow:auto;padding:4px;white-space:pre-wrap;font:inherit;background:transparent;border:0;border-radius:0;margin:0;color:#e4f0f5}#terminal-output .command{color:#f0cf91}#terminal-output .error{color:#ffd3c1}#terminal-form{display:flex;align-items:center;gap:12px;min-height:48px;border:0;margin-top:12px;padding:0}#terminal-form label{font:inherit;color:#8bd4df;white-space:nowrap}#terminal-input{width:0;min-width:0;flex:1;min-height:44px;padding:8px 4px;background:transparent;border:0;border-radius:0;color:#e4f0f5;box-shadow:none;font:inherit}#terminal-input:focus{outline:3px solid #80c6ff;outline-offset:0}#terminal-input::placeholder{color:#b8d2e4}
#main[data-beat-type=lab-terminal] .beat-body,#main[data-beat-type=lab-result] .beat-body{display:grid;grid-template-columns:minmax(260px,1fr) minmax(0,1.6fr);grid-template-rows:minmax(0,1fr);gap:24px;overflow:hidden}#main[data-beat-type=lab-result] .beat-body{grid-template-rows:auto auto minmax(0,1fr)}#main[data-beat-type=lab-result] .lab-terminal{grid-column:2;grid-row:1/4}.lab-goals{min-height:0;overflow:auto;padding:var(--ring-reach)}.dockerfile-workspace{display:flex;flex:1;min-height:240px;overflow:hidden;border:0;border-radius:8px;background:#0e2235}.dockerfile-gutter{width:calc(var(--gutter-ch,2)*1ch + 24px);flex-shrink:0;padding:20px 4px;overflow:hidden;background:transparent;color:#b8d2e4;font:var(--mono-size)/23.1px 'IBM Plex Mono',monospace}.dockerfile-gutter span{display:block;height:23.1px;text-align:right;padding-right:12px;border:0;background:transparent}#main .port-beat .dockerfile-workspace textarea.editor{width:0;flex:1;height:100%;min-height:0;margin:0;padding:20px 12px;border:0;border-radius:0;resize:none;white-space:pre;line-height:23.1px;tab-size:2}.challenge-brief-line{margin:0!important}.journal-entry{display:block!important;text-decoration:none!important;margin:16px 0!important;font:var(--body-size)/1.65 Manrope,sans-serif!important}.journal-entry p{white-space:pre-wrap}.journal-inspections article{margin:28px 0}.journal-stacks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.journal-stack{display:flex!important;flex-direction:column;align-items:flex-start!important}.journal-stack svg{width:100%;height:120px}.journal-stack b{font-size:var(--body-size)}.journal-layer.ghost{opacity:.2}.capacity-metrics,.cpu-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-block:20px}.capacity-metrics dd,.cpu-metrics dd{margin:0}.cpu-config{display:block}.cpu-timeline,.capacity-chart{margin:24px 0}.cpu-legend{display:flex;gap:16px}.cpu-lane{display:flex;gap:8px;margin:12px 0}.cpu-periods{display:flex;flex:1;height:28px}.cpu-period{display:flex;flex:1;border-right:2px solid var(--paper)}.cpu-running{display:inline-block;background:var(--purple)}.cpu-waiting{display:inline-block;background:var(--line)}.cpu-ticks{display:flex;justify-content:space-between}.capacity-chart svg{width:100%;height:180px;overflow:visible}.capacity-chart polyline{fill:none;stroke:var(--purple);stroke-width:3}.capacity-axis,.capacity-limit,.capacity-phase{fill:none;stroke:var(--muted);stroke-width:1}.capacity-limit,.capacity-phase{stroke-dasharray:4 4}.capacity-time-labels{display:flex;justify-content:space-between}
#main[data-beat-type=welcome] [data-email-signin]{display:grid;gap:16px;max-width:540px}#main[data-beat-type=welcome] [data-email-signin] input{width:100%;min-height:48px;padding:10px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--ink);font-size:var(--body-size)}#main[data-beat-type=welcome] .beat-body,#main[data-beat-type=arrival] .beat-body{max-width:70ch;margin-inline:auto}#main[data-beat-type=welcome] .port-beat>header,#main[data-beat-type=arrival] .port-beat>header{width:100%;max-width:70ch;margin:auto}#main .beat-body table{font-size:var(--small-size);width:100%}#main .beat-body th,#main .beat-body td{border:0;background:transparent;padding:12px 8px}@media(min-width:1100px){
 #main[data-beat-type=journal] .beat-body{display:grid;grid-template-columns:1fr 1.3fr;gap:64px}#main[data-beat-type=incident] .case-brief>summary{display:none}#main[data-beat-type=incident] .case-brief:not([open])>:not(summary){display:block}
}
@media(max-width:1099px){:root{--h1-size:34px;--h2-size:26px;--h3-size:20px}.port-beat{padding:20px 24px 0;gap:20px}.screen-navigation>.primary{margin-left:auto}.port-beat .screen-navigation{gap:16px!important}.beat-mechanism .mechanism-viewport{height:300px}.beat-crew svg{width:60px}.port-beat>header:has(h1:not(:only-child)){padding-right:64px}}
@media(max-width:699px){:root{--h1-size:30px;--h2-size:24px;--h3-size:20px;--body-size:18px}.port-beat{padding:16px 16px 0;gap:18px}.beat-body{padding:var(--ring-reach) var(--ring-reach) 12px}.beat-crew{display:none}.port-beat>header:has(h1:not(:only-child)){padding:0}#main .port-beat h1{letter-spacing:-.8px}#main .port-beat .screen-navigation{gap:12px;min-height:64px}.screen-navigation>[data-frame-back]{display:none!important}#main .port-beat .screen-navigation>.primary{max-width:calc(100% - 64px)}.screen-navigation>.text-button:not([data-frame-back]){margin-left:auto}.beat-mechanism .mechanism-viewport{height:310px}.beat-mechanism .mechanism-event-line strong{font-size:var(--h3-size)}.lab-pips{max-height:148px;min-height:64px;gap:12px;margin-bottom:12px}.lab-pips>span{font-size:var(--small-size)}#main[data-beat-type=lab-terminal] .beat-body,#main[data-beat-type=lab-result] .beat-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(150px,1fr);gap:12px}#main[data-beat-type=lab-result] .beat-body{grid-template-rows:auto auto auto minmax(120px,1fr)}#main[data-beat-type=lab-result] .lab-terminal{grid-column:1;grid-row:4}.lab-terminal{min-height:0;padding:12px}.lab-terminal-title{margin-bottom:6px}.lab-goals{max-height:220px}.journal-stacks{grid-template-columns:repeat(2,minmax(0,1fr))}.capacity-metrics,.cpu-metrics{grid-template-columns:1fr}.port-beat :is(a,button,summary){text-wrap:pretty}}
@media(max-height:500px){:root{--h1-size:28px;--h2-size:24px;--h3-size:20px}.port-beat{padding:8px 24px var(--ring-reach);gap:12px}.beat-crew{display:none}.port-beat>header:has(h1:not(:only-child)){padding:0}#main .port-beat .screen-navigation{min-height:56px;padding-block:5px}.beat-body{padding-bottom:14px}#main[data-beat-type=lab-terminal] .port-beat>header{display:none}#main[data-beat-type=lab-terminal] .port-beat{grid-template-rows:minmax(0,1fr) auto}#main[data-beat-type=lab-terminal] .beat-body{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);grid-template-rows:minmax(0,1fr)}.lab-pips{max-height:140px;margin-bottom:0;gap:12px}.lab-pips>span{font-size:var(--small-size)}.lab-terminal{padding:12px;min-height:0}.lab-terminal-title{display:none}.lab-goals{overflow:auto}.beat-mechanism .mechanism-viewport{height:180px;min-height:150px}}
html[data-port-short=true] #main[data-beat-type=lab-terminal] .port-beat>header{display:none}html[data-port-short=true] #main[data-beat-type=lab-terminal] .port-beat{grid-template-rows:minmax(0,1fr) auto;gap:6px;padding-top:4px}html[data-port-short=true] #main[data-beat-type=lab-terminal] .lab-pips{max-height:68px;min-height:60px;margin:0}html[data-port-short=true] #main[data-beat-type=lab-terminal] .lab-goals>.text-button,html[data-port-short=true] #main[data-beat-type=lab-terminal] .beat-lab-controls{display:none!important}html[data-port-short=true] .lab-terminal-title{display:none}html[data-port-short=true] .lab-terminal{padding:8px}html[data-port-short=true] #main[data-beat-type=lab-terminal] .beat-body{grid-template-rows:auto minmax(70px,1fr)}
@media(hover:none),(pointer:coarse){.port-beat kbd{display:none}.preview-open>span{display:none}}
#main .port-beat .beat-mechanism .lecture-visual{background:transparent;border:0;box-shadow:none;color:var(--ink)}
#main .port-beat .beat-mechanism .mechanism-event{background:transparent;border:0;box-shadow:none;color:var(--ink)}
#main .port-beat .beat-mechanism .mechanism-event-line strong{color:var(--ink)}
#main .port-beat .beat-mechanism .mechanism-event [data-mechanism-output]{background:#0e2235;color:#e4f0f5}
#main .port-beat .beat-mechanism .mechanism-viewport{background:transparent;border:0;box-shadow:none}
#main.port-beats{--dl-learning-body-role:var(--body-size);--course-body:var(--body-size)}
#main.port-beats .quiz-option{--dl-learning-control-role:var(--body-size)}
/* The learning contract floors every control at its role size (learning-contracts.css): declare the port's own roles,
   or its 15 px actions and terminal fall back to the contract's 14 px. */
#main.port-beats .port-beat :is(button,a,summary):not(.quiz-option){--dl-learning-control-role:var(--small-size)}#main.port-beats :is(.lab-terminal,.port-console,textarea.parameter-code){--dl-learning-control-role:var(--mono-size)}#main.port-beats .port-beat textarea:not(.editor):not(.parameter-code){--dl-learning-control-role:var(--body-size)}@media(min-width:1100px){#main.port-beats .port-beat .research-field textarea{height:110px;min-height:110px}}
#main.port-beats .quiz-option .option-letter{white-space:nowrap;width:32px;min-width:32px}
#main.port-beats :is(.learning-note,.research-field-footer,.challenge-brief-line){--dl-learning-body-role:var(--small-size)}
#main .port-beat h1{text-wrap:balance}
#main .port-beat .beat-body summary{list-style-position:inside}
#console-output :is(button,a){min-width:44px}
/* A reading area with more below fades out at its foot, so the learner sees there is more to scroll; at the end the
   fade goes (beats.js keeps .has-more current on render, resize and scroll). */
#main .port-beat .beat-body.has-more{-webkit-mask-image:linear-gradient(#000 calc(100% - 56px),transparent);mask-image:linear-gradient(#000 calc(100% - 56px),transparent)}
/* Under 400px the radio, a text action and the primary action cannot share one row: the primary takes its own,
   full-width line under the others, where the thumb reaches it. */
@media(max-width:399px){#main .port-beat .screen-navigation{flex-wrap:wrap;row-gap:8px}#main .port-beat .screen-navigation>.primary{order:4;flex:1 0 100%;max-width:none;margin-left:0}}
@media(min-width:1100px){#main .port-beat .beat-mechanism-context>summary,#main .port-beat .case-brief>summary{display:none}}
@media(max-height:500px) and (min-width:700px){html[data-port-short=true] #main[data-beat-type=lab-terminal] .beat-body{grid-template-rows:minmax(0,1fr)}html[data-port-short=true] #main[data-beat-type=lab-terminal] .lab-pips{max-height:100%;min-height:64px}}
#main .port-beat #quiz-feedback:focus{outline:none}
#main .port-beat .capstone-defense-sections>section,#main .port-beat .comparison-totals>div,#main .port-beat .case-study-links{border:0;background:transparent;box-shadow:none}
#main .port-beat .comparison-totals :is(strong,small,b,span){font-size:var(--body-size);font-family:Manrope,sans-serif}
#main .port-beat .quiz-option{display:grid;grid-template-columns:32px minmax(0,1fr);gap:8px 16px}
#main .port-beat .quiz-option .beat-verdict{grid-column:2}
#main .port-beat .quiz-option>span{min-width:0}
@media(max-width:699px){:root{--body-size:16px}#main .port-beat .quiz-option{margin-bottom:8px;padding-block:10px}}
#main .port-beat>.screen-navigation{z-index:10}
#main .port-beat .primary kbd{opacity:1}
.lab-pips>span>span{font:inherit;line-height:inherit}
#main .port-beat .embedded-principle>b{font-size:var(--body-size)}
#main .port-beat .mechanism-step-number{font:var(--mono-size) 'IBM Plex Mono',monospace}
#main .port-beat :is(.comparison-choices,.notebook-choices,.case-mistake-choices){display:flex;flex-wrap:wrap;gap:4px 20px}
#main .port-beat :is(.comparison-choices,.notebook-choices,.case-mistake-choices) [aria-pressed=true]{font-weight:700}
#main .port-beat :is(.comparison-choices,.notebook-choices,.case-mistake-choices) [aria-pressed=true]:before{content:'✓ '}
#main .port-beat :is(.notebook-record,.notebook-empty,.notebook-totals,.notebook-filter-panel,.notebook-filter-footer,.comparison-totals,.comparison-pickers,.case-mistake-record){border:0;border-radius:0;background:transparent;box-shadow:none;padding:0;margin-block:20px}
#main .port-beat .notebook-filters{display:block}
#main .port-beat .quiz-option .option-letter{display:block;white-space:nowrap}
/* IBM Plex Mono draws U+2713 like a square root (√): the mark uses the same sans fallback as the feedback line's ✓. */
#main .port-beat .quiz-option .option-letter:after{display:inline;font-family:Manrope,sans-serif}
/* The same for a met lab objective: its ✓ takes the sans face, the pending numbers keep the mono one. */
.lab-pips .done>i{font-family:Manrope,sans-serif}
@media(min-width:1100px){#main .port-beat .beat-body .beat-mechanism-context>summary,#main .port-beat .beat-body .case-brief>summary{display:none}}
#main .port-beat .beat-body table :is(th,td,caption){font:var(--small-size)/1.6 Manrope,sans-serif}
#main .port-beat .beat-body :is(time,.date-tag,.notebook-record-meta){font:var(--small-size)/1.6 Manrope,sans-serif;border:0;border-radius:0;background:transparent;padding:0}
#main .port-beat .beat-body :is(.experiment-contract>div,.graduate-arguments>div,.experiment-launch>div,.published-validation>div,.defense-scroll-note){border:0;border-radius:0;background:transparent;box-shadow:none}
#main.port-beats .port-beat .beat-body :is(p,li,dt,dd,b,strong,span,div,label):not(svg *){font-size:inherit}
#main.port-beats .port-beat .beat-body :is(.learning-note,.research-field-footer,.challenge-brief-line,.mechanism-step-number,.option-letter,time,.date-tag,.notebook-record-meta){font-size:var(--small-size)}
#main.port-beats .port-beat .beat-body .mechanism-event-line strong{font-size:var(--h3-size)}
#main.port-beats .port-beat .beat-body figcaption{font:var(--small-size)/1.6 Manrope,sans-serif}
@media(max-height:500px) and (min-width:700px){
 #main .port-beat .beat-mechanism .lecture-visual{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,1.3fr);grid-template-rows:minmax(0,1fr) 44px;gap:8px}
 #main .port-beat .beat-mechanism .mechanism-event{grid-column:1;grid-row:1;margin:0}
 #main .port-beat .beat-mechanism .mechanism-viewport{grid-column:2;grid-row:1/3;height:180px;min-height:140px}
 #main .port-beat .beat-mechanism .lecture-transport{grid-column:1;grid-row:2}
}
#main.port-beats .port-beat .beat-body :is(.feedback,.case-review-answer,.checkpoint-feedback){background:transparent;border:0;border-radius:0;box-shadow:none;padding:0}
/* The compact body is inset by the focus ring's reach each side; the explanation spans the question's full width, as on desktop. */
@media(max-width:699px){#main .port-beat .beat-body .checkpoint-feedback{margin:20px calc(-1*var(--ring-reach))!important}}
@media(max-height:500px){#main[data-beat-type=lab-terminal] .port-beat>header{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0}}
html[data-port-short=true] #main[data-beat-type=lab-terminal] .port-beat>header{display:block;position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;padding:0}
#main.port-beats :is(button,input,textarea,select,summary,a){scroll-margin:8px}
.course-choices{display:flex;flex-wrap:wrap;gap:4px 20px}
.course-choices [aria-pressed=true]{font-weight:700}
.course-choices [aria-pressed=true]:before{content:'✓ '}
/* The learner's instruction for this screen: one line under the title, never a card. */
.port-beat .beat-ask{margin:10px 0 0;max-width:70ch;font:500 var(--body-size,16px)/1.5 Manrope,sans-serif;color:var(--ink);padding-left:12px;border-left:3px solid var(--beat-tone)}
.port-beat .beat-ask b{font-weight:750}
/* A file to download reads as step 1 of the experiment, with its name and size. */
.port-beat .beat-download{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:0 0 20px;font:600 calc(var(--body-size,16px) + 2px)/1.4 Manrope,sans-serif}
#main .port-beat p.beat-download a.beat-download-file{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border:2px solid var(--beat-tone);border-radius:8px;color:var(--ink);text-decoration:none;font:650 var(--body-size,16px)/1 Manrope,sans-serif}
#main .port-beat p.beat-download a.beat-download-file:hover{background:color-mix(in srgb,var(--beat-tone) 12%,transparent)}
.port-beat .beat-step-line{display:flex;align-items:center;margin:0 0 10px;font:600 var(--body-size,16px)/1.4 Manrope,sans-serif;color:var(--ink)}
.port-beat .beat-download small{flex-basis:100%;margin-left:40px;font:400 var(--small-size,14px)/1.5 Manrope,sans-serif;color:var(--muted)}
.port-beat .beat-step{display:inline-grid;place-items:center;flex:none;width:28px;height:28px;margin-right:12px;border:2px solid var(--beat-tone);border-radius:50%;font:700 14px/1 'IBM Plex Mono',monospace;color:var(--ink)}
.port-beat .research-field label:has(.beat-step){display:flex;align-items:center;font-weight:600}
/* All activity kinds share the reading and figure tracks; the header travels with its text. */
#main .port-beat.beat-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:20px}
#main .beat-layout .beat-body{display:block;width:100%;max-width:none;margin:0;padding:var(--ring-reach) var(--ring-reach) 28px;overflow:auto}
.beat-reading,.beat-figure{min-width:0;min-height:0}.beat-reading>header{position:relative;margin:0 0 24px;padding:0}.beat-reading>header .beat-crew{display:none}.beat-reading{max-width:62ch}.beat-figure{margin-top:24px}
#main .beat-layout .lesson-chunk,#main .beat-layout .case-focus,#main .beat-layout .case-context{display:block!important}
#main .beat-layout .beat-figure .lesson-chunk{width:100%;max-width:none}.beat-figure .quiz-option:first-child{margin-top:0}
#main .beat-layout .beat-stack{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:20px;min-height:280px;margin:24px 0 0}
#main .beat-stack .preview-image{display:flex;width:100%;max-width:520px;margin:0}#main .beat-stack .preview-image>svg:first-child{height:auto;max-height:340px;aspect-ratio:420/300}
#main .beat-stack .beat-caption{margin:0;max-width:none;text-align:center;font:var(--small-size)/1.6 Manrope,sans-serif;color:var(--muted)}
#main .beat-layout .dockerfile-workspace{height:360px}#main .beat-layout .lab-terminal{height:360px;max-height:none}
#main .beat-turn-out{position:absolute;z-index:2;pointer-events:none;overflow:hidden;background:var(--paper);font:var(--body-size)/1.65 Manrope,sans-serif}
#main .port-beat #terminal-input:focus{outline:3px solid #80c6ff;outline-offset:2px}
@media(min-width:1100px){
 #main .beat-layout .beat-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);grid-template-rows:minmax(0,1fr);column-gap:48px;align-items:start}
 #main .beat-layout .beat-reading{grid-column:1;grid-row:1;max-width:62ch}#main .beat-layout .beat-figure{grid-column:2;grid-row:1;margin-top:0;width:100%}
 #main .beat-layout .beat-stack{margin:0;min-height:360px;align-self:start}
 #main .beat-layout .beat-mechanism-context{margin-top:0}#main .beat-layout .beat-figure .beat-mechanism{grid-column:auto;grid-row:auto}
 #main .beat-layout .beat-figure:has(.lab-terminal,.dockerfile-workspace){height:100%;display:flex;flex-direction:column}#main .beat-layout .beat-figure :is(.lab-terminal,.dockerfile-workspace){flex:1;min-height:260px;height:100%}
}
@media(max-width:1099px){
 #main .beat-layout .beat-reading{max-width:none}#main .beat-layout .beat-figure{width:100%}
 #main:is([data-beat-type=lab-terminal],[data-beat-type=lab-result]) .beat-layout .beat-body{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(150px,1fr);gap:16px;overflow:hidden}
 #main:is([data-beat-type=lab-terminal],[data-beat-type=lab-result]) .beat-reading{max-height:300px;overflow:auto;padding:0 var(--ring-reach)}
 #main:is([data-beat-type=lab-terminal],[data-beat-type=lab-result]) .beat-figure{height:100%;margin:0}#main .beat-layout .lab-terminal{height:100%;min-height:150px}
}
@media(max-width:699px){#main .beat-layout .beat-stack{display:none}#main .beat-layout .beat-body{padding:var(--ring-reach) var(--ring-reach) 12px}.beat-reading>header{margin-bottom:18px}#main:is([data-beat-type=lab-terminal],[data-beat-type=lab-result]) .beat-reading{max-height:260px}}
@media(max-height:500px) and (max-width:1099px){
 #main[data-beat-type=lab-terminal] .beat-reading>header{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
 #main:is([data-beat-type=lab-terminal],[data-beat-type=lab-result]) .beat-layout .beat-body{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);grid-template-rows:minmax(0,1fr);gap:16px}
 #main:is([data-beat-type=lab-terminal],[data-beat-type=lab-result]) .beat-reading{height:100%;max-height:none}#main:is([data-beat-type=lab-terminal],[data-beat-type=lab-result]) .beat-figure{grid-column:2;grid-row:1;height:100%;margin:0}
 #main .beat-layout .lab-terminal{min-height:70px;height:100%}
}
html[data-port-short=true] #main[data-beat-type=lab-terminal] .beat-reading>header{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}

#main .beat-layout .beat-body>.beat-columns{display:contents!important}

@media(max-width:1099px){#main .port-beat.beat-layout{grid-template-rows:auto minmax(0,1fr) auto}#main .beat-layout .beat-reading:empty{display:none}#main .beat-layout .beat-reading:empty+.beat-figure{margin-top:0}}
@media(max-height:500px){#main[data-beat-type=lab-terminal] .port-beat.beat-layout{grid-template-rows:minmax(0,1fr) auto}}
html[data-port-short=true] #main[data-beat-type=lab-terminal] .port-beat.beat-layout{grid-template-rows:minmax(0,1fr) auto}
@media(max-width:1099px){
 #main[data-beat-type=lab-terminal] .beat-layout .beat-body{grid-template-rows:minmax(64px,auto) minmax(120px,1fr);padding:var(--ring-reach);gap:8px}
 #main[data-beat-type=lab-terminal] .beat-reading{min-height:64px;overflow:hidden}#main[data-beat-type=lab-terminal] .lab-goals{height:100%;max-height:none;padding:var(--ring-reach);overflow:auto}
 #main[data-beat-type=lab-terminal] .lab-pips{max-height:min(148px,100%);min-height:0;padding:var(--ring-reach);margin:0 0 12px}
 #main[data-beat-type=lab-terminal] .beat-layout .lab-terminal{min-height:0}
}
@media(max-width:699px){#main[data-beat-type=lab-terminal] .beat-layout .screen-navigation{display:none}#main[data-beat-type=lab-terminal] .port-beat.beat-layout{grid-template-rows:auto minmax(0,1fr)}}
@media(max-height:500px) and (min-width:700px){
 #main[data-beat-type=lab-terminal] .beat-layout .beat-body{grid-template-rows:minmax(0,1fr)}#main[data-beat-type=lab-terminal] .beat-layout .screen-navigation{min-height:44px;padding:0}
 #main[data-beat-type=lab-terminal] .beat-reading{min-height:0}#main[data-beat-type=lab-terminal] .lab-pips{height:100%;max-height:100%;min-height:0;margin:0}
 #main[data-beat-type=lab-terminal] #terminal-form{margin-top:0}
}
html[data-port-short=true] #main[data-beat-type=lab-terminal] .port-beat.beat-layout{grid-template-rows:minmax(0,1fr) auto}
@media(max-width:1099px) and (min-height:501px){#main[data-beat-type=lab-result] .beat-layout .beat-body{grid-template-rows:minmax(64px,auto) minmax(120px,1fr);padding:var(--ring-reach);gap:8px;overflow:auto}#main[data-beat-type=lab-result] .beat-reading{min-height:64px}#main[data-beat-type=lab-result] .beat-layout .lab-terminal{min-height:0}}
@media(max-width:699px){#main[data-beat-type=lab-terminal] .port-beat.beat-layout{padding-bottom:6px}#main[data-beat-type=lab-terminal] .beat-layout .beat-body{overflow:auto}}
#main .beat-layout .beat-reading .experiment-contract{display:block}
#main .beat-stack .preview-image code{font:var(--mono-size)/1.5 'IBM Plex Mono',monospace}

/* The figure written for a lesson step (lesson-figures.js): the introduction deck's material, tokens and marks (intro.css),
   in the figure's column on desktop and above the text everywhere else, phones included. */
#main .beat-lesson-figure .lesson-deck{box-sizing:border-box;width:100%;max-width:600px;margin-inline:auto;padding:clamp(12px,2vw,24px);background:var(--dk-panel);border:1px solid var(--dk-rule);border-radius:12px;color:var(--dk-ink)}
#main .beat-lesson-figure .lesson-deck>.dk{display:block;width:100%;height:auto;overflow:visible}
#main .beat-lesson-figure .lesson-deck:not(:last-child){margin-bottom:24px}
@media(min-width:700px) and (max-width:1099px){#main .beat-lesson-figure .lesson-deck{max-width:480px}}
@media(max-width:1099px){#main .beat-layout .beat-body:has(.beat-lesson-figure){display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;align-content:start}#main .beat-layout .beat-lesson-figure{display:contents}#main .beat-lesson-figure .lesson-deck{order:-1;margin:0 0 20px}}
/* On a phone the panel takes the body's whole width (its inset given back), so the drawing keeps the deck's 0.9 scale at 320 px. */
@media(max-width:699px){#main .beat-lesson-figure .lesson-deck{width:calc(100% + 2*var(--ring-reach));max-width:none;margin:0 calc(-1*var(--ring-reach)) 20px;padding:10px 0}}

/* A short landscape screen has no room for a title row: the title scrolls with the text (beats.js HEADER_IN_READING), so the
   body, not the bar, owns every row between the stage's top and the footer, and a pointer reaches each option. */
@media(max-height:500px){#main .port-beat.beat-layout{grid-template-rows:minmax(0,1fr) auto}}
/* Options are the content, not a hint of more: no fade over one at rest (a cut line at the edge says there is more). */
#main .port-beat .beat-body.has-more:has(.quiz-option){-webkit-mask-image:none;mask-image:none}
/* The stage's back control and the bar's progress draw their ring inside their box (their containers belong to the frame); the editor's
   ring is padded in by its workspace. */
#port-back:focus-visible,#beat-dots:focus-visible{outline-offset:-3px}
/* The reading area is itself a keyboard stop when it scrolls: its ring needs the same reach above it. */
@media(max-width:699px){#main.port-beats .port-beat{padding-top:var(--ring-reach)}}
.dockerfile-workspace{padding:calc(var(--ring-reach) + 2px)}

/* On a phone or tablet the brief (title, instruction, every objective) is one reading area above the terminal that scrolls as a
   whole, so no objective is cut by the terminal; beats.js gives it a keyboard stop once it overflows. With the keyboard up (data-port-short)
   the objectives keep their own short scroller above the prompt. An emptied output keeps a target. */
@media(max-width:1099px) and (min-height:501px){
 html:not([data-port-short=true]) #main[data-beat-type=lab-terminal] .beat-reading{overflow:auto;overscroll-behavior:contain;padding-block:var(--ring-reach)}
 html:not([data-port-short=true]) #main[data-beat-type=lab-terminal] .lab-goals{height:auto;overflow:visible;padding:0}
 html:not([data-port-short=true]) #main[data-beat-type=lab-terminal] .lab-pips{max-height:none;overflow:visible;padding-inline:0}
}
#terminal-output{min-height:24px;overflow-wrap:anywhere}

/* Sign-in is one 540 px column, centred on the stage: the whale, the title, the field, the button and both links share its
   left edge and its axis (a phone's column is already the stage's width). */
#main[data-beat-type=welcome] :is(.port-beat>header,.beat-body){width:100%;max-width:540px;margin-inline:auto;text-align:left}
#main[data-beat-type=welcome] .port-beat>header:has(h1:not(:only-child)){padding:0 var(--ring-reach)}
#main[data-beat-type=welcome] .beat-crew{position:static;margin:0 0 12px}
#main[data-beat-type=welcome] [data-email-signin] :is(a,button):not(.primary){justify-content:flex-start}

/* A header-only reading column keeps the former 20 px gap before its answers. */
@media(max-width:699px){.beat-reading:has(>header:only-child)+.beat-figure{margin-top:20px}#main .port-beat.beat-layout{grid-template-rows:minmax(0,1fr) auto}#main[data-beat-type=lab-terminal] .port-beat.beat-layout{grid-template-rows:minmax(0,1fr)}}
