/* V2 theme mechanism (F50, Web#362). Shared by every material; the materials
   themselves are glass.css and mica.css beside this file.

   How it hangs together:

   - ThemeProvider writes data-dw-material (and data-dw-variant, data-dw-mode)
     on <html> only while V2 is enabled and a material other than "current" is
     chosen. With no material attribute nothing below matches, except the
     density block and the plain :root defaults, which no current rule reads.
     The current theme is app.css's :root block and DosseyWorksTheme, untouched.

   - Under a material the --dw-* roles are the colour source and every
     --mud-palette-* variable MudThemeProvider emits is set FROM them (the bridge
     below), so MudBlazor's controls, dialogs, menus and popovers move with the
     rules app.css already writes against --dw-*. app.css's :root block reads
     the palette for most roles; a material or this file redefines every role
     the bridge reads, so nothing resolves to itself. DesignTokenTests walks
     the graph for every material, variant and mode to hold that.

   - data-dw-mode exists because MudBlazor's -rgb variables are bare channel
     lists and the canvases are gradients, and light-dark() can express
     neither. AppearanceState is still the one light/dark source: ThemeProvider
     writes the attribute from it. Under a material the colour scheme follows
     the attribute too (the bridge sets MudBlazor's own variable for it), so
     the root attributes alone decide what a material draws (Web#370).

   - Surfaces are composed here from each material's channels and alpha, so the
     reduced-transparency floor below only has to lift two tokens no material
     sets, and wins without out-ranking anything.

   Linked with media="screen": print never sees a material. */

:root {
    /* Motion (Web#361): new roles; the reduced-motion block sets them to 0ms. */
    --dw-motion-fast: 120ms;
    --dw-motion-default: 200ms;

    /* The transparency fallback's two levers. 0 and 1 are "no floor" and
       "blur as the material says"; the fallback blocks set .96 and 0. */
    --dw-alpha-floor: 0;
    --dw-transparency: 1;
}

/* Density (owner, 2026-11-06): Compact is app.css as it stands; Comfortable
   lifts the default control and the page rhythm to the next step of the
   existing scales (Web#361). Each person's own choice, valid under every
   material and under the current theme. */
:root[data-dw-density="comfortable"] {
    --dw-control-md: 40px;
    --dw-space-6: 24px;
}

/* Light: semantic states, the brand colours that do not vary by material,
   the surface composition, and the bridge to MudBlazor. */
:root[data-dw-material] {
    /* States, invariant across materials and variants (Web#361). Foreground is
       the -ink and the MudBlazor slot; surface is the -tint. Neutral is new. */
    --dw-color-danger: #b42318;
    --dw-color-danger-ink: #b42318;
    --dw-color-danger-tint: #fef0ed;
    --dw-color-danger-rgb: 180,35,24;
    --dw-color-warning: #9a6700;
    --dw-color-warning-ink: #9a6700;
    --dw-color-warning-tint: #fff6d8;
    --dw-color-warning-rgb: 154,103,0;
    --dw-color-success: #287d3c;
    --dw-color-success-ink: #287d3c;
    --dw-color-success-tint: #e9f6ec;
    --dw-color-success-rgb: 40,125,60;
    --dw-color-info: #1769aa;
    --dw-color-info-ink: #1769aa;
    --dw-color-info-tint: #e8f2fa;
    --dw-color-info-rgb: 23,105,170;
    --dw-color-neutral-ink: #59636e;
    --dw-color-neutral-tint: #eef1f4;
    --dw-color-on-state: #ffffff;

    /* What does not change with the material: the brand red (Secondary), the
       dark call to action, and what reads on the action colour. */
    --dw-color-accent: #e84436;
    --dw-color-accent-rgb: 232,68,54;
    --dw-color-cta: #0b1f33;
    --dw-color-cta-rgb: 11,31,51;
    --dw-color-on-cta: #ffffff;
    --dw-color-on-action: #ffffff;
    --dw-color-overlay-dark: rgba(0,0,0,.42);
    --dw-color-overlay-light: rgba(255,255,255,.5);

    /* The colours app.css spells for itself rather than reading from the
       palette, so the bridge never reached them (Web#368 sweep). The avatar
       disc is the material's action colour, as the approved UI Lab draws it,
       with the ink the action colour already pairs with; the hero's warm end
       is the brand red tinted over the surface. Paper, ink and the two shadow
       colours stay as app.css sets them: paper and ink are the print sheet,
       and a shadow is depth, not a surface (V2ThemeTokenTests names them). */
    --dw-color-avatar: var(--dw-color-action);
    --dw-color-on-avatar: var(--dw-color-on-action);
    --dw-color-accent-tint: color-mix(in srgb, var(--dw-color-accent) 6%, var(--dw-color-surface));

    /* Text on the canvas (Web#421): the everyday roles unless a material needs
       a stronger value where its glows peak. The pane maps the roles onto
       these; see the working pane rule below. */
    --dw-canvas-text: var(--dw-color-text);
    --dw-canvas-text-muted: var(--dw-color-text-muted);
    --dw-canvas-action: var(--dw-color-action);
    --dw-canvas-action-hover: var(--dw-color-action-hover);
    /* And the everyday roles as the root sets them, for the solid surfaces
       inside the pane to map back to. */
    --dw-surface-text: var(--dw-color-text);
    --dw-surface-text-muted: var(--dw-color-text-muted);
    --dw-surface-action: var(--dw-color-action);
    --dw-surface-action-hover: var(--dw-color-action-hover);

    /* Surfaces, composed from the material's channels and alpha. */
    --dw-color-surface: rgba(var(--dw-surface-rgb), max(var(--dw-surface-alpha), var(--dw-alpha-floor)));
    --dw-color-surface-raised: rgba(var(--dw-surface-raised-rgb), max(var(--dw-surface-raised-alpha), var(--dw-alpha-floor)));
    --dw-color-surface-subdued: rgba(var(--dw-surface-subdued-rgb), max(var(--dw-surface-subdued-alpha), var(--dw-alpha-floor)));
    --dw-color-bar: rgba(var(--dw-bar-rgb), max(var(--dw-bar-alpha), var(--dw-alpha-floor)));
    --dw-color-nav: rgba(var(--dw-nav-rgb), max(var(--dw-nav-alpha), var(--dw-alpha-floor)));
    /* Not floored: it is a selection tint over the (floored) navigation, not
       a surface, header or navigation of its own (Web#361's fallback list).
       Lifted to .96 it stopped being a tint -- Glass dark's selection became a
       near-opaque teal and its text fell to 3.36:1 (Web#363). */
    --dw-color-nav-selected: rgba(var(--dw-nav-selected-rgb), var(--dw-nav-selected-alpha));

    /* What sits on the header, derived from the material's Header text. The
       muted mix is 72% unless a material needs more for 4.5:1 (Web#363). */
    --dw-bar-muted-mix: 72%;
    --dw-color-text-on-bar-muted: color-mix(in srgb, var(--dw-color-text-on-bar) var(--dw-bar-muted-mix), transparent);
    --dw-color-bar-hover: color-mix(in srgb, var(--dw-color-text-on-bar) 12%, transparent);
    --dw-color-bar-active: color-mix(in srgb, var(--dw-color-text-on-bar) 22%, transparent);

    /* The bridge: every variable MudThemeProvider emits, from the roles. */
    --mud-palette-black: rgba(39,44,52,1);
    --mud-palette-white: rgba(255,255,255,1);
    --mud-palette-primary: var(--dw-color-action);
    --mud-palette-primary-rgb: var(--dw-color-action-rgb);
    --mud-palette-primary-text: var(--dw-color-on-action);
    --mud-palette-primary-darken: color-mix(in srgb, var(--dw-color-action) 85%, black);
    --mud-palette-primary-lighten: color-mix(in srgb, var(--dw-color-action) 85%, white);
    --mud-palette-primary-hover: rgba(var(--dw-color-action-rgb), .06);
    --mud-palette-secondary: var(--dw-color-accent);
    --mud-palette-secondary-rgb: var(--dw-color-accent-rgb);
    --mud-palette-secondary-text: var(--dw-color-on-state);
    --mud-palette-secondary-darken: color-mix(in srgb, var(--dw-color-accent) 85%, black);
    --mud-palette-secondary-lighten: color-mix(in srgb, var(--dw-color-accent) 85%, white);
    --mud-palette-secondary-hover: rgba(var(--dw-color-accent-rgb), .06);
    --mud-palette-tertiary: var(--dw-color-action);
    --mud-palette-tertiary-rgb: var(--dw-color-action-rgb);
    --mud-palette-tertiary-text: var(--dw-color-on-action);
    --mud-palette-tertiary-darken: color-mix(in srgb, var(--dw-color-action) 85%, black);
    --mud-palette-tertiary-lighten: color-mix(in srgb, var(--dw-color-action) 85%, white);
    --mud-palette-tertiary-hover: rgba(var(--dw-color-action-rgb), .06);
    --mud-palette-info: var(--dw-color-info);
    --mud-palette-info-rgb: var(--dw-color-info-rgb);
    --mud-palette-info-text: var(--dw-color-on-state);
    --mud-palette-info-darken: color-mix(in srgb, var(--dw-color-info) 85%, black);
    --mud-palette-info-lighten: color-mix(in srgb, var(--dw-color-info) 85%, white);
    --mud-palette-info-hover: rgba(var(--dw-color-info-rgb), .06);
    --mud-palette-success: var(--dw-color-success);
    --mud-palette-success-rgb: var(--dw-color-success-rgb);
    --mud-palette-success-text: var(--dw-color-on-state);
    --mud-palette-success-darken: color-mix(in srgb, var(--dw-color-success) 85%, black);
    --mud-palette-success-lighten: color-mix(in srgb, var(--dw-color-success) 85%, white);
    --mud-palette-success-hover: rgba(var(--dw-color-success-rgb), .06);
    --mud-palette-warning: var(--dw-color-warning);
    --mud-palette-warning-rgb: var(--dw-color-warning-rgb);
    --mud-palette-warning-text: var(--dw-color-on-state);
    --mud-palette-warning-darken: color-mix(in srgb, var(--dw-color-warning) 85%, black);
    --mud-palette-warning-lighten: color-mix(in srgb, var(--dw-color-warning) 85%, white);
    --mud-palette-warning-hover: rgba(var(--dw-color-warning-rgb), .06);
    --mud-palette-error: var(--dw-color-danger);
    --mud-palette-error-rgb: var(--dw-color-danger-rgb);
    --mud-palette-error-text: var(--dw-color-on-state);
    --mud-palette-error-darken: color-mix(in srgb, var(--dw-color-danger) 85%, black);
    --mud-palette-error-lighten: color-mix(in srgb, var(--dw-color-danger) 85%, white);
    --mud-palette-error-hover: rgba(var(--dw-color-danger-rgb), .06);
    --mud-palette-dark: var(--dw-color-cta);
    --mud-palette-dark-rgb: var(--dw-color-cta-rgb);
    --mud-palette-dark-text: var(--dw-color-on-cta);
    --mud-palette-dark-darken: color-mix(in srgb, var(--dw-color-cta) 85%, black);
    --mud-palette-dark-lighten: color-mix(in srgb, var(--dw-color-cta) 85%, white);
    --mud-palette-dark-hover: rgba(var(--dw-color-cta-rgb), .06);
    --mud-palette-text-primary: var(--dw-color-text);
    --mud-palette-text-primary-rgb: var(--dw-color-text-rgb);
    --mud-palette-text-secondary: var(--dw-color-text-muted);
    --mud-palette-text-secondary-rgb: var(--dw-color-text-muted-rgb);
    --mud-palette-text-disabled: var(--dw-color-text-disabled);
    --mud-palette-text-disabled-rgb: var(--dw-color-text-disabled-rgb);
    --mud-palette-action-default: var(--dw-color-text-muted);
    --mud-palette-action-default-hover: rgba(var(--dw-color-text-muted-rgb), .06);
    --mud-palette-action-disabled: var(--dw-color-text-disabled);
    --mud-palette-action-disabled-background: var(--dw-color-surface-subdued);
    --mud-palette-surface: var(--dw-color-surface);
    --mud-palette-surface-rgb: var(--dw-surface-rgb);
    --mud-palette-background: var(--dw-color-canvas);
    --mud-palette-background-gray: var(--dw-color-surface-subdued);
    --mud-palette-drawer-background: var(--dw-color-nav);
    --mud-palette-drawer-text: var(--dw-color-text);
    --mud-palette-drawer-icon: var(--dw-color-text-muted);
    --mud-palette-appbar-background: var(--dw-color-bar);
    --mud-palette-appbar-text: var(--dw-color-text-on-bar);
    --mud-palette-lines-default: var(--dw-color-border);
    --mud-palette-lines-inputs: var(--dw-color-border-strong);
    --mud-palette-table-lines: var(--dw-color-border);
    --mud-palette-table-striped: var(--dw-color-surface-raised);
    --mud-palette-table-hover: var(--dw-color-action-tint);
    --mud-palette-divider: var(--dw-color-border);
    --mud-palette-divider-rgb: var(--dw-color-divider-rgb);
    --mud-palette-divider-light: var(--dw-color-border);
    --mud-palette-skeleton: rgba(var(--dw-color-text-rgb), .11);
    --mud-palette-gray-default: var(--dw-color-text-subtle);
    --mud-palette-gray-light: var(--dw-color-border-strong);
    --mud-palette-gray-lighter: var(--dw-color-border);
    --mud-palette-gray-dark: var(--dw-color-text-muted);
    --mud-palette-gray-darker: var(--dw-color-text);
    --mud-palette-overlay-dark: var(--dw-color-overlay-dark);
    --mud-palette-overlay-light: var(--dw-color-overlay-light);
    --mud-palette-border-opacity: 1;
    --mud-default-borderradius: var(--dw-radius-md);

    /* The colour scheme (native controls, scrollbars) follows the mode
       attribute too, not MudBlazor's own switch (Web#370). With it the root
       attributes decide everything a material draws, and they are written in
       one go, so a theme change is one step even while MudBlazor's own
       light/dark lands a frame earlier or later. */
    --mud-native-html-color-scheme: light;
}

/* Dark: only what differs from light. */
:root[data-dw-material][data-dw-mode="dark"] {
    --dw-color-danger: #ff887d;
    --dw-color-danger-ink: #ff887d;
    --dw-color-danger-tint: #472925;
    --dw-color-danger-rgb: 255,136,125;
    --dw-color-warning: #efc75e;
    --dw-color-warning-ink: #efc75e;
    --dw-color-warning-tint: #463b22;
    --dw-color-warning-rgb: 239,199,94;
    --dw-color-success: #75cf8a;
    --dw-color-success-ink: #75cf8a;
    --dw-color-success-tint: #203c29;
    --dw-color-success-rgb: 117,207,138;
    --dw-color-info: #78b9e6;
    --dw-color-info-ink: #78b9e6;
    --dw-color-info-tint: #213849;
    --dw-color-info-rgb: 120,185,230;
    --dw-color-neutral-ink: #bdc6ce;
    --dw-color-neutral-tint: #333940;
    --dw-color-on-state: #0f0f0f;
    --dw-color-accent: #f1707b;
    --dw-color-accent-rgb: 241,112,123;
    --dw-color-cta: #e6eef7;
    --dw-color-cta-rgb: 230,238,247;
    --dw-color-on-cta: #0b1f33;
    --dw-color-on-action: #0f0f0f;
    --dw-color-overlay-dark: rgba(0,0,0,.6);
    --dw-color-overlay-light: rgba(255,255,255,.1);
    --mud-native-html-color-scheme: dark;
}

/* Reduced transparency, and a browser that cannot blur: one answer for every
   material (Web#361). Surfaces become nearly opaque and nothing is blurred. */
@media (prefers-reduced-transparency: reduce) {
    :root {
        --dw-alpha-floor: .96;
        --dw-transparency: 0;
    }
}

@supports not (backdrop-filter: blur(1px)) {
    :root {
        --dw-alpha-floor: .96;
        --dw-transparency: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --dw-motion-fast: 0ms;
        --dw-motion-default: 0ms;
    }
}

/* The theme moves in one step (Web#372): while dwRoot.set changes the root
   attributes, every V2 transition is 0ms, so nothing fades from the
   prerendered colours into the chosen theme. */
:root[data-dw-settling] {
    --dw-motion-fast: 0ms;
    --dw-motion-default: 0ms;
}

/* MudBlazor's own transitions are literal durations, not the roles above. */
:root[data-dw-material][data-dw-settling] *,
:root[data-dw-material][data-dw-settling] *::before,
:root[data-dw-material][data-dw-settling] *::after {
    transition-duration: 0s;
    transition-delay: 0s;
}

/* Placement (Web#361 "Surface placement"): the canvas behind the page, and
   blur on the shell and on transient surfaces only. Content -- tables,
   editors, dialogs, notices, fields -- is never blurred. */

/* The canvas is a layer of its own, fixed to the viewport, rather than a
   background-attachment: fixed image on body (Web#370). The picture is the
   same -- the gradient stays where it is while the page scrolls -- but a fixed
   background makes Chromium repaint the whole viewport on the main thread for
   every frame of a scroll, and the 50.10 measurement put that at five times
   the main-thread work of the current theme and a quarter of all frames
   missed on the customer index. A fixed layer is composited once and moved
   by nothing. Beneath everything (z-index -1 in the root stacking context),
   over the canvas colour body already paints, and never in the way of a
   pointer. */
:root[data-dw-material] body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: var(--dw-canvas-image);
}

:root[data-dw-material] .mud-appbar,
:root[data-dw-material] .mud-drawer {
    backdrop-filter: blur(calc(var(--dw-blur-surface) * var(--dw-transparency))) saturate(calc(100% + (var(--dw-saturation) - 100%) * var(--dw-transparency)));
}

/* The working pane is the canvas; content sits on it in panels (Web#421, the
   approved UI Lab's composition). Option (c) of Web#363, an opaque pane, was
   withdrawn by the owner on 2026-11-07.

   Text drawn on the canvas itself -- breadcrumbs, the page heading, the gaps
   between panels, the command bar -- reads the canvas roles, which each
   material sets to pass 4.5:1 (3:1 for the focus outline) against the worst
   canvas sample (V2ThemeTokenTests). The pane maps the everyday roles onto
   them, and every solid surface inside the pane maps them back to the surface
   roles the root holds, so a component reads --dw-color-text wherever it is
   and gets the value right for what is behind it. */
:root[data-dw-material] .dw-workspace-canvas {
    background: transparent;
    --dw-color-text: var(--dw-canvas-text);
    --dw-color-text-muted: var(--dw-canvas-text-muted);
    --dw-color-action: var(--dw-canvas-action);
    --dw-color-action-hover: var(--dw-canvas-action-hover);
    color: var(--dw-color-text);
}

/* Panels: every content group is a solid Primary surface on the canvas, with
   the material's border colour, radius and shadow. Solid, not the Lab's
   translucent card (Web#421): text inside a panel reads at the contrast
   measured for content, and nothing in a table is ever blurred.

   Paint only. A theme never moves anything (V2PerformanceTests): the frame,
   padding and spacing of each panel are app.css's, the same in every theme, and
   a section, table or fact strip standing directly on the page is framed there
   too. One inside another panel is part of that panel. */
:root[data-dw-material] #main-content .dw-resource-panel,
:root[data-dw-material] #main-content .dw-section-panel,
:root[data-dw-material] #main-content .dw-context-card,
:root[data-dw-material] #main-content .dw-editor section,
:root[data-dw-material] #main-content .dw-kpi,
:root[data-dw-material] #main-content .dw-stages,
:root[data-dw-material] #main-content .dw-join-panel,
:root[data-dw-material] #main-content > .dw-context-section,
:root[data-dw-material] #main-content > .dw-table-shell,
:root[data-dw-material] #main-content > .dw-state-strip {
    --dw-color-text: var(--dw-surface-text);
    --dw-color-text-muted: var(--dw-surface-text-muted);
    --dw-color-action: var(--dw-surface-action);
    --dw-color-action-hover: var(--dw-surface-action-hover);
    color: var(--dw-color-text);
    border-color: var(--dw-color-border);
    border-radius: var(--dw-radius-md);
    background: var(--dw-fill-surface-solid);
    box-shadow: var(--dw-shadow-surface);
}

/* A fact strip is the Tertiary surface laid over a solid panel, wherever it
   stands: inside an editor form it is not in a panel, and its translucent
   tint put the state's colour on a canvas glow (Web#421). Inside a panel the
   result is the colour it always had. */
:root[data-dw-material] #main-content .dw-state-strip {
    background: linear-gradient(var(--dw-color-surface-subdued), var(--dw-color-surface-subdued)), var(--dw-fill-surface-solid);
    --dw-color-text: var(--dw-surface-text);
    --dw-color-text-muted: var(--dw-surface-text-muted);
    --dw-color-action: var(--dw-surface-action);
    --dw-color-action-hover: var(--dw-surface-action-hover);
}

/* Words with a link in them, left on the canvas -- an empty state's way out,
   a paragraph -- underline the link: in canvas text a link is not told from
   the words around it by colour alone (axe link-in-text-block). */
:root[data-dw-material] #main-content .dw-empty a {
    text-decoration: underline;
}

:root[data-dw-material] #main-content > p a {
    text-decoration: underline;
}

/* A KPI keeps its action rule along the top. */
:root[data-dw-material] #main-content .dw-kpi {
    border-top-color: var(--dw-color-action);
}

/* A table panel's first and last strips follow its corners: the scroll region
   clips to its own radius, so the header row's fill never squares them off. */
:root[data-dw-material] #main-content .dw-table-shell > :first-child {
    border-top-left-radius: var(--dw-radius-md);
    border-top-right-radius: var(--dw-radius-md);
}

:root[data-dw-material] #main-content .dw-table-shell > :last-child {
    border-bottom-left-radius: var(--dw-radius-md);
    border-bottom-right-radius: var(--dw-radius-md);
}

/* Other solid surfaces inside the pane read the surface roles too: the
   command bar (solid, so its primary command keeps the approved accent), a dialog,
   the command overflow and a typeahead list float over the page, a field
   carries its own fill, and a notice its state tint. */
:root[data-dw-material] #main-content .dw-command-bar,
:root[data-dw-material] #main-content .dw-dialog,
:root[data-dw-material] #main-content .dw-command-overflow-list,
:root[data-dw-material] #main-content .dw-typeahead-matches,
:root[data-dw-material] #main-content .dw-text-input,
:root[data-dw-material] #main-content .dw-text-area,
:root[data-dw-material] #main-content .dw-notice {
    --dw-color-text: var(--dw-surface-text);
    --dw-color-text-muted: var(--dw-surface-text-muted);
    --dw-color-action: var(--dw-surface-action);
    --dw-color-action-hover: var(--dw-surface-action-hover);
}

/* A fitted list's heading row is pinned while the rows scroll beneath it
   (Web#422), so it is the same colour made solid: the Secondary surface over
   the panel it sits on, not over whatever row is passing under it. */
:root[data-dw-material] .dw-table-fit thead th {
    background: linear-gradient(var(--dw-color-surface-raised), var(--dw-color-surface-raised)), var(--dw-fill-surface-solid);
}

/* A notice is a rounded strip of its own state tint (opaque, measured with
   its ink in V2ThemeTokenTests). */
:root[data-dw-material] #main-content .dw-notice {
    border-radius: var(--dw-radius-md);
}

/* The breadcrumb reads as the Lab draws it: muted links, the current page in
   text; the links underlined, and in text on hover. */
:root[data-dw-material] .dw-breadcrumb a {
    color: var(--dw-color-text-muted);
    /* Underlined: in muted text a link is not told from the words beside it by
       colour alone (axe link-in-text-block, WCAG 1.4.1). */
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
    text-underline-offset: 2px;
}

:root[data-dw-material] .dw-breadcrumb a:hover {
    color: var(--dw-color-text);
    text-decoration: underline;
}

/* The header and the drawer carry the shell's depth: a hairline in the
   material's border role and the material's own shadow (Glass casts one, Mica
   and Soft Tonal set none). The drawer is painted once, by MudBlazor from the
   Navigation surface; app.css's sheet on its content would stack a second
   translucent layer over it, so it goes. */
:root[data-dw-material] .mud-appbar {
    border-bottom: 1px solid var(--dw-color-border);
    box-shadow: var(--dw-shadow-bar);
}

:root[data-dw-material] .mud-drawer {
    box-shadow: var(--dw-shadow-nav);
}

:root[data-dw-material] .dw-workspace-drawer .mud-drawer-content {
    background: transparent;
}

/* Navigation selected (Web#361): its own surface, beside the action rail app.css
   already draws, so the selected page is told apart by more than a colour. */
:root[data-dw-material] .dw-module-nav a {
    transition: background-color var(--dw-motion-fast);
}

:root[data-dw-material] .dw-module-nav a.active {
    background: var(--dw-color-nav-selected);
}

/* Dropdowns -- MudBlazor's menus, selects and other popovers -- are solid
   (owner decision on Web#363, 2026-11-07): the Secondary surface laid over the
   canvas colour, as dialogs, typeahead lists and the command overflow already
   are. Translucent, Glass light's action colour measured 4.34:1 on a popover
   over the navigation glow; solid, nothing behind a dropdown shows through
   and the approved accent stands. */
:root[data-dw-material] .mud-popover {
    background: var(--dw-fill-raised-solid);
}

/* The shell's own floating surfaces take the same decision (Web#366 pilot).
   The user menu is a native details element, not a MudBlazor popover, so the
   rule above never reached it: under Glass the page and the canvas glow showed
   through its text. The skip link floats over the header when focused. Both
   are the Primary surface, as app.css paints them, made opaque. */
:root[data-dw-material] .dw-user-card,
:root[data-dw-material] .dw-skip-link {
    background: var(--dw-fill-surface-solid);
}

/* The wordmark PNG carries a solid black background, which reads as a black
   box on a light or translucent header (Web#366 pilot). Under a material the
   same image with that black made transparent is drawn instead; the current
   theme keeps the original file, pixel for pixel. */
:root[data-dw-material] img.dw-wordmark {
    content: url("/dosseyworks-wordmark-transparent.png");
}

/* The command bar is the Secondary surface made solid (Web#421): standing on
   the canvas, a translucent bar put the exceptional command's danger colour
   at 3.97:1 over Glass Indigo's glows, and a state colour is not a material's
   to change. Over the canvas it still reads as the Lab's pale bar. */
:root[data-dw-material] .dw-command-bar {
    background: var(--dw-fill-raised-solid);
    backdrop-filter: blur(calc(var(--dw-blur-control) * var(--dw-transparency)));
}

/* PAGE-LOCAL EXCEPTION (Web#368; listed in IMPLEMENTATION-CONTRACT.md
   section 9): the work-order packet. It is the traveler a supervisor prints
   and the shop floor scans, so it is the print sheet on screen as well: black
   ink on white paper under every material, light or dark, exactly as the
   current theme draws it in light. Without this its paper was the material's
   translucent surface and, in dark mode, the black ink sat on it. */
:root[data-dw-material] .dw-packet {
    background: var(--dw-color-paper);
    color: var(--dw-color-ink);
}

/* Neutral is its own role under a material (Web#361); the current theme
   keeps app.css's pairing. */
:root[data-dw-material] .dw-status.neutral {
    background: var(--dw-color-neutral-tint);
    color: var(--dw-color-neutral-ink);
}
