/* © 2026 Cromulent, Inc. All Rights Reserved.
   shell.css - the one top bar every bench page opens with (shell.py renders it, shell.js fills "who"), and the
   shared words for a state: the chip. Reads only the tokens. Replaces the header each page used to draw for
   itself, each a little differently. */
@import url("/_cromulent/topnav.css");

/* THE BAR IS SPAWN'S (Maestro, 2026-11-18: "it shold feel and look like it"): the lockup at spawn's size, ending on player
   one's square, and the places in the voice (Bricolage, sentence case), not a mono label. A hairline under it, as spawn's. */
.bar { position: relative; display: flex; align-items: center; gap: 22px; padding: 16px 0 18px; margin-bottom: 22px; flex-wrap: nowrap;
  min-width: 0; border-bottom: 1px solid var(--line); }
.bar .wordmark { text-decoration: none; font: 800 26px/.9 var(--wordmark); letter-spacing: -.055em; align-items: center; flex: none; }
.wordmark .pt { display: inline-block; flex: none; width: .17em; height: .17em; margin-left: calc(.05em - 10px); align-self: flex-end;
  margin-bottom: .12em; background: var(--orchid); }
.bar-nav { display: flex; align-items: center; gap: 4px clamp(6px, 1.2vw, 12px); flex-wrap: nowrap; margin-left: auto; min-width: 0; }
.bar-nav a { font: 500 15px/1.2 var(--body); color: var(--ink-2); text-decoration: none; white-space: nowrap;
  padding: 8px 6px; border-radius: 8px; transition: color var(--fast) var(--ease); }
/* THE TWO DOORS (Maestro, 2026-11-19, "Two equal doors"): Lessons and Studio are the bar's two first places, the same
   weight; since the top nav rule (2026-11-20) every place in the row wears the one look of /_cromulent/topnav.css. */
.bar-nav a[hidden] { display: none; }
.bar-nav a:hover { color: var(--ink); }
.bar-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--orchid); border-radius: 2px; }
.bar-nav a:focus-visible, .bar-who:focus-visible, .bar-more summary:focus-visible { outline: 2px solid var(--orchid); outline-offset: 2px; }

/* MORE: the studio's rooms, Help and the role places, at every width (the top nav rule, docs/brand/cromulentech-brand.md
   "Top nav": the doors, About, The research and Sign in are the row). */
.bar-more { display: block; position: relative; flex: none; }
.bar-more summary { list-style: none; cursor: pointer; font: 500 15px/1.2 var(--body); color: inherit; opacity: .78; padding: 0;
  border-radius: 8px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.bar-more summary::-webkit-details-marker { display: none; }
.bar-more summary::after { content: "+"; font: 400 14px/1 var(--mono); color: var(--ink-faint); }
.bar-more[open] summary::after { content: "\2212"; }
.bar-more summary:hover, .bar-more[open] summary { color: var(--ink); }
.bar-more:has(a[aria-current="page"]) summary { color: var(--ink); box-shadow: inset 0 -2px 0 var(--orchid); border-radius: 2px; }
.bar-more-list, .bar-menu { position: absolute; z-index: 70; top: calc(100% + 8px); min-width: 200px; padding: 6px; display: flex;
  flex-direction: column; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.bar-more-list { right: 0; }
.bar-more-list a, .bar-menu a, .bar-menu button { display: flex; align-items: center; min-height: 40px; padding: 8px 12px; border-radius: 8px;
  font: 500 15px/1.2 var(--body); color: var(--ink-2); text-decoration: none; background: transparent; border: 0; text-align: left; cursor: pointer; }
.bar-more-list a[hidden], .bar-menu [hidden] { display: none; }
.bar-more-list a:hover, .bar-menu a:hover, .bar-menu button:hover { color: var(--ink); background: var(--panel-2); }
.bar-more-list a[aria-current="page"] { color: var(--ink); box-shadow: inset 2px 0 0 var(--orchid); }
.bar-more-list a:focus-visible, .bar-menu a:focus-visible, .bar-menu button:focus-visible { outline: 2px solid var(--orchid); outline-offset: -2px; }
@media (max-width: 640px) {
  .bar:not(.sbar) .bar-nav { gap: 6px 14px; }
}

/* who this browser is: a name and a role, or the way in */
.bar-who { font: 500 14px/1.2 var(--body); text-decoration: none; color: var(--ink-2);
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.bar-who:hover { color: var(--ink); border-color: color-mix(in srgb, var(--orchid) 50%, var(--line)); }
.bar-who .role { font: 400 10px/1 var(--pixel); color: var(--ink-faint); }
.bar-who[data-who="out"] { color: var(--orchid-ink); font-weight: 600; border-color: var(--orchid); background: var(--orchid); border-radius: var(--radius-sm); }
.bar-who[aria-current="page"] { color: var(--ink); font-weight: 500; background: transparent; border-color: var(--orchid); }
.bar-who { flex: none; }
.bar-who[aria-expanded="true"] { color: var(--ink); border-color: var(--orchid); }
/* who opens a small menu once someone is signed in (shell.js): the sign-in page (who you are, sign out) and the sound */
.bar-menu { right: 0; }
.bar-menu .menu-who { padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font: 400 11px/1.4 var(--pixel);
  color: var(--ink-faint); }

/* THE STUDIO'S BAR IS SPAWN STUDIO'S (shell.studio_bar): the four steps as stations, 01 pick to 04 ship, a numeral in the
   pixel face and the word in the voice, the current one held in spawn's bracket corners, a short link between each. The
   places a person leaves for sit quieter on the right; there is no "Studio" among them, you are in it. */
.sbar .line { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; justify-content: center;
  overflow-x: auto; scrollbar-width: none; }
.sbar .line::-webkit-scrollbar { display: none; }
.station { position: relative; display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; flex: none; border: 0;
  background: none; cursor: pointer; text-decoration: none; font: inherit; --b: var(--orchid); }
.station .n { font: 400 11px/1 var(--pixel); color: var(--ink-faint); }
.station .w { font: 600 15px/1.2 var(--body); color: var(--ink-dim); letter-spacing: -.01em; }
.station:hover .w { color: var(--ink); }
.station[aria-disabled="true"] { cursor: default; opacity: .55; }
.station[aria-disabled="true"]:hover .w { color: var(--ink-dim); }
.station[aria-current="step"] .n { color: var(--orchid); }
.station[aria-current="step"] .w { color: var(--ink); }
.station[aria-current="step"]::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  --c: linear-gradient(var(--b), var(--b));
  background: var(--c) top left / 10px 2px, var(--c) top left / 2px 10px, var(--c) top right / 10px 2px, var(--c) top right / 2px 10px,
    var(--c) bottom left / 10px 2px, var(--c) bottom left / 2px 10px, var(--c) bottom right / 10px 2px, var(--c) bottom right / 2px 10px;
  background-repeat: no-repeat; }
.station:focus-visible { outline: 2px solid var(--orchid); outline-offset: 2px; }
.link-bar { width: 18px; height: 2px; background: var(--line-2); flex: none; }
.sbar .bar-nav { margin-right: 0; gap: 4px 8px; }
.sbar .bar-nav a { font-size: 14px; color: var(--ink-dim); }
.bar-running { font: 500 14px/1.2 var(--body); color: var(--ink-2); background: transparent; cursor: pointer; white-space: nowrap;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 6px; }
.bar-running:hover { color: var(--ink); border-color: color-mix(in srgb, var(--orchid) 50%, var(--line)); }
.bar-running[aria-current="step"] { color: var(--ink); border-color: var(--orchid); }
.bar-running:focus-visible { outline: 2px solid var(--orchid); outline-offset: 2px; }
/* the studio's bar holds the four stations too, so its places fold into More sooner, and its stations lose their numbers */
@media (max-width: 1440px) {
  .sbar .bar-nav a:not(.door) { display: none; }
  .sbar .bar-more { display: block; }
}
@media (max-width: 1100px) {
  .sbar { gap: 12px; }
  .station { padding: 8px; }
  .station .n { display: none; }
  .link-bar { width: 10px; }
}
/* a phone's studio: two rows, never more. The places and who on the first, then the stations with running and stop
   (a flex line break, the bar's ::before, between them); the stations scroll sideways when they must */
@media (max-width: 760px) {
  .sbar { flex-wrap: wrap; row-gap: 4px; }
  .sbar::before { content: ""; order: 2; flex-basis: 100%; height: 0; }
  .bar.sbar .bar-nav { flex: none; }
  .sbar .bar-more { margin-right: auto; }
  .sbar .line { order: 3; flex: 1 1 0; justify-content: flex-start; }
  .sbar .bar-running, .sbar .estop, .sbar .bar-stop { order: 4; }
  .sbar .link-bar { display: none; }
}

/* a phone: the mark without the word, the doors, More, stop as its square and who; every item 44px tall to the thumb */
@media (max-width: 560px) {
  .bar { gap: 6px; padding: 10px 0 12px; margin-bottom: 16px; }
  .bar .wordmark { font-size: 22px; }
  .bar .wm-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bar .wordmark .pt { display: none; }
  .bar-nav { gap: 2px; }
  .bar .bar-nav > a, .bar-more summary { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; font-size: 15px; }
  .bar .bar-nav > a.bar-who { min-height: 44px; padding: 0 12px; }
  .bar-who .role { display: none; }
  .bar-who { max-width: 8.5em; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 44px; }
  .bar-more-list { left: auto; right: 0; position: fixed; top: 64px; right: 16px; }
}

/* the chip: one look for a state on every page (admin's .chip, devices' .dev-chip, the studio's states).
   on = running / good, off = stopped / needs a look, bad = refused / stop. */
.chip { white-space: nowrap; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .04em; padding: 3px 9px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--ink-dim); }
.chip.on { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.chip.off { color: var(--caution); border-color: color-mix(in srgb, var(--caution) 45%, transparent); }
.chip.bad, .chip.warn { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* ---- text for waiting: every bench page waits the same way, in characters, never a spinner graphic ----
   .tspin turns | / - \ in one cell (a strip of the four slid a cell at a time); .tcursor is a block cursor;
   .scanline sweeps once under a line that is still loading. Reduced motion: the dash holds still. */
.tspin { display: inline-block; width: 1ch; height: 1.2em; overflow: hidden; vertical-align: -.25em; font-family: var(--mono); font-style: normal; }
.tspin::before { content: "|/-\\"; display: block; width: 4ch; font-family: var(--mono); white-space: pre; animation: tspin .6s steps(4) infinite; }
@keyframes tspin { to { transform: translateX(-4ch); } }
.tcursor { display: inline-block; width: .6em; height: 1.05em; margin-left: 4px; vertical-align: -.15em; background: currentColor; opacity: .8; animation: tcursor 1s steps(1) infinite; }
@keyframes tcursor { 50% { opacity: 0; } }
.scanline { display: block; position: relative; height: 2px; margin-top: 10px; overflow: hidden; border-radius: 2px; background: var(--line); }
.scanline::after { content: ""; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, var(--orchid), transparent); animation: scanline 1.6s linear infinite; }
@keyframes scanline { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) {
  .tspin::before { animation: none; transform: translateX(-2ch); }
  .tcursor, .scanline::after { animation: none; }
}

/* ---- the seam on a working page: the front page's ASCII divider, tighter, naming what comes next.
   The fill is drawn here once, so a page writes only the label. It goes when what it names is hidden. */
.seam-ascii.tight { margin: 22px 0 14px; opacity: .7; }
.seam-ascii.tight span::before { content: "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="; }
.seam-ascii.tight b { font-weight: 500; letter-spacing: .06em; }
.seam-ascii.tight:has(+ [hidden]) { display: none; }

/* the player (shell.js): what a program said, at the foot of the page. Sound on or off is in who's menu. */
.bench-says { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  max-width: min(560px, calc(100vw - 32px)); padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-size: 15px; display: flex; flex-wrap: wrap; gap: 4px 10px;
  align-items: baseline; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.bench-says .who, .bench-says .note { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }
.bench-says[hidden] { display: none; }

/* ---- the frame (shell.py): every working page's header is one shape, at one width (the bar's), with its own
   colour on the title (--page-accent). Programs, devices, sign in, the admin's pages and the operator's room. */
.page { padding-bottom: 40px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 10px; }
.page-eyebrow { margin: 0 0 8px; font: 400 12px/1.4 var(--pixel); color: var(--ink-dim); }
.page-title { margin: 0; font: 700 clamp(28px, 4.4vw, 40px)/1.08 var(--disp); letter-spacing: -.03em; color: var(--page-accent, var(--ink)); }
.page-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-lead { margin: 0 0 18px; max-width: 72ch; color: var(--ink-dim); font-size: 15px; line-height: 1.55; }
.page-lead[hidden] { display: none; }

/* ---- the bar's stop: anyone signed in can stop everything in their reach from any page (shell.js). The first press
   asks, the second sends. The studio puts its own stop here instead. */
.bar-stop { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border-radius: 12px; cursor: pointer;
  font: 600 14px/1.2 var(--body); color: var(--bad); background: transparent;
  border: 1px solid var(--bad); white-space: nowrap; }
.bar-stop::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--bad); }
.bar-stop:hover, .bar-stop[data-asking="1"] { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--panel)); }
.bar-stop:focus-visible { outline: 2px solid var(--bad); outline-offset: 2px; }
.bar-stop[hidden] { display: none; }
.bar-stop { flex: none; }
.bar-stop-said { flex: 0 1 auto; min-width: 0; max-width: 22em; font: 400 13px/1.3 var(--body); color: var(--bad); }
.bar-stop-said[hidden] { display: none; }
@media (max-width: 1100px) { .bar-stop-said { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; max-width: min(28em, calc(100vw - 32px));
  padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--bad); background: var(--panel); } }
@media (max-width: 560px) { .bar-stop { height: 44px; width: 44px; padding: 0; justify-content: center; font-size: 0; gap: 0; } }

/* the footer every page but the front page ends with (shell.foot): spawn's copyright line, centred, the quietest text */
footer.foot.copyright { margin: 48px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); text-align: center;
  font: 400 11px/1.6 var(--mono); letter-spacing: .04em; color: var(--ink-faint); }
footer.foot a { color: var(--ink-dim); text-decoration: none; border-bottom: 1px solid var(--line); }
footer.foot a:hover { color: var(--ink); border-color: var(--orchid); }

/* SENTENCE CASE, as spawn's (Maestro, 2026-11-18: "it shold feel and look like it"): a heading opens on a capital the
   way spawn's do, and so does a button. Sentence case belongs in the SOURCE, product names kept lowercase ("bench",
   "standpoints", "bench's engine"), and the frame's own pages and scripts are written that way (test_shell.py holds
   them). The rule below is a BACKSTOP for the pages still written lowercase (the studio, the lessons, programs,
   devices, the server pages); it goes when the last of them is sentence case in source. Until then a heading that
   opens on a product name keeps it lowercase with .name-first, and anything written exactly as it should read says
   so with .as-written. A toggle that reads out its state ([aria-pressed]: a lesson's "slide switch: left") is a state,
   like a chip, and is never touched. Chips, code and the pixel labels keep their own case. */
:is(h1, h2, h3, .page-title, button, .btn):not(.name-first, .as-written, [aria-pressed])::first-letter { text-transform: uppercase; }
