/* SPDX-License-Identifier: EUPL-1.2 */
/* SPDX-FileCopyrightText: 2026 Tumen Sony */

/* ── Lexaidos design tokens ──────────────────────────────── */
:root {
    --lx-surface-base: var(--omni-color-surface);
    --lx-surface-raised: var(--omni-color-surface-muted);
    --lx-surface-overlay: var(--omni-color-surface-hover);
    --lx-surface-sunken: var(--omni-color-border);
    --lx-accent-primary: var(--omni-color-accent);
    --lx-accent-secondary: var(--omni-color-accent-strong);
    --lx-accent-success: var(--omni-color-success);
    --lx-accent-warning: var(--omni-color-warning);
    --lx-accent-danger: var(--omni-color-danger);
    --lx-accent-info: var(--omni-color-info);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* PLAN-002 lot 13: the page base (surface, text, font) from the OmniEurope.Blazor tokens, for
   what renders outside the theme scope (boot screen, error bar). */
body {
    background: var(--omni-color-surface);
    color: var(--omni-color-text);
    font-family: var(--omni-font-family);
}

/* F-105: global focus-visible -- visible focus ring for keyboard users,
   suppressed for mouse/touch clicks (browser handles the heuristic). */
:focus-visible {
    outline: 0.125rem solid var(--omni-color-accent);
    outline-offset: 0.125rem;
}

:focus:not(:focus-visible) {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 0.0625rem solid #26b050;
}

.invalid {
    outline: 0.0625rem solid red;
}

.validation-message {
    color: red;
    font-size: 0.875rem;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -0.0625rem 0.125rem rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* ── Layout ──────────────────────────────────────────── */

.layout-root {
    position: relative;
}

/* PLAN-002 lot 3: the shell fills the window, header on top, the body takes the rest and the main
   area is the one vertical scroll (OmniMain Scrollable). */
.lx-theme-scope {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.lx-theme-scope > .layout-root {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
.lx-theme-scope > .layout-root > .omni-body {
    flex: 1 1 auto;
    min-height: 0;
}

.layout-brand-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.layout-spacer {
    flex-grow: 1;
}

.sidebar-portrait {
    position: absolute;
    z-index: 100;
}

.sidebar-backdrop {
    position: absolute;
    z-index: 99;
}

/* ── Compliance Chat ─────────────────────────────────── */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.chat-msg-user {
    text-align: right;
}

.chat-msg-assistant {
    text-align: left;
}

.chat-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.chat-sidebar {
    width: 16rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-main {
    flex: 1;
    min-width: 0;
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-conv-item .chat-conv-open {
    flex: 1;
    justify-content: flex-start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-conv-item-active {
    background: var(--omni-color-surface-hover);
    border-radius: var(--omni-radius);
}

.chat-typing {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
}

.chat-typing span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--omni-color-text-muted);
    animation: chat-typing-pulse 1.2s infinite ease-in-out;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chat-typing-pulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    40% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 48rem) {
    .chat-layout {
        flex-direction: column;
    }

    .chat-sidebar {
        width: 100%;
    }
}

/* ── PII alert (#14) ──────────────────────────────────── */

.pii-preview {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.5rem;
    border-radius: var(--omni-radius);
    background: var(--omni-color-surface-muted);
    font-size: 0.875rem;
}

.pii-highlight {
    background: var(--omni-color-warning);
    color: var(--omni-color-text);
    border-radius: 0.2rem;
    padding: 0 0.15rem;
}

.pii-alert-enter {
    animation: pii-fade-in 0.25s ease-out;
}

@keyframes pii-fade-in {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Chat layout helpers (extracted inline styles, #16/[C13]) ── */

.chat-card {
    height: 28rem;
    display: flex;
    flex-direction: column;
}

.chat-muted {
    color: var(--omni-color-text-muted);
}

.chat-msg-text {
    white-space: pre-wrap;
}

.chat-input-row {
    padding: 0.5rem;
}

.chat-input-box {
    flex: 1;
}

/* ════════════════════════════════════════════════════════════════════
   A.4 -- Responsive foundation (mobile-first), ADR-018
   Breakpoints (rem, CLAUDE.md mandates rem):
     mobile   < 48rem          (< 768px)   -- base rules, touch-first
     tablet   48rem – 64rem    (768–1024px)
     desktop  > 64rem          (> 1024px)
   Convention: mobile-first. Base declarations target mobile; min-width
   queries layer tablet/desktop. Project utility prefix: lx-
   (omni- = OmniEurope.Blazor -- lx- avoids collision).
   ════════════════════════════════════════════════════════════════════ */

/* F-111: Desktop buttons min-height 2.75rem -- consistent touch/click target
   across all viewports, not just mobile. */

/* ── Touch targets -- WCAG 2.5.5 / ADR-018 ≥ 44px (2.75rem) on mobile ── */
@media (max-width: 47.999rem) {
    .lx-touch {
        min-height: 2.75rem;
    }
}

/* ── Typography scale (F-02) ─────────────────────────────── */
.lx-page-title   { font-size: 1.875rem; font-weight: 600; line-height: 1.2; margin: 0; }
.lx-section-title { font-size: 1.125rem; font-weight: 600; line-height: 1.3; margin: 0; }
.lx-label         { font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; }

/* ── Compact KPI cards (F-01) ────────────────────────────── */
.lx-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.lx-kpi-row > * { flex: 1 1 0; min-width: 8rem; }
.lx-kpi-card {
    padding: 0.75rem 1rem;
    text-align: center;
}
.lx-kpi-value {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
}

/* ── Text utilities ──────────────────────────────────────── */
.lx-text-secondary { color: var(--omni-color-text-muted); }
.lx-text-disabled  { color: var(--omni-color-text-muted); }
.lx-text-primary   { color: var(--omni-color-accent); }
.lx-text-info      { color: var(--omni-color-info); }
.lx-text-success   { color: var(--omni-color-success); }
.lx-text-warning   { color: var(--omni-color-warning); }
.lx-text-danger    { color: var(--omni-color-danger); }
.lx-text-center    { text-align: center; }
.lx-text-right     { text-align: right; }
.lx-fw-600         { font-weight: 600; }

/* Phase 3 L113 -- shorthand `.lx-muted` for muted/secondary text and
   layout primitives (lx-stack/lx-row/lx-row-between) used >60×
   throughout pages. Older `.lx-text-*` kept as aliases for
   compatibility. */
.lx-muted          { color: var(--omni-color-text-muted); }
.lx-stack          { display: flex; flex-direction: column; gap: 0.5rem; }
.lx-stack-sm       { display: flex; flex-direction: column; gap: 0.25rem; }
.lx-stack-lg       { display: flex; flex-direction: column; gap: 1rem; }
.lx-row            { display: flex; align-items: center; gap: 0.5rem; }
.lx-row-wrap       { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lx-row-between    { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.lx-row-end        { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; }
.lx-row-start      { display: flex; align-items: flex-start; gap: 0.5rem; }
.lx-gap-0          { gap: 0; }
.lx-gap-sm         { gap: 0.25rem; }
.lx-gap-md         { gap: 0.5rem; }
.lx-gap-lg         { gap: 1rem; }

/* ── Sizing utilities ────────────────────────────────────── */
.lx-w-full { width: 100%; }
.lx-minw-9 { min-width: 9rem; }
.lx-h-full { height: 100%; }
.lx-flex-1 { flex: 1; }
.lx-flex-1-min16 { flex: 1; min-width: 16rem; }
.lx-progress-tall { height: 1.25rem; }
.lx-progress-thin { height: 0.5rem; }

/* ── Links / misc ────────────────────────────────────────── */
.lx-link-plain { text-decoration: none; color: inherit; }
.lx-pointer { cursor: pointer; }
.lx-pos-relative { position: relative; }
.lx-break-all { word-break: break-all; }
.lx-fst-italic { font-style: italic; }
.lx-text-uppercase { text-transform: uppercase; }

/* ── Width-capped, centred form column (mobile-first) ────── */
.lx-form        { width: 100%; max-width: 32rem; }
.lx-form-narrow { width: 100%; max-width: 25rem; }
.lx-form-wide   { width: 100%; max-width: 38rem; }

/* ── Dropdown / field width caps (yield to viewport on mobile) */
.lx-dd-org   { min-width: 9rem; max-width: 14rem; }
.lx-dd-20    { min-width: 20rem; }
.lx-dd-w-10  { width: 10rem; }
.lx-dd-w-8   { width: 8rem; }
.lx-mw-32    { max-width: 32rem; }

@media (max-width: 47.999rem) {
    .lx-dd-org,
    .lx-dd-20,
    .lx-dd-w-10,
    .lx-dd-w-8 {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
}

/* ── Bounded scroll panels ───────────────────────────────── */
.lx-scroll-24 { max-height: 24rem; overflow-y: auto; }
.lx-scroll-30 { max-height: 30rem; overflow-y: auto; }
.lx-scroll-10 { max-height: 10rem; overflow-y: auto; }

/* ── Responsive visibility ───────────────────────────────── */
.lx-only-mobile { display: none; }

@media (max-width: 47.999rem) {
    .lx-hide-mobile { display: none !important; }
    .lx-only-mobile { display: block; }
}

/* Phase 3 L133 -- opposite of lx-hide-mobile: only hide when *desktop*. */
@media (min-width: 48rem) {
    .lx-hide-desktop { display: none !important; }
}

/* ── Mobile card-list -- replaces complex tables for the 4
      targeted mobile-first workflows (ADR-018) ──────────── */
.lx-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lx-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    min-height: 2.75rem;
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    background-color: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Hover affordance -- only on devices that actually hover (hides on touch) */
@media (hover: hover) {
    .lx-card-row:hover {
        background-color: var(--omni-color-surface-muted);
        border-color: var(--omni-color-border);
    }

    .lx-card-row--clickable {
        cursor: pointer;
    }

    .lx-card-row--clickable:hover {
        box-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.08);
    }
}

/* Phase 3 L119 -- explicit dark-mode overrides for `.lx-card-row`.
   In the dark theme the plain border token sits close to the
   background, which makes the row border vanish on phone OLEDs. We
   bump the border-tone via a higher contrast token + flatten the hover
   shadow (a black shadow against a black background is invisible). */
html[data-omni-theme="dark"] .lx-card-row {
    border-color: var(--omni-color-text-muted);
}

@media (hover: hover) {
    html[data-omni-theme="dark"] .lx-card-row:hover {
        background-color: var(--omni-color-surface-hover);
        border-color: var(--omni-color-text-muted);
    }

    html[data-omni-theme="dark"] .lx-card-row--clickable:hover {
        box-shadow: 0 0.0625rem 0.25rem rgba(255, 255, 255, 0.06);
    }
}

.lx-card-row-main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lx-card-row-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Multi-line text block -- preserves authored line breaks
      (regulatory alert / declaration bodies, D.3/D.4) ─────── */
.lx-prewrap {
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── KPI grid -- cabinet consolidated dashboard (C.2) ─────── */
.lx-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.75rem;
}

.lx-col-compliance {
    width: 6rem;
    flex: 0 0 auto;
}

/* ── Notification button, badge, panel ───────────────────── */
.lx-notif-btn { position: relative; }

.lx-notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.65rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
}

/* PLAN-003 lot 1: the panel lives in an OmniPopover anchored on the bell, never wider than the screen. */
.lx-notif-panel {
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(24rem, calc(100dvh - 6rem));
    overflow-y: auto;
}

.lx-notif-item { padding: 0.5rem; margin-bottom: 0.25rem; }
.lx-notif-item--unread { border-left: 0.1875rem solid var(--omni-color-accent); }

/* ── Cabinet branding / white-label (C.4) ────────────────── */
/* The --lx-brand-* custom properties are set at runtime by
   layout.js applyBranding(), which also puts `.lx-branded` on body.
   PLAN-002: the brand colours replace the OE accent tokens inside the
   theme scope (the scope re-declares the tokens, so the override has
   to sit on it); an un-branded shell keeps the OE palette. */
body.lx-branded [data-omni-theme] {
    --omni-color-accent: var(--lx-brand-primary);
    --omni-color-accent-strong: var(--lx-brand-secondary, var(--lx-brand-primary));
    --omni-color-accent-fill: var(--lx-brand-primary);
    --omni-color-accent-fill-hover: color-mix(in srgb, var(--lx-brand-primary) 88%, #000);
    --omni-color-accent-fill-active: color-mix(in srgb, var(--lx-brand-primary) 76%, #000);
    --omni-color-on-accent: var(--lx-brand-on-primary);
    --omni-color-on-accent-fill: var(--lx-brand-on-primary);
    --omni-loading-bar-color: var(--lx-brand-primary);
}

body.lx-branded a.lx-brand-link {
    color: var(--lx-brand-primary, inherit);
}

.lx-brand-logo {
    height: 1.75rem;
    max-width: 12rem;
    object-fit: contain;
    display: block;
}

.lx-brand-icon {
    height: 1.75rem;
    width: 1.75rem;
    margin-right: 0.5rem;
}

.lx-brand-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--omni-color-text);
}

.lx-login-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.lx-login-icon {
    height: 2.5rem;
    width: 2.5rem;
}

.lx-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--omni-color-text);
}

.lx-brand-logo-preview {
    max-height: 5rem;
    max-width: 16rem;
    object-fit: contain;
    border-radius: var(--omni-radius);
}

.lx-dns-record {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    word-break: break-all;
    background: var(--omni-color-surface-hover);
    border-radius: var(--omni-radius);
    padding: 0.4rem 0.6rem;
}

/* Bloc F.1 -- read-only YAML/JSON block on the community library
   detail page. Keeps long lines wrapped on mobile, monospace on every
   width so author-supplied indentation is preserved visually. */
.lx-yaml-block {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--omni-color-surface-hover);
    color: var(--omni-color-text);
    border-radius: var(--omni-radius);
    padding: 0.6rem 0.8rem;
    margin: 0;
    max-height: 32rem;
    overflow: auto;
}

/* ════════════════════════════════════════════════════════════════════
   Phase 3 Lot B -- Indicators, badges, pulses, hero hierarchy.
   Goal: one palette across the app (severity / status / mode / quality
   / profile) so cabinet, regulator, and tenant views share visual
   vocabulary. All variants are token-driven (--omni-*) so dark mode
   inherits automatically.
   ════════════════════════════════════════════════════════════════════ */

/* L125 / L136 -- pulse animations. `lx-pulse` is loud (renewals),
   `lx-pulse-soft` is calm (active timer). Both respect prefers-reduced-motion. */
@keyframes lx-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes lx-pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.78; }
}

.lx-pulse {
    animation: lx-pulse 1.5s ease-in-out infinite;
}

.lx-pulse-soft {
    animation: lx-pulse-soft 2.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .lx-pulse,
    .lx-pulse-soft {
        animation: none;
    }
}

/* L146 -- unified chip palette. Single base + colour modifiers.
   Use the matching component (<SeverityChip>, <ProfileChip>, etc.)
   so legacy ad-hoc badges converge. */
.lx-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999rem;
    background: var(--omni-color-surface-hover);
    color: var(--omni-color-text);
    border: 0.0625rem solid transparent;
    white-space: nowrap;
}

.lx-chip .omni-icon,
.lx-chip i {
    font-size: 0.85rem;
    line-height: 1;
}

/* Severity -- D.3 alerts, regulatory notifications, controls */
.lx-chip--sev-critical { background: var(--omni-color-danger-subtle); color: var(--omni-color-danger); border-color: var(--omni-color-danger); }
.lx-chip--sev-high     { background: var(--omni-color-warning-subtle); color: var(--omni-color-warning); border-color: var(--omni-color-warning); }
.lx-chip--sev-medium   { background: var(--omni-color-info-subtle); color: var(--omni-color-info); border-color: var(--omni-color-info); }
.lx-chip--sev-low      { background: var(--omni-color-surface-hover); color: var(--omni-color-text-muted); border-color: var(--omni-color-border); }

/* Status -- D.4 declarations, D.1 supervised orgs, attestations */
.lx-chip--status-active   { background: var(--omni-color-success-subtle); color: var(--omni-color-success); border-color: var(--omni-color-success); }
.lx-chip--status-pending  { background: var(--omni-color-warning-subtle); color: var(--omni-color-warning); border-color: var(--omni-color-warning); }
.lx-chip--status-closed   { background: var(--omni-color-surface-hover); color: var(--omni-color-text-muted); border-color: var(--omni-color-border); }

/* Mode -- C.1/C.2 client cards (Single vs ConsultingFirm vs Regulator) */
.lx-chip--mode-single     { background: var(--omni-color-info-subtle); color: var(--omni-color-info); border-color: var(--omni-color-info); }
.lx-chip--mode-cabinet    { background: #ede7f6; color: #4527a0; border-color: #7e57c2; }
.lx-chip--mode-regulator  { background: #fff3e0; color: #bf360c; border-color: #ef6c00; }

/* Quality -- transpositions (Draft/Reviewed/Validated/Authoritative) */
.lx-chip--quality-authoritative { background: var(--omni-color-success-subtle); color: var(--omni-color-success); border-color: var(--omni-color-success); }
.lx-chip--quality-validated     { background: var(--omni-color-info-subtle); color: var(--omni-color-info); border-color: var(--omni-color-info); }
.lx-chip--quality-reviewed      { background: var(--omni-color-warning-subtle); color: var(--omni-color-warning); border-color: var(--omni-color-warning); }
.lx-chip--quality-draft         { background: var(--omni-color-surface-hover); color: var(--omni-color-text-muted); border-color: var(--omni-color-border); }

/* Profile -- regulations badge (DORA, AI Act, NIS2, EU Space Act) */
.lx-chip--profile-dora            { background: rgba(76,175,80,0.12); color: #1b5e20; border-color: rgba(76,175,80,0.45); }
.lx-chip--profile-ai-act          { background: rgba(156,39,176,0.12); color: #6a1b9a; border-color: rgba(156,39,176,0.45); }
.lx-chip--profile-nis2            { background: rgba(33,150,243,0.12); color: #0d47a1; border-color: rgba(33,150,243,0.45); }
.lx-chip--profile-eu-space-act    { background: rgba(123,31,162,0.12); color: #4a148c; border-color: rgba(123,31,162,0.45); }
.lx-chip--profile-generic         { background: var(--omni-color-surface-hover); color: var(--omni-color-text-muted); border-color: var(--omni-color-border); }

/* Phase 3 L135 -- category chip palette for time-tracking entries.
   Stays inside the unified .lx-chip family. */
.lx-chip--cat-review       { background: rgba(33,150,243,0.12);  color: #0d47a1; border-color: rgba(33,150,243,0.45); }
.lx-chip--cat-doc          { background: rgba(76,175,80,0.12);   color: #1b5e20; border-color: rgba(76,175,80,0.45); }
.lx-chip--cat-remediation  { background: rgba(255,167,38,0.12);  color: #8a4d00; border-color: rgba(255,167,38,0.45); }
.lx-chip--cat-meeting      { background: rgba(156,39,176,0.12);  color: #6a1b9a; border-color: rgba(156,39,176,0.45); }
.lx-chip--cat-training     { background: rgba(0,150,136,0.12);   color: #00695c; border-color: rgba(0,150,136,0.45); }
.lx-chip--cat-other        { background: var(--omni-color-surface-hover);     color: var(--omni-color-text-muted); border-color: var(--omni-color-border); }

/* L83 -- "renewed" indicator on re-uploaded evidence */
.lx-chip--renewed {
    background: var(--omni-color-success-subtle);
    color: var(--omni-color-success);
    border-color: var(--omni-color-success);
}

/* F-107: dark-mode overrides for hardcoded chip colours that bypass the
   theme tokens -- ensures ≥4.5:1 contrast ratio (WCAG AA) on dark backgrounds. */
html[data-omni-theme="dark"] .lx-chip--mode-cabinet    { background: rgba(149,117,205,0.2); color: #ce93d8; border-color: rgba(149,117,205,0.5); }
html[data-omni-theme="dark"] .lx-chip--mode-regulator  { background: rgba(239,108,0,0.2);   color: #ffb74d; border-color: rgba(239,108,0,0.5); }

html[data-omni-theme="dark"] .lx-chip--profile-dora         { background: rgba(76,175,80,0.2);   color: #81c784; border-color: rgba(76,175,80,0.5); }
html[data-omni-theme="dark"] .lx-chip--profile-ai-act       { background: rgba(156,39,176,0.2);  color: #ce93d8; border-color: rgba(156,39,176,0.5); }
html[data-omni-theme="dark"] .lx-chip--profile-nis2         { background: rgba(33,150,243,0.2);  color: #64b5f6; border-color: rgba(33,150,243,0.5); }
html[data-omni-theme="dark"] .lx-chip--profile-eu-space-act { background: rgba(123,31,162,0.2);  color: #ba68c8; border-color: rgba(123,31,162,0.5); }

html[data-omni-theme="dark"] .lx-chip--cat-review      { background: rgba(33,150,243,0.2);  color: #64b5f6; border-color: rgba(33,150,243,0.5); }
html[data-omni-theme="dark"] .lx-chip--cat-doc         { background: rgba(76,175,80,0.2);   color: #81c784; border-color: rgba(76,175,80,0.5); }
html[data-omni-theme="dark"] .lx-chip--cat-remediation { background: rgba(255,167,38,0.2);  color: #ffb74d; border-color: rgba(255,167,38,0.5); }
html[data-omni-theme="dark"] .lx-chip--cat-meeting     { background: rgba(156,39,176,0.2);  color: #ce93d8; border-color: rgba(156,39,176,0.5); }
html[data-omni-theme="dark"] .lx-chip--cat-training    { background: rgba(0,150,136,0.2);   color: #4db6ac; border-color: rgba(0,150,136,0.5); }

/* F-12: subdued descriptive badge -- text-only, no coloured background.
   Use for labels that classify but don't require action (programme codes,
   action types, categories). Keeps visual noise low so status badges stand out. */

/* L124 -- hover emphasis for clickable canonical badges */
.lx-hover-emphasis {
    transition: filter 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) {
    .lx-hover-emphasis:hover {
        filter: brightness(1.08) saturate(1.1);
        transform: scale(1.04);
    }
}

/* L150 -- hero hierarchy for the 4-card risk prediction dashboard.
   First card occupies more visual weight (primary signal); siblings
   share equal weight (secondary signals). */
.lx-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 48rem) {
    .lx-hero-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
}

.lx-hero-card {
    padding: 1rem;
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    background: var(--omni-color-surface);
}

.lx-hero-card--primary {
    border-color: var(--omni-color-accent);
    background: linear-gradient(135deg, var(--omni-color-accent-subtle), transparent);
}

.lx-hero-card--success { border-color: var(--omni-color-success); }
.lx-hero-card--warning { border-color: var(--omni-color-warning); }
.lx-hero-card--danger  { border-color: var(--omni-color-danger); }

/* ════════════════════════════════════════════════════════════════════
   Phase 3 Lot F -- Mobile-first refinements.
   ════════════════════════════════════════════════════════════════════ */

/* L115 -- mode chip in the org switcher header takes too much width on
   narrow portrait screens; hide it under 36rem (576px). The full mode
   stays visible in the dropdown items themselves. */
@media (max-width: 35.999rem) {
    .lx-mode-badge-header {
        display: none !important;
    }
}

/* L127 -- sticky header on the evidence renewal list so the count
   stays visible while scrolling on mobile. */
@media (max-width: 47.999rem) {
    .lx-renewal-sticky {
        position: sticky;
        top: 0;
        z-index: 5;
        background: var(--omni-color-surface);
        padding: 0.5rem 0;
        border-bottom: 0.0625rem solid var(--omni-color-border);
    }
}

/* L133 -- floating action button. Positioned bottom-right on mobile,
   inline on tablet/desktop. Touch target ≥ 3rem. */
.lx-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 47.999rem) {
    .lx-fab {
        position: fixed;
        right: calc(env(safe-area-inset-right, 0px) + 1rem);
        bottom: calc(env(safe-area-inset-bottom, 0px) + 1rem);
        z-index: 950; /* below the notification stack (1100) but above the page. */
        width: 3.25rem;
        height: 3.25rem;
        border-radius: 50%;
        box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.18);
    }
    .lx-fab .omni-icon {
        font-size: 1.5rem;
    }
}

/* Phase 3 L95 -- compliance delta arrow on cabinet dashboard rows. */
.lx-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.05rem 0.4rem;
    border-radius: 999rem;
}

.lx-delta--up    { background: var(--omni-color-success-subtle); color: var(--omni-color-success); }
.lx-delta--down  { background: var(--omni-color-danger-subtle);    color: var(--omni-color-danger); }
.lx-delta--flat  { background: var(--omni-color-surface-hover);                color: var(--omni-color-text-muted); }

/* Phase 3 L139 -- sparkline SVG row chart. Inline SVG sized in rem
   (height ~1.5rem) so it fits flush in a cabinet row without pushing
   the layout. */
.lx-sparkline {
    width: 5rem;
    height: 1.5rem;
    display: inline-block;
    vertical-align: middle;
    overflow: visible;
}

/* Phase 3 L73 -- touch-friendly action button (min-height 2.75rem = 44px Apple HIG).
   Replaces the inline style="min-height: 2.75rem; min-width: 9rem;" sprinkled
   across attestation action buttons (CLAUDE.md: no inline CSS). */
.lx-touch-action {
    min-height: 2.75rem;
    min-width: 9rem;
}

/* Phase 3 L112 -- utilities replacing 20+ inline style="..." sites.
   Each class encodes one specific layout/colour intent so the next
   reviewer can name it instead of inventing a fresh px value. */

/* Colored icons (used in CabinetDashboard KPI tiles + active timer indicator). */
.lx-icon--primary { color: var(--omni-color-accent); }
.lx-icon--success { color: var(--omni-color-success); }
.lx-icon--danger  { color: var(--omni-color-danger); }
.lx-icon--warning { color: var(--omni-color-warning); }
.lx-icon--info    { color: var(--omni-color-info); }

/* Icon aligned with adjacent inline text (e.g. "● active timer"). */
.lx-icon--inline  { vertical-align: middle; }

/* Form-field width buckets (CommunityLibrary/Contribution filters). */
.lx-formfield-min-8  { min-width: 8rem; }
.lx-formfield-min-10 { min-width: 10rem; }
.lx-formfield-min-14 { min-width: 14rem; }
.lx-formfield-grow-1 { min-width: 14rem; flex: 1; }
.lx-formfield-grow-2 { min-width: 14rem; flex: 2; }

/* Fixed-width 14rem field (EvidenceRenewal filter dropdown). */
.lx-w-14 { width: 14rem; }

/* Compact tappable button (~40px target, used inside dense tables). */
.lx-touch-action-sm { min-height: 2.5rem; }

/* "Modified by" indicator icon -- small + aligned with adjacent text. */
.lx-indicator-icon {
    font-size: 0.85rem;
    vertical-align: middle;
}

/* QR-code image (2FA setup). Pixelated rendering preserves the
   crisp module edges on hi-DPI screens. */
.lx-qr-img {
    width: 12rem;
    height: 12rem;
    image-rendering: pixelated;
    background: #fff;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

/* L137 / L91 -- nav menu badge anchored on a panel-menu row */
.lx-nav-badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 0 0.4rem;
    min-width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ════════════════════════════════════════════════════════════════════
   Phase 3 Lot H -- UX micro-wins (post Phase 3 polish):
   - L111: cohesive alert style for AccessDenied / future 429 toast.
   - L72:  subtle "enable push" pill near the bell.
   - L134: illustrated empty state component <LxEmptyState>.
   - L158: rate-limit countdown toast (counts down "Retry in Ns").
   - Lot E hero-card variants extended with `--info`.
   ════════════════════════════════════════════════════════════════════ */

/* L111 -- alert-cohesive: matches the rate-limit toast palette so the
   shell feels consistent across all "blocked" surfaces (AccessDenied,
   429 toast, plan-gated banners). */
.lx-alert-cohesive {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
    border: 0.0625rem solid var(--omni-color-warning);
    border-left-width: 0.25rem;
    border-radius: var(--omni-radius);
    background: var(--omni-color-warning-subtle);
    color: var(--omni-color-warning);
}

.lx-alert-cohesive--info {
    border-color: var(--omni-color-info);
    background: var(--omni-color-info-subtle);
    color: var(--omni-color-info);
}

.lx-alert-cohesive--danger {
    border-color: var(--omni-color-danger);
    background: var(--omni-color-danger-subtle);
    color: var(--omni-color-danger);
}

.lx-alert-cohesive .lx-alert-cohesive-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.lx-alert-cohesive .lx-alert-cohesive-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

/* L134 -- empty states render OmniEmptyState (PLAN-002 lot 2): the package draws them. */

/* L72 -- push affordance pill. Inline, subtle, dismissable. Sits next
   to the bell when the device supports push, permission is not denied,
   and the user is not yet subscribed. The pill is hidden on screens
   under 36rem to keep the header compact on phones; the
   /account/notification-settings page is the canonical opt-in surface
   then. */
.lx-push-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    border-radius: 999rem;
    background: var(--omni-color-info-subtle);
    color: var(--omni-color-info);
    border: 0.0625rem solid var(--omni-color-info);
    transition: filter 0.15s ease;
    margin-right: 0.25rem;
}

.lx-push-pill:hover {
    filter: brightness(1.05);
}

.lx-push-pill .omni-icon,
.lx-push-pill i {
    font-size: 0.9rem;
}

.lx-push-pill .lx-push-pill-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.lx-push-pill-dismiss {
    color: inherit;
    padding: 0 0 0 0.25rem;
}

@media (max-width: 35.999rem) {
    .lx-push-pill {
        display: none;
    }
}

/* Phase 3 L102 -- inline YAML preview block. Monospaced, scrollable,
   capped height so it never pushes content below the fold. */
/* Phase 3 L98 -- template control list preview. Tight, scannable. */
.lx-control-preview {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 18rem;
    overflow-y: auto;
}

.lx-control-preview-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--omni-radius);
    font-size: 0.85rem;
}

.lx-control-preview-row:nth-child(even) {
    background: var(--omni-color-surface-muted);
}

.lx-control-preview-id {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    color: var(--omni-color-text);
    min-width: 6rem;
}

.lx-control-preview-resp {
    color: var(--omni-color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Phase 3 L104 -- side-by-side diff for Divergence E.1. */
.lx-diff-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

@media (min-width: 48rem) {
    .lx-diff-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.lx-diff-col {
    padding: 0.5rem 0.75rem;
    border-radius: var(--omni-radius);
    border: 0.0625rem solid var(--omni-color-border);
}

.lx-diff-col--before {
    background: var(--omni-color-surface-muted);
}

.lx-diff-col--after {
    background: var(--omni-color-info-subtle);
    border-color: var(--omni-color-info);
}

/* Phase 3 L108 -- risk prediction 6-axis radar (pure SVG). */
.lx-radar-wrap {
    display: flex;
    justify-content: center;
}

.lx-radar {
    width: 16rem;
    max-width: 100%;
    height: auto;
}

.lx-radar-ring {
    fill: none;
    stroke: var(--omni-color-border);
    stroke-width: 0.5;
}

.lx-radar-axis {
    stroke: var(--omni-color-border);
    stroke-width: 0.5;
}

.lx-radar-label {
    font-size: 0.6rem;
    fill: var(--omni-color-text-muted);
}

/* Phase 3 L88 -- share creation wizard step indicator. */
.lx-wizard-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lx-wizard-step {
    flex: 1;
    min-width: 8rem;
    padding: 0.5rem 0.75rem;
    background: var(--omni-color-surface-muted);
    color: var(--omni-color-text-muted);
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
}

.lx-wizard-step--active {
    background: var(--omni-color-accent-subtle);
    color: var(--omni-color-accent-strong);
    border-color: var(--omni-color-accent);
}

.lx-wizard-step--done {
    background: var(--omni-color-success-subtle);
    color: var(--omni-color-success);
    border-color: var(--omni-color-success);
}

.lx-summary-row {
    display: flex;
    gap: 1rem;
    padding: 0.35rem 0;
    border-bottom: 0.0625rem dashed var(--omni-color-border);
}

.lx-summary-key {
    flex: 0 0 12rem;
    color: var(--omni-color-text-muted);
    font-weight: 600;
}

.lx-summary-val {
    flex: 1;
    color: var(--omni-color-text);
    word-break: break-word;
}

/* Phase 3 L84 -- inline evidence diff. */
.lx-diff-inline {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    background: var(--omni-color-surface-muted);
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    padding: 0.5rem 0.75rem;
    margin-top: 0.35rem;
    max-height: 16rem;
    overflow: auto;
}

.lx-diff-line {
    white-space: pre-wrap;
    padding: 0.1rem 0;
}

.lx-diff-line--Added {
    color: var(--omni-color-success);
    background: var(--omni-color-success-subtle);
}

.lx-diff-line--Removed {
    color: var(--omni-color-danger);
    background: var(--omni-color-danger-subtle);
}

.lx-diff-line--Context {
    color: var(--omni-color-text-muted);
}

/* Phase 3 L144 -- SHA-256 / content hash chip on the public regulator page. */
.lx-hash-chip-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
    font-size: 0.78rem;
}

.lx-hash-chip-label {
    color: var(--omni-color-text-muted);
    font-weight: 500;
}

.lx-hash-chip {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    background: var(--omni-color-surface-muted);
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    padding: 0.1rem 0.4rem;
    color: var(--omni-color-text);
    cursor: help;
}

/* Phase 3 L99 -- branding live preview mockup. The CSS variables are
   set via the previewBranding JS helper so the colours track form
   pickers without a save. */
.lx-branding-preview {
    --lx-preview-primary: #1976d2;
    --lx-preview-secondary: #455a64;
    --lx-preview-font: system-ui, sans-serif;
    font-family: var(--lx-preview-font);
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    overflow: hidden;
    background: var(--omni-color-surface);
}

.lx-branding-preview-header {
    background: var(--lx-preview-primary);
    color: #fff;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lx-branding-preview-logo {
    max-height: 1.5rem;
    width: auto;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0.25rem;
    padding: 0.1rem 0.25rem;
}

.lx-branding-preview-name {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.lx-branding-preview-cover {
    padding: 1rem 0.75rem;
    border-top: 0.25rem solid var(--lx-preview-secondary);
    background: var(--omni-color-surface-muted);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lx-branding-preview-cover-title {
    color: var(--lx-preview-primary);
    font-size: 1.05rem;
    font-weight: 600;
}

.lx-branding-preview-cover-sub {
    color: var(--omni-color-text-muted);
    font-size: 0.85rem;
}

.lx-branding-preview-cover-footer {
    margin-top: 0.5rem;
    color: var(--lx-preview-secondary);
    font-size: 0.75rem;
    border-top: 0.0625rem dashed var(--omni-color-border);
    padding-top: 0.35rem;
}

.lx-radar-shape {
    fill: var(--omni-color-danger);
    fill-opacity: 0.32;
    stroke: var(--omni-color-danger);
    stroke-width: 1;
    stroke-linejoin: round;
}

.lx-yaml-preview {
    font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.45;
    background: var(--omni-color-surface-muted);
    color: var(--omni-color-text);
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    padding: 0.75rem;
    max-height: 24rem;
    overflow: auto;
    white-space: pre;
    margin: 0;
}

/* ════════════════════════════════════════════════════════════════════
   Phase 4 Lot F -- Funding UX enhancements.
   ════════════════════════════════════════════════════════════════════ */

/* Character counter below textareas (items 2 + 3). */
.lx-char-counter {
    font-size: 0.8rem;
    color: var(--omni-color-text-muted);
    text-align: right;
    margin-top: 0.15rem;
}

.lx-char-counter--success { color: var(--omni-color-success); }
.lx-char-counter--danger { color: var(--omni-color-danger); }
.lx-char-counter--warning { color: var(--omni-color-warning); }

/* Auto-save indicator (item 7) */
.lx-autosave-indicator {
    font-size: 0.78rem;
    color: var(--omni-color-text-muted);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lx-autosave-indicator--visible {
    opacity: 1;
}

/* ── Funding status chip (Design item 1) ─────────────────── */
.lx-chip--funding-forthcoming { background: var(--omni-color-surface-hover); color: var(--omni-color-text-muted); border-color: var(--omni-color-border); }
.lx-chip--funding-open        { background: var(--omni-color-success-subtle); color: var(--omni-color-success); border-color: var(--omni-color-success); }
.lx-chip--funding-closing     { background: var(--omni-color-warning-subtle); color: var(--omni-color-warning); border-color: var(--omni-color-warning); }
.lx-chip--funding-closed      { background: var(--omni-color-danger-subtle); color: var(--omni-color-danger); border-color: var(--omni-color-danger); }

/* ── Score progress bar mini (Design item 4) ─────────────── */
.lx-score-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 5rem;
}

.lx-score-bar .omni-progress {
    height: 0.5rem;
    flex: 1;
    min-width: 3.5rem;
}

/* ── Risk probability gauge (S-DES-02) ──────────────────── */
.lx-risk-gauge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 6rem;
}

.lx-risk-gauge .omni-progress {
    height: 0.5rem;
    flex: 1;
    min-width: 4rem;
}

/* ── Beneficiary icon (Design item 5) ────────────────────── */
.lx-beneficiary-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: var(--omni-color-text-muted);
}

.lx-beneficiary-icon .omni-icon,
.lx-beneficiary-icon i {
    font-size: 1rem;
}

/* ── Checklist progress colored (Design item 8) ──────────── */

/* ── Last-edited indicator (Design item 10) ──────────────── */
.lx-last-edited {
    font-size: 0.75rem;
    color: var(--omni-color-text-muted);
    font-style: italic;
}

/* ════════════════════════════════════════════════════════════════════
   Design Items v2 -- surface/accent tokens, unsaved indicator, source
   tint, status pulse, probability bar, countdown badge.
   ════════════════════════════════════════════════════════════════════ */

/* Item 7 -- Centralized CSS custom properties (surface/accent tokens). */
:root {
    --lx-surface-base: var(--omni-color-surface);
    --lx-surface-subtle: var(--omni-color-surface-muted);
    --lx-surface-muted: var(--omni-color-surface-hover);
    --lx-surface-raised: var(--omni-color-surface-muted);
    --lx-accent-primary: var(--omni-color-accent);
    --lx-accent-info: var(--omni-color-info);
    --lx-accent-success: var(--omni-color-success);
    --lx-accent-warning: var(--omni-color-warning);
    --lx-accent-danger: var(--omni-color-danger);
}

html[data-omni-theme="dark"] {
    --lx-surface-base: var(--omni-color-surface);
    --lx-surface-subtle: var(--omni-color-surface-muted);
    --lx-surface-muted: var(--omni-color-surface-hover);
    --lx-surface-raised: var(--omni-color-surface-muted);
}

/* Item 1 -- Blinking unsaved dot on drafts page. */
@keyframes lx-unsaved-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.lx-unsaved-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--lx-accent-warning);
    animation: lx-unsaved-blink 1.4s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
    .lx-unsaved-dot {
        animation: none;
        opacity: 0.7;
    }
}

/* Item 2 -- Source tint for draft section cards. */
.lx-draft-card--ai {
    background: rgba(33, 150, 243, 0.06);
    border-left: 0.1875rem solid var(--lx-accent-info);
}

.lx-draft-card--manual {
    background: rgba(76, 175, 80, 0.06);
    border-left: 0.1875rem solid var(--lx-accent-success);
}

html[data-omni-theme="dark"] .lx-draft-card--ai {
    background: rgba(33, 150, 243, 0.1);
}

html[data-omni-theme="dark"] .lx-draft-card--manual {
    background: rgba(76, 175, 80, 0.1);
}

/* Diff panel -- AI proposed vs manual edit comparison. */
.lx-diff-panel {
    background: var(--omni-color-surface-hover);
    border: 1px solid var(--omni-color-border);
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    max-height: 18.75rem;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8125rem;
    line-height: 1.4;
}

html[data-omni-theme="dark"] .lx-diff-panel {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.lx-diff-lines {
    margin-top: 0.5rem;
}

.lx-diff-line {
    padding: 0.125rem 0.375rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.lx-diff-line--added {
    background: rgba(76, 175, 80, 0.15);
    border-left: 0.1875rem solid #4caf50;
}

.lx-diff-line--removed {
    background: rgba(244, 67, 54, 0.12);
    border-left: 0.1875rem solid #f44336;
    text-decoration: line-through;
    opacity: 0.7;
}

.lx-diff-line--same {
    opacity: 0.6;
}

html[data-omni-theme="dark"] .lx-diff-line--added {
    background: rgba(76, 175, 80, 0.2);
}

html[data-omni-theme="dark"] .lx-diff-line--removed {
    background: rgba(244, 67, 54, 0.18);
}

/* Item 3 -- Status badge pulse animation for UnderReview. */
@keyframes lx-status-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 167, 38, 0.5); }
    50% { box-shadow: 0 0 0 0.35rem rgba(255, 167, 38, 0); }
}

.lx-status-badge--under-review {
    animation: lx-status-pulse 2s ease-in-out infinite;
    border-radius: var(--omni-radius-pill);
}

/* Application timeline: steps not reached yet are muted. */
.lx-timeline-step--future {
    opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
    .lx-status-badge--under-review {
        animation: none;
    }
}

/* Item 9 -- Countdown badge for regulatory notifications. */
.lx-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.1rem 0.45rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 999rem;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.lx-countdown-badge--red {
    background: var(--omni-color-danger-subtle);
    color: var(--omni-color-danger);
    border: 0.0625rem solid var(--lx-accent-danger);
}

.lx-countdown-badge--orange {
    background: var(--omni-color-warning-subtle);
    color: var(--omni-color-warning);
    border: 0.0625rem solid var(--lx-accent-warning);
}

.lx-countdown-badge--green {
    background: var(--omni-color-success-subtle);
    color: var(--omni-color-success);
    border: 0.0625rem solid var(--lx-accent-success);
}

/* YAML diagnostics wrapper around the editor text area. */
.lx-yaml-editor-wrapper {
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    overflow: hidden;
}
.lx-yaml-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    background: var(--omni-color-surface-hover);
    border-bottom: 0.0625rem solid var(--omni-color-border);
}
html[data-omni-theme="dark"] .lx-yaml-editor-toolbar {
    background: var(--omni-color-surface-muted);
}
.lx-yaml-editor-body {
    position: relative;
}
.lx-yaml-textarea > textarea.omni-input {
    width: 100%;
    resize: vertical;
    font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    tab-size: 2;
    white-space: pre;
    overflow-x: auto;
}
.lx-yaml-errors {
    padding: 0.25rem 0.5rem;
    background: var(--omni-color-danger-subtle);
    border-top: 0.0625rem solid var(--omni-color-danger);
}
html[data-omni-theme="dark"] .lx-yaml-errors {
    background: rgba(211, 47, 47, 0.15);
}
.lx-yaml-error-line {
    color: var(--omni-color-danger);
}

/* ── Phase 12 -- Calendar grid for time-tracking weekly view ─── */
.lx-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}
@media (max-width: 48rem) {
    .lx-calendar-grid {
        grid-template-columns: 1fr;
    }
}
.lx-calendar-day {
    border: 0.0625rem solid var(--omni-color-border);
    border-radius: var(--omni-radius);
    min-height: 8rem;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.lx-calendar-day--today {
    border-color: var(--omni-color-accent);
    background: color-mix(in srgb, var(--omni-color-accent) 6%, transparent);
}
.lx-calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.25rem;
    border-bottom: 0.0625rem solid var(--omni-color-surface-hover);
    margin-bottom: 0.25rem;
}
.lx-calendar-entry {
    background: var(--omni-color-surface-hover);
    border-radius: var(--omni-radius);
    padding: 0.25rem 0.5rem;
}

/* Phase 13 W-UX-06 -- billable entries of the time-tracking calendar (OmniSchedulerAppointment.CssClass). */
.omni-scheduler__appointment.lx-scheduler-billable {
    border-inline-start: 0.1875rem solid var(--omni-color-success);
}

/* Command palette content rendered inside the command dialog. */
.lx-cmd-palette-results {
    max-height: 18rem;
    overflow-y: auto;
}
.lx-cmd-palette-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    width: 100%;
    text-align: left;
    color: var(--omni-color-text);
    font: inherit;
}
.lx-cmd-palette-item:hover,
.lx-cmd-palette-item:focus {
    background: var(--omni-color-surface-hover);
}
/* PLAN-002: push an element to the end of its flex row. */
.lx-ms-auto { margin-inline-start: auto; }

/* PLAN-002 lot 3: OmniEurope.Blazor shell. The page body keeps its former gutter; the header
   actions sit at the end of the app bar. */
.lx-page { padding: var(--omni-space-sm); }
@media (min-width: 40rem) {
    .lx-page { padding: var(--omni-space-lg); }
}
.lx-header-end { margin-inline-start: auto; min-width: 0; }
/* PLAN-003 lot 1: the sidebar at 15rem like Atlas and Bellwether; the longest French entry
   ("Bibliothèque communautaire", groups open) ends at 222px of 240, measured on 2026-10-03. */
#lx-sidebar.omni-sidebar { --omni-sidebar-width: 15rem; }
.lx-notif-panel__title { margin: 0; }
/* OEAPP-26: the "new version, reload" banner sits above the page, on the page's gutter. */
.lx-version-banner { margin: var(--omni-space-sm) var(--omni-space-sm) 0; }
@media (min-width: 40rem) {
    .lx-version-banner { margin: var(--omni-space-lg) var(--omni-space-lg) 0; }
}
