/* Python's bar (D, 2 Nov 2026): the task page's top bar, the one bar on every pupil-facing Python page. Markup from
 * py_bar_start and py_bar_end (includes/page.php); colours from app.css's page tokens, so it follows the page theme
 * chosen in Settings. The teacher area keeps its own header (shell.css .ps-t).
 * One row, always 54px, on every page and at every width (D, 2 Nov 2026), so nothing jumps from page to page: the two
 * sides share what room there is and cut their words short, and the task numbers scroll sideways when they do not fit. */
/* every page with the bar keeps the scrollbar's track, used or not, so the bar is the same width on a page that
   scrolls (the pupil page) and one that does not (the task page), and nothing in it moves between them (D, 2 Nov 2026) */
html:has(body > .lab-top) { overflow-y: scroll; }
.lab-top { display: flex; align-items: center; gap: 1rem; box-sizing: border-box; height: 54px; padding: 0 1rem; flex-wrap: nowrap; border-bottom: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-primary); flex-shrink: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; line-height: 1.6; }
.lab-top .side { flex: 1 1 0; display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap; min-width: 0; white-space: nowrap; overflow: hidden; }
.lab-top .side.right { justify-content: flex-end; }
.lab-top > .side:first-child { min-width: 1.25rem; }   /* never less than the mark */
.lab-top > .side.right { min-width: 7.5rem; }            /* never less than the cog and Sign out; the name shortens first */
.lab-top > :not(.side) { flex: 0 1 auto; min-width: 0; }
.lab-top .title { margin: 0; font-size: calc(var(--lab-text, 1rem) * 1.15); font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-top a { color: var(--text-secondary); text-decoration: none; }
.lab-top a:hover { color: var(--text-primary); text-decoration: none; }
.lab-top .home { font-weight: 700; font-size: .95rem; color: var(--text-primary); flex: none; } /* up to the person's Computing Ninja home */
.lab-top .ps-logo { display: inline-flex; align-items: center; }
.lab-top .ps-logo svg { width: 16px; height: 18px; fill: currentColor; }
.lab-top .crumb { color: var(--text-secondary); font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lab-top .nav { display: flex; gap: .75rem; align-items: center; font-size: .9rem; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.lab-top .who { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lab-top .nav a { flex: none; }
.lab-top .nav .py-out-form { flex: none; margin: 0; }
.lab-top .nav .py-out { color: var(--text-secondary); }   /* Sign out is a form's button (logout.php takes a POST), looking as the link did */
.lab-top .nav .py-out:hover { color: var(--text-primary); }
.lab-top .bar-main { flex: none; font-size: .9rem; }   /* Main dashboard, just left of the cog: Sign out's quiet style */
.lab-top .bar-main-off { visibility: hidden; }          /* the task page and the Sandbox: its space kept, so nothing moves */
/* the Settings panel drops out of the bar: the bar's sides clip what overflows them (one row at 54px), so the panel is
   fixed under the bar at the right, not inside the side that would clip it */
.lab-top .settings-panel { position: fixed; top: calc(54px + .4rem); right: 1rem; }
.ps-mini { display: flex; gap: .7rem; flex-wrap: nowrap; font-size: .85rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.ps-mini a { color: var(--text-secondary); text-decoration: none; white-space: nowrap; }
.ps-mini a:hover { color: var(--text-primary); }
/* the Settings cog, in the same place on every page; where a page has no Settings it is there but does nothing */
.settings { position: relative; flex: none; }
.settings-btn { width: 2.1rem; height: 2.1rem; display: flex; align-items: center; justify-content: center; font-size: 1rem; border-radius: 6px; cursor: pointer; color: var(--text-primary); background: var(--bg-tertiary); border: 1px solid var(--border-color); }
.settings-btn:hover, .settings-btn[aria-expanded="true"] { border-color: var(--text-secondary); }
.settings-off, .settings-off:hover { cursor: default; color: var(--text-secondary); opacity: .4; border-color: var(--border-color); }   /* a page with no Settings: the cog's space and size, greyed out, not a control (D, 2 Nov 2026) */
