/*
 * The one shell every portal wears (Package 76; Package 75's board 1, approved
 * "Build as drawn" on 2026-11-03). Its look only: portal_shell.js draws the
 * parts. The staff console wears it first; the Admin Portal, Teach and the
 * sign-up (Packages 80, 81 and 83) load this same file, never a copy.
 *
 * Colours come only from the roles brand.css and console.css both define
 * (--canvas, --surface, --raised, --sunken, --ink, --ink2, --line, --line2,
 * --strong-line, --accent, --on-accent, --accent-soft, --accent-ink,
 * --signal, --on-signal, --danger, --success, --focus, --glass). The few the
 * public pages' brand.css lacks (warning, the soft fills, the scrim, the
 * violet of an event) are set here, in both themes, with the same values as
 * console.css, so this file works on a console page and on the sign-up page.
 *
 * The parts and their measures are the boards' own
 * (design/renderings/package-75/parts.mjs, "The shell (board 1)" and
 * "Console parts"): a side rail of 236 px on a desktop, icons only (72 px)
 * from 768 to 1,023 px, a bottom bar on a phone; 44 px targets everywhere.
 */

:root {
  --ps-knob: #FFFFFF;
  --ps-knob-off: #FFFFFF;
  --warning: #86560C;
  --warn-soft: #F7EBD3;
  --danger-soft: #FBE7E4;
  --on-danger: #FFFFFF;
  --ok-soft: #DFEFE4;
  --moment: #6B4BC8;
  --moment-soft: #EEE8FB;
  --scrim: rgba(21, 32, 29, 0.38);
  --ps-lift: 0 18px 40px -18px rgba(21, 32, 29, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* The switch's knob at night: the accent's own ink (white on coral is 2.84:1, under 3:1; Package 76's report). */
    --ps-knob: #2A0A02;
    --warning: #E8B45C;
    --warn-soft: #2E2413;
    --danger-soft: #331715;
    --on-danger: #2E0606;
    --ok-soft: #12281C;
    --moment: #B49CFF;
    --moment-soft: #231C3A;
    --scrim: rgba(0, 0, 0, 0.55);
    --ps-lift: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --ps-knob: #2A0A02;
  --warning: #E8B45C;
  --warn-soft: #2E2413;
  --danger-soft: #331715;
  --on-danger: #2E0606;
  --ok-soft: #12281C;
  --moment: #B49CFF;
  --moment-soft: #231C3A;
  --scrim: rgba(0, 0, 0, 0.55);
  --ps-lift: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
}

/* ---- the frame: rail, page, bottom bar ------------------------------------ */

.pshell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "top main" "nav main" ". main" "who main";
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
}
/* The rail's ground, behind its three parts (they are the shell's own children, so each is drawn once). */
.prail-bg {
  grid-column: 1;
  grid-row: 1 / -1;
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}
.ptop, .pnavs, .pwho { grid-column: 1; position: relative; z-index: 1; }
.ptop {
  grid-area: top;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 12px 0;
  position: sticky;
  top: 0;
}
.pbrand { display: flex; align-items: center; gap: 9px; padding: 0 6px 4px; }
.pbrand img { width: 28px; height: 28px; border-radius: 9px; flex: none; }
.pbrand .ps-wordmark { font-family: var(--display, 'Bricolage Grotesque'), sans-serif; font-weight: 800; font-size: 17px; letter-spacing: .02em; color: var(--ink); }
.ps-wordmark span { color: var(--accent-ink); }

/* The place switcher: one control (a native select over the drawn face, so it is one stop with its name). */
.pswitch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--raised);
  border: 1px solid var(--line2);
}
.pswitch:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.pswitch select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font: inherit;
  border: 0;
  margin: 0;
}
.pswitch select:disabled { cursor: default; }
.pswitch .ps-names { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pswitch .ps-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pswitch .ps-sub { font-size: 13px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pswitch.single .ps-chev { display: none; }
.ptile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 30%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--display, 'Bricolage Grotesque'), sans-serif;
  font-weight: 800;
  font-size: 12px;
  flex: none;
}

.pnavs {
  grid-area: nav;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 18px 12px 0;
  position: sticky;
  top: 150px;
}
.pnav {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  background: transparent;
  border: 0;
}
.pnav:hover { color: var(--ink); background: var(--sunken); }
.pnav[aria-current="page"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line2); }
.pnav:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.pnav .ico { width: 20px; height: 20px; }
.pnav .pnav-word { flex: 1 1 auto; }
.ps-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ps-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

.pwho {
  grid-area: who;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px;
  padding: 10px 4px 14px 6px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  background: var(--surface);
}
.pwho .ps-names { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pwho .ps-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwho .ps-sub { font-size: 13px; color: var(--ink2); }
.cinit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--line2);
  flex: none;
}
/* On a phone the person is a disc at the top right; the disc opens the same menu. */
.pwho-disc { display: none; }

.pmain {
  grid-area: main;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.pmain:focus { outline: none; }

/* A page's head: its title, one line of help, its own actions on the right. */
.phead { display: flex; align-items: flex-start; gap: 16px; padding: 24px 28px 14px; }
.phead-titles { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.ptitle {
  font-family: var(--display, 'Bricolage Grotesque'), sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
  color: var(--ink);
}
.ptitle:focus { outline: none; }
.chelp { font-size: 14.5px; color: var(--ink2); line-height: 1.45; margin: 0; }
.pacts { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ptabs { padding: 0 28px 12px; }
.pbody { display: flex; flex-direction: column; gap: 14px; padding: 4px 28px 120px; min-width: 0; }

/* Icons only, from 768 to 1,023 px (builder's choice 1.1): the names go to a tooltip and a screen reader. */
@media (min-width: 768px) and (max-width: 1023px) {
  .pshell { grid-template-columns: 72px minmax(0, 1fr); }
  .ptop { padding: 14px 10px 0; align-items: center; }
  .pbrand .ps-wordmark, .pswitch .ps-names, .pswitch .ps-chev { display: none; }
  .pswitch { width: 52px; padding: 8px; justify-content: center; }
  .pnavs { padding: 14px 10px 0; align-items: center; }
  .pnav { width: 52px; justify-content: center; padding: 0; position: relative; }
  .pnav .pnav-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pnav .ps-count { position: absolute; top: 2px; right: 0; }
  .pwho { margin: 0 8px; padding: 10px 0 14px; justify-content: center; }
  .pwho .ps-names { display: none; }
  .pwho .cinit:not(.pwho-disc) { display: none; }
}

/* A phone: the switcher and the person on top, the five destinations in a bar at the foot. */
@media (max-width: 767px) {
  .pshell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "top" "main";
  }
  .prail-bg { display: none; }
  .ptop {
    grid-column: 1;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 64px 6px 16px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: var(--canvas);
    z-index: 6;
  }
  .pbrand { display: none; }
  .pswitch { flex: 1 1 auto; min-height: 46px; padding: 6px 10px; }
  .pswitch .ps-sub { display: none; }
  .ptile { width: 30px; height: 30px; font-size: 11px; }
  .pnavs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding: 8px 6px max(12px, env(safe-area-inset-bottom));
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    backdrop-filter: blur(18px) saturate(1.3);
    border-top: 1px solid var(--line);
    z-index: 8;
  }
  .pnav {
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 62px;
    min-height: 48px;
    padding: 0;
    font-size: 11.5px;
    background: transparent;
    position: relative;
  }
  .pnav:hover { background: transparent; }
  .pnav .ps-ico {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 30px;
    border-radius: 999px;
  }
  .pnav[aria-current="page"] { background: transparent; box-shadow: none; }
  .pnav[aria-current="page"] .ps-ico { background: var(--raised); box-shadow: inset 0 0 0 1px var(--line2); }
  .pnav .pnav-word { flex: none; }
  .pnav .ps-count { position: absolute; top: -4px; right: 2px; }
  .pwho {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: 12px;
    bottom: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    z-index: 7;
  }
  .pwho .ps-names, .pwho .ps-more { display: none; }
  .pwho-disc { display: inline-flex; }
  .pwho > .cinit:not(.pwho-disc) { display: none; }
  .phead { display: block; padding: 10px 16px 10px; }
  .phead .ptitle { font-size: 26px; }
  .phead .pacts { justify-content: flex-start; margin-top: 10px; }
  .ptabs { padding: 0 16px 10px; overflow-x: auto; }
  .pbody { padding: 2px 16px 132px; gap: 12px; }
}

/* ---- the console's parts ---------------------------------------------------- */

.ico, .ps-ico svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 18px; height: 18px; }
.ico-xs { width: 14px; height: 14px; }

.cb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  filter: none;
}
.cb:disabled { opacity: 1; cursor: not-allowed; background: var(--sunken); color: var(--ink2); border: 1.5px dashed var(--line2); box-shadow: none; }
.cb:focus-visible, .cib:focus-visible, .clink:focus-visible, .clink-in:focus-visible, .cchip:focus-visible, .cseg button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cb-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.cb-wide { width: 100%; flex: 1 1 auto; }
.cb-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 22px -12px var(--accent); }
.cb-quiet { background: var(--raised); color: var(--ink); border-color: var(--line2); }
.cb-quiet:hover:not(:disabled) { background: var(--sunken); }
.cb-ghost { background: transparent; color: var(--ink); }
.cb-ghost:hover:not(:disabled) { background: var(--sunken); }
.cb-danger { background: var(--danger); color: var(--on-danger); }
.cb[aria-expanded="true"], .cb.is-on { box-shadow: 0 0 0 2px var(--ink); }
.cb .ps-switch { pointer-events: none; }

.cib {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  flex: none;
  background: transparent;
  border: 0;
  color: var(--ink2);
  cursor: pointer;
}
.cib:hover { background: var(--sunken); color: var(--ink); }
.cib-edge { border: 1px solid var(--line2); background: var(--raised); }

.clink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font: inherit;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--accent-ink);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.clink-in {
  display: inline;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent-ink);
  background: none;
  border: 0;
  cursor: pointer;
  /* The line stays short; the target is the words and the space around them. */
  min-height: 24px;
}

.cpill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}
.cpill-plain { background: var(--sunken); color: var(--ink2); border: 1px solid var(--line); }
.cpill-warn { background: var(--warn-soft); color: var(--warning); }
.cpill-ok { background: var(--ok-soft); color: var(--success); }
.cpill-accent { background: var(--accent-soft); color: var(--accent-ink); }
.cpill-danger { background: var(--danger-soft); color: var(--danger); }
.cpill-moment { background: var(--moment-soft); color: var(--moment); }
.cpill-live { background: var(--signal); color: var(--on-signal); }
.cpill-ink { background: var(--ink); color: var(--canvas); }

.cchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cchips.ps-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.cchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink2);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  flex: none;
}
.cchip:hover { color: var(--ink); }
.cchip.on, .cchip[aria-current="page"], .cchip[aria-pressed="true"], .cchip[aria-selected="true"] { background: var(--ink); color: var(--canvas); border-color: transparent; }

.cseg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line); }
.cseg.ps-full { display: flex; }
.cseg button {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink2);
  background: transparent;
  border: 0;
  white-space: nowrap;
  cursor: pointer;
}
.cseg button[aria-selected="true"], .cseg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 1px 0 var(--line2); }

.ccard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.ct { font-family: var(--display, 'Bricolage Grotesque'), sans-serif; font-weight: 700; letter-spacing: -0.015em; font-size: 18px; line-height: 1.2; margin: 0; color: var(--ink); }
.csub { font-size: 13.5px; color: var(--ink2); line-height: 1.4; margin: 0; }
.leyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); padding: 6px 2px 0; margin: 0; }

.crows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.crow { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; width: 100%; text-align: left; font: inherit; color: var(--ink); background: transparent; border: 0; border-radius: 0; }
.crow + .crow { border-top: 1px solid var(--line); }
.crows > [role=listitem] + [role=listitem] > .crow { border-top: 1px solid var(--line); }
button.crow, a.crow { cursor: pointer; text-decoration: none; }
button.crow:hover, a.crow:hover { background: var(--sunken); }
button.crow:focus-visible, a.crow:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.crow .ps-names { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-width: 0; }
.crow .ps-name { font-weight: 700; }

.cwell { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; background: var(--raised); color: var(--ink2); flex: none; border: 1px solid var(--line); }
.cwell-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.cwell-moment { background: var(--moment-soft); color: var(--moment); border-color: transparent; }
.cwell-warn { background: var(--warn-soft); color: var(--warning); border-color: transparent; }
.cwell-ok { background: var(--ok-soft); color: var(--success); border-color: transparent; }

/* A switch: a button with role="switch"; its state is in aria-checked, and in words beside it. */
.switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  padding: 0;
  border-radius: 999px;
  background: var(--line2);
  border: 1.5px solid var(--strong-line);
  flex: none;
  cursor: pointer;
}
.switch::after {
  content: '';
  position: absolute;
  top: 1.5px;
  left: 1.5px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--ps-knob-off);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .28);
  transition: left 0.15s ease;
}
/* On: the accent, as every board draws it (parts.mjs; the design language's switch). */
.switch[aria-checked="true"], .switch.on { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after, .switch.on::after { left: 21.5px; background: var(--ps-knob); }
.switch:disabled { cursor: not-allowed; border-style: dashed; }
.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* A 44-pixel target (rule L9) round the drawn size, which stays the boards' 51 by 31 (36 by 22 small). */
.switch::before { content: ''; position: absolute; inset: calc(50% - 22px); }
.switch.sw-sm { width: 36px; height: 22px; }
.switch.sw-sm::after { top: 1.5px; left: 1.5px; width: 16px; height: 16px; }
.switch.sw-sm[aria-checked="true"]::after, .switch.sw-sm.on::after { left: 15.5px; }
@media (prefers-reduced-motion: reduce) { .switch::after { transition: none; } }

/* ---- saying it in the page ------------------------------------------------- */

/* The toast: what happened, and an action such as Undo. Over the bottom bar on a phone. */
.ps-toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(520px, calc(100vw - 24px));
  pointer-events: none;
}
.ctoast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 8px 0 16px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--ps-lift);
  pointer-events: auto;
}
.ctoast .ps-words { flex: 1 1 auto; padding: 12px 0; }
.ctoast button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  color: var(--canvas);
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ctoast button:focus-visible { outline: 3px solid var(--canvas); outline-offset: -3px; }
@media (max-width: 767px) { .ps-toasts { bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* The scrim behind a confirm or a sheet. */
.cscrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; }

/* The in-page confirm: the thing named in the question, Cancel first. Over
   everything but the toast: a sheet, a menu or a panel it was asked from. */
.ps-dialogs > .cscrim { z-index: 50; }
.cdialog {
  position: fixed;
  z-index: 51;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 24px));
  padding: 24px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6);
}
.cdialog .ct { font-size: 20px; }
.cdialog .csub { font-size: 14.5px; }
.cdialog .ps-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
@media (max-width: 767px) {
  .cdialog { left: 12px; right: 12px; top: auto; bottom: max(24px, env(safe-area-inset-bottom)); transform: none; width: auto; }
}

/* A side sheet on a desktop (Learn more, a drawer, the Add teammate sheet), from the foot on a phone. */
.cside {
  position: fixed;
  z-index: 41;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--line2);
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 48px -24px rgba(0, 0, 0, .5);
}
.cside-head { display: flex; align-items: center; gap: 8px; padding: 14px 10px 10px 22px; border-bottom: 1px solid var(--line); }
.cside-head .ct { font-size: 19px; flex: 1 1 auto; }
.cside-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 28px; overflow-y: auto; flex: 1 1 auto; }
.cside-foot { display: flex; gap: 10px; padding: 14px 18px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.cside .crows, .cside .cradio { background: var(--canvas); }
@media (max-width: 767px) {
  .cside {
    top: auto;
    left: 0;
    width: auto;
    max-height: calc(100dvh - 48px);
    border-left: 0;
    border-top: 1px solid var(--line2);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -24px 48px -24px rgba(0, 0, 0, .55);
  }
  .cside::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 999px; background: var(--line2); margin: 8px auto 0; flex: none; }
  .cside-head { border-bottom: 0; padding: 6px 10px 4px 18px; }
  .cside-body { padding: 6px 18px max(34px, env(safe-area-inset-bottom)); }
  .cside.ps-full { top: 0; max-height: none; border-radius: 0; }
  .cside.ps-full::before { display: none; }
}

/* A menu open under a button (Busy ▾, Sold out ▾, ⋯). */
.cmenu {
  position: fixed;
  z-index: 45;
  min-width: 240px;
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 16px;
  background: var(--raised);
  border: 1px solid var(--line2);
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
}
.cmenu > button, .cmenu .ps-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.cmenu > button:hover, .cmenu > button:focus-visible { background: var(--sunken); outline: none; }
.cmenu > button:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.cmenu > button.bad { color: var(--danger); }
.cmenu > button[aria-checked="true"] { background: var(--sunken); }
.cmenu .ps-trail { font-size: 13px; color: var(--ink2); font-weight: 500; font-variant-numeric: tabular-nums; }
.cmenu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.cmenu-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.cmenu-head .ps-name { font-weight: 700; color: var(--ink); }
/* Other time typed in the menu itself (the custom wait time board, A, 2026-11-13): "Other [25] min [Use 25 min]". */
.cmenu-typed { display: flex; flex-direction: column; gap: 4px; padding-block: 6px; padding-inline: 12px 6px; }
.cmenu-typed-row { display: flex; align-items: center; gap: 8px; }
.cmenu-typed-label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.cmenu-typed-field { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 10px; background: var(--sunken); border: 2px solid var(--accent); }
.cmenu-typed-field:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.cmenu-typed-box { width: 3ch; min-width: 0; flex: 1 1 auto; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; outline: none; }
/* Inside its field the box draws nothing of its own. The site's `input[type="text"]` (0,1,1), and in the console
   `body.staff .shell input[type="text"]` (0,3,2), outranked the class above and drew a box inside the field
   (found 2026-11-14 with the two-step code box): this rule is heavier, (0,5,1). functions/test/fieldsInTheirBoxes.test.js. */
.cmenu-typed-field.cmenu-typed-field > input.cmenu-typed-box.cmenu-typed-box[type="text"] {
  width: 3ch; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
  background: transparent; color: var(--ink); font-size: 16px; font-weight: 700;
}
.cmenu-typed-unit { font-size: 13px; color: var(--ink2); }
.cmenu-typed-use { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.cmenu-typed-use:disabled { background: var(--sunken); color: var(--ink2); cursor: default; }
.cmenu-typed-use:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cmenu-typed-line { margin: 0; font-size: 12.5px; color: var(--ink2); }
.cmenu-typed-line.bad { color: var(--accent-ink); font-weight: 700; }

/* The one sticky bar for unsaved changes: Discard and Save. Above the bottom bar on a phone. */
.csave {
  position: fixed;
  z-index: 30;
  left: calc(236px + 28px);
  right: 28px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 0 10px 0 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  box-shadow: var(--ps-lift);
}
.csave .ps-words { flex: 1 1 auto; font-weight: 700; }
.csave-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); flex: none; }
@media (min-width: 768px) and (max-width: 1023px) { .csave { left: calc(72px + 20px); right: 20px; } }
@media (max-width: 767px) { .csave { left: 12px; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* The banner that stays (only Busy stands above the work). */
.cbanner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 28px 0;
  padding: 8px 8px 8px 14px;
  border-radius: 14px;
  background: var(--warn-soft);
  border: 1.5px solid var(--warning);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 700;
}
.cbanner > .ico { color: var(--warning); }
.cbanner .ps-words { flex: 1 1 auto; margin: 0; }
@media (max-width: 767px) { .cbanner { margin: 8px 16px 0; } }

/* A line in place: the connection lost, a note. Calm ink 2, never red. */
.cline {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--sunken);
  color: var(--ink2);
  font-size: 13.5px;
  font-weight: 600;
}
.cline .ps-words { flex: 1 1 auto; }
.pmain > .cline { margin: 14px 28px 0; }
@media (max-width: 767px) { .pmain > .cline { margin: 8px 16px 0; } }

/* The empty state: a neutral ring, one line, one action. */
.cempty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 20px; text-align: center; }
.cempty-ring { display: flex; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; border: 1.5px dashed var(--line2); }
.cempty-ring span { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); }
.cempty .csub { max-width: 340px; }

/* Loading: the shape of what is coming; no word, face or figure in it. */
.cskel { display: flex; flex-direction: column; gap: 16px; }
.cskel .ps-skrow { display: flex; gap: 12px; align-items: center; }
.cskel .ps-skcol { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.sk { display: block; border-radius: 999px; background: linear-gradient(90deg, var(--sunken), var(--raised), var(--sunken)); }

/* A radio row (a role, a reason). */
.cradio { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); cursor: pointer; }
.cradio input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.cradio:has(input:checked) { border: 1.5px solid var(--ink); }
.cradio:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.cradio .ps-names { display: flex; flex-direction: column; flex: 1 1 auto; }

/* Fields as the boards draw them: a label over a sunken box with a strong edge. */
.cfield { display: flex; flex-direction: column; gap: 6px; }
.cfield > label, .cfield > .ps-label { font-size: 13px; font-weight: 600; color: var(--ink2); }
.cfield input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .cfield select, .cfield textarea {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--sunken);
  border: 1px solid var(--strong-line);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  width: 100%;
}
.cfield .chint { font-size: 12.5px; color: var(--ink2); margin: 0; }

.ps-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ps-grow { flex: 1 1 auto; min-width: 0; }
.ps-num { font-variant-numeric: tabular-nums; }

/* A panel under a button (Sold out ▾, the person's menu): a dialog that does not hold the page. */
.cpop {
  position: fixed;
  z-index: 45;
  max-width: calc(100vw - 24px);
  max-height: min(78vh, 640px);
  overflow-y: auto;
  padding: 10px;
  border-radius: 16px;
  background: var(--raised);
  border: 1px solid var(--line2);
  box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .55);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cpop-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; }
.cpop-head .ct { font-size: 16px; flex: 1 1 auto; }
.cpop .ps-item, .cside .ps-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.cpop .ps-item:hover { background: var(--sunken); }
.cpop .ps-item:focus-visible, .cside .ps-item:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ps-item .ps-trail { font-size: 12.5px; color: var(--ink2); font-weight: 500; }

/* A switch's look inside a button that is the switch (aria-checked on the button). */
.switch.on, [aria-checked="true"] > .switch { background: var(--accent); border-color: var(--accent); }
.switch.on::after, [aria-checked="true"] > .switch::after { left: 21.5px; background: var(--ps-knob); }
.switch.sw-sm.on::after, [aria-checked="true"] > .switch.sw-sm::after { left: 15.5px; }
span.switch { pointer-events: none; }

/* The long help in its sheet. */
.ps-learn { display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 1.5; color: var(--ink); }
.ps-learn p { margin: 0; }

/* On a touch screen every field's text is 16px, in the console, the Admin
   Portal and Teach alike: Safari on an iPhone zooms the page in on any field
   under 16px and leaves it zoomed (the end-to-end review of 2026-11-17, W5). */
@media (pointer: coarse) {
  .cfield input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .cfield select,
  .cfield textarea,
  input.cfield, select.cfield, textarea.cfield { font-size: 16px; }
}
