/* Additive viewer-specific layer (FR-001). The lifted TelliReport stylesheet
   (css/tellireport/app.css) is the single source of visual truth: every alias below derives from its
   design tokens; viewer.css never restates a token value the design system already owns. */
:root {
    --primary: var(--color-primary);
    --primary-hover: var(--color-primary-hover);
    --primary-dark: var(--color-primary-dark);
    --primary-rgb: var(--color-primary-rgb);
    --text: var(--color-text-primary);
    --text-2: var(--color-text-secondary);
    --text-3: var(--color-text-tertiary);
    --inverse: var(--color-text-inverse);
    --bg-white: var(--color-bg-white);
    --bg-light: var(--color-bg-light);
    --bg-subtle: var(--color-bg-subtle);
    --bg-muted: var(--color-bg-muted);
    --bg-primary-light: var(--color-bg-primary-light);
    --bg-primary-subtle: var(--color-bg-primary-subtle);
    --border: var(--color-border-default);
    --border-light: var(--color-border-light);
    --border-primary: var(--color-border-primary);
    --warning: var(--color-warning);
    --error: var(--color-error);
    --info: var(--color-info);
    --orange: var(--color-orange);
    --r-sm: var(--radius-sm);
    --r-md: var(--radius-md);
    --r-lg: var(--radius-lg);
    --r-full: var(--radius-full);
    --font: var(--font-family-base);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

/* Viewer chrome baseline: denser than the design system's 16px document scale. */
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--color-bg-light);
    font-size: 14px;
    line-height: 1.5;
}

svg { display: block; }
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.rv-boot { padding: 40px; color: var(--text-2); }

.app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── Top bar (mockup .header) ─────────────────────────────────────────────────────────────────── */
.rv-topbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex: 0 0 auto;
}

.rv-topbar__content { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; gap: 16px; }
.rv-topbar__left { display: flex; align-items: center; gap: 18px; }
.rv-topbar__right { display: flex; align-items: center; gap: 16px; }

.rv-burger {
    width: 40px; height: 40px;
    border: none;
    border-radius: var(--r-md);
    background: var(--primary);
    display: flex; align-items: center; justify-content: center;
    color: var(--inverse);
    cursor: pointer;
}
.rv-burger:hover { background: var(--primary-hover); }

.rv-brand { display: flex; align-items: center; gap: 10px; }
.rv-brand__logo { display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.rv-brand__logo i { display: block; width: 5px; background: var(--primary); border-radius: 1px; }
.rv-brand__logo i:nth-child(1) { height: 10px; }
.rv-brand__logo i:nth-child(2) { height: 16px; }
.rv-brand__logo i:nth-child(3) { height: 24px; }
.rv-brand__name { font-weight: 700; font-size: 20px; letter-spacing: .5px; }
.rv-brand__name b { color: var(--text); }
.rv-brand__name span { color: var(--primary); }

.rv-topbar__apptitle { font-size: 18px; color: var(--text-2); font-weight: 600; padding-left: 14px; border-left: 1px solid var(--border); margin-left: 4px; }

.rv-credits {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px;
    border-radius: var(--r-full);
    background: rgba(var(--primary-rgb), .12);
    border: 1px solid rgba(var(--primary-rgb), .4);
    color: #3f5e1d;
    font-family: var(--font);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.rv-credits:hover { background: rgba(var(--primary-rgb), .22); }

.rv-tenant {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    min-width: 190px;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-white);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}
.rv-tenant:hover { border-color: var(--primary); }
.rv-tenant__chev { color: var(--inverse); background: var(--primary); border-radius: var(--r-sm); width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; margin-left: 6px; }

/* The user menu + avatar styles moved to the shared sign-in stylesheet
   (_content/ReportFYI.AuthBridge.Components/signin.css, linked from index.html) — one home for the
   shared SignedInUserMenu across applications (FR-002). */

/* Tenant switcher states (issue #45): shimmer while loading, error chip, embedded dropdown, switching. */
.rv-tenant--loading { cursor: default; }
.rv-tenant--loading:hover { border-color: var(--border); }
.rv-tenant__shimmer {
    display: block; width: 100%; height: 14px;
    border-radius: var(--r-sm);
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-subtle) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: rv-tenant-shimmer 1.2s ease-in-out infinite;
}
@keyframes rv-tenant-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.rv-tenant--error { border-color: var(--error); color: var(--error); cursor: help; }
.rv-tenant--error:hover { border-color: var(--error); }
.rv-tenant__erricon { font-size: 14px; line-height: 1; }

/* The dropdown wears the chip's frame; the embedded Telerik widget sheds its own chrome. */
.rv-tenant--switcher { padding: 0; }
.rv-tenant--switcher .rv-tenant__dropdown,
.rv-tenant--switcher .k-dropdownlist {
    width: 100%; border: none; background: transparent;
    font-family: var(--font); font-weight: 600; color: var(--text);
    box-shadow: none;
}
.rv-tenant--switching { opacity: .6; cursor: progress; }
.rv-tenant--switching .k-dropdownlist { pointer-events: none; }

/* Inline switch-failure toast (the drill-fault pattern), anchored under the top bar. */
.rv-tenant-toast {
    position: absolute;
    top: 64px; right: 16px;
    z-index: 1100;
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--error);
    border-radius: var(--r-md);
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    color: var(--text);
    font-size: 13px;
}
.rv-tenant-toast__icon { color: var(--error); }
.rv-tenant-toast__msg { font-weight: 600; }

/* Layout-owned upsell popover opened from the credits pill (cost-entitlement FR-8). */
.rv-upsell-pop {
    position: fixed;
    top: 68px; right: 24px;
    z-index: 1100;
    width: min(320px, calc(100vw - 32px));
    background: var(--bg-white);
    border: 1px dashed var(--primary);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    padding: 14px 16px;
    display: flex; flex-direction: column; gap: 10px;
}
.rv-upsell-pop__title { font-size: 13px; font-weight: 700; color: var(--primary-dark); }
.rv-upsell-pop__copy { font-size: 12.5px; color: var(--text-2); }
.rv-upsell-pop__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rv-upsell-pop__cta { font-size: 12px; font-weight: 700; color: var(--inverse); background: var(--primary); padding: 6px 12px; border-radius: var(--r-full); text-decoration: none; }
.rv-upsell-pop__cta:hover { background: var(--primary-hover); }
.rv-upsell-pop__dismiss { border: none; background: transparent; color: var(--text-3); font-size: 14px; cursor: pointer; }

/* ── App body: sidebar + content (mockup .body / .sidebar / .content) ─────────────────────────── */
.rv-body { flex: 1 1 auto; display: flex; min-height: 0; }

.rv-sidenav {
    flex: 0 0 220px;
    background: var(--bg-white);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding-top: 8px;
}
/* Burger-toggled state: hidden at wide, slid-in drawer at narrow (see the media query below). */
.rv-sidenav--toggled { display: none; }

.rv-nav-item {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 22px;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    border-left: 3px solid transparent;
    font-family: var(--font);
    font-size: 15px;
    transition: .15s;
}
.rv-nav-item:hover { background: var(--bg-primary-subtle); color: var(--primary); }
.rv-nav-item.active,
.rv-nav-item--active { background: var(--bg-primary-light); color: var(--primary-dark); font-weight: 600; border-left-color: var(--primary); }
.rv-nav-item .icon { color: inherit; flex: 0 0 auto; }

.rv-nav-scrim { display: none; }

.rv-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 22px 26px 0;
    overflow: hidden;
}

/* ── Page head (mockup .breadcrumb / .page-head / .powered) ───────────────────────────────────── */
.rv-breadcrumb { font-size: 13px; color: var(--text-3); }
.rv-breadcrumb b { color: var(--text-2); font-weight: 600; }
/* Home/Reports crumbs are now links (#70); Reports keeps its bold treatment via .rv-breadcrumb b above.
   The a:hover b rule exists because that bold child's own colour would otherwise outrank the inherited hover colour. */
.rv-breadcrumb a { color: inherit; text-decoration: none; cursor: pointer; }
.rv-breadcrumb a:hover { color: var(--primary-dark); text-decoration: underline; }
.rv-breadcrumb a:hover b { color: inherit; }
.rv-breadcrumb a:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }

/* Issue #73: one compact row — every call site (Viewer's ReportHeaderBar, Index) applies both
   display/alignment and the compact spacing together, so there is no separate modifier class. */
.rv-pagehead {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 10px;
}
.rv-pagehead .rv-breadcrumb { margin-bottom: 0; }

/* App.razor wires <FocusOnNavigate Selector="h1" />, so every routable page must keep an <h1> in the DOM as
   the screen-reader landing target even though issue #73 removed the visible title band; hide it visually
   only (never display:none, which would remove it from the accessibility tree and break the focus target).
   Both clip properties are set — clip-path for current engines, the legacy clip shorthand alongside it,
   matching this app's other visually-hidden utilities (wwwroot/css/tellireport/app.css, the telli stylesheet). */
.rv-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* FocusOnNavigate lands programmatic focus on the page h1 for screen readers (App.razor); the default
   focus ring on a non-interactive, visually-hidden heading reads as broken chrome, so suppress it there only —
   NOT on .rv-visually-hidden generally, which would silently strip the focus ring from a future skip-link. */
h1.rv-visually-hidden:focus { outline: none; }

.rv-powered {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), .14), rgba(var(--primary-rgb), .03));
    border: 1px solid var(--border-primary);
    border-radius: var(--r-full);
    white-space: nowrap;
}

/* viewer grid: orgtree | report | telli (mockup .viewer: 230px | 1fr | 390px, 16px gap).
   FR-003: the page sets grid-template-columns inline (collapsed panels shrink to a 36px reopen rail);
   the transition keeps collapse/expand visibly under 200ms (SC-006). */
.rv-viewer {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 230px 1fr 390px;
    gap: 16px;
    min-height: 0;
    padding-bottom: 18px;
    transition: grid-template-columns .18s ease;
}

/* ── FR-003: collapsible panel shell (org panel + assistant panel) ─────────────────────────────────
   Children stay MOUNTED across collapse (display-based hiding) so tree selection, chat transcript and
   in-flight SSE messages survive; only the CSS grid column narrows. */
.rv-collapsible {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    /* Issue #91: reserve for telli-chat's .telli-panel__expand button (owned there, consumed here — see
       margin-right on that class in telli.css). Sized from THIS host's own .rv-collapsible__hide geometry
       below (10px inset + 24px width) so the two px-based hit areas never overlap regardless of root font
       size; a rem value on the telli-chat side would drift against this fixed-px control at a shrunk root
       font (e.g. html{font-size:87.5%} or a user text-size setting). */
    --telli-header-inline-end-reserve: 34px;
}
.rv-collapsible__content { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.rv-collapsible--collapsed .rv-collapsible__content { display: none; }

.rv-collapsible__rail {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-2);
    font-family: var(--font);
}
.rv-collapsible__rail:hover { color: var(--primary-dark); background: var(--bg-primary-subtle); }
.rv-collapsible__rail-icon { font-size: 14px; font-weight: 700; }
.rv-collapsible__rail-title {
    writing-mode: vertical-rl;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.rv-collapsible__hide {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    background: var(--bg-white); color: var(--text-2);
    font-size: 13px; font-weight: 700; line-height: 1; cursor: pointer;
}
.rv-collapsible__hide:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--bg-primary-subtle); }

@media (max-width: 767.98px) {
    /* Drawer territory: the collapse shell is inert below the breakpoint — content always shows. */
    .rv-collapsible--collapsed .rv-collapsible__content { display: flex; }
    .rv-collapsible__rail, .rv-collapsible__hide { display: none; }
}

.rv-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.rv-card--panel { padding: 0; }

.rv-card__head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rv-card__head h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-2);
}

.rv-card__body { min-height: 0; overflow: auto; }
.rv-card__body--tree { padding: 8px; }
.rv-card__body--report { padding: 0; }

/* §5 zoom surface (T4): percent levels ride this wrapper's inline CSS zoom; Page Width is the measured fit
   set by viewerInterop.fitReportZoomToWidth. The wrapper owns the body's width so the fit measure is stable. */
.rv-zoom { display: block; width: 100%; }

/* §5 nav chrome (T4): keep the pager + zoom group on one compact line inside the toolbar. */
.rm-navchrome { display: inline-flex; align-items: center; gap: 4px; }
.rm-navchrome__nofm { display: inline-flex; align-items: center; gap: 4px; }
.rm-navchrome__of { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.rm-navchrome__zoom { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.rm-navchrome__zoom-label { font-size: 13px; color: var(--text-2); }
.rm-navchrome__alert { font-size: 12px; color: var(--danger, #b3261e); margin-left: 6px; }

/* §4 report-kind tree (issue #122): report-modes ships its own BEM vocabulary (rm-tree*) for the report-kind
   list above the org tree. Same reason .rm-navchrome above lives here rather than a scoped .razor.css:
   the Blazor WASM host never loads scoped CSS bundles (issue #61), and .rm-navchrome already set the
   precedent that report-modes chrome lands in viewer.css. The block below deliberately mirrors
   .rv-tree__item further down so the report-kind rows and the org tree read as one continuous list. */

.rm-tree-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

/* mirrors .rv-card__head h3 below so the group label reads as panel chrome */
.rm-tree-group__label {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-3);
}

/* list-style / margin / padding resets are LOAD-BEARING — the UA default <ul> padding is part of the
   reported misalignment (issue #122); do not omit them. */
.rm-tree { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }

.rm-tree__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border-radius: var(--r-md);
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    min-width: 0;
}

/* CoverLetter / ComponentNote rows render a plain, non-selectable <span> label (no click handler, no export
   button post-#122) — scoping the hover to :has(.rm-tree__label--selectable) keeps them from lighting up like
   a clickable Report row. Do not simplify this back to a bare .rm-tree__item:hover. */
.rm-tree__item:has(.rm-tree__label--selectable):hover { background: var(--bg-subtle); }

/* matches .rv-tree__item--active exactly — the active state must read identically across both trees */
.rm-tree__item--active {
    background: var(--bg-primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.rm-tree__icon { flex: 0 0 auto; font-size: 13px; line-height: 1; }

/* min-width: 0 is what lets the label ellipsis instead of forcing the row (and the panel) wider at narrow
   widths — this is the acceptance criterion for collapsed-narrow panel widths; do not remove it. */
/* padding lives here (not on --selectable) so selectable and non-selectable rows stay the same height and the
   list doesn't go ragged; it also gives the <button> the row's full clickable height, closing the dead zone
   .rm-tree__item's own padding used to leave along the row's top/bottom edge (the org tree's .rv-tree__item
   avoids this because IT is the button). The 10px horizontal inset and the icon stay non-clickable — accepted,
   not an oversight, since the icon is a separate <span> outside the button. */
.rm-tree__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: inherit;
    color: inherit;
    text-align: left;
    padding: 9px 0;
}

/* strips the UA button chrome that currently renders "Report" as a boxed control. padding is intentionally
   NOT reset here — .rm-tree__label already owns the row's vertical padding (9px 0) and this rule must not
   override it back to 0, or the button's clickable area collapses back to the dead-zone bug this was fixing. */
.rm-tree__label--selectable { border: none; background: transparent; cursor: pointer; }
.rm-tree__label--selectable:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

/* org tree */
.rv-tree { display: flex; flex-direction: column; gap: 2px; }
.rv-tree__empty { padding: 12px; color: var(--text-3); font-size: 13px; }
.rv-tree__node { display: flex; flex-direction: column; }
.rv-tree__children { display: flex; flex-direction: column; gap: 2px; }

.rv-tree__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: none;
    background: transparent;
    border-radius: var(--r-md);
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    text-align: left;
    width: 100%;
}

.rv-tree__item:hover { background: var(--bg-subtle); }

/* mockup .tree-item.child: nested rows read smaller and dimmer than their parent */
.rv-tree__item--child { font-size: 13px; color: var(--text-2); }

.rv-tree__item--active {
    background: var(--bg-primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

.rv-tree__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: 0 0 auto; }
.rv-tree__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* report pane */
.rv-pane { height: 100%; }
.rv-pane__status { padding: 32px; color: var(--text-3); text-align: center; }

/* Undecodable body: a served Failed row with no decodable content — a defined, non-blank alert state. */
.rv-pane__undecodable {
    padding: 48px 32px;
    text-align: center;
    color: var(--text-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    outline: none;
}
.rv-pane__undecodable-icon { font-size: 28px; color: var(--error); }
.rv-pane__undecodable-msg { margin: 0; max-width: 42ch; }

/* Archived-status banner: informational chrome below the pagehead, never gating the report render. */
.rv-archived-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 4px 0 8px;
    border-radius: var(--r-sm);
    background: var(--bg-subtle);
    color: var(--text-2);
    font-size: 13px;
}
.rv-archived-banner__icon { font-size: 15px; }
.rv-pane__body { padding: 12px 16px; overflow: auto; }
.rv-pane__body table.reportTable { width: 100%; border-collapse: collapse; }

/* panel host */
.rv-panelhost { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.rv-panelhost__placeholder { padding: 24px; color: var(--text-2); }
.rv-panelhost__title { font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--text); }
/* NFR-AVAIL-002 fallback card: shown when the panel/LLM is unavailable; the chrome stays fully live beside it. */
.rv-panelhost__fallback { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

/* empty / failure states */
.viewer-empty { padding: 40px 22px; }
.viewer-empty h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }

.rv-failed {
    max-width: 520px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: #fff;
}

.rv-failed__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-full);
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 12px;
}

.rv-failed__title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.rv-failed__msg { color: var(--text-2); }

/* ── Bolt 3: responsive collapse to off-canvas drawers below 768px, usable to 320px (NFR-USE-001, ADR-022) ──
   The single 768px breakpoint (ADR-022) turns the org tree and the Telli panel into toggleable overlays so the
   report body holds the full width and scrolls in its own container — no horizontal scroll of the chrome. The
   panel drawer's collapse is driven by the shell's drawer state; PanelHostState governs its HEALTH, not layout. */
.rv-narrowbar { display: flex; gap: 8px; margin-bottom: 12px; }
.rv-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 35; }

@media (max-width: 767.98px) {
    .rv-content { padding: 14px 14px 0; }

    /* side nav: hidden by default, slid in as a left drawer by the top-bar burger */
    .rv-sidenav {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: min(280px, 80vw);
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: var(--shadow-md);
        border-right: 1px solid var(--border-light);
    }
    .rv-sidenav--toggled { display: flex; transform: translateX(0); }

    .rv-nav-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1040; }

    .rv-viewer { display: block; padding: 0 0 14px; position: relative; }

    /* report takes the full width; its own body scrolls (the chrome never scrolls horizontally) */
    .rv-card--report { min-height: calc(100vh - 200px); }

    /* org tree: left off-canvas drawer */
    .rv-card--tree {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: min(320px, 86vw);
        max-width: 86vw;
        z-index: 40;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: var(--shadow-sm);
    }
    .rv-card--tree.is-open { transform: translateX(0); }

    /* telli panel: right off-canvas drawer */
    .rv-card--panel-drawer {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(390px, 92vw);
        max-width: 92vw;
        z-index: 40;
        border-radius: 0;
        transform: translateX(0);
        transition: transform .18s ease;
        box-shadow: var(--shadow-sm);
    }
    .rv-card--panel-drawer.is-collapsed { transform: translateX(100%); }

    /* Issue #91: belt-and-braces — ShowExpandControl already withholds this button below the breakpoint
       (expand-over-report doesn't apply to the drawer layout, ADR-022), but hide it here too in case a
       stale render slips through during the narrow/wide crossing (a real window: this CSS breakpoint can
       fire before the JS-driven Blazor re-render lands). NOTE: .telli-panel__expand is owned by the
       telli-chat package (telli.css), not this file — this rule only wins because index.html loads
       telli.css BEFORE viewer.css (equal specificity, pure source order). If the class is ever renamed on
       that side, or the two <link> tags are reordered, this silently matches nothing and no test fails. */
    .telli-panel__expand { display: none; }
}

/* #blazor-error-ui styling is owned by the lifted tellireport/app.css. */

/* ── Bolt 2: toolbar / buttons ─────────────────────────────────────────────────────────────────── */
.rv-card__actions { display: flex; align-items: center; gap: 8px; }
.rv-toolbar { gap: 8px; flex-wrap: wrap; }

.rv-btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    background: #fff;
    color: var(--text);
    cursor: pointer;
}
.rv-btn:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--bg-primary-subtle); }
.rv-btn:disabled { opacity: .5; cursor: default; }
.rv-btn--primary { background: var(--primary); border-color: var(--primary-dark); color: #fff; }
.rv-btn--primary:hover { background: var(--primary-hover); }
.rv-btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }

/* icon-sized member of the .rv-btn toolbar family (same border/hover language, square footprint) */
.rv-iconbtn {
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: var(--r-md);
    background: #fff; color: var(--text-2);
    font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
}
.rv-iconbtn:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--bg-primary-subtle); }
.rv-iconbtn:disabled { opacity: .5; cursor: default; }

/* ── Bolt 2: org tree expand/collapse toggle ───────────────────────────────────────────────────── */
.rv-tree__row { display: flex; align-items: center; }
.rv-tree__toggle {
    flex: 0 0 auto;
    width: 20px; height: 20px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; cursor: pointer; padding: 0;
}
.rv-tree__toggle--leaf { cursor: default; }
.rv-tree__chevron {
    width: 0; height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid var(--text-3);
    transition: transform .12s ease;
}
.rv-tree__chevron--open { transform: rotate(90deg); }
.rv-tree__row .rv-tree__item { width: auto; flex: 1 1 auto; }

/* ── T2.2: mockup report grid (table.rpt contract, docs/ux/report-viewer-mockup.html) ──────────────
   Scoped to .rv-pane so the rules never leak into the Telli panel or dialogs. The rendered fragment
   carries class 'reportTable rpt'; SRL-text bodies keep their baked inline styles and only inherit the
   sticky/tabular help below. Columns scroll inside the pane (overflow on .rv-pane__body), never clip. */
.rv-pane__body { overflow: auto; max-width: 100%; }

.rv-pane table.rpt { width: 100%; border-collapse: collapse; font-size: 13.5px; font-family: var(--font); }

.rv-pane table.rpt th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-light);
    color: var(--text-2);
    font-weight: 700;
    text-align: right;
    padding: 11px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.rv-pane table.rpt th:first-child { text-align: left; }

.rv-pane table.rpt td {
    padding: 9px 16px;
    text-align: right;
    border-bottom: 1px solid var(--bg-subtle);
    font-variant-numeric: tabular-nums;
}
.rv-pane table.rpt td:first-child { text-align: left; color: var(--text); }

.rv-pane table.rpt tr.group td:first-child { font-weight: 700; color: var(--text); padding-top: 14px; }
.rv-pane table.rpt tr.line td:first-child { padding-left: 30px; color: var(--text-2); }
.rv-pane table.rpt tr.sub td { font-weight: 700; border-top: 1px solid var(--border); background: var(--bg-muted); }
.rv-pane table.rpt tr.total td { font-weight: 700; font-size: 14.5px; border-top: 2px solid var(--text); background: var(--bg-primary-subtle); }
.rv-pane .neg { color: var(--error); }
.rv-pane table.rpt tbody tr:hover td { background: rgba(var(--primary-rgb), .10); }

/* SRL-text (legacy inline-styled) bodies keep their look; just freeze their header + align figures. */
.rv-pane__body table.reportTable thead th { position: sticky; top: 0; z-index: 1; }
.rv-pane__body table.reportTable td,
.rv-pane__body table.reportTable th { font-variant-numeric: tabular-nums; }

/* ── T2.2: view-as-data grid — same header/cell rules as table.rpt, fixed widths, zebra rows ────── */
.rv-data-grid { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 12.5px; }
.rv-data-grid th, .rv-data-grid td {
    padding: 8px 12px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid var(--bg-subtle);
    font-variant-numeric: tabular-nums;
}
.rv-data-grid th:first-child, .rv-data-grid td:first-child { text-align: left; width: 26%; }
.rv-data-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bg-light);
    color: var(--text-2);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 2px solid var(--border);
}
.rv-data-grid tbody tr:nth-child(even) td { background: var(--bg-muted); }
.rv-data-grid tbody tr:hover td { background: rgba(var(--primary-rgb), .10); }

/* ── T2.3: segmented toolbar control (mockup .seg — Summary|Detail, Formatted|Data) ─────────────── */
.rv-seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.rv-seg button {
    border: none;
    background: #fff;
    padding: 7px 12px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
}
.rv-seg button:hover { color: var(--primary-dark); }
.rv-seg button.on { background: var(--bg-primary-light); color: var(--primary-dark); }
.rv-seg button:disabled { opacity: .5; cursor: default; }

/* ── Bolt 2: export / print modal ──────────────────────────────────────────────────────────────── */
.rv-modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; }
.rv-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.rv-modal__panel {
    position: relative;
    width: min(460px, 92vw);
    max-height: 88vh; overflow: auto;
    background: #fff;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}
.rv-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.rv-modal__head h3 { font-size: 15px; font-weight: 700; }
.rv-modal__close { border: none; background: transparent; font-size: 16px; cursor: pointer; color: var(--text-2); }
.rv-modal__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.rv-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--border-light); }

.rv-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.rv-field > span { font-weight: 600; color: var(--text-2); }
.rv-field select { padding: 7px 10px; border: 1px solid var(--border-light); border-radius: var(--r-sm); font-family: var(--font); font-size: 13px; }
.rv-field--group { border: 1px solid var(--border-light); border-radius: var(--r-md); padding: 10px 12px; }
.rv-field--group legend { font-weight: 600; color: var(--text-2); padding: 0 4px; }
.rv-field--group label { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.rv-field--row { flex-direction: row; gap: 14px; }
.rv-field--row label { flex: 1 1 0; }
.rv-check { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* ── T6: landing-page report browser (mockup card + table language over the fetched list) ───────── */
.rv-browser { flex: 1 1 auto; }

.rv-browser__toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.rv-browser__search {
    flex: 1 1 240px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-white);
    color: var(--text-3);
}
.rv-browser__search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .2); }
.rv-browser__search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--text);
}

.rv-browser__range {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg-white);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
}

.rv-chiprow { display: inline-flex; gap: 6px; }
.rv-chip {
    padding: 6px 13px;
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    background: var(--bg-white);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
}
.rv-chip:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--bg-primary-subtle); }
.rv-chip--on { border-color: var(--primary); background: var(--bg-primary-light); color: var(--primary-dark); }

/* shared column template so the header and every row line up (name | date | requester | status) */
.rv-browser__cols {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 170px minmax(160px, 240px) 100px;
    gap: 12px;
    align-items: center;
    padding: 0 16px;
}

.rv-browser__head {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border);
    flex: 0 0 auto;
}
.rv-browser__sort {
    border: none;
    background: transparent;
    padding: 10px 0;
    text-align: left;
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--text-2);
    cursor: pointer;
    white-space: nowrap;
}
.rv-browser__sort:hover { color: var(--primary-dark); }
.rv-browser__sort--static { cursor: default; }
.rv-browser__sort--static:hover { color: var(--text-2); }

.rv-browser__list { flex: 1 1 auto; min-height: 0; overflow: auto; }

.rv-browser__row {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--bg-subtle);
    background: var(--bg-white);
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    font-family: var(--font);
    font-size: 13.5px;
    cursor: pointer;
    transition: background .1s;
}
.rv-browser__row:hover { background: rgba(var(--primary-rgb), .10); }

.rv-browser__name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-browser__meta { color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rv-pill {
    justify-self: start;
    padding: 3px 10px;
    border-radius: var(--r-full);
    font-size: 11.5px;
    font-weight: 700;
}
.rv-pill--complete { background: var(--bg-primary-light); color: var(--primary-dark); }
.rv-pill--failed { background: rgba(220, 53, 69, .12); color: var(--error); }
.rv-pill--inprogress { background: rgba(13, 110, 253, .12); color: #0d6efd; }
.rv-pill--queued { background: var(--bg-subtle); color: var(--text-2); }
.rv-pill--unknown { background: var(--bg-subtle); color: var(--text-3); }

.rv-browser__empty { padding: 36px 16px; text-align: center; color: var(--text-3); }

/* issue #76: per-row pin/unpin star toggle (leading grid column) — the rv-iconbtn 28x28 square-footprint hit
   target and hover/foreground language, minus the border/white background (transparent, inline with the row) */
.rv-favbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--r-md);
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text-3);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.rv-favbtn:hover { color: var(--primary-dark); }
.rv-favbtn--on { color: var(--primary-dark); }

/* loading skeleton */
.rv-browser__skelrow { padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--bg-subtle); }
.rv-skel {
    display: block;
    height: 12px;
    border-radius: var(--r-sm);
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--bg-muted) 50%, var(--bg-subtle) 75%);
    background-size: 200% 100%;
    animation: rv-skel-shimmer 1.2s ease-in-out infinite;
}
@keyframes rv-skel-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* landing page around the browser: heading flows, browser card takes the height, open-by-id sits under it */
.rv-landing { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; padding-bottom: 18px; gap: 14px; }
/* The landing pagehead's own margin-bottom would stack on top of .rv-landing's gap (double spacing);
   let the flex gap own that spacing instead. */
.rv-landing > .rv-pagehead { margin-bottom: 0; }
.rv-landing__byid { flex: 0 0 auto; }
.rv-landing__byid .rv-openform { margin-top: 0; }

@media (max-width: 767.98px) {
    /* narrow: date + requester columns give way; name and status remain (the row is still clickable) */
    .rv-browser__cols { grid-template-columns: minmax(140px, 1fr) 92px; }
    .rv-browser__cols > :nth-child(2),
    .rv-browser__cols > :nth-child(3) { display: none; }
    .rv-browser__cols > :nth-child(4) { grid-column: 2; }
}

/* ── Bolt 2: open-report form ──────────────────────────────────────────────────────────────────── */
.rv-openform { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.rv-openform label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.rv-openform input { padding: 7px 10px; border: 1px solid var(--border-light); border-radius: var(--r-sm); font-family: var(--font); }

/* ── Bolt 2: print stylesheet — only the report body prints, chrome hidden ─────────────────────── */
@media print {
    .rv-topbar, .rv-sidenav, .rv-breadcrumb, .rv-pagehead, .rv-card--tree, .rv-card--panel, .rv-card__head, .rv-toolbar, .rv-modal { display: none !important; }
    .rv-viewer { display: block; padding: 0; }
    .rv-card, .rv-card--report { border: none; border-radius: 0; overflow: visible; }
    .rv-card__body { overflow: visible; }
    .rv-pane__body table.reportTable thead th { position: static; }
}

/* ── Drill-through affordance: hover/focus '+' badge on drillable value cells ──────────────────── */
/* Global (not scoped): index.html loads viewer.css, not the .razor.css scoped bundle. */
.report-body__cell--drillable {
    position: relative;
    cursor: pointer;
}

.report-body__cell--drillable:hover,
.report-body__cell--drillable:focus-visible {
    background-color: rgba(46, 125, 50, 0.10);
    outline: 1px solid rgba(46, 125, 50, 0.35);
    outline-offset: -1px;
}

.report-body__cell--drillable::after {
    content: "+";
    position: absolute;
    top: 0;
    right: 0;
    min-width: 13px;
    height: 13px;
    padding: 0 2px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    color: #fff;
    background-color: #2e7d32;
    border-bottom-left-radius: 3px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
}

.report-body__cell--drillable:hover::after,
.report-body__cell--drillable:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

/* ── Comments panel (unit-comments): thread list + composer + mention typeahead ─────────────────────
   The panel markup ships a full rv-comments / mention-typeahead BEM vocabulary; these are its styles in
   the additive layer, drawn from the same tokens and the .rv-btn / .rv-seg language as the rest of the
   viewer chrome. */
.rv-comments { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.rv-comments__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.rv-comments__title { font-size: 15px; font-weight: 700; color: var(--text); }
.rv-comments__head-actions { display: flex; align-items: center; gap: 12px; }
.rv-comments__toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.rv-comments__toggle input { accent-color: var(--primary); cursor: pointer; }
.rv-comments__close {
    width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--text-2);
    font-size: 14px; line-height: 1; cursor: pointer;
}
.rv-comments__close:hover { border-color: var(--border-light); color: var(--primary-dark); background: var(--bg-primary-subtle); }

.rv-comments__list { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 0; }
.rv-comments__status { font-size: 13px; color: var(--text-2); padding: 4px 0; }

.rv-comment { border: 1px solid var(--border-light); border-radius: var(--r-md); padding: 10px 12px; background: var(--bg-white); }
.rv-comment.is-resolved { opacity: .72; background: var(--bg-subtle); }
.rv-comment__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.rv-comment__author { font-weight: 600; color: var(--text); }
.rv-comment__time { color: var(--text-3); }
.rv-comment__badge { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: var(--r-full); background: var(--bg-primary-subtle); color: var(--primary-dark); }
.rv-comment__anchor { font-size: 11px; padding: 1px 8px; border-radius: var(--r-full); background: var(--bg-muted); color: var(--text-2); }
.rv-comment__body { font-size: 13.5px; color: var(--text); line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.rv-comment__xrefs, .rv-comment__mentions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--text-2); }
.rv-comment__reply { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--border-light); }
.rv-comment__actions { display: flex; gap: 6px; margin-top: 8px; }
.rv-comment__composer { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.rv-comment__composer-actions { display: flex; justify-content: flex-end; gap: 8px; }

.rv-comments__new { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--border-light); }
.rv-comments__new-title { font-size: 13px; font-weight: 700; color: var(--text); }
.rv-comments__text {
    width: 100%; font-family: var(--font); font-size: 13.5px; color: var(--text);
    padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-md);
    background: var(--bg-white); resize: vertical; min-height: 60px; line-height: 1.45;
}
.rv-comments__text:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--bg-primary-subtle); }
.rv-comments__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-comments__chip {
    display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
    padding: 2px 4px 2px 9px; border-radius: var(--r-full); background: var(--bg-primary-subtle); color: var(--primary-dark);
}
.rv-comments__chip button {
    width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center;
    border: none; background: transparent; color: inherit; font-size: 13px; line-height: 1; cursor: pointer; border-radius: var(--r-full);
}
.rv-comments__chip button:hover { background: rgba(var(--primary-rgb), .18); }
.rv-comments__error { font-size: 13px; color: var(--error); }

/* Comments modal (issue #89): CommentsDialog.razor re-hosts CommentThreadPanel inside a chrome-less
   TelerikWindow — the panel's own .rv-comments__head is the dialog chrome, so this just carries the
   flex/min-height chain down from the Telerik content region so the thread list scrolls in place. */
.rv-comments-window .k-window-content { padding: 12px 16px 16px; }
.rv-comments-window__body { display: flex; flex-direction: column; min-height: 0; max-height: 72vh; }
.rv-comments-window__body .rv-comments { flex: 1 1 auto; min-height: 0; }
/* header and composer never compress; only the list scrolls */
.rv-comments-window__body .rv-comments__head, .rv-comments-window__body .rv-comments__new { flex-shrink: 0; }

/* Mention typeahead — segmented @ User / # List mode picker (mirrors .rv-seg) + Telerik ComboBox. */
.mention-typeahead { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mention-typeahead__mode { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.mention-typeahead__mode-btn {
    border: none; background: #fff; padding: 6px 11px; font-family: var(--font);
    font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.mention-typeahead__mode-btn:hover { color: var(--primary-dark); }
.mention-typeahead__mode-btn.is-active { background: var(--bg-primary-light); color: var(--primary-dark); }
.mention-typeahead__mode-btn:disabled { opacity: .5; cursor: default; }
.mention-typeahead .k-combobox, .mention-typeahead .k-picker { flex: 1 1 180px; min-width: 160px; }

/* ── Result actions (unit-result-actions, §10/§11): toolbar group + redistribute dialog + confirms + toast ──
   The components ship a full ra- BEM vocabulary; these are its styles in the additive layer, drawn from the
   same tokens as the rest of the viewer chrome. The toolbar group sits inside .rv-toolbar. */
.ra-toolbar { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ra-redistribute__body { max-height: 78vh; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.ra-redistribute__admin-note { font-size: 12.5px; color: var(--text-2); background: var(--bg-primary-subtle); border-radius: var(--r-md); padding: 6px 10px; margin: 0; }
.ra-redistribute__error, .ra-confirm__error { font-size: 13px; color: var(--error); background: rgba(220, 53, 69, .07); border-radius: var(--r-md); padding: 6px 10px; }

/* Redistribute window viewport cap (issue #92): a large org's distribution-list set can push this window
   past the viewport — the title bar scrolls off the top, Send/Cancel off the bottom. This carries the
   flex/min-height chain down from the Telerik content region (same pattern as .rv-comments-window__body)
   so the body is the scroll fallback and the recipient list below scrolls first. */
.ra-redistribute-window .k-window-content { display: flex; flex-direction: column; min-height: 0; }

.ra-recipient-tree { border: 1px solid var(--border-light); border-radius: var(--r-md); padding: 8px 12px 10px; }
.ra-recipient-tree legend { font-size: 13px; font-weight: 700; color: var(--text); padding: 0 4px; }
.ra-recipient-tree__lock { font-size: 12.5px; color: var(--text-2); margin: 0 0 6px; }
.ra-recipient-tree__list { list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 4px; max-height: 38vh; overflow-y: auto; overscroll-behavior: contain; }
.ra-recipient-tree__label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.ra-recipient-tree__label[aria-disabled="true"] { opacity: .65; cursor: default; }
.ra-recipient-tree__tag, .ra-recipient-tree__locked { font-size: 11px; color: var(--text-3); }
.ra-recipient-tree__empty { font-size: 13px; color: var(--text-2); margin: 0; }

.ra-recipient-tree__toolbar { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.ra-recipient-tree__filter { flex: 1 1 auto; }
.ra-recipient-tree__count { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.ra-recipient-tree__bulk { display: flex; gap: 10px; margin: 0 0 4px; }
.ra-recipient-tree__bulk button { border: none; background: transparent; color: var(--text); text-decoration: underline; font-size: 12px; cursor: pointer; padding: 0; }
.ra-recipient-tree__bulk button:disabled { opacity: .5; cursor: default; }
.ra-recipient-tree__bulk button:focus-visible { outline: 2px solid var(--primary-dark); outline-offset: 2px; }

.ra-format-picker { display: flex; flex-direction: column; gap: 4px; }
.ra-format-picker__label { font-size: 13px; font-weight: 600; color: var(--text); }
.ra-format-picker__error { font-size: 12.5px; color: var(--error); }

.ra-multi-attach { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }

.ra-confirm__body { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--text); line-height: 1.45; }
.ra-confirm__strong { font-weight: 700; color: var(--error); margin: 0; }

.ra-accepted-toast {
    position: fixed; right: 18px; bottom: 18px; z-index: 60; max-width: 360px;
    background: var(--bg-white); border: 1px solid var(--border-light); border-left: 4px solid var(--success, #2e7d32);
    border-radius: var(--r-md); box-shadow: 0 6px 24px rgba(0, 0, 0, .14); padding: 12px 14px;
}
.ra-accepted-toast__title { font-size: 13.5px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.ra-accepted-toast__detail { font-size: 12.5px; color: var(--text-2); margin: 0; line-height: 1.4; }

/* Sign-in page styles moved to the shared sign-in stylesheet
   (_content/ReportFYI.AuthBridge.Components/signin.css, linked from index.html) — one home for the
   shared sign-in card across applications (FR-002, SC-002). */

/* §5 Info dialog (T6.2): Request ID / SRL version / Optimized flag. */
.rv-info { display: flex; flex-direction: column; gap: 8px; margin: 0; font-size: 13.5px; color: var(--text); }
.rv-info__row { display: flex; justify-content: space-between; gap: 16px; }
.rv-info__row dt { font-weight: 600; color: var(--text-2); }
/* Issue #73: the relocated Description row can be long; keep it wrapping inside the 420px dialog
   instead of blowing out the row's flex layout. */
.rv-info__row dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
