/* V10f: Robots in Motion v2 inside the site's frame (owner, 5 Nov 16:30: "make the course window cover the complete screen or
   like the other courses present in my website"). Loaded last, after css/theme.css (tools/build-chrome.mjs stamps both).
   - the site's sticky header (theme.css .top) + a one-line course bar (.rim2-bar: breadcrumb, skills, Extras)
   - >= 1024 px: lesson | desktop fill the full width and the height under the header (100vh minus header and bar);
     the page scrolls on to the site footer
   - < 1024 px: unchanged (lesson, then the desktop with its tab bar; V07f)
   - the site's fonts (Source Sans 3 / Source Code Pro) and colours */
:root { --rim2-bar-h: 38px; }
body { font-family: var(--font, "Source Sans 3", system-ui, sans-serif); }
h1, h2, h3, h4 { font-family: var(--font, "Source Sans 3", system-ui, sans-serif); font-variation-settings: normal; }
code, kbd, pre, .mono, .code { font-family: var(--mono, "Source Code Pro", ui-monospace, monospace); }
/* the course bar under the site header */
.rim2-bar { position: sticky; top: var(--top-h, 65px); z-index: 40; display: flex; align-items: center; gap: .8rem; min-height: var(--rim2-bar-h);
  padding: 4px max(16px, 1.2vw); background: var(--navy, #14204A); color: #DCE3F0; font-size: .92rem; box-sizing: border-box; }
.rim2-bar .where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #DCE3F0; }
.rim2-bar .where a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.rim2-bar .where b { color: #fff; }
.rim2-bar .map { margin-left: auto; }
.rim2-bar .ix-quietbtn { margin-left: auto; }
.rim2-bar .ix-quietbtn + .map { margin-left: .6rem; }
/* v2's "skip ahead" links are paragraphs, not the site's hidden skip link */
main.lesson p.skip, main.lesson .skip:not([href="#main"]) { position: static; left: auto; top: auto; z-index: auto; background: none; border: 0; padding: 0; font-weight: inherit; }
/* full width, full height under the header (>= 1024 px, a mission with the desktop) */
body.sb-lab2:not(.sb-narrow) { height: auto; overflow: visible; display: block; }
body.sb-lab2:not(.sb-narrow) > .page { height: calc(100vh - var(--top-h, 65px) - var(--rim2-bar-h)); min-height: 520px; width: 100%; max-width: none; }
body.sb-lab2:not(.sb-narrow) > .site-foot { margin-top: 0; }
/* a concept mission (no desktop yet) and the course map: the full width, text in readable lines */
body.sb-cv > .page, body:not(.sb-lab2) > .page { width: 100%; max-width: none; }
body.sb-cv main.lesson { max-width: none; margin: 0; padding-left: max(16px, 4vw); padding-right: max(16px, 4vw); }
body.sb-cv main.lesson .block > .body > p, body.sb-cv main.lesson .mission-head p { max-width: 75ch; }
/* text for one lab only: <span data-lab-only="web">the Editor window</span><span data-lab-only="real">VS Code on your PC</span>
   (body.sb-labreal = My ROS 2 PC chosen; sim-bench.js) */
body:not(.sb-labreal) [data-lab-only="real"], body.sb-labreal [data-lab-only="web"] { display: none !important; }
/* the desktop's true full screen (Fullscreen API on the desktop box) */
.sb-frame:fullscreen, .sb:fullscreen { width: 100vw; height: 100vh; background: #2b2b2b; }
.sb:fullscreen .sb-frame { height: calc(100vh - 44px); }
/* a grid track of 1fr cannot shrink below its widest child: on a phone a wide card pushed 1.1 b7 21 px past the screen (V10f
   ui-chrome at 390). Grid items may shrink; long code scrolls sideways inside its own box instead of widening the page. */
main.lesson .block > *, main.lesson .mission-head > * { min-width: 0; }
main.lesson pre { max-width: 100%; overflow-x: auto; }
main.lesson .btn, main.lesson button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
/* V10f novice-review parts, shared by every mission (jobs/kit19/NOVICE-RULES.md):
   the words box, one action per numbered step, "You should see" samples, inline "If it does not work" */
main.lesson details.words { margin: .4rem 0 1rem; }
main.lesson details.words > summary { cursor: pointer; font-weight: 700; }
main.lesson details.words dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem .8rem; margin: .5rem 0 0; }
main.lesson details.words dt { font-weight: 700; font-family: var(--mono, "Source Code Pro", ui-monospace, monospace); font-size: .9rem; scroll-margin-top: 120px; }
main.lesson details.words dd { margin: 0; }
main.lesson details.words dt:target, main.lesson details.words dt:target + dd { background: #FFF4C2; }
@media (max-width: 500px) { main.lesson details.words dl { grid-template-columns: minmax(0, 1fr); } main.lesson details.words dd { margin: 0 0 .4rem; } }
main.lesson ol.steps { display: block; counter-reset: none; padding-left: 1.6rem; margin: .5rem 0 .8rem; }
main.lesson ol.steps > li { min-width: 0; margin: .5rem 0; padding-left: .2rem; }
main.lesson ol.steps > li::marker { font-weight: 700; color: var(--blue, #1F4FD8); }
main.lesson pre.see { margin: .3rem 0 .4rem; padding: .45rem .6rem; background: #F4F6FA; border: 1px solid #D7DEE8; border-left: 3px solid #0E8A7A;
  border-radius: 6px; font-size: .82rem; line-height: 1.35; white-space: pre; overflow-x: auto; color: #1B2430; }
main.lesson p.ifnot { margin: .25rem 0 .5rem; padding: .3rem .55rem; border-left: 3px solid #C2410C; background: #FFF6F0; border-radius: 0 6px 6px 0; }
/* a fill-in table in the narrow lesson column: each row is a card, each cell "label above input" (cells carry data-l) */
main.lesson table.stack thead { display: none; }
main.lesson table.stack, main.lesson table.stack tbody, main.lesson table.stack tr, main.lesson table.stack td { display: block; width: auto; }
main.lesson table.stack tr { border: 1px solid #D7DEE8; border-radius: 6px; margin: 0 0 .6rem; padding: .3rem .5rem; }
main.lesson table.stack td { border: 0; padding: .15rem 0; }
main.lesson table.stack td[data-l]::before { content: attr(data-l); display: block; font-size: .8rem; color: #566; }
/* a lesson-column file editor opened to the whole window (Expand button, ch3-page.js): long lines and the fault to find stay visible */
.ued-big { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; gap: .3rem; padding: .6rem; background: #fff; }
.ued-big .ued { flex: 1 1 auto; height: auto !important; min-height: 0; }
/* a widget readout that would give away a prediction stays hidden until the learner locks it (I22; the page adds pred-locked) */
body:not(.pred-locked) .until-locked { visibility: hidden; }
/* spec sheets: the value column keeps its width in a narrow lesson column (I17 E52) */
main.lesson dl.spec { grid-template-columns: fit-content(30%) minmax(0, 1fr); }
main.lesson dl.spec dd { overflow-wrap: anywhere; }
main.lesson .nums input { min-width: 4.5rem; }
/* phone (I14): one button between the lesson and the desktop; a finger on a 3D picture scrolls the page; say that long typing is easier on a computer */
.sb-jump { display: none; }
body.sb-narrow.sb-lab2 .sb-jump { display: block; position: fixed; right: 8px; bottom: 46px; z-index: 60; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.ued-phone { display: none; }
@media (max-width: 700px) { main.lesson .stage canvas { touch-action: pan-y !important; } .ued-phone { display: block; margin: .2rem 0; } }
/* the line numbers stay beside their lines: the site's phone rule for text boxes must not resize only the textarea (G45) */
.ued .gut, .ued textarea { line-height: 18px !important; font-size: 12px !important; }
/* the floating phone buttons never hide what the keyboard moved to (G56) */
body.sb-narrow { scroll-padding-bottom: 110px; }
body.sb-narrow main.lesson { padding-bottom: 110px; }
/* the closed graph bar is a small chip in the corner, so it covers less of the lesson (I16) */
main.lesson .ix-graph:not([open]) { width: max-content; max-width: 100%; margin-left: auto; font-size: .85em; }
/* a small data table in the lesson column: no sideways scroll, long cells wrap */
main.lesson table.spec-parts { border-collapse: collapse; width: 100%; font-size: .85rem; margin: .4rem 0; }
main.lesson table.spec-parts th, main.lesson table.spec-parts td { border: 1px solid #D7DEE8; padding: .2rem .35rem; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
main.lesson ol.steps code, main.lesson p.ifnot code { overflow-wrap: anywhere; }
main.lesson code.cmd { white-space: pre-wrap; overflow-wrap: break-word; max-width: 100%; }   /* breaks a long command only when it cannot fit the line at all */
@media (max-width: 700px) { .rim2-bar { position: static; flex-wrap: wrap; row-gap: .2rem; font-size: .85rem; } .rim2-bar .where { white-space: normal; } }
