/* camra.css: the app's look on top of MudBlazor (docs/design-system.md "Components: what camra.css does to them").
   ONE file in sections. It reads the design tokens only (var(--…), written by <CamraTokenStyles/> from
   Camra.Web/Design/CamraTokens.cs): no hex or rgb() colour, no pixel font size and no shadow of its own
   (DesignLiteralArchitectureTests). Loaded after MudBlazor.min.css and global.css, so equal selectors win here. */

/* ── 1. Base ─────────────────────────────────────────────────────────────────────────────────────────────────── */

html {
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--topbar-h) + var(--s-2));
    scroll-padding-bottom: calc(var(--bottombar-h) + var(--s-2));
}

body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-sans);
    /* tabular figures app-wide: a figure is read against the one above it */
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

::selection {
    background: var(--c-fill-selected);
    color: var(--c-text);
}

a {
    color: var(--c-brand);
}

/* G22: inside a table, a list or a card a link is a name (a camera, a plate, a person), not running text: it keeps the
   text colour and shows it is a link by its underline on hover; orange stays for the primary action and selection */
.mud-table-cell a:not(.mud-button-root),
.camra-list a:not(.mud-button-root),
.camra-list-card a:not(.mud-button-root),
.mud-card a:not(.mud-button-root) {
    color: inherit;
    text-decoration: none;
}

.mud-table-cell a:not(.mud-button-root):hover,
.camra-list a:not(.mud-button-root):hover,
.camra-list-card a:not(.mud-button-root):hover,
.mud-card a:not(.mud-button-root):hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* every interactive element shows the brand ring on keyboard focus (WCAG 2.4.7), MudBlazor's included */
:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

.mud-button-root:focus-visible,
.mud-icon-button:focus-visible,
.mud-nav-link:focus-visible,
.mud-tab:focus-visible,
.mud-list-item:focus-visible,
.mud-menu-item:focus-visible,
.mud-chip:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

/* MudBlazor's ripple is off: nothing moves on its own, a press is a colour step */
.mud-ripple::after {
    display: none;
}

.mud-ripple {
    overflow: visible;
}

/* Scroll bars: thin and brand-coloured, the ONE rule of the app (VK, 3 Nov 2026, "Thin, brand-coloured"). A muted
   brand thumb (--c-brand-line) on no track, the full brand under the pointer (Safari; the standard properties have no
   hover state); never hidden (a row that scrolls sideways shows its bar too). Firefox and Chrome 121+ read the
   standard properties; Safari, which has no scrollbar-color, the ::-webkit-scrollbar rules (Chrome ignores those once
   the standard ones are set). The colours are the brand tokens, so a theme change follows them. */
@supports (scrollbar-color: auto) {
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--c-brand-line) transparent;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
    background: transparent;
}

::-webkit-scrollbar-thumb,
.mud-input > textarea.mud-input-root::-webkit-scrollbar-thumb {
    /* the transparent border insets the thumb from the edge: a 4px bar in an 8px lane */
    border: 2px solid transparent;
    border-radius: var(--r-pill);
    background: var(--c-brand-line) padding-box;
}

::-webkit-scrollbar-thumb:hover,
.mud-input > textarea.mud-input-root::-webkit-scrollbar-thumb:hover {
    background: var(--c-brand-hover) padding-box;
}

::-webkit-scrollbar-thumb:active {
    background: var(--c-brand) padding-box;
}

/* tabular figures wherever a number is read against another */
.mud-table-cell,
.mud-badge,
.mud-chip,
.mud-table-pagination,
time,
.site-clock,
.camra-tnum {
    font-variant-numeric: tabular-nums;
}

/* a time on the site's clock is read whole: its zone never wraps onto a line of its own ("11:38 AM / EDT") */
time.site-time {
    white-space: nowrap;
}

/* a time split into its day and its clock (SiteTime BreakAfterDay): a column that lets it wrap
   (`white-space: normal` on the time) breaks it only between the two, never inside one */
time.site-time > .site-time__day,
time.site-time > .site-time__clock {
    white-space: nowrap;
}

/* ...which BreakAfterDay asks for: a list card's date and time (its text column beside the thumbnail is narrower than
   "Oct 28, 2026 7:57:23 AM EDT" at 360px; it was cut at "AM E") */
time.site-time.site-time--breaks {
    white-space: normal;
}

/* below 360px a card's text column beside its thumbnail is narrower than "Oct 13, 2026 9:48:29 AM EDT": a time
   that cannot fit wraps rather than push the page sideways */
@media (max-width: 359.98px) {
    time.site-time {
        white-space: normal;
    }
}

.camra-figure {
    font-size: var(--fs-figure);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-figure);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* machine data only (an IP, a stream's resolution and fps, a plate, an id or a token, a duration, a clock time in a
   table or a log): the one monospace, a step smaller. Never a sentence, a label or a button */
.camra-mono {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: var(--ls-mono);
    font-variant-numeric: tabular-nums;
}

/* the label role (column heads, menu groups, tile labels): 11px, 500, uppercase, muted */
.camra-label {
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-label);
    line-height: 1.3;
    text-transform: uppercase;
}

.camra-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* the one skeleton (docs/design-system.md "CamraSkeleton"): a neutral fill a step lighter than the card that pulses
   between 40 and 80 % over 1.8s; every block of a load starts together, so they pulse in step (no wave, no sweep) */
.camra-skeleton {
    display: block;
    border-radius: var(--r-sm);
    background: var(--c-skeleton);
    animation: camra-pulse 1.8s ease-in-out infinite;
}

/* a line of text: as tall as a line of the text around it, the bar in its middle (0.7em of it) */
.camra-skeleton--text {
    width: 100%;
    height: 1lh;
    padding-block: calc((1lh - 0.7em) / 2);
    background-clip: content-box;
}

.camra-skeleton-lines {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.camra-skeleton--picture {
    width: 100%;
    border-radius: 0;
}

.camra-skeleton--circle {
    flex: none;
    border-radius: var(--r-pill);
}

.camra-skeleton--pill {
    display: inline-block;
    flex: none;
    border-radius: var(--r-pill);
    vertical-align: middle;
}

/* a span skeleton inside a line of text keeps the line's own height */
.camra-skeleton--block {
    flex: none;
}

@keyframes camra-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* content that replaces a skeleton fades in (180ms) instead of popping in */
.camra-fade-in {
    animation: camra-fade-in 180ms ease-out both;
}

@keyframes camra-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* a live dot breathes: opacity 1 to .45 and back over 2.4s; no halo, no scale */
@keyframes camra-breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* the website's "Skip to content": off screen until it has focus */
.camra-skip-link {
    position: fixed;
    top: var(--s-3);
    left: var(--s-4);
    z-index: 2000;
    padding: var(--s-2) var(--s-4);
    border-radius: var(--r-md);
    background: var(--c-brand);
    color: var(--c-on-brand);
    font-weight: var(--fw-semibold);
    text-decoration: none;
    transform: translateY(calc(-100% - var(--s-6)));
}

/* on a phone or a touch screen the link, once it has focus, is a finger's 44px tall */
@media (max-width: 599.98px), (pointer: coarse) {
    .camra-skip-link {
        display: inline-flex;
        align-items: center;
        min-height: var(--hit);
    }
}

.camra-skip-link:focus,
.camra-skip-link:focus-visible {
    transform: none;
    outline-color: var(--c-text);
}

@media (prefers-reduced-motion: reduce) {
    .camra-skeleton-ghost {
        animation: none !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
        scroll-behavior: auto !important;
    }

    .camra-skeleton,
    .mud-skeleton,
    .camra-fade-in,
    .status-dot,
    .camra-status__dot {
        animation: none !important;
    }
}

/* ── 2. Type ─────────────────────────────────────────────────────────────────────────────────────────────────── */

.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6 {
    text-wrap: balance;
}

@media (max-width: 599.98px) {
    .mud-typography-h4 {
        font-size: var(--fs-page-title);
    }

    .mud-typography-h5 {
        font-size: var(--fs-section);
    }

    .mud-typography-h6 {
        font-size: var(--fs-card-title);
    }
}

/* the label role is never orange */
.mud-typography-overline {
    color: var(--c-text-muted);
}

/* the subtitles of today (a disabled breadcrumb at 26 % white, 2.3:1) read as secondary text (7.9:1) */
.mud-breadcrumbs {
    padding: 0;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
}

.mud-breadcrumbs .mud-breadcrumb-item,
.mud-breadcrumbs .mud-breadcrumb-item.mud-disabled,
.mud-breadcrumbs .mud-breadcrumb-item.mud-disabled > a,
.mud-breadcrumbs .mud-breadcrumb-item > a,
.mud-breadcrumbs .mud-breadcrumb-separator {
    color: var(--c-text-2);
    opacity: 1;
}

.mud-breadcrumbs .mud-breadcrumb-item > a:hover {
    color: var(--c-text);
}

/* a breadcrumb that links ("Event Alert Rules" above History) is 22px of text: a 44px hit area on touch */
@media (max-width: 599.98px), (pointer: coarse) {
    .mud-breadcrumbs .mud-breadcrumb-item > a {
        position: relative;
    }

    .mud-breadcrumbs .mud-breadcrumb-item > a::before {
        content: "";
        position: absolute;
        inset: calc((var(--hit) - 100%) / -2) 0;
        min-height: var(--hit);
    }
}

/* secondary text from the palette: MudBlazor draws "Color.Secondary" text in the muted grey (5.8:1) */
.mud-secondary-text {
    color: var(--c-text-muted) !important;
}

/* ── 3. Buttons ──────────────────────────────────────────────────────────────────────────────────────────────── */

/* one button: 32px from 600px, 40px on a phone (its hit area 44), radius 8, 13.5px/600, sentence case. Primary is the
   brand fill with dark text (one per view), secondary the raised surface with the line, ghost text only with a fill on
   hover, danger red text (a red fill only for the confirm of a delete). No glow, no gradient, no lift. */
.mud-button-root.mud-button {
    min-width: 0;
    min-height: var(--btn-h);
    padding: 0 var(--s-3);
    border-radius: var(--r-md);
    font-size: var(--fs-button);
    font-weight: var(--fw-semibold);
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    box-shadow: none;
    transition: background-color var(--t-hover) ease-out, box-shadow var(--t-hover) ease-out, color var(--t-hover) ease-out, border-color var(--t-hover) ease-out;
}

.mud-button-root.mud-button.mud-button-size-small,
.mud-button-root.mud-button[class*="-size-small"] {
    min-height: 28px;
    padding: 0 var(--s-2);
    font-size: var(--fs-small);
}

.mud-button-root.mud-button[class*="-size-large"] {
    min-height: max(40px, var(--btn-h));
    padding: 0 var(--s-4);
}

/* the icon before or after a label: 16px in line with the words, 8px from them */
.mud-button-root.mud-button .mud-button-icon-start {
    margin-inline: calc(-1 * var(--s-1) / 2) var(--s-2);
}

.mud-button-root.mud-button .mud-button-icon-end {
    margin-inline: var(--s-2) calc(-1 * var(--s-1) / 2);
}

.mud-button-root.mud-button :is(.mud-button-icon-start, .mud-button-icon-end) .mud-icon-root {
    font-size: 1rem;
}

/* ...except a numeric field's spin arrows, which MudBlazor draws as two text buttons stacked in the field: at 40px
   each they spilled out of it (the camera dialog's retention days) */
.mud-input-numeric-spin .mud-button-root.mud-button.mud-button {
    min-height: 0;
    padding: 0;
}

/* on a phone or a touch screen the arrows (two 22px halves of the field's end) are not drawn: a finger types the number
   on the number pad the field opens */
@media (max-width: 599.98px), (pointer: coarse) {
    .mud-input-control .mud-input .mud-input-numeric-spin {
        display: none;
    }
}

/* a button's label never wraps ("New / parking / lot" on three lines at 390px): the button keeps its width and the
   text beside it gives way */
.mud-button-root.mud-button .mud-button-label {
    white-space: nowrap;
}

/* a page header's labelled button on a page that is not on CamraPageHeader yet: on a phone the icon only, its text
   stays its accessible name (the rule CamraPageHeader's actions follow) */
@media (max-width: 599.98px) {
    .mud-button-root.camra-icon-only-phone:has(.mud-button-icon-start) .mud-button-label {
        font-size: 0;
        gap: 0;
    }

    .mud-button-root.camra-icon-only-phone:has(.mud-button-icon-start) .mud-button-icon-start {
        margin: 0;
    }

    .mud-button-root.camra-icon-only-phone:has(.mud-button-icon-start) {
        min-width: var(--hit);
        padding-inline: var(--s-3);
    }
}

/* a field's help in a dialog: one line in --c-text-muted, its full meaning in a "More" disclosure (camra-disclosure) */
.camra-field-help {
    color: var(--c-text-muted);
    font-size: var(--fs-caption);
    line-height: 1.4;
}

/* Record a violation: the plate's state question keeps its height while it loads, so nothing under it moves */
.plate-identity-slot {
    min-height: calc(2 * var(--s-16));
}

/* THE quiet toggle (a filter bar's "More", a fold's line): the secondary text on no fill, the hover fill and the focus
   ring; a disclosure adds the chevron that turns down when open */
.camra-toggle,
.camra-disclosure > summary,
.camra-disclosure__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    min-height: var(--s-8);
    padding: 0 var(--s-2);
    border: 0;
    border-radius: var(--r-md);
    background: transparent;
    color: var(--c-text-2);
    font: inherit;
    font-size: var(--fs-small);
    font-weight: var(--fw-medium);
    text-align: start;
    cursor: pointer;
    list-style: none;
    transition: color var(--t-hover) ease-out, background-color var(--t-hover) ease-out;
}

.camra-toggle:hover,
.camra-disclosure > summary:hover,
.camra-disclosure__toggle:hover {
    background-color: var(--c-fill-hover);
    color: var(--c-text);
}

.camra-toggle:focus-visible,
.camra-disclosure > summary:focus-visible,
.camra-disclosure__toggle:focus-visible {
    outline: none;
    box-shadow: var(--ring-focus);
}

.camra-disclosure > summary::-webkit-details-marker {
    display: none;
}

/* the chevron: Lucide's, pointing right while closed and down when open */
.camra-disclosure > summary::before,
.camra-disclosure__chevron {
    content: "";
    flex: none;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: var(--icon-chevron-down) center / 16px 16px no-repeat;
    mask: var(--icon-chevron-down) center / 16px 16px no-repeat;
    transform: rotate(-90deg);
    transition: transform var(--t-hover) ease-out;
}

.camra-disclosure[open] > summary::before,
.camra-disclosure--open > .camra-disclosure__toggle > .camra-disclosure__chevron {
    transform: none;
}

/* a technical detail under a plain sentence (a drawer's row): one quiet line that opens in place */
.camra-disclosure {
    margin-top: var(--s-1);
}

.camra-disclosure > summary {
    margin-inline-start: calc(-1 * var(--s-2));
}

.camra-disclosure[open] > summary {
    margin-bottom: var(--s-1);
}

/* a section of a drawer or a dialog that opens in place (CamraDisclosure): a full-width row under a hairline */
.camra-disclosure--section {
    margin-top: var(--s-3);
    padding-top: var(--s-2);
    border-top: 1px solid var(--c-line-section);
}

.camra-disclosure--section > .camra-disclosure__toggle {
    justify-content: flex-start;
    width: 100%;
    min-height: 40px;
}

.camra-disclosure__body {
    min-width: 0;
    padding: var(--s-2) var(--s-2) 0;
    overflow-wrap: anywhere;
}

.camra-disclosure__body[hidden] {
    display: none;
}

/* the player's "Recording metadata": the storage figures, then the raw JSON in mono on a calm block that wraps */
.playback-recording-metadata .camra-disclosure__body {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.playback-recording-metadata #debug-json-viewer-wrapper {
    max-width: 100%;
    padding: var(--s-3);
    overflow-x: hidden;
    border-radius: var(--r-md);
    background: var(--c-surface-lane);
    box-shadow: var(--hairline);
}

.playback-recording-metadata andypf-json-viewer {
    display: block;
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    overflow-wrap: anywhere;
    white-space: normal;
}

@media (pointer: coarse) {
    .camra-toggle,
    .camra-disclosure__toggle {
        min-height: var(--hit);
    }
}

@media (prefers-reduced-motion: reduce) {
    .camra-disclosure > summary::before,
    .camra-disclosure__chevron {
        transition: none;
    }
}

/* a detector's confidence on a picture's badge ("92%"): a figure for whoever tunes the AI, so a card shows it while a
   mouse rests on it or the keyboard is in it, not on every card at rest (the player keeps it for the object it shows) */
.camra-media-card .camra-confidence {
    display: none;
}

.camra-media-card:hover .camra-confidence,
.camra-media-card:focus-within .camra-confidence {
    display: inline;
}

/* CamraPageHeader's secondary actions: buttons from 600px, words in its ⋮ on a phone (the items and, when the page has
   no overflow of its own, the ⋮ itself are a phone's only; the menu opens in the popover layer, outside the header) */
@media (min-width: 600px) {
    .mud-menu-item.camra-page-header__phone-item,
    .mud-menu.camra-page-header__overflow--phone {
        display: none;
    }
}

/* on a phone every button is a 44px target, a small one too (--btn-h is 44 there); on a touch screen from 600px the
   32px button keeps its look and grows its hit area to 44 */
@media (max-width: 599.98px) {
    .mud-button-root.mud-button.mud-button-root[class*="-size-small"],
    .mud-button-root.mud-button.mud-button-size-small {
        min-height: var(--hit);
    }

}

@media (min-width: 600px) and (pointer: coarse) {
    .mud-button-root.mud-button {
        position: relative;
    }

    .mud-button-root.mud-button::before {
        content: "";
        position: absolute;
        inset: calc((var(--hit) - 100%) / -2) 0;
    }
}

/* primary: the brand fill, dark text; one a view */
.mud-button-filled.mud-button-filled-primary {
    background-color: var(--c-brand);
    color: var(--c-on-brand);
}

.mud-button-filled.mud-button-filled-primary:hover:not(:disabled) {
    background-color: var(--c-brand-hover);
}

/* secondary: the raised surface and the line */
.mud-button-outlined,
.mud-button-filled.mud-button-filled-default,
.mud-button-filled.mud-button-filled-secondary,
.mud-button-filled.mud-button-filled-dark,
.mud-button-filled.mud-button-filled-tertiary,
.mud-button-filled.mud-button-filled-surface {
    background-color: var(--c-surface-raised);
    border: 1px solid var(--c-line-button);
    color: var(--c-text);
    box-shadow: var(--inset-light-soft);
}

.mud-button-outlined:hover:not(:disabled),
.mud-button-filled.mud-button-filled-default:hover:not(:disabled),
.mud-button-filled.mud-button-filled-secondary:hover:not(:disabled),
.mud-button-filled.mud-button-filled-dark:hover:not(:disabled),
.mud-button-filled.mud-button-filled-tertiary:hover:not(:disabled),
.mud-button-filled.mud-button-filled-surface:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--c-surface-raised), var(--c-white) 3%);
    border-color: var(--c-line-strong);
}

/* an outlined button keeps its colour's meaning in its text only: the frame stays the secondary's line (a brand outline
   read as a second primary beside the filled one) */
.mud-button-outlined.mud-button-outlined-primary {
    color: var(--c-brand);
}

.mud-button-outlined.mud-button-outlined-error {
    color: var(--c-danger);
}

.mud-button-outlined.mud-button-outlined-warning {
    color: var(--c-warning);
}

.mud-button-outlined.mud-button-outlined-success {
    color: var(--c-success);
}

.mud-button-outlined.mud-button-outlined-info {
    color: var(--c-info);
}

/* a destructive fill (the confirm of a delete): white on the deeper red (4.6:1) */
.mud-button-filled.mud-button-filled-error {
    background-color: var(--c-danger-fill);
    color: var(--c-on-danger-fill);
}

.mud-button-filled.mud-button-filled-error:hover:not(:disabled) {
    background-color: var(--c-danger);
    color: var(--c-on-fill);
}

.mud-button-filled.mud-button-filled-warning {
    color: var(--c-on-warning);
}

.mud-button-filled.mud-button-filled-success,
.mud-button-filled.mud-button-filled-info {
    color: var(--c-on-fill);
}

/* ghost (Variant.Text): words only, a fill on hover */
.mud-button-text {
    background-color: transparent;
}

.mud-button-text.mud-button-text-default,
.mud-button-text.mud-button-text-inherit,
.mud-button-text.mud-button-text-secondary,
.mud-button-text.mud-button-text-tertiary,
.mud-button-text.mud-button-text-dark {
    color: var(--c-text-3);
}

.mud-button-text.mud-button-text-error {
    color: var(--c-danger);
}

.mud-button-text:hover:not(:disabled) {
    background-color: var(--c-fill-secondary);
}

.mud-button-text.mud-button-text-default:hover:not(:disabled),
.mud-button-text.mud-button-text-inherit:hover:not(:disabled) {
    color: var(--c-text);
}

.mud-button-root.mud-button:disabled,
.mud-button-root.mud-button.mud-disabled {
    color: var(--c-text-disabled) !important;
    box-shadow: none;
    cursor: default;
}

.mud-button-filled.mud-button-root:disabled,
.mud-button-filled.mud-button-root.mud-disabled {
    background-color: var(--c-fill-secondary) !important;
}

/* a disabled outlined button loses its colour's border too ("Test connection" kept a brand outline round grey text) */
.mud-button-outlined:disabled,
.mud-button-outlined.mud-disabled {
    background-color: transparent;
    border-color: var(--c-line-section);
}

/* icon buttons: 32px square (40 on a phone, with a 44px hit area), radius 8, the icon 20px in --c-text-2 and --c-text on
   hover. Not the boxes of a checkbox or a radio and not a switch's thumb: MudBlazor draws those as icon buttons too */
.mud-icon-button:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) {
    width: var(--icon-btn);
    min-width: var(--icon-btn);
    height: var(--icon-btn);
    padding: 0;
    border-radius: var(--r-md);
    color: var(--c-text-2);
    transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out;
}

/* the glyph sits in MudBlazor's label span (and a badge's root); low specificity, so a component's own size wins */
:where(.mud-icon-button:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base)) .mud-icon-root.mud-svg-icon {
    font-size: var(--icon-glyph);
}

.mud-icon-button.mud-icon-button-size-small:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) {
    width: var(--icon-btn-sm);
    min-width: var(--icon-btn-sm);
    height: var(--icon-btn-sm);
}

/* an icon button with words in it (MudBlazor lets a few take a label): its own width */
.mud-icon-button:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base):has(> .mud-typography:not(:only-child)) {
    width: auto;
}

.mud-icon-button.mud-inherit-text {
    color: inherit;
}

.mud-icon-button:hover:not(:disabled):not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) {
    background-color: var(--c-fill-secondary);
    color: var(--c-text);
}

/* a danger icon (Delete in a row) turns red on hover */
.mud-icon-button.mud-error-text:not(:hover) {
    color: var(--c-text-2);
}

.mud-icon-button.mud-error-text:hover:not(:disabled) {
    color: var(--c-danger);
}

.mud-icon-button:disabled {
    color: var(--c-text-disabled);
}

/* the 44px hit area around a small one, without moving the layout */
.mud-icon-button-size-small::before,
.mud-icon-button-size-medium::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, var(--hit));
    height: max(100%, var(--hit));
    transform: translate(-50%, -50%);
}

/* not the switch's thumb button: MudBlazor positions it absolutely over the track, and a relative one pushed the
   track to 0px wide (every switch showed a lone thumb) */
.mud-icon-button:not(.mud-switch-base) {
    position: relative;
}

.mud-icon-button {
    /* MudBlazor clips the button to its disc (overflow: hidden, for the ripple, which is off). That clipped the
       44px hit area above to the visual disc, and a badge on the bell and on Needs action into a teardrop. */
    overflow: visible;
}

/* ── 4. Fields ───────────────────────────────────────────────────────────────────────────────────────────────── */

/* ONE field, whichever Variant a page used: 36px (40 on a phone), the field fill, a 1px line (.12, .22 on hover), radius
   8. Focus: the brand line and a 3px brand ring outside it (the focus indicator). Error: the red line. The label sits
   ABOVE the field in 12px/500 --c-text-2 (never floating inside it, never over a value), the help under it in 12px
   --c-text-muted. */
.mud-input.mud-input-outlined,
.mud-input.mud-input-filled {
    background-color: var(--c-field);
    border-radius: var(--r-md);
    transition: background-color var(--t-hover) ease-out, box-shadow var(--t-hover) ease-out;
}

.mud-input.mud-input-filled {
    box-shadow: var(--ring-input);
}

.mud-input.mud-input-filled:hover:not(.mud-disabled) {
    box-shadow: var(--ring-input-hover);
}

.mud-input.mud-input-filled.mud-input-underline::before,
.mud-input.mud-input-filled.mud-input-underline::after {
    display: none;
}

.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-width: 1px !important;
    border-color: var(--c-line-input);
    border-radius: var(--r-md);
}

.mud-input.mud-input-outlined:hover:not(.mud-disabled):not(:focus-within) .mud-input-outlined-border {
    border-color: var(--c-line-input-hover);
}

.mud-input.mud-input-outlined:focus-within .mud-input-outlined-border {
    border-color: var(--c-brand);
}

.mud-input.mud-input-outlined:focus-within,
.mud-input.mud-input-filled:focus-within,
.mud-input.mud-input-filled.mud-focused {
    background-color: var(--c-field-hover);
    box-shadow: var(--ring-focus);
}

.mud-input.mud-input-outlined.mud-input-error .mud-input-outlined-border {
    border-color: var(--c-danger);
}

.mud-input.mud-input-filled.mud-input-error {
    box-shadow: var(--ring-danger);
}

.mud-input.mud-disabled {
    background-color: transparent;
}

.mud-input.mud-input-outlined.mud-disabled .mud-input-outlined-border {
    border-color: var(--c-line-section);
}

/* the notch the outlined border leaves for a floating label is closed: the label is above the field */
.mud-input.mud-input-outlined > .mud-input-outlined-border legend {
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* the field's height: the text on a 20px line, centred in 36px (40 on a phone) */
.mud-input > input.mud-input-root-outlined,
div.mud-input-slot.mud-input-root-outlined,
.mud-input > input.mud-input-root-filled,
div.mud-input-slot.mud-input-root-filled {
    height: 20px;
    padding: calc((var(--field-h) - 20px) / 2) var(--s-3) !important;
    line-height: 20px;
}

.mud-input.mud-input-outlined.mud-input-adorned-start,
.mud-input.mud-input-filled.mud-input-adorned-start {
    padding-inline-start: var(--s-3);
}

.mud-input.mud-input-outlined.mud-input-adorned-end,
.mud-input.mud-input-filled.mud-input-adorned-end {
    padding-inline-end: var(--s-2);
}

.mud-input > input.mud-input-root-adorned-start,
div.mud-input-slot.mud-input-root-adorned-start {
    padding-inline-start: var(--s-2) !important;
}

.mud-input > input.mud-input-root-adorned-end,
div.mud-input-slot.mud-input-root-adorned-end {
    padding-inline-end: var(--s-1) !important;
}

/* a multi-line field keeps its rows; the padding is the single line's */
.mud-input > textarea.mud-input-root {
    padding: var(--s-2) var(--s-3) !important;
    line-height: 20px;
}

.mud-input.mud-input-outlined:has(> textarea),
.mud-input.mud-input-filled:has(> textarea) {
    padding-block: 0;
}

/* a field's own icons (a search glass, a calendar, the select's chevron, a clear button): 16-18px in --c-text-muted */
.mud-input .mud-input-adornment .mud-icon-root {
    color: var(--c-text-muted);
    font-size: 1.125rem;
}

.mud-input .mud-input-adornment .mud-icon-button:not(.mud-ripple-checkbox) {
    width: var(--adorn-btn);
    min-width: var(--adorn-btn);
    height: var(--adorn-btn);
}

@media (max-width: 599.98px) {
    .mud-input .mud-input-adornment .mud-icon-button:not(.mud-ripple-checkbox) {
        margin-inline: calc(-1 * var(--s-2));
    }
}

/* a picker's calendar button from 600px: its glyph as far in from the field's right edge as a select's chevron (the
   library's -12px end margin held it against the border) */
@media (min-width: 600px) {
    .mud-picker .mud-input-adornment-end > .mud-icon-button:not(.mud-ripple-checkbox) {
        margin-inline-end: -2px;
    }
}

/* the chat's send button inside its field: a 32px button whose glyph is as far in from the right edge as the words
   from the left, centred on the line; quiet while there is nothing to send (AiChatSidebar's AdornmentColor) */
@media (min-width: 600px) {
    .chat-input .mud-input-adornment-end > .mud-icon-button:not(.mud-ripple-checkbox) {
        width: 32px;
        min-width: 32px;
        height: 32px;
        margin-inline-end: -3px;
    }
}

.chat-input .mud-input-adornment-end > .mud-icon-button .mud-icon-root {
    color: currentColor;
}

/* nothing to send, or an answer on its way: the same paper plane, muted, no hover and not pressable */
.chat-input--idle .mud-input-adornment-end > .mud-icon-button,
.chat-input .mud-input.mud-disabled .mud-input-adornment-end > .mud-icon-button {
    cursor: default;
    pointer-events: none;
    background-color: transparent;
}

.chat-input .mud-input.mud-disabled .mud-input-adornment-end > .mud-icon-button {
    opacity: 0.5;
}

/* MudSelect's filled triangle becomes the line chevron of the icon set */
.mud-select .mud-input-adornment-end > .mud-icon-root.mud-input-adornment-icon,
.mud-select .mud-input-adornment-end > .mud-icon-root.mud-select-input {
    background-color: currentColor;
    -webkit-mask: var(--icon-chevron-down) center / 16px 16px no-repeat;
    mask: var(--icon-chevron-down) center / 16px 16px no-repeat;
}

.mud-select .mud-input-adornment-end > .mud-icon-root.mud-input-adornment-icon > *,
.mud-select .mud-input-adornment-end > .mud-icon-root.mud-select-input > * {
    display: none;
}

/* the label: above the field, 12px/500 --c-text-2, never inside it. The control reserves its line, so nothing above is
   covered and a value never runs under it. */
.mud-input-control:has(> .mud-input-control-input-container > .mud-input:is(.mud-input-outlined, .mud-input-filled) ~ label.mud-input-label-inputcontrol) {
    padding-top: 20px;
}

.mud-input-control > .mud-input-control-input-container > .mud-input:is(.mud-input-outlined, .mud-input-filled) ~ label.mud-input-label.mud-input-label-inputcontrol {
    top: 0;
    left: 0;
    max-width: 100%;
    padding: 0 !important;
    color: var(--c-text-2) !important;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    line-height: 16px;
    letter-spacing: normal;
    transform: translate(0, -20px) scale(1) !important;
    transition: color var(--t-hover) ease-out;
}

.mud-input-control > .mud-input-control-input-container > .mud-input ~ label.mud-input-label.mud-input-label-inputcontrol.mud-input-error {
    color: var(--c-danger) !important;
}

.mud-input-control > .mud-input-control-input-container > .mud-input ~ label.mud-input-label.mud-input-label-inputcontrol.mud-disabled {
    color: var(--c-text-disabled) !important;
}

/* the required mark is quiet */
.mud-input-control.mud-input-required > .mud-input-control-input-container > .mud-input-label::after {
    color: var(--c-text-muted);
}

/* with the label above, a field's placeholder shows whenever it is empty (MudBlazor hid it until focus) */
.mud-input-control .mud-input > input.mud-input-root::placeholder,
.mud-input-control .mud-input > textarea.mud-input-root::placeholder {
    color: var(--c-text-muted);
    opacity: 1 !important;
}

/* with the label above the field, MudBlazor's extra room for a floating label goes: a dense field is 4px from what is
   above it, a normal one 8px, labelled or not */
.mud-input-control.mud-input-control-margin-dense.mud-input-outlined-with-label {
    margin-top: 4px;
}

.mud-input-control.mud-input-control-margin-normal.mud-input-outlined-with-label {
    margin-top: 8px;
}

/* a row of fields (a list's toolbar, a filter bar, a table toolbar): the boxes share their bottom edge, and what stands
   beside them (a button, an icon button, a chip) sits on the boxes' centre line */
:is(.camra-list__toolbar, .camra-list__filters, .camra-filters, .camra-filters__fields, .mud-table-toolbar) .mud-input-control,
:is(.camra-list__toolbar, .camra-list__filters, .camra-filters, .camra-filters__fields, .mud-table-toolbar) .mud-input-control.mud-input-control-margin-dense {
    margin-block: 0;
}

:is(.camra-list__toolbar, .camra-list__filters, .camra-list__tools, .camra-filters, .camra-filters__tools, .mud-table-toolbar) > :is(.mud-button-root, .mud-tooltip-root) {
    margin-bottom: calc((var(--field-h) - var(--btn-h)) / 2);
}

:is(.camra-list__toolbar, .camra-list__filters, .camra-list__tools, .camra-filters, .camra-filters__tools, .mud-table-toolbar) > .mud-chip,
:is(.camra-list__filters, .camra-filters__fields) > * > .mud-chip:only-child {
    margin-bottom: calc((var(--field-h) - var(--chip-h)) / 2);
}

/* a Text-variant field WITH a label is a form field (the rule dialog's Cameras): it takes the one field look; an inline
   edit (no label) keeps its underline */
.mud-input-control > .mud-input-control-input-container > div.mud-input.mud-input-text.mud-input-text-with-label {
    margin-top: 0;
    border-radius: var(--r-md);
    background-color: var(--c-field);
    box-shadow: var(--ring-input);
    transition: background-color var(--t-hover) ease-out, box-shadow var(--t-hover) ease-out;
}

.mud-input.mud-input-text.mud-input-text-with-label:hover:not(.mud-disabled) {
    box-shadow: var(--ring-input-hover);
}

.mud-input.mud-input-text.mud-input-text-with-label:focus-within {
    background-color: var(--c-field-hover);
    box-shadow: var(--ring-focus);
}

.mud-input.mud-input-text.mud-input-text-with-label.mud-input-error {
    box-shadow: var(--ring-danger);
}

.mud-input.mud-input-text.mud-input-text-with-label::before,
.mud-input.mud-input-text.mud-input-text-with-label::after {
    display: none;
}

.mud-input.mud-input-text.mud-input-text-with-label > input.mud-input-root,
.mud-input.mud-input-text.mud-input-text-with-label > div.mud-input-slot.mud-input-root {
    height: 20px;
    padding: calc((var(--field-h) - 20px) / 2) var(--s-3) !important;
    line-height: 20px;
}

.mud-input.mud-input-text.mud-input-text-with-label.mud-input-adorned-end {
    padding-inline-end: var(--s-2);
}

.mud-input-control:has(> .mud-input-control-input-container > .mud-input.mud-input-text-with-label ~ label.mud-input-label-inputcontrol) {
    padding-top: 20px;
}

.mud-input-control > .mud-input-control-input-container > .mud-input.mud-input-text-with-label ~ label.mud-input-label.mud-input-label-inputcontrol {
    top: 0;
    left: 0;
    max-width: 100%;
    padding: 0 !important;
    color: var(--c-text-2) !important;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    line-height: 16px;
    letter-spacing: normal;
    transform: translate(0, -20px) scale(1) !important;
}

/* the Text variant: an underline for inline edits */
.mud-input.mud-input-underline:not(.mud-input-filled)::before {
    border-bottom-color: var(--c-line-input-hover);
}

.mud-input.mud-input-underline:not(.mud-input-filled)::after {
    border-bottom-color: var(--c-brand);
}

/* the arrow between a range's two days: text-sized and muted */
.mud-input .mud-range-input-separator {
    font-size: 1rem;
    color: var(--c-text-muted);
}

/* at 320px a range's two dates at 16px need 7px more than their halves have ("Jan 26, 202" cut): a size smaller and a
   narrower arrow there (visual check of chapter 4) */
@media (max-width: 359.98px) {
    .mud-input:has(.mud-range-input-separator) .mud-input-root {
        font-size: 0.9375rem;
    }

    .mud-input .mud-range-input-separator {
        margin-inline: 2px;
    }
}

/* help under the field: 12px --c-text-muted, one line */
.mud-input-control > .mud-input-control-helper-container {
    padding-inline: 0;
    margin-top: var(--s-1);
}

.mud-input-helper-text {
    color: var(--c-text-muted);
    font-size: var(--fs-caption);
    line-height: 1.4;
}

.mud-input-helper-text.mud-input-error {
    color: var(--c-danger);
}

.mud-input-label {
    color: var(--c-text-2);
}

/* iOS zooms the page into any field under 16px */
@media (max-width: 599.98px) {
    .mud-input > input.mud-input-root,
    .mud-input > textarea.mud-input-root,
    div.mud-input-slot.mud-input-root {
        font-size: var(--fs-field);
    }
}

/* checkboxes and radios: 16px boxes with a crisp boundary when off, the brand with a dark mark when on; their 44px hit
   area is the button around the box */
.mud-checkbox,
.mud-radio {
    color: var(--c-text-3);
}

.mud-checkbox .mud-icon-button.mud-ripple-checkbox,
.mud-radio .mud-icon-button.mud-ripple-radio {
    padding: var(--s-2);
    border-radius: var(--r-md);
}

.mud-checkbox .mud-icon-button.mud-ripple-checkbox:hover,
.mud-radio .mud-icon-button.mud-ripple-radio:hover {
    background-color: var(--c-fill-hover);
}

.mud-checkbox .mud-ripple-checkbox > .mud-icon-root,
.mud-radio .mud-ripple-radio > .mud-icon-root {
    font-size: 1.25rem;
    color: var(--c-line-control);
}

/* a checkbox drawn disabled in a skeleton (a list's select column while it loads) has the enabled box's size, so the
   column moves nothing when the real one comes; a real disabled box keeps the icon-button size above */
:is(.camra-skeleton-checkbox .mud-checkbox, .mud-checkbox.camra-skeleton-checkbox) .mud-icon-button.mud-icon-button.mud-disabled {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: var(--s-2);
    border-radius: var(--r-md);
}

/* in a list's selection column the skeleton's box keeps the column's 44px hit area, as the enabled one does
   (CamraList.razor.css, #17527): the header and the rows keep their height when the real boxes come */
.camra-col-select :is(.camra-skeleton-checkbox .mud-checkbox, .mud-checkbox.camra-skeleton-checkbox) .mud-icon-button.mud-icon-button.mud-disabled {
    min-width: 44px;
    min-height: 44px;
}

:is(.camra-skeleton-checkbox .mud-checkbox, .mud-checkbox.camra-skeleton-checkbox) .mud-icon-button.mud-disabled > .mud-icon-root.mud-icon-root {
    font-size: 1.25rem;
}

.mud-checkbox .mud-checked .mud-icon-root,
.mud-checkbox .mud-checkbox-true .mud-icon-root,
.mud-checkbox .mud-checkbox-null .mud-icon-root,
.mud-radio .mud-checked .mud-icon-root {
    color: var(--c-brand);
}

/* a Color="Primary" checkbox carries mud-primary-text when it is OFF too: off is the neutral boundary, never the brand
   (the permission table's empty boxes were all orange) */
.mud-checkbox .mud-primary-text.mud-checkbox-false .mud-icon-root,
.mud-checkbox .mud-checkbox-false .mud-icon-root {
    color: var(--c-line-control);
}

.mud-checkbox .mud-disabled .mud-icon-root,
.mud-radio .mud-disabled .mud-icon-root {
    color: var(--c-text-disabled);
}

/* the words of a checkbox or a radio: 14px --c-text-3, on the box's centre line */
.mud-checkbox > .mud-typography,
.mud-radio > .mud-typography {
    color: var(--c-text-3);
    font-size: var(--fs-body);
    line-height: 1.4;
}

/* the options of a radio group one under the other (inline, "Company ○ Unit ○ Person" read as one sentence) */
.mud-radio-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

/* switches: a minimal pill, the knob INSIDE the track (every size the same): a 36x20 track, a 16px knob inset 2px on
   every side; off a quiet fill with an inner hairline and a muted knob, on the brand with a white knob. The 40px hit
   area is the span's padding, never a bigger picture; no ripple, no halo round the knob; the hover brightens the
   track; the knob slides and the track fades in 150ms (none under reduced motion); disabled is the same shape faded;
   the keyboard's focus rings the track. */
.mud-switch .mud-switch-span.mud-switch-span {
    width: 44px;
    height: 40px;
    padding: 10px 4px;
    overflow: visible;
}

/* its words a step from the track (the knob's old halo gave them that room) */
.mud-switch .mud-switch-span + .mud-typography {
    margin-inline-start: var(--s-1);
}

/* off: a raised fill (two steps over the card) inside the control line, 3.1:1 against the card (a switch's boundary
   is never a faint hairline alone) */
.mud-switch .mud-switch-span .mud-switch-track {
    box-sizing: border-box;
    border: 1px solid var(--c-line-control);
    border-radius: var(--r-pill);
    background-color: var(--c-fill-secondary-hover);
    opacity: 1;
    transition: background-color 150ms ease-out, border-color 150ms ease-out, box-shadow 150ms ease-out, filter 150ms ease-out;
}

.mud-switch .mud-switch-base.mud-checked + .mud-switch-track,
.mud-switch .mud-checked + .mud-switch-track {
    border-color: var(--c-brand);
    background-color: var(--c-brand) !important;
    opacity: 1 !important;
}

.mud-switch .mud-switch-span .mud-switch-base.mud-switch-base {
    top: 12px;
    left: 6px;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    border-radius: var(--r-pill);
    background-color: transparent !important;
    transition: transform 150ms ease-out;
}

.mud-switch .mud-switch-span .mud-switch-base.mud-checked {
    transform: translateX(16px);
}

.mud-switch .mud-switch-base .mud-ripple,
.mud-switch .mud-switch-base::after {
    display: none;
}

.mud-switch .mud-switch-base .mud-switch-thumb-medium,
.mud-switch .mud-switch-base .mud-switch-thumb-small,
.mud-switch .mud-switch-base .mud-switch-thumb-large {
    width: 16px;
    height: 16px;
    background-color: var(--c-text-3);
    box-shadow: var(--shadow-knob);
    transition: background-color 150ms ease-out;
}

.mud-switch .mud-switch-base.mud-checked .mud-switch-thumb-medium,
.mud-switch .mud-switch-base.mud-checked .mud-switch-thumb-small,
.mud-switch .mud-switch-base.mud-checked .mud-switch-thumb-large {
    background-color: var(--c-white) !important;
    box-shadow: none;
}

.mud-switch:not(.mud-disabled):not(.mud-readonly),
.mud-switch:not(.mud-disabled):not(.mud-readonly) > .mud-typography {
    cursor: pointer;
}

/* the hover: off, the track a step lighter in a stronger line (4.6:1); on, the brand a little brighter */
.mud-switch:not(.mud-disabled):not(.mud-readonly):hover .mud-switch-base:not(.mud-checked) + .mud-switch-track {
    border-color: var(--c-text-muted);
    background-color: var(--c-line-strong);
}

.mud-switch:not(.mud-disabled):not(.mud-readonly):hover .mud-switch-base.mud-checked + .mud-switch-track {
    filter: brightness(1.2);
}

.mud-switch:has(.mud-switch-input:focus-visible) .mud-switch-track {
    box-shadow: var(--ring-focus);
}

.mud-switch.mud-disabled .mud-switch-span {
    opacity: 0.4;
}

.mud-switch .mud-switch-base.mud-switch-disabled + .mud-switch-track {
    opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
    .mud-switch .mud-switch-span .mud-switch-track,
    .mud-switch .mud-switch-span .mud-switch-base.mud-switch-base,
    .mud-switch .mud-switch-base [class*="mud-switch-thumb"] {
        transition: none;
    }
}

.mud-switch > .mud-typography {
    color: var(--c-text-3);
    font-size: var(--fs-body);
}

/* a switch whose words are its label's own text (MudBlazor sets them 16px with !important): 14px --c-text-3, as a
   checkbox's (the Heatmaps' "Show zones and areas" read larger than the card's title) */
.mud-switch.mud-switch-label-medium.mud-typography {
    color: var(--c-text-3);
    font-size: var(--fs-body) !important;
}

/* ── 5. Surfaces: papers, cards, tables ──────────────────────────────────────────────────────────────────────── */

/* depth on a dark UI is a surface step and a hairline: elevations 1-8 draw the hairline (the theme draws no shadow) */
.mud-paper.mud-elevation-1,
.mud-paper.mud-elevation-2,
.mud-paper.mud-elevation-3,
.mud-paper.mud-elevation-4,
.mud-paper.mud-elevation-5,
.mud-paper.mud-elevation-6,
.mud-paper.mud-elevation-7,
.mud-paper.mud-elevation-8 {
    box-shadow: var(--card);
}

.mud-paper:not(.mud-paper-square):not(.mud-appbar):not(.mud-drawer):not(.mud-snackbar):not(.mud-alert) {
    border-radius: var(--r-card);
}

.mud-paper.mud-paper-outlined {
    border-color: var(--c-line-section);
}

.mud-card {
    background-color: var(--c-surface);
}

.mud-table {
    background-color: var(--c-surface);
}

.mud-table > .mud-table-container {
    border-radius: inherit;
    /* the box its absolutely placed content is placed in, so the table's own scroll clips it: a header whose title is
       for screen readers only (CamraList's actions column, .camra-visually-hidden) was placed against the page, outside
       this scroll, and its 1px box past a wide table's last column made the page 50-115px wider at 600-767px */
    position: relative;
}

/* A table wider than its card scrolls inside it (until CamraList gives the page priority columns): a shade on the edge
   that has more columns says so, and leaves when that edge is reached (the covers scroll with the content, the
   shades stay with the box). Without it the Vehicle requests' Approve / Reject sat unseen past 768px. */
.mud-table > .mud-table-container {
    background:
        linear-gradient(to right, var(--c-surface) 40%, transparent) left center / 48px 100% no-repeat local,
        linear-gradient(to left, var(--c-surface) 40%, transparent) right center / 48px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, var(--c-line-strong), transparent) left center / 20px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, var(--c-line-strong), transparent) right center / 20px 100% no-repeat scroll;
}

/* a table (MudTable, and CamraList's): a 36px header on the lane in the label role, 52px rows (40 dense) with a line
   between them, EVERY cell centred on the row's middle (a two-line cell beside a one-line one), hover the faint fill */
.mud-table-head .mud-table-cell {
    height: var(--th-h);
    padding-block: 0;
    background-color: var(--c-surface-lane);
    border-bottom: 1px solid var(--c-line-section);
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-label);
    line-height: 1.3;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.mud-table-cell {
    color: var(--c-text);
    font-size: var(--fs-body);
    line-height: 1.45;
    letter-spacing: normal;
    border-bottom-color: var(--c-line-section);
    vertical-align: middle;
    /* break-word, not anywhere: "anywhere" also lowers a cell's min-content width to one letter, and the auto table
       layout then squeezed headers into a letter a line ("P / l / a / t / e" on Vehicles at 768px) */
    overflow-wrap: break-word;
}

/* the rhythm, at the lowest weight that beats MudBlazor's own (a page's own cell rule still wins: the notifications'
   flush cell): cells 12px apart, the first 16px in; rows 52px, dense 40px */
.mud-table-cell {
    padding-inline: var(--s-3);
}

.mud-table-cell:first-child {
    padding-inline-start: var(--s-4);
}

.mud-table-cell:last-child {
    padding-inline-end: var(--s-3);
}

:where(.mud-table-body) .mud-table-cell {
    height: var(--row-h);
    padding-block: var(--s-2);
}

.mud-table-dense .mud-table-row .mud-table-cell {
    padding: var(--s-1) var(--s-3);
}

.mud-table-dense .mud-table-row .mud-table-cell:first-child {
    padding-inline-start: var(--s-4);
}

.mud-table-dense :where(.mud-table-body) .mud-table-cell {
    height: var(--row-h-dense);
}

.mud-table-head .mud-table-cell {
    padding-block: 0;
}

/* a simple table (MudSimpleTable: a vehicle's ownership history, a person's companies and vehicles) reads as a list's
   table: the header on the lane in the label role, rows 44px (40 dense) with a line between them, the cells 12px apart
   and the first 16px in */
.mud-simple-table table {
    width: 100%;
    border-collapse: collapse;
}

.mud-simple-table table * tr > th {
    height: var(--th-h);
    padding: 0 var(--s-3);
    background-color: var(--c-surface-lane);
    border-bottom: 1px solid var(--c-line-section);
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-label);
    line-height: 1.3;
    text-align: start;
    text-transform: uppercase;
    white-space: nowrap;
}

.mud-simple-table table * tr > td {
    height: var(--hit);
    padding: var(--s-2) var(--s-3);
    border-bottom: 1px solid var(--c-line-section);
    color: var(--c-text);
    font-size: var(--fs-body-sm);
    line-height: 1.45;
    vertical-align: middle;
}

.mud-simple-table.mud-table-dense table * tr > td {
    height: var(--row-h-dense);
    padding-block: var(--s-1);
}

.mud-simple-table table * tr > :first-child {
    padding-inline-start: var(--s-4);
}

.mud-simple-table table tbody tr:last-child > td {
    border-bottom: 0;
}

.mud-simple-table.mud-table-hover table tbody tr:hover {
    background-color: var(--c-fill-hover);
}

/* a row with one destination: the whole row follows its link (camra-row-link.js); the link stays the keyboard's */
.mud-simple-table table tbody tr[data-row-link] {
    cursor: pointer;
}

.mud-simple-table time.site-time {
    white-space: nowrap;
}

/* a name in a simple table is a link that keeps the text colour, underlined on hover (G22, as in a list's table) */
.mud-simple-table td a:not(.mud-button-root):not(.camra-plate) {
    color: var(--c-text);
    text-decoration: none;
}

.mud-simple-table td a:not(.mud-button-root):not(.camra-plate):hover {
    text-decoration: underline;
}

/* a switch or a ghost button that opens a cell starts on its column's edge: a switch's track is inset 4px in its hit
   area, and a ghost button's icon sits in its own padding */
.mud-table-cell > .mud-input-control-boolean-input:first-child .mud-switch {
    margin-inline-start: calc(-1 * var(--s-1));
}

.mud-table-cell > .mud-button-text:first-child,
.mud-table-cell > .mud-tooltip-root:first-child > .mud-button-text {
    margin-inline-start: calc(-1 * var(--s-3));
}

.mud-table-cell > .mud-button-text[class*="-size-small"]:first-child,
.mud-table-cell > .mud-tooltip-root:first-child > .mud-button-text[class*="-size-small"] {
    margin-inline-start: calc(-1 * var(--s-2));
}

/* a chip in a cell starts flush with its column's header: MudBlazor's 4px margin moved it off the head's left edge */
.mud-table-cell .mud-chip {
    margin-inline: 0 var(--s-1);
    margin-block: 2px;
}

/* ONE segmented control: a choice of a few, as a lane well with a hairline and the chosen option
   raised in the text colour; never an orange fill. Options are buttons with aria-pressed (or links with
   aria-current). On a phone and on touch each option is a finger's 44px tall. */
.camra-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 2px;
    border-radius: var(--r-md);
    background: var(--c-surface-lane);
    box-shadow: var(--hairline);
    max-width: 100%;
}

.camra-segmented__option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 var(--s-3);
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--c-text-2);
    font: inherit;
    font-size: var(--fs-menu);
    font-weight: var(--fw-medium);
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out;
}

.camra-segmented__option:hover {
    color: var(--c-text);
    background: var(--c-fill-secondary);
}

.camra-segmented__option[aria-pressed="true"],
.camra-segmented__option[aria-current="page"] {
    background: var(--c-surface-raised);
    box-shadow: var(--hairline-strong);
    color: var(--c-text);
}

.camra-segmented__option:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

@media (max-width: 599.98px), (pointer: coarse) {
    .camra-segmented__option {
        min-height: var(--hit);
    }
}

/* on a phone the control is the field's width and its options share it: when they need two lines, the last line's
   options fill it too (a lone "Viewer app" sat at the left of an empty half row) */
@media (max-width: 599.98px) {
    .camra-segmented {
        display: flex;
        width: 100%;
    }

    .camra-segmented__option,
    .camra-segmented > .mud-tooltip-root {
        flex: 1 1 auto;
        min-width: var(--hit);
    }

    /* an option in a tooltip: the tooltip's box is the control's item, the button fills it */
    .camra-segmented > .mud-tooltip-root {
        display: flex;
    }
}

/* a two-line cell: the primary in 14px --c-text, the secondary under it in 12px --c-text-2 */
.camra-cell-2 {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.camra-cell-2__primary {
    color: var(--c-text);
    font-size: var(--fs-body);
    line-height: 1.35;
}

.camra-cell-2__secondary {
    color: var(--c-text-2);
    font-size: var(--fs-caption);
    line-height: 1.35;
}

/* MudBlazor's own sort label (pages not on CamraList yet): the arrow small and quiet until the column is sorted */
.mud-table-sort-label {
    gap: var(--s-1);
}

.mud-table-sort-label .mud-table-sort-label-icon {
    font-size: 0.875rem;
    margin: 0;
}

.mud-table-row:last-child > .mud-table-cell {
    border-bottom-color: transparent;
}

.mud-table-hover .mud-table-container .mud-table-root .mud-table-body .mud-table-row:hover {
    background-color: var(--c-fill-hover);
}

.mud-table-row.mud-selected-item,
.mud-table-row.selected {
    background-color: var(--c-surface-raised);
}

.mud-table-pagination {
    color: var(--c-text-2);
    border-top: 1px solid var(--c-line-section);
    font-size: var(--fs-small);
}

.mud-table-pagination .mud-table-pagination-caption,
.mud-table-pagination .mud-select .mud-input {
    font-size: var(--fs-small);
}

/* the pager's page-size select is a quiet word, not a labelled field */
.mud-table-pagination .mud-input-control {
    padding-top: 0 !important;
}

/* on a phone the pager is two tidy lines, right-aligned: "Rows per page 25" and "1-5 of 5 ‹ ›". MudBlazor stretched
   the page-size select to 133px and left the arrows alone on a line under a gap */
@media (max-width: 599.98px) {
    .mud-table-pagination-toolbar {
        flex-wrap: wrap;
        justify-content: flex-end !important;
        column-gap: var(--s-3);
        row-gap: 0;
        height: auto;
        padding-block: var(--s-1);
    }

    .mud-table-pagination-toolbar > .mud-table-pagination-spacer {
        display: none;
    }

    .mud-table-pagination-toolbar > .mud-select {
        flex: 0 0 auto;
        width: 5.5rem;
    }

    .mud-table-pagination-toolbar .mud-input-control.mud-select.mud-table-pagination-select {
        margin: 0;
        width: 100%;
        max-width: none;
    }

    .mud-table-pagination-toolbar .mud-table-pagination-select .mud-input-slot {
        min-width: 2ch;
        overflow: visible;
    }

    .mud-table-pagination-toolbar > .mud-table-pagination-caption {
        margin: 0;
    }
}

/* A toolbar's content may wrap (the Event Alert History's eight filters): MudBlazor's fixed 56px toolbar centred a
   366px stack of fields over the page header and the first rows at 390px. It grows with its content instead. */
.mud-table-toolbar {
    align-items: flex-end;
    background-color: transparent;
    height: auto;
    min-height: 56px;
    padding-block: var(--s-2);
}

/* on a phone a wrapping row of filters in a toolbar is one full-width field a line (the filter rows' rule), and a
   toolbar of loose fields wraps instead of squeezing them to "Statu…" / a search box one letter wide (Violations,
   Cameras): each field at least 8rem, the icon buttons at their size */
@media (max-width: 599.98px) {
    .mud-table-toolbar {
        flex-wrap: wrap;
        row-gap: var(--s-2);
        column-gap: var(--s-2);
    }

    .mud-table-toolbar > :is(.mud-input-control, .mud-select, .mud-picker) {
        flex: 1 1 8rem;
        min-width: 8rem;
    }

    /* a date range holds two dates: a line of its own, with room for the refresh button beside it */
    .mud-table-toolbar > .mud-picker {
        flex-basis: calc(100% - var(--hit) - var(--s-4));
    }

    .mud-table-toolbar > :is(.mud-input-control, .mud-select),
    .mud-table-toolbar > .mud-select .mud-input-control,
    .mud-table-toolbar > .mud-picker .mud-input {
        max-width: none !important;
    }

    .mud-table-toolbar .flex-wrap > :is(.mud-select, .mud-picker, .mud-input-control, .camera-select-search),
    .mud-table-toolbar .flex-wrap > :is(.mud-select, .mud-picker) .mud-input-control,
    .mud-table-toolbar .flex-wrap > :is(.mud-input-control, .mud-picker) .mud-input {
        flex: 1 1 100%;
        width: 100%;
        max-width: none !important;
    }
}

/* MudTable's own stacking (a row as label/value lines; CamraList replaces it page by page from chapter 3): the label
   keeps its words and the values wrap under it as whole pieces, instead of a long chip squeezing the label to a
   letter a line ("N / a / m / e") or a value breaking mid-word ("entran / ce") */
@media (max-width: 600px) {
    .mud-xs-table .mud-table-cell {
        flex-wrap: wrap;
        row-gap: var(--s-1);
    }

    .mud-xs-table .mud-table-cell::before {
        flex: 0 0 auto;
        max-width: 50%;
    }
}

@media (max-width: 960px) {
    .mud-sm-table .mud-table-cell {
        flex-wrap: wrap;
        row-gap: var(--s-1);
    }

    .mud-sm-table .mud-table-cell::before {
        flex: 0 0 auto;
        max-width: 50%;
    }
}

/* ── 6. Chips, badges, alerts ────────────────────────────────────────────────────────────────────────────────── */

/* a chip is TINTED, never outlined and never a solid fill: its colour at 14 % behind the word, the word in its colour
   at 88 % (towards white); 22px high, radius 6, 12px/500. The colour a page gave it keeps its meaning whatever the
   Variant (detect info, captions success, enhanced warning; motion info, continuous success). Default is the neutral
   chip: the secondary fill with --c-text-3. */
.mud-chip {
    --chip: var(--c-text-2);
    height: var(--chip-h);
    min-height: 0;
    margin: 2px var(--s-1) 2px 0;
    padding: 0 var(--s-2);
    border: 0 !important;
    border-radius: var(--r-sm);
    background-color: color-mix(in srgb, var(--chip) var(--chip-tint), transparent) !important;
    color: color-mix(in srgb, var(--chip) var(--chip-ink), var(--c-white)) !important;
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    line-height: 1;
    letter-spacing: normal;
    white-space: nowrap;
    box-shadow: none;
    transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out;
}

.mud-chip.mud-chip-size-small,
.mud-chip.mud-chip-size-medium {
    height: var(--chip-h);
    border-radius: var(--r-sm);
    font-size: var(--fs-caption);
}

.mud-chip.mud-chip-size-large {
    height: 28px;
    padding: 0 var(--s-3);
    font-size: var(--fs-small);
}

.mud-chip .mud-chip-content {
    gap: var(--s-1);
    line-height: 1;
}

.mud-chip .mud-chip-icon,
.mud-chip .mud-icon-root {
    color: inherit;
    font-size: 0.875rem;
    margin-inline: -2px 0;
}

/* a chip's leading icon stands 4px from its word (it touched it: "⚇Assigned") */
.mud-chip > .mud-chip-icon {
    margin-inline-end: var(--s-1);
}

.mud-chip .mud-chip-close-button {
    margin-inline: 2px -4px;
    color: inherit;
    opacity: 0.7;
}

.mud-chip.mud-chip-color-primary { --chip: var(--c-brand); }
.mud-chip.mud-chip-color-info { --chip: var(--c-info); }
.mud-chip.mud-chip-color-success { --chip: var(--c-success); }
.mud-chip.mud-chip-color-warning { --chip: var(--c-warning); }
.mud-chip.mud-chip-color-error { --chip: var(--c-danger); }

.mud-chip.mud-chip-color-default,
.mud-chip.mud-chip-color-dark,
.mud-chip.mud-chip-color-surface,
.mud-chip.mud-chip-color-secondary,
.mud-chip.mud-chip-color-tertiary,
.mud-chip.mud-chip-color-inherit {
    background-color: var(--c-fill-secondary) !important;
    color: var(--c-text-3) !important;
}

/* a chip that is pressed (a filter, a choice): neutral until chosen (Outlined, whatever its Color), a step brighter on
   hover; chosen (Filled brand, or selected) = the brand tint */
.mud-chip.mud-clickable.mud-chip-outlined:not(.mud-chip-selected) {
    background-color: var(--c-fill-secondary) !important;
    color: var(--c-text-3) !important;
}

.mud-chip.mud-clickable.mud-chip-outlined:not(.mud-chip-selected):hover {
    background-color: var(--c-fill-secondary-hover) !important;
    color: var(--c-text) !important;
}

.mud-chip.mud-clickable:hover {
    --chip-tint: 22%;
}

.mud-chip.mud-clickable.mud-chip-color-default:hover {
    background-color: var(--c-fill-secondary-hover) !important;
    color: var(--c-text) !important;
}

.mud-chip.mud-chip-selected {
    --chip: var(--c-brand);
    background-color: color-mix(in srgb, var(--c-brand) var(--chip-tint), transparent) !important;
    color: color-mix(in srgb, var(--c-brand) var(--chip-ink), var(--c-white)) !important;
}

.mud-chip.mud-disabled {
    opacity: 0.5;
}

/* a chip that is pressed has a 44px hit area */
.mud-chip.mud-clickable {
    position: relative;
    overflow: visible;
}

.mud-chip.mud-clickable::before {
    content: "";
    position: absolute;
    inset: calc((var(--hit) - 100%) / -2) 0;
}

/* on a phone or a touch screen a chip that is pressed (a filter, a choice) is 32px tall, its words at the Small size,
   with the 44px hit area round it: a 22px chip was a hard target to meet with a finger */
@media (max-width: 599.98px), (pointer: coarse) {
    .mud-chip.mud-clickable,
    .mud-chip.mud-clickable.mud-chip-size-small,
    .mud-chip.mud-clickable.mud-chip-size-medium {
        height: var(--chip-h-press);
        padding: 0 var(--s-3);
        font-size: var(--fs-small);
    }
}

/* a small control that stands alone (a way back, a link under a form, a clause of the dashboard's line) gets a finger's
   44px area on a phone or a touch screen, drawn round it without moving anything */
@media (max-width: 599.98px), (pointer: coarse) {
    .camra-hit {
        position: relative;
    }

    /* ::after, so a list card's fact keeps its "·" (its ::before) */
    .camra-hit::after {
        content: "";
        position: absolute;
        inset-block: min(0px, calc((100% - var(--hit)) / 2));
        inset-inline: min(0px, calc((100% - var(--hit)) / 2));
    }
}

/* a badge: a small pill, 11px/600 tabular; the count on the top bar's inbox is the brand with dark figures */
.mud-badge {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--r-pill);
    font-size: var(--fs-label);
    font-weight: var(--fw-semibold);
    line-height: 16px;
    box-shadow: var(--ring-bg) !important;
}

.mud-badge.mud-badge-error {
    color: var(--c-on-fill);
}

/* a notice (MudAlert: billing not set up, a safety notice, a warning on a form): ONE calm row, 44-48px, radius 10. Its
   colour at 6 % over the card with a 1px line of it at 20 %, a 16px line icon in the colour, the title in 13.5/600
   --c-text and the text after it in --c-text-2 on the same line, the action on the right as a small secondary button.
   NEVER a coloured bar down its edge. On a phone the text wraps under the title and the action takes its own line. */
.mud-alert {
    --notice: var(--c-text-2);
    align-items: center;
    min-height: 44px;
    padding: var(--s-2) var(--s-3) var(--s-2) var(--s-4);
    border: 1px solid color-mix(in srgb, var(--notice) var(--notice-line), transparent) !important;
    border-radius: var(--r-lg);
    background-color: color-mix(in srgb, var(--notice) var(--notice-tint), var(--c-surface)) !important;
    box-shadow: none !important;
    color: var(--c-text-2) !important;
    font-size: var(--fs-menu);
    line-height: 1.45;
}

.mud-alert[class*="-info"] { --notice: var(--c-info); }
.mud-alert[class*="-success"] { --notice: var(--c-success); }
.mud-alert[class*="-warning"] { --notice: var(--c-warning); }
.mud-alert[class*="-error"] { --notice: var(--c-danger); }

.mud-alert .mud-alert-position {
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.mud-alert .mud-alert-icon {
    align-self: center;
    margin: 0 var(--s-3) 0 0;
    padding: 0;
    color: var(--notice) !important;
}

.mud-alert .mud-alert-icon .mud-icon-root {
    font-size: 1rem;
}

.mud-alert .mud-alert-message {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    color: var(--c-text-2) !important;
}

.mud-alert .mud-alert-message strong,
.mud-alert .mud-alert-message b,
.mud-alert .camra-notice__title {
    color: var(--c-text);
    font-weight: var(--fw-semibold);
}

.mud-alert .mud-alert-message a:not(.mud-button-root) {
    color: var(--c-text);
    text-decoration: underline;
    text-decoration-color: var(--c-line-strong);
    text-underline-offset: 3px;
}

.mud-alert .mud-alert-close {
    margin-inline-start: var(--s-2);
    padding: 0;
}

.mud-alert .mud-alert-close .mud-icon-button {
    width: 28px;
    min-width: 28px;
    height: 28px;
}

/* the notice's parts (TenantSetupBillingInfoAlert and the notices built like it): the title, the text on its line,
   the action at the end */
.camra-notice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-3);
    min-width: 0;
}

.camra-notice__body {
    flex: 1 1 20rem;
    min-width: 0;
}

.camra-notice__body > * + * {
    margin-inline-start: var(--s-1);
}

.camra-notice__action {
    flex: none;
    margin-inline-start: auto;
}

@media (max-width: 599.98px) {
    .camra-notice__body > * + * {
        display: block;
        margin-inline-start: 0;
    }

    .camra-notice__action {
        margin-inline-start: 0;
    }

    .mud-alert .mud-alert-icon {
        align-self: flex-start;
        margin-top: 2px;
    }
}

/* the rule dialog's "At least": the number keeps a box a finger can meet (its long unit text squeezed it to 16px on a
   360px phone); on a phone the unit takes the rest of the line and wraps in the caption size */
.minimum-count .mud-input > input.mud-input-root {
    min-width: 4rem;
}

@media (max-width: 599.98px) {
    .minimum-count .mud-input > input.mud-input-root {
        flex: 0 0 4.5rem;
    }

    .minimum-count .mud-input-adornment-end {
        flex: 1 1 0;
        min-width: 0;
    }

    .minimum-count .mud-input-adornment-end .mud-input-adornment-text {
        font-size: var(--fs-caption);
        line-height: 1.3;
        white-space: normal;
        text-align: end;
    }
}

/* ── 7. Menus, popovers, tooltips, snackbars ─────────────────────────────────────────────────────────────────── */

/* menus and popovers: the raised surface, radius 10, 4px inside, the float shadow and a line; items 32px (44 on a
   phone and on touch) with a 16px icon and 13.5px words; a danger item is red and last, after a line */
.mud-popover.mud-paper {
    background-color: var(--c-surface-raised);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-float), var(--hairline);
}

.mud-popover .mud-list,
.mud-popover .mud-menu-list {
    padding: var(--s-1);
}

/* a fixed-width popover never runs past a phone's edge */
.mud-popover {
    max-width: calc(100vw - 2 * var(--gutter-app));
}

.mud-list-item,
.mud-menu-item {
    border-radius: var(--r-sm);
    min-height: var(--menu-item-h);
}

.mud-popover .mud-list-item,
.mud-popover .mud-menu-item {
    padding: var(--s-1) var(--s-2);
    color: var(--c-text-3);
    font-size: var(--fs-menu);
}

.mud-popover .mud-list-item .mud-typography,
.mud-popover .mud-menu-item .mud-typography,
.mud-popover .mud-menu-item .mud-menu-item-text {
    font-size: var(--fs-menu);
}

.mud-popover .mud-list-item .mud-list-item-icon,
.mud-popover .mud-menu-item .mud-menu-item-icon {
    min-width: 0;
    margin-inline-end: var(--s-2);
    color: var(--c-text-2);
}

.mud-popover .mud-list-item .mud-list-item-icon .mud-icon-root,
.mud-popover .mud-menu-item .mud-menu-item-icon .mud-icon-root,
.mud-popover .mud-menu-item > .mud-icon-root {
    font-size: 1rem;
}

.mud-list-item:hover,
.mud-menu-item:hover {
    background-color: var(--c-fill-secondary);
    color: var(--c-text);
}

.mud-popover .mud-list-item.mud-selected-item {
    background-color: var(--c-fill-selected);
    color: var(--c-text);
}

.mud-popover .mud-list-item.mud-selected-item .mud-icon-root {
    color: var(--c-brand);
}

/* a danger item (Delete, Remove): red words and icon, after a line at the end of the menu */
.mud-menu-item.camra-menu-danger,
.mud-menu-item.mud-error-text {
    color: var(--c-danger);
}

.mud-menu-item.camra-menu-danger .mud-icon-root,
.mud-menu-item.mud-error-text .mud-icon-root {
    color: var(--c-danger);
}

.mud-popover .mud-divider {
    margin-block: var(--s-1);
    border-color: var(--c-line);
}

.mud-popover .mud-list-subheader {
    padding: var(--s-2) var(--s-2) var(--s-1);
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-label);
    line-height: 1.3;
    text-transform: uppercase;
}

/* a filter's list of names (areas, drawings, tags): never as narrow as its field, so a name stays on one line (an
   ellipsis and its tooltip past the width), and never past the screen's edge */
.mud-popover.camra-select-list {
    min-width: min(320px, calc(100vw - 2 * var(--gutter-app))) !important;
    max-width: min(480px, calc(100vw - 2 * var(--gutter-app))) !important;
}

.camra-select-list .mud-list-item-text,
.camra-select-list .mud-list-item-text > .mud-typography {
    min-width: 0;
}

.camra-select-list .mud-list-subheader {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* a chosen drawing's larger picture, beside its chip */
.area-filter-peek {
    padding: var(--s-2);
}

.area-filter-peek .area-filter-peek__caption {
    display: block;
    max-width: 320px;
    margin-top: var(--s-1);
    overflow: hidden;
    color: var(--c-text-2);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* a tooltip: the raised surface, 12px/500, radius 6 */
.mud-tooltip.mud-tooltip-default {
    padding: var(--s-1) var(--s-2);
    background-color: var(--c-surface-raised);
    color: var(--c-text);
    font-size: var(--fs-caption);
    font-weight: var(--fw-medium);
    line-height: 1.4;
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-float), var(--hairline);
}

.mud-tooltip.mud-tooltip-default.mud-tooltip-arrow::after {
    display: none;
}

/* a snackbar: the raised surface, floating; its meaning is its icon's colour, never a bar down its edge */
.mud-snackbar {
    --notice: var(--c-text-2);
    min-height: 44px;
    background-color: var(--c-surface-raised) !important;
    color: var(--c-text);
    border: 1px solid var(--c-line) !important;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-float);
    font-size: var(--fs-menu);
}

.mud-snackbar[class*="-success"] { --notice: var(--c-success); }
.mud-snackbar[class*="-info"] { --notice: var(--c-info); }
.mud-snackbar[class*="-warning"] { --notice: var(--c-warning); }
.mud-snackbar[class*="-error"] { --notice: var(--c-danger); }

.mud-snackbar .mud-snackbar-icon {
    color: var(--notice) !important;
}

.mud-snackbar .mud-snackbar-icon .mud-icon-root {
    font-size: 1rem;
}

.mud-snackbar .mud-snackbar-content-message {
    color: var(--c-text);
}

/* on a phone the snackbars sit above the bottom bar */
@media (max-width: 599.98px) {
    .mud-snackbar-location-bottom-center,
    .mud-snackbar-location-bottom-left,
    .mud-snackbar-location-bottom-right {
        bottom: calc(var(--bottombar-h) + var(--s-2)) !important;
    }
}

/* ── 8. Dialogs and drawers ──────────────────────────────────────────────────────────────────────────────────── */

/* dialogs: radius 16 on the raised surface, 20/24 inside; the title 16/600 with the close button on the right only; the
   footer's Cancel as ghost then the primary on the right. A form is in sections under 11px label headings */
.mud-dialog {
    background-color: var(--c-surface-raised);
    border-radius: var(--r-window);
    box-shadow: var(--shadow-float), var(--hairline);
}

.mud-dialog .mud-dialog-title {
    padding: var(--s-5) var(--s-6) var(--s-3);
    color: var(--c-text);
    font-size: var(--fs-section);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-section);
    line-height: 1.4;
}

.mud-dialog .mud-dialog-title .mud-typography {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.mud-dialog .mud-dialog-title .mud-button-close {
    top: var(--s-4);
    right: var(--s-4);
}

.mud-dialog .mud-dialog-content {
    padding: var(--s-1) var(--s-6) var(--s-6);
}

.mud-dialog .mud-dialog-actions {
    gap: var(--s-2);
    padding: var(--s-3) var(--s-6) var(--s-5);
}

.mud-dialog .mud-dialog-actions > :not(:first-child) {
    margin-inline-start: 0;
}

/* a dialog whose content scrolls: while there is more under the footer, the footer has a hairline on top, so the
   content never seems to run under it; at the end of the content (or when nothing scrolls) the line goes. The
   content keeps a little room at its end. Without scroll-driven animations the line is always there. */
.mud-dialog .mud-dialog-actions {
    position: relative;
    border-top: 1px solid transparent;
}

@supports (animation-timeline: scroll()) {
    .mud-dialog {
        timeline-scope: --camra-dialog-scroll;
    }

    .mud-dialog .mud-dialog-content {
        scroll-timeline: --camra-dialog-scroll block;
    }

    .mud-dialog .mud-dialog-actions {
        animation: camra-dialog-footer-line linear both;
        animation-timeline: --camra-dialog-scroll;
    }

    /* it follows the scroll, it does not move: reduced motion keeps it (the global rule shortens every animation) */
    @media (prefers-reduced-motion: reduce) {
        .mud-dialog .mud-dialog-actions {
            animation-duration: auto !important;
        }
    }
}

@supports not (animation-timeline: scroll()) {
    .mud-dialog .mud-dialog-actions {
        border-top-color: var(--c-line-section);
    }
}

@keyframes camra-dialog-footer-line {
    0%,
    98% {
        border-top-color: var(--c-line-strong);
    }

    100% {
        border-top-color: transparent;
    }
}

/* a form section's heading inside a dialog, a drawer or a settings card: the label role */
.camra-section-label {
    display: block;
    margin: var(--s-4) 0 var(--s-2);
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-label);
    line-height: 1.3;
    text-transform: uppercase;
}

.mud-overlay .mud-overlay-scrim.mud-overlay-dark {
    background-color: var(--c-scrim);
}

/* Wave 8 F6B story 30: the camera policy preview is a form dialog: at most 560px from 600px (full screen below) */
@media (min-width: 600px) {
    .mud-dialog.camera-policy-preview {
        max-width: 560px;
    }
}

/* Wave 8 F6B story 31: the camera policy editor: at most 880px from 600px (full screen below), its footer sticky */
@media (min-width: 600px) {
    .mud-dialog.camera-policy-editor {
        max-width: 880px;
    }
}

/* a phone: every dialog fills the screen; its title row and its actions stay put while the content scrolls */
@media (max-width: 599.98px) {
    .mud-dialog-container .mud-dialog {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
    }

    .mud-dialog .mud-dialog-title {
        position: sticky;
        top: 0;
        /* over what scrolls under it (an hour strip's bars and figures stand at z-index 2) */
        z-index: var(--z-page-top);
        padding: var(--s-4) var(--s-4) var(--s-3);
        background-color: var(--c-surface-raised);
        border-bottom: 1px solid var(--c-line-section);
        border-radius: 0;
    }

    .mud-dialog .mud-dialog-content {
        padding-left: var(--s-4);
        padding-right: var(--s-4);
        border-radius: 0;
    }

    .mud-dialog .mud-dialog-actions {
        position: sticky;
        bottom: 0;
        z-index: var(--z-page-top);
        padding: var(--s-3) var(--s-4) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
        background-color: var(--c-surface-raised);
        border-top: 1px solid var(--c-line-section);
        border-radius: 0;
    }

    /* the right-hand drawers (details, AI chat) are the whole screen on a phone */
    .mud-drawer.mud-drawer-temporary.mud-drawer-pos-right {
        --mud-drawer-width: 100vw;
    }

    /* the camera dialogs' camera type and lens projection keep their fixed widths from 600px (their inline style); on
       a phone they are full width like every other field of the dialog, and Make and Model stack (chapter 3 check) */
    .mud-dialog .camera-lens-field {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .mud-dialog .camera-make-model {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .mud-dialog .camera-make-model > * {
        width: 100%;
    }
}

.mud-drawer {
    background-color: var(--c-panel);
}

.mud-drawer.mud-drawer-pos-left {
    box-shadow: var(--edge-end);
}

.mud-drawer.mud-drawer-pos-right {
    box-shadow: var(--edge-start);
}

/* a closed drawer is not there: hidden once its slide-out has run (MudBlazor's 225ms), so its controls leave the Tab
   order and the accessibility tree and nothing in it can be focused off screen; it shows at once when it opens (the open
   state has no delay). A mini drawer stays: closed, it is its icon rail. */
.mud-drawer.mud-drawer--closed:not(.mud-drawer-mini) {
    visibility: hidden;
    transition: visibility 0s linear 225ms;
}

/* ── 9. Tabs, progress, skeletons, expansion panels ─────────────────────────────────────────────────────────── */

/* underline tabs: 13.5px/500 in --c-text-2, the current one --c-text over the 2px brand line; a count beside a tab's
   word is mono --c-text-muted. The row has one hairline under it */
.mud-tabs-tabbar {
    background-color: transparent;
    box-shadow: var(--hair-bottom);
}

.mud-tabs-tabbar .mud-tabs-tabbar-inner {
    min-height: 40px;
}

.mud-tab {
    min-width: 0;
    min-height: 40px;
    padding: 0 var(--s-3);
    color: var(--c-text-2);
    font-size: var(--fs-menu);
    font-weight: var(--fw-medium);
    letter-spacing: normal;
    text-transform: none;
    transition: color var(--t-hover) ease-out;
}

@media (max-width: 599.98px), (pointer: coarse) {
    .mud-tab,
    .mud-tabs-tabbar .mud-tabs-tabbar-inner {
        min-height: var(--hit);
    }
}

.mud-tab:hover {
    color: var(--c-text);
    background-color: transparent;
}

.mud-tab.mud-tab-active {
    color: var(--c-text);
}

.mud-tab-slider {
    height: 2px !important;
    background: var(--c-brand);
}

.mud-tab .camra-tab-count {
    margin-inline-start: var(--s-2);
    color: var(--c-text-muted);
    font-family: var(--font-mono);
    font-size: var(--fs-caption);
    letter-spacing: var(--ls-mono);
}

/* a tab row's scroll arrows: quiet, the row's own height */
.mud-tabs-scroll-button .mud-icon-button {
    width: 32px;
    height: 100%;
    border-radius: 0;
}

/* a list refreshing: a 2px brand line at the top of the list */
.mud-progress-linear.mud-progress-linear-color-primary {
    height: 2px;
    background-color: var(--c-fill-hover);
}

.mud-progress-linear .mud-progress-linear-bar {
    background-color: var(--c-brand);
}

.mud-progress-circular {
    color: var(--c-text-2);
}

/* a MudSkeleton is the same pulse as .camra-skeleton (MudBlazor's own wave sweep is off) */
.mud-skeleton {
    background-color: var(--c-skeleton);
    border-radius: var(--r-sm);
}

.mud-skeleton.mud-skeleton-pulse,
.mud-skeleton.mud-skeleton-wave {
    animation: camra-pulse 1.8s ease-in-out infinite;
}

.mud-skeleton.mud-skeleton-wave::after {
    content: none;
    animation: none;
}

.mud-expand-panel {
    background-color: var(--c-surface);
}

.mud-dialog .mud-expand-panel {
    background-color: transparent;
}

/* the New camera dialog's sections (Hardware and lens, Recording and retention, ...) are one framed list: on the
   dialog's own surface they were unframed, so their inset fields read as a misaligned column (chapter 3 check) */
.mud-dialog .camera-sections {
    border: 1px solid var(--c-line);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.mud-dialog .camera-sections > .mud-expand-panel {
    margin: 0 !important;
    border-radius: 0;
    border-bottom: 1px solid var(--c-line-section);
}

.mud-dialog .camera-sections > .mud-expand-panel:last-child {
    border-bottom: 0;
}

/* on a phone a section of a dialog (the camera dialogs' Hardware and lens, Recording and retention, ...) keeps its
   fields in line with the fields above it: MudBlazor's 24px inset on top of the dialog's own lost a field's worth */
@media (max-width: 599.98px) {
    .mud-dialog .mud-expand-panel .mud-expand-panel-header {
        padding-inline: var(--s-3);
    }

    .mud-dialog .mud-expand-panel .mud-expand-panel-content {
        padding-inline: var(--s-3);
    }
}

/* charts (ApexCharts) write Helvetica inline on every axis label, legend and tooltip: the app's Manrope with tabular
   figures instead (an inline style, hence !important) */
.apexcharts-canvas text,
.apexcharts-canvas .apexcharts-legend-text,
.apexcharts-canvas .apexcharts-tooltip,
.apexcharts-canvas .apexcharts-tooltip-title,
.apexcharts-canvas .apexcharts-tooltip-text,
.apexcharts-canvas .apexcharts-xaxistooltip,
.apexcharts-canvas .apexcharts-datalabel {
    font-family: var(--font-sans) !important;
    font-variant-numeric: tabular-nums;
}

/* chapter 4: a chart takes its card's colour (the dark theme paints its own grey behind the SVG, which showed as a box
   on the card; every page had its own copy of this rule), and its tooltip is a popover: the raised surface, the
   hairline, the float shadow, the card radius (CamraChartStyle sets the rest on the options) */
.apexcharts-canvas .apexcharts-svg {
    background: transparent !important;
}

/* an annotation's label (a shape "edited" on the Areas charts) is a dark chip like a tooltip, never ApexCharts' white
   box */
.apexcharts-canvas .apexcharts-xaxis-annotations rect,
.apexcharts-canvas .apexcharts-yaxis-annotations rect {
    fill: var(--c-surface-raised);
    stroke: var(--c-line-strong);
    rx: 4px;
}

.apexcharts-canvas .apexcharts-xaxis-annotations text,
.apexcharts-canvas .apexcharts-yaxis-annotations text {
    fill: var(--c-text-2);
}

/* apexcharts sets a month tick in bold (a font-weight attribute): every tick of a site axis is a day, one weight */
.apexcharts-canvas .apexcharts-xaxis-label {
    font-weight: 400;
}

.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-dark,
.apexcharts-canvas .apexcharts-xaxistooltip,
.apexcharts-canvas .apexcharts-yaxistooltip {
    background: var(--c-surface-raised) !important;
    color: var(--c-text);
    border: 0 !important;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-float) !important;
    font-size: var(--fs-caption);
}

.apexcharts-canvas .apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
    background: var(--c-surface-lane) !important;
    border-bottom: 1px solid var(--c-line-section) !important;
    color: var(--c-text-2);
    font-size: var(--fs-caption) !important;
}

.apexcharts-canvas .apexcharts-legend-text {
    color: var(--c-text-2) !important;
    /* ApexCharts pulls the text 15px back over its marker (margin and padding): it sat on the marker's edge */
    margin-inline-start: 0 !important;
    padding-inline-start: var(--s-1) !important;
}

.apexcharts-canvas .apexcharts-legend.apx-legend-position-top {
    padding-inline: 0;
}

/* ── 9b. Analysis pages (chapter 4): figure grids, chart stacks, media grids ──────────────────────────────────── */

/* The rows of filters on a paper that the analysis pages had until chapter 4 are gone: every page's filters are a
   CamraFilters bar (or CamraList's own). */

/* an analysis page's filter bar, --stack above what it filters */
.analysis-filters {
    margin-bottom: var(--stack);
}

/* a still that did not load (Helpers/StillPicture): the lane surface with the image-off glyph in the muted text, in
   place of a black box or a broken image; what is burnt into the still (a length) stays over it */
.camra-still {
    position: relative;
}

.camra-still.camra-still--failed {
    background: var(--c-surface-lane);
    box-shadow: var(--hairline);
}

.camra-still.camra-still--failed img {
    visibility: hidden;
}

.camra-still.camra-still--failed::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: var(--s-5);
    height: var(--s-5);
    max-width: 40%;
    max-height: 40%;
    background: var(--c-text-muted);
    pointer-events: none;
    -webkit-mask: var(--icon-image-off) center / contain no-repeat;
    mask: var(--icon-image-off) center / contain no-repeat;
}

/* a vehicle's page: its title is the plate, in mono as a plate reads everywhere */
.vehicle-header--plate .camra-page-header__title {
    font-family: var(--font-mono);
    letter-spacing: var(--ls-label);
}

/* until the vehicle is read, its plate is a bar in the title's line (the header keeps its height) */
.vehicle-header--loading .camra-page-header__title::before {
    content: "";
    display: inline-block;
    width: 8rem;
    height: 0.7em;
    border-radius: var(--r-sm);
    background: var(--c-skeleton);
    vertical-align: middle;
    animation: camra-pulse 1.8s ease-in-out infinite;
}

/* a quiet line over a list about what it shows ("No recordings on the selected day. Showing the most recent ones
   instead"): no box (a notice goes under the page header; this belongs to the list it heads), a 16px info glyph in
   the muted text and the words in --c-text-2 */
.camra-list-note {
    display: flex;
    align-items: flex-start;
    gap: var(--s-2);
    margin: 0 0 var(--s-3);
    color: var(--c-text-2);
    font-size: var(--fs-small);
    line-height: 1.4;
}

.camra-list-note .mud-icon-root {
    flex: none;
    width: var(--s-4);
    height: var(--s-4);
    margin-top: 1px;
    color: var(--c-text-muted);
}

/* a line under a chart about it ("Kitchen was redrawn here …") */
.camra-chart-note {
    margin: var(--s-2) 0 0;
    color: var(--c-text-2);
    font-size: var(--fs-caption);
    line-height: 1.4;
}

/* Analytics' figures: what each is of on a line, then its share of all detections as a row of squares at the tile's
   foot (the tiles of a row are one height, so the rows of squares line up) */
.analytics-figures .camra-stat__detail {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--s-3);
}

.analytics-figure-share {
    margin-top: auto;
}

/* figures (CamraStatTile): two to a row on a phone, as many as fit from 600px, all one height per row */
.camra-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
}

@media (min-width: 600px) {
    .camra-stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
        gap: var(--s-4);
    }

    /* four figures: two by two until they fit on one line, never three and one */
    .camra-stat-grid--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .camra-stat-grid--four {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* a page's sections one under the other, --stack apart (the charts' cards, the tables) */
.camra-stack {
    display: flex;
    flex-direction: column;
    gap: var(--stack);
    min-width: 0;
}

/* two cards side by side from 960px (the vehicle traffic figures beside the most seen vehicles) */
.camra-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--stack);
}

@media (min-width: 960px) {
    .camra-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* a section's head inside a page or a tab (chapter 5: a company's people, vehicles and parking, a unit's residents):
   the title in the Card title role (an h2 or h3), a line under it in --c-text-2, the section's actions at the end; the
   actions wrap under the text on a narrow screen and never push the page sideways */
.camra-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
    min-width: 0;
}

.camra-section-head__text {
    flex: 1 1 16rem;
    min-width: 0;
}

.camra-section-head__title {
    margin: 0;
    color: var(--c-text);
    font-size: var(--fs-card-title);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-card-title);
    line-height: 1.3;
}

.camra-section-head__text > p {
    margin: var(--s-1) 0 0;
    max-width: 72ch;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    line-height: 1.5;
}

.camra-section-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
}

/* pictures in a grid (CamraMediaCard): one column on a phone, then as many 16rem columns as fit */
.camra-media-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    .camra-media-grid {
        grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
        gap: var(--s-4);
    }
}

/* the cards of a row are one height and their footers (the feedback thumbs, a caption) on one line: the item passes
   the row's height to its card, the card's body takes what is left under the picture, and the footer sits at its foot */
.camra-media-grid > li {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.camra-media-grid > li > .camra-media-card {
    flex: 1 1 auto;
}

/* CamraMediaCardSkeleton (docs/design-system.md "CamraSkeleton"): each skeleton at the size of what it stands for in
   CamraMediaCard; global, since the card is the skeleton's only element */
.camra-media-skeleton__picture {
    height: 100%;
}

.camra-media-skeleton__badge {
    display: flex;
    align-items: center;
    min-height: var(--s-8);
    padding: 0 var(--s-2);
}

/* a MudSelect's first paint: the prerender draws its value in an <input> (as wide as 20 characters), the live select in
   a <div> (as wide as its value); the input is sized by its value too, so a row of selects in a filter bar keeps its
   widths when the page goes live (docs/design-system.md "CamraSkeleton") */
.mud-select input.mud-input-slot {
    field-sizing: content;
}

/* ghost text (CamraSkeleton's way for text whose size must be exact): the real text in transparent ink, a bar of
   0.7em behind each line of it, pulsing with the other skeletons */
.camra-skeleton-ghost,
.camra-skeleton-ghost * {
    color: transparent !important;
    pointer-events: none;
}

.camra-skeleton-ghost {
    animation: camra-pulse 1.8s ease-in-out infinite;
}

/* Windows high contrast replaces every colour, the transparent ink too: there the ghost's text and the skeletons keep
   the app's own colours (no made-up text drawn as real text, the bars still visible) */
@media (forced-colors: active) {
    .camra-skeleton-ghost,
    .camra-skeleton-ghost *,
    .camra-skeleton,
    .camra-list__select-skeleton {
        forced-color-adjust: none;
    }
}

.camra-skeleton-ghost :is(.site-time, .camra-skeleton-ghost__text),
.camra-skeleton-ghost:is(.camra-fact) :is(.camra-fact__figure, .camra-fact__word) {
    background: linear-gradient(var(--c-skeleton), var(--c-skeleton)) 0 50% / 100% 0.7em no-repeat;
    border-radius: var(--r-sm);
}

/* the facts' lines fill the facts' row (their "·" separator stays off: the line is the fact) */
.camra-media-skeleton__lines {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%;
    margin-inline-start: var(--s-5);
}

.camra-media-skeleton__lines::before {
    content: none !important;
}

.camra-media-skeleton__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: var(--hit);
}

.camra-media-skeleton__caption {
    flex: 1 1 100%;
    min-width: 0;
}

.camra-media-skeleton__thumbs {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-inline-start: auto;
}

/* the thumbs are 44px targets on a touch screen and a phone (FeedbackThumbs) */
@media (pointer: coarse), (max-width: 599.98px) {
    .camra-media-skeleton__thumbs {
        min-height: var(--hit);
    }

    .camra-media-skeleton__thumbs .camra-skeleton {
        width: 88px !important;
    }
}

/* a CamraStatus's place in a loading card (CamraList.LoadingCard): its dot and its word's lines at the status's own
   size (13px at 1.4), so a status that wraps to two lines on a narrow card takes its two lines */
.camra-skeleton-status {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--s-2);
    min-width: 0;
    font-size: var(--fs-small);
    line-height: 1.4;
}

.camra-skeleton-status > .camra-skeleton--circle {
    margin-block-start: calc((1.4em - 8px) / 2);
}

/* a status of several lines takes the card's width (its lines' widths are of it) */
.camra-skeleton-status--wide {
    display: flex;
    flex: 1 1 100%;
    width: 100%;
}

/* a skeleton in a finger's 44px box: a small button's bar where the button itself is a 44px target (a card's Resolve,
   its Notify me) */
.camra-skeleton-target {
    display: inline-flex;
    align-items: center;
    min-height: var(--hit);
}

/* ── 10. The console shell (MainLayout, CamraTopBar, CamraSideMenu, CamraBottomBar) ─────────────────────────── */

/* the site switcher: 18rem in the side menu; in the phone's site sheet the sheet's whole width, as its other fields */
.site-switcher {
    width: 100%;
    max-width: 18rem;
}

.camra-sheet .site-switcher {
    max-width: none;
}

/* #18096: a tenant's heading in the site picker's list (another tenant, another signed-in account) */
.site-switcher-group {
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    line-height: 1.3;
    padding-top: 12px;
    padding-bottom: 4px;
    white-space: normal;
}

/* the glass bar of every shell: the page black at 72 % over what scrolls under it, blurred, a hairline under it */
.mud-appbar {
    background-color: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--hair-bottom);
    color: var(--c-text);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .mud-appbar {
        background-color: var(--glass-bg-solid);
    }
}

.camra-wordmark {
    font-size: var(--fs-wordmark);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-wordmark);
    line-height: 1;
    color: var(--c-text);
    white-space: nowrap;
}

.camra-iconbtn {
    display: inline-grid;
    place-items: center;
    width: var(--bar-btn);
    height: var(--bar-btn);
    padding: 0;
    color: var(--c-text-2);
    background: none;
    border: 0;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out;
}

.camra-iconbtn:hover {
    background-color: var(--c-fill-secondary);
    color: var(--c-text);
}

/* the top bar: 56px, the glass kept, a line under it; its icon buttons are 36px (40 on a phone, a 44px hit area) */
.camra-topbar .mud-toolbar-appbar {
    gap: var(--s-2);
    min-height: var(--topbar-h);
    height: var(--topbar-h);
    padding-inline: var(--s-3) var(--s-4);
}

.camra-topbar .mud-icon-button:not(.mud-ripple-checkbox):not(.mud-switch-base),
.camra-topbar .camra-iconbtn {
    width: var(--bar-btn);
    min-width: var(--bar-btn);
    height: var(--bar-btn);
}

.camra-topbar .camra-iconbtn .mud-icon-root,
.camra-topbar .mud-icon-button .mud-icon-root {
    font-size: 1.25rem;
}

.camra-iconbtn {
    position: relative;
}

.camra-iconbtn::before {
    content: "";
    position: absolute;
    inset: calc((var(--hit) - 100%) / -2);
}

.camra-topbar__brand {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    flex: none;
}

/* the logo and the wordmark are one link to the Dashboard */
.camra-topbar__home {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    min-height: var(--hit);
    padding: 0 var(--s-1);
    border-radius: var(--r-md);
    color: inherit;
    text-decoration: none;
}

.camra-topbar__logo {
    display: block;
    width: 24px;
    height: 24px;
}

.camra-topbar__phone {
    display: none;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

.camra-topbar__title {
    overflow: hidden;
    color: var(--c-text);
    font-size: var(--fs-card-title);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-card-title);
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.camra-topbar__site {
    display: flex;
    align-items: flex-end;
    min-width: 0;
    color: var(--c-text-2);
    font-size: var(--fs-caption);
    font-variant-numeric: tabular-nums;
}

/* the site line under the title is a 44px button: it reaches up behind the (not interactive) title and down to the
   bar's edge, and its words sit at its foot, where the line was */
.camra-topbar__site-button {
    display: inline-flex;
    align-items: flex-end;
    gap: var(--s-1);
    min-width: 0;
    min-height: var(--hit);
    margin-block: calc(var(--s-4) * -1) calc(var(--s-1) * -1);
    padding: 0 0 var(--s-1);
    color: inherit;
    font: inherit;
    background: none;
    border: 0;
    border-radius: var(--r-xs);
    cursor: pointer;
}

.camra-topbar__site-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.camra-topbar__site .site-clock {
    margin: 0 !important;
    padding-block-end: var(--s-1);
    padding-inline-start: var(--s-2);
    color: var(--c-text-2);
    font-size: var(--fs-caption);
}

.camra-topbar__site .site-clock::before {
    content: "\00B7";
    content: "\00B7" / "";
    padding-inline-end: var(--s-2);
}

.camra-topbar__actions {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    flex: none;
}

.camra-topbar__clock .site-clock {
    color: var(--c-text-2);
}

.camra-topbar .mud-icon-button {
    color: var(--c-text-2);
}

.camra-topbar .mud-icon-button:hover {
    color: var(--c-text);
}

.camra-account-button {
    display: inline-grid;
    place-items: center;
    width: var(--bar-btn);
    height: var(--bar-btn);
    padding: 0;
    background: none;
    border: 0;
    border-radius: var(--r-pill);
    cursor: pointer;
}

.camra-account-button__disc {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: var(--r-pill);
    background: var(--c-surface-raised);
    box-shadow: var(--ring-button);
    color: var(--c-text-3);
    font-size: var(--fs-label);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-label);
}

.camra-account-button:hover .camra-account-button__disc {
    box-shadow: var(--ring-input-hover);
}

.camra-account-popover {
    padding: var(--s-4);
    width: 300px;
}

.camra-logout {
    margin-top: var(--s-2);
}

/* #17928 (Accounts S1): the tab's account named beside the disc while several are signed in, and the switcher */
.camra-account-button:has(.camra-account-button__name) {
    width: auto;
    gap: var(--s-2);
    grid-auto-flow: column;
    padding-inline-end: var(--s-2);
}

.camra-account-button__name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--c-text-2);
    font-size: var(--fs-label);
}

.camra-accounts {
    margin-bottom: var(--s-3);
    max-width: 18rem;
}

.camra-accounts__switch {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    width: 100%;
    min-height: 44px;
    padding: var(--s-1) var(--s-2);
    background: none;
    border: 0;
    border-radius: var(--r-pill);
    cursor: pointer;
    text-align: start;
}

.camra-accounts__who {
    display: grid;
    min-width: 0;
}

.camra-accounts__name,
.camra-accounts__email {
    overflow-wrap: anywhere;
}

.camra-accounts__email {
    color: var(--c-text-3);
    font-size: var(--fs-label);
}

.camra-logout__button {
    width: 100%;
    font: inherit;
    text-align: start;
    background: none;
    border: 0;
    cursor: pointer;
}

/* below 600px: title, site and bell; the menu, logo, chat and account move to the More sheet */
@media (max-width: 599.98px) {
    .camra-topbar__brand,
    .camra-topbar__clock,
    .camra-topbar__wide {
        display: none !important;
    }

    .camra-topbar__phone {
        display: flex;
    }

    .camra-topbar .mud-toolbar-appbar {
        padding-inline: var(--gutter-app) var(--s-1);
    }
}

/* the content of the console */
.camra-main {
    display: flex;
    flex-direction: column;
}

.camra-content {
    width: 100%;
    max-width: calc(var(--content-max) + 2 * var(--gutter-app));
    margin-inline: auto;
    padding: var(--page-top) var(--gutter-app) var(--s-12);
    outline: none;
}

/* the side menu: 248px on the panel with a line on its right; group labels in the label role; items 34px, radius 8,
   an 18px icon in --c-text-2 and 13.5px/500 words in --c-text-3; the current item keeps the warm wash with its words
   in --c-text and its icon in the brand; sub-items indented, no bullets */
.camra-sidemenu.mud-drawer {
    background-color: var(--c-panel);
}

.camra-nav {
    display: flex;
    flex-direction: column;
    padding: var(--s-3) var(--s-3) var(--s-6);
}

.camra-nav--sheet {
    padding: 0;
}

.camra-nav__site {
    padding: var(--s-1) var(--s-1) var(--s-2);
    margin-bottom: var(--s-3);
}

.camra-nav__menu.mud-navmenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.camra-nav__section + .camra-nav__section,
.camra-more__section {
    margin-top: var(--s-5);
}

.camra-nav__label {
    padding: 0 var(--s-3) var(--s-2);
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-label);
    line-height: 1.3;
    text-transform: uppercase;
}

.camra-nav .mud-navmenu .mud-nav-link,
.camra-more__section .mud-navmenu .mud-nav-link {
    min-height: 34px;
    margin: 0;
    padding: var(--s-1) var(--s-3);
    border-radius: var(--r-md);
    color: var(--c-text-3);
    font-size: var(--fs-menu);
    font-weight: var(--fw-medium);
    line-height: 1.4;
    align-items: center;
    transition: background-color var(--t-hover) ease-out, color var(--t-hover) ease-out;
}

.camra-nav .mud-navmenu .mud-nav-link .mud-nav-link-text,
.camra-more__section .mud-navmenu .mud-nav-link .mud-nav-link-text {
    margin-inline-start: var(--s-3);
    font-weight: inherit !important;
}

@media (max-width: 599.98px), (pointer: coarse) {
    .camra-nav .mud-navmenu .mud-nav-link,
    .camra-more__section .mud-navmenu .mud-nav-link {
        min-height: var(--hit);
    }
}

.camra-nav--sheet .mud-navmenu .mud-nav-link,
.camra-more__section .mud-navmenu .mud-nav-link {
    min-height: 48px;
}

.camra-nav .mud-navmenu .mud-nav-link .mud-nav-link-icon,
.camra-more__section .mud-navmenu .mud-nav-link .mud-nav-link-icon {
    color: var(--c-text-2);
    font-size: 1.125rem;
}

.camra-nav .mud-navmenu .mud-nav-link:hover:not(.mud-nav-link-disabled):not(.active),
.camra-more__section .mud-navmenu .mud-nav-link:hover:not(.mud-nav-link-disabled):not(.active) {
    background-color: var(--c-fill-secondary);
    color: var(--c-text);
}

.camra-nav .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled),
.camra-more__section .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: var(--c-fill-selected);
    color: var(--c-text);
    font-weight: var(--fw-medium) !important;
}

.camra-nav .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon,
.camra-more__section .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: var(--c-brand);
}

/* VK 2 Nov 2026: a titled section's header folds it (side menu only; the More sheet keeps every section open). The
   header is the Label role, as a 44px-tall button with a chevron; the section of the current page cannot fold. */
.camra-nav__fold {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: var(--hit);
    margin: calc(var(--s-2) * -1) 0 0;
    padding-top: var(--s-2);
    border: 0;
    border-radius: var(--r-md);
    background: none;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
}

/* a mouse: the header is as tall as its words, so the sections keep the menu's quiet rhythm */
@media (pointer: fine) and (min-width: 600px) {
    .camra-nav__fold {
        min-height: calc(var(--s-6) + var(--s-1));
        margin-top: 0;
        padding-top: 0;
    }
}

.camra-nav__fold .camra-nav__fold-icon {
    width: var(--s-4);
    height: var(--s-4);
    font-size: var(--s-4);
    color: var(--c-text-muted);
}

.camra-nav__fold:hover:not([aria-disabled="true"]) {
    color: var(--c-text-2);
}

.camra-nav__fold[aria-disabled="true"] {
    cursor: default;
}

.camra-nav__fold:focus-visible {
    outline: none;
    box-shadow: var(--ring-focus);
}

.camra-nav__fold-icon {
    transition: transform var(--t-hover) var(--e-enter);
}

.camra-nav__fold[aria-disabled="true"] .camra-nav__fold-icon {
    visibility: hidden;
}

.camra-nav__fold--folded .camra-nav__fold-icon {
    transform: rotate(-90deg);
}

@media (prefers-reduced-motion: reduce) {
    .camra-nav__fold-icon {
        transition: none;
    }
}

/* the footer line under the sections: Desktop viewer and the storage figure, a hairline above */
.camra-nav__section.camra-nav__footer {
    padding-top: var(--s-4);
    border-top: 1px solid var(--c-line);
}

.camra-nav .mud-navmenu .mud-nav-group .mud-collapse-container .mud-nav-link .mud-nav-link-icon {
    font-size: 1rem;
}

.camra-nav__usage {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s-2);
    padding: var(--s-1) var(--s-3);
    color: var(--c-text-muted);
    font-size: var(--fs-caption);
}

.camra-nav__usage-value {
    color: var(--c-text-2);
    font-weight: var(--fw-semibold);
    font-variant-numeric: tabular-nums;
}

.camra-more__account {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    padding: var(--s-2) 0 var(--s-4);
    border-bottom: 1px solid var(--c-line);
    margin-bottom: var(--s-4);
}

/* the tenant and site switchers fill the sheet (their own 18rem cap is for the desktop popover) */
.camra-more__account > div[style] {
    max-width: none !important;
}

/* Billing and Manage tenants (TenantSwitcher's links): rows like the menu's, not 8px further apart and indented
   (in the sheet and in the desktop account popover alike) */
.camra-more__account .mud-nav-item,
.camra-account-popover .mud-nav-item {
    margin-top: 0 !important;
}

/* two links in a row sit together, as menu rows do (the block's 12px gap is for the switchers) */
.camra-more__account > .mud-nav-item + .mud-nav-item {
    margin-top: calc(-1 * var(--s-3)) !important;
}

.camra-more__account .mud-nav-link {
    min-height: 48px;
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-md);
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-medium);
    align-items: center;
}

.camra-more__account .mud-nav-link .mud-nav-link-icon {
    color: var(--c-text-muted);
    font-size: 1.25rem;
}

.camra-more__account .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: var(--c-fill-selected);
    color: var(--c-text);
}

/* the phone's bottom bar */
.camra-bottombar {
    display: none;
}

@media (max-width: 599.98px) {
    .camra-shell .camra-main {
        padding-bottom: var(--bottombar-h);
    }

    .camra-bottombar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: var(--z-bottombar);
        display: flex;
        align-items: stretch;
        height: var(--bottombar-h);
        padding: 0 var(--s-1) env(safe-area-inset-bottom, 0px);
        background-color: var(--glass-bg);
        -webkit-backdrop-filter: var(--glass-blur);
        backdrop-filter: var(--glass-blur);
        box-shadow: var(--edge-top);
    }

    /* no side menu on a phone: the bottom bar and More replace it */
    .camra-sidemenu.mud-drawer {
        display: none;
    }

    /* G8: nor its scrim (the menu opened as an overlay at tablet width stayed "open" when the window narrowed, and its
       dark scrim covered every page) */
    .camra-shell .mud-drawer-overlay-responsive {
        display: none;
    }
}

.camra-bottombar__tab {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s-1);
    min-width: var(--hit);
    min-height: var(--hit);
    padding: var(--s-1) 0;
    color: var(--c-text-muted);
    font: inherit;
    text-decoration: none;
    background: none;
    border: 0;
    border-radius: var(--r-md);
    cursor: pointer;
}

.camra-bottombar__tab:hover {
    color: var(--c-text);
}

.camra-bottombar__tab--current {
    color: var(--c-brand);
}

.camra-bottombar__label {
    max-width: 100%;
    overflow: hidden;
    font-size: var(--fs-label);
    font-weight: var(--fw-semibold);
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.camra-bottombar__icon.mud-icon-root {
    font-size: 1.5rem;
}

/* the AI chat drawer: 420px from 600px (the theme's right drawer width), the whole screen on a phone (section 8) */
.camra-chat-drawer.mud-drawer {
    background-color: var(--c-panel);
}

/* the top-bar popovers (the bell, Needs action) keep within a phone's width */
.top-bar-popover {
    max-width: calc(100vw - 2 * var(--gutter-app));
}

/* #17511: a thumbnail's hover preview (PreviewOnHover + js/hover-preview.js). The wrapper takes no box of its own; the
   layer lies exactly over the picture, invisible until its first frame is ready, and takes no pointer (a click still
   opens the player). No controls, no icons: a thumbnail's own play icon gives way while the preview plays. */
.preview-on-hover {
    display: contents;
}

.hover-preview-layer {
    position: absolute;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    z-index: 0;
}

.hover-preview-layer.hover-preview-shown {
    opacity: 1;
}

.hover-preview-layer.hover-preview-letterbox {
    background: black;   /* the video's own letterbox, as the player's stage */
}

.hover-preview-layer video,
.hover-preview-layer canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* a de-warped preview draws on its canvas; its video only feeds the shader */
.hover-preview-layer video.hover-preview-source {
    opacity: 0;
}

/* the loop's standby (js/hover-preview.js "the seam"): the second player waits on the window's first frame, decoded,
   and is shown at the seam instead of a seek back */
.hover-preview-layer video.hover-preview-standby {
    opacity: 0;
}

/* #17511: the loop's progress, a thin line along the thumbnail's bottom edge (on the card that clips a picture framed on
   its object, else on the layer over the picture). Filled by js/hover-preview.js from the video's time inside the
   server's window, in the brand colour (a progress is the brand's, never Warning); no transition of its own, takes no
   pointer, aria-hidden; shown with the video. "Reduce motion" starts no preview; it is hidden there all the same. */
.hover-preview-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--c-scrim);
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}

.hover-preview-progress.hover-preview-shown {
    opacity: 1;
}

.hover-preview-progress__fill {
    height: 100%;
    background: var(--c-brand);
    transform: scaleX(0);
    transform-origin: left center;
}

@media (prefers-reduced-motion: reduce) {
    .hover-preview-progress {
        display: none;
    }
}

/* a media card (Detections, sightings, unmatched plates): its Play disc and the best shot's box, drawn on the still,
   give way to the moving picture */
.hover-preview-playing .camra-media-card__play-disc,
.hover-preview-playing .recording-thumb-play {
    opacity: 0 !important;
}

/* #17516: an incident's picture in a notification row (Shared/Incidents/NotificationIncidentPicture: the bell and both
   Notifications pages), framed on its alerting objects (IncidentObjectPicture), never wider than the row */
.object-picture.notification-incident-picture {
    max-width: min(240px, 100%);
    margin-top: 8px;
    border-radius: 4px;
}

/* #17819: the picture of an open alert (a Needs action row, the dashboard's Needs you card) is a button that opens the
   alert in place; it reads as the picture alone and is never wider than its row (no sideways scroll on a phone) */
.notification-incident-picture-button {
    display: block;
    width: 240px;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: start;
}

.notification-incident-picture-button:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

/* ── 11. Chapter 6: account settings, settings pages, the Simple shell, legal pages ─────────────────────────────── */

/* My doors' recent events: one box of rows divided by a hairline (it was a bulleted run of text whose bullets hung
   past the page's gutter); the door and what happened, its moment under it in the caption size */
.my-doors-recent {
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: var(--r-card);
    background: var(--c-surface);
    box-shadow: var(--card);
}

.my-doors-recent-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--s-3) var(--card-pad);
    font-size: var(--fs-body-sm);
}

.my-doors-recent-row + .my-doors-recent-row {
    border-top: 1px solid var(--c-line-section);
}

.my-doors-recent-what {
    color: var(--c-text-2);
}

.my-doors-recent-door {
    color: var(--c-text);
    font-weight: var(--fw-medium);
}

.my-doors-recent-when {
    color: var(--c-text-muted);
    font-size: var(--fs-caption);
}

/* Manage your account (ManageLayout, static SSR): the settings menu beside the page's card from 960px; below that the
   menu is a wrap of pills over the card (no sheet: these pages have no circuit), the current one in brand */
.camra-settings__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--stack);
    align-items: start;
}

.camra-settings__body {
    min-width: 0;
    padding: var(--card-pad);
    background: var(--c-surface);
    border-radius: var(--r-card);
    box-shadow: var(--hairline);
}

.camra-settings__menu.mud-navmenu {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}

.camra-settings__menu .mud-nav-item {
    width: auto;
}

.camra-settings__menu .mud-nav-link {
    min-height: var(--hit);
    padding: var(--s-2) var(--s-4) var(--s-2) var(--s-3);
    border-radius: var(--r-pill);
    box-shadow: var(--hairline);
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-medium);
    white-space: nowrap;
}

.camra-settings__menu .mud-nav-link .mud-nav-link-icon {
    font-size: 1.25rem;
    color: var(--c-text-muted);
}

.camra-settings__menu .mud-nav-link .mud-nav-link-text {
    margin-inline-start: var(--s-2);
}

.camra-settings__menu .mud-nav-link:hover:not(.active) {
    background-color: var(--c-fill-hover);
    color: var(--c-text);
}

/* the current page: the warm wash with its icon in the brand, as the side menu's current item (no outline) */
.camra-settings__menu .mud-nav-link.active {
    background-color: var(--c-fill-selected);
    color: var(--c-text);
}

.camra-settings__menu .mud-nav-link.active .mud-nav-link-icon {
    color: var(--c-brand);
}

/* a phone: the menu is one fold that names the page you are on; opened, its entries are 44px rows (the pills from
   600px, the menu beside the card from 960px) */
.camra-settings__fold {
    border-radius: var(--r-card);
    box-shadow: var(--hairline);
    background: var(--c-surface);
}

.camra-settings__summary {
    min-height: var(--hit);
    display: flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--card-pad);
    cursor: pointer;
    list-style: none;
}

.camra-settings__summary::-webkit-details-marker {
    display: none;
}

.camra-settings__summary::after {
    content: "";
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    margin-inline: auto 0.25rem;
    border-right: 2px solid var(--c-text-2);
    border-bottom: 2px solid var(--c-text-2);
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--t-hover) ease;
}

.camra-settings__fold[open] > .camra-settings__summary::after {
    transform: rotate(-135deg) translateY(-2px);
}

.camra-settings__summary-label {
    color: var(--c-text-muted);
    font-size: var(--fs-body-sm);
}

.camra-settings__summary-current {
    color: var(--c-text);
    font-weight: var(--fw-semibold);
}

.camra-settings__fold .camra-settings__menu.mud-navmenu {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: var(--s-1);
    padding: 0 var(--s-2) var(--s-2);
}

.camra-settings__fold .camra-settings__menu .mud-nav-item {
    width: 100%;
}

.camra-settings__fold .camra-settings__menu .mud-nav-link {
    border-radius: var(--r-md);
    box-shadow: none;
}

.camra-settings__fold .camra-settings__menu .mud-nav-link.active {
    box-shadow: none;
}

.camra-settings__wide {
    display: none;
}

@media (min-width: 600px) {
    .camra-settings__fold {
        display: none;
    }

    .camra-settings__wide {
        display: block;
    }
}

@media (min-width: 960px) {
    .camra-settings__grid {
        grid-template-columns: 16rem minmax(0, 1fr);
        gap: var(--s-8);
    }

    .camra-settings__nav {
        position: sticky;
        top: calc(var(--topbar-h) + var(--s-4));
    }

    .camra-settings__menu.mud-navmenu {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: var(--s-1);
    }

    .camra-settings__menu .mud-nav-item {
        width: 100%;
    }

    .camra-settings__menu .mud-nav-link {
        min-height: 2.5rem;
        border-radius: var(--r-md);
        box-shadow: none;
        white-space: normal;
    }

    .camra-settings__menu .mud-nav-link.active {
        box-shadow: none;
    }

    .camra-settings__body {
        padding: var(--s-8);
    }
}

@media (max-width: 599.98px), (pointer: coarse) {
    .camra-settings__menu .mud-nav-link {
        min-height: var(--hit);
    }
}

/* a settings page's own title and its lead line (the Card title role; the page header holds the h1) */
.camra-settings__title {
    margin: 0 0 var(--s-2);
    color: var(--c-text);
    font-size: var(--fs-section);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-section);
    line-height: 1.3;
}

.camra-settings__lead {
    margin: 0 0 var(--s-5);
    max-width: 72ch;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    line-height: 1.5;
}

/* a setting's state (two-factor on or off): its status dot and word, then the sentence (no box) */
.camra-settings__state {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
    margin-bottom: var(--s-5);
}

.camra-settings__state .camra-settings__lead {
    margin: 0;
}

.camra-settings__note {
    margin-top: var(--s-5);
    max-width: 72ch;
}

/* a destructive way out at the end of a settings page: the sentence, then its red text link, over a hairline */
.camra-settings__danger {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-3);
    margin-top: var(--s-6);
    padding-top: var(--s-4);
    border-top: 1px solid var(--c-line-section);
    color: var(--c-text-2);
    font-size: var(--fs-small);
}

.camra-settings__danger .camra-settings__danger-link {
    color: var(--c-danger);
    font-weight: var(--fw-semibold);
}

@media (max-width: 599.98px), (pointer: coarse) {
    .camra-settings__danger .camra-settings__danger-link {
        display: inline-flex;
        align-items: center;
        min-height: var(--hit);
    }
}

/* a form: its fields 16px apart, the action at the end (full width on a phone, its own width from 600px) */
.camra-form {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    max-width: 36rem;
}

.camra-form__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-3);
    margin-top: var(--s-2);
}

.camra-form__actions > .mud-button-root,
.camra-form__actions > button {
    min-height: var(--hit);
}

@media (max-width: 599.98px) {
    .camra-form__actions > .mud-button-root,
    .camra-form__actions > button {
        flex: 1 1 100%;
    }
}

/* two short fields side by side from 600px (city and state), one under the other on a phone: the same 16px apart
   as the rest of the form, never MudGrid's gutters */
.camra-form__pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
    align-items: start;
}

@media (min-width: 600px) {
    .camra-form__pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .camra-form__pair--wide-first {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
}

/* a form that fills its dialog */
.camra-form--full {
    max-width: none;
}

/* a short list of rows with their actions (a settings page's organisations, sign-in providers, devices): one row per
   item, the action at the end, wrapping under the text on a narrow screen; never a table that scrolls sideways */
.camra-rows {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: var(--r-card);
    box-shadow: var(--hairline);
}

.camra-rows__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2) var(--s-4);
    min-height: 3.5rem;
    padding: var(--s-3) var(--s-4);
}

.camra-rows__row + .camra-rows__row {
    box-shadow: var(--hair-top);
}

.camra-rows__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-3);
    flex: 1 1 12rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.camra-rows__name {
    color: var(--c-text);
    font-size: var(--fs-body);
    font-weight: var(--fw-medium);
}

.camra-rows__meta {
    flex-basis: 100%;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
}

.camra-rows__end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    margin-inline-start: auto;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
}

.camra-rows__end form {
    margin: 0;
}

/* a row that is a link (two-factor authentication's steps): the whole row, a chevron at its end */
.camra-rows > li + li {
    box-shadow: var(--hair-top);
}

.camra-rows__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    min-height: 3rem;
    padding: var(--s-2) var(--s-4);
    color: var(--c-text);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-medium);
    text-decoration: none;
    border-radius: inherit;
    transition: background-color var(--t-hover) ease-out;
}

.camra-rows__link::after {
    content: "\203A";
    color: var(--c-text-muted);
    font-size: var(--fs-section);
    line-height: 1;
}

.camra-rows__link:hover {
    background-color: var(--c-fill-hover);
}

/* recovery codes and an authenticator's setup key: monospace on a quiet well, two codes a row */
.camra-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-2) var(--s-4);
    margin: 0;
    padding: var(--s-4);
    list-style: none;
    background: var(--c-surface-raised);
    border-radius: var(--r-md);
    box-shadow: var(--hairline);
}

.camra-codes code {
    color: var(--c-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--fs-body);
    overflow-wrap: anywhere;
}

.camra-codes--key {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-1);
}

.camra-codes__label {
    color: var(--c-text-muted);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caption);
    text-transform: uppercase;
}

.camra-qr {
    padding: var(--s-2);
    background: var(--c-white);
    border-radius: var(--r-md);
}

@media (max-width: 599.98px), (pointer: coarse) {
    .camra-rows__end .mud-button-root,
    .camra-rows__end button {
        min-height: var(--hit);
    }
}

/* a page's explanation that stays on a phone (the header's subtitle hides there): --c-text-2, a readable measure */
.camra-page-lead {
    margin: 0;
    max-width: 80ch;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    line-height: 1.55;
}

/* a row list that is a card's whole body (the card draws the boundary) */
.camra-rows--flush {
    border-radius: 0 0 var(--r-card) var(--r-card);
    box-shadow: none;
}

.camra-card .camra-rows--flush {
    margin-top: var(--s-3);
    box-shadow: var(--hair-top);
}

/* a setting with its switch: the name and what it does, the switch at the end (a 44px target) */
.camra-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
}

.camra-switch-row__text {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    min-width: 0;
}

.camra-switch-row__title {
    color: var(--c-text);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
}

.camra-switch-row__help {
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    line-height: 1.5;
}

.camra-switch-row .mud-switch {
    flex: none;
    margin: 0;
}

/* code and identifiers (a token's prefix and scopes, OAuth scopes): the platform's monospace, a step smaller */
.camra-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--fs-small);
    overflow-wrap: anywhere;
}

.camra-mono-field input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* API tokens (chapter 6) */
/* the new token's dialog: one sentence, the value with Copy beside it (under it on a phone) */
.camra-token-created__text {
    margin: 0 0 var(--s-4);
    color: var(--c-text);
    font-size: var(--fs-body);
}

.camra-token-created__value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3);
}

.camra-token-created__field {
    flex: 1 1 16rem;
    min-width: 0;
}

.camra-token-form {
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
    margin-top: var(--s-3);
}

.camra-token-form__name {
    max-width: 28rem;
}

/* 17rem a field: the date's label ("Expires (optional, last day UTC)") ran under its calendar icon at 14rem */
.camra-token-form__limits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
    gap: var(--s-3);
    max-width: 60rem;
}

.camra-token-form__problem {
    color: var(--c-text-2);
    font-size: var(--fs-small);
}

/* a list column whose value reads as one piece (a date and time, "After 90 days unused") */
.camra-nowrap {
    white-space: nowrap;
}

.camra-token-scopes {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.camra-token-scopes__legend {
    margin-bottom: var(--s-2);
    color: var(--c-text);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
}

.camra-token-scopes__presets {
    margin-bottom: var(--s-3);
}

.camra-token-scopes__note {
    margin: 0 0 var(--s-3);
    max-width: 80ch;
    color: var(--c-text-2);
    font-size: var(--fs-small);
}

/* the scope areas: a name and its boxes per row, two rows across from 960px; a box is a 44px target on touch */
.camra-token-scopes__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-radius: var(--r-md);
    box-shadow: var(--hairline);
}

.camra-token-scopes__area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 var(--s-3);
    min-height: 2.75rem;
    padding: var(--s-1) var(--s-3);
    box-shadow: var(--hair-top);
}

.camra-token-scopes__area:first-child {
    box-shadow: none;
}

.camra-token-scopes__name {
    flex: 0 0 7rem;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
}

.camra-token-scopes__boxes {
    display: flex;
    flex: 1 1 0;
    flex-wrap: wrap;
    gap: 0 var(--s-2);
    min-width: 0;
}

/* the two kinds one under the other with air between them; a two-line label starts on the radio's line */
.camra-token-form__kind .mud-radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
}

.camra-token-form__kind .mud-radio {
    align-items: flex-start;
}

/* the circle lines up with the token name's field edge (its 12px button padding indented the pair) */
.camra-token-form__kind .mud-radio > .mud-icon-button {
    margin-inline-start: calc(-1 * var(--s-3));
}

.camra-token-form__kind .mud-radio > .mud-typography {
    display: flex;
    flex-direction: column;
    padding-top: 0.75rem;
}

/* a kind is its name, then one quiet line on what it is for */
.camra-token-kind__name {
    color: var(--c-text);
    font-weight: 600;
}

.camra-token-kind__text {
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
}

@media (min-width: 960px) {
    .camra-token-scopes__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .camra-token-scopes__area:nth-child(2) {
        box-shadow: none;
    }

    .camra-token-scopes__area:nth-child(odd) {
        box-shadow: var(--hair-top), var(--edge-end);
    }

    .camra-token-scopes__area:first-child {
        box-shadow: var(--edge-end);
    }
}

@media (max-width: 599.98px), (pointer: coarse) {
    .camra-token-scopes__boxes .mud-checkbox .mud-icon-button {
        padding: var(--s-2);
    }

}

.camra-token-name {
    color: var(--c-text);
    font-weight: var(--fw-medium);
    overflow-wrap: anywhere;
}

.camra-token--muted {
    opacity: 0.55;
}

.camra-token-prefix {
    margin-inline-start: var(--s-1);
    color: var(--c-text-2);
}

.camra-token-decode {
    display: block;
    font-style: italic;
}

.camra-token-sub {
    display: block;
    color: var(--c-text-2);
    font-size: var(--fs-small);
    overflow-wrap: anywhere;
}

/* #17611: an e-mail or a token name breaks only when it cannot fit its column at all: "anywhere" lets the table shrink
   the column to one letter, so an address broke mid-word at 768 and 1440 with room to spare. break-word counts the
   whole word in the column's minimum width. */
.camra-token-sub.camra-email,
.camra-email,
.camra-token-name {
    overflow-wrap: break-word;
    word-break: normal;
}

.camra-token-actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: var(--s-1);
}

.camra-token-card__scopes {
    margin-bottom: var(--s-2);
    color: var(--c-text-2);
}

.camra-token-tenant {
    min-width: 14rem;
}

/* the MCP connect snippets (the Developers card) */
.camra-snippets {
    border-radius: var(--r-md);
    box-shadow: var(--hairline);
}

.camra-snippet {
    margin: 0;
    padding: var(--s-3);
    color: var(--c-text);
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--c-surface-raised);
    border-radius: var(--r-sm);
}

/* Billing (chapter 6): a card's head (BillingCardHead) and the figures of the period */
.billing-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2) var(--s-3);
    margin-bottom: var(--s-3);
}

.billing-head__title {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    min-width: 0;
}

.billing-head__icon {
    color: var(--c-text-muted);
}

.billing-head__end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
    margin-inline-start: auto;
}

/* a card's amount at the Section size: it is what the card is read for */
.billing-head__figure {
    color: var(--c-text);
    font-size: var(--fs-section);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-section);
    font-variant-numeric: tabular-nums;
}

/* the month's total: the page's figure (the Figure role) under the card's title */
.billing-total {
    margin: calc(-1 * var(--s-1)) 0 var(--s-3);
    color: var(--c-text);
    font-size: var(--fs-figure);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-figure);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* billing not set up, in its card: a status line and the sentence, then the action (no box in the card) */
.billing-setup {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
}

.billing-setup__text {
    margin: 0;
    max-width: 52ch;
    color: var(--c-text-2);
    font-size: var(--fs-small);
}

.billing-setup__text strong {
    color: var(--c-text);
    font-weight: var(--fw-semibold);
}

.billing-name {
    display: inline-flex;
    align-items: center;
    gap: var(--s-1);
    color: var(--c-text);
    font-weight: var(--fw-medium);
}

.billing-name__info {
    color: var(--c-text-muted);
}

/* a webhook's event types: the catalogue as chips under the field (on a phone they wrap; each is a 44px hit area) */
.webhook-types {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-3) var(--s-2);
    margin-top: calc(-1 * var(--s-2));
}

.webhook-types .mud-chip {
    margin: 0;
    max-width: 100%;
}

/* the month between the header's arrows */
.billing-month-step {
    min-width: 8.5rem;
    color: var(--c-text);
    font-size: var(--fs-body-sm);
    font-weight: var(--fw-semibold);
    font-variant-numeric: tabular-nums;
    text-align: center;
    white-space: nowrap;
}

.billing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--stack);
}

@media (min-width: 1280px) {
    .billing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .billing-grid__wide,
    .billing-grid__table {
        grid-column: 1 / -1;
    }
}

/* the storage and retrieval tables have six columns: side by side only where each card holds them */
@media (min-width: 1760px) {
    .billing-grid__table {
        grid-column: auto;
    }
}

.billing-invoice-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
}

.billing-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
}

@media (min-width: 600px) {
    .billing-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.billing-details__block {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3);
    min-width: 0;
}

.billing-details__text {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    min-width: 0;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    overflow-wrap: anywhere;
}

/* #17685: the line under the Door control card (how doors are billed) */
.billing-note {
    margin: var(--s-2) 0 0;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
}

/* #17579: the Parking lots page's line of the month's text sign-in codes */
.lots-guest-codes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1) var(--s-3);
    margin: 0 0 var(--stack);
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
    font-variant-numeric: tabular-nums;
}

/* #17579: the guest sign-in code limit card (the field and the select side by side from 768px, stacked on a phone) */
.guest-limit__month {
    margin: var(--s-2) 0 0;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
}

.guest-limit__state {
    margin: var(--s-2) 0 0;
}

.guest-limit__fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-3);
    margin-top: var(--s-3);
}

@media (min-width: 768px) {
    .guest-limit__fields {
        grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
    }
}

.guest-limit__explain {
    margin: var(--s-2) 0 0;
    color: var(--c-text-2);
    font-size: var(--fs-body-sm);
}

.guest-limit__warning {
    margin-top: var(--s-2);
}

.guest-limit__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--s-3);
}

.guest-limit__actions .mud-button-root {
    min-height: 44px;
}

.billing-details__text strong {
    color: var(--c-text);
}

.billing-details__problem {
    color: var(--c-danger);
}

/* Stripe's card field (PaymentMethodDialog): the one field look around Stripe's own frame */
.billing-card-element {
    min-height: 2.75rem;
    padding: var(--s-3);
    background: var(--c-field);
    border-radius: var(--r-sm);
    box-shadow: var(--ring-input);
}

.billing-period {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: var(--s-1) var(--s-3);
    margin: 0 0 var(--s-3);
    font-size: var(--fs-body-sm);
}

.billing-period dt {
    color: var(--c-text-muted);
}

.billing-period dd {
    margin: 0;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

/* the daily breakdown has twelve series: its legend takes rows, so the plot gets the room back */
.billing-grid .camra-chart.billing-chart--tall {
    height: 26rem;
}

@media (min-width: 960px) {
    .billing-grid .camra-chart.billing-chart--tall {
        height: 22rem;
    }
}

/* a details drawer of this chapter (the super admins' billing drawer): a sticky title row with a 44px close, the
   sections under it, label / value lists as one grid */
.camra-drawer__head {
    position: sticky;
    top: 0;
    z-index: var(--z-page-top);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-3) var(--s-3) var(--s-5);
    background: var(--c-panel);
    box-shadow: var(--hair-bottom);
}

.camra-drawer__title {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    min-width: 0;
    overflow-wrap: anywhere;
}

.camra-drawer__sub {
    color: var(--c-text-muted);
    font-size: var(--fs-small);
}

.camra-drawer__body {
    display: flex;
    flex-direction: column;
    gap: var(--s-5);
    padding: var(--s-4) var(--s-5) var(--s-8);
}

.camra-drawer__section-title {
    margin: 0 0 var(--s-2);
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
}

.camra-drawer__text {
    margin: 0;
    color: var(--c-text);
    font-size: var(--fs-body-sm);
}

.camra-drawer__item {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    margin-bottom: var(--s-2);
    padding: var(--s-3);
    background: var(--c-surface);
    border-radius: var(--r-md);
    box-shadow: var(--hairline);
}

.camra-drawer__item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2);
}

.camra-drawer__amount {
    margin-inline-start: auto;
    font-variant-numeric: tabular-nums;
}

.camra-drawer__fact {
    color: var(--c-text-2);
    font-size: var(--fs-small);
}

.camra-dl {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: var(--s-1) var(--s-4);
    margin: 0;
    font-size: var(--fs-body-sm);
}

.camra-dl dt {
    color: var(--c-text-muted);
}

.camra-dl dd {
    margin: 0;
    min-width: 0;
    color: var(--c-text);
    overflow-wrap: anywhere;
}

@media (max-width: 599.98px) {
    .camra-dl {
        grid-template-columns: 7.5rem minmax(0, 1fr);
        gap: var(--s-1) var(--s-3);
    }
}

/* the tenants list (chapter 6) */
.tenant-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-2);
    min-width: 0;
    overflow-wrap: anywhere;
}

/* The monogram, the name, then its chips on the same line; a chip that has no room wraps under the
   name, never cutting it (the id is copied from the row's menu, never printed) */
.tenant-name {
    column-gap: var(--s-3);
}

.tenant-name__title {
    color: var(--c-text);
    font-weight: var(--fw-semibold);
}

.tenant-name__title + .mud-chip {
    margin-inline-start: calc(-1 * var(--s-1));
}

.tenant-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0;
}

/* the team list (chapter 6) */
.team-member {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-2);
    min-width: 0;
    overflow-wrap: anywhere;
}

.team-member__email {
    flex-basis: 100%;
    color: var(--c-text-2);
    font-size: var(--fs-caption);
}

/* The member's monogram beside the name over the e-mail */
.team-who {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-width: 0;
    min-height: 2.5rem; /* a pending invitation (one line) is as tall as a member (name over e-mail): even rows */
}

.team-who > .team-member {
    flex: 1 1 auto;
    row-gap: 2px;
}

.team-member > strong {
    font-weight: var(--fw-semibold);
}

/* no company: a quiet dash */
.team-none {
    color: var(--c-text-muted);
}

.team-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* webhooks (chapter 6) */
.camra-form--wide {
    max-width: 48rem;
}

/* The receiver's address in mono on ONE line (its host in the text colour, the scheme and the path
   quiet), cut with an ellipsis, the whole address in its title: it wrapped mid-word ("…/gar / age-gates") */
.webhooks-receiver {
    max-width: 26rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: var(--ls-mono);
    color: var(--c-text);
}

.webhooks-receiver__host {
    font-weight: var(--fw-semibold);
}

.webhooks-receiver__quiet {
    color: var(--c-text-2);
}

/* a subscription's event types: quiet mono chips, each whole; the list wraps between them */
.webhooks-types {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-1);
}

.webhooks-type {
    display: inline-flex;
    align-items: center;
    height: var(--chip-h);
    padding: 0 var(--s-2);
    border-radius: var(--r-sm);
    background: var(--c-fill-secondary);
    color: var(--c-text-3);
    font-family: var(--font-mono);
    font-size: var(--fs-caption);
    letter-spacing: var(--ls-mono);
    white-space: nowrap;
}

/* a day or a moment of a developer's list (UTC): mono, one piece */
.webhooks-when {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: var(--ls-mono);
    white-space: nowrap;
    color: var(--c-text-2);
}

.webhooks-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.webhooks-deliveries__lead {
    padding: var(--s-3) var(--card-pad) 0;
}

.webhooks-deliveries__more {
    padding: var(--s-3) var(--card-pad) var(--card-pad);
}

/* a row's actions (RowActionsMenu): the buttons that stay one tap away, then the ⋮ with the rest, Delete last */
.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--s-1);
}

/* in a table row the actions stay on one line (the cell is as narrow as they are); on a card they wrap */
td.camra-col-actions .row-actions {
    flex-wrap: nowrap;
}

/* a row's buttons and its ⋮ are one size, so the glyphs beside each other match (the pencil sat in a 32px box, the ⋮
   in a 28px one) */
.row-actions .mud-icon-button.mud-icon-button-size-small:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) {
    width: var(--icon-btn);
    min-width: var(--icon-btn);
    height: var(--icon-btn);
}

/* a tenant's actions are words: from 1200px Team and Sites beside the named ⋮ with the rest; below that (and on a
   phone's card) every action in that one menu */
.tenant-actions-menu {
    display: flex;
    justify-content: flex-end;
}

@media (min-width: 1200px) {
    .tenant-actions-menu {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .tenant-actions-wide {
        display: none;
    }
}

/* OAuth applications (chapter 6) */
.oauth-scopes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.oauth-uri {
    overflow-wrap: anywhere;
}

/* the audit log (chapter 6) */
.audit-filters {
    margin-bottom: var(--s-4);
}

/* the range and its five fields on one line at 1440 (the sixth, Token, wrapped alone onto a second line) */
.audit-filters .camra-filters .camra-filters__fields > * {
    flex-basis: 8.5rem;
}

/* the stored detail is machine data (a value as recorded, "TwoWeeks"): mono, quiet */
.audit-detail {
    overflow-wrap: anywhere;
    color: var(--c-text-2);
}

/* a log's moment (UTC): mono, one piece */
.audit-when {
    font-family: var(--font-mono);
    font-size: var(--fs-mono);
    letter-spacing: var(--ls-mono);
    white-space: nowrap;
    color: var(--c-text-2);
}

.audit-actor__name {
    font-weight: 500;
}

/* the Simple shell's home: one list of even rows, two to a line from 600px: each row a
   card's surface and line, 72px tall whatever its words, the icon in the brand, the title over one quiet line and a
   chevron; hover lifts the line, the keyboard's focus is the brand outline. A group's heading in the Label role. */
.simple-tiles {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-2);
}

@media (min-width: 600px) {
    .simple-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s-3);
    }
}

.simple-tiles__heading {
    grid-column: 1 / -1;
    margin: var(--s-4) 0 0;
    color: var(--c-text-muted);
    font-size: var(--fs-label);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
}

.simple-tile {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    min-height: 72px;
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-card);
    background: var(--c-surface);
    box-shadow: var(--card);
    cursor: pointer;
    transition: box-shadow var(--t-hover) ease-out, background-color var(--t-hover) ease-out;
}

.simple-tile:hover {
    box-shadow: var(--card-hover);
}

.simple-tile:focus-visible {
    outline: 2px solid var(--c-brand);
    outline-offset: 2px;
}

.simple-tile .simple-tile__icon {
    flex: none;
    width: 22px;
    height: 22px;
    color: var(--c-brand);
}

.simple-tile__text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.simple-tile__title {
    color: var(--c-text);
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    line-height: 1.3;
}

.simple-tile__sub {
    color: var(--c-text-2);
    font-size: var(--fs-small);
    line-height: 1.35;
}

.simple-tile .simple-tile__chevron {
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--c-text-muted);
}

.simple-tile--disabled {
    cursor: default;
    background: transparent;
}

.simple-tile--disabled:hover {
    box-shadow: var(--card);
}

.simple-tile--disabled .simple-tile__icon,
.simple-tile--disabled .simple-tile__title {
    color: var(--c-text-muted);
}

.simple-tile .mud-chip {
    flex: none;
    margin: 0;
}

/* the Simple shell (chapter 6): the text styles its pages wrote inline */
.simple-wrap {
    overflow-wrap: anywhere;
}

.simple-strong {
    font-weight: 600;
}

.simple-plate {
    font-weight: 600;
    letter-spacing: 0.05em;
}

.simple-spaced {
    letter-spacing: 0.05em;
}

.simple-overline {
    line-height: 1.4;
}

.simple-screen-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* the legal pages (chapter 6): a reading page. The text at a readable measure on the type scale, the contents beside
   it from 1200px and folded above it below that. The documents are MarkupStrings, hence global rules. */
.legal-brand {
    display: flex;
    align-items: center;
    min-height: var(--hit);
    color: inherit;
    text-decoration: none;
}

.legal-shell {
    max-width: calc(72ch + 18rem + var(--s-12));
    margin: 0 auto;
    padding: var(--s-8) var(--gutter-app) var(--s-6);
}

.legal-page--toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
}

.legal-toc__side {
    display: none;
}

.legal-toc__fold {
    border-radius: var(--r-card);
    box-shadow: var(--hairline);
    background: var(--c-surface);
}

.legal-toc__summary {
    min-height: var(--hit);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2);
    padding: 0 var(--card-pad);
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.legal-toc__summary::-webkit-details-marker {
    display: none;
}

/* the fold says it opens: a chevron that turns when it is open */
.legal-toc__summary::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    margin-inline-end: 0.25rem;
    border-right: 2px solid var(--c-text-2);
    border-bottom: 2px solid var(--c-text-2);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.15s ease;
}

.legal-toc__fold[open] > .legal-toc__summary::after {
    transform: rotate(-135deg) translateY(-2px);
}

.legal-toc__fold .legal-toc__list {
    padding: 0 var(--card-pad) var(--s-3);
}

.legal-toc__list {
    margin: 0;
    list-style: none;
    padding: 0;
    font-size: var(--fs-body-sm);
    line-height: 1.4;
}

.legal-toc__list li {
    margin: 0;
}

.legal-toc__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    /* a two-line entry keeps the same air above and below as a one-line one (#17611) */
    padding-block: 0.25rem;
    color: var(--c-text-2);
    text-decoration: none;
}

.legal-toc__link:hover,
.legal-toc__link:focus-visible {
    color: var(--c-brand);
}

/* #17611: an entry is a 44px target where it is touched: in the phone's fold, and anywhere on a touch screen (the
   side list keeps its 36px rows under a mouse) */
.legal-toc__fold .legal-toc__link {
    min-height: var(--hit, 44px);
}

@media (max-width: 599.98px), (pointer: coarse) {
    .legal-toc__link {
        min-height: var(--hit, 44px);
    }
}

.legal-toc__title {
    font-size: var(--fs-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-text-muted);
    margin-bottom: var(--s-2);
}

@media (min-width: 1200px) {
    .legal-page--toc {
        grid-template-columns: 16rem minmax(0, 72ch);
        gap: var(--s-12);
        justify-content: center;
    }

    .legal-toc__fold {
        display: none;
    }

    .legal-toc__side {
        display: block;
        position: sticky;
        top: calc(var(--topbar-h) + var(--s-6));
        max-height: calc(100vh - var(--topbar-h) - var(--s-12));
        overflow-y: auto;
    }

}

.legal-document {
    max-width: 72ch;
    margin: 0 auto;
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--c-text);
}

.legal-page--toc .legal-document {
    margin: 0;
}

.legal-document__version {
    font-size: var(--fs-label);
    font-weight: 600;
    color: var(--c-text-muted);
}

.legal-document h1 {
    font-size: var(--fs-page-title);
    line-height: 1.2;
    font-weight: 700;
    margin: var(--s-2) 0 var(--s-5);
}

.legal-document h2 {
    font-size: var(--fs-section);
    line-height: 1.3;
    font-weight: 700;
    margin: var(--s-8) 0 var(--s-3);
    scroll-margin-top: calc(var(--topbar-h) + var(--s-4));
}

.legal-document h3 {
    font-size: var(--fs-card-title);
    line-height: 1.35;
    font-weight: 600;
    margin: var(--s-6) 0 var(--s-2);
    scroll-margin-top: calc(var(--topbar-h) + var(--s-4));
}

.legal-document p,
.legal-document li {
    font-size: var(--fs-body);
}

.legal-document p {
    margin: 0 0 var(--s-3);
}

/* #17611: a bulleted or numbered list sits INSIDE the column, its markers in the indent (the reset left no padding, so
   the EULA's bullets hung outside the text's edge) */
.legal-document ul,
.legal-document ol {
    margin: 0 0 var(--s-3);
    padding-inline-start: 1.5rem;
}

.legal-document li + li {
    margin-top: var(--s-1);
}

.legal-document a {
    color: var(--c-brand);
    overflow-wrap: anywhere;
}

.legal-document blockquote {
    margin: var(--s-4) 0;
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    background: var(--c-surface-lane);
    background: var(--c-surface);
    border-radius: 0 var(--r-md) var(--r-md) 0;
}

.legal-document table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--s-4) 0;
    font-size: var(--fs-body-sm);
    display: block;
    overflow-x: auto;
}

.legal-document th,
.legal-document td {
    border: 1px solid var(--c-line);
    padding: var(--s-2) var(--s-3);
    text-align: left;
    vertical-align: top;
}

/* a table of the text on a phone: each row a card of "heading: value" lines (the cells carry data-label), so
   nothing scrolls sideways */
@media (max-width: 599.98px) {
    .legal-document table.legal-table {
        display: block;
        overflow: visible;
        border: 0;
    }

    .legal-document table.legal-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .legal-document table.legal-table tbody,
    .legal-document table.legal-table tr,
    .legal-document table.legal-table td {
        display: block;
    }

    .legal-document table.legal-table tr {
        border-radius: var(--r-card);
        box-shadow: var(--hairline);
        background: var(--c-surface);
        padding: var(--s-2) var(--s-3);
        margin-bottom: var(--s-3);
    }

    .legal-document table.legal-table td {
        border: 0;
        padding: var(--s-1) 0;
        overflow-wrap: anywhere;
    }

    .legal-document table.legal-table td + td {
        border-top: 1px solid var(--c-line-section, var(--c-line));
    }

    .legal-document table.legal-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: var(--fs-label);
        font-weight: 600;
        color: var(--c-text-muted);
    }
}

@media (max-width: 599.98px), (pointer: coarse) {
    .legal-toc__link {
        min-height: var(--hit);
    }
}

.legal-document code {
    background: var(--c-surface);
    padding: 0.1rem 0.3rem;
    border-radius: var(--r-xs);
    overflow-wrap: anywhere;
}

.legal-document hr {
    border: 0;
    border-top: 1px solid var(--c-line);
    margin: var(--s-8) 0;
}

.legal-notices {
    overflow-x: auto;
    container-type: inline-size;
}

/* from a laptop up the notices take a wider column than the prose (the intro keeps its measure): their header and
   entry lines run to ~110 columns and broke mid-sentence at 72ch ("…the components of the container" / "image it…") */
@media (min-width: 1024px) {
    /* the shell shrinks to its content (a centred flex item): it takes the room instead */
    .legal-shell:has(.legal-notices) {
        width: 100%;
        max-width: calc(64rem + 2 * var(--gutter-app));
    }

    .legal-document:has(> .legal-notices) {
        max-width: 64rem;
    }

    .legal-document:has(> .legal-notices) > p {
        max-width: 72ch;
    }
}

/* the error page (chapter 6) */
.camra-error-page {
    max-width: var(--content-narrow);
}

.camra-error-page__title {
    font-size: var(--fs-card-title);
    font-weight: 600;
    margin: var(--s-4) 0 var(--s-2);
}

.camra-error-page p {
    margin: 0 0 var(--s-3);
}

/* a list in a flush card is the card's body: the card draws the one hairline and the corners, the list's own surface
   would draw a second line inside it (Webhooks, API tokens, Billing) */
.camra-card.camra-card--flush .camra-card__body .camra-list__surface {
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

/* on a phone the same list is cards: inside a flush card they are the card's rows, a line between them, so no card
   sits inside a card with its edge on the outer one (API usage, API tokens, Webhooks, Billing's invoices) */
.camra-card.camra-card--flush .camra-card__body .camra-list__cards {
    gap: 0;
}

.camra-card.camra-card--flush .camra-card__body .camra-list-card {
    padding: var(--s-3) var(--card-pad);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.camra-card.camra-card--flush .camra-card__body .camra-list__item + .camra-list__item .camra-list-card {
    box-shadow: var(--edge-top);
}

.camra-card.camra-card--flush .camra-card__body .camra-list-card--link:hover {
    background: var(--c-fill-hover);
}

.camra-card.camra-card--flush .camra-card__body .camra-list-card--selected {
    background: var(--c-fill-selected);
}

/* the Simple shell's bar: a badge sits on its 44px button's top corner, inside the 56px bar, never cut by the top of
   the screen (the console's bell and tasks do the same) */
.simple-layout .mud-appbar .simple-bar-badge .mud-badge.mud-badge-overlap {
    inset: 2px 0 auto auto;
}

.simple-layout .simple-brand {
    min-height: var(--hit);
}

/* at 320px the clock, the tasks, the bell and the menu do not fit beside the wordmark: the menu went off the screen.
   The logo alone stays the way home (the link keeps its name) */
@media (max-width: 359.98px) {
    .simple-layout .simple-brand .mud-typography {
        display: none;
    }

    .simple-layout .simple-brand img {
        margin-right: 0 !important;
    }
}

/* a Simple notification's "your time" is a line of its own under the site time, never "time" alone on a second line;
   a wrapped line does not start with its "·" (docs/design-system.md) */
.simple-notification-time .your-time {
    display: block;
    white-space: nowrap;
}

.simple-notification-time .your-time__sep {
    display: none;
}

/* The site-day calendars (SiteDayCalendar, SiteRangeCalendar): the SITE's today ringed in the brand (MudBlazor's own
   ring, on the server's today, is never drawn); a day the range cannot reach (past the longest range from the first day
   picked) looks disabled, with no hover, and picking it says so in the footer. */
/* (the calendar's day buttons take their colour from the icon-button rule above: these are as specific) */
.mud-picker-calendar .mud-icon-button.mud-day.site-today:not(.mud-selected) {
    border: 1px solid var(--c-brand-line);
    color: var(--c-brand);
    font-weight: var(--fw-semibold);
}

.mud-picker-calendar .mud-icon-button.mud-day.site-day--locked {
    color: var(--c-text-disabled);
    cursor: default;
}

/* as specific as the icon-button hover (and later): a locked day does not light up */
.mud-picker-calendar .mud-icon-button.mud-day.site-day.site-day--locked:hover {
    background-color: transparent;
    color: var(--c-text-disabled);
}

.mud-picker-calendar .mud-icon-button.mud-day.site-today.site-day--locked {
    border-color: var(--c-line-strong);
    color: var(--c-text-disabled);
}

/* The site calendars' layout: only the weeks the month has (MudBlazor lays out six and holds a 216px plot and a 305px
   content, so a short month left an empty band over the footer); every day a 2px margin, so the week rows stand apart.
   A range is one band per week row: its days touch (the margin goes into their width), square inside, rounded at the
   range's start and end and at the ends of a row (rounded cells left dark diamonds where four met). */
.mud-picker-popover:has(.site-day) .mud-picker-calendar-transition,
.mud-picker-popover:has(.site-day) .mud-picker-content {
    min-height: 0;
}

/* the month in the flow (MudBlazor places it absolutely in the slide box, which the min-height above sized) */
.mud-picker-popover:has(.site-day) .mud-picker-slide-transition > * {
    position: relative;
}

/* seven days a row, always (in the flow, the wrapping row of 36px days took eight) */
.mud-picker-popover:has(.site-day) .mud-picker-calendar {
    display: grid;
    grid-template-columns: repeat(7, auto);
    justify-content: center;
}

.mud-picker-calendar .mud-day.site-day--spare-week {
    display: none;
}

/* a day 32px (40 on a phone: seven 44px steps fit the 310px calendar, where the 44px touch size of an icon button
   pushed the week past both edges) */
.mud-picker-calendar {
    --site-day: 32px;
}

@media (max-width: 599.98px) {
    .mud-picker-calendar {
        --site-day: 40px;
    }
}

.mud-picker-calendar .mud-icon-button.mud-day.site-day {
    width: var(--site-day);
    min-width: var(--site-day);
    height: var(--site-day);
    margin: 2px;
}

.mud-picker-calendar .mud-icon-button.mud-day.site-day.mud-range {
    width: calc(var(--site-day) + 4px);
    min-width: calc(var(--site-day) + 4px);
    margin: 2px 0;
    border-radius: 0;
}

.mud-picker-calendar .mud-icon-button.mud-day.site-day.mud-range:nth-child(7n + 1),
.mud-picker-calendar .mud-icon-button.mud-day.site-day.mud-range.mud-range-start-selected {
    border-radius: var(--r-md) 0 0 var(--r-md);
}

.mud-picker-calendar .mud-icon-button.mud-day.site-day.mud-range:nth-child(7n),
.mud-picker-calendar .mud-icon-button.mud-day.site-day.mud-range.mud-range-end-selected {
    border-radius: 0 var(--r-md) var(--r-md) 0;
}

.mud-picker-calendar .mud-icon-button.mud-day.site-day.mud-range.mud-range-start-selected:nth-child(7n),
.mud-picker-calendar .mud-icon-button.mud-day.site-day.mud-range.mud-range-end-selected:nth-child(7n + 1) {
    border-radius: var(--r-md);
}

/* The range picker's quick ranges: a row of small chips over the calendar, at most two rows within its width (the
   popover stays the calendar's width), a hairline under them; the footer under the calendar says the longest range.
   The actions box is no box: its parts sit in the paper's grid. */
.mud-picker-paper:has(.site-range-presets) {
    display: grid;
    grid-template-columns: min-content;
    grid-template-rows: auto auto auto;
}

.mud-picker-paper:has(.site-range-presets) > .mud-picker-container {
    grid-column: 1;
    grid-row: 2;
}

.mud-picker-paper:has(.site-range-presets) > .mud-picker-actions {
    display: contents;
}

.site-range-presets {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: var(--s-3) var(--s-3);
    border-bottom: 1px solid var(--c-line);
}

.site-range-presets .site-range-preset {
    display: inline-flex;
    align-items: center;
    height: 28px;
    /* six chips in two rows within the calendar's 310px */
    padding: 0 8px;
    border: 1px solid var(--c-line);
    border-radius: var(--r-sm);
    background: var(--c-surface-raised);
    color: var(--c-text-2);
    font: inherit;
    font-size: var(--fs-small);
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--t-hover) ease-out, border-color var(--t-hover) ease-out, color var(--t-hover) ease-out;
}

.site-range-presets .site-range-preset:hover {
    border-color: var(--c-line-strong);
    background: var(--c-fill-secondary-hover);
    color: var(--c-text);
}

.site-range-presets .site-range-preset:focus-visible {
    outline: none;
    box-shadow: var(--ring-focus);
}

.site-range-presets .site-range-preset--active,
.site-range-presets .site-range-preset--active:hover {
    border-color: var(--c-brand-line);
    background: color-mix(in srgb, var(--c-brand) 12%, transparent);
    color: var(--c-brand);
}

.site-range-note {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    padding: var(--s-2) var(--s-4) var(--s-3);
    color: var(--c-text-muted);
    font-size: var(--fs-caption);
    line-height: 1.4;
}

.site-range-note--reached {
    color: var(--c-text);
}

/* #17611: a calendar fits a 320px screen: MudBlazor draws it 310px wide, and opened under a field with the page's 16px
   gutter it ran past the right edge. Seven 40px days fit in 288px. */
@media (max-width: 359.98px) {
    .mud-picker-inline-paper .mud-picker-calendar-container {
        width: 288px;
    }

    .mud-picker-inline-paper .mud-picker-content {
        min-width: 0;
    }
}

/* docs/detection-feedback.md "Corrections, for everyone" (display only): what people corrected on a detection, said in
   small secondary text (never amber: it is no warning), and a detection marked "Not an object" dimmed; the pointer or
   the keyboard on it brings it back so it can still be read and rated. */
.feedback-correction {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.feedback-not-an-object {
    opacity: 0.5;
    transition: opacity 120ms ease;
}

.feedback-not-an-object:hover,
.feedback-not-an-object:focus-within {
    opacity: 0.9;
}

/* #17772 (docs/playback-marks.md "Zoom"): js/picture-zoom.js, the recording player's and the live view's zoom. The badge
   ("3x") at the picture's top right while zoomed (the script places it by the picture's box); it takes no pointer and is
   not read out (the buttons say the zoom). A zoomed picture is dragged: grab, grabbing while it pans. */
.picture-zoom-badge {
    position: absolute;
    top: var(--s-2);
    right: var(--s-2);
    z-index: 2;
    padding: var(--s-1) var(--s-2);
    border-radius: var(--r-pill);
    background: var(--c-scrim);
    color: var(--c-text);
    font-size: var(--fs-caption);
    font-weight: var(--fw-semibold);
    line-height: 1.2;
    pointer-events: none;
    user-select: none;
}

.picture-zoom-badge[hidden] {
    display: none;
}

.picture-zoom-zoomed {
    cursor: grab;
}

.picture-zoom-zoomed.picture-zoom-panning {
    cursor: grabbing;
}

/* a box under the mouse of the zoomed recording player (js/playback-select.js): a press there selects it */
.playback-over-box .picture-zoom-zoomed:not(.picture-zoom-panning) {
    cursor: pointer;
}

/* Line icons (CamraIcons): one stroke for every size, the caps rounded; a 16px icon a touch heavier so it holds */
.camra-icon {
    fill: none;
    stroke: currentColor;
    stroke-width: var(--icon-stroke, 1.75);
    stroke-linecap: round;
    stroke-linejoin: round;
}
.camra-icon.camra-icon-fill { fill: currentColor; }
.mud-icon-size-small .camra-icon { --icon-stroke: 2; }
.mud-icon-size-large .camra-icon { --icon-stroke: 1.5; }

/* ── The camera drawer (Cameras): the still's age burnt into its corner, what needs attention as one tinted panel ── */
.camera-thumb-caption--inside {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 1;
    padding: 2px 6px;
    border-radius: var(--r-xs);
    background: var(--c-scrim);
    color: var(--c-text);
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: -0.01em;
    line-height: 16px;
    pointer-events: auto;
}

.camera-thumb-caption--inside.camera-thumb-caption--stale {
    color: color-mix(in srgb, var(--c-warning) 88%, white);
}

.camera-attention.mud-paper,
.agent-attention.mud-paper {
    padding: var(--s-3) var(--s-4) !important;
    border: 1px solid color-mix(in srgb, var(--c-warning) 20%, transparent) !important;
    border-radius: var(--r-lg);
    background: color-mix(in srgb, var(--c-warning) 6%, var(--c-surface));
    box-shadow: none;
}

.camera-attention .mud-typography-subtitle2,
.agent-attention .mud-typography-subtitle2 {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-menu);
    font-weight: var(--fw-semibold);
}

.camera-attention .mud-typography-subtitle2 .mud-icon-root,
.agent-attention .mud-typography-subtitle2 .mud-icon-root {
    width: 16px;
    height: 16px;
    margin: 0 !important;
}

.camera-summary {
    font-size: var(--fs-small);
}

/* the drawer's title at the Section size; its subtitle (presence) a quiet line close under it */
.row-details-drawer .row-details-title {
    font-size: var(--fs-section);
    letter-spacing: var(--ls-section);
}

/* ── An alert's Resolve (AlertActions), wherever it stands: the small secondary button (the raised surface, the line,
   the text colour), never an orange outline nor orange text mid-line; its confirm stays the red text button ── */
.mud-button-root.alert-action-resolve {
    padding-inline: var(--s-3);
    border: 0;
    background-color: var(--c-surface-raised);
    box-shadow: var(--ring-button);
    color: var(--c-text);
}

.mud-button-root.alert-action-resolve:hover {
    background-color: var(--c-fill-secondary-hover);
    box-shadow: var(--ring-input-hover);
}

.mud-button-root.alert-action-resolve.mud-button-disabled {
    color: var(--c-text-disabled);
}

/* ── A company's or a unit's People section (ScopePeople): its title and sentence, Add person on the right; on a phone
   the button takes the line under the sentence (beside it, it ran past the screen's edge) ── */
div.scope-people-head {
    flex-wrap: wrap !important;
    row-gap: var(--s-3);
}

div.scope-people-head__text {
    flex: 1 1 20rem;
    min-width: 0;
}

.scope-people-head__text .mud-typography-caption {
    max-width: 72ch;
}

/* ── A plate typed by a guard (Check a plate, Record a violation): the plate chip's voice in the field, mono caps at
   the Section size with a plate's spacing, so what is typed reads as the plate on the car ── */
.camra-plate-input .mud-input-slot {
    font-family: var(--font-mono);
    font-size: var(--fs-section);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.camra-plate-input .mud-input-slot::placeholder {
    font-family: var(--font-sans);
    font-weight: var(--fw-regular);
    letter-spacing: 0;
    text-transform: none;
}

/* #17889: a camera's favorite star (Shared/Favorites/FavoriteStar): an outline in the quiet text colour, filled in the
   brand colour when the camera is a favorite (the brand colour is selection: a toggle that is on). Each selector repeats
   the general icon button rule's :not() chain, which outweighs a plain ".x .mud-icon-button" (it left the star grey) */
.favorite-star { display: inline-flex; align-items: center; }
.favorite-star .mud-icon-button:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) { color: var(--c-text-2, var(--mud-palette-text-secondary)); }
.favorite-star--on .mud-icon-button:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) { color: var(--c-brand, var(--mud-palette-primary)); }
.favorite-star--on-picture .mud-icon-button:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) {
    background: var(--c-scrim);
    color: var(--c-white);
}
.favorite-star--on-picture.favorite-star--on .mud-icon-button:not(.mud-ripple-checkbox):not(.mud-ripple-radio):not(.mud-switch-base) { color: var(--c-brand, var(--mud-palette-primary)); }
