[data-theme="dark"] .js-plotly-plot .main-svg {
    background: transparent !important;
}

.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

/* Read-only onboarding progress indicator (see OnboardingProgressStepper). */
.onboarding-stepper {
    display: flex;
    align-items: flex-start;
    width: 100%;
    gap: 4px;
}

.onboarding-stepper__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 1 auto;
    max-width: 7rem;
    min-width: 0;
    text-align: center;
}

.onboarding-stepper__connector {
    flex: 1 1 auto;
    height: 2px;
    margin-top: 17px;
    border-radius: 1px;
    background-color: var(--mud-palette-lines-default);
}

.onboarding-stepper__connector--done {
    background-color: var(--mud-palette-primary);
}

.onboarding-stepper__circle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
}

.onboarding-stepper__circle--completed,
.onboarding-stepper__circle--current {
    background-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

.onboarding-stepper__circle--current {
    box-shadow: 0 0 0 4px var(--mud-palette-primary-hover);
}

.onboarding-stepper__circle--upcoming {
    background-color: transparent;
    color: var(--mud-palette-text-secondary);
    border: 2px solid var(--mud-palette-lines-default);
}

.onboarding-stepper__label {
    margin-top: 8px;
    font-size: 0.75rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
    color: var(--mud-palette-text-secondary);
}

.onboarding-stepper__label--current {
    font-weight: 600;
    color: var(--mud-palette-primary);
}

/* Muted explanatory copy - subtitles, hints, descriptions. Rendered through the MutedText component,
   which is the only place that should reference this class. Bound to the palette token generated from
   MudTheme's public Palette.TextSecondary, not to a MudBlazor utility class name. */
.app-text-muted {
    color: var(--mud-palette-text-secondary);
}

/* A label with more behind a hover tooltip: the dotted underline of a help term, without the term's button. */
.app-hover-hint {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
    cursor: help;
}

/* SysAdmin dashboard (#1089): a hairline between health / subscription rows, none above the first. */
.app-health-row + .app-health-row {
    border-top: 1px dashed var(--mud-palette-divider);
}

/* Feed rows: a long actor name or activity title must not push the chip and the IP off the card. */
.app-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Throughput sparkline: fourteen rectangles with no axes. Plotly and OxyPlot are both already in the
   app and both are far more machinery than this picture is worth. */
.app-spark {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 72px;
}

.app-spark-failures {
    height: 24px;
}

.app-spark-bar {
    flex: 1;
    display: block;
    min-height: 1px;
    border-radius: 2px 2px 0 0;
    background-color: var(--mud-palette-primary);
    opacity: 0.55;
}

.app-spark-bar-failed {
    background-color: var(--mud-palette-error);
    opacity: 0.75;
}

/* Meter topology diagram (#1116). Node box size is set inline from the C# layout constants, so it
   is defined in exactly one place; everything visual lives here. */
.topology-scroll {
    overflow: auto;
    max-height: 70vh;
}

.topology-canvas {
    position: relative;
}

/* (#1826) The Workspace Messkonzept zooms and pans instead of scrolling: the viewport clips, and
   teels.topology.attachZoom sets one transform on the canvas. Hidden rather than clip, so the viewport stays a
   scroll container and a wide diagram never widens the page. touch-action leaves one finger to the browser, which
   scrolls the page as beside any embedded map, and turns its pinch zoom off here: two fingers belong to the script. */
.topology-viewport {
    overflow: hidden;
    max-height: 70vh;
    touch-action: pan-x pan-y;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
}

.topology-viewport.topology-panning {
    cursor: grabbing;
}

.topology-viewport .topology-canvas {
    transform-origin: 0 0;
}

.topology-edges {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}

.topology-edge {
    fill: none;
    stroke-width: 2px;
}

/* The child draws from its parent. Neutral rather than semantic - but lines-default is a divider tone
   and reads as barely-there at this length, so it takes the secondary TEXT tone instead: still
   neutral, actually legible. */
.topology-edge-draws {
    stroke: var(--mud-palette-text-secondary);
}

/* The child feeds its parent. Context, so Info - and the dash carries the same fact without relying
   on colour, which is why it must agree with the arrow rather than encode something else. */
.topology-edge-feeds {
    stroke: var(--mud-palette-info);
    stroke-dasharray: 5 4;
}

/* Centred on the point the layout hands over, so the badge reads as belonging to the line rather than
   to whatever box happens to be nearest. The label itself is not a pointer target - the line underneath
   is not clickable either - but it sits above the boxes, because a badge in the gap between two layers
   can still overlap one and a control that is half-covered cannot be hit. */
.topology-edge-sign {
    position: absolute;
    z-index: 1;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--mud-palette-info);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* The one part of the badge that IS a target. Scoped to the wrapper rather than lifted onto the badge,
   so the sign stays click-through and the line underneath keeps its hover highlight. Without this the
   pointer-events:none above swallowed every click on the menu it contains. */
.topology-edge-actions {
    display: inline-flex;
    pointer-events: auto;
}

/* Carrying a control, the badge stops being a label and has to look like something you can operate:
   a chip on the line, legible against whatever it happens to sit over. */
.topology-edge-sign-interactive {
    padding: 0 2px 0 7px;
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 999px;
}

/* An Untermessung carries no sign, so its chip is the button alone and needs no room to its left. */
.topology-edge-sign-interactive:not(:has(.topology-edge-sign-symbol)) {
    padding-left: 2px;
}

.topology-arrow-fill-draws {
    fill: var(--mud-palette-text-secondary);
}

.topology-arrow-fill-feeds {
    fill: var(--mud-palette-info);
}

.topology-legend-key {
    display: flex;
    align-items: center;
    gap: 7px;
}

.topology-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    text-align: left;
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-primary);
    border-radius: var(--mud-default-borderradius);
    color: var(--mud-palette-text-primary);
    cursor: pointer;
    transition: border-color .12s, background-color .12s, opacity .12s;
}

/* Every node carries the primary border now, so the pointed-at one needs a cue of its own. */
.topology-node:hover,
.topology-node:focus-visible {
    background-color: var(--mud-palette-background-gray);
    box-shadow: 0 0 0 2px var(--mud-palette-primary-hover);
}

.topology-node-body {
    min-width: 0;
    flex: 1;
}

.topology-node-name {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topology-node-chip {
    display: block;
    margin-top: 2px;
    font-size: .6875rem;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "Ungezaehlte Abgaenge" (#1109): what a parent's Untermessungen do not account for. Nothing measures
   it, so it is a box that cannot be opened - dashed and muted, with no pointer and no hover cue. It is
   context rather than state, so it takes no state colour. */
.topology-node-unmetered {
    border-style: dashed;
    border-color: var(--mud-palette-lines-default);
    color: var(--mud-palette-text-secondary);
    cursor: default;
}

.topology-node-unmetered:hover,
.topology-node-unmetered:focus-visible {
    background-color: var(--mud-palette-surface);
    box-shadow: none;
}

/* A computed meter on the Workspace Messkonzept: dashed in the primary colour, so it reads as "calculated" and not
   as "nothing measures this" (that is the unmetered box above, which is muted). */
.topology-node-computed {
    border-style: dashed;
}

/* The box the Workspace inspector is showing. */
.topology-node-selected {
    background-color: var(--mud-palette-background-gray);
    box-shadow: 0 0 0 2px var(--mud-palette-primary);
}

/* (#1301) A machine under its meter, in the declared-load purple (ChartPalette.DeclaredLoadColor) so it never reads as
   a meter: smaller, indented, tinted. Not a button - nothing opens - and outside the hover highlight. */
:root {
    --topology-machine: #6d4fa5;
}

:root[data-theme="dark"] {
    --topology-machine: #b39ddb;
}

.topology-machine {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background-color: color-mix(in srgb, var(--topology-machine) 8%, var(--mud-palette-surface));
    border: 1px solid var(--topology-machine);
    border-radius: var(--mud-default-borderradius);
    color: var(--mud-palette-text-primary);
}

.topology-machine .mud-icon-root {
    color: var(--topology-machine);
}

.topology-machine-power {
    flex: none;
    font-size: .75rem;
    font-weight: 600;
    color: var(--topology-machine);
    white-space: nowrap;
}

.topology-machine-connector {
    fill: none;
    stroke: var(--topology-machine);
    stroke-width: 1.5px;
}

.topology-machine-key {
    display: inline-block;
    width: 22px;
    height: 12px;
    background-color: color-mix(in srgb, var(--topology-machine) 8%, var(--mud-palette-surface));
    border: 1px solid var(--topology-machine);
    border-radius: 3px;
}

/* Resting state is full strength for everything. Hovering a node mutes what is NOT on its path, so
   the highlight is subtractive - which is what makes the surviving edges and arrowheads read as
   highlighted rather than merely unchanged. Opacity on a path dims its marker with it. */
.topology-node.topology-dim,
.topology-edge.topology-dim {
    opacity: .18;
}

/* Only reveal the chart's loading overlay if the update actually takes a moment. Most toggles redraw
   in well under a quarter second, and an overlay that flashes on every click reads as jank rather
   than as feedback. `both` keeps it fully transparent through the delay. */
.plot-loading-overlay {
    animation: plot-loading-fade-in 150ms ease-in 250ms both;
}

@keyframes plot-loading-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Findings note block (#1355): the specialist's own words, coloured by state - amber for a plain note, grey
   for dismissed, info-blue for resurfaced. A styled block rather than a MudAlert severity, since none of the
   three states is an operational "success/warning/error" - see LoadFindingsPanel.NoteBlockClass. */
.finding-note {
    border-left: 4px solid var(--mud-palette-warning);
    background-color: var(--mud-palette-warning-hover);
    border-radius: 0 4px 4px 0;
    padding: 10px 12px;
}

.finding-note--dismissed {
    border-left-color: var(--mud-palette-text-disabled);
    background-color: var(--mud-palette-background-gray);
}

.finding-note--resurfaced {
    border-left-color: var(--mud-palette-info);
    background-color: var(--mud-palette-info-hover);
}

/* MudBlazor upper-cases every button through --mud-typography-button-text-transform, which is right for
   an action ("SAVE") and wrong for a label on a selection chip - LOAD DURATION CURVE shouts, and capitals
   are ~8 % wider, which costs a row on the thirteen month chips. Scoped to an opt-in class rather than
   changed on the theme, so ordinary buttons keep the app-wide treatment. */
.text-transform-none {
    text-transform: none !important;
}

/* The one selection style (design-system.md, "Selection controls"): an option not chosen is outlined in the grey of an
   input's line - MudBlazor outlines a default button in the full text colour, darker than any input beside it - and a
   chosen one is filled primary. A chip keeps its 1px border when chosen, so it never changes width; the border takes the
   fill colour then rather than drawing a ring. A chosen button drops MudBlazor's filled shadow, as a toggle group's chosen
   chip does, so "chosen" has one look. Disabled options keep MudBlazor's disabled outline. */
.selection-option.mud-button-outlined:not(:disabled) {
    border-color: var(--mud-palette-lines-inputs);
}

.selection-option.mud-button-filled:not(:disabled) {
    border-color: var(--mud-palette-primary);
    box-shadow: none;
}

/* Keyboard focus: a chosen toggle chip is filled through mud-theme-primary, whose !important background swallows the only
   focus cue MudBlazor gives a filled button (a darker fill), so every option draws a ring outside its border instead. */
.selection-option:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

/* Two-column splits that follow the width of the content column, not the viewport: the help panel and the
   navigation drawer take room the viewport width does not show. The wrapper is the query container (never
   .mud-main-content: container-type would make it the containing block of fixed-position descendants).
   Two columns from 900px of content, one column below. */
.ws-split {
    container-type: inline-size;
}

.ws-split-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
}

.ws-split-grid > * {
    min-width: 0;
}

@container (min-width: 900px) {
    .ws-split-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
    .ws-split-8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
    .ws-split-6-6 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    /* A split whose single child is the whole row (Massnahmen and Maschinen with the form closed). */
    .ws-split-grid > .ws-split-full { grid-column: 1 / -1; }
}

/* Board columns: as many as fit at 12rem each. */
.ws-board-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
