/* ==========================================================================
   TrueOmni OS design system
   Light for daily use, dark for demos (html[data-theme]). Neutrals are tinted
   toward TrueOmni blue; blue itself marks action and live state only.
   ========================================================================== */

:root,
html[data-theme="light"] {
    --o-canvas: oklch(0.975 0.005 240);
    --o-rail: oklch(0.955 0.008 240);
    --o-surface: oklch(0.995 0.002 240);
    --o-surface-2: oklch(0.965 0.006 240);
    --o-line: oklch(0.905 0.01 240);
    --o-line-strong: oklch(0.84 0.014 240);
    --o-ink: oklch(0.22 0.025 250);
    --o-ink-2: oklch(0.45 0.022 250);
    --o-ink-3: oklch(0.54 0.018 250);         /* AA (4.5:1) on canvas and surface */
    --o-accent: oklch(0.59 0.15 240);         /* #0088CE */
    --o-focus: oklch(0.59 0.15 240);          /* focus rings: TrueOmni blue whatever the brand (Settings → Brand) */
    --o-accent-ink: oklch(0.5 0.14 242);      /* links and small text on light */
    --o-accent-soft: oklch(0.59 0.15 240 / 0.1);
    --o-live: oklch(0.62 0.15 160);
    --o-warn: oklch(0.62 0.14 70);
    --o-warn-ink: oklch(0.5 0.12 65);          /* amber text that stays readable on light */
    --o-on-warn: oklch(0.2 0.03 60);           /* text on an amber fill (the View as bar): AA on --o-warn */
    --o-danger: oklch(0.55 0.19 18);
    --o-grid: oklch(0.22 0.025 250 / 0.06);
    --o-shadow: 0 1px 2px oklch(0.22 0.025 250 / 0.06), 0 8px 24px oklch(0.22 0.025 250 / 0.05);
    --o-scrim: oklch(0.2 0.02 250 / 0.28);
    --o-scrim-soft: oklch(0.2 0.02 250 / 0.12); /* beside an open drawer: the record the answer is about stays readable */    /* behind the Spotlight: dims in both themes (never built from --o-ink, which is light in dark) */
    --o-float: 0 8px 24px -12px oklch(0.2 0.02 250 / 0.35);
    --o-lift: 0 30px 80px -24px oklch(0.2 0.02 250 / 0.4);
    --o-action: oklch(0.52 0.14 242);         /* filled action buttons: white label at AA */
    --o-action-hover: oklch(0.47 0.13 243);
    --o-on-action: oklch(0.99 0.003 240);
    --o-bar: oklch(0.975 0.005 240 / 0.78);  /* top bar material over the canvas; --o-canvas when solid */
    color-scheme: light;
}

html[data-theme="dark"] {
    --o-canvas: oklch(0.155 0.018 250);
    --o-rail: oklch(0.175 0.02 250);
    --o-surface: oklch(0.205 0.022 250);
    --o-surface-2: oklch(0.235 0.024 250);
    --o-line: oklch(0.28 0.024 250);
    --o-line-strong: oklch(0.34 0.026 250);
    --o-ink: oklch(0.94 0.008 240);
    --o-ink-2: oklch(0.74 0.018 245);
    --o-ink-3: oklch(0.65 0.02 248);          /* AA (4.5:1) on surface */
    --o-accent: oklch(0.68 0.15 238);
    --o-focus: oklch(0.68 0.15 238);
    --o-accent-ink: oklch(0.76 0.12 236);
    --o-accent-soft: oklch(0.68 0.15 238 / 0.14);
    --o-live: oklch(0.74 0.15 160);
    --o-warn: oklch(0.78 0.13 75);
    --o-warn-ink: oklch(0.8 0.12 75);
    --o-on-warn: oklch(0.2 0.03 60);
    --o-danger: oklch(0.7 0.16 18);
    --o-grid: oklch(0.94 0.008 240 / 0.05);
    --o-shadow: 0 1px 2px oklch(0 0 0 / 0.3), 0 12px 32px oklch(0 0 0 / 0.25);
    --o-scrim: oklch(0.08 0.015 250 / 0.5);
    --o-scrim-soft: oklch(0.08 0.015 250 / 0.3);
    --o-float: 0 8px 24px -10px oklch(0 0 0 / 0.6);
    --o-lift: 0 30px 80px -24px oklch(0 0 0 / 0.7);
    --o-action: oklch(0.72 0.14 237);         /* light blue fill, dark label at AA */
    --o-action-hover: oklch(0.78 0.12 236);
    --o-on-action: oklch(0.17 0.02 250);
    --o-bar: oklch(0.155 0.018 250 / 0.8);
    color-scheme: dark;
}

:root {
    --o-font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    --o-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
    --o-radius: 10px;
    --o-radius-sm: 6px;
    --o-ease: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out-quint */
    --o-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* side sheets */
}

html, body {
    background: var(--o-canvas);
    color: var(--o-ink);
    font-family: var(--o-font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* the assistant's Spotlight is open (assistant.js): the page behind stays still */
html.spotlight-open { overflow: hidden; }

/* The canvas carries a faint dot grid: the "network" the agents live on. */
.o-canvas {
    background-color: var(--o-canvas);
    background-image: radial-gradient(var(--o-grid) 1px, transparent 1px);
    background-size: 22px 22px;
}

a { color: var(--o-accent-ink); }

:focus-visible {
    outline: 2px solid var(--o-focus);
    outline-offset: 2px;
}

/* MudBlazor and page styles reset outlines on their controls; keyboard focus must stay visible everywhere. */
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--o-focus) !important;
    outline-offset: 2px !important;
}

/* MudBlazor text fields and selects already draw a focused border; a second ring around them reads as a broken double border. */
.mud-input-control :is(input, textarea):focus-visible {
    outline: none !important;
}

/* MudBlazor's filled primary buttons take the action fill, not the accent: the accent (#0088CE) under a white label is 3.9:1, the
   action fill reaches 4.5:1 with its label in both themes and for any brand that passes Settings → Brand. Outlined and
   text buttons keep the accent. Loaded after MudBlazor.min.css, so the same selectors win. */
.mud-button-filled.mud-button-filled-primary:not(:disabled):not(.mud-disabled) {
    background-color: var(--o-action);
    color: var(--o-on-action);
}

@media (hover: hover) and (pointer: fine) {
    .mud-button-filled.mud-button-filled-primary:not(:disabled):not(.mud-disabled):hover { background-color: var(--o-action-hover); }
}

/* ---------- primitives ---------- */

.o-label {
    font-family: var(--o-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--o-ink-3);
}

.o-mono { font-family: var(--o-mono); font-size: 0.92em; }
.o-muted { color: var(--o-ink-2); }
.o-faint { color: var(--o-ink-3); }

.o-panel {
    background: var(--o-surface);
    border: 1px solid var(--o-line);
    border-radius: var(--o-radius);
}

.o-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--o-ink-3);
    flex: none;
}
.o-dot--live { background: var(--o-live); box-shadow: 0 0 0 3px oklch(from var(--o-live) l c h / 0.18); }
.o-dot--accent { background: var(--o-accent); box-shadow: 0 0 0 3px var(--o-accent-soft); }
.o-dot--warn { background: var(--o-warn); }
.o-dot--danger { background: var(--o-danger); }
.o-dot--pulse { animation: o-pulse 1.4s var(--o-ease) infinite; }

@keyframes o-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.o-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid var(--o-line);
    border-radius: 999px;
    font-family: var(--o-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--o-ink-2);
    background: var(--o-surface);
    white-space: nowrap;
}

.o-kbd {
    font-family: var(--o-mono);
    font-size: 11px;
    padding: 1px 6px;
    border: 1px solid var(--o-line-strong);
    border-bottom-width: 2px;
    border-radius: 4px;
    color: var(--o-ink-2);
}

/* Popovers (the browser's popover attribute): a solid surface that grows from its trigger. nav.js places it under the
   button; without script it sits at the top right, where the triggers are. */
.o-pop {
    position: fixed;
    inset: calc(60px + var(--o-viewas-h, 0px)) 12px auto auto;
    margin: 0;
    min-width: 240px;
    max-width: calc(100vw - 24px);
    padding: 8px;
    border: 1px solid var(--o-line);
    border-radius: var(--o-radius);
    background: var(--o-surface);
    color: var(--o-ink);
    box-shadow: var(--o-shadow);
    transform-origin: top right;
    transition: opacity 150ms var(--o-ease), transform 150ms var(--o-ease),
        overlay 150ms allow-discrete, display 150ms allow-discrete;
}

.o-pop:not(:popover-open) {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
    transition-duration: 100ms;
}

@starting-style {
    .o-pop:popover-open { opacity: 0; transform: translateY(-4px) scale(0.97); }
}

.o-pop[data-instant] { transition-duration: 0ms; }

/* The folded rail's tooltip (nav.js): the page's name beside its icon. */
.o-tip {
    position: fixed;
    z-index: 60;
    padding: 4px 8px;
    border-radius: var(--o-radius-sm);
    background: var(--o-ink);
    color: var(--o-canvas);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-4px, -50%);
    transition: opacity 120ms var(--o-ease), transform 120ms var(--o-ease);
}

.o-tip[data-show] { opacity: 1; transform: translate(0, -50%); }

.o-tip[data-instant] { transition-duration: 0ms; }

/* Brand logos: the right one per theme. */
.o-logo-on-dark { display: none; }
html[data-theme="dark"] .o-logo-on-dark { display: inline; }
html[data-theme="dark"] .o-logo-on-light { display: none; }

/* MudBlazor alignment with the system */
.mud-button-root { text-transform: none !important; letter-spacing: 0 !important; }
.mud-input-outlined-border { border-radius: var(--o-radius-sm) !important; }

@media (prefers-reduced-motion: reduce) {
    /* Showpieces marked data-motion="always" keep moving (see orbit.js). */
    :not([data-motion="always"], [data-motion="always"] *),
    :not([data-motion="always"], [data-motion="always"] *)::before,
    :not([data-motion="always"], [data-motion="always"] *)::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Blazor template bits ---------- */

/* FocusOnNavigate moves focus to the page's h1 for screen readers; that programmatic focus needs no ring. */
h1:focus, h1[tabindex="-1"]:focus-visible { outline: none !important; }

.blazor-error-boundary {
    background: var(--o-danger);
    padding: 1rem 1rem 1rem 1.5rem;
    color: white;
    border-radius: var(--o-radius-sm);
}

.blazor-error-boundary::after { content: "Something broke on this panel."; }

/* ---------- decode text (decode.js) ---------- */

.decoding { position: relative; color: transparent !important; }

.decode-overlay {
    position: absolute;
    inset: 0;
    color: var(--o-ink);
    white-space: pre;
    overflow: hidden;
    pointer-events: none;
}

/* ---------- Omni's orb: reactor canvas + mark (reactor.js) ---------- */

.orb {
    position: relative;
    display: grid;
    place-items: center;
}

.orb canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.orb .orb-fallback { display: none; }
.orb.no-gl .orb-fallback { display: grid; }

/* Console boot sequence (Home.razor, boot.js, decode.js) */

.boot { display: none; }

html[data-boot="run"] .boot {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: var(--o-canvas);
    animation: boot-out 500ms var(--o-ease) 1.9s forwards;
}

.boot-lines {
    display: grid;
    gap: 10px;
    justify-items: center;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--o-ink-2);
}

.boot-lines span {
    opacity: 0;
    transform: translateY(6px);
    animation: boot-in 360ms var(--o-ease) forwards;
    animation-delay: calc(var(--i) * 380ms);
}

.boot-lines span:first-child { font-size: 15px; color: var(--o-ink); letter-spacing: 0.32em; }
.boot-ok { color: var(--o-accent-ink); }

@keyframes boot-in { to { opacity: 1; transform: none; } }
@keyframes boot-out { to { opacity: 0; visibility: hidden; } }

/* ---------- charts (Components/Charts): plain HTML bars, tokens only ----------
   Series tones: accent blue, a lighter accent, amber, neutral grey, amber hatching. Blue, amber and grey stay apart for the
   common colour-vision deficiencies, and series also differ by position or pattern. Every bar is a button. */

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

.chart { margin: 0; min-width: 0; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.chart-title { font-size: 13px; font-weight: 600; color: var(--o-ink); }
.chart-summary { margin: 2px 0 10px; font-size: 12px; line-height: 1.45; color: var(--o-ink-2); }
.chart .legend { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--o-ink-2); }
.chart .key { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.swatch--goal { height: 0; border-top: 2px dashed var(--o-ink-2); border-radius: 0; }
.swatch--marker { height: 2px; background: var(--o-ink); border-radius: 1px; }

.t-accent { background: var(--o-accent); }
.t-accent-soft { background: oklch(from var(--o-accent) l c h / 0.38); }
.t-warn { background: var(--o-warn); }
.t-neutral { background: var(--o-line-strong); }
.t-hatched {
    background: repeating-linear-gradient(135deg, var(--o-warn) 0 3px, oklch(from var(--o-warn) l c h / 0.35) 3px 6px);
}

/* columns */
.plot { position: relative; height: var(--h, 150px); margin-left: 40px; }
.plot .grid { position: absolute; inset: 0 0 22px 0; pointer-events: none; }
.plot .tick { position: absolute; left: 0; right: 0; border-top: 1px solid var(--o-line); }
.plot .tick span {
    position: absolute; right: calc(100% + 6px); top: -7px;
    font-family: var(--o-mono); font-size: 10.5px; color: var(--o-ink-3); white-space: nowrap;
}
.plot .goal-wrap { position: absolute; inset: 0 0 22px 0; pointer-events: none; z-index: 1; }
.plot .goal { position: absolute; left: 0; right: 0; border-top: 2px dashed var(--o-ink-2); }
.plot .goal span {
    position: absolute; right: 0; top: -17px; padding: 0 4px;
    font-family: var(--o-mono); font-size: 10.5px; color: var(--o-ink-2); background: var(--o-surface);
}
.cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; }
.col {
    position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; min-width: 0;
    padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer;
    transition: background-color 160ms var(--o-ease);
}
.col:disabled { cursor: default; }
.col.on { background: var(--o-accent-soft); }
@media (hover: hover) and (pointer: fine) { .col:hover:not(:disabled) { background: var(--o-accent-soft); } }
.col:active:not(:disabled) .bars { transform: scaleY(0.98); }
.col:focus-visible { outline-offset: 0 !important; }
.col.dim .bars { opacity: 0.55; }
.bars { transform-origin: bottom; transition: transform 120ms var(--o-ease); }
.bars { position: relative; flex: 1; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding: 0 10%; }
.bars--stacked .stack { display: flex; flex-direction: column; flex: 1 1 0; max-width: 34px; border-radius: 3px 3px 0 0; overflow: hidden; }
.bars--stacked .seg { min-height: 2px; }
.bars--stacked .seg + .seg { border-top: 1px solid var(--o-surface); }
.bars--side .bar { display: block; flex: 1 1 0; max-width: 22px; border-radius: 3px 3px 0 0; }
.bars .marker { position: absolute; left: 18%; right: 18%; height: 2px; margin-bottom: -1px; background: var(--o-ink); border-radius: 1px; }
/* A marker above the axis (a month whose forecast dwarfs the rest) is drawn as a caret at the top, not allowed to set the scale. */
.bars .marker.clipped { left: calc(50% - 5px); right: auto; height: 0; margin-bottom: 0; background: none; border-radius: 0;
    border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 6px solid var(--o-ink); }
.bars .whisker { position: absolute; left: 50%; width: 0; border-left: 1.5px solid var(--o-ink-2); }
.col-label {
    display: block; height: 22px; line-height: 22px; text-align: center;
    font-family: var(--o-mono); font-size: 10.5px; color: var(--o-ink-3); white-space: nowrap; overflow: hidden;
}
.col.on .col-label { color: var(--o-ink); font-weight: 600; }

/* horizontal bars */
.hbars { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.hbar {
    display: grid; grid-template-columns: minmax(90px, 132px) minmax(0, 1fr) 64px; align-items: center; gap: 10px;
    width: 100%; min-height: 34px; padding: 4px 6px; border: 0; border-radius: 6px; background: transparent;
    color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color 160ms var(--o-ease);
}
.hbar:disabled { cursor: default; }
.hbar.on { background: var(--o-accent-soft); }
@media (hover: hover) and (pointer: fine) { .hbar:hover:not(:disabled) { background: var(--o-accent-soft); } }
.hbar:active:not(:disabled) .track { transform: scaleX(0.985); }
.hbar-label { display: grid; min-width: 0; line-height: 1.25; }
.hbar-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-sub { font-family: var(--o-mono); font-size: 11px; color: var(--o-ink-3); }
.track { position: relative; height: 14px; transform-origin: left; transition: transform 120ms var(--o-ease); }
.track .total { position: absolute; left: 0; top: 0; bottom: 0; display: flex; justify-content: flex-end; border-radius: 3px; overflow: hidden; min-width: 2px; }
.track .flag { height: 100%; }
.track .part { position: absolute; left: 0; top: 3px; bottom: 3px; border-radius: 2px; min-width: 2px; }
.hbar-value { display: grid; text-align: right; font-family: var(--o-mono); font-size: 12px; line-height: 1.2; color: var(--o-ink); }
.hbar-part { font-size: 11px; color: var(--o-accent-ink); }

.chart-table { margin-top: 8px; font-size: 12px; }
.chart-table summary { width: max-content; cursor: pointer; color: var(--o-ink-3); font-size: 11.5px; }
.chart-table summary:hover { color: var(--o-ink-2); }
.chart-table table { width: 100%; margin-top: 6px; border-collapse: collapse; }
.chart-table th, .chart-table td { padding: 4px 6px; border-bottom: 1px solid var(--o-line); text-align: left; font-weight: 400; }
.chart-table thead th { color: var(--o-ink-3); font-family: var(--o-mono); font-size: 11px; }
.chart-table .num { text-align: right; font-family: var(--o-mono); }

@media (max-width: 520px) {
    .plot { margin-left: 34px; }
    .hbar { grid-template-columns: minmax(80px, 104px) minmax(0, 1fr) 56px; gap: 8px; }
}

/* SmartChart (Chart.js): a card with title, one-line takeaway, the canvas and the numbers as a table. */
.schart { margin: 0; padding: 16px 18px 12px; border: 1px solid var(--o-line); border-radius: var(--o-radius); background: var(--o-surface); min-width: 0; }
.schart--inset { padding: 14px 18px; border: 0; border-radius: 0; background: transparent; }
.schart-actions { display: inline-flex; gap: 8px; }
.schart.is-closed .schart-actions { visibility: hidden; }
/* The body folds by its row (1fr to 0fr): the eye follows it and the canvas keeps its size, so Chart.js never redraws from zero. */
.schart-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 220ms var(--o-ease, ease-out); }
.schart-inner { min-height: 0; overflow: hidden; }
.schart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; }
.schart-title { font-size: 15px; font-weight: 650; color: var(--o-ink); }
.schart-summary { margin: 4px 0 12px; font-size: 12.5px; line-height: 1.45; color: var(--o-ink-3); max-width: 70ch; }
.schart-plot { position: relative; width: 100%; }
.schart-empty { margin: 18px 0; font-size: 13px; color: var(--o-ink-3); }
.schart-table { margin-top: 8px; font-size: 12px; }
.schart-table summary { cursor: pointer; color: var(--o-ink-3); width: fit-content; }
.schart-table table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.schart-table th, .schart-table td { padding: 4px 8px; border-bottom: 1px solid var(--o-line); text-align: left; }
.schart-table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Folding panels and charts: the header stays, everything else hides. The chevron points down when open. */
.fold { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.fold:focus-visible { outline: 2px solid var(--o-focus); outline-offset: 3px; border-radius: 4px; }
.fold--icon { width: 26px; height: 26px; justify-content: center; border-radius: 6px; flex: none; }
.fold--icon:hover { background: var(--o-surface-2); }
.fold-chevron { width: 8px; height: 8px; border-right: 1.75px solid var(--o-ink-3); border-bottom: 1.75px solid var(--o-ink-3); transform: translateY(-2px) rotate(45deg); transition: transform 220ms var(--o-ease, ease-out); }
.is-closed .fold-chevron { transform: rotate(-45deg); }
.schart.is-closed .schart-body { grid-template-rows: 0fr; }
.schart.is-closed { padding-bottom: 14px; }
.panel.is-closed > :not(.panel-head) { display: none; }
@media (prefers-reduced-motion: reduce) { .fold-chevron, .schart-body { transition: none; } }

/* PM → Data check prints its report from an off-screen frame (datacheck.js); the frame itself never shows. */
.dc-print-frame { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; }

/* ---------- View as (VIEWAS-1): the bar that says whose eyes you're using ----------
   Amber, not blue: blue means action and live state here, and this is a caution that lasts the whole session. The ink
   (--o-on-warn) is dark on both themes because the amber fill is light in both. The shell (MainLayout) and the command
   screen move down by its height. */
html:has(.viewas) { --o-viewas-h: 40px; }

.viewas {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: var(--o-viewas-h, 40px);
    padding: 6px 16px;
    background: var(--o-warn);
    color: var(--o-on-warn);
    font-size: 13.5px;
    line-height: 1.2;
}

.viewas-mark { display: grid; place-items: center; flex: none; }
.viewas-text { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewas-text strong { font-weight: 700; }
.viewas-stop { margin: 0; flex: none; }

.viewas-stop button {
    min-height: 28px;
    padding: 0 14px;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 150ms var(--o-ease), color 150ms var(--o-ease), transform 120ms var(--o-ease);
}

.viewas-stop button:hover { background: var(--o-on-warn); color: var(--o-warn); }
.viewas-stop button:active { transform: scale(0.97); }
/* The app's blue focus ring (!important, above) vanishes on amber: this one is the bar's ink. */
.viewas-stop button:focus-visible { outline: 2px solid var(--o-on-warn) !important; outline-offset: 2px !important; }

/* Phones keep who and read-only; only the end time gives way. */
@media (max-width: 600px) {
    .viewas { justify-content: space-between; }
    .viewas-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .viewas-stop button { transition: none; }
    .viewas-stop button:active { transform: none; }
}

@media (forced-colors: active) {
    .viewas { forced-color-adjust: none; background: Mark; color: MarkText; border-bottom: 1px solid CanvasText; }
    .viewas-stop button { border-color: MarkText; }
    .viewas-stop button:focus-visible { outline-color: MarkText !important; }

    /* Confirmations: the system colors flatten the fills, so the dialog and both buttons get edges, the action keeps
       a Highlight fill and keyboard focus a CanvasText ring that shows on every background. */
    .mud-dialog.o-confirm { border-color: CanvasText; }
    .o-confirm-facts, .o-confirm-avatar { border-color: CanvasText; }
    .o-confirm-actions .mud-button-root { border: 1px solid ButtonText !important; }
    .o-confirm-actions .o-confirm-go { forced-color-adjust: none; background: Highlight !important; color: HighlightText !important; border-color: Highlight !important; }
    .o-confirm-actions .mud-button-root:focus-visible { outline: 2px solid CanvasText !important; outline-offset: 2px !important; }
}

/* ---------- confirmations (ConfirmDialog.razor) ----------
   One face for every "are you sure": the action as a small label, what it acts on, the facts as a short list and a
   button that names the action. Filled blue for an ordinary step, filled red when something is lost. */

.mud-dialog.o-confirm {
    border: 1px solid var(--o-line);
    border-radius: 12px;
    background: var(--o-surface);
    color: var(--o-ink);
    box-shadow: var(--o-shadow);
    animation: o-confirm-in 180ms var(--o-ease);
}

@keyframes o-confirm-in {
    from { opacity: 0; transform: translateY(4px) scale(0.97); }
}

.o-confirm-body { padding: 24px 24px 4px !important; }

.o-confirm-head { display: flex; align-items: center; gap: 14px; }
.o-confirm-heading { min-width: 0; }

.o-confirm-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--o-line);
    border-radius: 50%;
    background: var(--o-surface-2);
    color: var(--o-ink);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.o-confirm-eyebrow { margin-bottom: 2px; }

.o-confirm-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--o-ink);
    overflow-wrap: anywhere;
}

.o-confirm-detail {
    margin-top: 2px;
    font-size: 13px;
    color: var(--o-ink-2);
    overflow-wrap: anywhere;
}

.o-confirm-message { margin: 16px 0 0; color: var(--o-ink-2); max-width: 60ch; }

.o-confirm-facts {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--o-line);
    list-style: none;
}

.o-confirm-facts li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.o-confirm-facts .o-confirm-fact-icon { margin-top: 1px; color: var(--o-ink-3); font-size: 18px !important; }

.o-confirm-actions { gap: 8px; padding: 20px 24px 20px !important; }
.o-confirm-actions .mud-button-root { min-height: 36px; padding: 0 16px; border-radius: 8px; font-weight: 600; margin: 0 !important; }
.o-confirm-actions .mud-button-root:active { transform: scale(0.97); }
.o-confirm-actions .mud-button-root { transition: transform 160ms var(--o-ease), background-color 150ms var(--o-ease); }

.o-confirm-cancel { color: var(--o-ink-2) !important; }

/* Filled with the system's action tokens: the label stays readable (AA) in both themes. */
.o-confirm--primary .o-confirm-go { background: var(--o-action) !important; color: var(--o-on-action) !important; }
.o-confirm--primary .o-confirm-go:hover { background: var(--o-action-hover) !important; }
.o-confirm--danger .o-confirm-go { background: var(--o-danger) !important; color: var(--o-on-action) !important; }
.o-confirm--danger .o-confirm-go:hover { background: oklch(from var(--o-danger) calc(l - 0.05) c h) !important; }
.o-confirm--danger .o-confirm-go:focus-visible { outline-color: var(--o-danger) !important; }

/* Phones: full-width buttons, the action on top within thumb reach. */
@media (max-width: 480px) {
    .o-confirm-body { padding: 20px 20px 4px !important; }
    .o-confirm-actions { flex-direction: column-reverse; align-items: stretch; padding: 16px 20px 20px !important; }
    .o-confirm-actions .mud-button-root { min-height: 44px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .mud-dialog.o-confirm { animation: none; }
    .o-confirm-actions .mud-button-root:active { transform: none; }
}

/* Sales: Omni's floating pill (SalesVoiceHome, docked) sits over the page's end; this keeps the last row scrollable past it. */
@media (min-width: 768px) {
    main.content:has(.vh--docked) { padding-bottom: 104px; }
}

/* ===================================================================================================================
   Page kit rules (2026-11-13, phase 2):
   1. Order: header (title, one-sentence description; freshness and live status on the right, .o-head-status) → scorecards
      (only when they are the page's questions; then they ARE the views, never alongside .o-views; a strip that sums up what
      the toolbar picked, as Sprints' and Fleet events', goes right after the toolbar instead) → toolbar → result line →
      content → anything else (insights, charts, AI briefs) under the content.
   2. Toolbar order: views (.o-views) first, then search, then filters (.o-filters), then .o-toolbar-end
      (Group by, tools). Many filters: .o-filters--row (their own line).
   3. Counted quick filters are FilterChip (with Dot for a severity), everywhere.
   5. Sub-pages (separate addresses: Sales sections, Fleet Kiosks/Events, Rules sets, Access sections) are .o-tabs, one row
      under the header, before scorecards and toolbar. .o-views is only for views of the same list (List, By account, Map).
   4. One verb to undo filters: "Clear all" (ResultLine, EmptyState). Empty and error states say why (EmptyState, PageState).
   ===================================================================================================================
   Page kit (2026-11-13): one anatomy for every page. Header (OmniHeader) → scorecards (.o-scores) → toolbar (.o-toolbar:
   views, search, filters, group by) → result line → content (with empty and error states). The definitions are the ones
   Projects, Sprints, Sales and Support had each copied into their own scoped CSS, said once here; a page moved to the kit
   uses these and deletes its copy. Components: Scorecards/Scorecard, SearchBox, FilterSelect, FilterChip, ResultLine,
   EmptyState (Components/). Motion: state only (hover 160 ms, press 120 ms), one curve: --o-ease.
   =================================================================================================================== */

/* ---------- header status (in OmniHeader's Actions) ---------- */
.o-head-status { display: grid; justify-items: end; gap: 4px; text-align: right; }
.o-statusline { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--o-ink-2); }
.o-scope { font-size: 11px; color: var(--o-ink-3); }

/* ---------- buttons ---------- */
.o-btn {
    display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 16px;
    border: 1px solid var(--o-line-strong); border-radius: 999px; background: var(--o-surface); color: var(--o-ink);
    font: inherit; font-size: 13px; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: border-color 160ms var(--o-ease), transform 120ms var(--o-ease);
}
.o-btn:active:not(:disabled) { transform: scale(0.97); }
.o-btn:disabled { opacity: 0.45; cursor: default; }
.o-btn--primary { border-color: var(--o-action); background: var(--o-action); color: var(--o-on-action); font-weight: 600; }
/* quiet: a secondary action that should not compete (accent text, no fill); warn and danger: the action itself is the risk */
.o-btn--quiet { border-color: transparent; background: transparent; color: var(--o-accent-ink); }
.o-btn--warn { border-color: oklch(from var(--o-warn) l c h / 0.6); background: oklch(from var(--o-warn) l c h / 0.12); color: var(--o-warn-ink); }
.o-btn--danger { border-color: var(--o-danger); background: var(--o-danger); color: var(--o-on-action); font-weight: 600; }
.o-btn--danger-quiet { border-color: oklch(from var(--o-danger) l c h / 0.5); color: var(--o-danger); } /* a destructive action that is not the main one (Revoke, Discard) */
.o-link { padding: 0; border: 0; background: none; color: var(--o-accent-ink); font: inherit; font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- scorecards: label on top, mono number, a sub-line; a button when it filters ---------- */
.o-scores {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); overflow: hidden;
    border: 1px solid var(--o-line); border-radius: var(--o-radius); background: var(--o-surface);
}
/* hairlines drawn by each tile (right and bottom; the strip clips the outer ones), so a row that isn't full ends clean
   instead of showing a grey block where a tile would be */
.o-scores > .o-score { box-shadow: 1px 1px 0 var(--o-line); }
.o-score {
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0;
    padding: 14px 16px 16px; border: 0; background: var(--o-surface); color: var(--o-ink); font: inherit; text-align: left;
}
button.o-score { justify-content: flex-start; text-align: left; cursor: pointer; transition: background-color 160ms var(--o-ease), box-shadow 160ms var(--o-ease); }
@media (hover: hover) and (pointer: fine) { button.o-score:hover:not(:disabled) { background: var(--o-surface-2); } }
button.o-score:active:not(:disabled) { background: oklch(from var(--o-accent) l c h / 0.1); }
button.o-score:disabled { cursor: default; }
button.o-score:disabled .o-score-value { color: var(--o-ink-3); }
button.o-score:focus-visible { outline-offset: -2px; }
/* Selected: a light tint and an accent rule along the strip's baseline, not a heavy fill. */
.o-score.on { background: oklch(from var(--o-accent) l c h / 0.06); box-shadow: inset 0 -2px 0 var(--o-accent), 1px 1px 0 var(--o-line); }
.o-score.on .o-score-label { color: var(--o-accent-ink); }
.o-score-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--o-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--o-ink-3); }
.o-score-value { font-family: var(--o-mono); font-size: 28px; font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
.o-score--warn .o-score-value { color: var(--o-warn-ink); }
.o-score--risk .o-score-value { color: var(--o-danger); }
.o-score-sub { display: grid; gap: 2px; font-size: 12px; line-height: 1.4; color: var(--o-ink-2); }
.o-score-value { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; }
.o-score-of { font-size: 0.6em; color: var(--o-ink-3); }
.o-score-unit { font-size: 12px; font-weight: 400; color: var(--o-ink-2); letter-spacing: 0; }

/* ---------- toolbar: views, search, filters, group by ---------- */
.o-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.o-views { display: inline-flex; flex-wrap: wrap; padding: 3px; border: 1px solid var(--o-line-strong); border-radius: 999px; background: var(--o-surface); }
.o-view {
    display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--o-ink-2);
    font: inherit; font-size: 12.5px; cursor: pointer;
    transition: background-color 160ms var(--o-ease), color 160ms var(--o-ease), transform 120ms var(--o-ease);
}
.o-view:active:not(:disabled) { transform: scale(0.97); }
.o-view.on { background: var(--o-accent-soft); color: var(--o-accent-ink); font-weight: 600; }
.o-view:disabled { opacity: 0.45; cursor: default; }
/* ---------- tabs: sub-pages, real links; underline, one row that scrolls sideways on a phone (phase 3) ---------- */
.o-tabs { display: flex; gap: 2px; max-width: 100%; margin: 0 0 18px; border-bottom: 1px solid var(--o-line); overflow-x: auto; scrollbar-width: none; }
.o-tabs::-webkit-scrollbar { display: none; }
.o-tab {
    flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px;
    font-size: 13.5px; color: var(--o-ink-2); text-decoration: none; white-space: nowrap;
    box-shadow: inset 0 -2px 0 transparent; transition: color 160ms var(--o-ease), box-shadow 160ms var(--o-ease);
}
.o-tab.on { color: var(--o-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--o-accent); }
.o-tab b { font-family: var(--o-mono); font-weight: 500; font-size: 11.5px; color: var(--o-ink-3); }
.o-tab:focus-visible { outline: 2px solid var(--o-accent); outline-offset: -2px; } /* the row scrolls: a ring outside would be clipped */
@media (hover: hover) and (pointer: fine) { .o-tab:hover:not(.on) { color: var(--o-ink); } }
/* a phone can't fit every tab: the right edge fades so the last one reads as "more this way" */
@media (max-width: 480px) { .o-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } }

a.o-view { display: inline-flex; align-items: center; text-decoration: none; } /* tabs that are links */
.o-view b { font-family: var(--o-mono); font-weight: 500; font-size: 11.5px; }
.o-find-wrap { position: relative; display: inline-flex; flex: 1 1 260px; max-width: 360px; }
.o-find {
    width: 100%; height: 36px; padding: 0 36px 0 14px;
    border: 1px solid var(--o-line-strong); border-radius: 999px; background: var(--o-surface); color: var(--o-ink);
    font: inherit; font-size: 13px; transition: border-color 160ms var(--o-ease);
}
.o-find::placeholder { color: var(--o-ink-3); opacity: 1; }
.o-find:focus-visible { border-color: var(--o-accent); }
.o-find-key { position: absolute; top: 50%; right: 10px; translate: 0 -50%; pointer-events: none; }
.o-find:focus ~ .o-find-key, .o-find:not(:placeholder-shown) ~ .o-find-key { display: none; }
@media (hover: none) { .o-find-key { display: none; } } /* no keyboard, no "/" */
/* The select keeps the browser's list (keyboard, type-ahead, the phone's own picker); only its face is ours. */
.o-pick-wrap { position: relative; display: inline-flex; max-width: 220px; }
.o-pick {
    appearance: none; width: 100%; height: 34px; padding: 0 30px 0 12px;
    border: 1px solid var(--o-line-strong); border-radius: 999px; background: var(--o-surface); color: var(--o-ink-2);
    font: inherit; font-size: 12.5px; text-overflow: ellipsis; cursor: pointer; transition: border-color 160ms var(--o-ease);
}
.o-pick-wrap::after {
    content: ""; position: absolute; top: 50%; right: 11px; width: 10px; height: 10px; translate: 0 -50%;
    background: var(--o-ink-3); pointer-events: none;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 3.5 5 7l3.5-3.5' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.o-pick-wrap.on .o-pick { border-color: var(--o-accent); background: var(--o-accent-soft); color: var(--o-ink); font-weight: 600; }
.o-pick-wrap.on::after { background: var(--o-accent-ink); }
.o-pick:focus-visible { border-color: var(--o-accent); }
.o-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
    border: 1px solid var(--o-line-strong); border-radius: 999px; background: transparent; color: var(--o-ink-2);
    font: inherit; font-size: 12.5px; cursor: pointer;
    transition: border-color 160ms var(--o-ease), background-color 160ms var(--o-ease), transform 120ms var(--o-ease);
}
/* Body font with tabular figures: at chip size JetBrains Mono's dotted zero made "10" read as "18" (Customers, 2026-11-17). */
.o-chip b { font-variant-numeric: tabular-nums; font-weight: 600; }
.o-chip:active:not(:disabled) { transform: scale(0.97); }
.o-chip.on { border-color: var(--o-accent); color: var(--o-ink); background: var(--o-accent-soft); }
.o-chip:disabled { opacity: 0.45; cursor: default; }
.o-toolbar-sep { width: 1px; height: 22px; background: var(--o-line-strong); }
.o-fresh { margin-left: auto; font-size: 11.5px; color: var(--o-ink-2); }
/* Group by (and freshness) sit at the toolbar's right end, whatever wraps before them */
.o-toolbar-end { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.o-filters { display: contents; }
/* many filters: their own line under the views and search, wrapping as a group (Support) */
.o-filters--row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-basis: 100%; }
.o-filters-toggle { display: none; } /* phones only */

/* a severity dot before a chip's label (FilterChip Dot): counted quick filters look the same on every page */
.o-chip-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--o-ink-3); }
.o-chip-dot--danger { background: var(--o-danger); }
.o-chip-dot--warn { background: var(--o-warn); }
.o-chip-dot--live { background: var(--o-live); }
.o-chip-dot--accent { background: var(--o-accent); }
/* hollow: there but not answering (Fleet's offline kiosks) */
.o-chip-dot--ring { background: oklch(from var(--o-danger) l c h / 0.12); box-shadow: inset 0 0 0 2px oklch(from var(--o-danger) l c h / 0.7); }

/* ---------- state card (PageState): an error with Try again, not connected, nothing at all ---------- */
.o-state { max-width: 600px; padding: 28px 0; }
.o-state h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--o-ink); }
.o-state p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--o-ink-2); }
.o-state--error h2 { color: var(--o-danger); }
.o-state h2 { display: flex; align-items: center; gap: 8px; }

/* ---------- result line, empty state ---------- */
.o-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 12.5px; color: var(--o-ink-2); }
.o-result strong { color: var(--o-ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.o-result-filter {
    display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border: 0; border-radius: 999px;
    background: var(--o-surface-2); color: var(--o-ink); font: inherit; font-size: 12px; cursor: pointer;
    transition: background-color 160ms var(--o-ease);
}
.o-result-filter span { color: var(--o-ink-3); }
@media (hover: hover) and (pointer: fine) { .o-result-filter:hover { background: var(--o-accent-soft); } }
.o-empty { padding: 28px 0; }
.o-empty p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--o-ink-2); }

@media (max-width: 720px) {
    .o-scores { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* every number in one look, no sideways swipe */
    .o-score { padding: 12px 14px 14px; }
    .o-score-value { font-size: 22px; }
    .o-head-status { justify-items: start; text-align: left; }
    .o-find-wrap { max-width: none; }
    .o-toolbar-sep { display: none; }
    .o-toolbar-end { margin-left: 0; }
    .o-filters-toggle { display: inline-flex; }
    .o-views { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; } /* one row that scrolls, never a two-row oval */
    .o-toolbar:has(.o-filters-toggle) .o-filters { display: none; }
    .o-toolbar:has(.o-filters-toggle) .o-filters--open, .o-filters--open { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
    .o-filters--open .o-pick-wrap { flex: 1 1 100%; max-width: none; }
    .o-chip, .o-pick, .o-btn, .o-find { min-height: 40px; } /* thumb-sized on touch */
}
/* hover (a mouse only), on and small buttons, touch sizing on any touch screen (2026-11-13: the pages' own rules for these went
   with their copies of the kit) */
@media (hover: hover) and (pointer: fine) {
    .o-chip:hover:not(:disabled):not(.on), .o-find:hover, .o-pick:hover, .o-btn:hover:not(:disabled):not(.on):not(.o-btn--primary) { border-color: var(--o-ink-3); }
    .o-view:hover:not(:disabled):not(.on) { color: var(--o-ink); }
    .o-btn--primary:hover:not(:disabled) { background: var(--o-action-hover); }
}
.o-btn.on { border-color: var(--o-accent); background: var(--o-accent-soft); }
.o-btn--sm { min-height: 28px; padding: 0 12px; font-size: 12px; }
@media (pointer: coarse) { .o-chip, .o-pick, .o-btn, .o-view, .o-find { min-height: 40px; } }
@media (prefers-reduced-motion: reduce) {
    .o-btn, .o-view, .o-chip, button.o-score { transition: none; }
    .o-btn:active, .o-view:active, .o-chip:active { transform: none; }
}

/* ---------- The floating button (CEO pilot 4.7, OmniTrigger.razor) ----------
   Surface colour with a hairline, not a filled blue disc: blue stays for the page's one main action. It appears with no transition
   once the Spotlight has registered (html.omni-ready, assistant.js). Above a page drawer (20) so he can ask about the record the
   drawer shows; under dialogs and the Spotlight (1400). */
.omni-fab {
    display: none; position: fixed; right: 24px; bottom: var(--omni-fab-bottom, 24px); z-index: 25;
    width: 44px; height: 44px; padding: 0; place-items: center; border: 1px solid var(--o-line-strong); border-radius: 999px;
    background: var(--o-canvas); color: var(--o-ink); cursor: pointer;
    box-shadow: var(--o-float);
    transition: transform 120ms var(--o-ease), border-color 150ms var(--o-ease), opacity 150ms var(--o-ease), visibility 150ms var(--o-ease);
}
html.omni-ready .omni-fab { display: grid; }
html.omni-ready .omni-fab[data-hide] { display: none; }
/* while the Spotlight is open; behind the phone menu drawer (nav.js makes .main inert); one button while a modal drawer has its own */
html.spotlight-open .omni-fab, .main[inert] .omni-fab { display: none; }
html:has([aria-modal="true"] .omni-fab--dialog) .omni-fab--layout { display: none; }
.omni-fab:active { transform: scale(0.97); }
.omni-fab:focus-visible { outline: 2px solid var(--o-focus); outline-offset: 2px; }
.omni-fab-tip {
    position: absolute; right: 0; bottom: calc(100% + 8px); padding: 4px 8px; border-radius: 6px; background: var(--o-ink); color: var(--o-canvas);
    font: 500 12px/16px var(--o-font); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 125ms var(--o-ease);
}
.omni-fab:focus-visible .omni-fab-tip { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
    .omni-fab:hover { border-color: var(--o-accent); }
    .omni-fab:hover .omni-fab-tip { opacity: 1; transition-delay: 400ms; }
}
@media (max-width: 640px) {
    .omni-fab { width: 48px; height: 48px; right: 16px; bottom: calc(var(--omni-fab-bottom, 16px) + env(safe-area-inset-bottom)); }
    .omni-fab-tip { display: none; }
    /* a field has focus: the on-screen keyboard would push the button over it. Fades, so nothing jumps */
    html.omni-typing .omni-fab { opacity: 0; visibility: hidden; }
}
@media print { .omni-fab { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .omni-fab, .omni-fab-tip { transition: none; } .omni-fab:active { transform: none; } }

/* ---------- The Spotlight on a page (CEO pilot 4.4 and 5A): the chip, "On this page", and a page answer ----------
   Global, not scoped: AssistantConsole and PageReplyView both draw these. Lists and ledger rows, no tiles, no bubbles. */
.ac-chip {
    display: inline-flex; align-items: center; gap: 2px; flex: none; max-width: 42%; height: 30px; padding: 0 2px 0 10px;
    border: 1px solid oklch(from var(--o-accent) l c h / 0.35); border-radius: 999px; background: var(--o-accent-soft); color: var(--o-accent-ink);
    font: 500 13px/1 var(--o-font); white-space: nowrap;
}
.ac-chip-text { overflow: hidden; text-overflow: ellipsis; }
.ac-chip-x {
    display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer;
    transition: background-color 150ms var(--o-ease), transform 120ms var(--o-ease);
}
.ac-chip-x:active { transform: scale(0.94); }
.ac-chip-x:focus-visible { outline: 2px solid var(--o-focus); outline-offset: 1px; }
@media (hover: hover) and (pointer: fine) { .ac-chip-x:hover { background: oklch(from var(--o-accent) l c h / 0.15); } }

.pa { display: grid; gap: 4px; }
.pa-head { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.pa-label { font: 600 11px/16px var(--o-font); letter-spacing: 0.06em; text-transform: uppercase; color: var(--o-ink-3); }
.pa-page { font: 600 13px/16px var(--o-font); color: var(--o-ink-2); }
.pa-fact { margin: 2px 0 6px; font-size: 14px; line-height: 20px; color: var(--o-ink); font-variant-numeric: tabular-nums; }
.pa-asof { color: var(--o-ink-3); }
.pa-list { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.pa-item {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; padding: 8px 12px; border-radius: 10px;
    color: var(--o-ink); font-size: 15px; line-height: 20px; cursor: pointer; user-select: none;
}
.pa-item.is-hl { background: var(--o-accent-soft); }
.pa-item:active { transform: scale(0.99); }
/* the pointer's highlight is CSS (no server round trip per row); the keyboard's is .is-hl, and the pointer wins while it is over the list */
@media (hover: hover) and (pointer: fine) {
    .pa-item:hover { background: var(--o-accent-soft); }
    .pa-list:hover .pa-item.is-hl:not(:hover) { background: transparent; }
}
.pa-text { min-width: 0; }
.pa-hint { flex: none; font-size: 12px; color: var(--o-ink-3); white-space: nowrap; }
.pa-sep { padding: 10px 12px 2px; }
.pa-tip { margin: 8px 0 0; padding: 0 12px; font-size: 12px; color: var(--o-ink-3); }

.pr { display: grid; gap: 10px; }
.pr-slot { display: grid; gap: 8px; align-content: center; min-height: 48px; }
.pr-sentence { margin: 0; min-height: 48px; max-width: 60ch; font-size: 17px; line-height: 24px; font-weight: 500; color: var(--o-ink); text-wrap: pretty; }
.pr-sentence--in { animation: pr-in 220ms var(--o-ease); }
.pr-lead { margin: 0; align-self: center; font-size: 15px; line-height: 22px; color: var(--o-ink-2); }
.pr-sentence--earlier { min-height: 0; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--o-ink-2); }
.pr-proof { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--o-line); list-style: none; }
.pr-proof li { display: grid; gap: 1px; padding: 7px 0; font-size: 13px; line-height: 19px; color: var(--o-ink-2); }
.pr-proof li + li { border-top: 1px solid oklch(from var(--o-line) l c h / 0.5); }
.pr-src { font-size: 12px; line-height: 16px; font-weight: 400; color: var(--o-ink-3); }
.pr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-btn {
    min-height: 36px; padding: 0 14px; border: 1px solid var(--o-line-strong); border-radius: 999px; background: var(--o-surface); color: var(--o-ink);
    font: 500 13px/1 var(--o-font); cursor: pointer; transition: border-color 150ms var(--o-ease), transform 120ms var(--o-ease);
}
.pr-btn--quiet { border-color: transparent; background: transparent; color: var(--o-accent-ink); }
.pr-btn:active { transform: scale(0.97); }
.pr-btn:focus-visible, .pr-link:focus-visible { outline: 2px solid var(--o-focus); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .pr-btn:hover { border-color: var(--o-accent); } .pr-link:hover { text-decoration-color: currentColor; } }
.pr-next { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; font-size: 13px; line-height: 20px; }
.pr-next-label { color: var(--o-ink-3); }
.pr-link {
    padding: 0; border: 0; background: none; color: var(--o-accent-ink); font: inherit; cursor: pointer;
    text-decoration: underline; text-underline-offset: 3px; text-decoration-color: oklch(from var(--o-accent-ink) l c h / 0.35);
}
.pr-foot { margin: 0; font-size: 12px; line-height: 16px; color: var(--o-ink-3); }
.pr-note { margin: 0; font-size: 15px; line-height: 22px; color: var(--o-ink-2); }
.pr-sk { display: block; height: 12px; border-radius: 6px; background: var(--o-surface-2); animation: pr-pulse 1.8s ease-in-out infinite; }
.pr-sk--long { width: 92%; }
.pr-sk--short { width: 56%; }
.pr-proof--sk { display: grid; gap: 10px; padding: 10px 0 4px; border-top: 1px solid var(--o-line); }
.pr-proof--sk .pr-sk { width: 78%; height: 10px; }
.ac-turn--earlier .ac-q { font-size: 12px; }
@keyframes pr-in { from { opacity: 0; transform: translateY(2px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@media (max-width: 640px) {
    .pr-btn { min-height: 44px; }
    .pr-link { padding: 12px 0; margin: -12px 0; }
}
@keyframes pr-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .pr-sentence--in, .pr-sk { animation: none; }
    .pr-btn, .ac-chip-x { transition: none; }
    .pr-btn:active, .ac-chip-x:active { transform: none; }
}
