/* rail.css — the look Kayla chose from an outside sample (shown as a demo on
   2026-09-27, live from 2026-09-28): the faces move from a bar across the top
   into a rail down the left, and the page uses the screen. Loaded last, so it
   wins over the top-bar rules in
   observatory.css without touching them — taking this file and its <link>
   out puts the old bar's rules back in charge.

   NOTHING HERE IS A FEATURE. Every door, count, space, profile control and
   the assistant's dock is the one the console already had (shell.js still
   finds them by the same ids); this file only says where they sit and how
   wide the page may grow.

   The rail has four states, all classes on <html> written by shell.js:
     .rail-pinned   the coach's remembered choice (localStorage)
     .rail-wide     the labels are showing right now
     .rail-open     pinned: the page is shifted over
     .rail-drawer   the phone-width overlay is open */

:root { --bar-h: 0px;                           /* no bar stands over the page any more */
        --page: 1680px; }                       /* a ceiling on the content column, not its width: a wide monitor shows more table */
.ic-sprite { display: none; }                   /* the <symbol> library */
.nav-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the rail ---- */
.rail { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 40; width: var(--rail-w);
  display: flex; flex-direction: column; background: var(--void); border-inline-end: 1px solid var(--ash);
  overflow: hidden; transition: width .14s ease; }
:root.rail-wide .rail { width: var(--rail-w-open); }
body.gated .rail, body.gated .rail-top { visibility: hidden; }

/* the mark at the top: the round emblem framed inside the delivered artwork at rest, the whole
   lockup when the rail opens — one file, clipped, never redrawn (mark.png is 546x400; the emblem's
   circle sits in the 240px square whose corner is at 152,155) */
.rail .wordmark { --wm-mark: 36px; position: relative; display: flex; align-items: center; justify-content: center;
  height: 76px; flex: none; gap: 0; margin: 0; text-decoration: none; border-bottom: 1px solid var(--smoke); }
.rail .wordmark .wm-crop { position: absolute; top: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%);
  width: var(--wm-mark); height: var(--wm-mark); overflow: hidden; }
.rail .wordmark .wm-crop .wm-emblem { position: absolute; left: -63.33%; top: -64.58%; width: 227.5%; height: auto; max-width: none; display: block; }
.rail .wordmark .wm-mark { width: auto; height: 58px; display: block; opacity: 0; }
.rail .wordmark .wm-crop, .rail .wordmark .wm-mark { transition: opacity .14s ease; }
:root.rail-wide .rail .wordmark .wm-crop { opacity: 0; }
:root.rail-wide .rail .wordmark .wm-mark { opacity: 1; }

/* the two spaces, under the mark */
.rail .spaces { display: flex; flex-direction: column; gap: 0; flex: none; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--smoke); order: 0; }
.rail .space-a { position: relative; display: flex; align-items: center; gap: 0; min-height: 40px; padding: 0; border: 0; border-radius: 0;
  font: var(--w-head) var(--fs-ui)/1.2 var(--sans); letter-spacing: var(--ls-ui); color: var(--mist); white-space: nowrap; }
.rail .space-a .nav-i { margin-inline: calc((var(--rail-w) - 20px) / 2); }
.rail .space-a > span:not(.nav-n) { display: inline; }
.rail .space-a:hover { color: var(--snow); background: var(--carbon); border-color: transparent; }
.rail .space-a.on { color: var(--snow); background: none; border-color: transparent; }
.rail .space-a.on .nav-i { color: var(--violet-light); }

/* one item per door: 44px of target whether the labels show or not */
.rail .nav { display: flex; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; flex: 1 1 auto; min-width: 0; min-height: 0;
  order: 0; margin: 0; padding: 4px 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scroll-snap-type: none; }
.rail .nav-phone { display: none; }
body.space-phone .rail .nav-phone { display: flex; }
body.space-phone .rail #nav, body.space-phone #ctaCheckinsDoor { display: none; }
.rail .nav-a { position: relative; display: flex; align-items: center; gap: 0; flex: none; min-height: 40px; padding: 0; border-radius: 0;
  font: var(--w-head) var(--fs-ui)/1.2 var(--sans); letter-spacing: var(--ls-ui); color: var(--mist); text-decoration: none; white-space: nowrap; scroll-snap-align: none; }
.rail .nav-a[hidden] { display: none; }
.rail .nav-a::before { content: ""; position: absolute; inset-block: 5px; inset-inline-start: 0; width: 3px; border-radius: 0 2px 2px 0; background: transparent; }
.rail .nav-a .nav-i { margin-inline: calc((var(--rail-w) - 20px) / 2); }
.rail .nav-a:hover { color: var(--snow); background: var(--carbon); text-decoration: none; }
.rail .nav-a.on { color: var(--snow); background: var(--smoke); }
.rail .nav-a.on::before { background: var(--violet-light); }
.rail .nav-a.on .nav-i { color: var(--violet-light); }
.rail .nav-ai, .rail .nav-ai .nav-i { color: var(--violet-light); }
.nav-t { flex: none; }                          /* clipped by the rail when it is shut, never removed */

/* the counts: a pill on the icon's corner while the labels are away, beside the label once they are back */
.rail .nav-n { position: absolute; top: 4px; inset-inline-start: calc(var(--rail-w) / 2 + 4px); min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: var(--r-pill); background: var(--violet); color: var(--snow);
  display: inline-flex; align-items: center; justify-content: center; font: var(--w-em) 10px/1 var(--sans); letter-spacing: 0; }
.rail .nav-n[hidden] { display: none; }
:root.rail-wide .rail .nav-n { position: static; margin-inline: auto 14px; min-width: 0; height: auto; padding: 0;
  background: none; color: var(--violet-light); font: var(--w-em) var(--fs-caption)/1 var(--sans); letter-spacing: var(--ls-caption); }

/* the foot: the demo tag, who is signed in, the Check-ins door, sign out, the pin */
.rail-foot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 8px; border-top: 1px solid var(--smoke); }
/* at rest the Check-ins door above already carries the count; the button comes back with the labels */
:root:not(.rail-wide) .rail .rail-cta { display: none; }
.rail .who { display: block; width: 40px; height: 40px; padding: 0; border-radius: 50%; overflow: hidden; text-align: center;
  font-size: 0; line-height: 40px; color: var(--snow); border: 1px solid var(--ash); max-width: none; white-space: nowrap; }
.rail .who::first-letter { font: var(--w-head) 15px/38px var(--sans); }
.rail .who[hidden] { display: none; }
:root.rail-wide .rail .who { width: auto; height: auto; align-self: stretch; margin-inline: 12px; padding: 8px 12px; border-radius: var(--r-pill);
  font: var(--w-head) var(--fs-caption)/1.2 var(--sans); letter-spacing: var(--ls-caption); color: var(--fog); text-align: start; text-overflow: ellipsis; }
:root.rail-wide .rail .who::first-letter { font: inherit; }
.rail .rail-cta { display: flex; align-items: center; justify-content: center; gap: 10px; flex: none; width: 40px; height: 40px; min-height: 0; padding: 0; }
.rail .rail-cta-t, .rail .rail-btn-t { display: none; }
.rail #ctaCheckins { display: none; }
.rail .rail-btn { display: flex; align-items: center; justify-content: center; gap: 10px; flex: none; width: 40px; height: 40px; min-height: 0; padding: 0;
  border: 0; background: none; color: var(--mist); cursor: pointer; font: var(--w-head) var(--fs-small)/1 var(--sans); letter-spacing: var(--ls-small); }
.rail .rail-btn[hidden] { display: none; }
.rail .rail-btn:hover { color: var(--snow); }
:root.rail-pinned .rail .rail-pin .nav-i { transform: rotate(180deg); }
:root.rail-wide .rail .rail-cta, :root.rail-wide .rail .rail-btn { width: auto; align-self: stretch; margin-inline: 12px; padding: 0 12px; justify-content: flex-start; }
:root.rail-wide .rail .rail-cta-t, :root.rail-wide .rail .rail-btn-t, :root.rail-wide .rail #ctaCheckins { display: inline; }
.rail a:focus-visible, .rail button:focus-visible, .rail-toggle:focus-visible { outline: 2px solid var(--violet-light); outline-offset: -3px; }

/* a phone: the strip that calls the rail back, and the scrim behind the open drawer */
.rail-top { display: none; }
.rail-scrim { display: none; position: fixed; inset: 0; z-index: 35; background: var(--void); opacity: .6; }

/* ---- the page: the screen beside the rail, up to a ceiling ---- */
.main { display: block; max-width: none; margin: 0; margin-inline-start: var(--rail-w); padding: 0 clamp(20px, 2.4vw, 44px);
  overflow: visible; transition: margin-inline-start .14s ease; }
:root.rail-open .main { margin-inline-start: var(--rail-w-open); }
/* push, not cover, where the page can spare the width: reading a label must not hide the names column */
@media (min-width: 1280px) { :root.rail-wide .main { margin-inline-start: var(--rail-w-open); } }
.view { max-width: var(--page); margin-inline: auto; }
/* a column never grows past its track because of one long line in it: on a phone Today's queue
   pushed the whole page wider than the screen (the same on the bar layout; found making this demo) */
.grid-2 > *, .grid-3 > *, .lane > *, .four > * { min-width: 0; }
.client-row { max-width: 100%; }
/* two things do not get better for being 1,680px wide: a sentence, and a one-line field */
.view > p, .sect > p, .view-head p, p.empty, p.quiet, .notice { max-width: var(--prose); }
.field > input, .field > select, .field > textarea { max-width: var(--prose); }
.tabs.pin { top: var(--bar-h); }                /* a client's tabs stick to the top of the window itself */
.lane-col { scroll-margin-top: calc(var(--bar-h) + 16px); }
#viewCheckins .stats { max-width: calc(3 * 300px + 2 * 8px); }     /* three counters, not three banners */
.lane { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
/* Today, when nothing waits: said once, in type large enough to be the page */
p.empty.calm { font: var(--w-head) var(--fs-h3)/var(--lh-h3) var(--display); letter-spacing: var(--ls-h3); color: var(--snow); font-style: normal; padding: 8px 0 4px; margin: 0; }
/* the Workday board on a wide screen: the piles flow into columns the moment two whole cards fit side by side;
   no card is stretched and none is cut by a column edge */
#wdPacket { --wd-measure: 620px; column-width: var(--wd-measure); column-gap: var(--gap-sect); }
#wdPacket .pile { max-width: var(--wd-measure); break-inside: avoid; }
#wdPacket .pile-head { break-after: avoid; }
#wdPacket .wd-card { break-inside: avoid; }
/* the assistant's chat keeps its reading measure in the wide page */
.chat { max-width: 860px; }

/* ---- narrow windows ---- */
@media (max-width: 899.98px) {
  .main { padding-inline: 20px; }
  .rail .rail-pin { display: none; }            /* nothing for it to do at this width */
}
@media (max-width: 760px) {
  /* the strip is 52px of its own UNDER an iPhone's status bar (tokens.css --safe-t): --bar-h carries both, so
     everything that stands clear of the strip (the page, pinned tabs, the open dock, the chat's height) clears the clock too */
  :root { --bar-h: calc(52px + var(--safe-t)); }
  .rail { width: var(--rail-w-open); transform: translateX(-100%); transition: transform .16s ease; z-index: 60;
    padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
  :root.rail-drawer .rail { transform: none; }
  :root.rail-drawer .rail-scrim { display: block; z-index: 55; }
  .main, :root.rail-open .main, :root.rail-wide .main { margin-inline-start: 0; padding: var(--bar-h) 16px var(--safe-b); }
  .rail-top { position: fixed; inset-inline: 0; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; height: var(--bar-h);
    padding: var(--safe-t) 12px 0; background: var(--onyx); border-bottom: 1px solid var(--smoke); }
  .rail-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--ash);
    border-radius: var(--r-pill); background: var(--carbon); color: var(--snow); font: var(--w-head) var(--fs-small)/1 var(--sans); letter-spacing: var(--ls-small); cursor: pointer; }
  .rail-top-mark img { display: block; width: 52px; height: 38px; }
  .rail-top-here { margin-inline-start: auto; font: var(--w-head) var(--fs-small)/1 var(--sans); letter-spacing: var(--ls-small); color: var(--fog); }
  .rail .nav-a { padding: 0; font-size: var(--fs-ui); }
  .rail .who { max-width: none; }
  /* the open assistant fills the screen BELOW this strip, never under it: the strip (z 50) sat over the
     dock's (z 40) header, so on a phone its Hide, New and Open could not be tapped (2026-10-01) */
  .cp-dock:not(.shut) { top: var(--bar-h); padding-bottom: var(--safe-b); }
  .cp-dock-tab { bottom: calc(12px + var(--safe-b)); }      /* above the swipe bar, where a tap is a tap */
}

/* a laptop's height: every door stays in reach without scrolling the rail. Last in the file, so it
   wins over the sizes above; the phone drawer scrolls instead and is left alone. */
@media (max-height: 820px) and (min-width: 761px) {
  .rail .wordmark { height: 52px; }
  .rail .wordmark .wm-mark { height: 44px; }
  .rail .spaces { padding: 2px 0; }
  .rail .space-a { min-height: 30px; }
  .rail .nav { padding: 2px 0; }
  .rail .nav-a { min-height: 31px; }
  .rail .nav-a::before { inset-block: 3px; }
  .rail .nav-n { top: 1px; }
  .rail .tag { display: none; }
  .rail-foot { gap: 0; padding: 4px 0; }
  .rail .who { width: 30px; height: 30px; line-height: 30px; }
  .rail .who::first-letter { line-height: 28px; font-size: 13px; }
  .rail .rail-btn, .rail .rail-cta { height: 30px; }
}

/* sixteen doors on a desktop screen of ordinary height: a little tighter, so none hides below the foot */
@media (min-height: 820.02px) and (max-height: 1040px) and (min-width: 761px) {
  .rail .wordmark { height: 68px; }
  .rail .space-a { min-height: 36px; }
  .rail .nav-a { min-height: 36px; }
  .rail-foot { gap: 2px; padding: 6px 0; }
  .rail .rail-btn, .rail .rail-cta { height: 36px; }
}
