/*
   Metropolis Entertainment — brand overrides for the TrendyAdmin theme.
   Loaded AFTER the theme's main.css, so anything here wins. Keeping our overrides in this
   one file means re-pulling a theme update never clobbers the branding (see docs/conventions.md).

   TrendyAdmin brands entirely through CSS custom properties, so rebranding is just re-declaring
   the tokens below. Swap the placeholder values for the real Metropolis palette the moment the
   brand hex + logo land — no rebuild needed.
*/

:root {
    /* --- Metropolis brand standard (Adobe palette, 2026-08) ---

       Every semantic colour in the app is one of these. Bootstrap's stock blue/green/red are mapped
       onto them further down rather than left showing through, because a screen that mixes a purple
       header with a stock-green button reads as two products.

       Two stops per role. The *hue* is the brand colour, used for text, borders and subtle badges.
       The *fill* is what a solid button uses, deepened where the brand hue cannot carry white text
       at 4.5:1 — pink at #D256A4 manages 3.7, which is fine behind a badge and not fine under button
       text. `ink` is what sits on the fill. */
    --brand-primary: #742896;         /* purple — the accent */
    --brand-primary-fill: #742896;
    --brand-primary-hover: #5f2079;
    --brand-primary-ink: #fff;
    --brand-primary-soft: rgba(116, 40, 150, 0.10);

    --brand-secondary: #2167c0;       /* blue */
    --brand-secondary-fill: #2167c0;
    --brand-secondary-hover: #1b559f;
    --brand-secondary-ink: #fff;
    --brand-secondary-soft: rgba(33, 103, 192, 0.12);

    --brand-tertiary: #072040;        /* deep navy — chrome and dark surfaces, not an accent */
    --brand-tertiary-soft: rgba(7, 32, 64, 0.10);

    /* Deep logo cyan. Kept dark deliberately — a pale cyan reads as disabled, and this has to carry
       white text on a button (4.9:1). */
    --brand-success: #0e7c8f;
    --brand-success-fill: #0e7c8f;
    --brand-success-hover: #0b6474;
    --brand-success-ink: #fff;
    --brand-success-soft: rgba(14, 124, 143, 0.12);

    --brand-danger: #d256a4;          /* pink */
    --brand-danger-fill: #a93c80;     /* deepened: white text on the brand pink is only 3.7:1 */
    --brand-danger-hover: #8e326c;
    --brand-danger-ink: #fff;
    --brand-danger-soft: rgba(210, 86, 164, 0.14);

    --brand-warning: #fda62b;         /* orange */
    --brand-warning-fill: #fda62b;
    --brand-warning-hover: #e8910f;
    --brand-warning-ink: #2b1a00;     /* orange takes dark ink; white on it is unreadable */
    --brand-warning-soft: rgba(253, 166, 43, 0.16);

    /* Map the primary onto the theme's accent so buttons/links/highlights pick it up. */
    --accent-color: var(--brand-primary-fill);
    --accent-hover: var(--brand-primary-hover);
    --accent-soft: var(--brand-primary-soft);
    --heading-color: #1a1029;

    /* The theme carries its own semantic tokens and paints buttons and badges from them directly,
       rather than through Bootstrap's variables. Both paths have to land on the brand or a screen
       ends up with a purple header and a stock-green button. */
    --success-color: var(--brand-success-fill);
    --warning-color: var(--brand-warning-fill);
    --danger-color: var(--brand-danger-fill);
    --info-color: var(--brand-secondary-fill);
}

/* Intentional brand-accent utilities. */
.text-brand-secondary { color: var(--brand-secondary) !important; }
.bg-brand-secondary   { background-color: var(--brand-secondary) !important; }
.text-brand-tertiary  { color: var(--brand-tertiary) !important; }
.bg-brand-tertiary    { background-color: var(--brand-tertiary) !important; }

/* Dark mode — the theme flips via data-theme="dark" on <html>. Metropolis uses a warm mid-tone
   base (#594f58) instead of the theme's near-black, so the logo art and content read comfortably. */
:root[data-theme="dark"] {
    /* Near-black canvas with only a faint warm lean toward the #594f58 mauve — not the theme's
       cool blue-black, and nowhere near as light as #594f58 itself. */
    --background-color: #171417;   /* root canvas */
    --surface-color: #221f22;      /* panels lifted a step off the canvas */
    --card-bg: #221f22;            /* cards use --card-bg, not --surface-color */
    --sidebar-bg: #141114;         /* chrome a hair darker than the canvas */
    --header-bg: #171417;
    --border-color: #322c32;
    --border-color-light: #221f22;
    --border-color-dark: #3c353c;

    --heading-color: #f3eef6;      /* headings must flip light on the dark base (card titles, etc.) */

    /* Bootstrap's muted-text tokens default to near-black and the theme never lifts them, so every
       rule here that leans on --bs-secondary-color (workspace tabs, grid legends, the small labels
       on stacked tables) vanished on the dark base (found 2026-09-14). Lifted from --default-color. */
    --bs-secondary-color: rgba(228, 224, 245, 0.72);
    --bs-tertiary-color: rgba(228, 224, 245, 0.5);
    --bs-body-color: #e4e0f5;
    --bs-emphasis-color: #f3eef6;

    /* And the matching backgrounds: bg-body-secondary / bg-body-tertiary stayed Bootstrap's light
       greys under the lifted text — the night tiles on an availability request read as white on
       white (John, 2026-09-23). A step and two steps off the dark canvas, like --surface-color. */
    --bs-body-bg: var(--background-color);
    --bs-secondary-bg: #2d282d;
    --bs-tertiary-bg: #262226;
    --bs-border-color: var(--border-color);
    /* The utilities (bg-body-secondary etc.) paint from the -rgb triplets, not the tokens above. */
    --bs-body-bg-rgb: 23, 20, 23;
    --bs-secondary-bg-rgb: 45, 40, 45;
    --bs-tertiary-bg-rgb: 38, 34, 38;

    /* One value has to serve as both link colour and the theme's own accent fill, so it sits in the
       middle: readable as text on the dark canvas, still purple enough to be the brand. Solid
       buttons take --brand-primary-fill instead, via the rules below. */
    --accent-color: #a259c4;
    --accent-hover: #b678d6;
    --accent-soft: rgba(196, 137, 214, 0.16);

    --success-color: #0f8598;
    --warning-color: #fdb750;
    --danger-color: #b8478e;
    --info-color: #2167c0;

    /* The roles lift on the dark base: the hue brightens so text and borders read, while the fills
       stay close to the brand so a button is recognisably the same button in either theme. */
    --brand-primary: #c489d6;
    --brand-primary-fill: #7f2ca3;
    --brand-primary-hover: #96379f;
    --brand-primary-soft: rgba(196, 137, 214, 0.16);

    --brand-secondary: #6fa8e8;
    --brand-secondary-fill: #2167c0;
    --brand-secondary-hover: #3b81d6;
    --brand-secondary-soft: rgba(111, 168, 232, 0.16);

    --brand-tertiary: #8fb4e0;
    --brand-tertiary-soft: rgba(143, 180, 224, 0.14);

    --brand-success: #35b7cf;
    --brand-success-fill: #0f8598;
    --brand-success-hover: #1499af;
    --brand-success-soft: rgba(53, 183, 207, 0.16);

    --brand-danger: #e884c2;
    --brand-danger-fill: #b8478e;
    --brand-danger-hover: #c9569e;
    --brand-danger-soft: rgba(232, 132, 194, 0.16);

    --brand-warning: #fdb750;
    --brand-warning-fill: #fdb750;
    --brand-warning-hover: #f5a733;
    --brand-warning-soft: rgba(253, 183, 80, 0.16);
}

/* ── Bootstrap's semantics, mapped onto the brand ───────────────────────────
   Bootstrap 5.3 reads utilities (.text-success, .bg-danger-subtle, .badge) from these custom
   properties at runtime, so remapping them here reaches every one without touching a view. Buttons
   and alerts are the exception — they compile literal colours into their own --bs-btn-* / --bs-alert-*
   properties, so those are restated below. */
:root {
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: 116, 40, 150;
    --bs-secondary: var(--brand-secondary);
    --bs-secondary-rgb: 33, 103, 192;
    --bs-success: var(--brand-success);
    --bs-success-rgb: 14, 124, 143;
    --bs-danger: var(--brand-danger);
    --bs-danger-rgb: 169, 60, 128;
    --bs-warning: var(--brand-warning);
    --bs-warning-rgb: 176, 106, 4;      /* readable as text; the fill keeps the brand orange */
    --bs-info: var(--brand-secondary);
    --bs-info-rgb: 33, 103, 192;

    --bs-link-color: var(--brand-primary);
    --bs-link-color-rgb: 116, 40, 150;
    --bs-link-hover-color: var(--brand-primary-hover);

    --bs-primary-bg-subtle: rgba(116, 40, 150, 0.10);
    --bs-primary-border-subtle: rgba(116, 40, 150, 0.30);
    --bs-primary-text-emphasis: #5f2079;

    --bs-secondary-bg-subtle: rgba(33, 103, 192, 0.10);
    --bs-secondary-border-subtle: rgba(33, 103, 192, 0.30);
    --bs-secondary-text-emphasis: #1b559f;

    --bs-success-bg-subtle: rgba(14, 124, 143, 0.12);
    --bs-success-border-subtle: rgba(14, 124, 143, 0.30);
    --bs-success-text-emphasis: #0b6474;

    --bs-danger-bg-subtle: rgba(210, 86, 164, 0.14);
    --bs-danger-border-subtle: rgba(210, 86, 164, 0.35);
    --bs-danger-text-emphasis: #8e326c;

    --bs-warning-bg-subtle: rgba(253, 166, 43, 0.16);
    --bs-warning-border-subtle: rgba(253, 166, 43, 0.40);
    --bs-warning-text-emphasis: #8a5410;

    --bs-info-bg-subtle: rgba(33, 103, 192, 0.10);
    --bs-info-border-subtle: rgba(33, 103, 192, 0.30);
    --bs-info-text-emphasis: #1b559f;
}

:root[data-theme="dark"] {
    --bs-primary-rgb: 196, 137, 214;
    --bs-secondary-rgb: 111, 168, 232;
    --bs-success-rgb: 53, 183, 207;
    --bs-danger-rgb: 232, 132, 194;
    --bs-warning-rgb: 253, 183, 80;
    --bs-info-rgb: 111, 168, 232;

    --bs-link-color-rgb: 196, 137, 214;

    --bs-primary-text-emphasis: #d5a9e2;
    --bs-secondary-text-emphasis: #9cc4ef;
    --bs-success-text-emphasis: #6fcede;
    --bs-danger-text-emphasis: #f0a8d3;
    --bs-warning-text-emphasis: #fdc47f;
    --bs-info-text-emphasis: #9cc4ef;
}

/* Solid buttons. Two things paint a button here: Bootstrap, through its --bs-btn-* variables, and
   the theme, which sets background-color directly from its own tokens. Both are set — the variables
   so Bootstrap's own machinery agrees, and the properties because a direct declaration beats a
   variable the theme has already resolved. This file loads last, so these win. */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning {
    background-color: var(--btn-fill);
    border-color: var(--btn-fill);
    color: var(--btn-ink);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background-color: var(--btn-hover);
    border-color: var(--btn-hover);
    color: var(--btn-ink);
}

.btn-primary { --btn-fill: var(--brand-primary-fill); --btn-hover: var(--brand-primary-hover); --btn-ink: var(--brand-primary-ink); }
.btn-secondary { --btn-fill: var(--brand-secondary-fill); --btn-hover: var(--brand-secondary-hover); --btn-ink: var(--brand-secondary-ink); }
.btn-success { --btn-fill: var(--brand-success-fill); --btn-hover: var(--brand-success-hover); --btn-ink: var(--brand-success-ink); }
.btn-danger { --btn-fill: var(--brand-danger-fill); --btn-hover: var(--brand-danger-hover); --btn-ink: var(--brand-danger-ink); }
.btn-warning { --btn-fill: var(--brand-warning-fill); --btn-hover: var(--brand-warning-hover); --btn-ink: var(--brand-warning-ink); }

/* Outline buttons: the hue on the border and the label, the fill once you commit. */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning {
    background-color: transparent;
    border-color: var(--btn-hue);
    color: var(--btn-hue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active,
.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active,
.btn-outline-warning:hover,
.btn-outline-warning:focus,
.btn-outline-warning:active {
    background-color: var(--btn-fill);
    border-color: var(--btn-fill);
    color: var(--btn-ink);
}

.btn-outline-primary { --btn-hue: var(--brand-primary); --btn-fill: var(--brand-primary-fill); --btn-ink: var(--brand-primary-ink); }
.btn-outline-secondary { --btn-hue: var(--brand-secondary); --btn-fill: var(--brand-secondary-fill); --btn-ink: var(--brand-secondary-ink); }
.btn-outline-success { --btn-hue: var(--brand-success); --btn-fill: var(--brand-success-fill); --btn-ink: var(--brand-success-ink); }
.btn-outline-danger { --btn-hue: var(--brand-danger); --btn-fill: var(--brand-danger-fill); --btn-ink: var(--brand-danger-ink); }
.btn-outline-warning { --btn-hue: var(--bs-warning-text-emphasis); --btn-fill: var(--brand-warning-fill); --btn-ink: var(--brand-warning-ink); }

/* Bootstrap's own variables, kept in step so focus rings and disabled states agree. */
.btn-primary {
    --bs-btn-bg: var(--brand-primary-fill);
    --bs-btn-border-color: var(--brand-primary-fill);
    --bs-btn-color: var(--brand-primary-ink);
    --bs-btn-hover-bg: var(--brand-primary-hover);
    --bs-btn-hover-border-color: var(--brand-primary-hover);
    --bs-btn-hover-color: var(--brand-primary-ink);
    --bs-btn-active-bg: var(--brand-primary-hover);
    --bs-btn-active-border-color: var(--brand-primary-hover);
    --bs-btn-active-color: var(--brand-primary-ink);
    --bs-btn-disabled-bg: var(--brand-primary-fill);
    --bs-btn-disabled-border-color: var(--brand-primary-fill);
    --bs-btn-disabled-color: var(--brand-primary-ink);
}

.btn-secondary {
    --bs-btn-bg: var(--brand-secondary-fill);
    --bs-btn-border-color: var(--brand-secondary-fill);
    --bs-btn-color: var(--brand-secondary-ink);
    --bs-btn-hover-bg: var(--brand-secondary-hover);
    --bs-btn-hover-border-color: var(--brand-secondary-hover);
    --bs-btn-hover-color: var(--brand-secondary-ink);
    --bs-btn-active-bg: var(--brand-secondary-hover);
    --bs-btn-active-border-color: var(--brand-secondary-hover);
    --bs-btn-disabled-bg: var(--brand-secondary-fill);
    --bs-btn-disabled-border-color: var(--brand-secondary-fill);
    --bs-btn-disabled-color: var(--brand-secondary-ink);
}

.btn-success {
    --bs-btn-bg: var(--brand-success-fill);
    --bs-btn-border-color: var(--brand-success-fill);
    --bs-btn-color: var(--brand-success-ink);
    --bs-btn-hover-bg: var(--brand-success-hover);
    --bs-btn-hover-border-color: var(--brand-success-hover);
    --bs-btn-hover-color: var(--brand-success-ink);
    --bs-btn-active-bg: var(--brand-success-hover);
    --bs-btn-active-border-color: var(--brand-success-hover);
    --bs-btn-disabled-bg: var(--brand-success-fill);
    --bs-btn-disabled-border-color: var(--brand-success-fill);
    --bs-btn-disabled-color: var(--brand-success-ink);
}

.btn-danger {
    --bs-btn-bg: var(--brand-danger-fill);
    --bs-btn-border-color: var(--brand-danger-fill);
    --bs-btn-color: var(--brand-danger-ink);
    --bs-btn-hover-bg: var(--brand-danger-hover);
    --bs-btn-hover-border-color: var(--brand-danger-hover);
    --bs-btn-hover-color: var(--brand-danger-ink);
    --bs-btn-active-bg: var(--brand-danger-hover);
    --bs-btn-active-border-color: var(--brand-danger-hover);
    --bs-btn-disabled-bg: var(--brand-danger-fill);
    --bs-btn-disabled-border-color: var(--brand-danger-fill);
    --bs-btn-disabled-color: var(--brand-danger-ink);
}

.btn-warning {
    --bs-btn-bg: var(--brand-warning-fill);
    --bs-btn-border-color: var(--brand-warning-fill);
    --bs-btn-color: var(--brand-warning-ink);
    --bs-btn-hover-bg: var(--brand-warning-hover);
    --bs-btn-hover-border-color: var(--brand-warning-hover);
    --bs-btn-hover-color: var(--brand-warning-ink);
    --bs-btn-active-bg: var(--brand-warning-hover);
    --bs-btn-active-border-color: var(--brand-warning-hover);
    --bs-btn-disabled-bg: var(--brand-warning-fill);
    --bs-btn-disabled-border-color: var(--brand-warning-fill);
    --bs-btn-disabled-color: var(--brand-warning-ink);
}

/* Outline buttons: the hue on the border and the label, the fill once you commit. */
.btn-outline-primary {
    --bs-btn-color: var(--brand-primary);
    --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-primary-fill);
    --bs-btn-hover-border-color: var(--brand-primary-fill);
    --bs-btn-hover-color: var(--brand-primary-ink);
    --bs-btn-active-bg: var(--brand-primary-hover);
    --bs-btn-active-border-color: var(--brand-primary-hover);
    --bs-btn-active-color: var(--brand-primary-ink);
    --bs-btn-disabled-color: var(--brand-primary);
    --bs-btn-disabled-border-color: var(--brand-primary);
}

.btn-outline-secondary {
    --bs-btn-color: var(--brand-secondary);
    --bs-btn-border-color: var(--brand-secondary);
    --bs-btn-hover-bg: var(--brand-secondary-fill);
    --bs-btn-hover-border-color: var(--brand-secondary-fill);
    --bs-btn-hover-color: var(--brand-secondary-ink);
    --bs-btn-active-bg: var(--brand-secondary-hover);
    --bs-btn-active-border-color: var(--brand-secondary-hover);
    --bs-btn-active-color: var(--brand-secondary-ink);
    --bs-btn-disabled-color: var(--brand-secondary);
    --bs-btn-disabled-border-color: var(--brand-secondary);
}

.btn-outline-success {
    --bs-btn-color: var(--brand-success);
    --bs-btn-border-color: var(--brand-success);
    --bs-btn-hover-bg: var(--brand-success-fill);
    --bs-btn-hover-border-color: var(--brand-success-fill);
    --bs-btn-hover-color: var(--brand-success-ink);
    --bs-btn-active-bg: var(--brand-success-hover);
    --bs-btn-active-border-color: var(--brand-success-hover);
    --bs-btn-active-color: var(--brand-success-ink);
    --bs-btn-disabled-color: var(--brand-success);
    --bs-btn-disabled-border-color: var(--brand-success);
}

.btn-outline-danger {
    --bs-btn-color: var(--brand-danger);
    --bs-btn-border-color: var(--brand-danger);
    --bs-btn-hover-bg: var(--brand-danger-fill);
    --bs-btn-hover-border-color: var(--brand-danger-fill);
    --bs-btn-hover-color: var(--brand-danger-ink);
    --bs-btn-active-bg: var(--brand-danger-hover);
    --bs-btn-active-border-color: var(--brand-danger-hover);
    --bs-btn-active-color: var(--brand-danger-ink);
    --bs-btn-disabled-color: var(--brand-danger);
    --bs-btn-disabled-border-color: var(--brand-danger);
}

.btn-outline-warning {
    --bs-btn-color: var(--bs-warning-text-emphasis);
    --bs-btn-border-color: var(--brand-warning);
    --bs-btn-hover-bg: var(--brand-warning-fill);
    --bs-btn-hover-border-color: var(--brand-warning-fill);
    --bs-btn-hover-color: var(--brand-warning-ink);
    --bs-btn-active-bg: var(--brand-warning-hover);
    --bs-btn-active-border-color: var(--brand-warning-hover);
    --bs-btn-active-color: var(--brand-warning-ink);
    --bs-btn-disabled-color: var(--brand-warning);
    --bs-btn-disabled-border-color: var(--brand-warning);
}

/* Alerts — the tint, the border and the text, all from the same role. */
.alert-primary {
    --bs-alert-color: var(--bs-primary-text-emphasis);
    --bs-alert-bg: var(--bs-primary-bg-subtle);
    --bs-alert-border-color: var(--bs-primary-border-subtle);
}

.alert-info {
    --bs-alert-color: var(--bs-info-text-emphasis);
    --bs-alert-bg: var(--bs-info-bg-subtle);
    --bs-alert-border-color: var(--bs-info-border-subtle);
}

.alert-success {
    --bs-alert-color: var(--bs-success-text-emphasis);
    --bs-alert-bg: var(--bs-success-bg-subtle);
    --bs-alert-border-color: var(--bs-success-border-subtle);
}

.alert-warning {
    --bs-alert-color: var(--bs-warning-text-emphasis);
    --bs-alert-bg: var(--bs-warning-bg-subtle);
    --bs-alert-border-color: var(--bs-warning-border-subtle);
}

.alert-danger {
    --bs-alert-color: var(--bs-danger-text-emphasis);
    --bs-alert-bg: var(--bs-danger-bg-subtle);
    --bs-alert-border-color: var(--bs-danger-border-subtle);
}

/* Form controls that carry the accent. */
.form-check-input:checked {
    background-color: var(--brand-primary-fill);
    border-color: var(--brand-primary-fill);
}

.form-check-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.2rem var(--brand-primary-soft);
}

/* Logo mark: the SkyScape art carries its own transparency, so drop the theme's
   circular gradient chip and let the logo sit directly on the surface. */
.sidebar-logo-mark,
.header-logo-mark {
    background: none !important;
    border-radius: 0;
    width: auto;
    height: 34px;
}

.sidebar-logo-mark img,
.header-logo-mark img {
    width: auto;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Brand wordmark in the sidebar/header (until the real logo asset is dropped in). */
.sidebar-logo-text,
.header-logo-text {
    font-family: var(--heading-font);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Weekly Ops secondary navigation — the in-section pipeline tabs (Dashboard, Lines,
   Availability, Staffing Grid, Schedule, Publish). Kept in our overrides file so a theme
   update never clobbers it. */
.weekly-ops-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.weekly-ops-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.weekly-ops-tab i {
    font-size: 1.05rem;
}

.weekly-ops-tab:hover {
    background: var(--accent-soft);
    color: var(--accent-color);
}

.weekly-ops-tab.active {
    background: var(--accent-color);
    color: #fff;
}

/* ── My Stuff: availability answer ──────────────────────────────────────────
   One chip per night the contract runs; ticking it is the answer. A published night is a chip
   nobody can tick — Basecamp holds it (ADR-0012). Tokens only, so both themes come out of one
   rule set. */
.night-choices {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.5rem;
}

.night-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.6rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.night-choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.night-choice-day {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color, #6c757d);
}

.night-choice-date {
    font-weight: 600;
}

.night-choice-tag {
    font-size: 0.7rem;
    color: var(--bs-secondary-color, #6c757d);
}

.night-choice:hover {
    border-color: var(--accent-color);
}

.night-choice:has(input:checked) {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.night-choice:has(input:checked) .night-choice-day {
    color: rgba(255, 255, 255, 0.8);
}

.night-choice:has(input:focus-visible) {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.night-choice-published {
    cursor: default;
    opacity: 0.6;
    border-style: dashed;
}

.night-choice-published:hover {
    border-color: var(--border-color);
}

/* ── My Stuff: the person's calendar ────────────────────────────────────────
   A month grid of the nights they work. Days are links (the detail panel works without script);
   the script only makes the click instant. */
.my-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

.my-calendar-weekday {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
    text-align: center;
    padding-bottom: 0.25rem;
}

.my-calendar-day {
    min-height: 4.75rem;
    padding: 0.35rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
}

.my-calendar-day.is-outside {
    opacity: 0.45;
}

.my-calendar-number {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
}

.my-calendar-day.is-today .my-calendar-number {
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
    line-height: 1.4rem;
    text-align: center;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
}

a.my-calendar-day.has-night {
    border-color: var(--accent-color);
    background: var(--accent-soft);
    cursor: pointer;
}

a.my-calendar-day.has-night:hover,
.my-calendar-day.is-selected {
    box-shadow: 0 0 0 2px var(--accent-color) inset;
}

/* UKR Employees: a set-your-password link that was not mailed, at the head of the person's card. */
.employee-invite-link {
  display: flex; flex-direction: column; gap: 0.4rem; padding: 0.75rem 1rem;
  background: rgb(36 184 209 / 0.10); border-bottom: 1px solid rgb(14 140 170 / 0.35);
  border-radius: var(--bs-card-inner-border-radius, 0.5rem) var(--bs-card-inner-border-radius, 0.5rem) 0 0;
}
.employee-invite-link-url { font-size: 0.8rem; word-break: break-all; line-height: 1.3; }
.employee-invite-link:not(:first-child) { border-radius: 0; }
/* What an act on one employee answered (John, 2026-11-05): on their card, where the page lands —
   the notice at the top of the list is off screen there. Amber when it is a refusal. */
.employee-card-notice {
  display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.6rem 1rem; font-size: 0.9rem;
  background: rgb(36 184 209 / 0.10); border-bottom: 1px solid rgb(14 140 170 / 0.35);
}
.employee-card-notice:first-child { border-radius: var(--bs-card-inner-border-radius, 0.5rem) var(--bs-card-inner-border-radius, 0.5rem) 0 0; }
.employee-card-notice.is-error { background: rgb(252 159 54 / 0.16); border-bottom-color: rgb(252 159 54 / 0.55); }
.employee-card-notice > i { margin-top: 0.2rem; }

/* A table heading that sorts its rows on a click (wwwroot/js/roster-table.js). */
th.table-sort { cursor: pointer; user-select: none; white-space: nowrap; }
th.table-sort:hover, th.table-sort:focus-visible { color: var(--accent-color); }
th.table-sort i { font-size: 0.85em; opacity: 0.6; vertical-align: -0.05em; }
th.table-sort[aria-sort="ascending"] i, th.table-sort[aria-sort="descending"] i { opacity: 1; color: var(--accent-color); }

/* The employee's Park Hours (My Stuff): the same grid, each day saying the park's hours. */
.my-calendar-day.is-park-open {
    border-color: rgb(127 42 149 / 0.25);
    background: rgb(127 42 149 / 0.06);
}

.my-calendar-day.is-park-closed {
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
}

/* Park and Shift Hours: every day opens its details, so every day takes the hover ring. */
a.my-calendar-day.is-park-day {
    cursor: pointer;
}

a.my-calendar-day.is-park-day:hover {
    box-shadow: 0 0 0 2px var(--accent-color) inset;
}

/* What's New (My Stuff): a request is one line with its button at the end; a schedule is a table
   whose two buttons keep to their own narrow columns. */
.whats-new-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.whats-new-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.whats-new-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
    font-weight: 600;
}

.whats-new-table td.whats-new-action {
    width: 1%;
    white-space: nowrap;
}

/* The stage a run of seats belongs to, in the day's details. */
.park-shift-stage {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.my-calendar-park {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
}

.my-calendar-park-length,
.my-calendar-park-closed {
    font-size: 0.7rem;
    line-height: 1.15;
    color: var(--bs-secondary-color);
}

.my-calendar-night {
    display: flex;
    flex-direction: column;
    font-size: 0.7rem;
    line-height: 1.15;
    min-width: 0;
}

.my-calendar-night-time {
    font-weight: 600;
    color: var(--accent-color);
}

.my-calendar-night-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 575.98px) {
    .my-calendar-day {
        min-height: 3.25rem;
    }

    .my-calendar-night-title {
        display: none;
    }
}

/* ── Header activity indicator ──────────────────────────────────────────────
   One of the header's circle buttons, shown only while something long is still going: a publish
   uploading to Basecamp, a folder being read from it. The ring breathes so the eye knows it is
   alive; the icon says which kind. Tokens only, so both themes come out of one rule set. */
.activity-indicator {
    cursor: default;
}

.activity-indicator .icon-upload,
.activity-indicator .icon-search,
.activity-indicator .icon-done,
.activity-indicator .icon-failed {
    display: none;
}

.activity-indicator.is-upload .icon-upload,
.activity-indicator.is-search .icon-search,
.activity-indicator.is-done .icon-done,
.activity-indicator.is-failed .icon-failed {
    display: inline-block;
}

/* The outcome in the icon's own place: green check that lingers and fades, amber warning that
   stays a touch longer. */
.activity-indicator {
    transition: opacity 0.45s ease;
}

.activity-indicator.is-done {
    color: var(--bs-success, #198754);
    background: color-mix(in srgb, var(--bs-success, #198754), transparent 85%);
}

.activity-indicator.is-done .icon-done {
    animation: activity-pop 0.35s ease-out;
}

.activity-indicator.is-failed {
    color: var(--bs-warning, #ffc107);
    background: color-mix(in srgb, var(--bs-warning, #ffc107), transparent 82%);
}

.activity-indicator.is-fading {
    opacity: 0;
}

@keyframes activity-pop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}

.activity-indicator.is-busy {
    color: var(--accent-color);
    background: color-mix(in srgb, var(--accent-color), transparent 88%);
}

.activity-indicator.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    animation: activity-ring 1.6s ease-out infinite;
    pointer-events: none;
}

.activity-indicator.is-upload .icon-upload {
    animation: activity-lift 1.2s ease-in-out infinite;
}

.activity-indicator.is-search .icon-search {
    animation: activity-look 1.6s ease-in-out infinite;
}

.activity-indicator .activity-count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}

@keyframes activity-ring {
    0% { transform: scale(0.85); opacity: 0.7; }
    100% { transform: scale(1.35); opacity: 0; }
}

@keyframes activity-lift {
    0%, 100% { transform: translateY(1px); }
    50% { transform: translateY(-2px); }
}

@keyframes activity-look {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(12deg); }
}

@media (prefers-reduced-motion: reduce) {
    .activity-indicator.is-busy::after,
    .activity-indicator.is-upload .icon-upload,
    .activity-indicator.is-search .icon-search {
        animation: none;
    }
}

/* ── Staffing grid ──────────────────────────────────────────────────────────
   Roles down, nights across (ADR-0012), ported from BasecampTools' week grid — the part of the
   prototype that works best. Everything here is a token so both themes come out of one rule set;
   the dark values are re-declared with the other tokens further up. */
:root {
    /* Booked, and a night that has landed on a configuration: the success role, which is the deep
       logo cyan rather than a green. */
    --grid-booked: var(--brand-success-fill);
    --grid-booked-hover: var(--brand-success-hover);

    /* A night still being worked — the secondary blue. Not orange and not red: a night that has not
       yet reached a known configuration is the ordinary state of a grid being staffed, not a fault,
       and the warning colours are needed for things that actually are. */
    --grid-open: var(--brand-secondary-fill);
    --grid-open-ink: var(--brand-secondary-ink);

    /* A night the contract does not run. Flat, where unavailable is hatched. */
    --grid-hatch: rgba(0, 0, 0, 0.06);

    /* Someone who cannot work that night. Dense enough to read as a wall at a glance across seven
       columns — the whole point of the column is to be skipped over. */
    --grid-unavailable: rgba(0, 0, 0, 0.22);
    --grid-unavailable-base: rgba(0, 0, 0, 0.07);
}

:root[data-theme="dark"] {
    /* The role tokens have already lifted for the dark base, so the grid only restates the greys. */
    --grid-hatch: rgba(255, 255, 255, 0.07);
    --grid-unavailable: rgba(255, 255, 255, 0.22);
    --grid-unavailable-base: rgba(255, 255, 255, 0.06);
}

.staffing-grid-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
}

.staffing-grid {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.9rem;
}

.staffing-grid th,
.staffing-grid td {
    border-right: 1px solid var(--border-color-light, var(--border-color));
    border-bottom: 1px solid var(--border-color-light, var(--border-color));
    padding: 0.3rem 0.5rem;
    text-align: center;
    vertical-align: middle;
}

/* ── Role bands ─────────────────────────────────────────────────────────────
   A contract names its own roles (ADR-0011's second amendment), so the tints cannot be keyed to
   role names the way BasecampTools keyed them to its five fixed positions. They are positional
   instead: six stops walking the Metropolis logo's purple → blue → cyan → amber → orange, cycled
   if a contract ever names more than six roles.

   The tint is carried as a custom property on the row so it inherits into the cells, which is what
   lets a cell's own state composite over it — a hatched unavailable square still reads as part of
   its role's band. */
.staffing-grid {
    --tint-body: 0.09;
    --tint-head: 0.22;
}

:root[data-theme="dark"] .staffing-grid {
    --tint-body: 0.15;
    --tint-head: 0.30;
}

.staffing-grid .tint-0 { --row-tint: rgb(127 42 149 / var(--tint-body)); --row-tint-head: rgb(127 42 149 / var(--tint-head)); }
.staffing-grid .tint-1 { --row-tint: rgb(91 63 176 / var(--tint-body)); --row-tint-head: rgb(91 63 176 / var(--tint-head)); }
.staffing-grid .tint-2 { --row-tint: rgb(47 111 196 / var(--tint-body)); --row-tint-head: rgb(47 111 196 / var(--tint-head)); }
.staffing-grid .tint-3 { --row-tint: rgb(36 184 209 / var(--tint-body)); --row-tint-head: rgb(36 184 209 / var(--tint-head)); }
.staffing-grid .tint-4 { --row-tint: rgb(240 180 41 / var(--tint-body)); --row-tint-head: rgb(240 180 41 / var(--tint-head)); }
.staffing-grid .tint-5 { --row-tint: rgb(252 159 54 / var(--tint-body)); --row-tint-head: rgb(252 159 54 / var(--tint-head)); }

.staffing-grid tbody tr {
    background-color: var(--row-tint, transparent);
}

/* The name column stays put while the week scrolls sideways — a cell is meaningless without it.
   Being sticky it has to be opaque, so the band arrives as a layer over the surface rather than as
   a see-through colour. */
.staffing-grid .name-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: var(--card-bg);
    background-image: linear-gradient(var(--row-tint, transparent), var(--row-tint, transparent));
    border-right-color: var(--border-color);
    text-align: left;
    min-width: 13rem;
    font-weight: 600;
    white-space: nowrap;
}

.staffing-grid thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--surface-color, var(--card-bg));
}

.staffing-grid thead .name-col {
    z-index: 4;
}

.staffing-grid .day-col {
    min-width: 5.5rem;
}

.staffing-grid .day-name {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color, #6c757d);
}

.staffing-grid .day-num {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.1;
}

.staffing-grid .day-mark {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color, #6c757d);
}

.staffing-grid .day-col.dark,
.staffing-grid .group-cell.dark {
    background: var(--grid-hatch);
}

/* Counters: the night's headcount, and each role's count within it. */
.night-count,
.role-count {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0 0.45rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.45;
    background: var(--accent-soft);
    color: var(--bs-body-color);
}

.night-count .of,
.role-count .of {
    opacity: 0.65;
    font-weight: 500;
}

/* Settled — what is staffed is a configuration this contract has a name for, and the counter says
   which one instead of counting. */
.night-count.set,
.role-count.set {
    background: var(--grid-booked);
    color: #fff;
    letter-spacing: 0.04em;
}

/* Still being worked. Not a warning: a weekday's format is a default, and a night off it is
   ordinary — so this is the calm colour, and nothing in the grid goes red for a headcount. */
.night-count.open,
.role-count.open {
    background: var(--grid-open);
    color: var(--grid-open-ink);
}

.night-count.none,
.role-count.none {
    background: transparent;
    color: var(--bs-secondary-color, #6c757d);
}

/* Role group header row — the band's own colour, a shade up from its people. */
.staffing-grid .group-head {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bs-body-color);
    font-weight: 700;
}

.staffing-grid tbody tr.group-row {
    background-color: var(--row-tint-head, var(--surface-color, var(--card-bg)));
}

.staffing-grid .group-row .name-col,
.staffing-grid .group-row .total-col {
    background-image: linear-gradient(var(--row-tint-head, transparent), var(--row-tint-head, transparent));
}

/* The band opens on a firmer line than the rows inside it carry. */
.staffing-grid tbody tr.group-row td,
.staffing-grid tbody tr.group-row th {
    border-top: 1px solid var(--border-color);
}

/* Cells. Each square is drawn as a square: a grid line on every side, firmer than the light rules
   the header and the name column use, so a night reads as a box to click rather than as a gap. */
.staffing-grid .cell {
    height: 2.1rem;
    cursor: default;
    border-right-color: var(--border-color);
    border-bottom-color: var(--border-color);
    background-clip: padding-box;
}

.staffing-grid .cell.dark {
    background-color: var(--grid-hatch);
}

.staffing-grid .cell.unavailable {
    background-color: var(--grid-unavailable-base);
    background-image: repeating-linear-gradient(
        45deg,
        transparent, transparent 4px,
        var(--grid-unavailable) 4px, var(--grid-unavailable) 8px);
    cursor: context-menu;
}

.staffing-grid .cell.available {
    cursor: pointer;
}

.staffing-grid .cell.available:hover {
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 2px var(--accent-color);
}

.staffing-grid .cell:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

/* The ring keeps the edge visible where booked squares run together — four greens in a row should
   still read as four nights, not one block. */
.staffing-grid .cell.booked {
    background-color: var(--grid-booked);
    background-image: none;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.staffing-grid .cell.booked::after {
    content: "✓";
    color: #fff;
    font-weight: 700;
}

.staffing-grid .cell.booked:hover {
    background: var(--grid-booked-hover);
    box-shadow: inset 0 0 0 2px var(--grid-booked-hover);
}

/* Closed: Basecamp holds the night, so the grid is done with it (ADR-0012's 2026-08-26 amendment).
   The corner flag stays as the mark; the cell keeps its colours as the record of how the night was
   built, but stops inviting a click — the night is managed on View Schedule now. */
.staffing-grid .cell.published {
    position: relative;
}

.staffing-grid .cell.published::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    border-top: 0.45rem solid var(--brand-secondary);
    border-left: 0.45rem solid transparent;
}

.staffing-grid .cell.published,
.staffing-grid .cell.published.available,
.staffing-grid .cell.published.unavailable {
    cursor: default;
}

.staffing-grid .cell.published.available:hover {
    background: inherit;
    box-shadow: none;
}

.staffing-grid .cell.published.booked:hover {
    background-color: var(--grid-booked);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

/* The mark doubles as the way to where the night is managed now. */
a.day-mark.published {
    display: inline-block;
    color: var(--brand-secondary);
    text-decoration: none;
}

a.day-mark.published:hover {
    text-decoration: underline;
}

.staffing-grid .cell.busy {
    opacity: 0.5;
}

/* The totals column is opaque like the name column, so it takes the band the same way — a stripe
   that stopped short of the week total would read as the band ending. */
.staffing-grid .total-col {
    min-width: 4rem;
    font-weight: 700;
    background-color: var(--surface-color, var(--card-bg));
    background-image: linear-gradient(var(--row-tint, transparent), var(--row-tint, transparent));
}

.staffing-grid .name-col.not-submitted {
    font-style: italic;
    color: var(--bs-secondary-color, #6c757d);
}

.grid-flag {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0 0.4rem;
    border-radius: 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: help;
}

/* Never answered — the one flag on the grid that is genuinely a "chase this", so it takes warning. */
.grid-flag.no-submission {
    background: var(--brand-warning-soft);
    color: var(--bs-warning-text-emphasis);
}

/* Something they wrote. Information, so it takes the secondary blue rather than a warning colour. */
.grid-flag.note {
    background: var(--brand-secondary-soft);
    color: var(--bs-secondary-text-emphasis);
}

/* How the park employs them — FT, PT, CT — beside the name on the UKR grid. A fact about the
   person rather than something to act on, so it is the quietest of the flags. */
.grid-flag.employment {
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    letter-spacing: 0.03em;
}

/* Their stars in this row's role (John, 2026-10-20) — what the order under a role follows, so
   the grid shows it. Quiet, like the employment flag, with the star in gold. */
.grid-flag.rating {
    background: var(--bs-tertiary-bg);
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    text-transform: none;
}
.grid-flag.rating .star { color: rgb(230 167 0); margin-right: 0.1rem; }

/* Legend */
.grid-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
}

.grid-legend .swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 0.2rem;
    border: 1px solid var(--border-color);
}

.grid-legend .swatch.available { background: var(--card-bg); }
.grid-legend .swatch.booked { background: var(--grid-booked); }
.grid-legend .swatch.dark { background: var(--grid-hatch); }

.grid-legend .swatch.unavailable {
    background-color: var(--grid-unavailable-base);
    background-image: repeating-linear-gradient(
        45deg,
        transparent, transparent 3px,
        var(--grid-unavailable) 3px, var(--grid-unavailable) 6px);
}

/* Right-click menu — opening or closing one person's night by hand. */
.cell-menu {
    display: none;
    position: absolute;
    z-index: 1000;
    min-width: 14rem;
    padding: 0.25rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.18);
}

.cell-menu button {
    display: block;
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 0;
    border-radius: 0.25rem;
    background: none;
    color: var(--bs-body-color);
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
}

.cell-menu button:hover,
.cell-menu button:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-color);
}

/* ── Cast picker motion ─────────────────────────────────────────────────────
   Adding someone moves their row from the candidate list into the cast without
   a reload, which is fast enough to be invisible. The motion is there to make
   the move legible: the row tints, slides out to the left, and the list closes
   the gap behind it, so it is obvious which person went and that the list did
   not simply reorder itself under the cursor. */

/* Not scoped to either list: a row leaves the same way whichever direction it is going. */
.js-candidate,
.cap-row {
    transition: background-color 0.12s ease;
}

.is-leaving {
    background-color: var(--brand-primary-soft);
    transform: translateX(-14%);
    opacity: 0;
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom-width: 0 !important;
    /* Four phases, deliberately staggered rather than simultaneous. Run together, the fade
       finishes before the tint has registered and the collapse happens behind an already
       invisible row, so all you see is the swipe.

         0.00 – 0.16   tint            the row acknowledges the click
         0.10 – 0.38   slide out       overlaps the tint just enough to feel like one motion
         0.18 – 0.38   fade            starts late, so the row is still visible while it travels
         0.36 – 0.58   collapse        only once the row has actually gone

       Total ~0.58s. Anything faster and the phases read as a single blur. If this is retimed,
       the completion fallback in Cast.cshtml has to stay longer than the total. */
    transition:
        background-color 0.16s ease,
        transform 0.28s ease 0.10s,
        opacity 0.20s ease 0.18s,
        height 0.22s ease 0.36s,
        padding 0.22s ease 0.36s;
}

/* Where it landed. Fades out on its own so it does not become permanent noise. */
.is-arriving {
    animation: cast-arrive 1s ease-out;
}

@keyframes cast-arrive {
    from { background-color: var(--brand-primary-soft); }
    to   { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .js-candidate,
    .cap-row,
    .is-leaving {
        transition: none;
    }

    .is-arriving {
        animation: none;
    }
}

/* An add-on beside the show (ADR-0020): its own column, tinted so the eye reads it as the
   date's second event rather than another date. The "+" on a date column opens its form. */
.staffing-grid .day-col.addon,
.staffing-grid .group-cell.addon {
    background: color-mix(in srgb, var(--accent-soft) 45%, transparent);
    border-left: 2px solid color-mix(in srgb, var(--brand-secondary) 35%, transparent);
}

.staffing-grid .cell.addon {
    border-left: 2px solid color-mix(in srgb, var(--brand-secondary) 35%, transparent);
}

.staffing-grid .day-col.addon .day-name {
    color: var(--brand-secondary);
}

.staffing-grid .addon-time {
    font-size: 0.85rem;
}

.staffing-grid .addon-title {
    max-width: 7rem;
    margin: 0 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 600;
}

.staffing-grid button.addon-remove {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
}

.staffing-grid button.addon-remove:hover {
    color: var(--bs-danger, #b02a37);
}

.staffing-grid .day-col {
    position: relative;
}

.staffing-grid .day-add {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.8rem;
    line-height: 1;
    opacity: 0.35;
    cursor: pointer;
}

.staffing-grid .day-col:hover .day-add,
.staffing-grid .day-add:focus-visible {
    opacity: 1;
    background: var(--accent-soft);
    color: var(--brand-secondary);
}

/* The lock beside "no submission" — every night in the window at once — and the per-row hide.
   Both sit in the name column; the hide control only shows itself when the row is hovered. */
.staffing-grid .grid-lock,
.staffing-grid .grid-hide {
    border: 0;
    padding: 0 0.15rem;
    background: none;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.9rem;
    line-height: 1;
    vertical-align: middle;
    cursor: pointer;
}

.staffing-grid .grid-lock:hover,
.staffing-grid .grid-hide:hover {
    color: var(--brand-secondary);
}

.staffing-grid .grid-lock.is-open {
    color: var(--brand-secondary);
}

.staffing-grid .grid-lock.busy {
    opacity: 0.5;
    pointer-events: none;
}

.staffing-grid .grid-hide {
    margin-left: 0.2rem;
    opacity: 0;
    transition: opacity 0.1s;
}

.staffing-grid tr:hover .grid-hide,
.staffing-grid .grid-hide:focus-visible {
    opacity: 1;
}

/* A collapsed row: a thin strip the width of the grid, the name still on it in small type.
   Never gone — the strip is the way back (a click unfolds it), so the mis-click case has an
   obvious recovery. Its cells keep their classes and still count; they are just not shown. */
.staffing-grid tr.is-hidden .name-col,
.staffing-grid tr.is-hidden td {
    height: 1.15rem;
    padding: 0 0.5rem;
    line-height: 1.15rem;
    font-size: 0.7rem;
    cursor: pointer;
}

.staffing-grid tr.is-hidden td {
    background: repeating-linear-gradient(
        90deg,
        transparent, transparent 6px,
        var(--border-color-light, var(--border-color)) 6px, var(--border-color-light, var(--border-color)) 7px) !important;
    background-clip: padding-box !important;
    box-shadow: none !important;
    color: transparent;
}

.staffing-grid tr.is-hidden .name-col {
    font-weight: 500;
    font-style: italic;
    color: var(--bs-secondary-color, #6c757d);
}

.staffing-grid tr.is-hidden:hover .name-col {
    color: var(--brand-secondary);
}

.staffing-grid tr.is-hidden .grid-flag,
.staffing-grid tr.is-hidden .grid-lock {
    display: none;
}

.staffing-grid tr.is-hidden .grid-hide {
    opacity: 1;
}

/* ── MetroCalendar ──────────────────────────────────────────────────────────
   The office's month on the same calendar the person's View Schedule uses. Each contract takes
   a colour slot (metro-hue-N, cycling); a chip is dashed while the night is unpublished and
   struck through when cancelled. Tokens for the chrome, hues for the contracts. */
.metro-hue-0 { --chip: hsl(215 65% 48%); }
.metro-hue-1 { --chip: hsl(160 55% 38%); }
.metro-hue-2 { --chip: hsl(28 80% 48%); }
.metro-hue-3 { --chip: hsl(285 45% 52%); }
.metro-hue-4 { --chip: hsl(350 65% 50%); }
.metro-hue-5 { --chip: hsl(190 60% 40%); }

.metro-calendar .metro-chip {
    padding: 0.1rem 0.3rem;
    border-left: 3px solid var(--chip, var(--accent-color));
    border-radius: 0.25rem;
    background: color-mix(in srgb, var(--chip, var(--accent-color)) 12%, transparent);
}

.metro-calendar .metro-chip .my-calendar-night-time {
    color: var(--chip, var(--accent-color));
}

.metro-calendar .metro-chip.is-unpublished {
    border-left-style: dashed;
    background: transparent;
}

.metro-calendar .metro-chip.is-cancelled .my-calendar-night-title,
.metro-calendar .metro-chip.is-cancelled .my-calendar-night-time {
    text-decoration: line-through;
    opacity: 0.6;
}

/* A day with nights keeps the neutral card look here: the chips carry the colour, so a month of
   six contracts does not turn into a wall of one accent. */
.metro-calendar a.my-calendar-day.has-night {
    border-color: var(--border-color);
    background: var(--card-bg);
}

.metro-calendar a.my-calendar-day.has-night:hover,
.metro-calendar .my-calendar-day.is-selected {
    box-shadow: 0 0 0 2px var(--accent-color) inset;
}

.metro-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--bs-secondary-color, #6c757d);
}

.metro-legend-swatch,
.metro-detail .metro-legend-swatch {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.2rem;
    background: var(--chip, var(--accent-color));
    vertical-align: -0.05rem;
}

.metro-legend-swatch.is-unpublished {
    background: transparent;
    border: 2px dashed var(--bs-secondary-color, #6c757d);
}

.metro-detail + .metro-detail {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* Request Schedule Change — the "Ask" step: people in two groups by what they said on the
   availability request; for a swap, a picked person opens their nights beneath their name. */
.ask-group-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
    margin-bottom: 0.25rem;
}

.ask-person {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    margin-bottom: 0.3rem;
}

.ask-person:has(input:checked) {
    border-color: var(--accent-color);
    background: var(--accent-soft);
}

.ask-nights {
    margin: 0.35rem 0 0.15rem 1.5rem;
}

/* A picked night tile keeps its small tag readable on the accent ground. */
.night-choice:has(input:checked) .night-choice-tag {
    color: rgba(255, 255, 255, 0.85);
}

/* A swap's nights on offer, one month per page with arrows either side of the month name. */
.ask-month-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.ask-month-title {
    font-weight: 600;
    font-size: 0.9rem;
}

/* A person's picture in a list (Users): Basecamp's when there is one, initials on a soft disc
   when not — never the shared Metropolis figure, which says nothing seventy times over. */
.roster-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
}

.roster-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Activity Log (ADR-0022): the detail behind a line — Basecamp's words, a stack, the changed columns. */
.activity-log td { vertical-align: top; }

.activity-detail {
    max-height: 18rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    background: var(--accent-soft);
}

/* A table that stacks on a phone (Activity Log, Sessions): below the sm breakpoint every row is
   a card and every cell a labelled line, the label coming from data-label. The main cell — what
   happened, or who — leads the card without a label. Desktop is untouched. */
@media (max-width: 575.98px) {
    .table.stack-sm thead {
        display: none;
    }

    .table.stack-sm tbody,
    .table.stack-sm tr,
    .table.stack-sm td {
        display: block;
        width: 100%;
    }

    .table.stack-sm tr {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .table.stack-sm tr.is-failed {
        box-shadow: inset 3px 0 0 var(--bs-danger, #b02a37);
    }

    .table.stack-sm tr.is-refused {
        box-shadow: inset 3px 0 0 var(--bs-warning, #cc9a06);
    }

    .table.stack-sm td {
        padding: 0.15rem 0 !important;
        border: 0;
        text-align: left !important;
        white-space: normal !important;
    }

    .table.stack-sm td[data-label]::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 6rem;
        margin-right: 0.5rem;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--bs-secondary-color, #6c757d);
    }

    .table.stack-sm td.stack-main {
        order: -1;
        padding-bottom: 0.35rem !important;
    }

    .table.stack-sm td.stack-main::before {
        display: none;
    }

    .table.stack-sm tr {
        display: flex;
        flex-direction: column;
    }

    .table.stack-sm td:empty {
        display: none;
    }

    .activity-detail {
        max-height: 12rem;
    }

    .w-sm-auto {
        width: 100% !important;
    }
}

@media (min-width: 576px) {
    .w-sm-auto {
        width: auto !important;
    }
}

/* ── Office: the shift grid (ADR-0023) ──────────────────────────────────────
   Staff down, a Sunday-first week across, one block of hours per cell. Same bones as the staffing
   grid — a table of squares to click — but there is no availability and no publish state here: a
   cell is empty or holds a shift. Tokens only, so both themes come out of one rule set. */
.shift-grid-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
}

.shift-grid {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.9rem;
}

.shift-grid th,
.shift-grid td {
    border-right: 1px solid var(--border-color-light, var(--border-color));
    border-bottom: 1px solid var(--border-color-light, var(--border-color));
    padding: 0.3rem 0.4rem;
    text-align: center;
    vertical-align: middle;
}

.shift-grid thead th {
    font-weight: 600;
    background: var(--surface-color, var(--card-bg));
    border-bottom-color: var(--border-color);
}

.shift-grid .name-col {
    text-align: left;
    white-space: nowrap;
    font-weight: 500;
    padding-left: 0.75rem;
    position: sticky;
    left: 0;
    background: var(--card-bg);
    z-index: 1;
    min-width: 11rem;
}

.shift-grid thead .name-col {
    background: var(--surface-color, var(--card-bg));
}

.shift-grid .day-col { min-width: 8.5rem; }
.shift-grid .total-col { min-width: 5rem; font-weight: 600; }

.shift-grid .day-name {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
}

.shift-grid .day-num {
    font-size: 1.1rem;
    line-height: 1.2;
}

.shift-grid .day-col.today .day-num {
    display: inline-block;
    min-width: 1.6rem;
    line-height: 1.6rem;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
}

.shift-grid .day-total {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
}

.shift-grid .day-total.week-total {
    font-size: 0.95rem;
    color: inherit;
}

.roster-avatar-sm { width: 26px; height: 26px; font-size: 0.65rem; }

/* Cells: an empty one invites with a faint plus on hover; a filled one is a block in the brand's
   blue, the colour of a night being worked on the staffing grid — a shift is always being worked,
   there is no "done" here. */
.shift-grid .shift-cell {
    height: 3.2rem;
    cursor: pointer;
    border-right-color: var(--border-color);
    border-bottom-color: var(--border-color);
    background-clip: padding-box;
    transition: background-color 0.12s ease;
}

.shift-grid .shift-cell.today {
    background-color: var(--accent-soft);
}

.shift-grid .shift-cell .shift-add {
    opacity: 0;
    color: var(--accent-color);
    font-size: 1.1rem;
    transition: opacity 0.12s ease;
}

.shift-grid .shift-cell:hover .shift-add,
.shift-grid .shift-cell:focus-visible .shift-add {
    opacity: 1;
}

.shift-grid .shift-cell:hover {
    box-shadow: inset 0 0 0 2px var(--accent-color);
}

.shift-grid .shift-cell:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: -2px;
}

.shift-grid .shift-cell.busy {
    opacity: 0.6;
    pointer-events: none;
}

.shift-grid .shift-cell.has-shift {
    position: relative;
}

.shift-block {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    padding: 0.3rem 0.45rem;
    border-radius: 0.4rem;
    background: var(--brand-secondary-fill);
    color: var(--brand-secondary-ink);
    line-height: 1.2;
    text-align: left;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.shift-block .shift-time {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.shift-block .shift-meta {
    font-size: 0.7rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* A note on the shift: a small amber dot in the block's corner; the note itself is in the title. */
.shift-block.has-note::after {
    content: "";
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--brand-warning);
}

.shift-grid .shift-cell.is-editing {
    box-shadow: inset 0 0 0 2px var(--accent-color);
}

.shift-grid .shift-cell.is-editing .shift-block {
    background: var(--accent-color);
}

/* ── Office: the shift editor ───────────────────────────────────────────────
   Opens beside the cell. Two native range inputs share one track — the start and the end — and
   only their thumbs take the pointer, so the lower one never blocks the upper. On a phone it
   becomes a sheet at the bottom. */
.shift-editor {
    position: absolute;
    z-index: 1040;
    width: 22rem;
    max-width: calc(100vw - 1rem);
    padding: 0.9rem 1rem 0.8rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.shift-editor.is-sheet {
    position: fixed;
    left: 0.5rem !important;
    right: 0.5rem;
    bottom: 0.5rem;
    top: auto !important;
    width: auto;
    max-width: none;
}

.shift-editor-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.shift-readout {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.shift-range {
    position: relative;
    height: 2rem;
}

.shift-range-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 0.4rem;
    transform: translateY(-50%);
    border-radius: 0.2rem;
    background: var(--border-color);
}

.shift-range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0.2rem;
    background: var(--brand-secondary-fill);
}

.shift-range input[type="range"] {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 2rem;
    margin: 0;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.shift-range input[type="range"]:focus {
    outline: none;
}

.shift-range input[type="range"]::-webkit-slider-runnable-track { background: none; height: 2rem; }
.shift-range input[type="range"]::-moz-range-track { background: none; height: 2rem; }

.shift-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.375rem;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--brand-secondary-fill);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    cursor: grab;
}

.shift-range input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--brand-secondary-fill);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    cursor: grab;
}

.shift-range input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 3px rgba(0, 0, 0, 0.3); }
.shift-range input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 3px rgba(0, 0, 0, 0.3); }

.shift-range-scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--bs-secondary-color, #6c757d);
    padding: 0 0.3rem;
}

.shift-editor-foot {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.9rem;
}

/* ── Office: the roster (row-of-forms, since a form cannot live in a table row) ── */
.roster-rows {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    overflow: hidden;
}

.roster-row {
    display: grid;
    grid-template-columns: minmax(10rem, 1.3fr) minmax(12rem, 1fr) minmax(8rem, 1fr) minmax(6rem, 1fr) 3.5rem max-content;
    gap: 0.6rem;
    align-items: center;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid var(--border-color-light, var(--border-color));
    margin: 0;
}

.roster-row:last-child { border-bottom: 0; }
.roster-row-head { background: var(--surface-color, var(--card-bg)); font-weight: 600; }
.roster-row.is-inactive { opacity: 0.6; }

@media (max-width: 991.98px) {
    .roster-row { grid-template-columns: 1fr 1fr; }
    .roster-row-head { display: none; }
    .roster-row > :first-child { grid-column: 1 / -1; }
}

/* ── Office: the Time Clock ──────────────────────────────────────────────── */
.open-punch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px dashed var(--brand-warning);
    border-radius: 0.5rem;
}

.time-clock-card.is-in { border-color: var(--brand-warning); }

.time-clock-since {
    font-size: 1.35rem;
    font-weight: 600;
}

.time-clock-elapsed {
    font-size: 1rem;
    color: var(--bs-secondary-color, #6c757d);
}

.time-clock-button {
    font-size: 1.35rem;
    font-weight: 700;
    border-radius: 3rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    min-width: 14rem;
}

/* ── My Stuff: the person's shifts ──────────────────────────────────────── */
.my-shift {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.my-shift.is-off { color: var(--bs-secondary-color, #6c757d); }
.my-shift.is-today { background: var(--accent-soft); }

.my-shift-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.6rem;
    line-height: 1.1;
}

.my-shift-dow {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bs-secondary-color, #6c757d);
}

.my-shift-num { font-size: 1.15rem; font-weight: 600; }
.my-shift-body { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.my-shift-time { font-weight: 600; }
.my-shift-meta, .my-shift-note { font-size: 0.85rem; }

/* Stacked tables on a phone (the punch list and the report). */
@media (max-width: 767.98px) {
    .punch-table thead, .report-table thead { display: none; }
    .punch-table tbody tr, .report-table tbody tr:not(.report-detail) {
        display: block;
        padding: 0.5rem 0.75rem;
        border-bottom: 1px solid var(--border-color);
    }
    .punch-table td, .report-table tbody tr:not(.report-detail) td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border: 0;
        padding: 0.15rem 0 !important;
        text-align: left !important;
    }
    .punch-table td[data-label]::before, .report-table td[data-label]::before {
        content: attr(data-label);
        color: var(--bs-secondary-color, #6c757d);
        font-size: 0.75rem;
    }
    .report-table tfoot { display: none; }
}

/* ── UKR (ADR-0024) ─────────────────────────────────────────────────────────
   The park's own screens: the calendar a week at a time, the stages with their seats, and the
   matrix. The master grid has its own block further down once it lands. */

/* Park Hours: one row per date, a form per week. */
.park-week-rows { display: flex; flex-direction: column; }
.park-day-row {
  display: grid;
  grid-template-columns: 7rem 10rem 1fr 6rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1rem;
  border-top: 1px solid var(--bs-border-color);
}
.park-day-row.is-outside { opacity: 0.55; }
.park-day-row.is-today .park-day-num { color: var(--bs-primary); font-weight: 600; }
.park-day-row.state-closed .park-day-hours { visibility: hidden; }
.park-day-row.state-unknown .park-day-hours { opacity: 0.35; }
.park-day-date { display: flex; flex-direction: column; line-height: 1.1; }
.park-day-dow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); }
.park-day-num { font-weight: 500; }
.park-day-hours { display: inline-flex; align-items: center; gap: 0.4rem; }
.park-day-hours input { width: auto; }
.park-day-length { text-align: right; }
@media (max-width: 640px) {
  .park-day-row { grid-template-columns: 5rem 1fr; }
  .park-day-hours { grid-column: 1 / -1; }
  .park-day-length { display: none; }
}

/* Stages: roles as rows, seats as chips. */
.stage-card.is-inactive { opacity: 0.7; }
.stage-name { max-width: 16rem; }
.role-rows { display: flex; flex-direction: column; gap: 0.5rem; }
.role-row {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.5rem 0;
  border-top: 1px solid var(--bs-border-color);
}
.role-row-head { display: grid; grid-template-columns: 1fr 5.5rem auto auto; gap: 0.4rem; align-items: center; }
.role-seats { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.seat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
}
.seat-chip input.form-control { width: 8.5rem; border: none; background: transparent; padding: 0.1rem 0.25rem; font-weight: 500; }
.seat-chip.is-inactive { opacity: 0.55; }
.seat-chip.seat-add { border-style: dashed; background: transparent; }
.seat-chip.seat-add input.form-control { font-weight: 400; }
@media (max-width: 800px) {
  .role-row { grid-template-columns: 1fr; }
}

/* The matrix: kinds of park day down, seats across, a pair of times per cell. */
.matrix-wrap { overflow-x: auto; }
.matrix-table { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.matrix-table th, .matrix-table td { border-bottom: 1px solid var(--bs-border-color); padding: 0.35rem 0.4rem; vertical-align: middle; }
.matrix-table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); text-align: center; white-space: nowrap; }
.matrix-table thead .matrix-role { border-bottom: none; padding-bottom: 0; }
.matrix-table thead .matrix-role.kind-cast { color: var(--bs-primary); }
.matrix-table thead .matrix-role.kind-staff { color: var(--metro-tertiary, #24b8d1); }
.matrix-kind { font-weight: 400; opacity: 0.7; margin-left: 0.25rem; }
.matrix-table thead .matrix-seat { text-transform: none; letter-spacing: 0; font-size: 0.8rem; color: var(--bs-body-color); }
.matrix-pattern-col { text-align: left !important; white-space: nowrap; position: sticky; left: 0; background: var(--bs-body-bg); z-index: 1; }
.matrix-pattern { font-weight: 600; }
.matrix-cell { min-width: 7.5rem; }
.matrix-cell input[type="time"] { padding: 0.15rem 0.3rem; font-size: 0.8rem; }
.matrix-cell input[type="time"] + input[type="time"] { margin-top: 0.2rem; }
.matrix-cell.kind-cast { background: rgb(127 42 149 / 0.05); }
.matrix-cell.kind-staff { background: rgb(36 184 209 / 0.06); }
.matrix-cell.is-empty { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgb(0 0 0 / 0.04) 6px 8px); }
/* Not needed on this kind of day: the times fade, the label stands. */
.matrix-off { display: flex; align-items: center; gap: 0.3rem; margin-top: 0.25rem; font-size: 0.68rem; color: var(--bs-secondary-color); cursor: pointer; white-space: nowrap; }
.matrix-off input { margin: 0; }
.matrix-cell.is-off { background: var(--bs-tertiary-bg); }
.matrix-cell.is-off input[type="time"] { opacity: 0.35; }
.matrix-cell.is-off .matrix-off { color: var(--bs-body-color); font-weight: 600; }
.matrix-tools { white-space: nowrap; font-size: 0.75rem; }
.matrix-tools .btn { font-size: 0.75rem; margin-right: 0.35rem; }

/* Employees: a card per person (John, 2026-09-28 — the four-column table collided at ordinary
   widths). The head says who and where they stand; the body is contact and normal hours on the
   left, roles on the right, stacking on a narrow screen. */
.employee-cards { display: flex; flex-direction: column; gap: 0.75rem; }
/* scroll-margin: a save lands the page on the card (#employee-…), and the fixed header would
   otherwise cover its first lines — where an unmailed set-your-password link is shown. */
.employee-card { padding: 0; container-type: inline-size; scroll-margin-top: 6rem; }
.employee-card[hidden] { display: none; }
.employee-card.is-inactive { opacity: 0.65; }
/* The UKR admin's dashboard on Home (2026-10-16): a label column and the facts beside it. */
.ukr-dash-row { display: flex; gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--border-color); }
.ukr-dash-label { flex: 0 0 6.5rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bs-secondary-color, #6c757d); padding-top: 0.15rem; }
.ukr-dashboard details summary { cursor: pointer; }

/* ON-CALL (2026-10-12): the lock on an on-call employee's general availability, on their profile and the admin's card. */
.on-call-banner {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; margin-bottom: 0.75rem;
  background: rgb(252 159 54 / 0.14); border: 1px solid rgb(252 159 54 / 0.5); border-radius: 0.5rem;
}
.on-call-banner.is-compact { padding: 0.35rem 0.6rem; }
.on-call-badge {
  font-weight: 700; letter-spacing: 0.08em; font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px;
  background: rgb(190 100 0); color: #fff; white-space: nowrap;
}
.normal-hours.is-locked { opacity: 0.6; pointer-events: none; }

/* Add New (2026-10-07): the blank card, one column of fields rather than the two of a filled card. */
.employee-card-new .employee-card-head { background: rgb(127 42 149 / 0.08); }
.employee-card-new .roster-initials { font-size: 1.1rem; }
.employee-card-new .employee-card-body { display: block; }
.employee-card-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  padding: 0.65rem 1rem; border-bottom: 1px solid var(--bs-border-color);
  background: rgb(127 42 149 / 0.04);
}
.employee-card-who { min-width: 0; flex: 1 1 12rem; }
.employee-card-who .h6 { line-height: 1.2; }
.employee-state { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; margin-left: auto; }
.employee-card-body { display: grid; grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr); gap: 0 1.25rem; padding: 0.75rem 1rem; }
.employee-card-side { display: flex; flex-direction: column; gap: 0.75rem; }
.employee-section { min-width: 0; }
.employee-section-title { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bs-secondary-color); font-weight: 600; margin-bottom: 0.4rem; }
.employee-contact { display: flex; flex-direction: column; gap: 0.35rem; }
.employee-contact-foot { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.15rem; }
.employee-hours { display: flex; flex-wrap: wrap; gap: 0.25rem; }
/* The card's own width decides, not the viewport's — the sidebar takes its share. Two columns
   need the contact column plus a full role line (about 58rem); below that they stack. */
@container (max-width: 58rem) {
  .employee-card-body { grid-template-columns: 1fr; gap: 0.75rem 0; }
}
.hours-chip {
  display: inline-flex; flex-direction: column; align-items: center; min-width: 3.4rem;
  padding: 0.15rem 0.35rem; border-radius: 0.35rem; line-height: 1.1;
  background: rgb(127 42 149 / 0.08); font-size: 0.7rem;
}
.hours-chip.is-off { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.hours-chip-day { text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.6rem; color: var(--bs-secondary-color); }
.hours-chip-time { font-weight: 600; white-space: nowrap; }
/* Roles on the employee card (John, 2026-10-20): a child card per role — the role on top, its
   status, rating and rate stacked below, a label beside each — in place of one line of fields per
   role. The cards fill the roles column and wrap by its width; the add-a-role card is dashed. */
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.6rem; align-items: start; }
.role-cards-empty { grid-column: 1 / -1; }
.role-card {
  display: flex; flex-direction: column; gap: 0.5rem; min-width: 0;
  padding: 0.6rem 0.7rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; background: var(--bs-body-bg);
}
.role-card.is-approved { border-color: rgb(127 42 149 / 0.35); background: rgb(127 42 149 / 0.03); }
.role-card.is-approved .role-card-name .fw-semibold { color: var(--bs-primary); }
.role-card.role-add { border-style: dashed; background: transparent; }
.role-card-head { display: flex; align-items: center; gap: 0.45rem; min-width: 0; }
.role-card-head .form-select { min-width: 0; }
.role-card-name { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.15; }
.role-card-name > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-card-remove { margin-left: auto; flex: 0 0 auto; }
.role-card-fields { display: flex; flex-direction: column; gap: 0.4rem; }
.role-field { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); align-items: center; gap: 0.4rem; margin: 0; }
.role-field-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bs-secondary-color); font-weight: 600; }
.role-field-rate .form-control { min-width: 3.5rem; }
.role-card-foot { display: flex; justify-content: flex-end; }

/* The star rating: five radios drawn as stars, laid right to left in the markup so that "every
   star before the pick" is a sibling selector; the clear choice sits at the right end. */
.star-rating { position: relative; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 0.05rem; }
.star-rating input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.star-rating label { margin: 0; font-size: 1.25rem; line-height: 1; color: var(--bs-border-color); cursor: pointer; transition: color 0.1s ease, transform 0.1s ease; }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: rgb(230 167 0); }
.star-rating:hover input:checked ~ label { color: var(--bs-border-color); }
.star-rating:hover label:hover,
.star-rating:hover label:hover ~ label { color: rgb(230 167 0); }
.star-rating label:hover { transform: scale(1.15); }
.star-rating label.star-clear,
.star-rating:hover label.star-clear,
.star-rating input:checked ~ label.star-clear { order: -1; margin-left: 0.3rem; font-size: 0.8rem; color: var(--bs-secondary-color); opacity: 0.6; transform: none; }
.star-rating label.star-clear:hover { opacity: 1; }
.star-rating input:focus-visible + label { outline: 2px solid var(--bs-primary); outline-offset: 1px; border-radius: 0.2rem; }

/* Normal Hours (My Profile): a switch per weekday and the slider beside it. */
.normal-hours { display: flex; flex-direction: column; }
.normal-hours-day {
  display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem 1rem; align-items: center;
  padding: 0.5rem 0; border-top: 1px solid var(--bs-border-color);
}
.normal-hours-day:first-child { border-top: 0; }
.normal-hours-switch { margin: 0; }
.normal-hours-slider { position: relative; }
.normal-hours-day.is-off .hours-slider { opacity: 0.35; pointer-events: none; }
@media (max-width: 560px) {
  .normal-hours-day { grid-template-columns: 1fr; }
}

/* The shared hours slider (Views/Shared/_HoursSlider.cshtml). */
.hours-slider .shift-readout { margin-bottom: 0.15rem; }
.hours-slider.is-compact .shift-readout { font-size: 0.85rem; }
.hours-slider.is-compact .shift-range { height: 1.6rem; }
.hours-slider.is-compact .shift-range input[type="range"] { height: 1.6rem; }
.hours-slider.is-compact .shift-range input[type="range"]::-webkit-slider-runnable-track { height: 1.6rem; }
.hours-slider.is-compact .shift-range input[type="range"]::-webkit-slider-thumb { margin-top: 0.175rem; }
.hours-slider.is-off .shift-range-fill { background: var(--bs-secondary-bg); }

/* Availability windows (admin). */
.window-card.is-closed { opacity: 0.75; }

/* The employee's answer: a week per row, a rectangular block per day — the Office grid's block, not
   Weekly Ops' tile — that opens its editor underneath when clicked. */
.avail-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; margin-bottom: 0.35rem; }
.avail-day { position: relative; }
.avail-day-face {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 0.05rem;
  padding: 0.4rem 0.5rem; border: 1px solid var(--bs-border-color); border-radius: 0.4rem;
  background: var(--bs-body-bg); text-align: left; line-height: 1.15; cursor: pointer;
}
.avail-day-face:disabled { cursor: default; opacity: 0.55; background: var(--bs-tertiary-bg); }
.avail-day-dow { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); }
.avail-day-num { font-weight: 600; }
/* The month rides on every block (John, 2026-10-01): a window can run over three months, and a
   bare "4" does not say which. Lighter than the number so the date still reads first. */
.avail-day-month { font-weight: 400; font-size: 0.75rem; color: var(--bs-secondary-color); margin-right: 0.15rem; }
.avail-day-hours { font-size: 0.75rem; white-space: nowrap; }
.avail-day.is-normal .avail-day-face { background: rgb(127 42 149 / 0.08); border-color: rgb(127 42 149 / 0.25); }
/* A deeper cyan than the first wash (John, 2026-10-01): an answered day should read as answered at a glance. */
.avail-day.is-changed .avail-day-face { background: rgb(20 160 190 / 0.30); border-color: rgb(14 140 170 / 0.70); }
.avail-day.is-off .avail-day-face { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.avail-day.is-off .avail-day-hours { text-decoration: line-through; }
.avail-day.is-editing .avail-day-face { box-shadow: 0 0 0 2px var(--bs-primary); }
.avail-day-editor {
  position: absolute; z-index: 20; top: calc(100% + 0.25rem); left: 0; min-width: 20rem;
  padding: 0.75rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem;
  background: var(--bs-body-bg); box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 0.15);
}
.avail-day:nth-child(n+5) .avail-day-editor { left: auto; right: 0; }
/* The editor's first line: which day this is and when the park is open on it. */
.avail-day-park {
  display: grid; grid-template-columns: auto 1fr; column-gap: 0.75rem; row-gap: 0.1rem; align-items: baseline;
  margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--bs-border-color);
}
.avail-day-park-date { grid-column: 1 / -1; font-weight: 600; }
.avail-day-park-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); }
.avail-day-park-hours { font-size: 0.85rem; text-align: right; white-space: nowrap; }
.legend-swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 0.2rem; vertical-align: -0.1rem; border: 1px solid var(--bs-border-color); }
.legend-swatch.is-normal { background: rgb(127 42 149 / 0.15); }
.legend-swatch.is-changed { background: rgb(20 160 190 / 0.45); border-color: rgb(14 140 170 / 0.70); }
.legend-swatch.is-off { background: var(--bs-tertiary-bg); }
@media (max-width: 720px) {
  .avail-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .avail-day-editor { min-width: 16rem; }
}

/* ── UKR: the master grid ───────────────────────────────────────────────────
   Stages stacked down, a week across. The staffing grid's shape with the Office's blocks: a seat
   row carries the day's hours and the coverage pie; a person row carries their availability
   block, their assignment, or where else they are that day. */
.master-grid-wrap { overflow: auto; max-height: calc(100vh - 14rem); border: 1px solid var(--bs-border-color); border-radius: 0.5rem; background: var(--bs-body-bg); }
html.grid-fullscreen .master-grid-wrap { max-height: calc(100vh - 9rem); }
html.grid-fullscreen .master-grid-header p { display: none; }
.master-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.8rem; }
.master-grid th, .master-grid td { border-bottom: 1px solid var(--bs-border-color); border-right: 1px solid var(--bs-border-color); padding: 0.25rem 0.4rem; vertical-align: middle; }
.master-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--bs-body-bg); text-align: center; }
.master-grid .name-col { position: sticky; left: 0; z-index: 2; background: var(--bs-body-bg); text-align: left; min-width: 13rem; max-width: 16rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.master-grid thead .name-col { z-index: 4; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); }
.master-grid .day-col { min-width: 6.5rem; }
.master-grid .day-name { font-size: 0.65rem; letter-spacing: 0.06em; color: var(--bs-secondary-color); }
.master-grid .day-num { font-size: 1.1rem; font-weight: 600; line-height: 1.1; }
.master-grid .day-park { font-size: 0.65rem; color: var(--bs-secondary-color); }
.master-grid .day-col.today .day-num { color: var(--bs-primary); }
.master-grid .day-col.dark { color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); }
.master-grid .total-col { min-width: 3.5rem; text-align: center; color: var(--bs-secondary-color); }

/* The stage's band stays in view under the day header while its roles scroll beneath it, and the
   next stage's band takes its place as it arrives (John, 2026-10-02). Every band sticks at the
   same line — the header's height, which the page's script measures into --grid-head-h — so a
   later band simply covers the earlier one. The tint is laid over the body colour: a see-through
   band would show the rows passing under it. */
.master-grid .stage-row th {
  background: linear-gradient(rgb(127 42 149 / 0.14), rgb(127 42 149 / 0.14)), var(--bs-body-bg);
  font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em;
  position: sticky; left: 0; top: calc(var(--grid-head-h, 3.75rem) - 1px); z-index: 3;
}
.master-grid .stage-index { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 999px; background: var(--bs-primary); color: #fff; font-size: 0.7rem; margin-right: 0.35rem; }

.master-grid .seat-row th, .master-grid .seat-row td { background: rgb(127 42 149 / 0.06); }
.master-grid .seat-row.kind-staff th, .master-grid .seat-row.kind-staff td { background: rgb(36 184 209 / 0.08); }
.master-grid .seat-head { font-weight: 600; }
.master-grid .seat-role { font-weight: 400; color: var(--bs-secondary-color); margin-left: 0.3rem; }
.master-grid .seat-kind { float: right; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bs-secondary-color); margin-top: 0.2rem; }
.master-grid .seat-cell { text-align: left; cursor: pointer; white-space: nowrap; }
.master-grid .seat-cell.dark { background: var(--bs-tertiary-bg) !important; cursor: default; }
/* Not needed that kind of day (the matrix says so): open park, no seat — lighter than a closed day, and it says why. */
.master-grid .seat-cell.off { background: repeating-linear-gradient(135deg, transparent 0 6px, rgb(0 0 0 / 0.035) 6px 8px) !important; cursor: default; text-align: center; }
.master-grid .seat-off { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bs-secondary-color); }
.master-grid .seat-cell.is-editing { box-shadow: inset 0 0 0 2px var(--bs-primary); }
.master-grid .seat-hours { font-weight: 600; font-size: 0.75rem; margin-left: 0.3rem; }
.master-grid .seat-flag { color: var(--bs-warning); margin-left: 0.2rem; }
/* A duplicate role (Lisa, 2026-10-29): how many are on the seat at once, when more than one. */
.master-grid .seat-together { display: inline-block; margin-left: 0.3rem; padding: 0 0.35rem; border-radius: 999px; font-size: 0.65rem; font-weight: 700; line-height: 1.3; background: var(--brand-warning); color: var(--brand-warning-ink); }

/* The caret left of a role's title folds the people under it away (John, 2026-10-02); the one in
   the header's corner folds every role. It takes the row's own ink, so it reads on either theme. */
.master-grid .seat-toggle { border: 0; background: none; color: inherit; padding: 0.1rem 0.2rem; margin: 0 0.15rem 0 -0.2rem; border-radius: 0.25rem; line-height: 1; cursor: pointer; vertical-align: middle; opacity: 0.85; }
.master-grid .seat-toggle:hover, .master-grid .seat-toggle:focus-visible { opacity: 1; background: rgb(127 127 127 / 0.25); outline: none; }
.master-grid .seat-toggle i { display: inline-block; transition: transform 0.15s; }
.master-grid .seat-row.is-collapsed .seat-toggle i { transform: rotate(-90deg); }
.master-grid .seat-toggle-all { float: right; margin: 0; font-size: 0.85rem; }
.master-grid .seat-toggle-all.is-collapsed i { transform: rotate(180deg); }

/* The pie: a conic fill over a track, that becomes a check when it is whole. */
.seat-pie {
  --pct: 0;
  display: inline-flex; align-items: center; justify-content: center; vertical-align: middle;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: conic-gradient(var(--bs-primary) calc(var(--pct) * 1%), rgb(127 42 149 / 0.15) 0);
  color: transparent; font-size: 0.75rem; transition: background 0.3s;
}
.seat-cell.filled .seat-pie { background: rgb(25 135 84 / 0.18); color: var(--bs-success); animation: seat-filled 0.6s ease-out; }
@keyframes seat-filled { 0% { transform: scale(1.4); background: var(--bs-success); color: #fff; } 100% { transform: scale(1); } }

/* The role rows in light mode (John, 2026-10-02: more contrast was asked for). The pale purple
   tint did not hold a seat's row apart from the people under it, so the row goes to a dark grey
   drawn from the brand's deep purple — a shade under #403a40, the purple taken down to
   greyscale — with white text, and the status circles to a bright, light purple that reads on
   it. Cast and staff share the grey and are told apart by the edge of the name cell. The grid
   only: on the Roles view every row is a seat's row, and its blocks carry the colour. Dark mode
   keeps what it had. */
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) {
  --seat-row-bg: #362e38;
  --seat-row-ink: #fff;
  --seat-row-muted: rgb(255 255 255 / 0.7);
  --seat-row-line: rgb(255 255 255 / 0.1);
  --seat-pie: #d9a4f5;
}
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row th,
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row td {
  background: var(--seat-row-bg); color: var(--seat-row-ink);
  border-bottom-color: var(--seat-row-line); border-right-color: var(--seat-row-line);
}
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-head { box-shadow: inset 4px 0 0 var(--seat-pie); }
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row.kind-staff .seat-head { box-shadow: inset 4px 0 0 rgb(36 184 209); }
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-role,
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-kind,
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-total,
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-off { color: var(--seat-row-muted); }
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-pie {
  background: conic-gradient(var(--seat-pie) calc(var(--pct) * 1%), rgb(255 255 255 / 0.22) 0);
}
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-cell.filled .seat-pie {
  background: var(--seat-pie); color: var(--seat-row-bg); animation-name: seat-filled-on-dark;
}
@keyframes seat-filled-on-dark { 0% { transform: scale(1.4); background: #fff; } 100% { transform: scale(1); } }
/* Not needed that kind of day: the row's own grey, hatched, rather than a white hole in it. */
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-cell.off {
  background: repeating-linear-gradient(135deg, var(--seat-row-bg) 0 6px, #473d49 6px 8px) !important; /* opaque: a see-through stripe shows the white table behind */
}
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row .seat-cell.is-editing { box-shadow: inset 0 0 0 2px var(--seat-pie); }
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .seat-row td.seat-cell:focus-visible { outline-color: var(--seat-pie); }

.master-grid .person-head { font-weight: 500; }
.master-grid .person-head .name-text { margin-left: 0.35rem; }
.master-grid .person-row.is-empty th, .master-grid .person-row.is-empty td { background: var(--bs-tertiary-bg); }

/* The week total: the person's hours over every stage. Shaded as they near 40, flagged past it. */
.master-grid .person-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
.master-grid .person-total.near { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); font-weight: 600; }
.master-grid .person-total.over { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); font-weight: 700; }
.master-grid .person-total .js-over-flag { font-size: 0.9rem; vertical-align: -0.1em; margin-right: 0.15rem; }

/* Cells. */
.master-grid td.cell { height: 2.2rem; min-width: 6.5rem; padding: 0.15rem 0.3rem; cursor: pointer; position: relative; }
.master-grid td.cell .cell-text { display: inline-block; font-size: 0.72rem; font-weight: 600; line-height: 1.1; padding: 0.15rem 0.35rem; border-radius: 0.3rem; }
.master-grid td.cell.dark { background: var(--bs-tertiary-bg); cursor: default; }
.master-grid td.cell.available { background: rgb(25 135 84 / 0.12); }
.master-grid td.cell.available .cell-text { color: rgb(20 100 65); }
.master-grid td.cell.partial { background: rgb(252 159 54 / 0.18); }
.master-grid td.cell.partial .cell-text { color: rgb(150 80 0); }
.master-grid td.cell.unavailable { background: repeating-linear-gradient(135deg, var(--bs-tertiary-bg) 0 5px, rgb(0 0 0 / 0.05) 5px 7px); cursor: default; }
.master-grid td.cell.assumed { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12); }
.master-grid td.cell.assumed::after { content: "?"; position: absolute; top: 0.1rem; right: 0.25rem; font-size: 0.6rem; color: var(--bs-secondary-color); }
/* A day the office set from the right-click (2026-10-27): a small word in the corner, as the assumption's "?". */
.master-grid td.cell.office::after { content: "office"; position: absolute; top: 0.1rem; right: 0.25rem; font-size: 0.5rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--bs-secondary-color); }
.master-grid td.cell.booked.office::after, .master-grid td.cell.elsewhere.office::after { color: rgb(255 255 255 / 0.8); }
.master-grid td.cell.booked { background: var(--bs-primary); cursor: pointer; }
.master-grid td.cell.booked .cell-text { color: #fff; background: rgb(255 255 255 / 0.15); }
.master-grid td.cell.booked.published::before { content: ""; position: absolute; left: 0.2rem; bottom: 0.2rem; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: #fff; opacity: 0.9; }
.master-grid td.cell.elsewhere { background: rgb(73 80 87 / 0.35); cursor: default; }
.master-grid td.cell.elsewhere .cell-text { color: #fff; background: rgb(0 0 0 / 0.35); }
/* A day split between two seats (John, 2026-10-02): the two seats the person is on are cut
   corner to corner; every other row of theirs says "Split" on the elsewhere grey. */
.master-grid td.cell.booked.split { background: linear-gradient(135deg, var(--bs-primary) 0 50%, rgb(73 80 87 / 0.75) 50% 100%); }
.master-grid td.cell.elsewhere.split .cell-text { background: rgb(0 0 0 / 0.55); letter-spacing: 0.03em; }
.master-grid td.cell:not(.dark):not(.unavailable):not(.elsewhere):hover { filter: brightness(0.95); }
.master-grid td.cell.is-editing { box-shadow: inset 0 0 0 2px var(--bs-secondary); }
.master-grid td.cell.busy { opacity: 0.6; }
.master-grid td.cell:focus-visible, .master-grid td.seat-cell:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }

/* Legend swatches for this grid's states. */
.grid-legend .swatch.partial { background: rgb(252 159 54 / 0.4); }
.grid-legend .swatch.assumed { background: var(--bs-body-bg); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.3); }
.grid-legend .swatch.office { background: rgb(25 135 84 / 0.12); box-shadow: inset 0 0 0 1px var(--bs-secondary-color); }
.grid-legend .swatch.elsewhere { background: rgb(73 80 87 / 0.6); }
.grid-legend .swatch.split { background: linear-gradient(135deg, var(--bs-primary) 0 50%, rgb(73 80 87 / 0.75) 50% 100%); }

/* The Roles view (Lisa, 2026-10-02): the week read back — a block per person on each seat-day,
   hours over the name, and a dashed block for the hours nobody covers. */
.roles-grid td.role-cell { min-width: 7.5rem; padding: 0.2rem; vertical-align: top; }
.roles-grid td.role-cell.dark { background: var(--bs-tertiary-bg) !important; }
.roles-grid td.role-cell.off { background: repeating-linear-gradient(135deg, transparent 0 6px, rgb(0 0 0 / 0.035) 6px 8px) !important; text-align: center; vertical-align: middle; }
.roles-grid .role-block { display: block; width: 100%; margin: 0 0 0.2rem; padding: 0.2rem 0.45rem; border: 1px solid transparent; border-radius: 0.35rem; background: var(--bs-primary); color: #fff; font-size: 0.72rem; line-height: 1.25; text-align: left; cursor: pointer; }
.roles-grid .role-block:last-child { margin-bottom: 0; }
.roles-grid .role-block:hover { filter: brightness(1.1); }
.roles-grid .role-block:focus-visible, .roles-grid .role-block.is-editing { outline: 2px solid var(--bs-secondary); outline-offset: 1px; }
.roles-grid .role-hours { display: block; font-weight: 700; white-space: nowrap; }
.roles-grid .role-name { display: block; max-width: 9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roles-grid .kind-staff .role-block { background: rgb(21 122 140); }
.roles-grid .role-block.is-open, .roles-grid .kind-staff .role-block.is-open { background: rgb(220 53 69 / 0.07); border: 1px dashed rgb(220 53 69 / 0.65); color: var(--bs-danger-text-emphasis); }
.roles-grid .role-block.is-open .role-name { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.62rem; font-weight: 700; }
.roles-grid .stage-open { margin-left: 0.6rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); font-size: 0.7rem; font-weight: 600; letter-spacing: 0; }
.roles-grid .stage-open.is-done { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }

/* The published week (John, 2026-10-31): the Roles view's shape read-only — on UKR → Home and
   behind the public share link. Nothing is a button; a block is a block. */
.roles-grid.published-week .role-block { cursor: default; }
.roles-grid.published-week .role-block:hover { filter: none; }
.roles-grid.published-week td.role-cell { min-width: 6.5rem; }
.ukr-this-week .master-grid-wrap { max-height: 60vh; }
.public-page .master-grid-wrap { max-height: none; }
/* On a phone the seat column would take most of the width; the schedule is what they came for. */
@media (max-width: 575.98px) { .public-page .master-grid .name-col { min-width: 8.5rem; max-width: 9.5rem; } }

/* The People view (John, 2026-10-20): the week read back a person at a time — a row each, a
   block per seat or rehearsal they are on that day, every stage on the one row. Read-only, so
   the blocks are not buttons; the stage pills hide blocks by stage rather than rows. */
.people-grid .person-head { font-weight: 500; }
.people-grid .person-block { display: block; position: relative; margin: 0 0 0.2rem; padding: 0.2rem 0.45rem; border-radius: 0.35rem; background: var(--bs-primary); color: #fff; font-size: 0.72rem; line-height: 1.25; text-align: left; }
.people-grid .person-block:last-child { margin-bottom: 0; }
.people-grid .person-block[hidden] { display: none; }
.people-grid .person-block.kind-staff { background: rgb(21 122 140); }
.people-grid .person-block.is-rehearsal { background: rgb(190 100 0); }
.people-grid .person-block.published::after { content: ""; position: absolute; right: 0.3rem; top: 0.3rem; width: 0.35rem; height: 0.35rem; border-radius: 50%; background: #fff; opacity: 0.9; }
.people-grid .person-block-stage { display: inline-block; min-width: 1.1rem; margin-right: 0.25rem; padding: 0 0.25rem; border-radius: 999px; background: rgb(255 255 255 / 0.22); font-size: 0.6rem; font-weight: 700; text-align: center; }
.people-grid .people-row.is-idle .name-text { color: var(--bs-secondary-color); }
.people-grid td.role-cell:not(.dark):not(.filled) { background: repeating-linear-gradient(135deg, transparent 0 6px, rgb(0 0 0 / 0.025) 6px 8px); }
.people-grid .person-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
.people-grid .person-total.near { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); font-weight: 600; }
.people-grid .person-total.over { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); font-weight: 700; }
.grid-legend .swatch.rehearsal { background: rgb(190 100 0); }
.grid-legend .swatch.published { background: var(--bs-primary); position: relative; }
.grid-legend .swatch.published::after { content: ""; position: absolute; right: 0.15rem; top: 0.15rem; width: 0.3rem; height: 0.3rem; border-radius: 50%; background: #fff; }
.grid-legend .swatch.role-cast { background: var(--bs-primary); }
.grid-legend .swatch.role-staff { background: rgb(21 122 140); }
.grid-legend .swatch.role-open { background: rgb(220 53 69 / 0.07); border: 1px dashed rgb(220 53 69 / 0.65); }
/* Arriving on the grid from a hole in the Roles view: the seat-day it was, marked for a moment. */
.master-grid td.seat-cell.is-target, .master-grid tr.is-target > th { box-shadow: inset 0 0 0 2px var(--bs-warning); }

/* The Split roles modal: a slider per seat, the verdict under them. */
#split-modal .split-part + .split-part { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--bs-border-color); }
#split-modal .js-split-state { margin-top: 0.9rem; min-height: 1.2em; }

/* The stage filter pills. */
.stage-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.stage-pill { display: inline-flex; align-items: center; cursor: pointer; margin: 0; }
.stage-pill input { position: absolute; opacity: 0; }
.stage-pill span { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem 0.15rem 0.3rem; border-radius: 999px; border: 1px solid var(--bs-border-color); font-size: 0.75rem; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.stage-pill input:checked + span { background: rgb(127 42 149 / 0.12); border-color: rgb(127 42 149 / 0.4); color: var(--bs-body-color); }
.stage-pill input:focus-visible + span { outline: 2px solid var(--bs-primary); }
.stage-pill-index { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; border-radius: 999px; background: var(--bs-primary); color: #fff; font-size: 0.6rem; }

/* The admin's Master Calendar: a month of days, each with the park's hours and the stages' fills. */
.master-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.master-calendar-weekday { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bs-secondary-color); text-align: center; padding-bottom: 0.2rem; }
.master-calendar-day { min-height: 6.5rem; padding: 0.4rem 0.5rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; background: var(--bs-body-bg); position: relative; display: flex; flex-direction: column; gap: 0.3rem; }
.master-calendar-day.is-outside { opacity: 0.5; }
.master-calendar-day.is-closed, .master-calendar-day.is-unknown { background: var(--bs-tertiary-bg); }
.master-calendar-day.is-today { border-color: var(--bs-primary); }
.master-calendar-day.is-filled { background: rgb(25 135 84 / 0.08); border-color: rgb(25 135 84 / 0.35); }
.master-calendar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.3rem; }
.master-calendar-number { font-weight: 600; }
.master-calendar-park { font-size: 0.7rem; color: var(--bs-secondary-color); white-space: nowrap; }
.master-calendar-stages { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.master-calendar-stage { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.7rem; padding: 0.05rem 0.4rem 0.05rem 0.15rem; border-radius: 999px; background: rgb(127 42 149 / 0.1); white-space: nowrap; }
.master-calendar-stage.is-filled { background: rgb(25 135 84 / 0.15); }
.master-calendar-link { margin-top: auto; align-self: flex-end; font-size: 0.7rem; text-decoration: none; }
@media (max-width: 900px) {
  .master-calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .master-calendar-weekday { display: none; }
}

/* Full screen on the master grid: the sidebar goes away altogether (the theme's "collapsed" only
   narrows it to an icon rail), and the header and the page take the whole width. Set by the
   grid's button or the header's, through the document's fullscreen event. */
html.grid-fullscreen .sidebar { display: none; }
html.grid-fullscreen .sidebar-overlay { display: none; }
html.grid-fullscreen .header { left: 0; }
html.grid-fullscreen .main { margin-left: 0; }

/* A day the roster workbook marked "part of the day" without hours: the person is asked to set them. */
.avail-day.is-hours-unknown .avail-day-face { border-style: dashed; }

/* While the next week is on its way, the grid dims rather than blanks. */
#grid-root.is-loading { opacity: 0.55; transition: opacity 0.15s; pointer-events: none; }

/* The toolbar (John, 2026-10-27): the weeks as pagination with the week's dates, and at the row's
   end the status line and the week's badges; the stage pills are a row of their own beneath it.
   Grid, Roles and People are in the page's header with the window. */
.master-grid-tools { min-width: 0; }
.master-grid-tools #save-state { max-width: 18rem; }
.week-pages .page-link { min-width: 2rem; text-align: center; }
.week-pages .page-item.active .page-link { font-weight: 600; }

/* ── UKR: rehearsals (ADR-0025, re-scoped 2026-10-26) ─────────────────────────
   A rehearsal's page unfolds step by step and ends in the setup wizard; the rehearsal itself is
   a temporary stage on the master grid. On a stage's row a person rehearsing that day and on no
   seat is overlaid like a seat elsewhere, reading REHEARSAL (John, 2026-10-27). */
.rehearsal-step .step-number {
  display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 999px;
  background: var(--bs-primary); color: #fff; font-size: 0.75rem; font-weight: 700;
}
details.rehearsal-step > summary { cursor: pointer; list-style: none; }
details.rehearsal-step > summary::-webkit-details-marker { display: none; }
.rehearsal-card { transition: box-shadow 0.15s; color: inherit; }
.rehearsal-card:hover { box-shadow: 0 0.5rem 1.25rem rgb(0 0 0 / 0.12); }
.rehearsal-notes { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rehearsal-days .matrix-row.week-start th, .rehearsal-days .matrix-row.week-start td { border-top: 2px solid var(--bs-border-color); }
.rehearsal-days .matrix-tools .btn-group .btn { margin-right: 0; padding: 0.1rem 0.45rem; line-height: 1.2; }
.rehearsal-days .form-text .ph { vertical-align: -0.1em; }
.rehearsal-roles { display: flex; flex-direction: column; gap: 0.75rem; }
.rehearsal-location .form-control { min-width: 11rem; }
.members-table td, .members-table th { padding: 0.35rem 0.5rem; }
.members-table label { cursor: pointer; }

/* The page's summary of who the wizard put on: a stage, its roles, a chip per person. */
.rehearsal-stage-summary { padding: 0.5rem 0; border-top: 1px solid var(--bs-border-color); }
.rehearsal-stage-summary:first-child { border-top: 0; padding-top: 0; }
.rehearsal-role-line { display: grid; grid-template-columns: 9rem 1fr; gap: 0.25rem 0.75rem; align-items: start; padding: 0.15rem 0; }
.rehearsal-role-name { font-weight: 600; font-size: 0.85rem; padding-top: 0.15rem; }
.rehearsal-role-people { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.person-chip { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; background: rgb(127 42 149 / 0.1); font-size: 0.75rem; }
.person-chip.is-pending { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
@media (max-width: 560px) { .rehearsal-role-line { grid-template-columns: 1fr; } }

/* The setup wizard (John, 2026-10-26): a choice per line, roles as chips to press, people in a table. */
.setup-choice { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; padding: 0.5rem 0.75rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; cursor: pointer; }
.setup-choice:has(input:checked) { border-color: rgb(127 42 149 / 0.5); background: rgb(127 42 149 / 0.05); }
.setup-choice:has(input:disabled) { opacity: 0.55; cursor: default; }
.setup-choice input { margin-top: 0.25rem; }
.role-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.65rem; border-radius: 999px; border: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); color: var(--bs-body-color); font-size: 0.8rem; cursor: pointer; }
.role-chip small { opacity: 0.7; }
.role-chip.is-on { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
/* A staff role on offer (2026-11-02: every role of the stage, cast and staff) — dashed, so the two kinds read apart. */
.role-chip.is-staff { border-style: dashed; }
.role-chip:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }

/* The rehearsal band on the master grid (2026-10-26): a stage in orange — the band, the role rows
   with "N on" in place of the pie, the pending flag — and the cells with the rehearsal's own
   states: a seat in the hours is an overlay, a seat outside them a dark edge, another role of
   the same rehearsal a tag. */
.master-grid .rehearsal-block .stage-row th { background: rgb(190 100 0); color: #fff; }
.master-grid .rehearsal-block .stage-row .stage-index { background: #fff; color: rgb(190 100 0); }
.master-grid .rehearsal-block .stage-row .stage-tag { font-weight: 400; font-size: 0.7rem; opacity: 0.85; margin-left: 0.5rem; }
.master-grid .rehearsal-block .stage-row a { color: inherit; text-decoration: underline; font-weight: 400; font-size: 0.75rem; margin-left: 0.5rem; }
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .rehearsal-block .seat-row th,
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .rehearsal-block .seat-row td { background: rgb(120 70 10); }
:root:not([data-theme="dark"]) .master-grid:not(.roles-grid) .rehearsal-block .seat-row .seat-head { box-shadow: inset 4px 0 0 rgb(252 159 54); }
.master-grid .rehearsal-block .seat-cell { cursor: default; }
.master-grid .rehearsal-block .seat-count { font-size: 0.72rem; font-weight: 700; margin-right: 0.3rem; }
.master-grid .rehearsal-block .seat-cell.filled .seat-count { color: rgb(252 159 54); }
.master-grid .rehearsal-block td.cell .cell-tag {
  position: absolute; top: 0.1rem; right: 0.2rem; font-size: 0.6rem; font-weight: 700; padding: 0 0.3rem; border-radius: 999px;
  background: rgb(190 100 0 / 0.2); color: var(--bs-body-color);
}
.master-grid .rehearsal-block td.cell.booked { background: rgb(190 100 0); }
.master-grid .rehearsal-block td.cell.booked .cell-tag { background: rgb(255 255 255 / 0.3); color: #fff; }
.master-grid .rehearsal-block td.cell.has-show { box-shadow: inset 0 -3px 0 rgb(73 80 87 / 0.5); }
.master-grid .grid-flag.pending { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.roles-grid .rehearsal-block .role-block { background: rgb(190 100 0); }
.stage-pill.is-rehearsal input:checked + span { background: rgb(190 100 0 / 0.12); border-color: rgb(190 100 0 / 0.4); }
.stage-pill.is-rehearsal .stage-pill-index { background: rgb(190 100 0); }

/* On a stage's row, rehearsing that day and on no seat: the "elsewhere" grey reading REHEARSAL
   (John, 2026-10-27) — no rule of its own; the orange edge it had bordered whole blocks. */
.grid-legend .swatch.rehearsal-booked { background: rgb(190 100 0); }

/* A rehearsal's days on the calendars. */
.my-calendar-night.is-rehearsal { background: rgb(252 159 54 / 0.18); border-left: 3px solid rgb(252 159 54); }
.master-calendar-rehearsal { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.7rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: rgb(252 159 54 / 0.18); white-space: nowrap; }

/* The Publish options modal (John, 2026-10-17): weeks down, stages across, a tick per cell with when it last went out. */
#publish-modal .publish-cells th, #publish-modal .publish-cells td { text-align: center; vertical-align: middle; }
#publish-modal .publish-cells th:first-child { text-align: left; white-space: nowrap; }
#publish-modal .publish-cells thead th { font-weight: 600; }
#publish-modal .publish-cells .pub-dates { font-size: 0.75rem; color: var(--bs-secondary-color); font-weight: 400; margin-left: 1.45rem; }
#publish-modal .publish-cells .pub-when { font-size: 0.72rem; color: var(--bs-secondary-color); margin-top: 0.15rem; white-space: nowrap; }
#publish-modal .publish-cells td.is-published { background: var(--bs-primary-bg-subtle); }
#publish-modal .publish-cells td.is-published .pub-when { color: var(--bs-primary-text-emphasis); }
