/* lcl-office: the Lightning Command Lines look (the kit's README colours; the hub's shapes and type, so the office reads
   as one family with Orbit). Dark first; a complete light theme; the person's choice (html[data-theme]) or else their
   system (prefers-color-scheme), dark when the system says nothing. A page a visitor or a customer sees is light when no
   choice was made (web.mjs customerThemeOf); a signed-out page (body.public) then stands on white (--public-bg), a
   signed-in customer's page on the page ground. Every colour is a token here and nowhere else.
   Kit colours: electric blue #0A84FF, deep blue #0B4FD9, sky #39B6FF, black #05070D, ink #0B0F19, paper #F7F9FC,
   hairline #D9DEE7; the greys are mixes of ink and paper. Two greys are a step darker than the hub's (#5F697B for small
   text on paper, #6B768C for control borders on dark) so text reaches 4.5:1 and control edges 3:1. The kit has no state
   colours: the four used for errors, success and warnings (red, green, amber) are the only colours not from it, always
   beside the kit's icon and words, never alone.
   Fonts: Inter (variable) and JetBrains Mono, the files in fonts/ (the hub's, unchanged). No inline style anywhere:
   the strict content security policy allows only this file. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/InterVariable.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/JetBrainsMono-Regular.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/JetBrainsMono-Bold.woff2) format("woff2"); }

/* ---------- tokens: dark (the default) ---------- */
:root {
  color-scheme: dark;
  --page-bg: #0E131D;
  --public-bg: #0E131D;
  --text-1: #F7F9FC;
  --text-2: #B4BCC9;
  --text-3: #8F99AB;
  --link: #39B6FF;
  --link-line: rgba(57, 182, 255, .45);
  --card-bg: #131A26;
  --card-line: #222B3B;
  --raise-bg: #182131;
  --input-bg: #0B0F19;
  --input-line: #6B768C;
  --input-text: #F7F9FC;
  --btn-bg: #182131;
  --btn-line: #6B768C;
  --btn-text: #F7F9FC;
  --btn-hover: #1F2A3E;
  --primary-bg: #0B4FD9;
  --primary-hover: #1A5FE8;
  --primary-text: #FFFFFF;
  --focus: #39B6FF;
  --pill-bg: rgba(10, 132, 255, .16);
  --pill-text: #CFE8FF;
  --pill-line: rgba(57, 182, 255, .45);
  --neutral-bg: #1C2433;
  --neutral-text: #C9D0DB;
  --ok: #4ADE80;
  --ok-bg: rgba(74, 222, 128, .10);
  --warn: #FBBF24;
  --warn-bg: rgba(251, 191, 36, .10);
  --danger: #FF7B7B;
  --danger-bg: rgba(255, 107, 107, .10);
  --danger-btn: #B42318;
  --danger-btn-hover: #C8321F;
  --info: #39B6FF;
  --info-bg: rgba(57, 182, 255, .10);
  --shadow: 0 18px 44px rgba(5, 7, 13, .45), 0 3px 10px rgba(5, 7, 13, .30);
  --veil: rgba(5, 7, 13, .6);
  --code-bg: #0B0F19;
  /* the band (sidebar and the phone's top bar): dark in both themes, like Orbit's rail */
  --rail-bg: #0B0F19;
  --rail-line: #1A2130;
  --rail-text: #B4BCC9;
  --rail-icon: #8F99AB;
  --rail-on-bg: #16213A;
  --rail-on-text: #FFFFFF;
  --rail-on-icon: #39B6FF;
  --rail-quiet: #8F99AB;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", monospace;
  --radius: 10px;
  --radius-sm: 7px;
}

/* ---------- tokens: light (chosen, or the system's when no choice is made) ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --page-bg: #F7F9FC;
  --public-bg: #FFFFFF;
  --text-1: #0B0F19;
  --text-2: #4A5466;
  --text-3: #5F697B;
  --link: #0B4FD9;
  --link-line: rgba(11, 79, 217, .35);
  --card-bg: #FFFFFF;
  --card-line: #D9DEE7;
  --raise-bg: #EEF1F6;
  --input-bg: #FFFFFF;
  --input-line: #8590A2;
  --input-text: #0B0F19;
  --btn-bg: #FFFFFF;
  --btn-line: #8590A2;
  --btn-text: #0B0F19;
  --btn-hover: #EEF1F6;
  --primary-bg: #0B4FD9;
  --primary-hover: #0A45BF;
  --primary-text: #FFFFFF;
  --focus: #0B4FD9;
  --pill-bg: #EAF2FF;
  --pill-text: #0B4FD9;
  --pill-line: #BFD6FB;
  --neutral-bg: #EEF1F6;
  --neutral-text: #4A5466;
  --ok: #157F3B;
  --ok-bg: #EAF7EF;
  --warn: #8A5A00;
  --warn-bg: #FFF6E0;
  --danger: #B42318;
  --danger-bg: #FDEDEC;
  --danger-btn: #B42318;
  --danger-btn-hover: #9A1E14;
  --info: #0B4FD9;
  --info-bg: #EAF2FF;
  --shadow: 0 12px 32px rgba(11, 15, 25, .16), 0 2px 6px rgba(11, 15, 25, .08);
  --veil: rgba(5, 7, 13, .32);
  --code-bg: #EEF1F6;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --page-bg: #F7F9FC;
    --public-bg: #FFFFFF;
    --text-1: #0B0F19;
    --text-2: #4A5466;
    --text-3: #5F697B;
    --link: #0B4FD9;
    --link-line: rgba(11, 79, 217, .35);
    --card-bg: #FFFFFF;
    --card-line: #D9DEE7;
    --raise-bg: #EEF1F6;
    --input-bg: #FFFFFF;
    --input-line: #8590A2;
    --input-text: #0B0F19;
    --btn-bg: #FFFFFF;
    --btn-line: #8590A2;
    --btn-text: #0B0F19;
    --btn-hover: #EEF1F6;
    --primary-bg: #0B4FD9;
    --primary-hover: #0A45BF;
    --primary-text: #FFFFFF;
    --focus: #0B4FD9;
    --pill-bg: #EAF2FF;
    --pill-text: #0B4FD9;
    --pill-line: #BFD6FB;
    --neutral-bg: #EEF1F6;
    --neutral-text: #4A5466;
    --ok: #157F3B;
    --ok-bg: #EAF7EF;
    --warn: #8A5A00;
    --warn-bg: #FFF6E0;
    --danger: #B42318;
    --danger-bg: #FDEDEC;
    --danger-btn: #B42318;
    --danger-btn-hover: #9A1E14;
    --info: #0B4FD9;
    --info-bg: #EAF2FF;
    --shadow: 0 12px 32px rgba(11, 15, 25, .16), 0 2px 6px rgba(11, 15, 25, .08);
    --veil: rgba(5, 7, 13, .32);
    --code-bg: #EEF1F6;
  }
}

/* ---------- the base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font: 400 15px/1.5 var(--sans); color: var(--text-1); background: var(--page-bg); -webkit-font-smoothing: antialiased; }
/* the signed-out pages (the pay page, the doors, the legal pages): white in the light look (the owner, Nov 28 2026: "make it
   white background") and on paper (the print block sets the token too); in the dark look the same ground as every page */
body.public { background: var(--public-bg); }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono, kbd { font-family: var(--mono); font-size: .86em; }
code { padding: 1px 5px; border-radius: 5px; background: var(--code-bg); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--primary-bg); color: var(--primary-text); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }
.wrap-anywhere { overflow-wrap: anywhere; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.detail { display: block; max-width: 44ch; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.cell-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.key { font-size: 1.05em; letter-spacing: .06em; }

/* ---------- the kit's icons (public/icons, unchanged) as masks in the text colour ---------- */
.icon { display: inline-block; flex: none; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: no-repeat center / contain; mask: no-repeat center / contain; vertical-align: -3px; }
.icon--lcl-home { -webkit-mask-image: url(icons/lcl-home.svg); mask-image: url(icons/lcl-home.svg); }
.icon--team { -webkit-mask-image: url(icons/team.svg); mask-image: url(icons/team.svg); }
.icon--shield { -webkit-mask-image: url(icons/shield.svg); mask-image: url(icons/shield.svg); }
.icon--mail { -webkit-mask-image: url(icons/mail.svg); mask-image: url(icons/mail.svg); }
.icon--user { -webkit-mask-image: url(icons/user.svg); mask-image: url(icons/user.svg); }
.icon--lock { -webkit-mask-image: url(icons/lock.svg); mask-image: url(icons/lock.svg); }
.icon--menu { -webkit-mask-image: url(icons/menu.svg); mask-image: url(icons/menu.svg); }
.icon--close { -webkit-mask-image: url(icons/close.svg); mask-image: url(icons/close.svg); }
.icon--info { -webkit-mask-image: url(icons/info.svg); mask-image: url(icons/info.svg); }
.icon--warning { -webkit-mask-image: url(icons/warning.svg); mask-image: url(icons/warning.svg); }
.icon--check { -webkit-mask-image: url(icons/check.svg); mask-image: url(icons/check.svg); }
.icon--lcl-not-found { -webkit-mask-image: url(icons/lcl-not-found.svg); mask-image: url(icons/lcl-not-found.svg); }
.icon--settings { -webkit-mask-image: url(icons/settings.svg); mask-image: url(icons/settings.svg); }
@media (forced-colors: active) { .icon { forced-color-adjust: none; background-color: CanvasText; } }

/* ---------- the logo: the kit's on-dark file on dark ground, the regular one on light ---------- */
.logo { display: block; height: auto; }
.logo--for-light { display: none; }
:root[data-theme="light"] .logo--for-dark { display: none; }
:root[data-theme="light"] .logo--for-light { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .logo--for-dark { display: none; }
  :root:not([data-theme]) .logo--for-light { display: block; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--btn-text); font: 600 14px/1.2 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .12s ease, border-color .12s ease; }
.btn:hover { background: var(--btn-hover); }
.btn--secondary { background: var(--btn-bg); border-color: var(--btn-line); color: var(--btn-text); }
.btn--primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-text); }
.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--danger { background: var(--danger-btn); border-color: var(--danger-btn); color: #FFFFFF; }
.btn--danger:hover { background: var(--danger-btn-hover); border-color: var(--danger-btn-hover); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-1); }
.btn--ghost:hover { background: var(--btn-hover); }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn.is-disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; opacity: .8; }
.btn[aria-busy="true"]::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

/* the Google button, per Google's Sign in with Google branding guidelines: light #FFF on #747775, dark #131314 on #8E918F */
.gsi-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid #8E918F; background: #131314; color: #E3E3E3; font: 500 14px/20px var(--sans); text-decoration: none; }
:root[data-theme="light"] .gsi-btn { border-color: #747775; background: #FFFFFF; color: #1F1F1F; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .gsi-btn { border-color: #747775; background: #FFFFFF; color: #1F1F1F; } }
.gsi-icon { display: inline-flex; }
.gsi-text { white-space: nowrap; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--input-line); background: var(--input-bg); color: var(--input-text); }
.textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
.input::placeholder { color: var(--text-3); opacity: 1; }
.input[aria-invalid="true"], .field--error .input { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.input--code { max-width: 12ch; font-family: var(--mono); font-size: 20px; letter-spacing: .3em; }
.select--sm { width: auto; min-height: 34px; padding: 4px 10px; }
.help { font-size: 13px; color: var(--text-2); }
.error { font-size: 13.5px; font-weight: 600; color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.field--inline { min-width: 160px; }

/* ---------- the public column (sign-in, invites, errors for someone signed out) ---------- */
.public-wrap { display: flex; flex-direction: column; align-items: center; min-height: 100vh; padding: 40px 16px 24px; }
.public-head { margin-bottom: 28px; }
.public-head .logo { width: 206px; }
.public-main { width: 100%; max-width: 440px; outline: none; }
.public-main:has(.auth--wide) { max-width: 640px; }
.public-foot { margin-top: auto; padding-top: 32px; color: var(--text-3); font-size: 11.5px; letter-spacing: .14em; }
.auth { display: flex; flex-direction: column; gap: 18px; padding: 28px 28px 24px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--card-bg); box-shadow: var(--shadow); }
.auth--wide { padding: 28px; }
.auth-title { font: 650 26px/1.15 var(--sans); letter-spacing: -.018em; }
.auth-sub { color: var(--text-2); }
.auth-note { font-size: 13px; color: var(--text-2); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form--quiet { gap: 10px; padding-top: 14px; border-top: 1px solid var(--card-line); }
.auth-choices { display: flex; flex-direction: column; gap: 10px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--card-line); }
.passkey-box { display: flex; flex-direction: column; gap: 8px; }
.auth .card { box-shadow: none; }

/* ---------- the staff shell: the band (sidebar) and the content ---------- */
.shell { display: flex; min-height: 100vh; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.sidebar { position: sticky; top: 0; flex: none; display: flex; flex-direction: column; width: 248px; height: 100vh; background: var(--rail-bg); color: var(--rail-text); border-right: 1px solid var(--rail-line); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 14px; }
.sidebar-head .brand { display: block; }
.sidebar-head .logo { width: 172px; }
.nav-toggle-label { display: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid #2A3447; color: #F7F9FC; font-weight: 600; font-size: 14px; cursor: pointer; }
.nav-toggle:focus-visible + .sidebar .nav-toggle-label { outline: 2px solid #39B6FF; outline-offset: 2px; }
.nav-toggle-label .icon--shut { display: none; }
.sidebar-panel { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 4px 10px 14px; overflow-y: auto; }
.sidebar-label { margin: 8px 8px 6px; font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--rail-quiet); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 12px; border-radius: 7px; color: var(--rail-text); font: 500 14px/1.2 var(--sans); text-decoration: none; }
.nav-item .icon { color: var(--rail-icon); }
.nav-item:hover { background: #121A2A; color: #FFFFFF; }
.nav-item.is-active { background: var(--rail-on-bg); color: var(--rail-on-text); }
.nav-item.is-active .icon { color: var(--rail-on-icon); }
.nav-item:focus-visible, .sidebar a:focus-visible, .sidebar button:focus-visible { outline-color: #39B6FF; }
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px 8px 8px; border-top: 1px solid var(--rail-line); }
.sidebar-user-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-name { color: #F7F9FC; font-weight: 600; font-size: 13.5px; text-decoration: none; overflow-wrap: anywhere; }
.sidebar-user-name:hover { text-decoration: underline; }
.sidebar-user-role { color: var(--rail-quiet); font-size: 12.5px; }
.sidebar .btn--ghost { color: #F7F9FC; border-color: #2A3447; }
.sidebar .btn--ghost:hover { background: #121A2A; }
.sidebar-signout { padding: 0 8px; }
.avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: #0B4FD9; color: #FFFFFF; font: 600 12.5px/1 var(--sans); }
.theme-switch { padding: 8px 8px 0; }
.theme-switch fieldset { display: flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid #2A3447; border-radius: 9px; min-width: 0; }
.theme-switch legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.theme-option { flex: 1; min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--rail-text); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.theme-option[aria-pressed="true"] { background: var(--rail-on-bg); color: #FFFFFF; box-shadow: inset 0 0 0 1px #39B6FF; }
.content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 0 32px; border-bottom: 1px solid var(--card-line); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--text-3); }
.breadcrumbs [aria-current] { color: var(--text-1); font-weight: 600; }
.topbar-actions { display: flex; gap: 8px; }
.main { flex: 1; width: 100%; max-width: 1180px; padding: 28px 32px 48px; outline: none; display: flex; flex-direction: column; gap: 20px; }

/* ---------- page parts ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-title { font: 650 26px/1.15 var(--sans); letter-spacing: -.018em; }
.page-heading { min-width: 0; }
.page-sub { margin-top: 6px; color: var(--text-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--card-line); border-radius: 12px; background: var(--card-bg); overflow: hidden; }
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-title { font: 600 16px/1.3 var(--sans); }
.card-sub { margin-top: 2px; font-size: 13.5px; color: var(--text-2); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 20px; }
.card-body--flush { padding: 8px 0 0; }
.tile-text { color: var(--text-2); }
.copy-box code { display: block; padding: 10px 12px; overflow-wrap: anywhere; }
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 20px; }
.meta-item { min-width: 0; }
.meta-item--wide { grid-column: 1 / -1; }
.meta dt { font: 700 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.meta dd { margin-top: 4px; overflow-wrap: anywhere; }
.person { display: inline-flex; align-items: center; gap: 10px; }

/* banners: the kit's icon, the words, a tone; never the colour alone */
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--card-line); border-left-width: 4px; background: var(--card-bg); }
.banner p { flex: 1; }
.banner .icon { margin-top: 2px; }
.banner .inline-form { margin-left: auto; }
.banner--info { border-color: var(--info); background: var(--info-bg); }
.banner--info .icon { color: var(--info); }
.banner--ok { border-color: var(--ok); background: var(--ok-bg); }
.banner--ok .icon { color: var(--ok); }
.banner--warn { border-color: var(--warn); background: var(--warn-bg); }
.banner--warn .icon { color: var(--warn); }
.banner--danger { border-color: var(--danger); background: var(--danger-bg); }
.banner--danger .icon { color: var(--danger); }

.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--pill-line); background: var(--pill-bg); color: var(--pill-text); font: 600 12.5px/1 var(--sans); white-space: nowrap; }
.pill--neutral { border-color: var(--card-line); background: var(--neutral-bg); color: var(--neutral-text); }
.pill--ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.pill--warn { border-color: var(--warn); background: var(--warn-bg); color: var(--warn); }
.pill--danger { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.pill--brand { border-color: #0A84FF; background: #0B4FD9; color: #FFFFFF; }

/* tables: rows that stack into cards on a phone (each cell carries data-label) */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 14px; text-align: left; font: 700 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--card-line); }
.table td { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--card-line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.th-sort { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.th-sort::after { content: "↕"; opacity: .55; }
th[aria-sort="ascending"] .th-sort::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .th-sort::after { content: "↓"; opacity: 1; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px 20px; border: 1px dashed var(--card-line); border-radius: 12px; color: var(--text-2); }
.empty h2 { font: 600 15px/1.3 var(--sans); color: var(--text-1); }
.card .empty { margin: 0 20px 20px; }

/* the plain message page */
.state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--card-bg); }
.state-icon { width: 28px; height: 28px; }
.state--danger .state-icon { color: var(--danger); }
.state--warn .state-icon { color: var(--warn); }
.state--info .state-icon { color: var(--info); }
.state-title { font: 650 24px/1.2 var(--sans); }
.state-text { color: var(--text-2); max-width: 60ch; }
.state-action { display: flex; flex-wrap: wrap; gap: 10px; }

/* filters and pages of rows */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: 12px; background: var(--card-bg); }
.filters-actions { display: flex; gap: 8px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pagination-status { color: var(--text-2); font-size: 13.5px; }
.pagination-list { display: flex; align-items: center; gap: 8px; }
.pagination-page { font-size: 13.5px; color: var(--text-2); }

/* toasts, the confirm dialog, the offline notice */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 220px; max-width: min(420px, calc(100vw - 32px)); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--card-line); border-left: 4px solid var(--ok); background: var(--card-bg); box-shadow: var(--shadow); }
.toast--ok { border-left-color: var(--ok); }
.toast.is-leaving { opacity: 0; transition: opacity .15s ease; }
.toast-text { flex: 1; font-weight: 600; }
.toast-close { min-width: 32px; min-height: 32px; border: 0; border-radius: 6px; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; }
.dialog { width: min(460px, calc(100vw - 32px)); padding: 22px 24px 18px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--card-bg); color: var(--text-1); box-shadow: var(--shadow); }
.dialog::backdrop { background: var(--veil); }
.dialog-title { font: 650 18px/1.25 var(--sans); }
.dialog-body { margin: 10px 0 18px; color: var(--text-2); }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.offline { position: fixed; left: 50%; bottom: 16px; z-index: 45; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; border: 1px solid var(--warn); background: var(--card-bg); color: var(--text-1); box-shadow: var(--shadow); font-weight: 600; }

/* ---------- narrower screens: the band becomes a top bar with a Menu ---------- */
@media (max-width: 1023px) {
  .shell { flex-direction: column; }
  .sidebar { position: sticky; z-index: 20; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--rail-line); }
  .sidebar-head { padding: 10px 16px; }
  .sidebar-head .logo { width: 150px; }
  .nav-toggle-label { display: inline-flex; }
  .sidebar-panel { display: none; max-height: calc(100vh - 62px); padding-bottom: 16px; }
  .nav-toggle:checked + .sidebar .sidebar-panel { display: flex; }
  .nav-toggle:checked + .sidebar .icon--open { display: none; }
  .nav-toggle:checked + .sidebar .icon--shut { display: inline-block; }
  .topbar { padding: 0 20px; }
  .main { padding: 22px 20px 40px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .page-title, .auth-title { font-size: 22px; }
  .main { padding: 18px 14px 36px; }
  .topbar { padding: 0 14px; }
  .auth { padding: 22px 18px 18px; }
  .public-wrap { padding-top: 24px; }
  .card-header { padding: 14px 16px 0; }
  .card-body { padding: 14px 16px 16px; }
  .card-body--flush { padding-top: 4px; }
  /* tables stack: each row a block, each cell its column's label then its value */
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 10px 16px; border-bottom: 1px solid var(--card-line); }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { display: grid; grid-template-columns: minmax(84px, 34%) 1fr; gap: 10px; padding: 5px 0; border: 0; text-align: left; }
  .table td.num { text-align: left; }
  .table td::before { content: attr(data-label); font: 700 10.5px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
  .table td:not([data-label])::before, .table td[data-label=""]::before { content: none; }
  .filters { flex-direction: column; align-items: stretch; }
  .toasts { left: 16px; }
  .banner { flex-wrap: wrap; }
}

/* ---------- reduced motion: nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}

/* ======================================================================================================================
   unit X5: the back office (leads, customers, projects, work, support). The same tokens, shapes and type as above.
   ====================================================================================================================== */
.icon--star { -webkit-mask-image: url(icons/star.svg); mask-image: url(icons/star.svg); }
.icon--globe { -webkit-mask-image: url(icons/globe.svg); mask-image: url(icons/globe.svg); }
.icon--folder { -webkit-mask-image: url(icons/folder.svg); mask-image: url(icons/folder.svg); }
.icon--code { -webkit-mask-image: url(icons/code.svg); mask-image: url(icons/code.svg); }
.icon--chat { -webkit-mask-image: url(icons/chat.svg); mask-image: url(icons/chat.svg); }

/* the search at the right of the top bar */
.top-search { display: flex; align-items: center; gap: 8px; }
.input--search { width: min(240px, 38vw); min-height: 34px; padding: 4px 10px; }

/* a record's page: the record on the left, its state and links on the right */
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.split-main, .split-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.form--tight { gap: 12px; }
.block-title { font: 600 14px/1.3 var(--sans); }
.stack-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.state-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.state-form .field { flex: 1 1 160px; }
.check-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; }
.check { width: 20px; height: 20px; margin: 0; accent-color: var(--primary-bg); }
.check-field label { font-weight: 600; font-size: 14px; }
.check-field .help { grid-column: 2; }
.fold { padding-top: 10px; border-top: 1px solid var(--card-line); }
.fold > summary { min-height: 32px; padding: 4px 0; color: var(--link); font-weight: 600; font-size: 14px; cursor: pointer; }
.fold[open] > summary { margin-bottom: 10px; }
.fold > form + form { margin-top: 12px; }

/* short lists of records (home panels, a customer's projects and requests, search hits) */
.item-list { display: flex; flex-direction: column; }
.item { padding: 10px 0; border-bottom: 1px solid var(--card-line); }
.item:first-child { padding-top: 0; }
.item:last-child { padding-bottom: 0; border-bottom: 0; }
.item-title { font-weight: 600; overflow-wrap: anywhere; }
.item-meta { margin-top: 3px; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.item-state { font-size: 12.5px; color: var(--text-3); }
.age { font-weight: 600; white-space: nowrap; }
.home-grid, .search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.result-count { color: var(--text-2); }

/* lists sorted by the server: each heading a link, its direction shown by an arrow and said by aria-sort */
.th-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.th-link::after { content: "↕"; opacity: .55; }
th[aria-sort="ascending"] .th-link::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] .th-link::after { content: "↓"; opacity: 1; }
.th-link:hover { color: var(--text-1); text-decoration: underline; }

/* the timeline of a record */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--card-line); }
.timeline-item:first-child { padding-top: 0; }
.timeline-item:last-child { padding-bottom: 0; border-bottom: 0; }
.timeline-text { grid-column: 1; overflow-wrap: anywhere; }
.timeline-meta { grid-column: 1; font-size: 13px; color: var(--text-3); }
.timeline-item .inline-form { grid-column: 2; grid-row: 1 / span 2; align-self: center; }

/* a customer's people, each with their account and its programs */
.people { display: flex; flex-direction: column; gap: 16px; }
.person-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--page-bg); }
.person-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.person-name { font: 600 16px/1.3 var(--sans); }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.programs { display: flex; flex-direction: column; gap: 10px; }
.grant-list { display: flex; flex-direction: column; gap: 8px; }
.grant { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--card-line); border-radius: 8px; background: var(--card-bg); }
.grant-main { min-width: 0; }
.grant-name { font-weight: 600; }
.grant-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.grant .fold { grid-column: 1 / -1; }
.grant-form { padding-top: 6px; }

/* a project's steps, in order */
.steps { display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--page-bg); }
.step:target { box-shadow: 0 0 0 2px var(--focus); }
.step-head { display: flex; align-items: flex-start; gap: 12px; }
.step-number { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--neutral-bg); color: var(--neutral-text); font: 600 13px/1 var(--mono); }
.step-main { flex: 1; min-width: 0; }
.step-title { font-weight: 600; overflow-wrap: anywhere; }
.step-actions { display: flex; gap: 6px; }
.add-step { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--card-line); }

/* the work views: list and board */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--card-line); }
.tab { padding: 8px 14px; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 600; text-decoration: none; }
.tab:hover { color: var(--text-1); }
.tab.is-current { border-bottom-color: var(--focus); color: var(--text-1); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.board-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--card-line); border-radius: 12px; background: var(--card-bg); }
.board-col[data-drop-target] { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); }
.board-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 600 14px/1.3 var(--sans); }
.board-count { min-width: 28px; padding: 2px 8px; border-radius: 10px; background: var(--neutral-bg); color: var(--neutral-text); font: 600 12px/1.4 var(--mono); text-align: center; }
.board-cards { display: flex; flex-direction: column; gap: 8px; }
.board-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--card-line); border-radius: 8px; background: var(--page-bg); }
.board-card[draggable="true"] { cursor: grab; }
.board-card[data-lifted] { outline: 2px dashed var(--focus); outline-offset: 2px; }
.board-card[data-dragging] { opacity: .6; }
.board-card-title { font-weight: 600; overflow-wrap: anywhere; }
.board-card-meta { font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.board-moves { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.board-empty { font-size: 13px; color: var(--text-3); }
.board-more { font-size: 13px; }

/* a support request's conversation: who wrote each message is said in words, the edge colour only repeats it */
.thread { display: flex; flex-direction: column; gap: 12px; }
.message { padding: 12px 14px; border: 1px solid var(--card-line); border-left-width: 4px; border-radius: 8px; background: var(--page-bg); }
.message--customer { border-left-color: var(--info); }
.message--staff { border-left-color: var(--ok); }
.message-head { margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.message-body { overflow-wrap: anywhere; }
.reply { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--card-line); }

@media (max-width: 1023px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .top-search { width: 100%; }
  .input--search { flex: 1; width: auto; }
  .board { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; }
  .grant { grid-template-columns: minmax(0, 1fr); }
  .timeline-item { grid-template-columns: minmax(0, 1fr); }
  .timeline-item .inline-form { grid-column: 1; grid-row: auto; }
  .step-head { flex-wrap: wrap; }
  /* a stacked cell: every line of its value stays in the value column, none falls under its label */
  .table td > * { grid-column: 2; }
}
/* a long unbroken title or name in a list (a pasted link) breaks anywhere instead of widening the table past the window */
.table td a, .table td .cell-sub { overflow-wrap: anywhere; }

/* ======================================================================================================================
   the common base BASE1: the customer shell (src/customer/layout.mjs), the customer's own layout, not the staff one. A top
   band, dark in both looks (the band tokens of the staff sidebar, so test 50 measures its contrast), and the page below on
   the page ground in the person's look (light when no choice was made: web.mjs customerThemeOf; dark, or the system's, when
   chosen). No colour that is not already on the band or a token.
   ====================================================================================================================== */
body.customer { display: flex; flex-direction: column; min-height: 100vh; }
.customer-band { background: var(--rail-bg); color: var(--rail-text); border-bottom: 1px solid var(--rail-line); }
.customer-band-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; width: 100%; max-width: 1180px; margin: 0 auto; padding: 12px 24px; }
.customer-band .brand { display: block; flex: none; }
.customer-band .logo { width: 172px; }
.customer-nav { flex: 1 1 auto; min-width: 0; }
.customer-nav-list { display: flex; flex-wrap: wrap; gap: 4px; }
.customer-nav-item { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 7px; color: var(--rail-text); font: 500 14px/1.2 var(--sans); text-decoration: none; }
.customer-nav-item .icon { color: var(--rail-icon); }
.customer-nav-item:hover { background: #121A2A; color: #FFFFFF; }
.customer-nav-item.is-active { background: var(--rail-on-bg); color: var(--rail-on-text); }
.customer-nav-item.is-active .icon { color: var(--rail-on-icon); }
.customer-me { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.customer-me-name { color: #F7F9FC; font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.customer-signout { margin: 0; }
.customer-band .btn--ghost { color: #F7F9FC; border-color: #2A3447; }
.customer-band .btn--ghost:hover { background: #121A2A; }
.customer-band a:focus-visible, .customer-band button:focus-visible { outline-color: #39B6FF; }
.customer-band .theme-switch { padding: 0; }
/* a word wider than the page (a long name or address in any lane's own text) breaks anywhere instead of pushing the page
   sideways on a phone; overflow-wrap is inherited, so this one rule covers every page drawn in the customer's shell */
.customer-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 24px 48px; outline: none; display: flex; flex-direction: column; gap: 20px; overflow-wrap: anywhere; }
.customer-foot { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px 24px; color: var(--text-3); font-size: 11.5px; letter-spacing: .14em; }
@media (max-width: 640px) {
  .customer-band-inner, .customer-main, .customer-foot { padding-left: 16px; padding-right: 16px; }
  .customer-band .logo { width: 150px; }
  .customer-main { padding-top: 20px; }
}
/* ---------- end of BASE1 ---------- */

/* ---------- lane X3 (sign-up, sign-in, sign-out, forgot; the desktop sign-in): its styles between these two lines ---------- */
/* a program's browser sign-in, drawn in the customer's shell: the sign-in card's own width, centred, as in the public column */
.customer-main .auth--desk { width: 100%; max-width: 560px; margin: 12px auto 0; }
/* ---------- end of lane X3 ---------- */

/* ---------- lane X4 (account, apps, downloads, support): its styles between these two lines ---------- */
/* The customer's pages (src/x4/views.mjs). The same tokens, shapes and type as above: no colour of their own, so both
   looks come from the tokens. The program tiles are the kits' own files (public/brand/<kit>-app-icon.svg). */
.icon--dashboard { -webkit-mask-image: url(icons/dashboard.svg); mask-image: url(icons/dashboard.svg); }
.icon--download { -webkit-mask-image: url(icons/download.svg); mask-image: url(icons/download.svg); }
.program-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.program-card { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--page-bg); color: var(--text-1); text-decoration: none; }
.program-card:hover { border-color: var(--input-line); }
.program-card-text { display: flex; flex-direction: column; min-width: 0; }
.program-name { font-weight: 600; overflow-wrap: anywhere; }
.program-line { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; text-wrap: balance; }
.program-tile { flex: none; width: 48px; height: 48px; border-radius: 11px; }
.program-tile--lg { width: 88px; height: 88px; border-radius: 20px; }
.program-list { display: flex; flex-direction: column; gap: 16px; }
.program-row { display: flex; align-items: flex-start; gap: 16px; }
.program-row-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.program-hero { align-items: center; justify-content: flex-start; gap: 20px; }
.how-to { display: flex; flex-direction: column; gap: 8px; padding-left: 22px; list-style: decimal; }
.how-to li::marker { color: var(--text-3); font-weight: 600; }
.notes { display: flex; flex-direction: column; gap: 4px; padding-left: 22px; list-style: disc; color: var(--text-2); }
.orbit-cta { display: flex; align-items: flex-start; gap: 16px; }
.orbit-cta > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; flex: 1; }
.download { display: flex; align-items: flex-start; gap: 20px; }
.download-text { display: flex; flex-direction: column; gap: 14px; min-width: 0; flex: 1; }
.project-list { display: flex; flex-direction: column; gap: 18px; }
.project + .project { padding-top: 18px; border-top: 1px solid var(--card-line); }
.project-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.session { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.session-text { min-width: 0; }
@media (max-width: 640px) {
  .download, .program-hero { flex-direction: column; align-items: flex-start; }
  .program-tile--lg { width: 64px; height: 64px; border-radius: 15px; }
}
/* The band on a narrow screen (check 1, should-fix 12: at 360 px it took 283 px, five rows, before every page's heading):
   three compact rows. The logo and who is signed in; the pages as one row of equal tabs, each its icon over its name,
   every one in sight and the one you are on marked (any number of items: X6's too); Sign out and the theme switch. The
   keyboard meets the controls in the order the eye does (logo, tabs, Sign out, theme: the markup's own order). Only how
   the band's own parts sit changes, so it holds without script, and every colour is the band's. */
@media (max-width: 640px) {
  .customer-band-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand me" "nav nav" "out look"; align-items: center; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
  .customer-band .brand { grid-area: brand; }
  .customer-band .logo { width: 128px; }
  .customer-me { display: contents; }
  .customer-me-name { grid-area: me; justify-self: end; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; overflow-wrap: normal; text-align: right; }
  .customer-signout { grid-area: out; justify-self: start; }
  .customer-band .theme-switch { grid-area: look; justify-self: end; }
  .customer-band .theme-option { min-height: 30px; padding: 0 8px; }
  .customer-nav { grid-area: nav; min-width: 0; overflow-x: auto; }
  .customer-nav-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min-content, 1fr); gap: 2px; }
  .customer-nav-item { display: flex; width: 100%; flex-direction: column; justify-content: center; gap: 3px; min-height: 52px; padding: 5px 3px; font-size: 11.5px; line-height: 1.15; text-align: center; overflow-wrap: normal; }
}
/* ---------- end of lane X4 ---------- */

/* ---------- lane X6 (booking, staff booking): its styles between these two lines ---------- */
/* The booking pages (unit X6): the public pages under /book in the public column (made wide for a month and its times),
   and the staff pages' own parts. The same tokens, shapes and type as above; every class here is used in
   src/pages-book.mjs or src/pages-staff-booking.mjs. */
.public-main:has(.book) { max-width: 920px; }
.book { display: flex; flex-direction: column; gap: 22px; }
.book-head { display: flex; flex-direction: column; gap: 10px; }
.book-title { font: 650 30px/1.15 var(--sans); letter-spacing: -.018em; }
.book-lede { color: var(--text-2); max-width: 62ch; }
.book-back a { font-size: 14px; }
.book-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; list-style: none; }
.book-kind { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--card-bg); }
.book-kind-name { font: 650 19px/1.25 var(--sans); }
.book-kind-name a { color: var(--text-1); text-decoration: none; }
.book-kind-name a:hover { text-decoration: underline; }
.book-kind-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-2); font-size: 14px; }
.book-kind-meta .icon { color: var(--text-3); }
.book-kind-text { color: var(--text-2); }
.book-how { color: var(--text-2); }
.book-zone { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.book-zone .field { min-width: min(100%, 300px); }
.zone-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.zone-row .select { flex: 1 1 260px; max-width: 360px; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.book-month, .book-times, .book-details, .book-booking, .book-confirm { display: flex; flex-direction: column; gap: 14px; padding: 20px; border: 1px solid var(--card-line); border-radius: 14px; background: var(--card-bg); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-title, .book-day { font: 600 17px/1.3 var(--sans); }
.cal-step { font-size: 14px; }
.cal-step.is-off { color: var(--text-3); }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: 6px 0; font: 700 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); text-align: center; }
.cal th abbr { text-decoration: none; }
.cal td { padding: 3px; text-align: center; }
.cal-day { display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 8px; font-variant-numeric: tabular-nums; }
a.cal-day { border: 1px solid var(--btn-line); background: var(--btn-bg); color: var(--text-1); font-weight: 600; text-decoration: none; }
a.cal-day:hover { background: var(--btn-hover); }
a.cal-day.is-chosen { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--primary-text); }
.cal-day--none { color: var(--text-3); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; list-style: none; }
.slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 6px 10px; border: 1px solid var(--btn-line); border-radius: 8px; background: var(--btn-bg); color: var(--text-1); text-decoration: none; }
.slot:hover { background: var(--btn-hover); border-color: var(--link); }
.slot-time { font: 600 15px/1.2 var(--sans); }
.slot-ours { font-size: 12.5px; color: var(--text-2); }
.book-chosen { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid var(--pill-line); border-radius: 10px; background: var(--pill-bg); }
.book-chosen .icon { margin-top: 2px; color: var(--link); }
.book-chosen-main { font-weight: 600; }
.book-chosen-ours, .book-zone-name { color: var(--text-2); }
.book-chosen-ours { font-size: 14px; }
.book-form { max-width: 520px; }
.book-done { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; }
/* staff: the hours of the settings form, the kinds list, the list's tabs */
.hours { display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.hours legend { margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.hours-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.hours-row .check-field { min-width: 130px; }
.hours-row .error { flex-basis: 100%; }
.hours-times { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.hours-to { color: var(--text-2); }
.input--time { width: 132px; }
.kinds { display: flex; flex-direction: column; list-style: none; }
.kind-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--card-line); }
.kind-row:last-child { border-bottom: 0; }
.kind-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kind-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.kind-move { display: flex; gap: 6px; }
.tabs ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tab { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--card-line); border-radius: 18px; color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none; }
.tab:hover { color: var(--text-1); border-color: var(--btn-line); }
.tab.is-active { border-color: var(--primary-bg); background: var(--primary-bg); color: var(--primary-text); }
.icon--calendar { -webkit-mask-image: url(icons/calendar.svg); mask-image: url(icons/calendar.svg); }
.icon--clock { -webkit-mask-image: url(icons/clock.svg); mask-image: url(icons/clock.svg); }
.icon--download { -webkit-mask-image: url(icons/download.svg); mask-image: url(icons/download.svg); }
@media (max-width: 760px) {
  .book-grid { grid-template-columns: minmax(0, 1fr); }
  .book-title { font-size: 26px; }
}
/* ---------- end of lane X6 ---------- */

/* ---------- lane X7 (staff releases): its styles between these two lines ---------- */
/* The Releases page (versions by channel, Send to stable): the same tokens, shapes and type as above. */
.icon--lcl-deploy { -webkit-mask-image: url(icons/lcl-deploy.svg); mask-image: url(icons/lcl-deploy.svg); }
.release-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; }
.release-table tbody th { padding: 12px 14px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--card-line); font: 600 15px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-1); }
.release-table tbody tr:last-child th { border-bottom: 0; }
.release-program { font-weight: 700; }
.release-version { font-size: 15px; font-weight: 700; color: var(--text-1); }
.release-note { margin-top: 4px; max-width: 34ch; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.release-notes { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.release-notes li { overflow-wrap: anywhere; }
.release-table .fold { margin-top: 6px; padding-top: 2px; border-top: 0; }
.release-cell { min-width: 0; }
.release-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.release-form { max-width: 640px; }
@media (max-width: 640px) {
  .release-table tbody th { display: block; padding: 0 0 6px; border: 0; }
  .release-note { max-width: none; }
}
/* ---------- end of lane X7 ---------- */

/* ---------- lane X8 (staff proposals, the proposal door /p/): its styles between these two lines ---------- */
.icon--document { -webkit-mask-image: url(icons/document.svg); mask-image: url(icons/document.svg); }

/* a proposal's sections and their lines, as staff write them */
.psections { display: flex; flex-direction: column; gap: 14px; }
.psection { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--page-bg); }
.psection:target, .pline:target { box-shadow: 0 0 0 2px var(--focus); }
.psection-head { display: flex; align-items: flex-start; gap: 12px; }
.psection-main { flex: 1; min-width: 0; }
.psection-title { font: 600 16px/1.3 var(--sans); overflow-wrap: anywhere; }
.psection-body { margin-top: 4px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.plines { display: flex; flex-direction: column; gap: 8px; }
.pline { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--card-line); border-radius: 8px; background: var(--card-bg); }
.pline-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: 6px 14px; }
.pline-main { min-width: 0; }
.pline-what { display: block; font-weight: 600; overflow-wrap: anywhere; }
.pline-qty { display: block; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.pline-amount { font: 600 14px/1.4 var(--mono); text-align: right; white-space: nowrap; }
.pline-actions { display: flex; gap: 6px; }
.psection-total { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 10px; font-size: 14px; color: var(--text-2); }
.psection-total strong { font: 600 15px/1.4 var(--mono); color: var(--text-1); }
.add-line { padding-top: 12px; border-top: 1px solid var(--card-line); }
.line-grid { grid-template-columns: minmax(min(100%, 260px), 2fr) repeat(2, minmax(min(100%, 140px), 1fr)); }

/* the owner's amounts: one box per line, typed by him, and the sum of what he typed */
.amounts td, .amounts th { vertical-align: middle; }
.amounts-section th { padding-top: 16px; font: 600 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text-1); }
.input--amount { width: 150px; max-width: 100%; text-align: right; font-family: var(--mono); }
.amounts-total { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 12px; margin-top: 14px; }
.amounts-total strong { font: 700 18px/1.3 var(--mono); }
.problems { margin: 6px 0 10px; padding-left: 20px; list-style: disc; }
.answer-note { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--card-line); color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* the proposal as the customer reads it (the same in the owner's preview) */
.public-main:has(.proposal-page) { max-width: 880px; }
.proposal-page { display: flex; flex-direction: column; gap: 20px; }
.proposal-doc { display: flex; flex-direction: column; gap: 22px; }
.proposal-head { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--card-line); }
.proposal-eyebrow { font: 700 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.proposal-title { font: 700 28px/1.2 var(--sans); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.proposal-meta { color: var(--text-2); overflow-wrap: anywhere; }
.proposal-intro, .proposal-terms { display: flex; flex-direction: column; gap: 10px; }
.proposal-text { max-width: 72ch; overflow-wrap: anywhere; }
.proposal-sections { display: flex; flex-direction: column; gap: 26px; }
.proposal-section { display: flex; flex-direction: column; gap: 10px; }
.proposal-section-title { font: 600 19px/1.3 var(--sans); overflow-wrap: anywhere; }
/* a section's lines: the same columns in every section (fixed widths); on a phone the quantity moves under the item */
.proposal-lines { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14.5px; }
.proposal-lines th { padding: 10px 14px; text-align: left; font: 700 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--card-line); }
.proposal-lines td { padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--card-line); overflow-wrap: anywhere; }
.proposal-lines .num { text-align: right; white-space: nowrap; font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* a quantity with a long unit ("1,200 hours of senior design time") wraps inside its own column, never over the amount */
.proposal-lines td.proposal-col-qty { white-space: normal; overflow-wrap: anywhere; }
.proposal-col-item { width: auto; }
.proposal-col-qty { width: 22%; }
/* never narrower than the largest amount a line can carry ("$99,999,999.99" on one line) */
.proposal-col-amount { width: max(20%, 160px); }
.proposal-qty-sub { display: none; margin-top: 2px; font-size: 13px; color: var(--text-2); }
.proposal-lines tfoot th, .proposal-lines tfoot td { border-bottom: 0; color: var(--text-1); }
.proposal-lines tfoot td { font-weight: 700; }
.proposal-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; padding: 16px 18px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--card-bg); }
.proposal-total-label { font: 600 16px/1.3 var(--sans); }
.proposal-total-amount { font: 700 24px/1.2 var(--mono); }
.proposal-currency { margin-top: -12px; }
.state-note { display: flex; flex-direction: column; gap: 10px; }

/* the customer's answer: accept with a name and a tick, or decline with a name and a note */
.proposal-answer .card-body { display: flex; flex-direction: column; gap: 16px; }
.answer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.answer-form { padding: 16px; border: 1px solid var(--card-line); border-radius: 10px; background: var(--page-bg); }
/* the tick's refusal in a row of its own, under its sentence, so the sentence keeps its place beside the box */
.answer-form .check-field .error { grid-column: 2; }

@media (max-width: 640px) {
  .pline-head { grid-template-columns: minmax(0, 1fr) auto; }
  .pline-actions { grid-column: 1 / -1; }
  .psection-head { flex-wrap: wrap; }
  .line-grid { grid-template-columns: minmax(0, 1fr); }
  .proposal-col-qty { display: none; }
  .proposal-col-amount { width: max(40%, 142px); }
  .proposal-qty-sub { display: block; }
  .proposal-lines th, .proposal-lines td { padding: 10px 8px; }
  .proposal-title { font-size: 23px; }
  .proposal-total-amount { font-size: 20px; }
  .input--amount { width: 100%; }
}

/* printed or saved as a PDF: the proposal alone, dark text on white paper, whatever the screen's theme */
@media print {
  :root, :root[data-theme] { color-scheme: light; --page-bg: #FFFFFF; --public-bg: #FFFFFF; --card-bg: #FFFFFF; --card-line: #D9DEE7; --text-1: #0B0F19; --text-2: #4A5466; --text-3: #5F697B; --link: #0B4FD9; }
  .public-head, .public-foot, .proposal-answer, .skip-link, .toasts { display: none; }
  .public-wrap { padding: 0; }
  .public-main:has(.proposal-page) { max-width: none; }
  .proposal-section, .proposal-total, .proposal-lines tr { break-inside: avoid; }
}
/* ---------- end of lane X8 ---------- */

/* ---------- unit RETURNS: a customer's report as the back office reads it (src/billing/return-office.mjs) ---------- */
.report-answer { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 72ch; }
/* the pay page's line of links (Terms, Refunds, Privacy: src/billing/pages.mjs), shown once their addresses are set */
.billing-legal { margin: 12px 0 16px; }
.billing-legal a { color: inherit; text-decoration: underline; }
/* ---------- end of unit RETURNS ---------- */

/* ---------- unit LEGALPAGES: the Terms and the Privacy notice (src/billing/legal-pages.mjs), the footers' line of links,
   the sign-up's yes-line ---------- */
.public-main:has(.legal-page) { max-width: 760px; }
.legal-page .card-body { gap: 0; padding: 6px 28px 26px; }
.legal-section { padding-top: 18px; }
.legal-section p, .legal-list, .legal-quote { line-height: 1.6; }
.legal-section p { margin: 0 0 12px; }
.legal-h2 { margin: 6px 0 10px; font: 600 18px/1.35 var(--sans); color: var(--text-1); }
.legal-h3 { margin: 16px 0 8px; font: 600 15px/1.4 var(--sans); color: var(--text-1); }
.legal-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding-left: 22px; list-style: disc; }
.legal-quote { margin: 2px 0 14px; padding: 2px 0 2px 16px; border-left: 3px solid var(--card-line); color: var(--text-2); }
.legal-quote p:last-child { margin-bottom: 0; }
.legal-section .table-wrap { margin: 2px 0 14px; }
.legal-page a { overflow-wrap: anywhere; }
.legal-links { margin: 10px 0 0; font: 400 13px/1.5 var(--sans); letter-spacing: normal; }
.legal-links a { color: inherit; text-decoration: underline; }
.signup-agree a { color: inherit; }
@media (max-width: 640px) {
  .legal-page .card-body { padding: 4px 16px 18px; }
  .legal-h2 { font-size: 17px; }
}
/* ---------- end of unit LEGALPAGES ---------- */

/* ======================================================================================================================
   unit KITPUBLIC: the signed-out pages (src/html.mjs layout for someone signed out) in the kit's own look. The owner, 1:30 AM
   EST Nov 28 2026, of the pay page: "looks like shit dont you have graphic kits? make it white background". The kit:
   LCL_Customer_Portal (brand/websites-2026-11-24) site/assets/css/auth.css and base.css: their sizes, radii, shadows, spacing
   and colours, the colours as the tokens below. Everything here is under body.public: the staff shell (body.app) and the
   customer's (body.customer) are untouched. Two frames: the split one (.public-wrap--split: the brand panel, dark in both
   looks, beside the main side on --public-bg; at 1100 px the panel narrows, at 860 px it is a band with the logo over the
   page) and the page one (body.public--page: the logo over a readable column: Terms, Privacy, Returns, booking, a
   proposal). The kit's light look is the default here (a visitor's page is light unless dark was chosen: web.mjs
   customerThemeOf) and paper's too: the dark tokens apply on screens only.
   Contrast: the kit's own values are kept where they are below the office's bar (test 50 reads the :root blocks only):
   white on the bright blue button 3.65:1, the hairline input edge 1.35:1 (1.29:1 in dark), the quiet grey #8790A2 3.21:1
   on white (#6E788C 4.19:1 in dark). The seat decides whether to darken them.
   ====================================================================================================================== */
body.public {
  /* the office's tokens, the kit's light values (base.css :root) */
  --page-bg: var(--public-bg);
  --text-1: #0B0F19;
  --text-2: #5B6475;
  --text-3: #8790A2;
  --link: #0B4FD9;
  --link-line: rgba(11, 79, 217, .35);
  --card-bg: var(--public-bg);
  --card-line: #D9DEE7;
  --raise-bg: #EEF2F7;
  --input-bg: var(--public-bg);
  --input-line: #D9DEE7;
  --input-text: #0B0F19;
  --btn-bg: var(--public-bg);
  --btn-line: #D9DEE7;
  --btn-text: #0B0F19;
  --btn-hover: #F7F9FC;
  --primary-bg: #0A84FF;
  --primary-hover: #0B4FD9;
  --primary-text: #FFFFFF;
  --focus: #0A84FF;
  --pill-bg: rgba(10, 132, 255, .10);
  --pill-text: #0B4FD9;
  --pill-line: rgba(10, 132, 255, .35);
  --neutral-bg: #EEF1F5;
  --neutral-text: #5B6475;
  --ok: #0E8F55;
  --ok-bg: rgba(18, 183, 106, .12);
  --warn: #A86500;
  --warn-bg: rgba(245, 165, 36, .16);
  --danger: #D12F3A;
  --danger-bg: rgba(229, 72, 77, .10);
  --info: #0B4FD9;
  --info-bg: rgba(10, 132, 255, .10);
  --shadow: 0 1px 2px rgba(11, 15, 25, .04), 0 6px 18px -6px rgba(11, 15, 25, .10);
  --code-bg: #EEF2F7;
  /* the kit's own, with no office token of the same meaning */
  --kit-line-soft: #E6EAF0;
  --kit-calm: #F7F9FC;
  --kit-hover-line: #8790A2;
  --kit-check-line: #8790A2;
  --kit-shadow-sm: 0 1px 2px rgba(11, 15, 25, .05);
  --kit-ring: 0 0 0 3px rgba(10, 132, 255, .28);
  --kit-danger-ring: 0 0 0 3px rgba(229, 72, 77, .10);
  --kit-btn-edge: rgba(0, 0, 0, .12);
  --kit-info-line: rgba(10, 132, 255, .35);
  --kit-ok-line: rgba(18, 183, 106, .4);
  --kit-warn-line: rgba(245, 165, 36, .45);
  --kit-danger-line: rgba(229, 72, 77, .4);
  /* the brand panel: dark in both looks (auth.css .brand-panel, its art and its tiles) */
  --panel-bg: #05070D;
  --panel-text: #FFFFFF;
  --panel-copy: #A0A9BB;
  --panel-quiet: #7F8AA0;
  --panel-sky: #39B6FF;
  --panel-deep: #0B4FD9;
  --panel-tile-bg: rgba(11, 15, 25, .72);
  --panel-tile-line: #1A2131;
  --panel-tile-sub: #8790A2;
  --panel-chev-from: #0D1A36;
  --panel-chev-to: #0E1C3C;
  --panel-band: #0B0F19;
  font-size: 14px;
}
/* the kit's dark look (base.css [data-theme="dark"]), chosen or the system's, on screens only (paper stays light) */
@media screen {
  :root[data-theme="dark"] body.public {
    --text-1: #EEF2F8; --text-2: #A0A9BB; --text-3: #6E788C; --link: #39B6FF; --link-line: rgba(57, 182, 255, .45);
    --card-line: #222A3B; --raise-bg: #141A29; --input-line: #222A3B; --input-text: #EEF2F8; --btn-line: #222A3B; --btn-text: #EEF2F8;
    --btn-hover: #141A29; --primary-bg: #0A84FF; --primary-hover: #2A95FF; --focus: #39B6FF;
    --pill-bg: rgba(57, 182, 255, .12); --pill-text: #39B6FF; --pill-line: rgba(57, 182, 255, .4); --neutral-bg: #161C2A; --neutral-text: #A0A9BB;
    --ok: #3DD68C; --ok-bg: rgba(18, 183, 106, .16); --warn: #F5B544; --warn-bg: rgba(245, 165, 36, .14); --danger: #FF6B72; --danger-bg: rgba(229, 72, 77, .16);
    --info: #39B6FF; --info-bg: rgba(57, 182, 255, .12); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -8px rgba(0, 0, 0, .6); --code-bg: #141A29;
    --kit-line-soft: #1A2131; --kit-calm: #141A29; --kit-hover-line: #6E788C; --kit-check-line: #6E788C; --kit-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --kit-ring: 0 0 0 3px rgba(57, 182, 255, .35); --kit-danger-ring: 0 0 0 3px rgba(229, 72, 77, .16); --kit-info-line: rgba(57, 182, 255, .4);
  }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) body.public {
    --text-1: #EEF2F8; --text-2: #A0A9BB; --text-3: #6E788C; --link: #39B6FF; --link-line: rgba(57, 182, 255, .45);
    --card-line: #222A3B; --raise-bg: #141A29; --input-line: #222A3B; --input-text: #EEF2F8; --btn-line: #222A3B; --btn-text: #EEF2F8;
    --btn-hover: #141A29; --primary-bg: #0A84FF; --primary-hover: #2A95FF; --focus: #39B6FF;
    --pill-bg: rgba(57, 182, 255, .12); --pill-text: #39B6FF; --pill-line: rgba(57, 182, 255, .4); --neutral-bg: #161C2A; --neutral-text: #A0A9BB;
    --ok: #3DD68C; --ok-bg: rgba(18, 183, 106, .16); --warn: #F5B544; --warn-bg: rgba(245, 165, 36, .14); --danger: #FF6B72; --danger-bg: rgba(229, 72, 77, .16);
    --info: #39B6FF; --info-bg: rgba(57, 182, 255, .12); --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -8px rgba(0, 0, 0, .6); --code-bg: #141A29;
    --kit-line-soft: #1A2131; --kit-calm: #141A29; --kit-hover-line: #6E788C; --kit-check-line: #6E788C; --kit-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --kit-ring: 0 0 0 3px rgba(57, 182, 255, .35); --kit-danger-ring: 0 0 0 3px rgba(229, 72, 77, .16); --kit-info-line: rgba(57, 182, 255, .4);
  }
}

/* ---------- the split frame: the brand panel beside the main side (auth.css .auth, .brand-panel, .auth-main) ---------- */
body.public .public-wrap--split { display: grid; grid-template-columns: minmax(440px, 44%) 1fr; align-items: start; min-height: 100vh; min-height: 100dvh; padding: 0; }
.public-panel { position: sticky; top: 0; z-index: 0; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; height: 100vh; height: 100dvh; padding: 44px 56px 40px; background: var(--panel-bg); color: var(--panel-text); }
.public-art { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; }
.public-art-ground { fill: var(--panel-bg); }
.public-art-edge-from { stop-color: var(--panel-deep); }
.public-art-edge-to { stop-color: var(--panel-sky); }
.public-art-chev-from { stop-color: var(--panel-chev-from); stop-opacity: .35; }
.public-art-chev-to { stop-color: var(--panel-chev-to); }
.public-art-chev-foot { fill: var(--panel-chev-to); }
.public-art-band { fill: var(--panel-band); fill-opacity: .86; }
.public-panel-logo .logo { width: auto; height: 38px; }
.public-panel-copy { max-width: 440px; }
/* the eyebrow at the size the kit's pictures show it (signup-form-1440.png: 15 px; its base.css says 11 px) */
.public-eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 500 15px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--panel-sky); }
.public-eyebrow::before { content: ""; width: 24px; height: 2px; background: linear-gradient(90deg, var(--panel-deep), var(--panel-sky)); }
.public-panel-title { font: 600 40px/1.1 var(--sans); letter-spacing: -.025em; color: var(--panel-text); }
.public-panel-title span { color: var(--panel-quiet); }
.public-panel-text { max-width: 380px; margin-top: 16px; font-size: 15.5px; line-height: 1.6; color: var(--panel-copy); }
.public-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 440px; margin-top: 32px; }
.public-apps li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--panel-tile-line); border-radius: 10px; background: var(--panel-tile-bg); }
.public-apps img { flex: none; display: block; width: 34px; height: 34px; }
.public-apps b { display: block; font-weight: 600; font-size: 14px; color: var(--panel-text); }
.public-apps span { display: block; font-size: 12px; line-height: 1.35; color: var(--panel-tile-sub); }
.public-panel-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 16px; }
.public-eyebrow--foot { margin: 0; font-size: 10.5px; letter-spacing: .24em; white-space: nowrap; color: var(--panel-copy); }
.public-eyebrow--foot::before { content: none; }
.public-panel-foot a { font: 600 13px/1.4 var(--sans); letter-spacing: .08em; color: var(--panel-sky); text-decoration: none; }
.public-panel-foot a:hover { text-decoration: underline; }
.public-panel a:focus-visible { outline-color: var(--panel-sky); }
.public-side { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; min-height: 100dvh; background: var(--public-bg); }
body.public .public-wrap--split .public-main { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 456px; margin: auto; padding: 72px 28px 48px; }
body.public .public-wrap--split .public-main:has(.auth--wide) { max-width: 696px; }
/* the pay page: its plan and its account's fields a little wider, for its long sentences */
body.public .public-wrap--split .public-main:has(#pay-plan) { max-width: 496px; }
body.public .public-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin: 0; padding: 18px 28px; border-top: 1px solid var(--kit-line-soft); color: var(--text-3); font-size: 12.5px; letter-spacing: normal; }
body.public .public-foot .mono { font-size: 11.5px; letter-spacing: .14em; }
body.public .public-foot .legal-links { margin: 0; font-size: 12.5px; }
body.public .public-foot .legal-links a { color: var(--text-2); }

/* ---------- the page frame: the logo over a readable column (the kit's header lockup, type, hairlines, link colour) ---------- */
body.public--page .public-wrap { display: flex; flex-direction: column; align-items: stretch; min-height: 100vh; padding: 0; }
body.public--page .public-head { display: flex; align-items: center; min-height: 64px; margin: 0; padding: 14px 28px; border-bottom: 1px solid var(--kit-line-soft); }
body.public--page .public-head .logo { width: auto; height: 26px; }
body.public--page .public-main { width: 100%; max-width: 816px; margin: 0 auto; padding: 40px 28px 56px; font-size: 15px; }
body.public--page .public-main:has(.book) { max-width: 976px; }
body.public--page .public-main:has(.proposal-page) { max-width: 936px; }
body.public--page .public-foot { margin-top: auto; }
/* a long text (Terms, Privacy, Returns): the column itself, its sections between hairlines */
body.public--page .legal-page .card, body.public--page .public-main > .card { border: 0; border-radius: 0; background: none; box-shadow: none; }
body.public--page .legal-page .card-body, body.public--page .public-main > .card > .card-body { padding: 8px 0 0; }
body.public--page .legal-section + .legal-section { margin-top: 10px; border-top: 1px solid var(--kit-line-soft); }
body.public--page .legal-page { display: flex; flex-direction: column; gap: 8px; }
body.public--page .public-main > .page-header { margin-bottom: 8px; }

/* ---------- the main side's pieces in the kit's look (base.css: type, fields, buttons, alerts; app.css .card) ---------- */
body.public .page-title, body.public .auth-title, body.public .state-title { font: 600 26px/1.2 var(--sans); letter-spacing: -.02em; }
body.public .page-sub, body.public .auth-sub { font-size: 14.5px; color: var(--text-2); }
body.public .page-header + .auth-note, body.public .auth-title + .auth-sub { margin-top: -12px; }
body.public .auth, body.public .auth--wide { gap: 20px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
body.public .auth-note { font-size: 13.5px; color: var(--text-2); }
body.public .auth-form + .auth-note { padding-top: 20px; border-top: 1px solid var(--kit-line-soft); }
body.public .auth-or { color: var(--text-3); font: 500 11px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
body.public .auth-or::before, body.public .auth-or::after { background: var(--kit-line-soft); }
body.public .field { gap: 6px; }
body.public .field label, body.public .hours legend { font-weight: 500; font-size: 13.5px; color: var(--text-1); }
body.public .input, body.public .select, body.public .textarea { min-height: 40px; padding: 8px 12px; border-radius: 6px; border-color: var(--input-line); transition: border-color .15s ease, box-shadow .15s ease; }
body.public .input:hover, body.public .select:hover, body.public .textarea:hover { border-color: var(--kit-hover-line); }
body.public .input:focus, body.public .select:focus, body.public .textarea:focus { outline: none; border-color: var(--primary-bg); box-shadow: var(--kit-ring); }
body.public .input[aria-invalid="true"], body.public .field--error .input { border-color: var(--danger); box-shadow: none; }
body.public .input[aria-invalid="true"]:focus, body.public .field--error .input:focus { box-shadow: var(--kit-danger-ring); }
body.public .input--code { font-size: 20px; }
body.public .help { font-size: 12.5px; color: var(--text-2); }
body.public .error { font-size: 12.5px; font-weight: 500; color: var(--danger); }
body.public .check-field { align-items: start; gap: 4px 10px; }
body.public .check-field label { font-weight: 400; font-size: 13.5px; }
body.public .check { appearance: none; -webkit-appearance: none; display: grid; place-items: center; width: 16px; height: 16px; margin: 2px 0 0; border: 1px solid var(--kit-check-line); border-radius: 4px; background: var(--input-bg); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
body.public .check:checked { border-color: var(--primary-bg); background: var(--primary-bg); }
body.public .check:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--primary-text); border-bottom: 2px solid var(--primary-text); transform: translateY(-1px) rotate(-45deg); }
body.public .check:focus-visible { outline: none; box-shadow: var(--kit-ring); }
body.public .check[aria-invalid="true"], body.public .field--error .check { border-color: var(--danger); }
body.public .btn { min-height: 36px; padding: 0 14px; border-radius: 6px; font: 500 14px/1.2 var(--sans); transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
body.public .btn--primary { border-color: transparent; background: var(--primary-bg); color: var(--primary-text); box-shadow: inset 0 -1px 0 var(--kit-btn-edge); }
body.public .btn--primary:hover { border-color: transparent; background: var(--primary-hover); }
body.public .btn--secondary { border-color: var(--btn-line); background: var(--btn-bg); color: var(--btn-text); box-shadow: var(--kit-shadow-sm); }
body.public .btn--secondary:hover { border-color: var(--kit-hover-line); background: var(--btn-hover); }
body.public .btn--ghost { border-color: transparent; background: transparent; color: var(--text-1); }
body.public .btn--ghost:hover { background: var(--raise-bg); }
body.public .btn:focus-visible { outline: none; box-shadow: var(--kit-ring); }
/* a form's buttons in the split frame: the kit's wide ones (btn-block), one under the other */
body.public .public-wrap--split .form-actions { flex-direction: column; align-items: stretch; gap: 10px; }
body.public .public-wrap--split .form-actions .btn { width: 100%; min-height: 42px; font-size: 15px; }
body.public .banner { gap: 10px; padding: 10px 12px; border-width: 1px; border-radius: 6px; font-size: 13.5px; }
body.public .banner .icon { width: 18px; height: 18px; margin-top: 1px; }
body.public .banner--info { border-color: var(--kit-info-line); }
body.public .banner--ok { border-color: var(--kit-ok-line); }
body.public .banner--warn { border-color: var(--kit-warn-line); }
body.public .banner--danger { border-color: var(--kit-danger-line); }
body.public .card { border-radius: 12px; box-shadow: var(--kit-shadow-sm); }
body.public .card-header { padding: 16px 20px; border-bottom: 1px solid var(--kit-line-soft); }
body.public .card-title { font: 600 15px/1.3 var(--sans); }
body.public .card-body { padding: 20px; }
body.public .state { gap: 12px; padding: 0; border: 0; border-radius: 0; background: none; }
body.public .state-text { font-size: 14.5px; }
body.public .state-action { margin-top: 8px; }

/* ---------- the pay page (src/billing/pages.mjs visitorPayPage): the plan and its price, its rules in the card's calmer
   block (the kit's .sso-panel: a hairline box on the second surface), the account's fields, then the yes and the button ---------- */
/* unit KITCARD: the plan card's program tiles (src/billing/plan-tiles.mjs), the kit's app card (app.css .product-top img,
   .product h3): each program's 52 px tile, the name 18 px under them; the tiles are the kit's files, their corners their own.
   Only the pay page's card writes these classes, in either shell, so nothing else on any page changes */
.pay-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.pay-tiles img { display: block; flex: none; width: 52px; height: 52px; }
.card-header .pay-tiles + .card-title { font-size: 18px; line-height: 1.3; letter-spacing: -.015em; }
.pay-lead { display: flex; flex-direction: column; gap: 10px; }
.pay-lead > p:first-child { color: var(--text-2); }
.pay-lead strong { font-weight: 600; font-size: 15px; color: var(--text-1); }
.pay-rules { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--card-line); border-radius: 8px; background: var(--kit-calm, var(--raise-bg)); font-size: 13.5px; color: var(--text-2); }
.pay-rules strong { font-weight: 600; color: var(--text-1); }
.pay-rules .billing-legal { margin: 0; padding-top: 10px; border-top: 1px solid var(--kit-line-soft, var(--card-line)); }
.pay-account, .pay-agree { display: flex; flex-direction: column; gap: 16px; }
.pay-account { padding-top: 8px; }
.pay-account h3 { font: 600 15px/1.3 var(--sans); }
.pay-account h3 + .help, .pay-account .field + .error { margin-top: -10px; }
.pay-agree { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--kit-line-soft, var(--card-line)); }

/* ---------- narrower screens (auth.css): the panel narrows, then becomes a band with the logo over the page ---------- */
@media (max-width: 1100px) {
  body.public .public-wrap--split { grid-template-columns: minmax(380px, 42%) 1fr; }
  .public-panel { padding: 36px 40px; }
  .public-panel-title { font-size: 34px; }
  .public-apps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-height: 760px) and (min-width: 861px) {
  .public-panel { position: relative; height: auto; min-height: 100vh; }
}
@media (max-width: 860px) {
  body.public .public-wrap--split { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .public-panel { position: relative; flex-direction: row; align-items: center; gap: 0; height: auto; min-height: 0; padding: 20px 20px 22px; }
  .public-panel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--panel-deep), var(--panel-sky)); }
  .public-panel-logo .logo { height: 30px; }
  .public-art, .public-panel-copy, .public-panel-foot { display: none; }
  .public-side { min-height: 0; }
  body.public .public-wrap--split .public-main { margin: 0 auto; padding: 32px 20px 40px; }
  body.public .public-foot { padding: 16px 20px; }
  body.public .page-title, body.public .auth-title, body.public .state-title { font-size: 24px; }
  body.public--page .public-head { padding: 12px 20px; }
  body.public--page .public-main { padding: 28px 20px 40px; }
}
@media print {
  .public-panel { display: none; }
  body.public .public-wrap--split { display: block; }
  body.public--page .public-main:has(.proposal-page) { max-width: none; padding: 0; }
}
/* ---------- end of unit KITPUBLIC ---------- */
