html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px 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;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

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

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #9F662D;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.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");
    }

code {
    color: #c02d76;
}

/* Inventory (Phase 1). Colors come from MudBlazor's palette variables so the
   Christman theme stays the single source of truth and dark mode follows for
   free - no literal hex values below. */
.cmdb-sidebar {
    /* Design pass (2026-09-11): the copper-tinted hairline token, not the
       palette's neutral divider - see the "CMDB visual language" block below,
       ".impeccable.md"'s translation table ("copper-tinted hairlines, not
       grey"). */
    border-right: 1px solid var(--cmdb-hairline);
}

.cmdb-facet-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
}

.cmdb-facet-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    /* Design pass (2026-09-11): the shared radius token, not a one-off 4px -
       see the "CMDB visual language" block below. */
    border-radius: var(--cmdb-radius-sm);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font: inherit;
    color: var(--mud-palette-text-primary);
}

.cmdb-facet-row:hover {
    background: var(--mud-palette-action-default-hover);
}

.cmdb-facet-row:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: -2px;
}

/* Selected state keyed off aria-pressed, not a class, matching .cmdb-chip
   below: the styling and the accessible state are then the same attribute and
   can never disagree. Only the five facet toggles carry it - "Show all" and
   "Show fewer" are actions with no pressed state. */
.cmdb-facet-row[aria-pressed="true"] {
    /* primary-hover is the palette's translucent primary, so the row tints
       rather than filling - the mockup's selected-filter treatment. */
    background: var(--mud-palette-primary-hover);
    color: var(--mud-palette-primary);
    font-weight: 600;
}

.cmdb-facet-name {
    /* wrapping behaviour is set further down, next to the layout it belongs to */
    min-width: 0;
}

.cmdb-facet-count {
    font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
    flex: 0 0 auto;
}

/* A host carrying more than one application is the whole point of the server
   facet - it is the only row that answers "what else goes down with this box".
   Emphasised rather than coloured: the count is data, not a warning. */
.cmdb-facet-shared {
    color: var(--mud-palette-text-primary);
    font-weight: 700;
}

.cmdb-facet-more {
    font-size: 0.75rem;
    color: var(--mud-palette-primary);
}

.cmdb-facet-row[aria-pressed="true"] .cmdb-facet-count {
    color: var(--mud-palette-primary);
}

.cmdb-mono {
    font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    /* Defect C (Phase 2 review, 2026-09-10): a long unbroken value here (a
       repo_url, azure_resource_id, secret_ref, host_identifier, ...) is one
       unbreakable token that can overflow its container - inside a CSS grid
       cell this painted over neighbouring fields rather than just widening a
       column, since grid tracks don't clip by default. overflow-wrap lets it
       break anywhere it must, as a last resort below word-break's normal
       boundaries. */
    overflow-wrap: anywhere;
}

.cmdb-kpi-value {
    font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.625rem;
    font-weight: 600;
    line-height: 1;
}

.cmdb-crit-critical { font-weight: 700; }
.cmdb-crit-high { font-weight: 600; }
.cmdb-crit-medium { font-weight: 400; }
.cmdb-crit-low { font-weight: 400; color: var(--mud-palette-text-secondary); }

/* Owners are names or full email addresses, and an unbounded column pushes the
   two columns right of it off screen. Wrap to at most two lines rather than
   ellipsizing on one, so 'Collin Browning' reads in full; the cell carries the
   whole value in a tooltip for the addresses that still overflow. */
.cmdb-owner {
    display: block;
    /* 15ch fits a full 'Firstname Lastname' on one line, which is what most
       owners are; the email addresses truncate and carry a tooltip. Wrapping
       was tried and read worse - it split names across two lines. */
    max-width: 15ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Inventory two-pane layout. The rail is a percentage of the available width
   with a hard floor, so it grows with the browser instead of stepping between
   breakpoint fractions - and long host identifiers get more room, not less,
   on a bigger screen. */
.cmdb-inventory-layout {
    display: grid;
    grid-template-columns: minmax(260px, 20%) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

@media (max-width: 959px) {
    .cmdb-inventory-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .cmdb-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--cmdb-hairline);
        padding-bottom: 16px;
    }
}

/* Application Detail (Phase 2). Same palette-token discipline as Inventory:
   no literal hex values, MudBlazor's palette variables only.

   Design pass (2026-09-11): the six cards' own ".cmdb-card-head" + MudPaper
   Elevation="1" pairing has been replaced by ".cmdb-panel" / ".cmdb-panel-head"
   (see the "CMDB visual language" block below) - the two rules were near-
   duplicates (same padding, same flex layout) differing only in a neutral
   divider vs. the copper-tinted hairline, and Elevation="1" is a drop shadow,
   which principle 4 rules out. Nothing needs its own rule here anymore. */

/* The Overview card's field grid. auto-fit/minmax rather than MudGrid's
   12ths or the mockup's fixed repeat(4, 1fr) - it degrades monotonically as
   the viewport narrows (four columns down to one) instead of stepping
   between fixed breakpoints, the same reason the Inventory two-pane layout
   uses a CSS grid instead of MudGrid. */
.cmdb-overview-grid {
    display: grid;
    /* min(200px, 100%) rather than a bare 200px floor: at a ~420px viewport the
       hard floor plus the container's padding made the grid 472px wide and the
       whole page scrolled sideways. min() lets the last column shrink instead. */
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 20px;
}

/* Grid items default to min-width: auto, which lets an unbreakable child
   (see .cmdb-mono above) force its track wider than the minmax() track size
   allows for - the other half of Defect C's overflow. min-width: 0 lets the
   track (and overflow-wrap inside it) actually win. */
.cmdb-overview-grid > div {
    min-width: 0;
}

/* Design pass (2026-09-11): the package category tag used to have its own
   ".cmdb-cat-tag" rule here, styled almost identically to ".cmdb-badge" below
   (same job - naming a fact quietly) but keyed to a different neutral
   surface. Migrated to ".cmdb-badge" so there is one quiet-naming-tag style
   in the app, not two that could drift apart. */

/* Facet names wrap instead of ellipsizing on one line: a host identifier cut to
   'com.christman.Copperworks.develo...' is not something you can act on. Two
   lines is the cap, because the real data contains a 100-character
   host_identifier that would otherwise make one row five lines tall - the
   button carries the full value as its title for those. */
.cmdb-facet-name {
    overflow-wrap: anywhere;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* The breadcrumb's trailing application name: wraps rather than pushing the
   page wider than the viewport. Names in the real data run to ~36 characters. */
.cmdb-breadcrumb-current {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Secret Expiration (Phase 3). Urgency is a distinct axis from Inventory's
   .cmdb-crit-* (which is the stored `criticality` column, not time-to-expiry),
   so it gets its own classes rather than reusing those - reusing them would
   have made a criticality-colored cell look like an expiry warning or vice
   versa. Colors come from MudBlazor's semantic palette tokens, the same
   discipline as everywhere else in this stylesheet. */
.cmdb-urgency-expired,
.cmdb-urgency-critical {
    color: var(--mud-palette-error);
    font-weight: 700;
}

.cmdb-urgency-warning {
    color: var(--mud-palette-warning-darken);
    font-weight: 600;
}

.cmdb-urgency-ok {
    color: var(--mud-palette-text-secondary);
    font-weight: 400;
}

.cmdb-timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

/* Managed-identity rows (no stored secret) are real rows, not secrets - the
   mockup renders its own equivalent row visually quieter than the secret
   rows around it, and this is that: reduced-emphasis text, no urgency color. */
.cmdb-quiet-row {
    color: var(--mud-palette-text-secondary);
}

/* Status is conveyed by an icon and its color, which a screen reader cannot
   see - each Status cell also carries the status as text, hidden visually
   but left in the accessibility tree. The clip-rect pattern (rather than
   display:none or visibility:hidden) is what keeps it announced. */
.cmdb-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The visible key for the Status column, so the icons don't have to be
   hovered one by one to be understood (hover reaches neither keyboard nor
   touch). Wraps rather than overflowing on a narrow viewport. */
.cmdb-status-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
    margin-bottom: 8px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.cmdb-status-legend-label {
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.cmdb-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Type / Vault holds hyphenated Key Vault names like "kv-AppSecretMonitor".
   Left alone, the column squeezed and the browser broke them at the hyphen
   and then mid-word ("kv-" / "AppSecretMonito" / "r"), which is unreadable
   and makes a real vault name look corrupted. Give the column room, keep
   each name on one line, and truncate with an ellipsis - the full value
   stays on the cell's title attribute. */
.cmdb-secret-table th:nth-child(5),
.cmdb-secret-table td:nth-child(5) {
    min-width: 200px;
}

.cmdb-secret-table .cmdb-coordinate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

/* "Expires on" and the state labels ("awaiting #2708", "not reconcilable")
   are short enough to read at a glance only while they stay on one line;
   wrapped onto two they read as two separate values. */
.cmdb-secret-table th:nth-child(6),
.cmdb-secret-table td:nth-child(6),
.cmdb-secret-table th:nth-child(7),
.cmdb-secret-table td:nth-child(7) {
    white-space: nowrap;
}

.cmdb-secret-table th:nth-child(7),
.cmdb-secret-table td:nth-child(7) {
    min-width: 132px;
}

/* ---- Dependency Graph (Phase 5) --------------------------------------------
   The diagram is inline SVG rendered from CmdbWebUi.Domain's
   DependencyGraphLayout output - see Shared/Diagram/README.md for why this is
   not a JS graph library. Styling stays inside the no-literal-hex discipline
   above: every fill/stroke below derives from a palette variable via the
   tokens already declared in the "CMDB visual language" block, none of them
   new literals.

   Deliberately MONOCHROME except the focus node. The mockup differentiates
   "Internal" vs. "External" edges/nodes by colour (its blue accent vs. a
   neutral grey); principle 2 (copper is rare on purpose - reserved for the
   active selection and the single most important state on a screen) rules
   that out here, since colouring every internal edge and node copper would
   be the opposite of rare on a graph that is mostly internal structure.
   Internal-vs-external is instead solid-vs-dashed stroke (works in
   monochrome, and is colour-blind safe in a way a red/green or blue/grey
   split is not); the ONE thing that gets the accent is the focus node -
   the single most important thing on this screen, the same restraint
   ".cmdb-badge-accent" already applies to the Prod environment tag
   elsewhere in this app. */
.cmdb-graph-node {
    fill: var(--mud-palette-surface);
    stroke: var(--cmdb-hairline);
    stroke-width: 1.4px;
}

.cmdb-graph-node-external {
    stroke-dasharray: 4 3;
}

.cmdb-graph-node-focus {
    fill: var(--cmdb-accent-wash);
    stroke: var(--cmdb-accent-edge);
    stroke-width: 2px;
}

.cmdb-graph-edge {
    fill: none;
    stroke: var(--cmdb-hairline);
    stroke-width: 1.6px;
}

.cmdb-graph-edge-external {
    stroke-dasharray: 5 4;
}

.cmdb-graph-arrowhead {
    fill: var(--mud-palette-text-secondary);
}

.cmdb-graph-label {
    fill: var(--mud-palette-text-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.cmdb-graph-label-focus {
    fill: var(--mud-palette-primary);
}

.cmdb-graph-sublabel {
    fill: var(--mud-palette-text-secondary);
    font-size: 10.5px;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* The edge table is HTML, so the browser can do the truncating: a long
   external_system name gets a real ellipsis at whatever width the column
   actually has, with the full value on the title attribute. The SVG diagram
   cannot use this - <text> has no overflow - which is why
   Shared/UI/ExternalSystemDisplay.cs still exists for the nodes. */
.cmdb-ellipsis {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* The two-column layout scales its SVG viewBox with node count
   (DependencyGraphLayout.Compute), but the outer wrapper still needs a floor
   so a zero/zero focus (no dependencies at all) doesn't render a
   vanishingly small canvas. */
.cmdb-graph-canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* MudTable's responsive mode stacks each cell under its DataLabel below the
   Sm breakpoint, where a fixed column min-width would force a horizontal
   scrollbar on a phone. */
@media (max-width: 599.98px) {
    .cmdb-secret-table th:nth-child(5),
    .cmdb-secret-table td:nth-child(5) {
        min-width: 0;
    }

    .cmdb-secret-table .cmdb-coordinate {
        max-width: none;
    }

    .cmdb-secret-table th:nth-child(6),
    .cmdb-secret-table td:nth-child(6),
    .cmdb-secret-table th:nth-child(7),
    .cmdb-secret-table td:nth-child(7) {
        min-width: 0;
        white-space: normal;
    }
}

/* =============================================================================
   CMDB visual language (design pass, 2026-09-11)

   WHY
   ---
   The screens were built screen-by-screen on MudBlazor defaults, which works but
   reads as a generic admin dashboard - and drifts apart between phases. The
   design mockups (cmdb-mockup/*.dc.html) have a much more specific character:
   card surfaces with hairline borders, outlined facet chips, uppercase
   letterspaced micro-labels, and monospaced tabular numerics. This block ports
   that STRUCTURE onto Christman's warm palette; it does not port the mockup's
   cool blue-grey dark theme or its blue accent. See `.impeccable.md` for the
   full design context and the mockup-move-by-move translation table.

   Every value below derives from MudBlazor's live palette variables via
   color-mix, so light and dark mode both follow the Christman theme with no
   second set of literals to keep in sync - the same no-literal-hex discipline
   the Inventory and Application Detail rules above already follow.
   ============================================================================= */

:root {
    /* Spline Sans Mono, not the mockup's IBM Plex Mono: version strings and
       host identifiers have to be unambiguous at ~12px, and this one stays
       legible that small without reading as code-editor chrome. */
    --cmdb-font-mono: 'Spline Sans Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Hairlines carry all the separation in this design - there are no drop
       shadows and no elevation stacking. Copper-tinted rather than neutral grey
       so borders belong to the brand instead of reading as browser default. */
    --cmdb-hairline: color-mix(in oklab, var(--mud-palette-primary) 20%, transparent);
    --cmdb-hairline-soft: color-mix(in oklab, var(--mud-palette-primary) 11%, transparent);

    /* The accent pair, used ONLY for the active selection and the single most
       important state on a screen (see `.impeccable.md`, principle 2). */
    --cmdb-accent-wash: color-mix(in oklab, var(--mud-palette-primary) 12%, transparent);
    --cmdb-accent-edge: color-mix(in oklab, var(--mud-palette-primary) 48%, transparent);

    /* A surface one step off the page ground, for table headers and inset
       areas. Tinting toward primary rather than using a flat grey keeps the
       neutrals warm, which is what makes the copper feel native rather than
       applied. */
    --cmdb-surface-sunken: color-mix(in oklab, var(--mud-palette-primary) 5%, var(--mud-palette-surface));

    --cmdb-radius: 10px;
    --cmdb-radius-sm: 6px;

    /* 4pt scale, semantic names. 8pt alone is too coarse - the chip row and
       table cells both want 12px. */
    --cmdb-space-2xs: 4px;
    --cmdb-space-xs: 8px;
    --cmdb-space-sm: 12px;
    --cmdb-space-md: 16px;
    --cmdb-space-lg: 24px;
    --cmdb-space-xl: 32px;
}

/* ---- Micro-label -----------------------------------------------------------
   The single strongest character cue carried over from the mockup. Used for
   column headers, section eyebrows and facet group labels - anywhere a label
   needs to recede behind the data it names while still being findable. */
.cmdb-eyebrow {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    line-height: 1.4;
}

/* ---- Panel -----------------------------------------------------------------
   Replaces MudPaper's elevation for the estate screens. Hairline + radius, no
   shadow: cards stop competing with the data and never stack into cards-inside-
   cards. */
.cmdb-panel {
    background: var(--mud-palette-surface);
    border: 1px solid var(--cmdb-hairline-soft);
    border-radius: var(--cmdb-radius);
}

.cmdb-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--cmdb-space-sm);
    padding: var(--cmdb-space-sm) var(--cmdb-space-md);
    border-bottom: 1px solid var(--cmdb-hairline-soft);
}

/* ---- Facet chips -----------------------------------------------------------
   The mockup's filter row. Outlined at rest so an unselected chip carries no
   colour weight at all; selected chips get the copper wash and edge. Rendered
   as real <button>s rather than MudChip so the whole row is keyboard-navigable
   and each chip reports its own pressed state. */
.cmdb-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--cmdb-space-2xs);
    height: 30px;
    padding: 0 var(--cmdb-space-sm);
    border: 1px solid var(--cmdb-hairline);
    border-radius: var(--cmdb-radius-sm);
    background: transparent;
    color: var(--mud-palette-text-secondary);
    font-family: inherit;
    font-size: 0.78125rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 140ms cubic-bezier(0.22, 1, 0.36, 1),
                border-color 140ms cubic-bezier(0.22, 1, 0.36, 1),
                color 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cmdb-chip:hover {
    border-color: var(--cmdb-accent-edge);
    color: var(--mud-palette-text-primary);
}

.cmdb-chip:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.cmdb-chip[aria-pressed="true"] {
    background: var(--cmdb-accent-wash);
    border-color: var(--cmdb-accent-edge);
    color: var(--mud-palette-primary);
    font-weight: 500;
}

/* The count that rides inside a chip - tabular so a row of chips doesn't
   jitter as counts change width. */
.cmdb-chip-count {
    font-family: var(--cmdb-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 0.6875rem;
    opacity: 0.75;
}

/* ---- Badges and flags ------------------------------------------------------
   Two different jobs, deliberately different weights. A badge NAMES something
   (ecosystem, environment) and must stay quiet; a flag WARNS (outdated,
   expiring) and is allowed to carry colour - but only one flag style per
   screen, or the warning stops meaning anything. */
.cmdb-badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 var(--cmdb-space-xs);
    border-radius: 5px;
    background: var(--cmdb-surface-sunken);
    border: 1px solid var(--cmdb-hairline-soft);
    color: var(--mud-palette-text-secondary);
    font-size: 0.65625rem;
    letter-spacing: 0.03em;
    line-height: 1;
    white-space: nowrap;
}

.cmdb-flag {
    display: inline-flex;
    align-items: center;
    gap: var(--cmdb-space-2xs);
    padding: 2px var(--cmdb-space-xs);
    border-radius: 4px;
    background: color-mix(in oklab, var(--mud-palette-warning) 18%, transparent);
    border: 1px solid color-mix(in oklab, var(--mud-palette-warning) 40%, transparent);
    color: color-mix(in oklab, var(--mud-palette-warning) 72%, var(--mud-palette-text-primary));
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}

/* Badge accent modifier (2026-09-11 restyle pass). Inventory, Application
   Detail and Secret Expiration all pre-dated this pass with the same habit -
   the Prod environment tag carried the primary colour so it reads as the
   single most-important environment at a glance (principle 2: accent is
   reserved for the active selection and "the single most important state on
   a screen" - Prod is that state, consistently, across every screen that
   shows an environment). Kept, but re-expressed as a badge modifier instead
   of a MudChip fill, so it is still a quiet wash+edge tint rather than a
   solid colour block, and it stays the ONLY accent-bearing badge in the app. */
.cmdb-badge-accent {
    background: var(--cmdb-accent-wash);
    border-color: var(--cmdb-accent-edge);
    color: var(--mud-palette-primary);
}

/* ---- Data table ------------------------------------------------------------
   Applied to a MudTable via Class="cmdb-data-table". Hairline dividers, an
   uppercase micro-label header on the sunken surface, and no zebra striping -
   striping fights the hairlines and makes a dense table noisier, not clearer.

   Row height is deliberately looser than the mockup's 52px: the audience is the
   wider IT/ops team rather than only the author, so legibility outranks packing
   more rows above the fold (see `.impeccable.md`, Users). */
.cmdb-data-table .mud-table-head .mud-table-cell {
    background: var(--cmdb-surface-sunken);
    border-bottom: 1px solid var(--cmdb-hairline);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.075em;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.cmdb-data-table .mud-table-body .mud-table-cell {
    border-bottom: 1px solid var(--cmdb-hairline-soft);
    font-size: 0.8125rem;
    padding-top: var(--cmdb-space-sm);
    padding-bottom: var(--cmdb-space-sm);
}

.cmdb-data-table .mud-table-body .mud-table-row:last-child .mud-table-cell {
    border-bottom: none;
}

/* MudBlazor's sort label inherits the header's uppercase micro-label treatment
   rather than reverting to body type when a column becomes sortable. */
.cmdb-data-table .mud-table-head .mud-table-sort-label {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
}

/* ---- Numerics --------------------------------------------------------------
   Principle 1: anything a reader might COMPARE is monospaced and tabular, so
   "9.5.0" against "9.9.0" is a visual difference rather than a reading task. */
.cmdb-mono,
.cmdb-facet-count,
.cmdb-kpi-value,
.cmdb-chip-count {
    font-family: var(--cmdb-font-mono);
    font-variant-numeric: tabular-nums;
}

/* ---- Page header -----------------------------------------------------------
   Principle 5: every screen states the question it answers, above the controls
   and in plain language. The rule under it is the brand's copper accent bar,
   scaled down to a hairline-plus so it marks the header without becoming
   decoration. */
.cmdb-page-head {
    padding-bottom: var(--cmdb-space-md);
    margin-bottom: var(--cmdb-space-lg);
    border-bottom: 1px solid var(--cmdb-hairline);
}

.cmdb-page-lede {
    max-width: 70ch;
    color: var(--mud-palette-text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    .cmdb-chip {
        transition: none;
    }
}

/* ---- Filter bar ------------------------------------------------------------
   Two labelled groups (category, ecosystem) rather than the mockup's single
   undifferentiated run of chips with a bare divider between them. With the
   real data the two axes look alike - "auth" and "npm" are both lowercase
   words - so without the labels it is genuinely unclear which chips are
   mutually exclusive with which. The eyebrow label is what makes the grouping
   legible, which matters more here than matching the mockup exactly. */
.cmdb-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--cmdb-space-md) var(--cmdb-space-xl);
    padding: var(--cmdb-space-sm) var(--cmdb-space-md);
    background: var(--cmdb-surface-sunken);
    border: 1px solid var(--cmdb-hairline-soft);
    border-radius: var(--cmdb-radius);
}

.cmdb-filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--cmdb-space-xs);
    min-width: 0;
}

.cmdb-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--cmdb-space-xs);
}

/* ---- Drift callout ---------------------------------------------------------
   Not a MudAlert. The severity-coloured alert block reads as an error state,
   and version drift is a standing observation about the estate rather than
   something broken - the screen would shout on every single load. This states
   the finding on the panel surface with one warning-toned marker, so it reads
   as a measurement rather than an incident. */
.cmdb-callout {
    display: flex;
    align-items: flex-start;
    gap: var(--cmdb-space-sm);
    padding: var(--cmdb-space-sm) var(--cmdb-space-md);
    border: 1px solid var(--cmdb-hairline-soft);
    border-radius: var(--cmdb-radius);
    background: var(--mud-palette-surface);
}

/* .cmdb-callout-warning is the same tokens under a screen-neutral name: the
   Secret Expiration banner (2026-09-11 restyle pass) needed the identical
   warning-toned callout for its own "something is expiring soon" state, and
   giving it Packages' drift-specific name would have made a second screen's
   markup say "drift" about something that is not drift. Kept as one rule so
   the two callouts cannot visually drift apart from each other. */
.cmdb-callout-drift,
.cmdb-callout-warning {
    background: color-mix(in oklab, var(--mud-palette-warning) 7%, var(--mud-palette-surface));
    border-color: color-mix(in oklab, var(--mud-palette-warning) 28%, transparent);
}

.cmdb-callout-icon {
    flex: none;
    margin-top: 1px;
}

.cmdb-callout-body {
    min-width: 0;
}

/* ---- Application Detail: Deployments column widths -------------------------
   `.cmdb-mono` carries `overflow-wrap: anywhere` to fix Phase 2's Defect C (a
   long unbreakable identifier painting over its neighbours). That guard is
   correct and stays - but with auto table layout the azure_resource_id column,
   which is by far the longest value, starved the Host column until
   "ca-projecttracking-dab" wrapped as "ca- / project / trackin / g-dab".
   Found by driving the screen on 2026-09-11.

   Giving Host a floor in `ch` lets a typical host identifier sit on one or two
   sensible lines and pushes the squeeze onto the resource id instead - which is
   an opaque subscription path nobody reads character by character, so breaking
   it anywhere costs the reader nothing. */
.cmdb-deployments-table th:nth-child(4),
.cmdb-deployments-table td:nth-child(4) {
    min-width: 16ch;
}

@media (max-width: 959px) {
    /* Stacked card layout below this breakpoint - the floor would force a
       horizontal scroll instead of helping. */
    .cmdb-deployments-table th:nth-child(4),
    .cmdb-deployments-table td:nth-child(4) {
        min-width: 0;
    }
}

/* ---- Inventory: Codebase column -------------------------------------------
   The name is the subject and the framework is secondary, so they stack rather
   than sitting inline as "Name · net10.0". Inline, the cell's min-content width
   was the longest name PLUS the framework, which pushed the Reconciled column
   off the right edge at 1480px.

   The name then truncates with an ellipsis and carries the full value as a
   tooltip - the pattern `.cmdb-owner` already uses in this table for the same
   problem. Two earlier attempts are worth recording so they aren't retried:
   `.cmdb-mono`'s Defect C guard (`overflow-wrap: anywhere`) broke names
   mid-word into "CopperWorksAc / counts", and `overflow-wrap: break-word` fixed
   the breaking but then demanded the longest word's width and overflowed the
   table again. All three states were seen in the browser, 2026-09-11. */
.cmdb-codebase-name {
    display: block;
    /* 15ch, not 18: at 18 the table ran ~30px over its container at 1480px and
       clipped the Reconciled header to "RECONC". Matches .cmdb-owner's cap. */
    max-width: 15ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
}

.cmdb-codebase-framework {
    display: block;
    font-size: 0.6875rem;
    color: var(--mud-palette-text-secondary);
}


/* ---- Project narrative (ADO Epic #3136) ------------------------------------
   Stored Markdown rendered by SafeMarkdown, and the entry log. Entries are
   separated by a hairline rather than boxed, so the log reads as one column. */
.cmdb-markdown > :first-child { margin-top: 0; }
.cmdb-markdown > :last-child { margin-bottom: 0; }
.cmdb-markdown p,
.cmdb-markdown ul,
.cmdb-markdown ol,
.cmdb-markdown pre,
.cmdb-markdown table { margin: 0 0 var(--cmdb-space-xs); }
.cmdb-markdown ul,
.cmdb-markdown ol { padding-left: 1.5em; }
.cmdb-markdown code,
.cmdb-markdown pre {
    font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
    font-size: 0.8125rem;
    background: var(--cmdb-surface-sunken);
    border-radius: 4px;
}
.cmdb-markdown code { padding: 0 3px; }
.cmdb-markdown pre { padding: var(--cmdb-space-xs); overflow-x: auto; }
.cmdb-markdown pre code { padding: 0; background: none; }
.cmdb-markdown a { color: var(--mud-palette-primary); }
.cmdb-markdown table { border-collapse: collapse; }
.cmdb-markdown th,
.cmdb-markdown td { border: 1px solid var(--cmdb-hairline-soft); padding: 2px 6px; }

.cmdb-entry {
    padding: var(--cmdb-space-sm) 0;
    border-bottom: 1px solid var(--cmdb-hairline-soft);
    overflow-wrap: anywhere;
}
.cmdb-entry:first-child { padding-top: 0; }
.cmdb-entry:last-child { border-bottom: none; }
.cmdb-entry-quiet { opacity: 0.7; }
.cmdb-entry-date { color: var(--mud-palette-text-secondary); font-size: 0.8125rem; }
.cmdb-entry-resolution {
    margin-top: var(--cmdb-space-xs);
    padding-left: var(--cmdb-space-sm);
    border-left: 2px solid var(--cmdb-hairline);
}
.cmdb-superseded { text-decoration: line-through; }
