﻿/* Resqon design system (web).
   Follows the Resqon design system (tokens.json + README, Nov 2026), shared with the phone app.
   Colours live only in the theme files (themes/light.css, themes/night.css: the same token names); this file holds shape, type and components, mapped onto Tabler's own variables
   so every existing view picks them up. Components use the tokens, never a hex of their own; the
   map's data colours (segments, tracks, routes, radio) are the exception, as they sit on map tiles
   that look the same in every theme. Loaded after Tabler and the theme in _Layout.cshtml. */

/* ---------- Font: Inter (variable), self-hosted, OFL — see fonts/inter/LICENSE.txt ---------- */
@font-face {
    font-family: "Inter Var";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Inter Var";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("../fonts/inter/inter-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens that don't change with the theme (colours are in themes/*.css) ---------- */
:root {
    /* Shape (design system: radius-sm/md/lg/xl/sheet/pill) */
    --rq-radius-sm: 8px;      /* small buttons, tags, inputs in tables */
    --rq-radius-md: 10px;     /* buttons and inputs */
    --rq-radius-lg: 14px;     /* floating panels, toasts */
    --rq-radius-xl: 16px;     /* cards, dialogs */
    --rq-radius-pill: 999px;  /* status pills, switches */
    /* The older names, kept for every rule written against them */
    --rq-radius-control: var(--rq-radius-md);
    --rq-radius-card: var(--rq-radius-xl);
    --rq-radius-modal: var(--rq-radius-xl);
    --rq-radius-badge: var(--rq-radius-sm);

    --rq-space-1: 4px; --rq-space-2: 8px; --rq-space-3: 12px; --rq-space-4: 16px;
    --rq-space-6: 24px; --rq-space-8: 32px; --rq-space-10: 40px;
    --rq-control-height: 2.5rem;  /* 40 px */
    --rq-row-height: 2.875rem;    /* 46 px */
    --rq-duration: 150ms;

    --rq-sidebar-width: 15.5rem;
    --rq-topbar-height: 4rem;     /* 64 px */
}

/* ---------- Tokens → Tabler (every theme) ---------- */
:root,
[data-theme] {
    --tblr-font-sans-serif: "Inter Var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --tblr-body-bg: var(--rq-bg);
    --tblr-body-color: var(--rq-text);
    --tblr-body-color-rgb: var(--rq-text-rgb);
    --tblr-emphasis-color: var(--rq-navy);
    --tblr-bg-surface: var(--rq-surface);
    --tblr-bg-surface-secondary: var(--rq-surface-alt);
    --tblr-bg-surface-tertiary: var(--rq-surface-alt);
    --tblr-border-color: var(--rq-border);
    --tblr-border-color-translucent: var(--rq-border-soft);
    --tblr-bg-forms: var(--rq-surface);
    --tblr-border-radius: var(--rq-radius-md);
    --tblr-border-radius-sm: var(--rq-radius-sm);
    --tblr-border-radius-lg: var(--rq-radius-xl);
    --tblr-border-radius-pill: var(--rq-radius-pill);

    /* Primary = navy (design system): primary buttons, selected chips, checks. Red is only for the
       one urgent action (.btn-urgent) and for the brand accents. */
    --tblr-primary: var(--rq-primary);
    --tblr-primary-rgb: var(--rq-primary-rgb);
    --tblr-primary-fg: var(--rq-on-primary);
    --tblr-primary-darken: var(--rq-primary-hover);
    --tblr-primary-lt: var(--rq-neutral-bg);
    --tblr-primary-lt-rgb: var(--rq-neutral-bg-rgb);
    --tblr-primary-text-emphasis: var(--rq-navy);
    --tblr-primary-bg-subtle: var(--rq-neutral-bg);
    --tblr-primary-border-subtle: var(--rq-border-strong);

    --tblr-secondary: var(--rq-text-muted);
    --tblr-secondary-rgb: var(--rq-text-muted-rgb);
    --tblr-secondary-color: var(--rq-text-muted);
    --tblr-muted: var(--rq-text-muted);
    --tblr-muted-rgb: var(--rq-text-muted-rgb);
    --tblr-secondary-lt-rgb: var(--rq-neutral-bg-rgb);
    --tblr-dark: var(--rq-navy);
    --tblr-dark-rgb: var(--rq-navy-rgb);

    --tblr-link-color: var(--rq-link);
    --tblr-link-color-rgb: var(--rq-link-rgb);
    --tblr-link-hover-color: var(--rq-link-hover);
    --tblr-link-hover-color-rgb: var(--rq-link-hover-rgb);
    --tblr-focus-ring-color: var(--rq-focus-ring-color);

    /* Status colours: Tabler's named colours (bg-green, bg-green-lt, text-red …, used across the
       views) speak the semantic palette, so badges and alerts read the same everywhere. */
    --tblr-green: var(--rq-success);   --tblr-green-rgb: var(--rq-success-rgb);   --tblr-green-lt: var(--rq-success-bg);   --tblr-green-lt-rgb: var(--rq-success-bg-rgb);
    --tblr-success: var(--rq-success); --tblr-success-rgb: var(--rq-success-rgb); --tblr-success-lt: var(--rq-success-bg); --tblr-success-lt-rgb: var(--rq-success-bg-rgb);
    --tblr-blue: var(--rq-info);       --tblr-blue-rgb: var(--rq-info-rgb);       --tblr-blue-lt: var(--rq-info-bg);       --tblr-blue-lt-rgb: var(--rq-info-bg-rgb);
    --tblr-info: var(--rq-info);       --tblr-info-rgb: var(--rq-info-rgb);       --tblr-info-lt: var(--rq-info-bg);       --tblr-info-lt-rgb: var(--rq-info-bg-rgb);
    --tblr-yellow: var(--rq-pending);  --tblr-yellow-rgb: var(--rq-pending-rgb);  --tblr-yellow-lt: var(--rq-pending-bg);  --tblr-yellow-lt-rgb: var(--rq-pending-bg-rgb);
    --tblr-orange: var(--rq-warning);  --tblr-orange-rgb: var(--rq-warning-rgb);  --tblr-orange-lt: var(--rq-warning-bg);  --tblr-orange-lt-rgb: var(--rq-warning-bg-rgb);
    --tblr-warning: var(--rq-warning); --tblr-warning-rgb: var(--rq-warning-rgb); --tblr-warning-lt: var(--rq-warning-bg); --tblr-warning-lt-rgb: var(--rq-warning-bg-rgb);
    --tblr-red: var(--rq-danger);      --tblr-red-rgb: var(--rq-danger-rgb);      --tblr-red-lt: var(--rq-danger-bg);      --tblr-red-lt-rgb: var(--rq-danger-bg-rgb);
    --tblr-danger: var(--rq-danger);   --tblr-danger-rgb: var(--rq-danger-rgb);   --tblr-danger-lt: var(--rq-danger-bg);   --tblr-danger-lt-rgb: var(--rq-danger-bg-rgb);
    --tblr-purple: var(--rq-special);  --tblr-purple-rgb: var(--rq-special-rgb);  --tblr-purple-lt: var(--rq-special-bg);  --tblr-purple-lt-rgb: var(--rq-special-bg-rgb);
    --tblr-azure: var(--rq-azure);     --tblr-azure-rgb: var(--rq-azure-rgb);     --tblr-azure-lt: var(--rq-azure-bg);     --tblr-azure-lt-rgb: var(--rq-azure-bg-rgb);
    --tblr-lime: var(--rq-lime);       --tblr-lime-rgb: var(--rq-lime-rgb);       --tblr-lime-lt: var(--rq-lime-bg);       --tblr-lime-lt-rgb: var(--rq-lime-bg-rgb);
    --tblr-teal: var(--rq-teal);       --tblr-teal-rgb: var(--rq-teal-rgb);       --tblr-teal-lt: var(--rq-teal-bg);       --tblr-teal-lt-rgb: var(--rq-teal-bg-rgb);
    --tblr-cyan: var(--rq-cyan);       --tblr-cyan-rgb: var(--rq-cyan-rgb);       --tblr-cyan-lt: var(--rq-cyan-bg);       --tblr-cyan-lt-rgb: var(--rq-cyan-bg-rgb);
    --tblr-indigo: var(--rq-indigo);   --tblr-indigo-rgb: var(--rq-indigo-rgb);   --tblr-indigo-lt: var(--rq-indigo-bg);   --tblr-indigo-lt-rgb: var(--rq-indigo-bg-rgb);
    --tblr-pink: var(--rq-pink);       --tblr-pink-rgb: var(--rq-pink-rgb);       --tblr-pink-lt: var(--rq-pink-bg);       --tblr-pink-lt-rgb: var(--rq-pink-bg-rgb);
    --tblr-success-text-emphasis: var(--rq-success-strong); --tblr-success-bg-subtle: var(--rq-success-bg); --tblr-success-border-subtle: var(--rq-success-border);
    --tblr-info-text-emphasis: var(--rq-info-strong);       --tblr-info-bg-subtle: var(--rq-info-bg);       --tblr-info-border-subtle: var(--rq-info-border);
    --tblr-warning-text-emphasis: var(--rq-warning-strong); --tblr-warning-bg-subtle: var(--rq-warning-bg); --tblr-warning-border-subtle: var(--rq-warning-border);
    --tblr-danger-text-emphasis: var(--rq-danger-strong);   --tblr-danger-bg-subtle: var(--rq-danger-bg);   --tblr-danger-border-subtle: var(--rq-danger-border);

    --tblr-box-shadow-dropdown: var(--rq-shadow-float);
}

/* ---------- Base ---------- */
body {
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
}
.font-monospace, .tabular, code {
    font-variant-numeric: tabular-nums;
}
table, .tabular { font-variant-numeric: tabular-nums; }
a { transition: color var(--rq-duration); }
::selection { background: rgba(var(--rq-brand-rgb), .18); }

/* One focus look everywhere, distinct from the red of errors and the brand. */
:focus-visible { outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible,
summary:focus-visible, .nav-link:focus-visible, .page-link:focus-visible, .dropdown-item:focus-visible {
    outline: 2px solid var(--rq-focus);
    outline-offset: 2px;
    box-shadow: none;
}
.form-control:focus, .form-select:focus, .ts-wrapper.focus .ts-control {
    border-color: var(--rq-focus) !important;
    box-shadow: var(--rq-focus-ring) !important;
}
.form-check-input:focus { border-color: var(--rq-focus); box-shadow: var(--rq-focus-ring); }
.form-check-input:checked { background-color: var(--rq-check); border-color: var(--rq-check); }
/* A switch that is on is green (the web kit). */
.form-switch .form-check-input:checked { background-color: var(--rq-success); border-color: var(--rq-success); }

/* ---------- Typography (design system: web-title, web-section, web-body, web-small, label, figure) ---------- */
.page-title { font-size: 1.25rem; font-weight: 800; line-height: 1.3; color: var(--rq-navy); letter-spacing: -.01em; margin: 0; }
.page-subtitle { color: var(--rq-text-muted); font-size: .75rem; font-weight: 700; line-height: 1.3; }
.page-pretitle { font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-text-muted); }
.card-title { font-size: .9375rem; font-weight: 800; color: var(--rq-navy); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--rq-navy); }
.text-secondary, .text-muted { color: var(--rq-text-muted) !important; }
.small, small { font-size: .8125rem; }
.form-label { font-size: .8125rem; font-weight: 700; color: var(--rq-text); margin-bottom: 6px; }
.form-hint { color: var(--rq-text-muted); font-size: .8125rem; }
/* Uppercase group head: "NEEDS YOU · 3", "ON SCENE · 14". */
.rq-label { font-size: .6875rem; line-height: 1.3; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-text-muted); }
/* A big number: counts, chances, timers. */
.rq-figure { font-size: 1.375rem; line-height: 1.25; font-weight: 800; color: var(--rq-navy); font-variant-numeric: tabular-nums; }

/* ---------- Application shell: sidebar (the navy rail) ---------- */
.navbar-vertical.rq-sidebar {
    --tblr-navbar-bg: var(--rq-sidebar-bg);
    --tblr-navbar-color: var(--rq-sidebar-text);
    --tblr-navbar-hover-color: var(--rq-sidebar-ink);
    --tblr-navbar-active-color: var(--rq-sidebar-ink);
    --tblr-navbar-active-bg: var(--rq-sidebar-active);
    --tblr-navbar-border-color: transparent;
    --tblr-border-color: var(--rq-sidebar-line);
    width: var(--rq-sidebar-width);
    background: var(--rq-sidebar-bg);
    box-shadow: none;
    isolation: isolate;
}
/* The brand's one ornament: a few contour lines at the foot of the rail, behind nothing that matters. */
.rq-sidebar-contours {
    position: absolute; left: 0; right: 0; bottom: 0; height: 15rem; z-index: -1; pointer-events: none;
    color: var(--rq-sidebar-contour);
}
.rq-sidebar-contours svg { width: 100%; height: 100%; display: block; }
.rq-sidebar .navbar-brand { padding: 1rem 1rem .5rem; justify-content: flex-start; }
.rq-sidebar .navbar-brand img { height: 2.25rem; width: auto; max-width: 100%; }

.rq-sidebar .navbar-nav { padding: .25rem .5rem 0; gap: 1px; }
.rq-sidebar .rq-nav-label {
    padding: .75rem .75rem .25rem; font-size: .625rem; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase; color: var(--rq-sidebar-label);
}
.rq-sidebar .navbar-nav .nav-link {
    position: relative; min-height: 2.25rem; padding: .375rem .75rem !important;
    border-radius: var(--rq-radius-sm); color: var(--rq-sidebar-text); font-weight: 600; font-size: .875rem;
    transition: background-color var(--rq-duration), color var(--rq-duration);
}
.rq-sidebar .navbar-nav .nav-link:hover { background: var(--rq-sidebar-hover); color: var(--rq-sidebar-ink); }
.rq-sidebar .navbar-nav .nav-link.active { background: var(--rq-sidebar-active); color: var(--rq-sidebar-ink); font-weight: 700; }
.rq-sidebar .navbar-nav .nav-link.active::before {
    content: ""; position: absolute; left: -.5rem; top: .375rem; bottom: .375rem;
    width: 3px; border-radius: 0 3px 3px 0; background: var(--rq-brand);
}
.rq-sidebar .navbar-nav .nav-link.active .nav-link-icon { color: var(--rq-brand); }
.rq-sidebar .nav-link-icon { width: 1.25rem; margin-right: .625rem; font-size: 1.125rem; color: inherit; opacity: .9; }
/* A nav group that folds (Administration): open while one of its pages is open. */
.rq-nav-group > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: .625rem;
    min-height: 2.25rem; padding: .375rem .75rem; border-radius: var(--rq-radius-sm);
    color: var(--rq-sidebar-text); font-weight: 600; font-size: .875rem;
}
.rq-nav-group > summary::-webkit-details-marker { display: none; }
.rq-nav-group > summary:hover { background: var(--rq-sidebar-hover); color: var(--rq-sidebar-ink); }
.rq-nav-group > summary .nav-link-icon { margin-right: 0; }
.rq-nav-group > summary .rq-nav-group-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-nav-group > summary .rq-nav-chevron { font-size: 1rem; transition: transform var(--rq-duration); }
.rq-nav-group[open] > summary .rq-nav-chevron { transform: rotate(90deg); }
.rq-nav-group > ul { list-style: none; margin: 0; padding: 0 0 0 .5rem; display: grid; gap: 1px; }

/* Who is signed in, at the top of the rail: photo, name, e-mail, station, function. */
.rq-sidebar .rq-user {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
    padding: .5rem .75rem .875rem; margin: 0 .75rem .25rem;
    border-bottom: 1px solid var(--rq-sidebar-line);
}
.rq-sidebar .rq-user .avatar { box-shadow: 0 0 0 2px var(--rq-sidebar-field-border); margin-bottom: .375rem; }
.rq-sidebar .rq-user-name { color: var(--rq-sidebar-ink); font-weight: 800; font-size: .9375rem; line-height: 1.3; }
.rq-sidebar .rq-user-meta { color: var(--rq-sidebar-label); font-size: .75rem; line-height: 1.4; word-break: break-word; }
.rq-sidebar .rq-user-badge {
    margin-top: .375rem; font-size: .6875rem; font-weight: 800; padding: 2px 9px;
    border-radius: var(--rq-radius-pill); background: var(--rq-sidebar-badge-bg); color: var(--rq-sidebar-badge-text);
}
/* Language and sign-out at the foot of the rail. */
.rq-sidebar .rq-sidebar-foot {
    margin-top: auto; padding: .625rem .75rem; border-top: 1px solid var(--rq-sidebar-line);
}
.rq-sidebar .rq-sidebar-tools { display: flex; gap: .5rem; align-items: center; }
/* The colour theme: three small segments on the rail (js/theme.js marks the chosen one). */
.rq-sidebar .rq-theme-switch {
    display: flex; gap: 2px; padding: 2px; margin-bottom: .5rem;
    border-radius: var(--rq-radius-sm); background: var(--rq-sidebar-field); border: 1px solid var(--rq-sidebar-field-border);
}
.rq-sidebar .rq-theme-switch > button {
    flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
    min-height: 1.75rem; padding: 0 .25rem; border: 0; border-radius: 6px; background: transparent;
    color: var(--rq-sidebar-text); font-size: .6875rem; font-weight: 700; white-space: nowrap;
}
.rq-sidebar .rq-theme-switch > button .ti { font-size: .875rem; }
.rq-sidebar .rq-theme-switch > button:hover { color: var(--rq-sidebar-ink); background: var(--rq-sidebar-hover); }
.rq-sidebar .rq-theme-switch > button[aria-pressed="true"] { color: var(--rq-sidebar-ink); background: var(--rq-sidebar-field-border); }
.rq-sidebar .rq-sidebar-foot .form-select {
    --tblr-bg-forms: var(--rq-sidebar-field);
    background-color: var(--rq-sidebar-field); border-color: var(--rq-sidebar-field-border);
    color: var(--rq-sidebar-ink); min-height: 2rem; padding-top: .25rem; padding-bottom: .25rem; font-size: .75rem;
}
.rq-sidebar .rq-sidebar-foot .form-select option { color: var(--rq-text); }
.rq-sidebar .rq-logout {
    color: var(--rq-sidebar-text); white-space: nowrap; font-size: .75rem; font-weight: 600;
    min-height: 2rem; padding: .25rem .625rem; border-radius: var(--rq-radius-sm);
    background: transparent; border: 0; display: inline-flex; align-items: center; gap: .375rem;
}
.rq-sidebar .rq-logout:hover { background: var(--rq-sidebar-hover); color: var(--rq-sidebar-ink); }
/* A thin dark scrollbar when the menu is taller than the screen. */
.rq-sidebar, .rq-sidebar .navbar-collapse { scrollbar-width: thin; scrollbar-color: var(--rq-sidebar-scroll) transparent; }
@media (max-width: 991.98px) {
    .navbar-vertical.rq-sidebar { width: auto; }
    /* Phones and tablets: menu button on the left, the wordmark centred in the bar (the brand takes
       the rest of the row and gives back the button's width on the right, so the centre is the bar's). */
    .rq-sidebar .navbar-toggler { width: 2.75rem; flex: none; padding-left: 0; padding-right: 0; }
    .rq-sidebar .navbar-brand {
        order: 0; flex: 1 1 0; min-width: 0; margin: 0 2.75rem 0 0; padding: .5rem 0;
        display: flex; justify-content: center;
    }
    .rq-sidebar .navbar-brand img { height: 2rem; }
    .rq-sidebar-contours { display: none; }
}

/* ---------- Top bar: where you are (subtitle + title), help and notifications ---------- */
.rq-topbar {
    position: sticky; top: 0; z-index: 1020;
    background: var(--rq-surface); border-bottom: 1px solid var(--rq-border);
}
.rq-topbar-inner { display: flex; align-items: center; gap: .75rem; min-height: var(--rq-topbar-height); padding-top: .5rem; padding-bottom: .5rem; }
.rq-topbar-back { flex: none; display: flex; align-items: center; }
.rq-topbar-back:empty { display: none; }
/* The way back is an arrow beside the title; its words stay for screen readers. */
.rq-topbar-back .btn {
    width: 2.5rem; min-width: 2.5rem; padding: 0; justify-content: center; margin-left: -.5rem;
    font-size: 0; gap: 0; overflow: hidden;
}
.rq-topbar-back .btn .ti { font-size: 1.25rem; margin: 0; }
.rq-topbar-heading { flex: 1 1 auto; min-width: 0; }
.rq-topbar-title-row { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.rq-topbar-title-row > .page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-topbar-title-row > :not(.page-title) { flex: none; }
.rq-topbar-tools { display: flex; align-items: center; gap: .375rem; flex: none; }
.rq-topbar-tools .btn-icon, .rq-topbar-tools .btn { min-width: 2.5rem; }
.rq-topbar-tools .btn-icon .ti { font-size: 1.25rem; }
/* The bell (_NotificationBell) looks like the help button: a bordered square, the unread count a red pill. */
.rq-topbar-tools #notification-bell > .btn {
    --tblr-btn-color: var(--rq-navy); --tblr-btn-bg: var(--rq-surface); --tblr-btn-border-color: var(--rq-border);
    --tblr-btn-hover-bg: var(--rq-surface-alt); --tblr-btn-hover-border-color: var(--rq-border-strong); --tblr-btn-hover-color: var(--rq-navy);
}
.rq-topbar-tools #notification-bell > .btn > .badge {
    --tblr-badge-border-radius: var(--rq-radius-pill); background: var(--rq-brand-strong) !important; color: var(--rq-on-strong) !important;
    min-width: 1.25rem; font-size: .6875rem; font-weight: 800; border: 2px solid var(--rq-surface);
}
@media (max-width: 575.98px) {
    .rq-topbar-inner { gap: .5rem; }
    .page-title { font-size: 1.0625rem; }
    .rq-topbar-title-row { flex-wrap: wrap; row-gap: 2px; }
    .rq-topbar-title-row > .page-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .page-subtitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- Page header: the page's actions (the title is in the top bar) ---------- */
.page-header { margin-top: 0; padding-top: 1rem; padding-bottom: 0; }
/* No icon tile: the title in the top bar names the page. */
.rq-page-icon { display: none; }

/* ---------- Cards: surface, 1 px border, radius-xl, no shadow ---------- */
.card {
    --tblr-card-border-radius: var(--rq-radius-card);
    --tblr-card-inner-border-radius: calc(var(--rq-radius-card) - 1px);
    --tblr-card-border-color: var(--rq-border);
    --tblr-card-box-shadow: none;
    --tblr-card-cap-bg: transparent;
    box-shadow: none;
}
.card-header { min-height: 3.25rem; }
.card-footer { background: var(--rq-surface-alt); }

/* KPI tile: the number first, its label and period right with it. */
.rq-kpi { display: flex; align-items: center; gap: var(--rq-space-4); padding: var(--rq-space-4) var(--rq-space-4); }
.rq-kpi-icon {
    width: 2.75rem; height: 2.75rem; border-radius: 50%; flex: none; font-size: 1.375rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-neutral-bg); color: var(--rq-neutral);
}
.rq-kpi-label { font-size: .6875rem; color: var(--rq-text-muted); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rq-kpi-value { font-size: 1.75rem; font-weight: 800; color: var(--rq-navy); line-height: 1.15; font-variant-numeric: tabular-nums; }
.rq-kpi-hint { font-size: .75rem; color: var(--rq-text-muted); }
a.rq-kpi-card { color: inherit; text-decoration: none; transition: border-color var(--rq-duration), background-color var(--rq-duration); }
a.rq-kpi-card:hover { border-color: var(--rq-border-strong); background: var(--rq-surface-alt); }
a.rq-kpi-card.active { border-color: var(--rq-navy); box-shadow: inset 0 0 0 1px var(--rq-navy); }

/* "Needs you" strip: what waits for the person, each with its action (_NeedsYou). */
.rq-needs {
    display: flex; flex-wrap: wrap; align-items: center; gap: .375rem 1.25rem;
    padding: .625rem 1rem; border-radius: var(--rq-radius-lg);
    background: var(--rq-pending-bg); border: 1px solid var(--rq-warning-border);
}
.rq-needs .rq-label { color: var(--rq-pending); flex: none; }
.rq-needs-items { display: flex; flex-wrap: wrap; gap: .375rem 1.25rem; margin: 0; padding: 0; list-style: none; min-width: 0; }
.rq-needs-item { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .375rem; font-size: .875rem; }
.rq-needs-item b { font-weight: 800; color: var(--rq-text); }
.rq-needs-item a { font-weight: 800; color: var(--rq-link); white-space: nowrap; }

/* ---------- Buttons (heights 32 · 40 · 44; radius-md, small radius-sm) ---------- */
.btn {
    --tblr-btn-font-weight: 700;
    --tblr-btn-border-radius: var(--rq-radius-md);
    --tblr-btn-box-shadow: none;
    min-height: var(--rq-control-height);
    gap: .375rem;
    transition: background-color var(--rq-duration), border-color var(--rq-duration), color var(--rq-duration);
}
.btn-sm, .btn-group-sm > .btn { min-height: 2rem; --tblr-btn-border-radius: var(--rq-radius-sm); }
.btn-lg { min-height: 2.75rem; }
.btn-icon { min-width: var(--rq-control-height); }
.btn-icon.btn-sm { min-width: 2rem; }
/* Primary: the main action of a context, navy. */
.btn-primary {
    --tblr-btn-color: var(--rq-on-primary);
    --tblr-btn-bg: var(--rq-primary);
    --tblr-btn-border-color: var(--rq-primary);
    --tblr-btn-hover-color: var(--rq-on-primary);
    --tblr-btn-hover-bg: var(--rq-primary-hover);
    --tblr-btn-hover-border-color: var(--rq-primary-hover);
    --tblr-btn-active-color: var(--rq-on-primary);
    --tblr-btn-active-bg: var(--rq-primary-hover);
    --tblr-btn-active-border-color: var(--rq-primary-hover);
    --tblr-btn-disabled-color: var(--rq-on-primary);
    --tblr-btn-disabled-bg: var(--rq-primary);
    --tblr-btn-disabled-border-color: var(--rq-primary);
    --tblr-btn-font-weight: 800;
}
/* Outline primary: an emphasised secondary action (navy outline). */
.btn-outline-primary {
    --tblr-btn-color: var(--rq-navy);
    --tblr-btn-bg: var(--rq-surface);
    --tblr-btn-border-color: var(--rq-border-strong);
    --tblr-btn-hover-color: var(--rq-on-primary);
    --tblr-btn-hover-bg: var(--rq-primary);
    --tblr-btn-hover-border-color: var(--rq-primary);
    --tblr-btn-active-color: var(--rq-on-primary);
    --tblr-btn-active-bg: var(--rq-primary-hover);
    --tblr-btn-active-border-color: var(--rq-primary-hover);
}
/* Secondary: surface, navy text, border. */
.btn-outline-secondary, .btn-secondary, .btn-white, .btn-light {
    --tblr-btn-color: var(--rq-navy);
    --tblr-btn-bg: var(--rq-surface);
    --tblr-btn-border-color: var(--rq-border);
    --tblr-btn-hover-color: var(--rq-navy);
    --tblr-btn-hover-bg: var(--rq-surface-alt);
    --tblr-btn-hover-border-color: var(--rq-border-strong);
    --tblr-btn-active-color: var(--rq-navy);
    --tblr-btn-active-bg: var(--rq-neutral-bg);
    --tblr-btn-active-border-color: var(--rq-border-strong);
}
/* Red: the one action that must happen now (call-out, End mission, Record now). One per screen. */
.btn-urgent {
    --tblr-btn-color: var(--rq-on-strong);
    --tblr-btn-bg: var(--rq-brand-strong);
    --tblr-btn-border-color: var(--rq-brand-strong);
    --tblr-btn-hover-color: var(--rq-on-strong);
    --tblr-btn-hover-bg: var(--rq-brand-pressed);
    --tblr-btn-hover-border-color: var(--rq-brand-pressed);
    --tblr-btn-active-color: var(--rq-on-strong);
    --tblr-btn-active-bg: var(--rq-brand-pressed);
    --tblr-btn-active-border-color: var(--rq-brand-pressed);
    --tblr-btn-font-weight: 800;
}
/* Destructive: dark red, always with words saying what goes. */
.btn-danger {
    --tblr-btn-color: var(--rq-on-strong);
    --tblr-btn-hover-color: var(--rq-on-strong);
    --tblr-btn-active-color: var(--rq-on-strong);
    --tblr-btn-bg: var(--rq-danger-fill);
    --tblr-btn-border-color: var(--rq-danger-fill);
    --tblr-btn-hover-bg: var(--rq-danger-fill-pressed);
    --tblr-btn-hover-border-color: var(--rq-danger-fill-pressed);
    --tblr-btn-active-bg: var(--rq-danger-deep);
}
.btn-outline-danger, .btn-ghost-danger { --tblr-btn-color: var(--rq-danger); }
/* While a request is out: no second click, a spinner where the icon was. */
.btn.is-busy { position: relative; pointer-events: none; opacity: .75; }
.btn.is-busy::after {
    content: ""; width: 1em; height: 1em; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: rq-spin .6s linear infinite; flex: none;
}
@keyframes rq-spin { to { transform: rotate(360deg); } }

/* ---------- Form controls ---------- */
.form-control, .form-select {
    min-height: var(--rq-control-height);
    border-radius: var(--rq-radius-md);
    border-color: var(--rq-border);
}
.form-control-sm, .form-select-sm { min-height: 2rem; border-radius: var(--rq-radius-sm); }
textarea.form-control { min-height: 4.5rem; }
.form-control::placeholder { color: var(--rq-placeholder); }
.form-control[readonly]:not(.flatpickr-input), .form-control:disabled, .form-select:disabled {
    background-color: var(--rq-surface-alt); color: var(--rq-text-muted);
}
.input-group > .form-control, .input-group > .form-select, .input-group > .btn { min-height: var(--rq-control-height); }
.input-icon .form-control { min-height: var(--rq-control-height); }
.ts-wrapper.single .ts-control, .ts-wrapper.multi .ts-control { min-height: var(--rq-control-height); border-radius: var(--rq-radius-md); }
/* An error says so in words next to the field (never a red frame on its own). */
.invalid-feedback, .field-validation-error { font-size: .8125rem; font-weight: 500; color: var(--rq-danger); }
@media (pointer: coarse) {
    .btn:not(.btn-sm), .form-control:not(.form-control-sm), .form-select:not(.form-select-sm) { min-height: 2.75rem; }
}

/* Filter bar: one row of controls of the same height above a list. */
.rq-filterbar { display: flex; flex-wrap: wrap; gap: var(--rq-space-2) var(--rq-space-3); align-items: center; }
.rq-filterbar .rq-filter-search { flex: 1 1 18rem; min-width: 12rem; }
.rq-filterbar > .form-select, .rq-filterbar > .rq-filter { flex: 0 1 12rem; min-width: 9rem; }

/* Segmented filter group: a sunk track, the chosen segment raised on the surface; counts beside
   the words ("On scene 14"). Links, buttons, or radios (input + label). */
.rq-seg {
    display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; position: relative;
    border-radius: var(--rq-radius-md); background: var(--rq-surface-sunk);
}
.rq-seg > a, .rq-seg > button, .rq-seg > label {
    display: inline-flex; align-items: center; gap: .375rem; min-height: 2.125rem; padding: 0 .75rem;
    border: 0; border-radius: calc(var(--rq-radius-md) - 3px); background: transparent;
    color: var(--rq-text-muted); font-size: .8125rem; font-weight: 700; text-decoration: none; cursor: pointer;
    white-space: nowrap; transition: background-color var(--rq-duration), color var(--rq-duration);
}
.rq-seg > a:hover, .rq-seg > button:hover, .rq-seg > label:hover { color: var(--rq-text); text-decoration: none; }
.rq-seg > .active, .rq-seg > [aria-current="page"], .rq-seg > [aria-pressed="true"], .rq-seg > input:checked + label {
    background: var(--rq-surface); color: var(--rq-text); box-shadow: var(--rq-shadow-control);
}
.rq-seg > input { position: absolute; opacity: 0; pointer-events: none; }
.rq-seg > input:focus-visible + label { outline: 2px solid var(--rq-focus); outline-offset: 1px; }
.rq-seg-count { font-weight: 800; color: var(--rq-text); font-variant-numeric: tabular-nums; }

/* A group of filter controls swapped as one (tabs + a chip), laid out like the bar itself. */
.rq-filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rq-space-2) var(--rq-space-3); }

/* Toggle chip: a checkbox shown as a pill beside the filters ("Certificate expiring · 5"). */
.rq-chip-check { position: absolute; opacity: 0; pointer-events: none; }
.rq-chip {
    display: inline-flex; align-items: center; gap: .375rem; min-height: var(--rq-control-height); padding: 0 .75rem;
    border: 1px solid var(--rq-border); border-radius: var(--rq-radius-md); background: var(--rq-surface);
    color: var(--rq-text); font-size: .8125rem; font-weight: 700; cursor: pointer; white-space: nowrap; margin: 0;
}
.rq-chip:hover { border-color: var(--rq-border-strong, var(--rq-border)); }
.rq-chip-pending { color: var(--rq-pending); }
.rq-chip-check:checked + .rq-chip-pending { background: var(--rq-pending-bg); border-color: var(--rq-pending); }
.rq-chip-check:focus-visible + .rq-chip { outline: 2px solid var(--rq-focus); outline-offset: 1px; }

/* A rank as a coloured dot and its name (the avatar ring's colour). */
.rq-rank-dot { display: inline-flex; align-items: center; gap: .375rem; font-weight: 600; white-space: nowrap; }
.rq-rank-dot::before { content: ""; width: .5rem; height: .5rem; border-radius: 99px; background: var(--rq-rank, var(--rq-neutral)); flex: none; }

/* Small label tags in a cell (functions, roles, categories). */
.rq-tags { display: flex; flex-wrap: wrap; gap: .25rem; }
.rq-tag {
    display: inline-flex; align-items: center; padding: .125rem .4375rem; border-radius: var(--rq-radius-sm);
    background: var(--rq-surface-sunk); color: var(--rq-text); font-size: .6875rem; font-weight: 800; white-space: nowrap;
}
.rq-tag-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--rq-border); color: var(--rq-text-muted); }
.rq-text-success { color: var(--rq-success); }
.rq-text-pending { color: var(--rq-pending); }
.rq-text-danger { color: var(--rq-danger); }

/* ---------- Badges and status pills ---------- */
.badge {
    --tblr-badge-border-radius: var(--rq-radius-sm);
    --tblr-badge-font-weight: 700;
    --tblr-badge-padding-y: .3125em;
    --tblr-badge-padding-x: .625em;
    --tblr-badge-font-size: .75rem;
    line-height: 1.2;
    letter-spacing: .005em;
}
.badge .ti { font-size: 1em; vertical-align: -.1em; }
/* A filled badge has light text (every filled colour above is dark enough for it). */
.badge:is(.bg-green, .bg-blue, .bg-azure, .bg-yellow, .bg-orange, .bg-red, .bg-purple, .bg-lime, .bg-teal,
          .bg-cyan, .bg-indigo, .bg-pink, .bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger,
          .bg-secondary, .bg-dark) { color: var(--rq-on-status); }
/* Status pill: the state's word on its tint, always words (colour only helps); the same words and
   colours everywhere (design system README: states). */
.rq-status {
    display: inline-flex; align-items: center; gap: .3125rem; white-space: nowrap;
    --tblr-badge-border-radius: var(--rq-radius-pill);
    --tblr-badge-font-weight: 800;
}
.rq-status-success { background: var(--rq-success-bg) !important; color: var(--rq-success) !important; }
.rq-status-info    { background: var(--rq-info-bg) !important;    color: var(--rq-info) !important; }
.rq-status-pending { background: var(--rq-pending-bg) !important; color: var(--rq-pending) !important; }
.rq-status-warning { background: var(--rq-warning-bg) !important; color: var(--rq-warning) !important; }
.rq-status-danger  { background: var(--rq-danger-bg) !important;  color: var(--rq-danger) !important; }
.rq-status-neutral { background: var(--rq-neutral-bg) !important; color: var(--rq-neutral) !important; }
.rq-status-special { background: var(--rq-special-bg) !important; color: var(--rq-special) !important; }
/* A running mission: the one red state, with its live dot. */
.rq-status-urgent  { background: var(--rq-brand-tint) !important; color: var(--rq-brand-text) !important; }
/* No answer: a hollow pill. */
.rq-status-muted   { background: transparent !important; color: var(--rq-text-muted) !important; box-shadow: inset 0 0 0 1px var(--rq-border); }

/* ---------- Tables (head on surface-alt in the label style, soft row lines) ---------- */
.table {
    --tblr-table-hover-bg: rgba(var(--rq-navy-rgb), .025);
    --tblr-table-border-color: var(--rq-border-soft);
}
.table > :not(caption) > * > * { padding: .625rem .75rem; }
.table thead th {
    background: var(--rq-surface-alt);
    font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: var(--rq-text-muted);
    padding-top: .625rem; padding-bottom: .625rem;
    border-bottom: 1px solid var(--rq-border);
}
.table thead th a { color: inherit; }
.table thead th a:hover { color: var(--rq-navy); }
.table tbody tr { transition: background-color var(--rq-duration); }
.card-table tbody tr > * { height: var(--rq-row-height); }
.table-vcenter > :not(caption) > * > * { vertical-align: middle; }
.table-hover > tbody > tr:hover > * { --tblr-table-bg-state: rgba(var(--rq-navy-rgb), .03); }
.rq-cell-title { font-weight: 700; color: var(--rq-navy); }
.rq-cell-sub { font-size: .8125rem; color: var(--rq-text-muted); }
.table .rq-truncate { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* A list keeps its header in view while scrolling a long page (under the sticky top bar). */
.rq-sticky-head thead th { position: sticky; top: var(--rq-topbar-height); z-index: 2; }
/* Inside a box that scrolls on its own, the header sticks to the box's top: the top bar's offset
   there pushed it down over the first rows. */
[class*="rq-scroll-"] > .rq-sticky-head thead th { top: 0; }

/* ---------- Tabs, pagination, dropdowns, alerts ---------- */
/* Tabs: a line under the strip, the active one underlined in brand red (not a box). Card-header
   tabs keep Tabler's own look. */
.nav-tabs:not(.card-header-tabs) { border-bottom: 1px solid var(--rq-border); gap: var(--rq-space-1); }
.nav-tabs:not(.card-header-tabs) .nav-link {
    border: 0; border-bottom: 3px solid transparent; border-radius: 0; margin-bottom: -1px;
    padding: .625rem .875rem; min-height: 2.75rem; font-weight: 600; color: var(--rq-text-muted);
    background: transparent; gap: .375rem;
}
.nav-tabs:not(.card-header-tabs) .nav-link:hover { color: var(--rq-navy); border-bottom-color: var(--rq-border); }
.nav-tabs:not(.card-header-tabs) .nav-link.active {
    color: var(--rq-text); font-weight: 800; border-bottom-color: var(--rq-brand); background: transparent;
}
.nav-tabs .nav-link .badge { background: var(--rq-neutral-bg); color: var(--rq-neutral); --tblr-badge-border-radius: var(--rq-radius-pill); }
.nav-pills { --tblr-nav-pills-link-active-bg: var(--rq-primary); }
.pagination {
    --tblr-pagination-border-radius: var(--rq-radius-sm);
    --tblr-pagination-active-bg: var(--rq-primary);
    --tblr-pagination-active-border-color: var(--rq-primary);
    --tblr-pagination-active-color: var(--rq-on-primary);
    gap: 4px;
}
.page-link { min-width: 2.25rem; min-height: 2.25rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--rq-radius-sm) !important; font-weight: 700; }
.dropdown-menu {
    --tblr-dropdown-border-radius: var(--rq-radius-lg);
    --tblr-dropdown-border-color: var(--rq-border);
    --tblr-dropdown-link-active-bg: var(--rq-neutral-bg);
    --tblr-dropdown-link-active-color: var(--rq-navy);
    box-shadow: var(--rq-shadow-float);
    padding: 4px;
}
.dropdown-item { border-radius: var(--rq-radius-sm); min-height: 2.25rem; display: flex; align-items: center; gap: .5rem; }
.alert { --tblr-alert-border-radius: var(--rq-radius-lg); }
.tooltip { --tblr-tooltip-bg: var(--rq-navy-deep); --tblr-tooltip-color: var(--rq-on-strong); --tblr-tooltip-border-radius: var(--rq-radius-sm); }

/* ---------- Overlays ---------- */
.modal {
    --tblr-modal-border-radius: var(--rq-radius-modal);
    --tblr-modal-inner-border-radius: calc(var(--rq-radius-modal) - 1px);
    --tblr-modal-box-shadow: var(--rq-shadow-float);
}
.modal-backdrop { --tblr-backdrop-bg: var(--rq-backdrop); --tblr-backdrop-opacity: .45; }
.modal-title { font-size: 1.125rem; font-weight: 800; color: var(--rq-navy); }
.modal-footer { background: var(--rq-surface-alt); border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
/* The shared HTMX dialog is modal-lg; a partial whose header carries .rq-dialog-xl (tables,
   member lists, import results) gets the room on desktop. Phones are unchanged. */
@media (min-width: 992px) {
    .modal-dialog:has(.rq-dialog-xl) { max-width: min(1140px, calc(100vw - 4rem)); }
}

/* Toasts: surface with a coloured edge and icon (the text says what happened). */
.rq-toast {
    display: flex; align-items: flex-start; gap: .625rem; min-width: 18rem; max-width: 26rem;
    background: var(--rq-surface); color: var(--rq-text); border: 1px solid var(--rq-border);
    border-left: 4px solid var(--rq-success); border-radius: var(--rq-radius-lg);
    box-shadow: var(--rq-shadow-float); padding: .75rem .75rem .75rem .875rem; margin-bottom: .5rem;
}
.rq-toast .ti { font-size: 1.25rem; color: var(--rq-success); margin-top: 1px; }
.rq-toast.is-error { border-left-color: var(--rq-danger); }
.rq-toast.is-error .ti { color: var(--rq-danger); }
.rq-toast-text { flex: 1; font-weight: 600; line-height: 1.4; }

/* ---------- Empty / loading / error states ---------- */
.empty { padding: var(--rq-space-8) var(--rq-space-4); }
.empty-icon { color: var(--rq-text-muted); }
.empty-title { color: var(--rq-navy); font-weight: 800; }
.rq-empty-icon {
    width: 3.5rem; height: 3.5rem; border-radius: 50%; margin: 0 auto var(--rq-space-3);
    display: flex; align-items: center; justify-content: center;
    background: var(--rq-neutral-bg); color: var(--rq-text-muted); font-size: 1.75rem;
}
.rq-empty.is-error .rq-empty-icon { background: var(--rq-danger-bg); color: var(--rq-danger); }
.rq-skeleton {
    display: block; height: .875rem; border-radius: 4px;
    background: linear-gradient(90deg, var(--rq-neutral-bg) 0%, var(--rq-surface-sunk) 50%, var(--rq-neutral-bg) 100%);
    background-size: 200% 100%; animation: rq-shimmer 1.2s ease-in-out infinite;
}
@keyframes rq-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* HTMX: whatever is being reloaded dims a little instead of jumping. */
.htmx-request.rq-loading-dim, .htmx-request .rq-loading-dim { opacity: .55; transition: opacity var(--rq-duration); }

/* ---------- Footer ---------- */
.footer { border-top: 0; color: var(--rq-text-muted); font-size: .75rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Layout helpers ---------- */
.rq-container { max-width: 110rem; }
.min-w-0 { min-width: 0; }

/* ---------- KPI icon tones ---------- */
.rq-kpi-icon-running { background: var(--rq-brand-tint); color: var(--rq-brand); }
.rq-kpi-icon-warning { background: var(--rq-warning-bg); color: var(--rq-warning); }
.rq-kpi-icon-success { background: var(--rq-success-bg); color: var(--rq-success); }
.rq-kpi-icon-info    { background: var(--rq-info-bg); color: var(--rq-info); }
a.rq-kpi-card { height: 100%; }

/* ---------- Lists: meta line, filters ---------- */
.rq-list-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--rq-space-3);
    padding: .5rem 1rem; font-size: .8125rem; color: var(--rq-text-muted);
    border-bottom: 1px solid var(--rq-border-soft);
}
.rq-reset-link { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; }
.rq-filter-dates { display: flex; align-items: center; gap: .375rem; flex: 0 1 17rem !important; }
.rq-filter-dates .form-control { min-width: 0; }

/* ---------- Mission type picture ---------- */
.rq-type-icon {
    width: 2.25rem; height: 2.25rem; border-radius: var(--rq-radius-control); flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-neutral-bg); color: var(--rq-navy); font-size: 1.25rem;
}
.rq-type-icon.is-running { background: var(--rq-brand-tint); color: var(--rq-brand); }
.rq-type-icon-sm { width: 1.5rem; height: 1.5rem; font-size: 1rem; border-radius: 6px; vertical-align: middle; }
.rq-type-badge { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.rq-icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; }
.rq-icon-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: pointer; text-align: center; }
.rq-icon-option input { position: absolute; opacity: 0; pointer-events: none; }
.rq-icon-option .rq-icon-tile {
    width: 100%; height: 3rem; border-radius: var(--rq-radius-control); border: 1px solid var(--rq-border);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--rq-navy);
    background: var(--rq-surface); transition: border-color var(--rq-duration), background-color var(--rq-duration);
}
.rq-icon-option:hover .rq-icon-tile { background: var(--rq-surface-alt); }
.rq-icon-option input:checked + .rq-icon-tile { border-color: var(--rq-brand); background: var(--rq-brand-tint); color: var(--rq-brand); box-shadow: inset 0 0 0 1px var(--rq-brand); }
.rq-icon-option input:focus-visible + .rq-icon-tile { outline: 2px solid var(--rq-focus); outline-offset: 2px; }
.rq-icon-name { font-size: .6875rem; color: var(--rq-text-muted); line-height: 1.2; }

/* ---------- Missions table ---------- */

.rq-live-dot {
    width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex: none;
    box-shadow: 0 0 0 0 currentColor; animation: rq-pulse 1.8s ease-out infinite;
}
@keyframes rq-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--rq-info-rgb), .45); } 100% { box-shadow: 0 0 0 .4rem rgba(var(--rq-info-rgb), 0); } }
.rq-map-link { color: var(--rq-brand); line-height: 1.5; }
.rq-map-link:hover { color: var(--rq-brand-pressed); }
.rq-participants { display: inline-flex; flex-direction: column; gap: 4px; min-width: 4.5rem; text-decoration: none; }
.rq-meter { display: block; height: 4px; border-radius: 2px; background: var(--rq-neutral-bg); overflow: hidden; width: 4.5rem; }
.rq-meter > span { display: block; height: 100%; background: var(--rq-success); border-radius: 2px; }

/* Phone cards */
.rq-mission-cards { display: flex; flex-direction: column; }
.rq-mission-card {
    display: block; padding: .875rem 1rem; color: inherit; text-decoration: none;
    border-bottom: 1px solid var(--rq-border-soft);
}
.rq-mission-card:hover, .rq-mission-card:focus-visible { background: var(--rq-surface-alt); color: inherit; }
.rq-mission-card-facts { display: flex; flex-wrap: wrap; gap: .25rem .875rem; margin-top: .5rem; font-size: .8125rem; color: var(--rq-text-muted); }
.rq-mission-card-facts span { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; }
.rq-mission-card-facts .ti { font-size: 1rem; }
/* Less important columns only on wide screens (the guide: hide them before shrinking text). */
@media (max-width: 1799.98px) { .rq-col-wide { display: none !important; } }
@media (min-width: 1800px) { .rq-col-narrow { display: none !important; } }
/* The title column takes what is left and truncates (full text in its tooltip), so the table fits
   the screen instead of scrolling sideways. */
.rq-fluid-cell { width: 100%; max-width: 0; min-width: 13rem; }
.rq-fluid-cell .rq-truncate { max-width: 100%; }
.rq-mission-table .rq-location { max-width: 9rem; }
.rq-mission-table .rq-leader { min-width: 7rem; max-width: 9.5rem; line-height: 1.3; }
.rq-mission-table > :not(caption) > * > * { padding-left: .625rem; padding-right: .625rem; }

/* Phones: the counts stay a compact 2 x 2 grid above the list, not a screen of their own. */
@media (max-width: 575.98px) {
    .rq-kpi { gap: var(--rq-space-3); padding: var(--rq-space-3); align-items: flex-start; }
    .rq-kpi-icon { width: 2rem; height: 2rem; font-size: 1.125rem; }
    .rq-kpi-value { font-size: 1.375rem; }
    .rq-kpi-label { font-size: .75rem; line-height: 1.25; }
    .rq-kpi-hint { display: none; }
}

/* ---------- Mission detail ---------- */
/* Label/value list with an icon per row (the mission's basic information). */
.rq-info-list { margin: 0; }
.rq-info-list > div {
    display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: .75rem;
    padding: .625rem 1rem; border-bottom: 1px solid var(--rq-border-soft);
}
.rq-info-list > div:last-child { border-bottom: 0; }
.rq-info-list dt { display: flex; align-items: flex-start; gap: .5rem; font-weight: 500; color: var(--rq-text-muted); }
.rq-info-list dt .ti { font-size: 1.125rem; margin-top: 1px; }
.rq-info-list dd { margin: 0; font-weight: 500; color: var(--rq-text); min-width: 0; }
@media (max-width: 575.98px) { .rq-info-list > div { grid-template-columns: 1fr; gap: .125rem; } }
.rq-coords { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin-top: .125rem; font-size: .8125rem; color: var(--rq-text-muted); }

/* Vertical timeline: a dot per step on a line, done green, skipped grey, the next one ringed. */
.rq-steps { list-style: none; margin: 0; padding: .5rem 1rem; }
.rq-step {
    position: relative; display: grid; grid-template-columns: 2rem 1fr auto auto; align-items: center;
    gap: .25rem .75rem; min-height: 3rem; padding: .375rem 0;
}
.rq-step::before {
    content: ""; position: absolute; left: calc(1rem - 1px); top: 0; bottom: 0; width: 2px; background: var(--rq-border);
}
.rq-step:first-child::before { top: 50%; }
.rq-step:last-child::before { bottom: 50%; }
.rq-step-dot {
    position: relative; z-index: 1; width: 2rem; height: 2rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
    background: var(--rq-surface); border: 2px solid var(--rq-border); color: var(--rq-text-muted);
}
.rq-step.is-done .rq-step-dot { background: var(--rq-success-fill); border-color: var(--rq-success-fill); color: var(--rq-on-strong); }
.rq-step.is-skipped .rq-step-dot { background: var(--rq-neutral-bg); border-style: dashed; }
.rq-step.is-next .rq-step-dot { border-color: var(--rq-brand); color: var(--rq-brand); box-shadow: 0 0 0 4px rgba(var(--rq-brand-rgb), .15); }
.rq-step-label { font-weight: 600; color: var(--rq-navy); }
.rq-step.is-pending .rq-step-label { color: var(--rq-text-muted); font-weight: 500; }
.rq-step-time { color: var(--rq-text); text-align: right; white-space: nowrap; }
.rq-step-actions { display: flex; gap: .375rem; justify-content: flex-end; }
@media (max-width: 575.98px) {
    .rq-step { grid-template-columns: 2rem 1fr auto; }
    .rq-step-actions { grid-column: 2 / -1; justify-content: flex-start; }
}

/* The report card once nothing is missing. */
.rq-report-done {
    display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; border-radius: var(--rq-radius-control);
    background: var(--rq-success-bg); color: var(--rq-success);
}
.rq-report-done .ti { font-size: 1.75rem; }
.rq-report-done .fw-semibold { color: var(--rq-success-strong); }
.rq-inline-link { display: inline-flex; align-items: center; gap: .25rem; font-size: .8125rem; font-weight: 600; }

/* Phones: a tab strip scrolls sideways instead of wrapping onto several lines. */
@media (max-width: 767.98px) {
    .nav-tabs:not(.card-header-tabs) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .nav-tabs:not(.card-header-tabs)::-webkit-scrollbar { display: none; }
    .nav-tabs:not(.card-header-tabs) .nav-link { white-space: nowrap; }
}

/* ---------- Members ---------- */
.rq-row-muted > td, .rq-mission-card.rq-row-muted { opacity: .62; }
@media (max-width: 1399.98px) { .rq-col-mid { display: none !important; } }
.rq-profile-avatar .avatar { width: 8rem; height: 8rem; font-size: 2.75rem; --tblr-avatar-size: 8rem; box-shadow: 0 0 0 4px var(--rq-surface), 0 0 0 5px var(--rq-border); }
.rq-field-label { font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--rq-text-muted); margin-bottom: .25rem; }
.rq-field-value { font-weight: 500; color: var(--rq-text); }
/* Phones: filter selects two to a row under the full-width search, not a column of their own. */
@media (max-width: 575.98px) {
    .rq-filterbar > .form-select, .rq-filterbar > .rq-filter { flex: 1 1 calc(50% - .375rem); min-width: 0; }
    .rq-filterbar > .rq-filter-dates { flex-basis: 100% !important; }
}

/* ---------- Phonebook ---------- */
/* A number is a tap target (min. 40 px; 44 on touch screens), with its kind as an icon. */
.rq-dial-list { display: flex; flex-wrap: wrap; gap: .375rem; }
.rq-dial {
    display: inline-flex; align-items: center; gap: .375rem; min-height: 2.5rem; max-width: 100%;
    padding: .375rem .75rem; border-radius: var(--rq-radius-control);
    background: var(--rq-surface); border: 1px solid var(--rq-border); color: var(--rq-navy);
    font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background-color var(--rq-duration), border-color var(--rq-duration);
}
.rq-dial .ti { font-size: 1.125rem; color: var(--rq-success); }
a.rq-dial:hover { background: var(--rq-success-bg); border-color: var(--rq-success-line); color: var(--rq-navy); text-decoration: none; }
.rq-dial.is-static { font-weight: 500; color: var(--rq-text-muted); background: var(--rq-surface-alt); }
.rq-dial.is-static .ti { color: var(--rq-text-muted); }
.rq-dial.is-mail { white-space: normal; font-weight: 500; }
.rq-dial.is-mail .ti { color: var(--rq-info); }
a.rq-dial.is-mail:hover { background: var(--rq-info-bg); border-color: var(--rq-info-line); }
@media (pointer: coarse) { .rq-dial { min-height: 2.75rem; } }
.rq-phonebook-table .rq-phonebook-name { min-width: 12rem; }

/* A folding group heading inside a list (phonebook categories). */
.rq-group-row > td, .rq-group-button {
    background: var(--rq-surface-alt); cursor: pointer; user-select: none;
    font-size: .75rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--rq-text-muted);
}
.rq-group-row:hover > td, .rq-group-button:hover { color: var(--rq-navy); }
.rq-group-button {
    display: flex; align-items: center; gap: .375rem; width: 100%; min-height: 2.75rem; padding: .5rem 1rem;
    border: 0; border-bottom: 1px solid var(--rq-border-soft); text-align: left;
}
/* Segments folded by ring on the search page (mission-search.js opens them). */
.rq-seg-group:not(.is-open) > .rq-search-row { display: none; }
.rq-seg-group-chevron { transition: transform .15s; }
.rq-seg-group.is-open .rq-seg-group-chevron { transform: rotate(90deg); }
.rq-seg-group-row .rq-group-button { min-height: 2.5rem; border-bottom: 0; }
.rq-seg-group + .rq-seg-group { border-top: 0; }

/* ---------- Organization logos ---------- */
.rq-logo-box {
    height: 7rem; display: flex; align-items: center; justify-content: center; padding: .75rem;
    background: var(--rq-surface-alt); border: 1px solid var(--rq-border-soft); border-radius: var(--rq-radius-control);
}
.rq-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rq-logo-box.no-logo { border-style: dashed; border-color: var(--rq-border); color: var(--rq-text-muted); flex-direction: column; gap: .25rem; }
.rq-form-map { height: 16rem; }
/* The timeline's Now/Skip are field commands: full touch size on phones and tablets. */
@media (pointer: coarse) { .rq-step-actions .btn { min-height: 2.75rem; padding-left: .875rem; padding-right: .875rem; } }

/* ---------- Courses and exams ---------- */
.rq-pre-line { white-space: pre-line; }
.rq-min-14 { min-width: min(100%, 14rem); }
.rq-min-16 { min-width: min(100%, 16rem); }
/* A step of the curriculum, an exam station's number. */
.rq-section-no {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.75rem; height: 1.75rem; padding: 0 .375rem; border-radius: 6px;
    background: var(--rq-neutral-bg); color: var(--rq-navy); font-size: .8125rem; font-weight: 600;
}
.rq-course-table .rq-location { max-width: 12rem; }
.rq-course-table .rq-leader { max-width: 11rem; }
/* The caller's own station's people in a course's or exam's tables; rows set apart (headings, not eligible). */
.rq-row-own > td { background: color-mix(in srgb, var(--rq-info-bg) 55%, transparent); }
.rq-row-alt, .rq-row-alt > td { background: var(--rq-surface-alt); }
/* A suggestion inside a card (an exam type template to start from). */
.rq-callout { background: var(--rq-info-bg); }
/* The details card sits in a narrow column: a shorter label column. */
.rq-info-list.is-compact > div { grid-template-columns: minmax(7rem, 9rem) 1fr; }
.rq-requirements > li + li { margin-top: .25rem; }
/* Course days: the day's number in the dot until its roll call is taken. */
.rq-days .rq-step { grid-template-columns: 2rem 1fr auto; }
.rq-days .rq-step-dot { font-size: .8125rem; font-weight: 600; }
/* The roll-call button stays beside its day on phones too (the mission steps put theirs below). */
.rq-days .rq-step-actions { grid-column: auto; }
.rq-filterbar > .rq-filter-wide { flex: 0 1 22rem; }

/* ---------- Activities and station events ---------- */
/* What I answered to a station event: a pill that can't be missed. */
.rq-answer-pill { font-size: .8125rem; padding: .25rem .5rem; }
.rq-event-bar { height: .625rem; }
.rq-dot-neutral { background: var(--rq-border); }
.station-event-description {
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line;
}

/* ---------- Segmented control (one of a few choices; the chosen one raised on a sunk track) ---------- */
.rq-segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--rq-radius-md); background: var(--rq-surface-sunk); }
.rq-segmented > button {
    border: 0; border-radius: calc(var(--rq-radius-md) - 3px); background: transparent; color: var(--rq-text-muted); font-weight: 700; font-size: .8125rem;
    min-height: calc(var(--rq-control-height) - 6px); padding: 0 .875rem; display: inline-flex; align-items: center; gap: .375rem;
}
.rq-segmented > button:hover { color: var(--rq-text); }
.rq-segmented > button.active { background: var(--rq-surface); color: var(--rq-text); box-shadow: var(--rq-shadow-control); }
.rq-segmented > button:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: -2px; }

/* ---------- Calendar ---------- */
/* One colour per kind (legend, events, the upcoming list): activity blue, course green, exam purple, event orange. */
.rq-ev-activity { --ev: var(--rq-info); }
.rq-ev-course { --ev: var(--rq-success); }
.rq-ev-exam { --ev: var(--rq-special); }
.rq-ev-event { --ev: var(--rq-event); }
.rq-cal-bar { gap: var(--rq-space-3); }
.rq-cal-bar .rq-filter-search { flex: 1 1 12rem; max-width: 18rem; min-width: 10rem; }
.rq-cal-stations { flex: 0 1 16rem; min-width: 12rem; }
.rq-cal-legend { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.rq-cal-chip {
    display: inline-flex; align-items: center; gap: .375rem; border: 0; background: transparent; padding: .25rem .375rem;
    border-radius: 6px; font-size: .8125rem; font-weight: 500; color: var(--rq-text);
}
.rq-cal-chip:hover { background: var(--rq-surface-alt); }
.rq-cal-chip.is-off { opacity: .45; text-decoration: line-through; }
.rq-cal-dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--ev); }

.rq-calendar {
    --fc-border-color: var(--rq-border-soft); --fc-page-bg-color: var(--rq-surface);
    --fc-today-bg-color: rgba(var(--rq-brand-rgb), .04); --fc-neutral-bg-color: var(--rq-surface-alt);
    --fc-list-event-hover-bg-color: var(--rq-surface-alt);
}
.rq-calendar .fc-toolbar.fc-header-toolbar { margin-bottom: 1rem; }
.rq-calendar .fc-toolbar-title { font-size: 1.25rem; font-weight: 700; color: var(--rq-navy); text-transform: capitalize; }
/* FullCalendar's buttons as ours: white with a grey border; the view chosen in brand red. */
.rq-calendar .fc-button {
    background: var(--rq-surface); border: 1px solid var(--rq-border); color: var(--rq-navy); font-weight: 600; font-size: .875rem;
    min-height: var(--rq-control-height); padding: 0 .875rem; border-radius: var(--rq-radius-control); box-shadow: none !important; text-transform: capitalize;
}
.rq-calendar .fc-button:hover { background: var(--rq-surface-alt); color: var(--rq-navy); border-color: var(--rq-border); }
.rq-calendar .fc-button:disabled { opacity: .5; background: var(--rq-surface); color: var(--rq-navy); }
.rq-calendar .fc-button-primary:not(:disabled).fc-button-active,
.rq-calendar .fc-button-primary:not(:disabled):active { background: var(--rq-primary); border-color: var(--rq-primary); color: var(--rq-on-primary); }
.rq-calendar .fc-button:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: 1px; }
.rq-calendar .fc-prev-button, .rq-calendar .fc-next-button { padding: 0 .625rem; }
.rq-calendar .fc-col-header-cell { background: var(--rq-surface-alt); }
.rq-calendar .fc-col-header-cell-cushion { padding: .5rem; font-size: .8125rem; font-weight: 600; color: var(--rq-text-muted); text-transform: capitalize; }
.rq-calendar .fc-daygrid-day-frame { min-height: 6rem; }
.rq-calendar .fc-daygrid-day-number { font-size: .8125rem; font-weight: 500; color: var(--rq-text); padding: .375rem .5rem; }
.rq-calendar .fc-day-other .fc-daygrid-day-number { color: var(--rq-text-muted); opacity: .6; }
/* Today: the number in a red circle. */
.rq-calendar .fc-day-today .fc-daygrid-day-number {
    background: var(--rq-brand); color: var(--rq-on-strong); border-radius: 50%; width: 1.75rem; height: 1.75rem; padding: 0;
    display: inline-flex; align-items: center; justify-content: center; margin: .25rem;
}
/* Entries: tinted in their kind's colour with a strong left edge, the time under the title. */
.rq-calendar .rq-ev:not(.fc-list-event) {
    background: color-mix(in srgb, var(--ev) 12%, var(--rq-surface)); border: 0; border-left: 3px solid var(--ev);
    border-radius: 6px; margin: 1px 4px 3px; padding: .1875rem .375rem; color: var(--rq-text); cursor: pointer;
}
.rq-calendar .rq-ev:not(.fc-list-event):hover { background: color-mix(in srgb, var(--ev) 20%, var(--rq-surface)); }
.rq-calendar .rq-ev .fc-event-main { color: inherit; }
.rq-ev-body { min-width: 0; line-height: 1.25; }
.rq-ev-title { font-size: .75rem; font-weight: 600; color: color-mix(in srgb, var(--ev) 70%, var(--rq-text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-ev-time { font-size: .6875rem; color: var(--rq-text-muted); font-variant-numeric: tabular-nums; }
.rq-calendar .fc-list-event-dot { border-color: var(--ev); }
.rq-calendar .fc-daygrid-more-link { font-size: .75rem; font-weight: 600; color: var(--rq-link); margin-left: 4px; }
.rq-calendar .cal-waiting { opacity: .75; border-left-style: dashed; }
.rq-calendar .cal-open { opacity: .7; background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, .5) 6px 12px); }
.rq-calendar .cal-draft { opacity: .55; }
.rq-calendar .cal-hosted { --ev: var(--rq-hosted-ink); }
.rq-calendar .cal-cancelled, .rq-calendar .cal-declined { opacity: .5; }
.rq-calendar .cal-cancelled .rq-ev-title, .rq-calendar .cal-cancelled .fc-list-event-title { text-decoration: line-through; }
@media (max-width: 767.98px) {
    .rq-calendar .fc-header-toolbar { flex-wrap: wrap; gap: .5rem; }
    .rq-calendar .fc-toolbar-title { font-size: 1.0625rem; }
}

/* The small month beside it. */
.rq-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.rq-mini-head { font-size: .6875rem; font-weight: 600; color: var(--rq-text-muted); padding: .25rem 0; text-transform: uppercase; }
.rq-mini-day {
    position: relative; border: 0; background: transparent; border-radius: 50%; aspect-ratio: 1; max-width: 2rem; width: 100%; margin: 0 auto;
    font-size: .75rem; color: var(--rq-text); font-variant-numeric: tabular-nums;
}
.rq-mini-day:hover { background: var(--rq-surface-alt); }
.rq-mini-day.is-other { color: var(--rq-text-muted); opacity: .55; }
.rq-mini-day.has-events::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--rq-text-muted); }
.rq-mini-day.is-today { background: var(--rq-brand); color: var(--rq-on-strong); font-weight: 600; }
.rq-mini-day.is-today::after { background: var(--rq-on-strong); }

/* Upcoming: a date tile, the kind's icon, title and time. */
.rq-upcoming { display: flex; align-items: center; gap: .75rem; }
.rq-upcoming-date {
    flex: none; width: 2.75rem; display: flex; flex-direction: column; align-items: center; line-height: 1.1;
    border: 1px solid var(--rq-border); border-radius: 8px; padding: .25rem 0;
}
.rq-upcoming-date strong { font-size: 1rem; color: var(--rq-navy); }
.rq-upcoming-date span { font-size: .625rem; font-weight: 600; text-transform: uppercase; color: var(--rq-text-muted); }
.rq-upcoming-icon {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--ev) 14%, var(--rq-surface)); color: var(--ev); font-size: 1.125rem;
}
.rq-calendar .fc-list-day-cushion a { color: var(--rq-navy); font-weight: 600; text-transform: capitalize; }

/* ---------- Gear ---------- */
.rq-empty-hide:empty { display: none !important; }
.rq-skeleton-block { height: 8rem; border-radius: var(--rq-radius-control); }
.datagrid-title { font-size: .75rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--rq-text-muted); }
/* A loan's history: a dot per step on a line, the newest last. */
.rq-history .rq-step { grid-template-columns: 2rem 1fr; align-items: start; }
.rq-history .rq-step-dot { width: 1.25rem; height: 1.25rem; margin: .125rem .375rem 0; font-size: .75rem; }
.rq-history .rq-step::before { left: calc(1rem - 1px); }
.rq-kpi-icon-pending { background: var(--rq-pending-bg); color: var(--rq-pending); }
.rq-kpi-icon-danger  { background: var(--rq-danger-bg); color: var(--rq-danger); }
.rq-kpi-icon-special { background: var(--rq-special-bg); color: var(--rq-special); }
.rq-kpi-icon-neutral { background: var(--rq-neutral-bg); color: var(--rq-neutral); }

/* ---------- Statistics ---------- */
.rq-tone-info { background: var(--rq-info); }
.rq-tone-success { background: var(--rq-success); }
.rq-tone-danger { background: var(--rq-danger); }
.rq-tone-warning { background: var(--rq-warning); }
.rq-tone-special { background: var(--rq-special); }
/* Missions per month: a bar per month, the count over it, the month under it. */
.rq-month-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: .375rem; height: 13rem; }
.rq-month { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.rq-month-count { font-size: .75rem; font-weight: 600; color: var(--rq-text-muted); min-height: 1.125rem; font-variant-numeric: tabular-nums; }
.rq-month-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; min-height: 0; }
.rq-month-bar { width: 100%; max-width: 2.5rem; border-radius: 4px 4px 0 0; background: var(--rq-info); }
.rq-month-label { font-size: .6875rem; color: var(--rq-text-muted); margin-top: .25rem; padding-top: .25rem; border-top: 1px solid var(--rq-border); width: 100%; text-align: center; text-transform: capitalize; }
.rq-breakdown + .rq-breakdown { margin-top: .625rem; }
.rq-breakdown-track { height: .5rem; border-radius: 4px; background: var(--rq-neutral-bg); overflow: hidden; margin-top: .25rem; }
.rq-breakdown-bar { display: block; height: 100%; border-radius: 4px; }
.rq-scroll-32 { max-height: 32rem; overflow-y: auto; }

/* ---------- Administration ---------- */
/* A list of choices beside a panel (reference tables, organizations, languages): the chosen one marked like the menu. */
.rq-subnav { display: flex; flex-direction: column; padding: .375rem; gap: 1px; }
.rq-subnav-label {
    font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-text-muted);
    padding: .75rem .75rem .25rem;
}
.rq-subnav-label:first-child { padding-top: .375rem; }
.rq-subnav-item {
    position: relative; display: flex; align-items: center; gap: .625rem; width: 100%; min-height: 2.5rem;
    padding: .375rem .75rem; border: 0; border-radius: 8px; background: transparent; color: var(--rq-text);
    font-weight: 500; font-size: .875rem; text-align: left;
}
.rq-subnav-item .ti { font-size: 1.125rem; color: var(--rq-text-muted); }
.rq-subnav-item.is-nested { padding-left: 2.25rem; }
.rq-subnav-item:hover:not(:disabled) { background: var(--rq-surface-alt); }
.rq-subnav-item:disabled { opacity: .45; cursor: not-allowed; }
.rq-subnav-item.active, .rq-subnav-row.active { background: var(--rq-brand-tint); color: var(--rq-navy); font-weight: 600; }
.rq-subnav-item.active .ti { color: var(--rq-brand); }
.rq-subnav-item.active::before, .rq-subnav-row.active::before {
    content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 3px; border-radius: 2px; background: var(--rq-brand);
}
.rq-subnav-row { position: relative; display: flex; align-items: center; border-radius: 8px; }
.rq-subnav-row:hover { background: var(--rq-surface-alt); }
.rq-subnav-row.active .rq-subnav-item { background: transparent; }
.rq-w-25 { width: 25%; }
.rq-w-30 { width: 30%; }
.rq-section-title { font-size: 1.0625rem; font-weight: 600; color: var(--rq-navy); }
/* Audit changes: old value struck out red, new one green. */
.audit-changes { margin: 0; padding: 0; list-style: none; font-size: .8125rem; }
.audit-changes li { overflow-wrap: anywhere; }
.audit-changes .audit-col { color: var(--rq-text-muted); margin-right: .25rem; }
.audit-changes del { color: var(--rq-danger); text-decoration: line-through; }
.audit-changes ins { color: var(--rq-success); text-decoration: none; }
.audit-changes summary { cursor: pointer; color: var(--rq-text-muted); }
/* Notifications: unread ones tinted with a brand edge. */
.rq-notification { position: relative; }
.rq-notification.is-unread { background: var(--rq-brand-tint); }
.rq-notification.is-unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rq-brand); }
.rq-notification-icon {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-neutral-bg); color: var(--rq-neutral); font-size: 1.125rem;
}
.rq-notification.is-unread .rq-notification-icon { background: var(--rq-surface); color: var(--rq-brand); }

/* ---------- Dialogs ---------- */
.modal-title .ti { color: var(--rq-brand); }
/* Go ahead despite warnings: the warning colour, white text (AA). */
.btn-warning {
    --tblr-btn-bg: var(--rq-warning-fill); --tblr-btn-border-color: var(--rq-warning-fill); --tblr-btn-color: var(--rq-on-strong);
    --tblr-btn-hover-bg: var(--rq-warning-pressed); --tblr-btn-hover-border-color: var(--rq-warning-pressed); --tblr-btn-hover-color: var(--rq-on-strong);
    --tblr-btn-active-bg: var(--rq-warning-pressed); --tblr-btn-active-border-color: var(--rq-warning-pressed);
}
/* Long lists inside a dialog scroll on their own; the footer stays in view. */
.rq-scroll-45 { max-height: 45vh; overflow-y: auto; }
.rq-scroll-50 { max-height: 50vh; overflow-y: auto; }
.rq-scroll-55 { max-height: 55vh; overflow-y: auto; }
.rq-qty { width: 5rem; }
/* Numbered pieces to tick (handover, issue, transfers): a grid of small cards, ticked ones in the info colour. */
.rq-piece-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem; }
.rq-piece-choice {
    display: flex; gap: .5rem; align-items: flex-start; padding: .5rem; cursor: pointer;
    border: 1px solid var(--rq-border); border-radius: var(--rq-radius-control); background: var(--rq-surface);
}
.rq-piece-choice:has(input:checked) { border-color: var(--rq-info); background: var(--rq-info-bg); }
.rq-piece-choice .form-check-input { margin-top: .2rem; flex-shrink: 0; }
.rq-piece-no { font-weight: 600; font-variant-numeric: tabular-nums; }
.rq-piece-meta { font-size: .75rem; color: var(--rq-text-muted); line-height: 1.3; }
.rq-mw-7 { max-width: 7rem; }
.rq-mw-10 { max-width: 10rem; }
.rq-mw-12 { max-width: 12rem; }
.rq-mw-16 { max-width: 16rem; }
.rq-mw-18 { max-width: 18rem; }
.rq-min-4 { min-width: 4.5rem; }
.rq-min-10 { min-width: 10rem; }
.rq-min-12 { min-width: 12rem; }
.rq-w-7rem { width: 7rem; }
.rq-w-11rem { width: 11rem; }
.rq-w-45 { width: 45%; }

/* ---------- Members' mission pages ---------- */
/* An empty state only once the last card is gone (e.g. after declining). */
.member-cards:not(:has(.member-card)) { display: none; }
.member-cards:has(.member-card) + .member-empty { display: none; }
.member-card-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rq-reserve-form { background: var(--rq-warning-bg); }
.rq-mw-24 { max-width: 24rem; }

/* ---------- User guide (/Guide) ---------- */
.rq-guide-role {
    display: flex; align-items: flex-start; gap: var(--rq-space-2);
    padding: var(--rq-space-3) var(--rq-space-4); border-radius: var(--rq-radius-card);
    background: var(--rq-info-bg); color: var(--rq-info);
}
.rq-guide-role .ti { font-size: 1.25rem; line-height: 1.25; }
a.rq-guide-card { color: inherit; text-decoration: none; transition: border-color var(--rq-duration), background-color var(--rq-duration); }
a.rq-guide-card:hover { border-color: var(--rq-border-strong); background: var(--rq-surface-alt); }
.rq-guide-card-icon {
    width: 2.75rem; height: 2.75rem; border-radius: var(--rq-radius-card); flex: none; font-size: 1.375rem;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-brand-tint); color: var(--rq-brand);
}
.rq-guide-card-title { font-weight: 600; color: var(--rq-navy); margin-bottom: .25rem; }
.rq-guide-card-text { font-size: .875rem; color: var(--rq-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rq-guide-nav { position: sticky; top: 1rem; }
.rq-guide-nav .list-group-item.active { border-left: 3px solid var(--rq-brand); }
.rq-guide-toc { padding: var(--rq-space-3) var(--rq-space-4); margin-bottom: var(--rq-space-6); border-radius: var(--rq-radius-control); background: var(--rq-surface-alt); border: 1px solid var(--rq-border-soft); }
.rq-guide-toc ul { list-style: none; margin: 0; padding: 0; columns: 2 16rem; column-gap: var(--rq-space-6); }
.rq-guide-toc li { padding: .125rem 0; break-inside: avoid; }
.rq-guide-contents { margin: 0; columns: 2 16rem; column-gap: var(--rq-space-6); }
.rq-guide-step { display: flex; flex-direction: column; text-decoration: none; max-width: 48%; }
.rq-guide-step .rq-field-label { margin-bottom: 0; }
.rq-guide-chapter-title { display: flex; align-items: center; gap: var(--rq-space-2); font-size: 1.5rem; color: var(--rq-navy); margin-bottom: var(--rq-space-4); }
.rq-guide-chapter-title .ti { color: var(--rq-brand); }

/* The chapter text: readable line length, clear headings, notes as info boxes. */
.rq-guide { max-width: 52rem; line-height: 1.6; }
.rq-guide h2 { font-size: 1.25rem; color: var(--rq-navy); margin: var(--rq-space-8) 0 var(--rq-space-3); padding-top: var(--rq-space-2); border-top: 1px solid var(--rq-border-soft); scroll-margin-top: 1rem; }
.rq-guide > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rq-guide h3 { font-size: 1rem; color: var(--rq-navy); margin: var(--rq-space-6) 0 var(--rq-space-2); scroll-margin-top: 1rem; }
.rq-guide p, .rq-guide ul, .rq-guide ol { margin-bottom: var(--rq-space-3); }
.rq-guide li { margin-bottom: .25rem; }
.rq-guide li > ul, .rq-guide li > ol { margin-top: .25rem; margin-bottom: 0; }
.rq-guide strong { color: var(--rq-navy); }
.rq-guide blockquote {
    margin: var(--rq-space-4) 0; padding: var(--rq-space-3) var(--rq-space-4);
    border-left: 4px solid var(--rq-info); border-radius: 0 var(--rq-radius-control) var(--rq-radius-control) 0;
    background: var(--rq-info-bg); color: var(--rq-text);
}
.rq-guide blockquote p:last-child { margin-bottom: 0; }
.rq-guide table { width: 100%; margin-bottom: var(--rq-space-4); border-collapse: collapse; font-size: .875rem; }
.rq-guide th, .rq-guide td { padding: .5rem .625rem; border: 1px solid var(--rq-border); vertical-align: top; text-align: left; }
.rq-guide th { background: var(--rq-surface-alt); color: var(--rq-navy); font-weight: 600; }
.rq-guide code { font-size: .875em; color: var(--rq-navy); background: var(--rq-neutral-bg); padding: .1em .35em; border-radius: 4px; }
@media (max-width: 575.98px) {
    .rq-guide table { display: block; overflow-x: auto; }
    .rq-guide-step { max-width: 100%; }
}
@media print {
    .rq-sidebar, .footer { display: none !important; }
    .page-wrapper { margin: 0 !important; }
    .rq-guide-chapter { break-before: page; border: 0; }
    .rq-guide-chapter:first-of-type { break-before: auto; }
    .rq-guide { max-width: none; }
}

/* ── From the layout: third-party fixes ───────────────────────────────── */
/* Tom Select's Bootstrap theme reads --bs-* variables; Tabler only defines --tblr-* ones,
   so without this the dropdown has no background. */
.ts-wrapper, .ts-dropdown {
    --bs-body-bg: var(--tblr-bg-surface, #fff);
    --bs-body-color: var(--tblr-body-color);
    --bs-secondary-bg: var(--tblr-bg-surface-secondary);
    --bs-tertiary-bg: var(--tblr-bg-surface-tertiary);
    --bs-border-color: var(--tblr-border-color);
    --bs-border-color-translucent: var(--tblr-border-color-translucent);
    --bs-border-width: var(--tblr-border-width);
    --bs-border-radius: var(--tblr-border-radius);
    --bs-border-radius-sm: var(--tblr-border-radius-sm);
    --bs-form-invalid-color: var(--tblr-form-invalid-color, var(--rq-danger));
}
/* A validation summary with nothing to report still renders its (empty) box; hide it so the
   red alert only shows when there is a message. */
.validation-summary-valid { display: none; }
.ts-dropdown { z-index: 2000; box-shadow: var(--tblr-box-shadow-dropdown, 0 .5rem 1rem rgba(0,0,0,.15)); }
/* Tom Select writes its text colours as hex: the theme's instead. */
.ts-control, .ts-control input, .ts-dropdown { color: var(--rq-text); }
.ts-control input::placeholder { color: var(--rq-placeholder); }
.ts-dropdown .optgroup-header, .ts-dropdown .create, .ts-dropdown .no-results { color: var(--rq-text-muted); }
.ts-dropdown [data-selectable] .highlight { background: var(--rq-pending-bg); color: inherit; }
.ts-wrapper .dropdown-header, .plugin-dropdown_input .dropdown-input { border-color: var(--rq-border); }

/* Flatpickr (the date pickers): its stylesheet is white with hex colours, so the theme's tokens here. */
.flatpickr-calendar { background: var(--rq-surface); color: var(--rq-text); box-shadow: var(--rq-shadow-float); border: 1px solid var(--rq-border); }
.flatpickr-calendar.arrowTop::after { border-bottom-color: var(--rq-surface); }
.flatpickr-calendar.arrowTop::before { border-bottom-color: var(--rq-border); }
.flatpickr-calendar.arrowBottom::after { border-top-color: var(--rq-surface); }
.flatpickr-calendar.arrowBottom::before { border-top-color: var(--rq-border); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month input.cur-year,
.flatpickr-current-month .flatpickr-monthDropdown-months { color: var(--rq-text); fill: var(--rq-text); background: transparent; }
.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month { background: var(--rq-surface); color: var(--rq-text); }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month { color: var(--rq-text); fill: var(--rq-text); }
.flatpickr-months .flatpickr-prev-month:hover svg, .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--rq-brand); }
.numInputWrapper span.arrowUp::after { border-bottom-color: var(--rq-text-muted); }
.numInputWrapper span.arrowDown::after { border-top-color: var(--rq-text-muted); }
span.flatpickr-weekday { color: var(--rq-text-muted); }
.flatpickr-day { color: var(--rq-text); }
.flatpickr-day:hover, .flatpickr-day:focus, .flatpickr-day.prevMonthDay:hover, .flatpickr-day.nextMonthDay:hover {
    background: var(--rq-surface-alt); border-color: var(--rq-surface-alt); }
.flatpickr-day.today { border-color: var(--rq-border-strong); }
.flatpickr-day.today:hover, .flatpickr-day.today:focus { background: var(--rq-surface-alt); border-color: var(--rq-border-strong); color: var(--rq-text); }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.selected:focus,
.flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--rq-primary); border-color: var(--rq-primary); color: var(--rq-on-primary); }
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay, .flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover { color: var(--rq-placeholder); }
.flatpickr-time { border-top-color: var(--rq-border-soft) !important; }
.flatpickr-time input, .flatpickr-time .flatpickr-am-pm, .flatpickr-time .flatpickr-time-separator { color: var(--rq-text); }
.flatpickr-time input:hover, .flatpickr-time input:focus, .flatpickr-time .flatpickr-am-pm:hover { background: var(--rq-surface-alt); }

/* Alpine: hidden until Alpine has started (then x-show decides). */
[x-cloak] { display: none !important; }

/* ── Small utilities (instead of inline style attributes) ─────────────── */
.rq-pre-line { white-space: pre-line; }
.rq-cover-square { aspect-ratio: 1; object-fit: cover; }
.rq-scroll-12, .rq-scroll-14, .rq-scroll-16, .rq-scroll-18, .rq-scroll-22, .rq-scroll-24, .rq-scroll-32 { overflow-y: auto; }
.rq-scroll-12 { max-height: 12rem; }
.rq-scroll-14 { max-height: 14rem; }
.rq-scroll-16 { max-height: 16rem; }
.rq-scroll-18 { max-height: 18rem; }
.rq-scroll-22 { max-height: 22rem; }
.rq-scroll-24 { max-height: 24rem; }
.rq-scroll-32 { max-height: 32rem; }

/* Maps (Leaflet markers read these too): the scene red, the meeting point blue. */
:root { --rq-map-scene: var(--rq-brand); --rq-map-meeting: var(--rq-info); --rq-map-ring: #fff; }
.rq-map-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; }
.rq-map-dot-scene { background: var(--rq-map-scene); }
.rq-map-dot-meeting { background: var(--rq-map-meeting); }

/* The participant picker (_ParticipantPicker). */
#participant-picker .participant-group-row > td {
    background: var(--tblr-bg-surface-tertiary);
    border-top: 2px solid var(--tblr-border-color);
}
#participant-picker .participant-passive td:not(:first-child) { opacity: .75; }

/* Search planning map (MissionSearch): the map fills the window beside its panel; shapes read
   their colours from these tokens (Leaflet styles are set by the page script). */
:root {
    --rq-search-free: #5f3dc4; --rq-search-assigned: #f59f00; --rq-search-searching: #1c7ed6;
    --rq-search-searched: #2f9e44; --rq-search-hazard: #c92a2a; --rq-search-clue: #fcc419;
    --rq-search-find: #2b8a3e; --rq-search-hasty: #0b7285; --rq-search-gap: #e8590c; --rq-search-warning: #c92a2a;
}
.rq-search-map-wrap { position: relative; }
.rq-search-map { height: max(28rem, calc(100vh - 17rem)); border-radius: inherit; }
@media (max-width: 1199.98px) { .rq-search-map { height: 62vh; min-height: 22rem; } }
.rq-search-toolbar { position: absolute; top: .75rem; left: 3.5rem; right: 6.5rem; z-index: 500; display: flex; flex-wrap: wrap; gap: .5rem; pointer-events: none; }
.rq-search-toolbar > * { pointer-events: auto; box-shadow: var(--rq-shadow-map); }
/* Narrow maps: the toolbar keeps its icons, the words go to the tooltip. */
@media (max-width: 767.98px) { .rq-search-toolbar > .btn > span { display: none; } .rq-search-toolbar > .btn > .ti { margin: 0; } }
.rq-search-hint { position: absolute; left: .75rem; right: .75rem; bottom: .75rem; z-index: 500; display: flex; align-items: center; gap: .75rem;
    background: var(--tblr-bg-surface); border: 1px solid var(--tblr-border-color); border-radius: var(--rq-radius, 8px); padding: .5rem .75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.rq-search-map.rq-picking, .rq-search-map.rq-picking .leaflet-interactive { cursor: crosshair; }
.rq-hasty-icon { color: var(--rq-search-hasty); }
.rq-hasty-marker span { display: block; width: 12px; height: 12px; transform: rotate(45deg); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
/* The legend floats on the map's bottom left; it hides while a mode's hint takes the bottom. */
.rq-search-legend { position: absolute; left: .75rem; bottom: .75rem; z-index: 500; max-width: calc(100% - 10rem);
    background: color-mix(in srgb, var(--tblr-bg-surface) 94%, transparent); border: 1px solid var(--tblr-border-color);
    border-radius: var(--rq-radius, 8px); box-shadow: var(--rq-shadow-map); padding: .35rem .75rem; color: var(--rq-text-muted); }
.rq-search-legend > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--rq-navy); }
.rq-search-legend > summary::-webkit-details-marker { display: none; }
.rq-search-legend[open] > summary { display: none; }
.rq-search-legend-items { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; }
.rq-search-legend-items > span { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
/* Each legend item switches its kind on the map (mission-search.js). */
.rq-legend-toggle { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; padding: .1rem .35rem;
    border: 0; border-radius: var(--rq-radius-badge); background: none; color: inherit; font: inherit; cursor: pointer; }
.rq-legend-toggle:hover { background: var(--rq-surface-alt); }
.rq-legend-toggle:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: 1px; }
.rq-legend-toggle.is-off { opacity: .45; text-decoration: line-through; }
.rq-legend-track { --c: var(--rq-search-searching); }
.rq-legend-sweep { --c: var(--rq-search-searching); border-top-width: 7px; opacity: .3; }
.rq-legend-radio { background: var(--rq-radio-seen); }
#search-hint:not(.d-none) ~ .rq-search-legend { display: none; }
@media (max-width: 767.98px) { .rq-search-legend { bottom: 2.5rem; max-width: calc(100% - 1.5rem); } }
.rq-legend-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.rq-legend-clue { background: var(--rq-search-clue); }
.rq-legend-find { background: var(--rq-search-find); }
/* A team's latest position: its letter on its colour; red ring and pulse while the watch warns (TeamWatch). */
.rq-team-marker span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 1px 4px rgba(0, 0, 0, .3); color: var(--rq-on-strong); font-weight: 700; font-size: .8rem; }
.rq-team-marker.is-warning span { box-shadow: 0 0 0 3px var(--rq-search-warning); animation: rq-team-warn 1.6s ease-out infinite; }
.rq-team-marker.is-silent span { opacity: .6; }
@keyframes rq-team-warn { 0% { box-shadow: 0 0 0 3px var(--rq-search-warning); } 100% { box-shadow: 0 0 0 10px transparent; } }
@media (prefers-reduced-motion: reduce) { .rq-team-marker.is-warning span { animation: none; } }
.rq-legend-team { display: inline-block; width: .85rem; height: .85rem; border-radius: 50%; background: var(--rq-search-free); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.rq-team-live:empty { display: none; }
.rq-team-live { margin-top: .15rem; }
/* The urgency rating (SearchUrgency): factors as option boxes, the total large beside its level. */
.rq-urgency-factor { margin-bottom: .75rem; }
.rq-urgency-factor .form-selectgroup-label { height: 100%; }
@media (min-width: 576px) { .rq-urgency-factor .form-selectgroup { flex-wrap: nowrap; } .rq-urgency-factor .form-selectgroup-item { flex: 1 1 0; min-width: 0; } }
.rq-urgency-number { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; border-radius: 50%;
    background: var(--tblr-bg-surface-secondary); font-weight: 700; }
.form-selectgroup-input:checked + .form-selectgroup-label .rq-urgency-number { background: var(--tblr-primary); color: var(--rq-on-primary); }
.rq-urgency-result { display: flex; align-items: center; gap: .75rem; }
.rq-urgency-total { font-size: 1.75rem; font-weight: 700; line-height: 1; color: var(--rq-navy); }
.rq-urgency-factors { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .5rem; }
.rq-urgency-chip { font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; border: 1px solid var(--tblr-border-color); color: var(--rq-text-muted); }
.rq-urgency-chip[data-rating="1"] { border-color: var(--rq-search-warning); color: var(--rq-search-warning); }
.rq-legend-diamond { display: inline-block; width: .6rem; height: .6rem; transform: rotate(45deg); background: var(--rq-search-hasty); margin: 0 .1rem; }
.rq-legend-line { display: inline-block; width: 1.4rem; border-top: 3px solid var(--c, #343a40); }
.rq-legend-dashed { border-top-style: dashed; border-top-width: 2px; }
.rq-legend-box { display: inline-block; width: .9rem; height: .9rem; border-radius: 2px; }
.rq-legend-segment { background: color-mix(in srgb, var(--rq-search-free) 25%, transparent); border: 1.5px solid var(--rq-search-free); }
.rq-legend-hazard { background: color-mix(in srgb, var(--rq-search-hazard) 30%, transparent); border: 1.5px dashed var(--rq-search-hazard); }
/* Approach routes (MissionApproach): one colour per kind of route, read by the map script and the
   elevation profiles; saved routes are wide and pale under the planned ones. */
:root {
    --rq-route-fastest: #1c7ed6; --rq-route-easiest: #2f9e44; --rq-route-other: #e8590c;
    --rq-route-saved: #ae3ec9; --rq-route-terrain: #868e96;
}
.rq-route-fastest { --c: var(--rq-route-fastest); }
.rq-route-easiest { --c: var(--rq-route-easiest); }
.rq-route-other { --c: var(--rq-route-other); }
.rq-legend-saved { --c: var(--rq-route-saved); border-top-width: 6px; opacity: .5; }
.rq-legend-terrain { border: 1.5px dashed var(--rq-route-terrain); }
.rq-approach-map { height: calc(100vh - 18rem); min-height: 26rem; border-radius: var(--rq-radius, 8px) var(--rq-radius, 8px) 0 0; }
@media (max-width: 1199.98px) { .rq-approach-map { height: 55vh; min-height: 20rem; } }
.rq-approach-map.rq-picking, .rq-approach-map.rq-picking .leaflet-interactive { cursor: crosshair; }
.rq-route-card { border-top: 3px solid var(--c); }
.rq-route-figures { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.rq-route-figures > div { display: inline-flex; align-items: center; gap: .35rem; }
.rq-route-profile { display: block; width: 100%; height: 4.5rem; }
.rq-route-profile polygon { fill: var(--c); fill-opacity: .15; }
.rq-route-profile polyline { fill: none; stroke: var(--c); stroke-width: 2; }
/* "OpenTopoMap (night)" (map-layers.js): the topo tiles inverted, the hues turned back so forest stays
   green and water blue, softened so the contours don't glare. */
.leaflet-layer.rq-tiles-night { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.8); }
/* Leaflet's own controls and popups in the theme's colours (leaflet.css loads after this file, hence [data-theme]). */
[data-theme] .leaflet-bar a, [data-theme] .leaflet-bar a:hover { background-color: var(--rq-surface); color: var(--rq-text); border-bottom-color: var(--rq-border); }
[data-theme] .leaflet-bar a:hover { background-color: var(--rq-surface-alt); }
[data-theme] .leaflet-bar a.leaflet-disabled { background-color: var(--rq-surface-alt); color: var(--rq-placeholder); }
[data-theme] .leaflet-touch .leaflet-bar, [data-theme] .leaflet-touch .leaflet-control-layers { border-color: var(--rq-border); }
[data-theme] .leaflet-control-layers { background: var(--rq-surface); color: var(--rq-text); }
[data-theme] .leaflet-control-layers-separator { border-top-color: var(--rq-border-soft); }
[data-theme] .leaflet-popup-content-wrapper, [data-theme] .leaflet-popup-tip { background: var(--rq-surface); color: var(--rq-text); box-shadow: var(--rq-shadow-float); }
[data-theme] .leaflet-container a.leaflet-popup-close-button { color: var(--rq-text-muted); }
[data-theme] .leaflet-container .leaflet-control-attribution { background: color-mix(in srgb, var(--rq-surface) 85%, transparent); color: var(--rq-text-muted); }
[data-theme] .leaflet-container .leaflet-control-attribution a { color: var(--rq-link); }
[data-theme="night"] .leaflet-container { background: var(--rq-bg); }
[data-theme="night"] .leaflet-control-layers-toggle { filter: invert(1) brightness(1.4); }
.leaflet-tooltip.rq-seg-label { background: transparent; border: 0; box-shadow: none; padding: 0; text-align: center; line-height: 1.1;
    font-weight: 700; font-size: .75rem; color: #212529; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.leaflet-tooltip.rq-seg-label::before { display: none; }
.rq-hide-labels .leaflet-tooltip.rq-seg-label { display: none; }
.rq-team-dot { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; background: var(--c, #495057); flex: none; }
/* A track's colour on the map, picked per browser: colours that stand out on topo maps and on imagery. */
:root { --rq-track-1: #e03131; --rq-track-2: #ff00ff; --rq-track-3: #ffd400; --rq-track-4: #00e5ff;
    --rq-track-5: #2f9e44; --rq-track-6: #1c3faa; --rq-track-7: #000000; --rq-track-8: #ffffff; }
.rq-track-colour { padding: .25rem; border: 0; background: none; line-height: 0; border-radius: 50%; }
.rq-track-colour .rq-team-dot { width: .875rem; height: .875rem; box-shadow: 0 0 0 1px var(--rq-border); }
.rq-track-swatches { display: grid; grid-template-columns: repeat(4, 1.75rem); gap: .375rem; padding: .25rem .75rem .5rem; }
.rq-track-swatch { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--rq-border); background: var(--c); padding: 0; }
.rq-track-swatch.is-picked { box-shadow: 0 0 0 2px var(--rq-surface), 0 0 0 4px var(--rq-focus); }
.rq-search-row.is-active > td { background: var(--rq-info-bg); }

/* Search workspace (MissionSearch/Index, Batch 8): the status strip, then the field feed | the map (or the tables) |
   the inspector, filling the window below the top bar; each panel scrolls on its own. Layouts: is-split (all three),
   is-map (the panels fold into 3.25 rem rails), is-data (the map hidden or in another window: tables in the centre).
   Below 1200 px everything stacks (map, feed, inspector). Full screen = the whole window. */
.rq-sw { --rq-insights-width: 360px; --rq-feed-width: 22.5rem; --rq-rail-width: 3.25rem; display: flex; flex-direction: column; gap: .75rem; }
.rq-sw-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .625rem 1rem; background: var(--rq-surface);
    border: 1px solid var(--rq-border); border-radius: var(--rq-radius-lg); white-space: nowrap; }
.rq-sw-pos { display: inline-flex; align-items: baseline; gap: .5rem; }
.rq-sw-pos b { font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rq-text); }
.rq-sw-sep { width: 1px; height: 1.75rem; background: var(--rq-border); }
.rq-sw-stat { font-size: .8125rem; color: var(--rq-text-muted); }
.rq-sw-stat b { color: var(--rq-text); font-weight: 800; font-variant-numeric: tabular-nums; }
.rq-sw-controls { margin-left: auto; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 1699.98px) { .rq-sw-layouts > button > span, .rq-sw-pop > span { display: none; } .rq-sw-pos .rq-label { max-width: 9rem; white-space: normal; line-height: 1.2; } }
@media (max-width: 1199.98px) { .rq-sw-pop { display: none; } }
.rq-sw-pop.is-popped { --tblr-btn-bg: var(--rq-info-bg); --tblr-btn-border-color: var(--rq-info-border); --tblr-btn-color: var(--rq-info-strong); }
.rq-seg-sm > button, .rq-seg-sm > a { min-height: 1.75rem; padding: 0 .5rem; font-size: .75rem; }
.rq-sw-body { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.rq-sw-centre { display: flex; flex-direction: column; gap: .75rem; min-width: 0; min-height: 0; }
.rq-sw-data { display: none; flex-direction: column; gap: .75rem; min-height: 0; container-type: inline-size; }
@container (max-width: 36rem) { .rq-sw-bar { display: none; } .rq-sw-people { max-width: 9rem; } .rq-sw-table .rq-team-dot { display: none; } }
.rq-sw.is-data .rq-search-map-card { display: none; }
.rq-sw.is-data .rq-sw-data { display: flex; }
.rq-sw-rail { display: none; }
.rq-search-map-card { overflow: hidden; margin-bottom: 0; }
.rq-search-resizer { display: none; }
.rq-search-viewctl { position: absolute; top: .75rem; right: .75rem; z-index: 500; display: flex; flex-direction: column; gap: .5rem; }
.rq-search-viewctl .btn { box-shadow: var(--rq-shadow-map); }
.rq-search-map .leaflet-top.leaflet-right { top: 0; right: 3.25rem; }
.rq-sw-feed { order: 2; margin-bottom: 0; display: flex; flex-direction: column; min-height: 0; max-height: 36rem; }
.rq-search-aside { order: 3; min-width: 0; }
.rq-sw-centre { order: 1; }
@media (hover: none) { .rq-hide-touch { display: none !important; } }
@media (max-width: 1599.98px) { .rq-sw { --rq-feed-width: 21.25rem; } }
@media (min-width: 1200px) {
    /* The map's tools: a column of icons at its left, under the zoom (their words are the tooltips). */
    .rq-sw-centre .rq-search-toolbar { flex-direction: column; flex-wrap: nowrap; left: .75rem; right: auto; top: 5.5rem; gap: 2px; padding: 4px;
        background: var(--rq-surface); border-radius: var(--rq-radius-md); box-shadow: var(--rq-shadow-map); }
    .rq-sw-centre .rq-search-toolbar > .btn { box-shadow: none; border: 0; width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; justify-content: center; }
    .rq-sw-centre .rq-search-toolbar > .btn > span { display: none; }
    .rq-sw-centre .rq-search-toolbar > .btn > .ti { margin: 0; font-size: 1.125rem; }
    .rq-sw-centre .rq-search-toolbar:empty { display: none; }
    .rq-sw-body { grid-template-columns: var(--rq-feed-width) minmax(0, 1fr) .5rem var(--rq-insights-width); gap: 0 .75rem;
        grid-template-rows: minmax(0, 1fr); height: max(32rem, calc(100vh - var(--rq-topbar-height) - 7.25rem)); }
    .rq-has-urgent .rq-sw-body { height: max(32rem, calc(100vh - var(--rq-topbar-height) - 10.5rem)); }
    .rq-sw-feed, .rq-sw-centre, .rq-search-aside { order: 0; max-height: none; height: 100%; }
    .rq-sw-feed { grid-column: 1; grid-row: 1; }
    .rq-sw-rail-feed { grid-column: 1; grid-row: 1; }
    .rq-sw-centre { grid-column: 2; grid-row: 1; }
    .rq-search-resizer { grid-column: 3; grid-row: 1; display: block; cursor: col-resize; border-radius: 4px; position: relative; margin: 0 -.375rem; }
    .rq-search-resizer::after { content: ""; position: absolute; top: 50%; left: 50%; width: 4px; height: 2.75rem; margin: -1.375rem 0 0 -2px;
        border-radius: 2px; background: var(--rq-border-strong); transition: background .15s; }
    .rq-search-resizer:hover::after, .rq-resizing .rq-search-resizer::after { background: var(--rq-text-muted); }
    .rq-search-aside, .rq-sw-rail-inspector { grid-column: 4; grid-row: 1; }
    .rq-search-aside { min-height: 0; overflow: hidden; }
    /* The workspace fills the window below the bar: no footer, a small gap at the foot, no page scroll. */
    .page-wrapper:has(.rq-sw) .footer { display: none; }
    .page-body:has(.rq-sw) { margin-bottom: .75rem; }
    .rq-search-aside #search-panel, .rq-search-aside .rq-insights { height: 100%; min-height: 0; }
    .rq-sw-centre .rq-search-map-card { flex: 1 1 auto; display: flex; }
    .rq-sw-centre .rq-search-map-wrap { flex: 1 1 auto; display: flex; }
    .rq-sw-centre .rq-search-map { height: auto; flex: 1 1 auto; min-height: 0; }
    .rq-sw-data { overflow-y: auto; height: 100%; }
    /* Map only: both panels folded into rails that still show what is new and what is picked. */
    .rq-sw.is-map .rq-sw-body { grid-template-columns: var(--rq-rail-width) minmax(0, 1fr) 0 var(--rq-rail-width); }
    .rq-sw.is-map .rq-sw-feed, .rq-sw.is-map .rq-search-aside, .rq-sw.is-map .rq-search-resizer { display: none; }
    .rq-sw.is-map .rq-sw-rail { display: flex; }
}
.rq-resizing { cursor: col-resize; user-select: none; }
.rq-resizing .rq-search-map { pointer-events: none; }

/* The rails (map only). */
.rq-sw-rail { flex-direction: column; align-items: center; gap: .375rem; padding: .5rem 0; background: var(--rq-surface);
    border: 1px solid var(--rq-border); border-radius: var(--rq-radius-lg); min-height: 0; overflow: hidden; }
.rq-rail-open { position: relative; width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--rq-radius-md);
    background: var(--rq-brand-tint); color: var(--rq-brand-text); display: inline-flex; align-items: center; justify-content: center; font-size: 1.125rem; }
.rq-sw-rail-inspector .rq-rail-open { background: var(--rq-surface-sunk); color: var(--rq-text); }
.rq-rail-count { position: absolute; top: -.25rem; right: -.25rem; min-width: 1.125rem; height: 1.125rem; padding: 0 .25rem; border-radius: var(--rq-radius-pill);
    background: var(--rq-brand-strong); color: var(--rq-on-strong); font-size: .6875rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rq-rail-team { position: relative; width: 2.25rem; height: 2.25rem; border: 0; border-radius: var(--rq-radius-md); background: var(--c);
    color: var(--rq-on-strong); font-size: .6875rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rq-rail-team.is-idle { opacity: .5; }
.rq-rail-dot { position: absolute; top: -.2rem; right: -.2rem; width: .625rem; height: .625rem; border-radius: 50%; background: var(--rq-brand-strong);
    border: 2px solid var(--rq-surface); }
.rq-rail-picked { max-width: 2.75rem; padding: .25rem; border-radius: var(--rq-radius-sm); background: var(--rq-brand-strong); color: var(--rq-on-strong);
    font-size: .75rem; font-weight: 800; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.rq-rail-label { margin-top: auto; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .6875rem; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase; color: var(--rq-text-muted); white-space: nowrap; }

/* The tables (no map): the banner, segments by chance, teams. */
.rq-sw-banner { display: flex; align-items: center; gap: .625rem; padding: .5rem .5rem .5rem .875rem; border-radius: var(--rq-radius-md);
    background: var(--rq-surface); border: 1px solid var(--rq-border); font-size: .875rem; }
.rq-sw-banner > .ti { font-size: 1.125rem; color: var(--rq-text-muted); }
.rq-sw-banner.is-popped { background: var(--rq-info-bg); border-color: var(--rq-info-border); }
.rq-sw-banner.is-popped > .ti { color: var(--rq-info-strong); }
.rq-sw-table-card { margin-bottom: 0; }
.rq-sw-table th { font-size: .6875rem; letter-spacing: .05em; }
.rq-sw-figure { display: inline-flex; align-items: center; gap: .5rem; font-variant-numeric: tabular-nums; }
.rq-sw-figure b { min-width: 2.75rem; }
.rq-sw-bar { display: inline-block; width: 2.5rem; height: 4px; border-radius: var(--rq-radius-pill); background: var(--rq-border-soft); overflow: hidden; }
.rq-sw-bar > span { display: block; height: 100%; background: var(--rq-primary); border-radius: inherit; }
.rq-sw-bar.is-covered > span { background: var(--rq-success); }
.rq-sw-table { font-size: .8125rem; }
.rq-sw-table td, .rq-sw-table th { white-space: nowrap; }
.rq-sw-people { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-seg-tag { display: inline-flex; min-width: 2rem; height: 1.5rem; padding: 0 .375rem; align-items: center; justify-content: center;
    border-radius: var(--rq-radius-sm); background: var(--rq-surface-sunk); color: var(--rq-text); font-size: .75rem; font-weight: 800; text-decoration: none; }
.rq-search-row.is-active .rq-seg-tag { background: var(--rq-brand-strong); color: var(--rq-on-strong); }
.rq-seg-tile { display: inline-flex; min-width: 3rem; height: 3rem; padding: 0 .5rem; align-items: center; justify-content: center;
    border-radius: var(--rq-radius-md); background: var(--rq-brand-strong); color: var(--rq-on-strong); font-size: 1.125rem; font-weight: 800; }
.rq-inseg { display: flex; flex-direction: column; }
.rq-inseg-row { display: flex; align-items: center; gap: .625rem; min-height: 2.5rem; border-bottom: 1px solid var(--rq-border-soft);
    font-size: .8125rem; color: inherit; text-decoration: none; }
.rq-inseg-row:hover { color: inherit; background: var(--rq-surface-alt); }

/* The field feed: a card per team, its items with an icon tile, new ones in bold on a tint. */
.rq-feed-head { padding: .75rem .875rem .625rem; border-bottom: 1px solid var(--rq-border-soft); }
.rq-feed-title { margin: 0; font-size: 1rem; font-weight: 800; white-space: nowrap; }
.rq-feed-head > .d-flex { flex-wrap: wrap; row-gap: .375rem; }
.rq-feed-new { padding: .125rem .5rem; border-radius: var(--rq-radius-pill); background: var(--rq-brand-strong); color: var(--rq-on-strong);
    font-size: .75rem; font-weight: 800; white-space: nowrap; }
.rq-feed-chips { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .625rem; }
.rq-feed-chip { height: 1.75rem; padding: 0 .625rem; border-radius: var(--rq-radius-pill); border: 1px solid var(--rq-border); background: var(--rq-surface);
    color: var(--rq-text); font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }
.rq-feed-chip[aria-checked="true"] { background: var(--rq-primary); border-color: var(--rq-primary); color: var(--rq-on-primary); }
.rq-feed-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: .5rem .625rem; display: flex; flex-direction: column; gap: .5rem; }
.rq-feed-body .rq-feed-byteam, .rq-feed-body .rq-feed-timeline { display: flex; flex-direction: column; gap: .5rem; }
.rq-sw-feed[data-filter="messages"] .rq-feed-log [data-kind]:not([data-kind="messages"]),
.rq-sw-feed[data-filter="results"] .rq-feed-log [data-kind]:not([data-kind="results"]),
.rq-sw-feed[data-filter="clues"] .rq-feed-log [data-kind]:not([data-kind="clues"]),
.rq-sw-feed[data-filter="tracks"] .rq-feed-log [data-kind]:not([data-kind="tracks"]) { display: none; }
/* From the field: Needs you · Teams · Log, and a team's conversation (W12–W14). */
.rq-feed-live-count { font-size: .75rem; color: var(--rq-text-muted); white-space: nowrap; }
.rq-feed-tabs { flex-wrap: nowrap; gap: 1rem; margin: .5rem 0 -.625rem; border-bottom: 0; }
.rq-feed-tabs .nav-link { display: inline-flex; align-items: center; gap: .375rem; padding: .375rem 0 .5rem; border: 0; border-bottom: 3px solid transparent;
    background: none; color: var(--rq-text-muted); font-size: .8125rem; font-weight: 600; border-radius: 0; }
.rq-feed-tabs .nav-link.active { color: var(--rq-text); font-weight: 800; border-bottom-color: var(--rq-brand); }
.rq-feed-tab-count { min-width: 1.25rem; height: 1.25rem; padding: 0 .375rem; border-radius: var(--rq-radius-pill); background: var(--rq-surface-sunk);
    color: var(--rq-text); font-size: .6875rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rq-feed-tab-count.is-urgent { background: var(--rq-brand-strong); color: var(--rq-on-strong); }
.rq-feed-tab-count[hidden] { display: none; }
.rq-feed-pane { display: flex; flex-direction: column; gap: .5rem; }
.rq-needs-label { display: flex; align-items: center; gap: .375rem; margin-top: .25rem; font-size: .6875rem; font-weight: 800; letter-spacing: .05em;
    text-transform: uppercase; color: var(--rq-text-muted); }
.rq-needs-label.is-urgent { color: var(--rq-warning-strong); }
.rq-needs-card { border: 1px solid var(--rq-border); border-left: 4px solid var(--c); border-radius: var(--rq-radius-md); background: var(--rq-surface); padding: .5rem .625rem; }
.rq-needs-card.is-urgent { background: var(--rq-warning-bg); border-color: var(--rq-warning-border); border-left-color: var(--rq-warning); }
.rq-needs-card-head { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; }
.rq-needs-card-text { margin: .375rem 0; font-size: .8125rem; font-weight: 600; }
.rq-needs-card-actions { display: flex; flex-wrap: wrap; gap: .375rem; }
.rq-needs-card-actions .btn-sm { min-height: 1.75rem; padding: 0 .5rem; font-size: .75rem; }
.rq-team-code { position: relative; flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--rq-radius-md); background: var(--c);
    color: var(--rq-on-strong); display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; }
.rq-team-dot { position: absolute; right: -3px; bottom: -3px; width: .75rem; height: .75rem; border-radius: 50%; border: 2px solid var(--rq-surface); background: var(--rq-border-strong); }
.rq-team-dot.is-live { background: var(--rq-success); }
.rq-team-dot.is-warn { background: var(--rq-warning); }
.rq-roster { display: flex; flex-direction: column; border: 1px solid var(--rq-border); border-radius: var(--rq-radius-md); background: var(--rq-surface); overflow: hidden; }
.rq-roster-row { display: flex; align-items: flex-start; gap: .625rem; width: 100%; padding: .5rem .625rem; border: 0; background: transparent;
    text-align: left; color: var(--rq-text); }
.rq-roster-row + .rq-roster-row { border-top: 1px solid var(--rq-border-soft); }
button.rq-roster-row:hover { background: var(--rq-surface-alt); }
.rq-roster-row.has-new { background: var(--rq-brand-tint); }
.rq-roster-row.is-idle .rq-team-code { opacity: .7; }
.rq-roster-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rq-roster-top { display: flex; align-items: baseline; gap: .375rem; font-size: .8125rem; }
.rq-roster-time { margin-left: auto; font-size: .6875rem; color: var(--rq-text-muted); font-variant-numeric: tabular-nums; }
.rq-roster-prev { display: flex; align-items: center; gap: .375rem; font-size: .75rem; color: var(--rq-text-muted); }
.rq-roster-prev > span:first-child { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-roster-row.has-new .rq-roster-prev > span:first-child { color: var(--rq-text); font-weight: 700; }
.rq-roster-unread { flex: none; min-width: 1.125rem; height: 1.125rem; padding: 0 .3rem; border-radius: var(--rq-radius-pill); background: var(--rq-brand-strong);
    color: var(--rq-on-strong); font-size: .625rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rq-roster-status { font-size: .6875rem; color: var(--rq-text-muted); }
.rq-roster-status.is-live { color: var(--rq-success-strong); }
.rq-roster-status.is-warn { color: var(--rq-warning-strong); font-weight: 700; }
.rq-thread { display: flex; flex-direction: column; gap: .5rem; min-height: 100%; }
.rq-thread-head { position: sticky; top: -.5rem; z-index: 2; display: flex; align-items: center; gap: .5rem; margin: -.5rem -.625rem 0; padding: .5rem .625rem;
    background: var(--rq-surface); border-bottom: 1px solid var(--rq-border-soft); }
.rq-thread-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; font-size: .875rem; line-height: 1.3; }
.rq-thread-who > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-thread-members { font-size: .6875rem; color: var(--rq-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-thread-work { display: flex; flex-wrap: wrap; align-items: baseline; gap: .375rem; padding: .375rem .625rem; border-radius: var(--rq-radius-sm);
    background: var(--rq-surface-alt); font-size: .75rem; }
.rq-thread-work.is-warn { background: var(--rq-warning-bg); }
.rq-thread-log { display: flex; flex-direction: column; gap: .5rem; }
.rq-thread-new { display: flex; align-items: center; gap: .5rem; color: var(--rq-brand-text); font-size: .625rem; font-weight: 800; letter-spacing: .08em; }
.rq-thread-new::before, .rq-thread-new::after { content: ""; flex: 1; height: 1px; background: var(--rq-brand-border); }
.rq-bubble { max-width: 88%; padding: .4375rem .625rem; border-radius: var(--rq-radius-md); font-size: .8125rem; }
.rq-bubble.is-in { align-self: flex-start; background: var(--rq-surface); border: 1px solid var(--rq-border); border-left: 3px solid var(--c); }
.rq-bubble.is-in.is-urgent { background: var(--rq-danger-bg); border-color: var(--rq-danger-border); }
.rq-bubble.is-out { align-self: flex-end; background: var(--rq-hero); color: var(--rq-on-strong); }
.rq-bubble.is-out .rq-bubble-meta { color: var(--rq-on-navy-muted); }
.rq-bubble.is-out.is-waiting { box-shadow: 0 0 0 2px var(--rq-danger); }
.rq-bubble-meta { font-size: .6875rem; color: var(--rq-text-muted); }
.rq-bubble-text { line-height: 1.4; overflow-wrap: anywhere; white-space: pre-line; }
.rq-thread-event { display: flex; align-items: center; gap: .5rem; padding: 0 .25rem; font-size: .75rem; color: var(--rq-text-muted); }
.rq-thread-event b { color: var(--rq-text); font-weight: 600; }
.rq-thread-event a { flex: none; font-weight: 600; }
.rq-feed-quick { display: flex; gap: .375rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .5rem; }
.rq-feed-quick::-webkit-scrollbar { display: none; }
.rq-feed-recall-row { display: flex; justify-content: flex-end; margin-top: .5rem; }
.rq-feed-quick .rq-feed-chip { flex: none; white-space: nowrap; }
.rq-feed-urgent-check { font-size: .75rem; color: var(--rq-text-muted); }
.rq-sw-feed[data-filter]:not([data-filter="all"]) .rq-feed-group:not(:has([data-kind]:not([style*="display: none"]))) .rq-feed-item.is-quiet { display: none; }
.rq-feed-group { border: 1px solid var(--rq-border); border-left: 4px solid var(--c); border-radius: var(--rq-radius-md); background: var(--rq-surface); overflow: hidden; }
.rq-feed-group.has-new { border-color: var(--rq-brand-border); border-left-color: var(--c); }
.rq-feed-group.is-urgent { border-color: var(--rq-danger); border-left-color: var(--rq-danger); }
.rq-feed-group.is-base { background: var(--rq-surface-alt); }
.rq-feed-group-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .625rem; flex-wrap: wrap; }
.rq-feed-team { font-size: .875rem; font-weight: 800; color: var(--rq-text); text-decoration: none; }
a.rq-feed-team:hover { text-decoration: underline; color: var(--rq-text); }
.rq-feed-live { margin: 0; font-size: .6875rem; }
.rq-feed-live a { font-weight: 700; }
.rq-feed-live .badge { font-size: .625rem; }
.rq-feed-unread { margin-left: auto; display: inline-flex; align-items: center; gap: .25rem; height: 1.375rem; padding: 0 .5rem; border: 0;
    border-radius: var(--rq-radius-pill); background: var(--rq-brand-strong); color: var(--rq-on-strong); font-size: .6875rem; font-weight: 800; }
.rq-feed-unread .ti { font-size: .75rem; }
.rq-feed-item { display: flex; gap: .5rem; padding: .4375rem .625rem; border-top: 1px solid var(--rq-border-soft); align-items: flex-start; }
.rq-feed-timeline .rq-feed-item { border: 1px solid var(--rq-border-soft); border-radius: var(--rq-radius-sm); background: var(--rq-surface); }
.rq-feed-item.is-new { background: var(--rq-brand-tint); }
.rq-feed-item.is-new .rq-feed-line { font-weight: 700; }
.rq-feed-item.is-urgent { background: var(--rq-danger-bg); }
.rq-feed-icon { width: 1.375rem; height: 1.375rem; flex: none; border-radius: .375rem; display: inline-flex; align-items: center; justify-content: center; font-size: .8125rem; margin-top: .0625rem; }
.rq-feed-icon.is-message { background: var(--rq-special-bg); color: var(--rq-special); }
.rq-feed-icon.is-track { background: var(--rq-azure-bg); color: var(--rq-azure); }
.rq-feed-icon.is-clue { background: var(--rq-warning-bg); color: var(--rq-warning-strong); }
.rq-feed-icon.is-success { background: var(--rq-success-bg); color: var(--rq-success); }
.rq-feed-icon.is-pending { background: var(--rq-pending-bg); color: var(--rq-pending-strong); }
.rq-feed-icon.is-base { background: var(--rq-neutral-bg); color: var(--rq-navy); }
.rq-feed-icon.is-urgent { background: var(--rq-danger-fill); color: var(--rq-on-strong); }
.rq-feed-text { flex: 1 1 auto; min-width: 0; }
.rq-feed-line { display: block; font-size: .8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.rq-feed-meta { display: block; font-size: .6875rem; color: var(--rq-text-muted); margin-top: .0625rem; }
.rq-feed-urgent { display: inline-block; padding: 0 .375rem; border-radius: var(--rq-radius-pill); background: var(--rq-danger-fill); color: var(--rq-on-strong);
    font-size: .625rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-right: .25rem; vertical-align: .0625rem; }
.rq-feed-chipteam { display: inline-flex; align-items: center; gap: .25rem; font-size: .6875rem; font-weight: 800; color: var(--rq-text); margin-right: .25rem; }
.rq-feed-chipteam::before { content: ""; width: .5rem; height: .5rem; border-radius: 2px; background: var(--c); }
.rq-feed-actions { flex: none; align-self: center; }
.rq-feed-actions .btn-sm { min-height: 1.75rem; padding: 0 .5rem; font-size: .75rem; }
.rq-feed-recall { padding: .625rem .75rem; border-radius: var(--rq-radius-md); background: var(--rq-danger-bg); border: 1px solid var(--rq-danger-border); color: var(--rq-danger-strong); }
.rq-feed-recall > .d-flex > .ti { font-size: 1.25rem; }
.rq-feed-recall li { flex-wrap: wrap; }
.rq-feed-recall li .fw-semibold { white-space: nowrap; }
.rq-feed-composer { padding: .625rem; border-top: 1px solid var(--rq-border-soft); background: var(--rq-surface-alt); border-radius: 0 0 var(--rq-radius-lg) var(--rq-radius-lg); }
.rq-feed-to { width: auto; max-width: 9rem; flex: none; }
/* Writing to one team (picked in the feed, on the map or in a table): the addressee stands out. */
.rq-feed-to.is-team { border-color: var(--rq-primary); font-weight: 700; }
.rq-btn-recall { --tblr-btn-color: var(--rq-danger-strong); --tblr-btn-border-color: var(--rq-danger); --tblr-btn-bg: var(--rq-surface);
    --tblr-btn-hover-bg: var(--rq-danger-bg); --tblr-btn-hover-color: var(--rq-danger-strong); --tblr-btn-hover-border-color: var(--rq-danger);
    border-width: 1.5px; font-weight: 800; }

/* Field messages: the top bar's button, its inbox, how this computer tells. */
.rq-field-inbox-btn { --tblr-btn-bg: var(--rq-surface); --tblr-btn-border-color: var(--rq-border); --tblr-btn-color: var(--rq-text);
    --tblr-btn-hover-bg: var(--rq-surface-alt); --tblr-btn-hover-color: var(--rq-text); font-weight: 800; gap: .5rem; }
.rq-field-inbox.has-new .rq-field-inbox-btn { --tblr-btn-bg: var(--rq-brand-tint); --tblr-btn-border-color: var(--rq-brand-border); --tblr-btn-color: var(--rq-brand-text);
    --tblr-btn-hover-bg: var(--rq-brand-tint); --tblr-btn-hover-color: var(--rq-brand-text); }
.rq-field-count { min-width: 1.375rem; height: 1.375rem; padding: 0 .375rem; border-radius: var(--rq-radius-pill); background: var(--rq-brand-strong);
    color: var(--rq-on-strong); font-size: .75rem; display: inline-flex; align-items: center; justify-content: center; }
.rq-inbox { width: min(27.5rem, calc(100vw - 2rem)); padding: 0; border-radius: var(--rq-radius-lg); overflow: hidden; box-shadow: var(--rq-shadow-float); }
#field-inbox-body { max-height: min(32rem, 60vh); overflow-y: auto; }
.rq-inbox-head { display: flex; align-items: center; gap: .5rem; padding: .875rem 1rem .625rem; }
.rq-inbox-title { margin: 0; font-size: 1rem; font-weight: 800; }
.rq-inbox-empty { padding: .5rem 1rem 1rem; color: var(--rq-text-muted); font-size: .875rem; }
.rq-inbox-thread { border-top: 1px solid var(--rq-border-soft); padding: .625rem 1rem; }
.rq-inbox-thread.is-urgent { background: var(--rq-danger-bg); }
.rq-inbox-thread-head { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.rq-inbox-thread-head .rq-team-dot { border-radius: 3px; }
.rq-inbox-count { padding: 0 .4375rem; border-radius: var(--rq-radius-pill); background: var(--rq-brand-strong); color: var(--rq-on-strong); font-size: .6875rem; font-weight: 800; }
.rq-inbox-at { margin-left: auto; font-size: .75rem; color: var(--rq-text-muted); }
.rq-inbox-line { margin-top: .375rem; font-size: .8125rem; line-height: 1.4; color: var(--rq-text-muted); }
.rq-inbox-line.is-new { color: var(--rq-text); font-weight: 700; }
.rq-inbox-actions { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .5rem; align-items: center; }
.rq-inbox-prefs { border-top: 1px solid var(--rq-border); background: var(--rq-surface-alt); padding: .75rem 1rem; }
.rq-inbox-pref { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 2.125rem; margin: 0; padding-left: 0; font-size: .8125rem; font-weight: 600; }
.rq-inbox-pref .form-check-input { float: none; margin: 0; flex: none; }

/* Urgent from the field: a red bar under the top bar on every tab until acknowledged. */
.rq-urgent-bar { display: flex; align-items: center; gap: .875rem; min-height: 3.25rem; padding: .375rem .75rem .375rem 1.5rem;
    background: var(--rq-danger-deep); color: var(--rq-on-strong); box-shadow: var(--rq-shadow-float); flex-wrap: wrap; }
.rq-urgent-bar[hidden] { display: none; }
.rq-urgent-dot { width: .625rem; height: .625rem; border-radius: 50%; background: var(--rq-on-strong); flex: none;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--rq-on-strong) 25%, transparent); animation: rq-urgent-pulse 1.2s ease-in-out infinite; }
.rq-urgent-label { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; }
.rq-urgent-text { font-size: .9375rem; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.rq-urgent-meta { font-size: .8125rem; opacity: .85; }
.rq-urgent-more { padding: 0 .5rem; border-radius: var(--rq-radius-pill); background: color-mix(in srgb, var(--rq-on-strong) 20%, transparent); font-size: .75rem; font-weight: 800; }
.rq-urgent-actions { margin-left: auto; display: flex; gap: .5rem; }
.rq-urgent-open { --tblr-btn-bg: transparent; --tblr-btn-color: var(--rq-on-strong); --tblr-btn-border-color: color-mix(in srgb, var(--rq-on-strong) 50%, transparent);
    --tblr-btn-hover-bg: color-mix(in srgb, var(--rq-on-strong) 12%, transparent); --tblr-btn-hover-color: var(--rq-on-strong); font-weight: 700; }
.rq-urgent-ack { --tblr-btn-bg: var(--rq-on-strong); --tblr-btn-color: var(--rq-danger-deep); --tblr-btn-border-color: var(--rq-on-strong);
    --tblr-btn-hover-bg: var(--rq-surface-alt); --tblr-btn-hover-color: var(--rq-danger-strong); font-weight: 800; }
@keyframes rq-urgent-pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--rq-on-strong) 0%, transparent); } }
@media (max-width: 767.98px) {
    .rq-urgent-bar { gap: .25rem .5rem; min-height: 0; padding: .5rem .75rem; }
    .rq-urgent-label, .rq-urgent-meta { font-size: .6875rem; }
    .rq-urgent-text { order: 5; width: 100%; font-size: .875rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .rq-urgent-actions { order: 6; margin-left: 0; width: 100%; }
    .rq-urgent-actions .btn { flex: 1 1 0; min-height: 2rem; padding-top: 0; padding-bottom: 0; font-size: .8125rem; }
}

/* A new item while you look elsewhere: a toast top right (Reply / Open in search). */
.rq-field-toasts { position: fixed; right: 1.5rem; top: calc(var(--rq-topbar-height) + 1rem); z-index: 1060; display: flex; flex-direction: column; gap: .5rem;
    width: min(23.75rem, calc(100vw - 2rem)); pointer-events: none; }
.rq-field-toast { pointer-events: auto; padding: .75rem .75rem .75rem .875rem; border-radius: var(--rq-radius-lg); background: var(--rq-surface);
    border: 1px solid var(--rq-border); border-left: 4px solid var(--rq-special); box-shadow: var(--rq-shadow-float); }
.rq-field-toast.is-urgent { border-left-color: var(--rq-danger); }
.rq-field-toast-head { display: flex; align-items: center; gap: .5rem; font-size: .75rem; }
.rq-field-toast-head b { text-transform: uppercase; letter-spacing: .04em; color: var(--rq-special); }
.rq-field-toast.is-urgent .rq-field-toast-head b { color: var(--rq-danger-strong); }
.rq-field-toast-head span { color: var(--rq-text-muted); }
.rq-field-toast-head .btn-close { margin-left: auto; width: .625rem; height: .625rem; }
.rq-field-toast-text { font-size: .875rem; line-height: 1.4; margin-top: .25rem; }
.rq-field-toast-actions { display: flex; gap: .375rem; margin-top: .625rem; }

/* The map window (MapWindow.cshtml): a slim navy bar and the map below it. */
.rq-map-window { margin: 0; height: 100vh; display: flex; flex-direction: column; background: var(--rq-bg); }
.rq-mapwin-bar { flex: none; display: flex; align-items: center; gap: .75rem; height: 3rem; padding: 0 .75rem 0 .875rem; background: var(--rq-hero);
    color: var(--rq-on-strong); white-space: nowrap; }
.rq-mapwin-mark { width: 1.75rem; height: 1.75rem; border-radius: var(--rq-radius-sm); background: var(--rq-brand-strong); font-size: .6875rem; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; }
.rq-mapwin-title { font-size: .9375rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rq-mapwin-linked { display: inline-flex; align-items: center; gap: .375rem; height: 1.625rem; padding: 0 .625rem; border-radius: var(--rq-radius-pill);
    background: color-mix(in srgb, var(--rq-success-line) 20%, transparent); color: var(--rq-success-line); font-size: .75rem; font-weight: 800; }
.rq-mapwin-linked[hidden], .rq-mapwin-picked[hidden] { display: none; }
.rq-mapwin-picked { font-size: .8125rem; color: var(--rq-on-navy-muted); }
.rq-mapwin-picked b { color: var(--rq-on-strong); }
.rq-mapwin-btn { --tblr-btn-bg: transparent; --tblr-btn-color: var(--rq-on-strong); --tblr-btn-border-color: var(--rq-on-navy-border);
    --tblr-btn-hover-bg: var(--rq-on-navy-fill); --tblr-btn-hover-color: var(--rq-on-strong); }
.rq-mapwin-back { --tblr-btn-bg: var(--rq-on-strong); --tblr-btn-color: var(--rq-hero); --tblr-btn-border-color: var(--rq-on-strong);
    --tblr-btn-hover-bg: var(--rq-on-navy-muted); --tblr-btn-hover-color: var(--rq-hero); font-weight: 800; }
.rq-sw.is-map-window { flex: 1 1 auto; gap: 0; }
.rq-sw.is-map-window .rq-search-map-wrap { height: 100%; }
.rq-sw.is-map-window .rq-search-map { height: 100%; border-radius: 0; }
@media (max-width: 991.98px) { .rq-mapwin-picked, .rq-mapwin-btn { display: none; } }

/* Full screen: the workspace over the whole window. */
.rq-search-fullscreen { overflow: hidden; }
.rq-sw.is-fullscreen { position: fixed; inset: 0; z-index: 1035; padding: .75rem; background: var(--tblr-body-bg); overflow: auto; }
@media (min-width: 1200px) { .rq-sw.is-fullscreen .rq-sw-body { height: calc(100vh - 5.5rem); } }

/* Mission insights: one card, tabs at the top, the body scrolls. */
.rq-insights { display: flex; flex-direction: column; margin-bottom: 0; container-type: inline-size; }
@container (max-width: 25rem) { .rq-insights-table .rq-col-area { display: none; } }
.rq-insights-head { flex: none; }
/* Too many tabs for a narrow panel: they scroll sideways (a thin bar, the mouse wheel, the picked one brought into view). */
.rq-insights-tabs { flex: none; padding: 0 .5rem; margin-bottom: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.rq-insights-tabs { scrollbar-width: none; }
.rq-insights-tabs::-webkit-scrollbar { height: 0; }
.rq-insights-tabs::-webkit-scrollbar-thumb { background: var(--rq-border); border-radius: 2px; }
.rq-insights-tabs .nav-item { flex: 1 1 auto; }
.rq-insights-tabs .nav-link { width: 100%; justify-content: center; padding-left: .375rem; padding-right: .375rem; white-space: nowrap; font-size: .8125rem; }
.rq-insights-tabs .nav-link .badge { padding: .125rem .3125rem; }
.rq-insights .rq-info-list.is-compact > div { grid-template-columns: 7rem minmax(0, 1fr); }
.rq-insights-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.rq-insights-section { padding: 1rem; border-bottom: 1px solid var(--rq-border); }
.rq-insights-section:last-child { border-bottom: 0; }
.rq-insights-heading { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .9375rem; font-weight: 600; color: var(--rq-navy); margin-bottom: .75rem; }
.rq-insights-heading > .ti { color: var(--rq-text-muted); font-size: 1.125rem; }
.rq-insights-table { margin-bottom: 0; }
.rq-insights-table > :not(caption) > * > :first-child { padding-left: 1rem; }
.rq-insights-table > :not(caption) > * > :last-child { padding-right: 1rem; }
.rq-insights .list-group-item { padding-left: 1rem; padding-right: 1rem; }
.rq-search-aside .is-picked, .rq-search-aside .is-marked { background: var(--rq-info-bg); box-shadow: inset 3px 0 0 var(--rq-info); }

/* The chance of success: the one figure the page is about. */
.rq-pos { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.rq-pos-tile { border: 1px solid var(--rq-border); border-radius: var(--rq-radius, 8px); padding: .75rem; text-align: center; background: var(--rq-surface-alt); }
.rq-pos-main { background: var(--rq-success-bg); border-color: transparent; }
.rq-pos-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; color: var(--rq-navy); font-variant-numeric: tabular-nums; }
.rq-pos-main .rq-pos-value { color: var(--rq-success); }
.rq-pos-label { font-size: .8125rem; color: var(--rq-text-muted); margin-top: .25rem; }

/* Most likely segments, and the selected segment's figures. */
.rq-likely { display: flex; flex-direction: column; }
/* Segments and hasty spots as one outline (_SearchOutline; rqOutline in mission-search.js). */
.rq-outline-tools { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: .5rem; padding: .75rem 1rem;
    background: var(--rq-surface); border-bottom: 1px solid var(--rq-border); }
.rq-outline .rq-seg > [aria-checked="true"] { background: var(--rq-surface); color: var(--rq-text); box-shadow: var(--rq-shadow-control); }
.rq-outline-chip { display: inline-flex; align-items: center; gap: .3rem; height: 1.75rem; padding: 0 .5rem; border-radius: var(--rq-radius-pill);
    border: 1px solid var(--rq-border); background: var(--rq-surface); color: var(--rq-text-muted); font-size: .75rem; font-weight: 600; }
.rq-outline-chip[aria-pressed="true"] { background: var(--rq-primary); border-color: var(--rq-primary); color: var(--rq-on-primary); }
.rq-outline-chip-dot { width: .55rem; height: .55rem; border-radius: 2px; background: var(--rq-search-free); }
.rq-outline-chip-dot.is-spot { background: var(--rq-search-hasty); transform: rotate(45deg); }
.rq-outline[data-mode="ring"] [data-outline-tree="status"], .rq-outline[data-mode="status"] [data-outline-tree="ring"] { display: none; }
.rq-outline-group + .rq-outline-group { border-top: 1px solid var(--rq-border); }
.rq-outline-head { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem 1rem .5rem .625rem; border: 0;
    background: var(--rq-surface-alt); color: var(--rq-text); text-align: left; font-size: .8125rem; }
.rq-outline-head:hover { background: var(--rq-surface-sunk); }
.rq-outline-chevron { color: var(--rq-text-muted); transition: transform .15s; }
.rq-outline-group.is-open .rq-outline-chevron { transform: rotate(90deg); }
.rq-outline-group:not(.is-open) > .rq-outline-rows { display: none; }
.rq-outline-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rq-outline-title > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-outline-sub { display: flex; align-items: center; gap: .3rem; min-width: 0; font-size: .75rem; color: var(--rq-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-outline-bar { flex: none; display: flex; width: 3rem; height: 6px; border-radius: 3px; background: var(--rq-border); overflow: hidden; }
.rq-outline-bar > .is-searched { background: var(--rq-search-find); }
.rq-outline-bar > .is-searching { background: var(--rq-search-searching); }
.rq-outline-bar > .is-sent { background: var(--rq-search-assigned); }
.rq-outline-poa { flex: none; display: flex; flex-direction: column; align-items: stretch; min-width: 3.25rem; text-align: right; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.rq-outline-tools .htmx-indicator:not(.htmx-request) { display: none; }
.rq-outline-row { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto auto 2rem; align-items: center; gap: .5rem;
    padding: .375rem .5rem .375rem 1rem; border-top: 1px solid var(--rq-border-soft); }
.rq-outline-row[hidden] { display: none; }
.rq-outline-row.is-active, .rq-outline-row.is-marked { background: var(--rq-info-bg); box-shadow: inset 3px 0 0 var(--rq-info); }
.rq-outline-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rq-outline-state { display: flex; align-items: center; gap: .3rem; font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-outline-name { color: var(--rq-text); font-size: .8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.rq-outline-name:hover { text-decoration: underline; color: var(--rq-text); }
.rq-outline-statetext { font-weight: 700; color: var(--rq-text); }
.rq-outline-dot { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--rq-text-muted); }
.rq-outline-dot.is-info { background: var(--rq-info); }
.rq-outline-dot.is-pending { background: var(--rq-pending); }
.rq-outline-dot.is-success { background: var(--rq-success); }
.rq-outline-dot.is-warning { background: var(--rq-warning); }
.rq-outline-dot.is-muted { background: var(--rq-border-strong); }
.rq-outline-spot { justify-self: center; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem;
    border-radius: var(--rq-radius-sm); background: var(--rq-surface-sunk); color: var(--rq-search-hasty); text-decoration: none; }
.rq-outline-spot.is-done { color: var(--rq-text-muted); }
.rq-outline-poabar { display: block; height: 3px; margin-top: 2px; border-radius: 2px; background: var(--rq-border-soft); overflow: hidden; }
.rq-outline-poabar > span { display: block; height: 100%; background: var(--rq-primary); }
.rq-outline-act .btn { min-height: 1.75rem; height: 1.75rem; padding: 0 .5rem; font-size: .75rem; }
.rq-outline-more { display: flex; align-items: center; gap: .375rem; width: 100%; padding: .375rem 1rem .375rem 3.25rem; border: 0;
    border-top: 1px solid var(--rq-border-soft); background: transparent; color: var(--rq-link); font-size: .75rem; font-weight: 600; text-align: left; }
.rq-outline-more:hover { background: var(--rq-surface-alt); }
.rq-outline-more[hidden], .rq-outline-group[hidden] { display: none; }
@container (max-width: 22rem) { .rq-outline-poabar { display: none; } .rq-outline-row { padding-left: .625rem; gap: .375rem; } }
.rq-likely-row { display: grid; grid-template-columns: 3rem 1fr 3.5rem 4.25rem; align-items: center; gap: .75rem; padding: .4rem .25rem;
    color: inherit; text-decoration: none; border-bottom: 1px solid var(--rq-border); font-variant-numeric: tabular-nums; }
.rq-likely-row:last-child { border-bottom: 0; }
.rq-likely-row:hover { background: var(--rq-surface-alt); color: inherit; }
.rq-likely-bar { display: block; height: 6px; border-radius: 3px; background: var(--rq-neutral-bg); overflow: hidden; }
.rq-likely-bar > span { display: block; height: 100%; background: var(--rq-search-free); border-radius: 3px; }
.rq-poa-bar { background: var(--rq-search-free); }
.rq-selected { background: var(--rq-surface-alt); box-shadow: inset 3px 0 0 var(--rq-search-free); }
.rq-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.rq-facts > div { display: flex; flex-direction: column; background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius, 8px); padding: .4rem .5rem; }
.rq-facts span { font-size: .75rem; color: var(--rq-text-muted); }
.rq-facts strong { font-size: 1rem; font-variant-numeric: tabular-nums; }

/* An active search pulses red (the status the page is about). */
.rq-status-danger .rq-live-dot { animation-name: rq-pulse-danger; }
@keyframes rq-pulse-danger { 0% { box-shadow: 0 0 0 0 rgba(var(--rq-danger-rgb), .45); } 100% { box-shadow: 0 0 0 .4rem rgba(var(--rq-danger-rgb), 0); } }
.rq-region-map { height: 22rem; border-radius: var(--rq-radius, 8px); }
.rq-region-map.rq-picking { cursor: crosshair; }

/* Search category form: the find-location classes line up. */
.rq-find-class { min-width: 7.5rem; }

/* Search: light and weather at the starting point (plan form and panel). */
.rq-weather-strip { display: flex; gap: .25rem; overflow-x: auto; }
.rq-weather-block { flex: 0 0 auto; min-width: 4.25rem; text-align: center; padding: .25rem; border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); }
.rq-attribution { font-size: .75rem; }

/* Search: radio coverage on the map, a link's profile, radio sites. */
:root { --rq-radio-seen: #0c8599; --rq-radio-ground: #868e96; --rq-radio-los: #1c7ed6; --rq-radio-fresnel: #f59f00; --rq-radio-block: #e03131; }
.rq-radio-profile { border: 1px solid var(--tblr-border-color); border-radius: var(--tblr-border-radius); padding: .25rem; }
.rq-radio-svg { display: block; width: 100%; height: 170px; }
.rq-radio-ground { fill: var(--rq-radio-ground); fill-opacity: .35; stroke: var(--rq-radio-ground); stroke-width: 1; }
.rq-radio-los { stroke: var(--rq-radio-los); stroke-width: 2; }
.rq-radio-los-blocked { stroke: var(--rq-radio-block); stroke-dasharray: 6 4; }
.rq-radio-fresnel { fill: none; stroke: var(--rq-radio-fresnel); stroke-width: 1.5; stroke-dasharray: 4 3; }
.rq-radio-block { stroke: var(--rq-radio-block); stroke-width: 1.5; }
.rq-radio-icon { color: var(--rq-radio-seen); }

/* ---------- Rank ring and mission-role badge on avatars (_MemberAvatar) ---------- */
.avatar { position: relative; }
.avatar.rq-rank { box-shadow: 0 0 0 2px var(--rq-surface), 0 0 0 4px var(--rq-rank, var(--rq-neutral)); }
.avatar.avatar-xs.rq-rank, .avatar.avatar-sm.rq-rank { box-shadow: 0 0 0 1.5px var(--rq-surface), 0 0 0 3px var(--rq-rank, var(--rq-neutral)); }
.rq-profile-avatar .avatar.rq-rank { box-shadow: 0 0 0 4px var(--rq-surface), 0 0 0 8px var(--rq-rank, var(--rq-neutral)); }
.rq-sidebar .rq-user .avatar.rq-rank { box-shadow: 0 0 0 2px var(--rq-sidebar-bg), 0 0 0 4px var(--rq-rank, var(--rq-neutral)); }
.rq-rank-beginner { --rq-rank: var(--rq-rank-beginner); }
.rq-rank-searcher { --rq-rank: var(--rq-rank-searcher); }
.rq-rank-intern { --rq-rank: var(--rq-rank-intern); }
.rq-rank-rescuer { --rq-rank: var(--rq-rank-rescuer); }
.rq-rank-instructorcandidate { --rq-rank: var(--rq-rank-instructorcandidate); }
.rq-rank-instructor { --rq-rank: var(--rq-rank-instructor); }
.rq-role-badge {
    position: absolute; right: -4px; bottom: -4px; width: 1rem; height: 1rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--rq-on-strong); background: var(--rq-role-leader); box-shadow: 0 0 0 2px var(--rq-surface);
    font-size: .625rem; line-height: 1;
}
.rq-role-badge .ti { font-size: inherit; }
.rq-role-coordinator { background: var(--rq-role-coordinator); }
.rq-role-recorder { background: var(--rq-role-recorder); }
.avatar-lg .rq-role-badge, .avatar-xl .rq-role-badge { width: 1.5rem; height: 1.5rem; font-size: .875rem; }

/* ========== Batch 2: admin and simple pages ========== */

/* ---------- Signed-out pages (_AuthLayout): navy brand side, the form beside it ---------- */
.rq-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(22rem, 35rem) 1fr; background: var(--rq-bg); }
.rq-auth-brand {
    position: relative; isolation: isolate; overflow: hidden; background: var(--rq-hero); color: var(--rq-on-strong);
    padding: var(--rq-space-10) var(--rq-space-10) 3rem; display: flex; flex-direction: column;
}
.rq-auth-contours { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; opacity: .1; color: var(--rq-on-strong); }
.rq-auth-logo { height: 2.75rem; width: auto; align-self: flex-start; }
.rq-auth-tagline { margin: auto 0 0; max-width: 25rem; font-size: 2.5rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.rq-auth-main { display: flex; align-items: center; justify-content: center; padding: var(--rq-space-8) var(--rq-space-4); }
.rq-auth-form { width: 100%; max-width: 25rem; }
/* The pages' own card dissolves into the page: the form stands on the ground. */
.rq-auth-form > .card { background: transparent; border: 0; box-shadow: none; }
.rq-auth-form > .card > .card-body { padding: 0; }
.rq-auth-form h1, .rq-auth-form h2.h3 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; color: var(--rq-text); }
.rq-auth-form .form-control { min-height: 2.875rem; font-size: .9375rem; background: var(--rq-surface); }
.rq-auth-form .btn-primary.w-100 { min-height: 3rem; font-size: .9375rem; font-weight: 800; border-radius: var(--rq-radius-lg); }
.rq-auth-languages { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .75rem; margin-top: var(--rq-space-8); }
.rq-auth-languages button {
    border: 0; background: none; padding: .25rem; font: inherit; font-size: .8125rem; color: var(--rq-text-muted); cursor: pointer;
}
.rq-auth-languages button:hover { color: var(--rq-text); text-decoration: underline; }
.rq-auth-languages button.is-current { color: var(--rq-text); font-weight: 800; }
@media (max-width: 767.98px) {
    .rq-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .rq-auth-brand { padding: var(--rq-space-6) var(--rq-space-4); }
    .rq-auth-tagline { margin-top: var(--rq-space-6); font-size: 1.5rem; }
    .rq-auth-main { align-items: flex-start; padding-top: var(--rq-space-8); }
}

/* ---------- Error and no-access pages: what happened, what wasn't lost, the way on ---------- */
.rq-problem {
    position: relative; overflow: hidden; max-width: 40rem; margin: var(--rq-space-8) auto; padding: 3rem var(--rq-space-8);
    background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius-xl);
}
.rq-problem::after {
    content: ""; position: absolute; right: -2rem; top: -1rem; width: 22rem; height: 14rem; pointer-events: none;
    background: repeating-radial-gradient(ellipse at 70% 40%, transparent 0 18px, var(--rq-border-soft) 18px 19.5px);
    opacity: .7; z-index: 0;
}
.rq-problem > * { position: relative; z-index: 1; }
.rq-problem-icon {
    width: 3.5rem; height: 3.5rem; border-radius: var(--rq-radius-lg); display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-surface-sunk); color: var(--rq-navy); font-size: 1.75rem; margin-bottom: var(--rq-space-4);
}
.rq-problem-icon.is-error { background: var(--rq-danger-bg); color: var(--rq-danger); }
.rq-problem-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; color: var(--rq-text); margin: var(--rq-space-1) 0 var(--rq-space-3); }
.rq-problem-text { font-size: .9375rem; color: var(--rq-text-muted); line-height: 1.55; max-width: 32rem; }
.rq-problem-actions { display: flex; flex-wrap: wrap; gap: var(--rq-space-2); margin-top: var(--rq-space-6); }
.rq-problem-ref { margin-top: var(--rq-space-6); font-size: .75rem; color: var(--rq-text-muted); }
@media (max-width: 575.98px) { .rq-problem { padding: var(--rq-space-6) var(--rq-space-4); margin-top: var(--rq-space-4); } .rq-problem-title { font-size: 1.375rem; } }

/* ---------- Guide chapter: chapters · the chapter · on this page ---------- */
.rq-guide-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr) 15rem; gap: var(--rq-space-6); align-items: start; }
.rq-guide-chapters, .rq-guide-aside { position: sticky; top: calc(var(--rq-topbar-height) + var(--rq-space-4)); }
.rq-guide-chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rq-guide-chapters a {
    display: flex; align-items: baseline; gap: .625rem; padding: .5rem .625rem; border-radius: var(--rq-radius-md);
    color: var(--rq-text); text-decoration: none; font-size: .875rem; font-weight: 600; line-height: 1.35;
}
.rq-guide-chapters a:hover { background: var(--rq-surface); }
.rq-guide-chapters a.active { background: var(--rq-surface); box-shadow: inset 3px 0 0 var(--rq-brand); font-weight: 800; }
.rq-guide-chapter-no { flex: none; min-width: 1.25rem; color: var(--rq-text-muted); font-variant-numeric: tabular-nums; font-weight: 700; }
.rq-guide-body { padding: var(--rq-space-8) 2.5rem; }
.rq-guide-kicker { color: var(--rq-brand-text); }
.rq-guide-heading { font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; color: var(--rq-text); margin: var(--rq-space-2) 0 var(--rq-space-6); }
.rq-guide-steps { display: grid; grid-template-columns: 1fr 1fr; gap: var(--rq-space-3); margin-top: var(--rq-space-3); }
.rq-guide-steps .rq-guide-step { max-width: none; padding: var(--rq-space-4); gap: .25rem; color: inherit; transition: border-color var(--rq-duration); }
.rq-guide-steps .rq-guide-step:hover { border-color: var(--rq-border-strong); }
.rq-guide-steps .rq-guide-step.is-next { text-align: right; }
.rq-guide-step-title { font-weight: 800; color: var(--rq-text); }
.rq-guide-aside .rq-guide-toc { background: transparent; border: 0; padding: 0; margin-bottom: var(--rq-space-4); }
.rq-guide-aside .rq-guide-toc ul { columns: auto; border-left: 2px solid var(--rq-border); }
.rq-guide-aside .rq-guide-toc li { padding: 0; }
.rq-guide-aside .rq-guide-toc a { display: block; padding: .3125rem .75rem; font-size: .8125rem; color: var(--rq-text-muted); text-decoration: none; }
.rq-guide-aside .rq-guide-toc a:hover { color: var(--rq-text); }
@media (max-width: 1399.98px) {
    .rq-guide-layout { grid-template-columns: 14rem minmax(0, 1fr); }
    .rq-guide-aside { grid-column: 2; position: static; display: flex; justify-content: flex-end; }
    .rq-guide-aside .rq-guide-toc { display: none; }
    .rq-guide-aside .btn { width: auto !important; }
}
@media (max-width: 991.98px) {
    .rq-guide-layout { grid-template-columns: 1fr; }
    .rq-guide-chapters { position: static; order: 3; }
    .rq-guide-aside { grid-column: 1; }
    .rq-guide-body { padding: var(--rq-space-6) var(--rq-space-4); }
    .rq-guide-steps { grid-template-columns: 1fr; }
}
@media print { .rq-guide-layout { display: block; } .rq-guide-body { padding: 0; } }

/* ---------- Key/value list in a card (label left, value right, soft lines) ---------- */
.rq-keyvals { display: grid; grid-template-columns: minmax(8rem, auto) 1fr; margin: 0; padding: 0 var(--rq-space-4); }
.rq-keyvals > dt, .rq-keyvals > dd { padding: .625rem 0; border-top: 1px solid var(--rq-border-soft); margin: 0; font-size: .875rem; }
.rq-keyvals > dt:first-of-type, .rq-keyvals > dt:first-of-type + dd { border-top: 0; }
.rq-keyvals > dt { color: var(--rq-text-muted); font-weight: 500; }
.rq-keyvals > dd { font-weight: 700; color: var(--rq-text); text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Tenants: organizations as cards, the chosen one's stations beside ---------- */
.rq-tenant-list { display: grid; gap: var(--rq-space-3); }
.rq-tenant-card {
    display: flex; flex-direction: row; align-items: center; gap: var(--rq-space-4); width: 100%; padding: var(--rq-space-4); margin: 0;
    text-align: left; color: var(--rq-text); cursor: pointer; font: inherit;
    transition: border-color var(--rq-duration), box-shadow var(--rq-duration);
}
.rq-tenant-card:hover { border-color: var(--rq-border-strong); }
.rq-tenant-card.active { border-color: var(--rq-navy); box-shadow: 0 0 0 1px var(--rq-navy); }
.rq-tenant-tile {
    flex: none; width: 3rem; height: 3rem; border-radius: var(--rq-radius-md); display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-hero); color: var(--rq-on-strong); font-weight: 800; font-size: .8125rem; letter-spacing: .02em;
}
.rq-tenant-tile.is-logo { background: var(--rq-surface); border: 1px solid var(--rq-border-soft); object-fit: contain; padding: 4px; }
.rq-tenant-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rq-tenant-name b { font-weight: 800; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-tenant-count { flex: none; text-align: right; display: flex; flex-direction: column; line-height: 1.2; }
.rq-tenant-count .rq-figure { font-size: 1.125rem; }
.rq-tenant-detail { position: sticky; top: calc(var(--rq-topbar-height) + var(--rq-space-4)); }
.rq-tenant-stations-head { display: flex; align-items: center; gap: var(--rq-space-2); padding: var(--rq-space-3) var(--rq-space-4) var(--rq-space-2); border-top: 1px solid var(--rq-border); }
.rq-tenant-stations { list-style: none; margin: 0; padding: 0 var(--rq-space-4) var(--rq-space-3); }
.rq-tenant-stations > li { display: flex; align-items: center; gap: var(--rq-space-2); padding: .5rem 0; border-top: 1px solid var(--rq-border-soft); font-size: .875rem; }
.rq-tenant-stations > li:first-child { border-top: 0; }
.rq-tenant-stations b { font-weight: 700; }

/* ---------- SMS log ---------- */
.rq-sms-body { font-size: .8125rem; color: var(--rq-text-muted); min-width: 16rem; max-width: 36rem; }

/* ---------- Audit log: the changes, and the picked one's values before and after ---------- */
.rq-audit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 30rem); gap: var(--rq-space-3); align-items: start; }
.rq-audit-table tbody tr { cursor: pointer; }
.rq-audit-table tbody tr:hover > * { background: var(--rq-surface-alt); }
.rq-audit-table tbody tr.is-selected > * { background: var(--rq-info-bg); }
.rq-audit-table tbody tr.is-selected > :first-child { box-shadow: inset 3px 0 0 var(--rq-info); }
.rq-audit-table tbody tr:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: -2px; }
.rq-audit-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-audit-detail { position: sticky; top: calc(var(--rq-topbar-height) + var(--rq-space-4)); max-height: calc(100vh - var(--rq-topbar-height) - 2rem); overflow: auto; }
.rq-audit-detail-title { font-size: 1rem; font-weight: 800; color: var(--rq-text); margin: var(--rq-space-2) 0 .25rem; overflow-wrap: anywhere; }
.rq-audit-values { font-size: .8125rem; table-layout: fixed; }
.rq-audit-values th[scope="row"] { color: var(--rq-text-muted); font-weight: 600; width: 32%; overflow-wrap: anywhere; }
.rq-audit-values td { overflow-wrap: anywhere; vertical-align: top; }
.rq-audit-values td.is-old { background: var(--rq-danger-bg); color: var(--rq-danger-strong); }
.rq-audit-values td.is-new { background: var(--rq-success-bg); color: var(--rq-success-strong); }
.rq-audit-record {
    display: flex; align-items: center; gap: var(--rq-space-2); padding: .625rem var(--rq-space-4);
    background: var(--rq-info-bg); border-radius: var(--rq-radius-lg); font-size: .875rem;
}
@media (max-width: 1199.98px) {
    .rq-audit { grid-template-columns: 1fr; }
    .rq-audit-detail { position: static; max-height: none; }
}

/* ---------- Languages: how far each one is translated ---------- */
.rq-lang-progress { display: flex; flex-direction: column; gap: .25rem; margin-top: .5rem; }
.rq-lang-progress .rq-meter { width: 100%; }
.rq-lang-progress .rq-meter > .is-partial { background: var(--rq-pending); }

/* ---------- Organization: the logo header, stations with their figures, hazards beside ---------- */
.rq-org-head { display: flex; align-items: center; gap: var(--rq-space-4); flex-wrap: wrap; }
.rq-org-logo { flex: none; width: 7rem; }
.rq-org-logo .rq-logo-box { min-height: 5rem; }
.rq-org-name { font-size: 1.375rem; font-weight: 800; color: var(--rq-text); margin: 0 0 .25rem; }
.rq-station-logo {
    flex: none; width: 2.25rem; height: 2.25rem; border-radius: var(--rq-radius-sm); object-fit: contain;
    background: var(--rq-surface); border: 1px solid var(--rq-border-soft);
}
.rq-station-logo.is-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--rq-text-muted); background: var(--rq-surface-sunk); border: 0; }
.rq-missing { display: inline-block; padding: .125rem .5rem; border-radius: var(--rq-radius-pill); background: var(--rq-pending-bg); color: var(--rq-pending); font-size: .75rem; font-weight: 800; }
.rq-hazard-list { list-style: none; margin: 0; padding: 0 var(--rq-space-4); }
.rq-hazard-list > li { display: flex; align-items: center; gap: var(--rq-space-3); padding: .625rem 0; border-top: 1px solid var(--rq-border-soft); font-size: .875rem; }
.rq-hazard-list > li:first-child { border-top: 0; }
.rq-hazard-swatch { flex: none; width: .75rem; height: .75rem; border-radius: 3px; background: var(--rq-danger); }

/* ---------- Reference data: how many entries each list holds ---------- */
.rq-subnav-count { flex: none; min-width: 1.5rem; text-align: right; font-size: .75rem; font-weight: 700; color: var(--rq-text-muted); font-variant-numeric: tabular-nums; }
.rq-subnav-item.active .rq-subnav-count { color: var(--rq-text); }

/* ---------- Permissions: areas × None / View / Manage ---------- */
.rq-perm-grid th[scope="row"] { font-weight: 600; color: var(--rq-text); }
.rq-perm-grid td, .rq-perm-grid thead th:not(:first-child) { width: 7.5rem; }
.rq-perm-dot { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; border: 1.5px solid var(--rq-border); vertical-align: middle; }
.rq-perm-dot.is-on { border: 0; background: var(--rq-navy); box-shadow: 0 0 0 3px var(--rq-surface-sunk); }
.rq-perm-dot.rq-perm-none { background: var(--rq-neutral); }
.rq-perm-dot.rq-perm-view { background: var(--rq-info); }
.rq-perm-dot.rq-perm-manage { background: var(--rq-success); }
.rq-perm-off { color: var(--rq-border-strong); }
.rq-perm-radio { width: 1.125rem; height: 1.125rem; margin: 0; float: none; cursor: pointer; }
.rq-perm-radio:checked { background-color: var(--rq-check); border-color: var(--rq-check); }
@media (max-width: 575.98px) {
    .rq-audit-table th:nth-child(2), .rq-audit-table td:nth-child(2) { display: none; }
    .rq-audit-table .rq-fluid-cell { min-width: 9rem; }
    .rq-audit-table td:first-child { white-space: normal !important; min-width: 6rem; }
}

/* ---------- Batch 3: list pages ---------- */

/* A list with a rail of sections on its left (phonebook categories). Phones: the rail scrolls sideways above. */
.rq-rail-layout { display: grid; grid-template-columns: 13.75rem minmax(0, 1fr); gap: var(--rq-space-4); align-items: start; }
.rq-rail { display: flex; flex-direction: column; gap: .25rem; position: sticky; top: 1rem; }
.rq-rail-item {
    display: flex; align-items: center; gap: .625rem; min-height: 2.5rem; padding: .375rem .75rem; border-radius: var(--rq-radius-sm);
    color: var(--rq-text); font-size: .8125rem; font-weight: 600; line-height: 1.3; text-decoration: none;
}
.rq-rail-item:hover { background: var(--rq-surface-sunk); color: var(--rq-text); text-decoration: none; }
.rq-rail-item.active { background: var(--rq-surface); font-weight: 800; box-shadow: var(--rq-shadow-control); }
/* A long category name stays on one line, cut with an ellipsis (the whole name is its title). */
.rq-rail-item-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-rail-item-count { flex: none; margin-left: auto; font-size: .75rem; color: var(--rq-text-muted); font-variant-numeric: tabular-nums; }
.rq-rail-link {
    margin-top: .375rem; padding: .25rem .625rem; border: 0; background: none; text-align: left;
    color: var(--rq-link); font-size: .8125rem; font-weight: 800; cursor: pointer;
}
@media (max-width: 767.98px) {
    .rq-rail-layout { grid-template-columns: minmax(0, 1fr); }
    .rq-rail { position: static; flex-direction: row; overflow-x: auto; padding-bottom: .25rem; }
    .rq-rail-item { flex: none; max-width: 15rem; }
    .rq-rail-link { flex: none; margin-top: 0; }
}

/* The line above a list: how many, and its actions on the right. */
.rq-list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rq-space-2); margin-bottom: var(--rq-space-3); font-size: .8125rem; }

/* A one-line notice strip above a list. */
.rq-notice { padding: .625rem .875rem; border-radius: var(--rq-radius-md); border: 1px solid var(--rq-border); background: var(--rq-surface); font-size: .8125rem; }
.rq-notice-pending { background: var(--rq-pending-bg); border-color: var(--rq-pending); }
.rq-notice-pending b { color: var(--rq-pending); }
.rq-notice-info { background: var(--rq-info-bg); border-color: var(--rq-info); }
.rq-notice-info b { color: var(--rq-info); }

/* Phonebook: a card per contact, numbers as rows with Copy. */
.rq-contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--rq-space-3); }
.rq-contact { background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius-xl); padding: .875rem 1rem; }
.rq-contact-name { font-size: .9375rem; font-weight: 800; margin-top: .25rem; }
/* A long category name stays within the card, cut with an ellipsis (the whole name is its title). */
.rq-contact-category { display: block; width: fit-content; max-width: 100%; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.rq-number-list { display: flex; flex-direction: column; gap: .375rem; margin-top: .625rem; }
.rq-number { display: flex; align-items: center; gap: .625rem; padding: .375rem .375rem .375rem .625rem; border-radius: var(--rq-radius-md); background: var(--rq-surface-alt); }
.rq-number-kind { display: inline-flex; align-items: center; gap: .25rem; width: 5.5rem; flex: none; font-size: .6875rem; font-weight: 800; color: var(--rq-text-muted); }
.rq-number-kind .ti { font-size: .875rem; }
.rq-number-value { flex: 1; min-width: 0; font-size: .9375rem; font-weight: 800; color: var(--rq-text); text-decoration: none; }
a.rq-number-value:hover { color: var(--rq-link); }

/* Gear: the pieces' conditions as one bar. */
.rq-condition-bar { display: flex; gap: 2px; width: 7.5rem; max-width: 100%; height: .5rem; border-radius: 99px; overflow: hidden; }
.rq-condition-success { background: var(--rq-success); }
.rq-condition-pending { background: var(--rq-pending); }
.rq-condition-danger { background: var(--rq-danger); }

/* Cards in a grid (activities). */
.rq-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: var(--rq-space-3); margin-bottom: var(--rq-space-3); }
.rq-activity-card {
    position: relative; display: flex; flex-direction: column; gap: .5rem; padding: .875rem 1rem;
    background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius-xl);
}
.rq-activity-card:hover { border-color: var(--rq-border-strong); }
.rq-activity-title { display: block; font-size: .9375rem; font-weight: 800; color: var(--rq-text); text-decoration: none; }
.rq-activity-title:hover { color: var(--rq-text); text-decoration: none; }
.rq-above-link { position: relative; z-index: 2; }
.rq-tag-special { background: var(--rq-special-bg); color: var(--rq-special); }

/* A date as a small tile: month over day (cards of activities and events). */
.rq-date-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
    width: 3rem; padding: .3125rem 0; border-radius: var(--rq-radius-md); background: var(--rq-surface-alt); color: var(--rq-text);
}
.rq-date-tile-month { font-size: .625rem; font-weight: 800; opacity: .8; letter-spacing: .04em; }
.rq-date-tile-day { font-size: 1.1875rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rq-date-tile.is-picked { background: var(--rq-primary); color: var(--rq-on-primary); }
.rq-meter-wide { display: block; width: 100%; max-width: none; height: .375rem; }

/* Station events: the list beside the picked event. Phones: stacked, the event under the list. */
.rq-split { display: grid; grid-template-columns: minmax(18rem, 28rem) minmax(0, 1fr); gap: var(--rq-space-4); align-items: start; }
.rq-split-list { overflow: hidden; margin-bottom: 0; }
.rq-split-list-head { padding: .75rem; }
/* Picking an event on a phone scrolls it into view (js/pages/station-events.js), clear of the sticky top bar. */
.rq-split-detail { scroll-margin-top: calc(var(--rq-topbar-height) + .75rem); }
@media (max-width: 991.98px) { .rq-split { grid-template-columns: minmax(0, 1fr); } }
.rq-event-row {
    display: flex; align-items: center; gap: .75rem; padding: .75rem; border-top: 1px solid var(--rq-border);
    color: var(--rq-text); text-decoration: none;
}
.rq-event-row:hover { background: var(--rq-surface-alt); color: var(--rq-text); text-decoration: none; }
.rq-event-row.is-picked { background: var(--rq-info-bg); }
.rq-event-row-title { display: block; font-size: .875rem; font-weight: 800; }
.rq-event-title { margin: .25rem 0 0; font-size: 1.375rem; font-weight: 800; }
.rq-answer-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; padding: .75rem .875rem; border-radius: var(--rq-radius-lg); }
.rq-answer-strip-pending { background: var(--rq-pending-bg); }
.rq-answer-strip-success { background: var(--rq-success-bg); }
.rq-answer-strip-danger { background: var(--rq-danger-bg); }
.rq-answer-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--rq-space-3); align-items: start; }
.rq-answer-group { overflow: hidden; margin-bottom: 0; }
.rq-answer-group-head { display: flex; align-items: center; gap: .5rem; padding: .75rem .875rem .5rem; font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rq-answer-dot { width: .5rem; height: .5rem; border-radius: 99px; flex: none; }
.rq-answer-dot-success { background: var(--rq-success); }
.rq-answer-dot-danger { background: var(--rq-danger); }
.rq-answer-dot-neutral { box-shadow: inset 0 0 0 1.5px var(--rq-text-muted); }
.rq-text-neutral { color: var(--rq-text-muted); }
.rq-answer-person { display: flex; align-items: center; gap: .5rem; padding: .5rem .875rem; border-top: 1px solid var(--rq-border); font-size: .8125rem; font-weight: 600; }

/* Notifications page: day headings, a row per notification, an icon tinted by what it is about. */
.rq-notifications .rq-notification-day { padding: .75rem 1rem .25rem; border-top: 1px solid var(--rq-border); }
.rq-notifications .rq-notification-day:first-child { border-top: 0; }
.rq-notifications .rq-notification {
    display: flex; align-items: flex-start; gap: .75rem; width: 100%; padding: .75rem 1rem; text-align: left;
    border: 0; border-top: 1px solid var(--rq-border); background: var(--rq-surface); color: var(--rq-text);
}
.rq-notifications .rq-notification:hover { background: var(--rq-surface-alt); }
.rq-notifications .rq-notification.is-unread { background: var(--rq-brand-tint); }
.rq-notifications .rq-notification.is-unread::before { display: none; }
.rq-notifications .rq-notification-icon { width: 2.25rem; height: 2.25rem; border-radius: var(--rq-radius-md); display: flex; align-items: center; justify-content: center; flex: none; font-size: 1.125rem; }
.rq-notification-title { display: block; font-size: .875rem; font-weight: 600; }
.rq-notification.is-unread .rq-notification-title { font-weight: 800; }
.rq-ntone-brand { background: var(--rq-brand-tint) !important; color: var(--rq-brand) !important; }
.rq-ntone-pending { background: var(--rq-pending-bg) !important; color: var(--rq-pending) !important; }
.rq-ntone-special { background: var(--rq-special-bg) !important; color: var(--rq-special) !important; }
.rq-ntone-info { background: var(--rq-info-bg) !important; color: var(--rq-info) !important; }
.rq-ntone-neutral { background: var(--rq-neutral-bg) !important; color: var(--rq-neutral) !important; }
.rq-notifications .rq-notification.is-unread .rq-ntone-brand { background: var(--rq-surface) !important; }
.rq-unread-dot { width: .5rem; height: .5rem; border-radius: 99px; background: var(--rq-urgent, var(--rq-brand)); flex: none; margin-top: .375rem; }
.rq-notifications .rq-seg > button[aria-pressed="true"] { background: var(--rq-surface); color: var(--rq-text); box-shadow: var(--rq-shadow-control); }
.rq-answer-more { width: 100%; border: 0; border-top: 1px solid var(--rq-border); background: none; color: var(--rq-link); font-weight: 800; text-align: left; cursor: pointer; }
.rq-notifications { max-width: 52rem; }
.rq-notifications > .card { overflow: hidden; }
/* Phones: a segmented group stays one line (tighter), scrolling sideways if it still doesn't fit. */
@media (max-width: 575.98px) {
    .rq-seg { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .rq-seg > a, .rq-seg > button, .rq-seg > label { padding: 0 .5rem; flex: none; }
}

/* ---------- Batch 4: dashboard ---------- */
/* Desktop: the work on the left, the call-out and the calendar on the right. Below 1200 px one
   column in reading order (running mission, call-out, tasks, coming up, recent). */
.rq-dash { display: grid; grid-template-columns: minmax(0, 1fr) 23.75rem; gap: var(--rq-space-4); align-items: start; }
.rq-dash > * { grid-column: 1; margin-bottom: 0; min-width: 0; }
.rq-dash > .rq-dash-callout { grid-column: 2; grid-row: 1; }
.rq-dash > .rq-dash-upcoming { grid-column: 2; grid-row: 2 / span 3; }
.rq-dash.rq-dash-nocallout > .rq-dash-upcoming { grid-row: 1 / span 4; }
@media (max-width: 1199.98px) {
    .rq-dash { grid-template-columns: minmax(0, 1fr); }
    .rq-dash > *, .rq-dash > .rq-dash-callout, .rq-dash > .rq-dash-upcoming,
    .rq-dash.rq-dash-nocallout > .rq-dash-upcoming { grid-column: 1; grid-row: auto; }
}
.rq-dash-card-head { display: flex; align-items: center; gap: .5rem; padding: .875rem 1rem .625rem; }
.rq-dash-card-title { margin: 0; font-size: .9375rem; font-weight: 800; color: var(--rq-text); }
.rq-dash-more { margin-left: auto; font-size: .8125rem; font-weight: 800; color: var(--rq-link); text-decoration: none; white-space: nowrap; }
.rq-dash-more:hover { color: var(--rq-link-hover); }
.rq-dash-empty { padding: .75rem 1rem 1rem; color: var(--rq-text-muted); font-size: .8125rem; border-top: 1px solid var(--rq-border-soft); }
.rq-dash-row-title { display: block; font-size: .875rem; font-weight: 700; color: var(--rq-text); }
.rq-dash-row-sub { display: block; font-size: .75rem; color: var(--rq-text-muted); }

/* The running mission: red like the app's (deep red at night), contour lines behind, the clock in a light pill. */
.rq-dash-hero {
    position: relative; isolation: isolate; overflow: hidden; padding: 1.125rem 1.25rem;
    border-radius: var(--rq-radius-xl); background: var(--rq-alert); color: var(--rq-on-strong);
}
.rq-dash-hero-contours { position: absolute; right: 0; top: 0; width: 32.5rem; max-width: 100%; height: 10.625rem; z-index: -1; color: var(--rq-on-navy-line); }
.rq-dash-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.rq-dash-live {
    display: inline-flex; align-items: center; gap: .375rem; height: 1.625rem; padding: 0 .625rem; border-radius: 99px;
    background: var(--rq-on-navy-fill); font-size: .75rem; font-weight: 800; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.rq-dash-live-dot { width: .4375rem; height: .4375rem; border-radius: 99px; background: var(--rq-on-strong); }
.rq-dash-hero-meta { font-size: .8125rem; color: var(--rq-on-navy-muted); }
.rq-dash-hero-title { margin: .5rem 0 0; font-size: 1.5rem; font-weight: 800; line-height: 1.25; color: var(--rq-on-strong); }
.rq-dash-hero-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; margin-top: .875rem; }
.rq-dash-figures { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; margin: 0; }
.rq-dash-figures > div { display: flex; flex-direction: column-reverse; }
.rq-report-state.rq-text-neutral { color: var(--rq-text-muted); font-weight: 600; }
.rq-dash-figures dd { margin: 0; font-size: 1.375rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rq-dash-figures dt { font-size: .75rem; font-weight: 400; color: var(--rq-on-navy-muted); }
.rq-dash-hero-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rq-dash-hero-more { color: var(--rq-on-strong); font-size: .8125rem; font-weight: 700; margin-right: .25rem; }
.rq-dash-hero-more:hover { color: var(--rq-on-strong); }
.btn.rq-btn-on-navy { background: transparent; border: 1px solid var(--rq-on-navy-border); color: var(--rq-on-strong); }
.btn.rq-btn-on-navy:hover { background: var(--rq-on-navy-fill); color: var(--rq-on-strong); }
.btn.rq-btn-light { background: var(--rq-surface); border: 0; color: var(--rq-navy); font-weight: 800; }
.rq-dash-hero .btn.rq-btn-light, .rq-dash-hero .btn.rq-btn-light:hover { color: var(--rq-brand-text); }
.btn.rq-btn-light:hover { background: var(--rq-surface-sunk); color: var(--rq-navy); }
@media (max-width: 575.98px) {
    .rq-dash-hero-title { font-size: 1.25rem; }
    .rq-dash-hero-actions { margin-left: 0; width: 100%; }
    .rq-dash-hero-actions .btn { flex: 1; }
}

/* The call-out card: a light red ground, the screen's one red button. */
.rq-dash-callout { padding: 1rem; border-radius: var(--rq-radius-xl); background: var(--rq-brand-tint); border: 1px solid var(--rq-brand-border); }
.rq-dash-callout .btn { margin-top: .75rem; }

/* Task tiles: a coloured label, the count, the way to it. */
.rq-dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .75rem; }
.rq-task-tile {
    --rq-task: var(--rq-text-muted);
    display: flex; flex-direction: column; gap: .25rem; padding: .875rem 1rem; border-radius: var(--rq-radius-xl);
    background: var(--rq-surface); border: 1px solid var(--rq-border); color: var(--rq-text); text-decoration: none;
}
.rq-task-tile:hover { border-color: var(--rq-border-strong); color: var(--rq-text); text-decoration: none; }
.rq-task-pending { --rq-task: var(--rq-pending); border-color: var(--rq-pending-bg); }
.rq-task-warning { --rq-task: var(--rq-warning); border-color: var(--rq-warning-border); }
.rq-task-success { --rq-task: var(--rq-success); }
.rq-task-label { display: flex; align-items: center; gap: .5rem; font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-task); }
.rq-task-dot { width: .5rem; height: .5rem; border-radius: 99px; background: var(--rq-task); flex: none; }
.rq-task-value { font-size: 1.75rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rq-task-detail { font-size: .8125rem; color: var(--rq-text-muted); }
.rq-task-action { margin-top: auto; padding-top: .375rem; font-size: .8125rem; font-weight: 800; color: var(--rq-link); }

/* Recent missions: number, title, when, the pill. */
.rq-dash-recent { overflow: hidden; }
.rq-dash-mission {
    display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 9rem 8.5rem; gap: .75rem; align-items: center;
    min-height: 3.25rem; padding: .375rem 1rem; border-top: 1px solid var(--rq-border-soft); color: var(--rq-text); text-decoration: none; font-size: .8125rem;
}
.rq-dash-mission:hover { background: var(--rq-surface-alt); color: var(--rq-text); text-decoration: none; }
.rq-dash-mission-number { font-weight: 800; font-variant-numeric: tabular-nums; }
.rq-dash-mission-when { color: var(--rq-text-muted); font-variant-numeric: tabular-nums; }
.rq-dash-mission-status { justify-self: end; display: inline-flex; align-items: center; gap: .375rem; white-space: nowrap; border-radius: 99px; }
@media (max-width: 767.98px) {
    .rq-dash-mission { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "number status" "title title" "when when"; row-gap: .125rem; padding: .625rem 1rem; }
    .rq-dash-mission-number { grid-area: number; }
    .rq-dash-mission > .min-w-0 { grid-area: title; }
    .rq-dash-mission-when { grid-area: when; font-size: .75rem; }
    .rq-dash-mission-status { grid-area: status; }
}

/* Coming up for you: a day tile, the kind as a tag, the member's own part in colour. */
.rq-dash-upcoming { overflow: hidden; }
.rq-dash-upcoming-row { display: flex; gap: .75rem; padding: .625rem 1rem; border-top: 1px solid var(--rq-border-soft); color: var(--rq-text); text-decoration: none; }
a.rq-dash-upcoming-row[href]:hover { background: var(--rq-surface-alt); color: var(--rq-text); text-decoration: none; }
.rq-dash-upcoming-row .rq-dash-row-title { margin-top: .1875rem; }
.rq-kind-tag { display: inline-flex; padding: .125rem .375rem; border-radius: .3125rem; font-size: .625rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.rq-kind-activity { background: var(--rq-info-bg); color: var(--rq-info); }
.rq-kind-course { background: var(--rq-brand-tint); color: var(--rq-brand-text); }
.rq-kind-exam { background: var(--rq-special-bg); color: var(--rq-special); }
.rq-kind-event { background: var(--rq-surface-sunk); color: var(--rq-text-muted); }
.rq-part-pending { color: var(--rq-pending); }
.rq-part-success { color: var(--rq-success); }
.rq-part-danger { color: var(--rq-danger); }

/* ---------- Batch 4: missions list ---------- */
/* Above the list: the Our missions / We assisted switch, then what waits (corrections). */
.rq-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rq-space-2) var(--rq-space-3); margin-bottom: var(--rq-space-3); }
.rq-list-head .rq-chip { min-height: 2.5rem; }
.rq-chip-menu { min-width: 18rem; max-width: min(28rem, 92vw); }
.rq-chip-menu .dropdown-item { white-space: normal; }
.rq-pill { border-radius: 99px; display: inline-flex; align-items: center; gap: .375rem; white-space: nowrap; }
.rq-status-urgent .rq-live-dot { color: var(--rq-brand-strong); animation-name: rq-pulse-danger; }
tr.rq-row-running > td { background: var(--rq-running-row); }
tr.rq-row-running > td:first-child { box-shadow: inset 3px 0 0 var(--rq-brand); }
.rq-mission-card.rq-row-running { background: var(--rq-running-row); box-shadow: inset 3px 0 0 var(--rq-brand); }
/* A running mission's page: a red stripe along the top bar, as the app's red header. */
.rq-topbar.is-running { box-shadow: inset 0 3px 0 var(--rq-brand); }
.rq-time-cell { line-height: 1.35; font-size: .8125rem; }
.rq-time-cell > * { display: block; }
.rq-time-cell strong { font-weight: 700; }
.rq-text-running { color: var(--rq-brand-text); font-weight: 600; }
.rq-report-state { display: inline-flex; align-items: center; gap: .3125rem; font-size: .8125rem; font-weight: 800; }

/* ---------- Batch 4: the call-out dialog ---------- */
.rq-callout-head {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: .75rem;
    padding: 1.125rem 1.375rem; background: var(--rq-brand-pressed); color: var(--rq-on-strong);
    border-radius: var(--tblr-modal-inner-border-radius, var(--rq-radius-xl)) var(--tblr-modal-inner-border-radius, var(--rq-radius-xl)) 0 0;
}
.rq-callout-contours { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; color: var(--rq-on-navy-fill); }
.rq-callout-kicker { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--rq-on-navy-muted); }
.rq-callout-title { margin: .125rem 0 0; font-size: 1.375rem; font-weight: 800; color: var(--rq-on-strong); }
.rq-callout-close {
    width: 2.25rem; height: 2.25rem; flex: none; border: 0; border-radius: var(--rq-radius-md);
    background: var(--rq-on-navy-fill); color: var(--rq-on-strong); font-size: 1.125rem; display: flex; align-items: center; justify-content: center;
}
.rq-callout-close:hover { background: var(--rq-on-navy-border); }
.rq-callout-body { display: flex; flex-direction: column; gap: 1rem; }
.rq-callout-body fieldset legend { float: none; width: auto; margin-bottom: .5rem; font-size: .875rem; }
.rq-callout-foot { gap: .75rem; }
.rq-callout-count { display: inline-flex; align-items: center; gap: .375rem; font-size: .875rem; color: var(--rq-text-muted); }
.rq-callout-count strong { color: var(--rq-text); font-size: 1rem; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) {
    .rq-callout-foot { flex-wrap: wrap; }
    .rq-callout-count { width: 100%; }
    .rq-callout-foot .btn { flex: 1; }
}

/* Choice chips: radios shown as buttons (the mission type, the outcome). */
.rq-choices { display: flex; flex-wrap: wrap; gap: .375rem; }
.rq-choice-input { position: absolute; opacity: 0; pointer-events: none; }
.rq-choice {
    display: inline-flex; align-items: center; min-height: 2.375rem; padding: 0 .875rem; margin: 0;
    border: 1px solid var(--rq-border); border-radius: var(--rq-radius-md); background: var(--rq-surface);
    color: var(--rq-text); font-size: .875rem; font-weight: 600; cursor: pointer;
}
.rq-choice:hover { border-color: var(--rq-border-strong); }
.rq-choice-input:checked + .rq-choice { border: 2px solid var(--rq-navy); padding: 0 calc(.875rem - 1px); background: var(--rq-surface-alt); font-weight: 800; }
.rq-choice-input:focus-visible + .rq-choice { outline: 2px solid var(--rq-focus); outline-offset: 1px; }

/* A list of switches in one box, each row a title and a figure. */
.rq-switch-list { border: 1px solid var(--rq-border); border-radius: var(--rq-radius-lg); overflow: hidden; }
.rq-switch-list > * + * { border-top: 1px solid var(--rq-border-soft); }
.rq-switch-row { display: flex; align-items: center; gap: .75rem; padding: .625rem .875rem; margin: 0; cursor: pointer; }
.rq-switch-title { display: block; font-size: .875rem; font-weight: 700; }
.rq-switch-sub { display: block; font-size: .75rem; color: var(--rq-text-muted); }
.rq-switch-more { padding: 0 .875rem .75rem; }

/* ---------- Batch 4: record a past mission ---------- */
/* The section index, the form, and beside it the map and what the report will need; the save bar
   stays at the bottom of the window. Below 1200 px the right column goes under the form; on phones
   the index is a row of chips that scrolls sideways. */
.rq-past { display: grid; grid-template-columns: 12.5rem minmax(0, 1fr) 20rem; gap: var(--rq-space-4); align-items: start; }
.rq-past-index { position: sticky; top: 5.5rem; display: flex; flex-direction: column; gap: 2px; }
.rq-past-index-link {
    display: flex; align-items: center; gap: .5rem; min-height: 2.25rem; padding: 0 .625rem; border-radius: var(--rq-radius-sm);
    color: var(--rq-text); font-size: .8125rem; font-weight: 600; text-decoration: none;
}
.rq-past-index-link:hover { background: var(--rq-surface); color: var(--rq-text); text-decoration: none; }
.rq-past-index-link.active { background: var(--rq-surface); font-weight: 800; box-shadow: var(--rq-shadow-control); }
.rq-past-main { display: flex; flex-direction: column; gap: var(--rq-space-3); min-width: 0; }
.rq-past-main > .card, .rq-past-section > .card { margin-bottom: 0; }
.rq-past-section { scroll-margin-top: 6rem; }
.rq-past-section .assisting-members { margin-top: var(--rq-space-3); }
.rq-past-side { position: sticky; top: 5.5rem; display: flex; flex-direction: column; gap: var(--rq-space-3); }
.rq-past-side > .card { margin-bottom: 0; overflow: hidden; }
.rq-past-side .rq-form-map { height: 11rem; }
@media (max-width: 1399.98px) { .rq-past { grid-template-columns: 11rem minmax(0, 1fr) 17rem; } }
@media (max-width: 1199.98px) {
    .rq-past { grid-template-columns: 11rem minmax(0, 1fr); }
    .rq-past-side { grid-column: 2; position: static; }
}
@media (max-width: 767.98px) {
    .rq-past { grid-template-columns: minmax(0, 1fr); }
    .rq-past-side { grid-column: 1; }
    .rq-past-index {
        top: 3.75rem; z-index: 5; flex-direction: row; overflow-x: auto; scrollbar-width: none;
        padding: .375rem 0; background: var(--rq-bg);
    }
    .rq-past-index-link { flex: none; background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: 99px; }
}

/* A step's state as a small dot: to do (hollow), done (green tick), needs a look (amber). Only in these
   lists: the vertical timelines (.rq-steps — course days, loan history) keep their own larger dot. */
:is(.rq-past-index, .rq-report-needs, .rq-steplist) .rq-step-dot {
    width: 1rem; height: 1rem; flex: none; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 0 1.5px var(--rq-placeholder); background: var(--rq-surface); color: transparent; font-size: .625rem;
}
:is(.rq-past-index, .rq-report-needs, .rq-steplist) .rq-step-dot[data-state="done"] { background: var(--rq-success-fill); box-shadow: none; color: var(--rq-on-strong); }
:is(.rq-past-index, .rq-report-needs, .rq-steplist) .rq-step-dot[data-state="warn"] { background: var(--rq-pending-bg); box-shadow: inset 0 0 0 1.5px var(--rq-pending); }
:is(.rq-past-index, .rq-report-needs, .rq-steplist) .rq-step-dot .ti { font-size: .625rem; }

/* The times in order: a grid of fields; the one out of order and the message in amber. */
.rq-time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .75rem; }
.rq-time-grid > div > .form-label { font-size: .75rem; color: var(--rq-text-muted); }
.has-time-error > .form-label { color: var(--rq-pending); }
.has-time-error .form-control { border-color: var(--rq-pending); background-color: var(--rq-pending-bg); }
@media (max-width: 575.98px) { .rq-time-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rq-time-grid .form-control { font-size: .875rem; padding-inline: .5rem; } }
.rq-time-error { margin-top: .5rem; font-size: .75rem; font-weight: 700; color: var(--rq-pending); }

/* What the report will need: a short list with the step dots. */
.rq-report-needs { list-style: none; margin: 0; padding: 0; }
.rq-report-needs li { display: flex; align-items: center; gap: .625rem; padding: .375rem 0; font-size: .8125rem; }
.rq-report-needs li:has([data-state="done"]) { color: var(--rq-text-muted); }

/* The save bar: at the foot of the window while the form is long. */
.rq-savebar {
    grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: .75rem;
    padding: .875rem 0; background: var(--rq-surface); border-top: 1px solid var(--rq-border);
    box-shadow: 0 0 0 100vmax var(--rq-surface); clip-path: inset(0 -100vmax);
}
@media (max-width: 767.98px) { .rq-savebar { padding: .75rem 0; } .rq-savebar .btn { flex: 1; } }

/* ========== Batch 5: detail pages ========== */

/* A side column of facts and actions on the left + the main column; one column below 1200 px
   (the main column first there). */
.rq-detail { display: grid; grid-template-columns: 21.5rem minmax(0, 1fr); gap: .75rem; align-items: start; }
.rq-detail > .rq-detail-aside { order: -1; }
.rq-detail-main, .rq-detail-aside { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.rq-detail-main > .card, .rq-detail-aside > .card { margin-bottom: 0; }
@media (max-width: 1199.98px) { .rq-detail { grid-template-columns: minmax(0, 1fr); } .rq-detail > .rq-detail-aside { order: 0; } }

/* A white section: a head (title, a count or line, a link at the right) then rows. */
.rq-panel { background: var(--rq-surface); border: 1px solid var(--rq-border); border-radius: var(--rq-radius-xl); overflow: hidden; }
.rq-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; padding: .875rem 1rem .625rem; }
.rq-panel-title { margin: 0; font-size: .9375rem; font-weight: 800; color: var(--rq-text); }
.rq-panel-meta { font-size: .8125rem; color: var(--rq-text-muted); }
.rq-panel-more {
    margin-left: auto; padding: 0; border: 0; background: none; font-size: .8125rem; font-weight: 800;
    color: var(--rq-link); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.rq-panel-more:hover { color: var(--rq-link-hover); text-decoration: none; }
.rq-panel-head > .btn:first-of-type, .rq-panel-head > .rq-panel-actions { margin-left: auto; }
.rq-panel-actions { display: flex; flex-wrap: wrap; gap: .375rem; }
.rq-panel-row { display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem; border-top: 1px solid var(--rq-border-soft); font-size: .8125rem; min-width: 0; }
.rq-panel-row-main { flex: 1; min-width: 0; }
.rq-panel-row-title { display: block; font-size: .875rem; font-weight: 700; color: var(--rq-text); }
a.rq-panel-row-title:hover { color: var(--rq-link); text-decoration: none; }
.rq-panel-row-sub { display: block; font-size: .75rem; color: var(--rq-text-muted); }
.rq-panel-empty { padding: .75rem 1rem 1rem; border-top: 1px solid var(--rq-border-soft); color: var(--rq-text-muted); font-size: .8125rem; }
.rq-panel-body { padding: 0 1rem 1rem; }
.rq-panel > .table-responsive { border-top: 1px solid var(--rq-border-soft); }
.rq-panel > .table-responsive > .table { margin-bottom: 0; }
/* The shared pager under a panel's table. */
.rq-panel > .card-footer { padding: .625rem 1rem; border-top: 1px solid var(--rq-border-soft); }

/* Facts: a label and a value per line. */
.rq-factlist { margin: 0; padding: 0 1rem .75rem; }
.rq-factlist > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; padding: .375rem 0; border-top: 1px solid var(--rq-border-soft); font-size: .8125rem; }
.rq-factlist > div:first-child { border-top: 0; }
.rq-factlist dt { font-weight: 500; color: var(--rq-text-muted); }
.rq-factlist dd { margin: 0; font-weight: 600; color: var(--rq-text); overflow-wrap: anywhere; }

/* Who acts next: a tinted banner with its kicker, a line and the actions. */
.rq-next {
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; padding: .875rem 1rem;
    border: 1px solid var(--rq-border); border-radius: var(--rq-radius-xl); background: var(--rq-surface);
}
.rq-next-body { flex: 1 1 16rem; min-width: 0; }
.rq-next-kicker { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-text-muted); }
.rq-next-text { margin-top: .1875rem; font-size: .875rem; color: var(--rq-text); }
.rq-next-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.rq-next-pending { background: var(--rq-pending-soft); border-color: var(--rq-pending-line); }
.rq-next-pending .rq-next-kicker { color: var(--rq-pending-strong); }
.rq-next-info { background: var(--rq-info-soft); border-color: var(--rq-info-border); }
.rq-next-info .rq-next-kicker { color: var(--rq-info); }
.rq-next-success { background: var(--rq-success-bg); border-color: var(--rq-success-border); }
.rq-next-success .rq-next-kicker { color: var(--rq-success); }
.rq-next-danger { background: var(--rq-danger-bg); border-color: var(--rq-danger-border); }
.rq-next-danger .rq-next-kicker { color: var(--rq-danger); }
@media (max-width: 575.98px) { .rq-next-actions { width: 100%; } .rq-next-actions > .btn, .rq-next-actions > form { flex: 1; } .rq-next-actions > form .btn { width: 100%; } }

/* Steps across the top (an exam's four): done green, now blue, to come muted. */
.rq-stepcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.rq-stepcard { padding: .75rem .875rem; border-radius: var(--rq-radius-lg); border: 1px solid var(--rq-border); background: var(--rq-surface); }
.rq-stepcard-text { margin-top: .25rem; font-size: .875rem; font-weight: 700; }
.rq-stepcard[data-state="done"] .rq-label { color: var(--rq-success); }
.rq-stepcard[data-state="now"] { background: var(--rq-info-soft); border-color: var(--rq-info-border); }
.rq-stepcard[data-state="now"] .rq-label { color: var(--rq-info); }
@media (max-width: 767.98px) { .rq-stepcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A vertical list of steps with ticks (a loan, step by step). */
.rq-steplist { list-style: none; margin: 0; padding: 0 1rem .75rem; }
.rq-steplist li { display: flex; gap: .625rem; padding: .4375rem 0; font-size: .8125rem; }
.rq-steplist .rq-step-dot { margin-top: .0625rem; }
.rq-steplist .rq-step-dot[data-state="now"] { background: var(--rq-pending); box-shadow: none; }
.rq-steplist b { font-weight: 600; }
.rq-steplist li[data-state="now"] b { font-weight: 800; }
.rq-steplist small { display: block; color: var(--rq-text-muted); font-size: .8125rem; }

/* A side list of plain actions (account buttons). */
.rq-action-list { display: flex; flex-direction: column; padding: .5rem; }
.rq-action {
    display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 2.5rem; padding: 0 .625rem; border: 0; border-radius: var(--rq-radius-sm);
    background: transparent; color: var(--rq-text); font-size: .8125rem; font-weight: 700; text-align: left; text-decoration: none;
}
.rq-action:hover { background: var(--rq-surface-sunk); color: var(--rq-text); text-decoration: none; }
.rq-action .ti { font-size: 1rem; color: var(--rq-text-muted); }
.rq-action-danger, .rq-action-danger .ti, .rq-action-danger:hover { color: var(--rq-danger); }

/* A coloured dot before a line (a certificate's state) and the tone of a word. */
.rq-dot { width: .625rem; height: .625rem; flex: none; border-radius: 99px; background: currentColor; }
.rq-ink-success { color: var(--rq-success); }
.rq-ink-danger { color: var(--rq-danger); }
.rq-ink-info { color: var(--rq-info); }
.rq-ink-pending { color: var(--rq-pending); }
.rq-ink-warning { color: var(--rq-warning-strong); }
.rq-ink-muted { color: var(--rq-text-muted); }

/* ---------- Member profile: the identity card (left column, above the facts) and its tabs ---------- */
.rq-band {
    position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: .75rem;
    padding: 1.5rem 1.25rem 1.25rem; border-radius: var(--rq-radius-xl); background: var(--rq-hero); color: var(--rq-on-strong); text-align: center;
}
.rq-band-contours { position: absolute; left: 0; top: 0; width: 100%; height: 9rem; z-index: -1; color: var(--rq-on-navy-line); }
.rq-band .avatar { background-color: var(--rq-hero-deep); color: var(--rq-on-strong); }
.rq-band .avatar.rq-rank { box-shadow: 0 0 0 3px var(--rq-hero), 0 0 0 6px var(--rq-rank, var(--rq-neutral)); }
.rq-band-who { width: 100%; min-width: 0; }
.rq-band-name { margin: 0; font-size: 1.375rem; font-weight: 800; line-height: 1.25; color: var(--rq-on-strong); overflow-wrap: anywhere; }
.rq-band-meta { margin-top: .25rem; font-size: .875rem; color: var(--rq-on-navy-muted); }
.rq-band-contact { display: flex; flex-direction: column; align-items: center; gap: .25rem; margin-top: .625rem; font-size: .8125rem; }
.rq-band-contact a { color: var(--rq-on-strong); text-decoration: none; max-width: 100%; }
.rq-band-contact a:hover { color: var(--rq-on-strong); text-decoration: underline; }
.rq-band-stats { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; width: 100%; margin: .25rem 0 0; padding-top: .875rem; border-top: 1px solid var(--rq-on-navy-line); }
.rq-band-stats:empty { display: none; }
.rq-band-stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 0 .25rem; }
.rq-band-stats > div + div { border-left: 1px solid var(--rq-on-navy-line); }
.rq-band-stats dd { margin: 0; font-size: 1.5rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.rq-band-stats dt { font-size: .75rem; font-weight: 400; color: var(--rq-on-navy-muted); }
/* One column (phones, narrow windows): the card first, then the tabs, then the facts and actions. */
@media (max-width: 1199.98px) {
    .rq-profile > .rq-detail-aside { display: contents; }
    .rq-profile > .rq-detail-aside > * { order: 1; }
    .rq-profile > .rq-detail-aside > .rq-band { order: -1; }
}
.rq-profile .rq-page-tabs { margin-top: 0; }
.rq-panel-subhead { padding-top: .5rem; border-top: 1px solid var(--rq-border); }
.rq-page-tabs { margin: .75rem 0 1rem; }
.nav-tabs .nav-link .badge.rq-tab-alert { background: var(--rq-danger-bg); color: var(--rq-danger); }
.rq-cert-state { font-weight: 800; white-space: nowrap; }
.rq-mission-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 7.5rem 4.5rem; gap: .625rem; align-items: center; }
.rq-mission-row > :last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) { .rq-mission-row { grid-template-columns: 4.75rem minmax(0, 1fr) 3.5rem; } .rq-mission-row > :nth-child(3) { display: none; } }

/* A column of panels with the page's gap (a partial reloaded as a whole). */
.rq-stack { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }

/* ---------- Course attendance: a square per day ---------- */
.rq-att {
    display: inline-flex; align-items: center; justify-content: center; width: 1.375rem; height: 1.375rem;
    border-radius: 6px; font-size: .6875rem; font-weight: 800; line-height: 1;
}
.rq-att .ti { font-size: .8125rem; }
.rq-att-yes { background: var(--rq-success-fill); color: var(--rq-on-strong); }
.rq-att-no { background: var(--rq-danger-bg); color: var(--rq-danger); }
.rq-att-credit { background: var(--rq-neutral-bg); color: var(--rq-neutral); }
.rq-att-todo { box-shadow: inset 0 0 0 1.5px var(--rq-border-strong); }
.rq-att-untaken { color: var(--rq-text-muted); }

/* ---------- Exam marking: Satisfies / Does not on every line, saved as it is clicked ---------- */
.rq-mark-line {
    display: grid; grid-template-columns: minmax(0, 1fr) 12rem auto; align-items: center; gap: .5rem .75rem;
    padding: .5rem 1rem; border-top: 1px solid var(--rq-border-soft); font-size: .875rem;
}
form.rq-mark-line .rq-mark-choice { order: 3; }
form.rq-mark-line .rq-mark-note { order: 2; }
div.rq-mark-line { grid-template-columns: minmax(0, 1fr) auto; }
.rq-mark-line.is-sub { padding-left: 2rem; }
.rq-mark-line[data-state="yes"] { background: color-mix(in srgb, var(--rq-success-bg) 45%, var(--rq-surface)); }
.rq-mark-line[data-state="no"] { background: color-mix(in srgb, var(--rq-danger-bg) 45%, var(--rq-surface)); }
.rq-mark-note { min-width: 0; }
.rq-mark-note-text { font-size: .75rem; color: var(--rq-text-muted); }
.rq-mark-choice { display: flex; gap: .25rem; }
.rq-mark-btn {
    display: inline-flex; align-items: center; height: 2.125rem; padding: 0 .75rem; border-radius: 9px; cursor: pointer;
    border: 1px solid var(--rq-border); background: var(--rq-surface); color: var(--rq-text-muted); font-size: .8125rem; font-weight: 800;
}
.btn-check:checked + .rq-mark-btn.is-yes { border-color: var(--rq-success); background: var(--rq-success-bg); color: var(--rq-success); }
.btn-check:checked + .rq-mark-btn.is-no { border-color: var(--rq-danger); background: var(--rq-danger-bg); color: var(--rq-danger); }
.btn-check:focus-visible + .rq-mark-btn { box-shadow: var(--rq-focus-ring); }
.rq-mark-topic { padding: .5rem 1rem; border-top: 1px solid var(--rq-border-soft); background: var(--rq-surface-alt); font-size: .8125rem; font-weight: 700; }
.rq-figure-lg { font-size: 1.75rem; }
@media (min-width: 1200px) { .rq-sticky-aside { position: sticky; top: 5.5rem; } }
@media (pointer: coarse) { .rq-mark-btn { height: 3rem; padding: 0 1rem; } }
@media (max-width: 575.98px) {
    .rq-mark-line, div.rq-mark-line { grid-template-columns: minmax(0, 1fr); }
    form.rq-mark-line .rq-mark-note { order: 4; }
    .rq-mark-line.is-sub { padding-left: 1rem; }
    .rq-mark-choice > label { flex: 1; justify-content: center; }
}

/* The exam page's candidate × station marking table. */
.exam-cell { min-width: 2.5rem; min-height: 2.25rem; padding: .4rem .35rem; font-size: .8125rem; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; }
@media (pointer: coarse) { button.exam-cell { min-width: 2.75rem; min-height: 2.75rem; } }
.exam-marks th.sticky, .exam-marks td.sticky { position: sticky; left: 0; background: var(--rq-surface); z-index: 1; }

.rq-contents { display: contents; }
.rq-ink-special { color: var(--rq-special); }

/* ---------- Loans board: a column per who acts next ---------- */
.rq-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; align-items: start; }
.rq-board-col { display: flex; flex-direction: column; gap: .5rem; min-width: 0; padding: .625rem; border-radius: var(--rq-radius-xl); background: var(--rq-surface-sunk); }
.rq-board-head { display: flex; align-items: center; gap: .5rem; padding: .125rem .25rem .25rem; }
.rq-board-count { font-size: .75rem; font-weight: 800; color: var(--rq-text-muted); font-variant-numeric: tabular-nums; }
.rq-board-card { position: relative; padding: .625rem .75rem; border: 1px solid var(--rq-border); border-radius: var(--rq-radius-lg); background: var(--rq-surface); }
.rq-board-card:hover { border-color: var(--rq-border-strong); }
.rq-board-card.is-alert { border-color: var(--rq-danger-border); }
.rq-board-card-top { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.rq-board-card-top .avatar { flex: none; font-size: .625rem; font-weight: 800; }
.rq-board-name { font-size: .8125rem; font-weight: 800; color: var(--rq-text); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-board-name:hover { color: var(--rq-text); text-decoration: none; }
.rq-board-when { margin-left: auto; flex: none; font-size: .6875rem; font-weight: 700; color: var(--rq-text-muted); }
.rq-board-items { margin-top: .375rem; font-size: .8125rem; line-height: 1.4; overflow-wrap: anywhere; }
.rq-board-sub { font-size: .75rem; color: var(--rq-text-muted); }
@media (max-width: 1399.98px) { .rq-board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .rq-board { grid-template-columns: minmax(0, 1fr); } }

/* My gear: one column, the items waiting for the member as white rows in the banner. */
.rq-narrow { max-width: 54rem; }
.rq-next-item { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-top: .5rem; padding: .625rem .75rem; border-radius: var(--rq-radius-lg); background: var(--rq-surface); }
.rq-next-item .rq-panel-row-main { flex: 1 1 14rem; }

/* Calendar: the picked day and the day panel beside the month. */
.rq-calendar .rq-day-picked { background: var(--rq-info-soft); }
.rq-calendar .fc-daygrid-day { cursor: pointer; }
.rq-cal-day .rq-panel-row { border-left: 3px solid var(--ev, transparent); }
.rq-cal-kind {
    display: inline-flex; padding: .125rem .375rem; border-radius: 5px; font-size: .625rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    background: color-mix(in srgb, var(--ev) 14%, var(--rq-surface)); color: color-mix(in srgb, var(--ev) 75%, var(--rq-text));
}

/* ---------- Statistics: this year against the last ---------- */
.rq-stats-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rq-stat-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.rq-stat-kpi { padding: .875rem 1rem; }
.rq-stat-kpi .rq-figure-lg { margin-top: .25rem; }
.rq-stat-delta { min-height: 1.125rem; font-size: .75rem; font-weight: 700; color: var(--rq-text-muted); }
.rq-stat-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .75rem; align-items: start; }
.rq-stat-row-even { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.rq-stat-legend { display: flex; gap: .75rem; font-size: .75rem; color: var(--rq-text-muted); }
.rq-stat-legend > span { display: inline-flex; align-items: center; gap: .3125rem; }
.rq-stat-swatch { width: .625rem; height: .625rem; border-radius: 3px; background: var(--rq-navy); }
.rq-stat-swatch.is-before, .rq-month-bar.is-before { background: var(--rq-border-strong); }
.rq-month-track { gap: 2px; }
.rq-stats-page .rq-month-bar, .rq-month-track > .rq-month-bar:not(.is-before) { background: var(--rq-navy); }
.rq-tone-navy { background: var(--rq-navy); }
.rq-stat-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rq-border-soft); }
.rq-stat-top > div { padding: .625rem 1rem; border-right: 1px solid var(--rq-border-soft); font-size: .8125rem; min-width: 0; }
.rq-stat-top > div:last-child { border-right: 0; }
@media (max-width: 1199.98px) { .rq-stat-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rq-stat-row { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767.98px) { .rq-stat-kpis, .rq-stat-top { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Terrain: the lists on the left, the map filling the right ---------- */
.rq-terrain { display: grid; grid-template-columns: 25rem minmax(0, 1fr); gap: .75rem; align-items: start; }
.rq-terrain-map { position: sticky; top: 5.5rem; }
.rq-terrain-map .rq-approach-map { height: calc(100vh - 10rem); border-radius: 0; }
@media (max-width: 1199.98px) {
    .rq-terrain { grid-template-columns: minmax(0, 1fr); }
    .rq-terrain-map { position: static; order: -1; }
    .rq-terrain-map .rq-approach-map { height: 55vh; }
}

/* ---------- Mesh gateway: the state band and what came through ---------- */
.rq-mesh-band { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding: 1.25rem 1.5rem; }
.rq-mesh-icon {
    width: 3.5rem; height: 3.5rem; flex: none; border-radius: var(--rq-radius-xl); display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-neutral-bg); color: var(--rq-neutral); font-size: 1.75rem;
}
.rq-mesh-band[data-tone="green"] .rq-mesh-icon { background: var(--rq-success-bg); color: var(--rq-success); }
.rq-mesh-band[data-tone="yellow"] .rq-mesh-icon { background: var(--rq-pending-bg); color: var(--rq-pending); }
.rq-mesh-who { flex: 1 1 16rem; min-width: 0; }
.rq-mesh-state { font-size: 1.25rem; font-weight: 800; }
.rq-mesh-line { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .1875rem; font-size: .8125rem; color: var(--rq-text-muted); }
.rq-mesh-line b { color: var(--rq-text); font-weight: 600; }
.rq-mesh-counts { display: flex; margin: 0; }
.rq-mesh-counts > div { display: flex; flex-direction: column-reverse; text-align: right; padding: 0 1.25rem; border-left: 1px solid var(--rq-border-soft); }
.rq-mesh-counts dd { margin: 0; font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rq-mesh-counts dt { font-size: .75rem; font-weight: 400; color: var(--rq-text-muted); }
.rq-mesh-kind {
    display: inline-flex; margin-right: .375rem; padding: .125rem .375rem; border-radius: 5px; font-size: .625rem; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase; background: var(--rq-neutral-bg); color: var(--rq-neutral);
}
.rq-mesh-kind[data-kind="text"] { background: var(--rq-special-bg); color: var(--rq-special); }
.rq-mesh-kind[data-kind="clue"] { background: var(--rq-warning-bg); color: var(--rq-warning); }
.rq-mesh-kind[data-kind="positions"] { background: var(--rq-info-bg); color: var(--rq-info); }
.rq-mesh-kind[data-kind="reported"], .rq-mesh-kind[data-kind="started"], .rq-mesh-kind[data-kind="spot"] { background: var(--rq-success-bg); color: var(--rq-success); }
.rq-mesh-kind[data-kind="recallack"] { background: var(--rq-brand-tint); color: var(--rq-brand-text); }
.rq-mesh-table[data-filter="problems"] tbody tr:not([data-problem]):not([data-mesh-empty]),
.rq-mesh-table[data-filter="positions"] tbody tr:not([data-row-kind="positions"]):not([data-mesh-empty]) { display: none; }
@media (max-width: 767.98px) {
    .rq-mesh-counts { width: 100%; }
    .rq-mesh-counts > div { flex: 1; text-align: left; padding: 0 .75rem; }
    .rq-mesh-counts > div:first-child { border-left: 0; padding-left: 0; }
    .rq-mesh-actions { width: 100%; } .rq-mesh-actions .btn { width: 100%; }
}

/* ======================= Batch 6: the mission page frame ======================= */
/* The bar carries the record's actions in its own row and its sections as a second row (_Layout's
   TopbarActions / TopbarTabs sections). */
.rq-topbar-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.rq-topbar-actions > .dropdown { display: flex; }
.rq-topbar-tabs { overflow-x: auto; scrollbar-width: none; }
.rq-topbar-tabs::-webkit-scrollbar { display: none; }
.rq-mission-tabs { flex-wrap: nowrap; gap: 1.5rem; }
.rq-mission-tabs .nav-link {
    display: inline-flex; align-items: center; gap: .4375rem; height: 3rem; padding: 0; white-space: nowrap;
    border: 0; border-bottom: 3px solid transparent; border-radius: 0;
    color: var(--rq-text-muted); font-size: .875rem; font-weight: 600;
}
.rq-mission-tabs .nav-link:hover { color: var(--rq-text); }
.rq-mission-tabs .nav-link.active { color: var(--rq-text); font-weight: 800; border-bottom-color: var(--rq-brand-strong); }
.rq-mission-tabs .nav-link:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: -2px; }
.rq-tab-count {
    padding: 1px .4375rem; border-radius: var(--rq-radius-pill); background: var(--rq-surface-sunk);
    color: var(--rq-text-muted); font-size: .75rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.rq-mission-clock { display: inline-flex; align-items: center; gap: .4375rem; }
.rq-mission-clock .rq-live-dot { color: var(--rq-brand-strong); animation-name: rq-pulse-red; }
@keyframes rq-pulse-red { 0% { box-shadow: 0 0 0 0 rgba(var(--rq-brand-strong-rgb), .45); } 100% { box-shadow: 0 0 0 .4rem rgba(var(--rq-brand-strong-rgb), 0); } }
@media (max-width: 767.98px) {
    /* Phones: the actions get their own line under the title. */
    .rq-topbar-inner:has(.rq-topbar-actions) { flex-wrap: wrap; row-gap: .25rem; }
    .rq-topbar-inner:has(.rq-topbar-actions) .rq-topbar-tools { order: 2; margin-left: auto; }
    .rq-topbar-inner:has(.rq-topbar-actions) .rq-topbar-heading { order: 3; flex: 1 1 100%; }
    .rq-topbar-actions { order: 4; flex: 1 1 100%; justify-content: flex-end; }
    .rq-hide-narrow { display: none; }
    .rq-mission-tabs { gap: 1.125rem; }
}

/* Overview: a wider side column than the other detail pages, two cards side by side under the record. */
.rq-detail-wide { grid-template-columns: 25rem minmax(0, 1fr); }
@media (max-width: 1199.98px) { .rq-detail-wide { grid-template-columns: minmax(0, 1fr); } }
.rq-mission-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; align-items: start; }
@media (max-width: 991.98px) { .rq-mission-pair { grid-template-columns: minmax(0, 1fr); } }
.rq-stack { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.rq-detail-main .card, .rq-detail-aside .card { margin-bottom: 0; }
.rq-mission-map { height: 13rem; border-top: 1px solid var(--rq-border-soft); border-bottom: 1px solid var(--rq-border-soft); margin-bottom: .5rem; }
.rq-panel-foot { padding: 0 1rem 1rem; }
.rq-panel-head > .ms-auto { margin-left: auto; }
.rq-row-actions { display: inline-flex; gap: .125rem; flex: none; }
.rq-avatar-empty { background: var(--rq-surface-sunk); color: var(--rq-text-muted); }
.rq-tag-pending { background: var(--rq-pending-bg); color: var(--rq-pending-strong); }
.rq-tag-success { background: var(--rq-success-bg); color: var(--rq-success); }
.rq-live-label { display: inline-flex; align-items: center; gap: .3125rem; font-size: .75rem; font-weight: 700; color: var(--rq-success); }
.rq-live-label .rq-dot { width: .4375rem; height: .4375rem; }
.rq-ops-text { font-size: .875rem; font-weight: 600; color: var(--rq-text); }
.rq-fold > summary {
    list-style: none; cursor: pointer; padding: .5rem 1rem .75rem; border-top: 1px solid var(--rq-border-soft);
    font-size: .8125rem; font-weight: 800; color: var(--rq-link);
}
.rq-fold > summary::-webkit-details-marker { display: none; }
.rq-gaps { display: flex; flex-wrap: wrap; gap: .375rem; }
.rq-gap {
    display: inline-flex; align-items: center; min-height: 1.75rem; padding: 0 .625rem; border-radius: var(--rq-radius-pill);
    border: 1px dashed var(--rq-pending); color: var(--rq-pending-strong); font-size: .75rem; font-weight: 700;
}

/* The mission record: the steps across, the one to record next under them. */
.rq-track {
    list-style: none; margin: .25rem 0 0; padding: 0 1rem 1rem; display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative;
}
.rq-track-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3125rem; text-align: center; min-width: 0; }
.rq-track-step::before {
    content: ""; position: absolute; top: 1rem; left: -50%; right: 50%; height: 2px; background: var(--rq-border-soft); z-index: 0;
}
.rq-track-step:first-child::before { display: none; }
.rq-track-step[data-line="on"]::before { background: var(--rq-navy); }
.rq-track-dot {
    position: relative; z-index: 1; width: 2rem; height: 2rem; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center; font-size: .9375rem;
    background: var(--rq-surface); border: 2px solid var(--rq-border); color: var(--rq-text-muted);
}
.rq-track-step[data-state="done"] .rq-track-dot { background: var(--rq-primary); border-color: var(--rq-primary); color: var(--rq-on-primary); }
.rq-track-step[data-state="skipped"] .rq-track-dot { border-style: dashed; background: var(--rq-surface-sunk); }
.rq-track-step[data-state="next"] .rq-track-dot { background: var(--rq-brand-strong); border-color: var(--rq-brand-strong); color: var(--rq-on-strong); box-shadow: 0 0 0 4px rgba(var(--rq-brand-strong-rgb), .16); }
.rq-track-label { font-size: .8125rem; font-weight: 600; color: var(--rq-text); line-height: 1.25; overflow-wrap: anywhere; }
.rq-track-step[data-state="todo"] .rq-track-label { color: var(--rq-text-muted); }
.rq-track-step[data-state="next"] .rq-track-label { font-weight: 800; }
.rq-track-time { font-size: .8125rem; font-weight: 800; color: var(--rq-text); }
.rq-track-step[data-state="todo"] .rq-track-time, .rq-track-step[data-state="skipped"] .rq-track-time { color: var(--rq-text-muted); font-weight: 600; }
.rq-track-step[data-state="next"] .rq-track-time { color: var(--rq-brand-text); }
.rq-track-undo { border: 0; background: none; padding: 0; font-size: .75rem; font-weight: 700; color: var(--rq-link); }
.rq-record-next {
    display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 1rem 1rem; padding: .75rem .75rem .75rem 1rem;
    border-radius: var(--rq-radius-lg); background: var(--rq-brand-tint);
}
.rq-record-next-body { flex: 1 1 10rem; min-width: 0; }
.rq-record-next-kicker { font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-brand-text); }
.rq-record-next-title { margin-top: .125rem; font-size: 1rem; font-weight: 800; color: var(--rq-text); }
.rq-record-next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rq-record-next-actions > .btn { min-height: 2.75rem; }
.rq-record-next-actions input { width: 12rem; }
@media (max-width: 767.98px) {
    /* Phones: the steps as a list down the card. */
    .rq-track { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .rq-track-step { flex-direction: row; text-align: left; gap: .75rem; padding: .3125rem 0; }
    .rq-track-step::before { top: -50%; bottom: 50%; left: 1rem; right: auto; width: 2px; height: auto; margin-left: -1px; }
    .rq-track-label { flex: 1; }
    .rq-record-next-actions { width: 100%; }
    .rq-record-next-actions > .btn-urgent { flex: 1 1 100%; }
}

/* Caller report: the paper form's numbered points. */
.rq-caller { list-style: none; margin: 0; padding: 0 0 .25rem; }
.rq-caller > li {
    display: grid; grid-template-columns: 1.375rem 8.5rem minmax(0, 1fr); gap: .5rem; align-items: baseline;
    padding: .4375rem 1rem; border-top: 1px solid var(--rq-border-soft); font-size: .8125rem;
}
.rq-caller-n { font-size: .6875rem; font-weight: 800; color: var(--rq-placeholder); }
.rq-caller-label { color: var(--rq-text-muted); }
.rq-caller-value { color: var(--rq-text); font-weight: 500; overflow-wrap: anywhere; }
.rq-caller > li.is-missing .rq-caller-value { color: var(--rq-pending); font-weight: 700; }
@media (max-width: 575.98px) { .rq-caller > li { grid-template-columns: 1.375rem minmax(0, 1fr); } .rq-caller-value { grid-column: 2; } }

/* Latest in the log (Overview). */
.rq-latest { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem; padding: .4375rem 1rem; border-top: 1px solid var(--rq-border-soft); font-size: .8125rem; line-height: 1.4; }
.rq-latest-time { color: var(--rq-text-muted); font-weight: 700; }
.rq-latest-text { overflow-wrap: anywhere; }
.rq-latest-text b { font-weight: 700; }

/* Log and board: the record beside the board. */
.rq-logboard { display: grid; grid-template-columns: minmax(0, 1fr) 26rem; gap: .75rem; align-items: start; }
@media (max-width: 1199.98px) { .rq-logboard { grid-template-columns: minmax(0, 1fr); } }
.rq-composer { padding: 0 1rem .875rem; display: flex; flex-direction: column; gap: .5rem; }
.rq-composer-quick { display: flex; flex-wrap: wrap; gap: .375rem; }
.rq-composer-quick .rq-chip { cursor: pointer; }
.rq-composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .5rem; }
.rq-composer-time { width: 14rem; }
.rq-log-filters { margin: .75rem 1rem .5rem; }
.rq-log-list { list-style: none; margin: 0; padding: 0 0 .5rem; }
.rq-log-day { padding: .5rem 1rem .25rem; border-top: 1px solid var(--rq-border-soft); font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-text-muted); }
.rq-log-entry { display: grid; grid-template-columns: 2.75rem 2rem minmax(0, 1fr) auto; gap: .625rem; align-items: start; padding: .5rem 1rem; border-top: 1px solid var(--rq-border-soft); }
.rq-log-time { padding-top: .375rem; font-size: .8125rem; font-weight: 700; color: var(--rq-text-muted); }
.rq-log-icon {
    width: 2rem; height: 2rem; border-radius: var(--rq-radius-sm); display: inline-flex; align-items: center; justify-content: center;
    background: var(--rq-neutral-bg); color: var(--rq-text); font-size: 1rem;
}
.rq-log-icon[data-group="times"] { background: var(--rq-primary); color: var(--rq-on-primary); border-radius: 50%; }
.rq-log-icon[data-group="people"] { background: var(--rq-success-bg); color: var(--rq-success); }
.rq-log-icon[data-group="command"] { background: var(--rq-warning-bg); color: var(--rq-warning); }
.rq-log-icon[data-group="search"] { background: var(--rq-special-bg); color: var(--rq-special); }
.rq-log-body { display: flex; flex-direction: column; gap: .125rem; min-width: 0; font-size: .875rem; }
.rq-log-head { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: .8125rem; }
.rq-log-head b { font-weight: 700; }
.rq-log-text { color: var(--rq-text); overflow-wrap: anywhere; }
.rq-log[data-filter="notes"] .rq-log-entry:not([data-group="notes"]),
.rq-log[data-filter="times"] .rq-log-entry:not([data-group="times"]),
.rq-log[data-filter="people"] .rq-log-entry:not([data-group="people"]),
.rq-log[data-filter="command"] .rq-log-entry:not([data-group="command"]),
.rq-log[data-filter="search"] .rq-log-entry:not([data-group="search"]) { display: none; }
@media (max-width: 575.98px) { .rq-log-entry { grid-template-columns: 2.5rem minmax(0, 1fr) auto; } .rq-log-icon { display: none; } .rq-composer-time { width: 100%; } }

.rq-infoboard { display: flex; flex-direction: column; }
.rq-chat { display: flex; flex-direction: column; gap: .625rem; max-height: 32rem; overflow-y: auto; padding: .75rem 1rem 1rem; border-top: 1px solid var(--rq-border-soft); }
.rq-chat > .rq-panel-empty { border-top: 0; padding: 0; }
.rq-chat-msg { display: flex; align-items: flex-end; gap: .5rem; }
.rq-chat-msg.is-mine { flex-direction: row-reverse; }
.rq-chat-avatar { flex: none; background: var(--rq-surface-sunk); color: var(--rq-text); font-size: .6875rem; font-weight: 800; }
.rq-chat-msg.is-mine .rq-chat-avatar { background: var(--rq-hero); color: var(--rq-on-strong); }
.rq-chat-bubble { max-width: 80%; padding: .5rem .75rem; border-radius: var(--rq-radius-lg); background: var(--rq-neutral-bg); color: var(--rq-text); font-size: .875rem; }
.rq-chat-msg.is-mine .rq-chat-bubble { background: var(--rq-hero); color: var(--rq-on-strong); }
.rq-chat-meta { font-size: .6875rem; font-weight: 700; color: var(--rq-text-muted); margin-bottom: .125rem; }
.rq-chat-msg.is-mine .rq-chat-meta { color: var(--rq-on-navy-muted); }
.rq-chat-delete { opacity: .55; }
.rq-chat-msg:hover .rq-chat-delete, .rq-chat-delete:focus-visible { opacity: 1; }
.rq-chat-compose { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; padding: .75rem 1rem 1rem; border-top: 1px solid var(--rq-border-soft); }
.rq-chat-compose textarea { resize: vertical; min-height: 2.5rem; width: 100%; }

/* Checklist: the station's list in groups, ticks kept on this device. */
.rq-progress { height: .5rem; border-radius: var(--rq-radius-pill); background: var(--rq-surface-sunk); overflow: hidden; }
.rq-progress-bar { height: 100%; background: var(--rq-success); transition: width var(--rq-duration); }
.rq-check-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; align-items: start; }
@media (max-width: 991.98px) { .rq-check-groups { grid-template-columns: minmax(0, 1fr); } }
.rq-check-item {
    display: flex; align-items: center; gap: .75rem; min-height: 2.75rem; padding: .375rem 1rem; margin: 0;
    border-top: 1px solid var(--rq-border-soft); font-size: .875rem; cursor: pointer;
}
.rq-check-item .form-check-input { margin: 0; flex: none; width: 1.25rem; height: 1.25rem; }
.rq-check-item .form-check-input:checked { background-color: var(--rq-success); border-color: var(--rq-success); }
.rq-check-item .form-check-input:checked + span { color: var(--rq-text-muted); text-decoration: line-through; }

/* Files: a drop zone, then tiles a kind filter narrows. */
.rq-drop { margin: 0 1rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.rq-drop-target {
    display: flex; align-items: center; justify-content: center; gap: .625rem; min-height: 4.5rem; padding: .75rem 1rem; margin: 0;
    border: 2px dashed var(--rq-border-strong); border-radius: var(--rq-radius-lg); background: var(--rq-surface-alt);
    color: var(--rq-text-muted); font-size: .875rem; text-align: center; cursor: pointer;
}
.rq-drop-target .ti { font-size: 1.5rem; }
.rq-drop-target b { color: var(--rq-text); }
.rq-drop-target u { color: var(--rq-link); text-decoration: none; font-weight: 700; }
.rq-drop.is-over .rq-drop-target, .rq-drop-target:hover { border-color: var(--rq-link); background: var(--rq-info-soft); }
.rq-drop-target:focus-within { outline: 2px solid var(--rq-focus); outline-offset: 2px; }
.rq-drop-chosen { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-drop-row { display: flex; gap: .5rem; }
.rq-drop-row .form-control { flex: 1; }
.rq-file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem; padding: .25rem 1rem 1rem; }
.rq-file { display: flex; flex-direction: column; border: 1px solid var(--rq-border); border-radius: var(--rq-radius-lg); overflow: hidden; background: var(--rq-surface); min-width: 0; }
.rq-file-preview {
    position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 10;
    background: var(--rq-surface-sunk); color: var(--rq-text-muted); font-size: 2.25rem; text-decoration: none;
}
.rq-file-preview[data-kind="tracks"] { background: var(--rq-azure-bg); color: var(--rq-azure); }
.rq-file-preview[data-kind="documents"] { background: var(--rq-brand-tint); color: var(--rq-brand-text); }
.rq-file-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rq-file-preview .rq-file-ext { z-index: 1; }
.rq-file-ext {
    position: absolute; left: .5rem; top: .5rem; padding: .0625rem .375rem; border-radius: var(--rq-radius-sm);
    background: var(--rq-surface); color: var(--rq-text); font-size: .625rem; font-weight: 800; letter-spacing: .04em;
}
.rq-file-body { display: flex; flex-direction: column; gap: .125rem; padding: .625rem .75rem .75rem; min-width: 0; flex: 1; }
.rq-file-name { font-size: .875rem; font-weight: 700; color: var(--rq-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-file-meta { font-size: .75rem; color: var(--rq-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-file-desc { color: var(--rq-text); }
.rq-file-actions { display: flex; align-items: center; gap: .25rem; margin-top: auto; padding-top: .5rem; }
.rq-files[data-filter="photos"] .rq-file:not([data-group="photos"]),
.rq-files[data-filter="documents"] .rq-file:not([data-group="documents"]),
.rq-files[data-filter="tracks"] .rq-file:not([data-group="tracks"]) { display: none; }
@media (max-width: 575.98px) { .rq-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } .rq-drop-row { flex-direction: column; } }

/* ── Mission People tab (Batch 7): one lifecycle table, presence timeline, bulk bar, person drawer ── */
.rq-people-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; }
.rq-people-filters { flex-wrap: wrap; }
.rq-people-filters > button { gap: .375rem; }
.rq-people-search { flex: 1 1 14rem; min-width: 0; margin: 0; }
.rq-people-dot { display: inline-block; width: .4375rem; height: .4375rem; border-radius: 50%; flex: none; background: var(--rq-neutral); }
.rq-people-dot-ink { background: var(--rq-text); }
.rq-people-dot-success { background: var(--rq-success); }
.rq-people-dot-info { background: var(--rq-info); }
.rq-people-dot-pending { background: var(--rq-pending); }
.rq-people-dot-warning { background: var(--rq-warning); }
.rq-people-dot-muted { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rq-text-muted); }
.rq-people-dot-neutral { background: var(--rq-border-strong); }
.rq-people-dot-special { background: var(--rq-special); }

.rq-people-table { position: relative; overflow: visible; }
.rq-people-table > .rq-people-head { border-radius: var(--rq-radius-xl) var(--rq-radius-xl) 0 0; }
.rq-people-row {
    display: grid; align-items: center; gap: 0 .5rem; min-height: 3.25rem; padding: .375rem .75rem;
    grid-template-columns: 1.5rem minmax(13rem, 16rem) minmax(6rem, 9rem) minmax(10rem, 1fr) 4.25rem 4rem 8rem 8rem;
    border-top: 1px solid var(--rq-border-soft); font-size: .8125rem; cursor: pointer;
}
.rq-people-no-times .rq-people-row { grid-template-columns: 1.5rem minmax(13rem, 1fr) minmax(6rem, 10rem) 5rem 8rem 8rem; }
.rq-people-actions .btn { max-width: 100%; }
.rq-people-row:hover { background: var(--rq-surface-alt); }
.rq-people-row:has(.rq-people-check input:checked) { background: var(--rq-info-soft); }
.rq-people-head {
    min-height: 2.5rem; border-top: 0; background: var(--rq-surface-alt); cursor: default;
    font-size: .6875rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--rq-text-muted);
}
.rq-people-head:hover { background: var(--rq-surface-alt); }
.rq-people-head > .rq-people-on, .rq-people-head > .rq-people-total { font-size: inherit; font-weight: inherit; color: inherit; }
.rq-people-head > span { white-space: nowrap; }
.rq-people-axis { display: flex; justify-content: space-between; padding-right: .5rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.rq-people-check { display: flex; align-items: center; }
.rq-people-check .form-check-input { margin: 0; cursor: pointer; }
.rq-people-person { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.rq-people-name { display: flex; flex-direction: column; min-width: 0; }
.rq-people-name-line { display: flex; align-items: center; gap: .375rem; min-width: 0; }
.rq-people-open {
    padding: 0; border: 0; background: none; color: var(--rq-text); font-size: .875rem; font-weight: 700; text-align: left;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rq-people-open:hover { color: var(--rq-link); }
.rq-people-sub { font-size: .75rem; color: var(--rq-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-tag-strong { background: var(--rq-primary); color: var(--rq-on-primary); }
.rq-people-civilian-avatar { background: var(--rq-special-bg); color: var(--rq-special); font-weight: 800; }
.rq-people-team { display: flex; align-items: center; gap: .375rem; min-width: 0; font-weight: 600; white-space: nowrap; }
.rq-people-team .rq-team-dot { border-radius: 3px; width: .5rem; height: .5rem; }
.rq-team-dot-none { --c: var(--rq-border-strong); }
.rq-people-line { position: relative; display: block; height: 1.25rem; margin-right: .5rem; border-radius: 4px; background: var(--rq-neutral-bg); }
.rq-people-bar { position: absolute; top: .25rem; height: .75rem; border-radius: 3px; background: var(--rq-success); opacity: .55; }
.rq-people-bar-open { opacity: 1; }
.rq-people-now { position: absolute; top: -.125rem; bottom: -.125rem; width: 2px; margin-left: -1px; background: var(--rq-brand-strong); }
.rq-people-on { text-align: right; font-size: .9375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rq-people-total { text-align: right; color: var(--rq-text-muted); font-variant-numeric: tabular-nums; }
.rq-people-phone { padding-left: 1rem; color: var(--rq-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-people-phone-icon { display: none; }
.rq-people-actions { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; }
.rq-people-actions .btn { white-space: nowrap; }
.rq-btn-pending { background: var(--rq-pending-bg); color: var(--rq-pending-strong); border-color: transparent; font-weight: 800; }
.rq-btn-pending:hover { background: var(--rq-pending-line); color: var(--rq-pending-strong); }

.rq-people-group-head { display: flex; align-items: center; gap: .625rem; min-height: 2.25rem; padding: .25rem 1rem; border-top: 1px solid var(--rq-border-soft); }
.rq-people-group-pending { background: var(--rq-pending-soft); }
.rq-people-group-pending .rq-label { color: var(--rq-pending); }
.rq-people-group-success .rq-label { color: var(--rq-success); }
.rq-people-group-warning .rq-label { color: var(--rq-warning); }
.rq-people-group-special .rq-label { color: var(--rq-special); }
.rq-people-fold { display: flex; align-items: center; gap: .625rem; padding: 0; border: 0; background: none; color: var(--rq-text-muted); }
.rq-people-fold .ti { transition: transform .15s ease; }
.rq-people-group[data-open="false"] .rq-people-fold .ti { transform: rotate(-90deg); }
.rq-people-group[data-open="false"] .rq-people-group-rows { display: none; }

.rq-people-bulk {
    position: sticky; bottom: .875rem; z-index: 5; display: flex; align-items: center; gap: .375rem; width: max-content; max-width: calc(100% - 1.5rem);
    margin: .5rem auto .875rem; padding: .375rem .375rem .375rem 1rem; border-radius: var(--rq-radius-lg);
    background: var(--rq-hero); color: var(--rq-on-strong); box-shadow: var(--rq-shadow-float); overflow-x: auto;
}
.rq-people-bulk[hidden] { display: none; }
.rq-people-bulk-count { margin-right: .5rem; font-size: .875rem; white-space: nowrap; }
.rq-people-bulk > button {
    height: 2.25rem; padding: 0 .75rem; border: 0; border-radius: var(--rq-radius-sm); background: var(--rq-on-navy-fill);
    color: var(--rq-on-strong); font-size: .8125rem; font-weight: 700; white-space: nowrap;
}
.rq-people-bulk > button[hidden] { display: none; }
.rq-people-bulk > button:hover { background: var(--rq-on-navy-border); }
.rq-people-bulk > .rq-people-bulk-clear { width: 2.25rem; padding: 0; background: transparent; color: var(--rq-on-navy-muted); font-size: 1.125rem; }

.rq-people-callout { display: flex; flex-wrap: wrap; align-items: baseline; gap: .375rem; }
.rq-people-stack { display: flex; gap: 2px; height: .5rem; margin-top: .5rem; border-radius: 999px; overflow: hidden; }
.rq-people-stack-success { background: var(--rq-success); }
.rq-people-stack-info { background: var(--rq-info); }
.rq-people-stack-pending { background: var(--rq-pending); }
.rq-people-stack-warning { background: var(--rq-warning); }
.rq-people-stack-muted { background: var(--rq-border); }
.rq-people-stack-neutral { background: var(--rq-border-strong); }
.rq-people-callout-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.rq-people-callout-actions > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.rq-people-skeleton { height: 24rem; border-radius: var(--rq-radius-xl); }
.rq-people-picked { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: 1rem; padding: .625rem .75rem; border-radius: var(--rq-radius-md); background: var(--rq-surface-alt); font-size: .8125rem; font-weight: 600; }
.rq-people-team-picks { display: flex; flex-direction: column; border: 1px solid var(--rq-border); border-radius: var(--rq-radius-md); overflow: hidden; }
.rq-people-team-pick { display: flex; align-items: center; gap: .625rem; min-height: 2.75rem; margin: 0; padding: .375rem .75rem; border-top: 1px solid var(--rq-border-soft); cursor: pointer; }
.rq-people-team-pick:first-child { border-top: 0; }
.rq-people-days { display: grid; grid-template-columns: repeat(3, max-content); gap: .25rem 1rem; white-space: nowrap; }
.rq-people-day-row > th { background: var(--rq-surface-alt); }

/* The person drawer (a Bootstrap offcanvas on the right). */
.rq-person-drawer.offcanvas-end { width: 28.75rem; max-width: 100vw; }
.rq-drawer { display: flex; flex-direction: column; height: 100%; }
.rq-drawer-head { padding: 1.125rem 1.25rem .875rem; border-bottom: 1px solid var(--rq-border-soft); }
.rq-drawer-who { display: flex; align-items: flex-start; gap: .875rem; }
.rq-drawer-title { flex: 1; min-width: 0; }
.rq-drawer-title h2 { font-size: 1.25rem; font-weight: 800; }
.rq-drawer-sub { margin-top: .1875rem; font-size: .8125rem; color: var(--rq-text-muted); }
.rq-drawer-pills { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .5rem; }
.rq-drawer-quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .875rem; }
.rq-drawer-quick > .btn { flex: 1 1 auto; white-space: nowrap; }
.rq-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.rq-drawer-body .rq-factlist > div { grid-template-columns: 7rem minmax(0, 1fr); }
.rq-drawer-line { padding: 0 1rem .625rem; }
.rq-drawer-line .rq-people-line { margin-right: 0; height: 1.375rem; }
.rq-drawer-hours { width: 6rem; }
.rq-drawer-add { width: 100%; min-height: 2.5rem; padding: 0 1rem; border: 0; border-top: 1px solid var(--rq-border-soft); background: var(--rq-surface); color: var(--rq-link); font-size: .8125rem; font-weight: 800; text-align: left; }
.rq-drawer-foot { display: flex; gap: .625rem; padding: .875rem 1.25rem 1.125rem; border-top: 1px solid var(--rq-border-soft); }
.rq-drawer-foot .btn { min-height: 2.875rem; font-weight: 800; }

/* Narrower screens: the phone becomes an icon and the total moves to the drawer. */
@media (max-width: 1799.98px) {
    .rq-people-row { grid-template-columns: 1.5rem minmax(12rem, 1fr) minmax(3rem, 7.5rem) minmax(9rem, 1.1fr) 3.75rem 2.25rem 7.5rem; }
    .rq-people-no-times .rq-people-row { grid-template-columns: 1.5rem minmax(12rem, 1fr) minmax(3rem, 9rem) 2.25rem 7.5rem; }
    .rq-people-total { display: none; }
    .rq-people-phone { padding-left: 0; text-align: center; }
    .rq-people-phone-text { display: none; }
    .rq-people-phone-icon { display: inline; }
    .rq-people-head .rq-people-phone { font-size: 0; }
}
@media (max-width: 767.98px) {
    .rq-people-head { display: none; }
    .rq-people-row, .rq-people-no-times .rq-people-row {
        grid-template-columns: 1.5rem minmax(0, 1fr) auto auto;
        grid-template-areas: "check person on actions" "check team team team" "check line line line";
        gap: .25rem .5rem; padding: .625rem .75rem;
    }
    .rq-people-check { grid-area: check; align-self: start; padding-top: .5rem; }
    .rq-people-person { grid-area: person; }
    .rq-people-actions { grid-area: actions; }
    .rq-people-team { grid-area: team; font-size: .75rem; }
    .rq-people-line { grid-area: line; margin-right: 0; }
    .rq-people-team:empty, .rq-people-team-none, .rq-people-line-empty { display: none; }
    .rq-people-on { grid-area: on; }
    .rq-people-total, .rq-people-phone { display: none; }
    .rq-people-bulk { flex-wrap: wrap; justify-content: center; width: auto; max-width: none; margin-inline: .5rem; }
    .rq-people-actions .btn-icon { display: none; }
    .rq-people-search { flex-basis: 100%; }
    .rq-person-drawer.offcanvas-end { width: 100vw; }
}

/* Training reports (/Reports): how far members got, exam readiness tiles, folding stop groups. */
.rq-funnel { display: grid; gap: .875rem; }
.rq-funnel-row { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr) 7rem; grid-template-areas: "name track figure" ". meta meta"; align-items: center; column-gap: .875rem; row-gap: .125rem; }
.rq-funnel-name { grid-area: name; display: flex; align-items: center; gap: .375rem; min-width: 0; font-weight: 700; }
.rq-funnel-name .ti { color: var(--rq-text-muted); }
.rq-funnel-track { grid-area: track; height: .75rem; margin: 0; }
.rq-funnel-figure { grid-area: figure; text-align: end; white-space: nowrap; font-size: .875rem; }
.rq-funnel-meta { grid-area: meta; }
.rq-funnel-meta:empty { display: none; }
.rq-report-pair { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }
.rq-report-pct { display: block; font-size: .6875rem; color: var(--rq-text-muted); line-height: 1.1; }
.rq-report-names a { color: var(--rq-text); }
.rq-report-group { border-top: 1px solid var(--rq-border-soft); }
.rq-report-group > summary { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; cursor: pointer; list-style: none; }
.rq-report-group > summary::-webkit-details-marker { display: none; }
.rq-report-group > summary:hover { background: var(--rq-surface-alt); }
.rq-report-group > summary:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: -2px; }
.rq-report-chevron { color: var(--rq-text-muted); transition: transform .15s; }
.rq-report-group[open] > summary .rq-report-chevron { transform: rotate(90deg); }
.rq-readiness { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.rq-readiness-tile { display: flex; flex-direction: column; gap: .25rem; padding: .875rem 1rem; color: var(--rq-text); border-top: 3px solid var(--rq-border); }
.rq-readiness-tile:hover { text-decoration: none; color: var(--rq-text); background: var(--rq-surface-alt); }
.rq-readiness-tile.active { box-shadow: 0 0 0 2px var(--rq-primary); }
.rq-readiness-success { border-top-color: var(--rq-success); }
.rq-readiness-warning { border-top-color: var(--rq-warning); }
.rq-readiness-info { border-top-color: var(--rq-info); }
@media (max-width: 1199.98px) { .rq-readiness { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767.98px) {
    .rq-readiness { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rq-funnel-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name figure" "track track" "meta meta"; }
    .rq-report-pair { grid-template-columns: minmax(0, 1fr); }
}

/* Station documents: file, description and Upload in one row; stacked on phones. */
.rq-document-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .5rem; }
@media (max-width: 767.98px) { .rq-document-upload { grid-template-columns: minmax(0, 1fr); } }

/* Activity roll call: one tap-to-tick row per person. */
.rq-roll-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .25rem; border-bottom: 1px solid var(--rq-border); cursor: pointer; min-height: 3rem; }
.rq-roll-row:last-child { border-bottom: 0; }
.rq-roll-row .form-check-input { width: 1.375rem; height: 1.375rem; flex: none; }
.rq-roll-tools { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .5rem .75rem; }
.rq-roll-buttons { display: flex; gap: .375rem; justify-content: flex-end; }
.rq-roll-search { grid-column: 1 / -1; }
/* A joint activity another station organizes: its own colour, apart from Joint / Organization. */
.rq-status.rq-hosted, .rq-hosted { background: var(--rq-hosted-tint) !important; color: var(--rq-hosted-ink) !important; }
.rq-station-note { font-style: italic; color: var(--tblr-secondary); white-space: pre-line; }

/* The signed-in member at the top of the rail opens their own profile. */
.rq-sidebar a.rq-user { text-decoration: none; border-radius: var(--rq-radius-md); }
.rq-sidebar a.rq-user:hover, .rq-sidebar a.rq-user.active { background: var(--rq-sidebar-hover); }
.rq-sidebar a.rq-user:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: -2px; }

/* A member's files: a row per file — preview, name with who added it and when, actions. */
.rq-member-files .rq-drop { margin: 0 1rem .75rem; }
.rq-mfile {
    display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; align-items: center; gap: .875rem;
    padding: .75rem 1rem; border-top: 1px solid var(--rq-border);
}
.rq-mfile-thumb {
    position: relative; display: flex; align-items: center; justify-content: center; width: 4.5rem; aspect-ratio: 1;
    border-radius: var(--rq-radius-md); overflow: hidden; background: var(--rq-surface-sunk); color: var(--rq-text-muted);
    font-size: 1.75rem; text-decoration: none; border: 1px solid var(--rq-border);
}
.rq-mfile-thumb[data-kind="pdf"] { background: var(--rq-brand-tint); color: var(--rq-brand-text); }
.rq-mfile-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rq-mfile-thumb > .ti { margin-bottom: .875rem; }
.rq-mfile-thumb .rq-file-ext { left: .25rem; top: auto; bottom: .25rem; z-index: 1; }
.rq-mfile-thumb:hover { border-color: var(--rq-link); }
.rq-mfile-thumb:focus-visible { outline: 2px solid var(--rq-focus); outline-offset: 2px; }
.rq-mfile-main { min-width: 0; display: flex; flex-direction: column; gap: .125rem; }
.rq-mfile-name { font-weight: 700; color: var(--rq-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.rq-mfile-name:hover { color: var(--rq-link); text-decoration: underline; }
.rq-mfile-desc { font-size: .8125rem; color: var(--rq-text); }
.rq-mfile-meta { display: flex; flex-wrap: wrap; gap: .25rem .875rem; font-size: .75rem; color: var(--rq-text-muted); }
.rq-mfile-meta .ti { margin-right: .25rem; }
.rq-mfile-actions { display: flex; align-items: center; gap: .25rem; }
.rq-mfile-actions .btn .ti { margin-right: .25rem; }
.rq-mfile-actions .btn-icon .ti { margin-right: 0; }
@media (max-width: 575.98px) {
    .rq-mfile { grid-template-columns: 3.5rem minmax(0, 1fr); gap: .625rem; }
    .rq-mfile-thumb { width: 3.5rem; font-size: 1.25rem; }
    .rq-mfile-thumb > .ti { margin-bottom: .75rem; }
    .rq-mfile-thumb .rq-file-ext { font-size: .5625rem; padding: 0 .25rem; }
    .rq-mfile-actions { grid-column: 2; }
}

/* The file viewer over the page (app.js, [data-rq-preview]): the picture or the PDF as large as fits. */
.rq-viewer .modal-header { gap: .75rem; }
.rq-viewer .modal-title { min-width: 0; font-size: 1rem; }
.rq-viewer-actions { display: flex; align-items: center; gap: .375rem; margin-left: auto; flex-shrink: 0; }
.rq-viewer-actions .btn .ti { margin-right: .25rem; }
.rq-viewer-actions .btn-close { margin: 0 0 0 .25rem; }
.rq-viewer-body { display: flex; align-items: center; justify-content: center; padding: 0; background: var(--rq-surface-sunk); min-height: 50vh; }
.rq-viewer-body img { max-width: 100%; max-height: calc(100vh - 9rem); object-fit: contain; }
.rq-viewer-body iframe { width: 100%; height: calc(100vh - 9rem); border: 0; background: var(--rq-surface); }
@media (max-width: 767.98px) {
    .rq-viewer-actions .btn span { display: none; }
    .rq-viewer-actions .btn .ti { margin-right: 0; }
    .rq-viewer-body img { max-height: calc(100vh - 4rem); }
    .rq-viewer-body iframe { height: calc(100vh - 4rem); }
}

/* My profile: course and exam rows carry their certificate under the name. */
.rq-myprofile-open { display: flex; flex-wrap: wrap; gap: .375rem; padding: .25rem 1rem 1rem; }
