/* @vahary/tokens — MudBlazor bridge. Load AFTER vahary.css and MudBlazor's own CSS.
   Covers the pieces the C# MudTheme intentionally doesn't set (font on every role, no button
   uppercase, mono for data cells) so it stays version-proof. */
.mud-typography, .mud-input, .mud-input-control, .mud-button-root, .mud-nav-link,
.mud-table, .mud-tabs, .mud-chip, .mud-alert, .mud-tooltip, .mud-menu-item, .mud-list-item {
  font-family: var(--v-font-body);
}
.mud-button-root { text-transform: none; letter-spacing: 0; }
/* IDs, timestamps, telemetry render in the data face */
.v-data, .mud-table-cell.v-data, code, kbd, .mud-input.v-data input { font-family: var(--v-font-data); }
/* Machined Truth: no hover-lift shadows on cards/paper (MOTION.md). Interactive feedback is colour/inset. */
.mud-paper.v-flat { box-shadow: none; }

/* --- keyboard focus ring (WCAG 2.4.7) -------------------------------------------------
   MudBlazor 9 ships `outline:0` on its interactive primitives — bare `button`, the shared
   `.mud-button-root`, `a:focus-visible{outline:none}`, `.mud-input-root:focus` and friends.
   All of those outrank the zero-specificity :focus-visible baseline in vahary.css, so buttons,
   links and nav items had no keyboard focus indicator at all.

   Text fields are the exception: MudBlazor does indicate them, via
   `.mud-input:focus-within.mud-input-underline:after{transform:scaleX(1)}`. The ring here is
   deliberate on top of that — the underline is an edge-only cue drawn in
   --mud-palette-primary, so without this a tabbed-to field would be the one control in the
   console indicating differently, and in a colour outside the brand focus token.

   Restore the baseline's ring and geometry. Keyed on :focus-visible, so pointer clicks stay
   ringless. Each selector is pitched just high enough to clear MudBlazor's, and this sheet
   loads after MudBlazor.min.css, so ties fall our way. Products still override: app.css
   loads later, which is what keeps .kpi-tile and the auth inputs on their own treatment.

   Authored in Blueprint/HQ/Studio against a real browser (the measurements in the inset rule
   below are theirs) and promoted here 2026-08-26 by the UI conformance audit, UIC-01: it had
   lived in three hand-edited copies of this sheet while the generated one — the version four
   other products consumed — still shipped without it. */
/* The tabindex arm is wrapped in :where() on purpose. Bare, `[tabindex]:not([tabindex="-1"])`
   is (0,2,0) — the attribute plus the :not() argument — and :is() adopts its most specific
   arm, which would drag this whole rule to (0,3,0). At that weight it silently outranks
   (0,2,0) product overrides that are meant to win: .kpi-tile:focus-visible in app.css, and
   the inset-offset rule below. :where() contributes 0, leaving (0,1,1) — still enough to
   clear MudBlazor's `a:focus-visible` and `button:focus` on load order. */
:is(a, button, summary, :where([tabindex]:not([tabindex="-1"]))):focus-visible,
.mud-button-root:focus-visible,
.mud-nav-link:focus-visible,
.mud-icon-button:focus-visible,
.mud-chip:focus-visible,
.mud-list-item-clickable:focus-visible,
.mud-table-row:focus-visible,
.mud-treeview-item:focus-visible,
.mud-expand-panel .mud-expand-panel-header:focus-visible,
.mud-stepper-step-button:focus-visible,
.mud-rating-root:focus-visible,
/* Date-picker year/month cells suppress their outline too. The day cells are .mud-button-root
   and so are already covered above; these two grids are not. Unverified — reaching them needs
   the picker open, which the preview pane would not stay up for. */
.mud-picker-year-container .mud-picker-year:focus-visible,
.mud-picker-month-container .mud-picker-month:focus-visible,
/* The field's ring goes on the wrapper, not the bare <input> — an outline on the inner
   element would draw inside the field box. :has() keeps it keyboard-only. */
.mud-input:has(:focus-visible) {
  outline: 2px solid var(--v-color-border-focus);
  outline-offset: 2px;
}

/* Items that span the full width of a scroll container get the ring drawn INSIDE the box.
   An outset ring is clipped there: measured on /dealers, all 33 drawer nav links lose the
   left edge outright (19 also lose the bottom), and all 26 table rows lose both left and
   right — leaving two detached horizontal lines rather than a ring. Buttons, chips and
   field wrappers sit inset within their containers with room to spare, so they keep the
   outset ring above. Colour and width are inherited from it; only the offset flips. */
.mud-nav-link:focus-visible,
.mud-table-row:focus-visible {
  outline-offset: -2px;
}
