/* The global bar (app/static/life-bar.js): Side menu | Back · Forward | Undo · Redo · Help. Design tokens only — the bar takes the page's
   department colour (--dept / --dept-deep: tokens.css `html[data-dept=…]`; board.css and life-bar-tokens.css define the same
   names for the pages that do not load tokens.css); lines and hovers are tints. */
.lbar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 35; flex: none;
  min-height: 44px; padding: 6px 30px; background: var(--white); color: var(--dept-deep);
  border-bottom: 1px solid color-mix(in srgb, var(--dept-deep) 16%, transparent); }
.main > .lbar { margin: -26px -30px 18px; }
.lbar-page { margin: 0; padding: 6px 30px; }
.lbar .lb-grp { display: flex; align-items: center; gap: 4px; }
.lbar .lb-sp { flex: 1; }
/* round keys: a sapphire-tinted edge under each, a lift on hover, a press on click */
.lbar .lb-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; cursor: pointer;
  background: var(--white); color: var(--dept-deep); border: 1.5px solid color-mix(in srgb, var(--dept-deep) 22%, transparent); border-radius: 999px;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  --lb-edge: color-mix(in srgb, var(--dept-deep) 28%, transparent);
  box-shadow: 0 2px 0 var(--lb-edge), 0 3px 6px color-mix(in srgb, var(--dept-deep) 10%, transparent);
  transition: transform .09s cubic-bezier(.2,.7,.3,1.3), box-shadow .09s ease, background-color .12s ease, border-color .12s ease; }
.lbar .lb-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lbar .lb-btn:hover:not(:disabled) { border-color: var(--dept); background: color-mix(in srgb, var(--dept) 9%, transparent); transform: translateY(-1px); --lb-edge: var(--dept);
  box-shadow: 0 3px 0 var(--lb-edge), 0 6px 10px -2px color-mix(in srgb, var(--dept-deep) 18%, transparent); }
.lbar .lb-btn:active:not(:disabled) { transform: translateY(2px); transition-duration: .05s;
  box-shadow: 0 0 0 var(--lb-edge), inset 0 2px 4px color-mix(in srgb, var(--dept-deep) 22%, transparent); }
.lbar .lb-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--dept) 45%, transparent); outline-offset: 1px; }
.lbar .lb-btn:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; transform: none; }
.lbar .lb-btn[data-act="help"][aria-expanded="true"] { background: var(--dept-deep); color: var(--white); border-color: var(--dept-deep); transform: translateY(2px);
  box-shadow: 0 0 0 var(--lb-edge), inset 0 2px 4px color-mix(in srgb, var(--black) 30%, transparent); }
html.touch .lbar .lb-btn { width: 44px; height: 44px; }
.lbar .lb-grp[hidden] { display: none; }

/* ── the side menu: hide / show (Dr. Pat, 27 Oct 2026) ───────────────────────────────────────────────────────────────────
   The first key of the bar, set apart by a fine line. <html class="side-hidden"> (remembered on this computer) folds the
   menu on the left away — the Shell's .sidebar and the dashboard's panel — and the page takes the whole width.
   <html class="side-anim"> is on only while the user's own press slides it (never on a page load). */
.lbar .lb-side-grp { padding-right: 10px; margin-right: 4px; border-right: 1px solid color-mix(in srgb, var(--dept-deep) 16%, transparent); }
.lbar .lb-btn[data-act="side"][aria-expanded="false"] { background: color-mix(in srgb, var(--dept) 9%, var(--white)); border-color: color-mix(in srgb, var(--dept) 55%, transparent); }
@media (min-width: 761px) {
  html.side-hidden .shell > .sidebar { width: 0 !important; min-width: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
    border: 0; overflow: hidden; visibility: hidden; }
}
html.side-hidden body > aside.luxe-panel { width: 0 !important; min-width: 0 !important; padding-left: 0 !important; padding-right: 0 !important;
  border: 0; overflow: hidden; visibility: hidden; }
@media (max-width: 720px) { html.side-hidden body > aside.luxe-panel { display: none; } }
html.side-anim .shell > .sidebar, html.side-anim body > aside.luxe-panel { overflow: hidden; white-space: nowrap;
  transition: width .28s cubic-bezier(.4,0,.2,1), padding .28s cubic-bezier(.4,0,.2,1), visibility 0s; }
html.side-anim.side-hidden .shell > .sidebar, html.side-anim.side-hidden body > aside.luxe-panel {
  transition: width .28s cubic-bezier(.4,0,.2,1), padding .28s cubic-bezier(.4,0,.2,1), visibility 0s linear .28s; }
html.side-anim .shell > .sidebar > *, html.side-anim body > aside.luxe-panel > * { min-width: var(--side-inner, 200px); }
/* a phone-sized screen: the layout hides the menu (journey.css); the same key opens it over the page, a tap outside closes it */
.side-scrim { display: none; }
@media (max-width: 760px) {
  html.side-open .shell > .sidebar { display: flex; position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; height: auto; width: min(300px, 86vw);
    box-shadow: 14px 0 40px color-mix(in srgb, var(--dept-deep) 38%, transparent); animation: lb-side-in .26s cubic-bezier(.2,.7,.3,1); }
  html.side-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 69; cursor: pointer;
    background: color-mix(in srgb, var(--dept-deep) 42%, transparent); animation: lb-fade-in .2s ease; }
}
@keyframes lb-side-in { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes lb-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  html.side-anim .shell > .sidebar, html.side-anim body > aside.luxe-panel { transition: none !important; }
  html.side-open .shell > .sidebar, html.side-open .side-scrim { animation: none; }
}
/* the boards are a column that never scrolls: the bar is one more row of it */
body.lab > .lbar, body > .lbar-page { flex: none; }
/* the Help drawer: the manual over the page, the page stays where it is */
.lhelp { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(520px, 94vw); display: flex; flex-direction: column; background: var(--white);
  border-left: 1px solid color-mix(in srgb, var(--dept-deep) 22%, transparent); box-shadow: -10px 0 32px color-mix(in srgb, var(--dept-deep) 20%, transparent); }
.lhelp[hidden] { display: none; }
.lhelp .lh-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--dept-deep) 16%, transparent); }
.lhelp .lh-title { flex: 1; font-size: 17px; color: var(--dept-deep); }
.lhelp .lh-full { font-size: 14px; font-weight: 700; color: var(--dept); text-decoration: none; }
.lhelp .lh-full:hover { text-decoration: underline; }
.lhelp .lh-x { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; cursor: pointer; color: var(--dept-deep);
  background: var(--white); border: 1.5px solid color-mix(in srgb, var(--dept-deep) 22%, transparent); border-radius: 999px;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--dept-deep) 28%, transparent), 0 3px 6px color-mix(in srgb, var(--dept-deep) 10%, transparent);
  transition: transform .09s cubic-bezier(.2,.7,.3,1.3), box-shadow .09s ease; }
.lhelp .lh-x:hover { transform: translateY(-1px); border-color: var(--dept); }
.lhelp .lh-x:active { transform: translateY(2px); box-shadow: 0 0 0 transparent, inset 0 2px 4px color-mix(in srgb, var(--dept-deep) 22%, transparent); }
.lhelp .lh-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lhelp .lh-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: var(--white); }
@media (max-width: 760px) {
  .main > .lbar { margin: -16px -16px 14px; padding: 6px 16px; }
  .lbar-page { padding: 6px 16px; }
}
@media print { .lbar, .lhelp, .side-scrim { display: none !important; } }
/* the dashboard has no React shell: the bar is the first thing in its content column */
main > .lbar-page { margin: -32px -32px 20px; }
@media (max-width: 720px) { main > .lbar-page { margin: -20px -16px 16px; } }
