/* The admin website's styles (docs/architecture.md §13.9.1): tokens for light and dark that carry NeoUI's own look (neoui.io:
   neutral greys, a monochrome primary, Geist at 14 px), text contrast ≥ 4.5:1 and icons ≥ 3:1, states as icon + text + colour.
   NeoUI's components keep NeoUI's sizes and colours (nothing here re-pads or re-colours them). Pages add their own styles in
   scoped .razor.css files.

   Admin UI conventions (docs/ui.md has the long form with examples). Every area follows these:

   Breakpoints (CSS custom media cannot be used, so media queries repeat these numbers; "below" = max-width: N - 0.02px):
     sm  600 px   below: phone (dialogs full screen, page header stacks, help tips as a bottom sheet)
     md  768 px   below: tables become cards, the header shows a menu button instead of the navigation
     lg 1100 px   from: the macro editor's three columns
     xl 1280 px   from: two-column page layouts (.mi-split, .mi-form-grid)
     xxl 1600 px  from: three columns where a page has the cards for it
   Container: .mi-main is at most 1920 px wide with fluid side padding (--mi-container-pad); only prose is capped (.mi-prose, 75ch).
   Spacing: --mi-space-1 … -6 = .25/.5/.75/1/1.5/2 rem; sections are --mi-space-5 apart; a card's padding is --mi-card-py --mi-card-px.
   Type: body, tables and meta lines 0.875rem (14 px); h1 1.25rem, h2 1rem, h3 0.875rem, all semibold; hints 0.8125rem.
   Density: table rows 36–40 px (--mi-row), one line per item unless it is a problem; an OK state is not repeated on every row.
   Help text: a label's or a heading's hint is behind the HelpTip component ("?") next to it, never a line under it; longer help
   goes behind <details>.
   Buttons: one primary per view; small secondary buttons for row actions; no underlined text in buttons.
   Building blocks: PageHeader (.mi-page__head), HelpTip (.mi-helptip), .mi-split, .mi-grid, .mi-form-grid, .mi-stack, .mi-card,
   .mi-toolbar, .mi-table (+ --sticky, --dense, .mi-rowlink), .mi-tabs, .mi-dialog, .mi-savebar, .mi-prose, .mi-meta, .mi-hint;
   buttons, badges, chips, switches and fields are NeoUI's.
   Text is never cut off (no ellipsis, line-clamp or nowrap + overflow: hidden): it wraps, long tokens (paths, titles, numbers)
   with overflow-wrap: anywhere; only short fixed labels (times, counts, badges, shortcuts) stay on one line. A label's hint is
   not a line under it: it is behind a "?" (HelpTip) next to the label.
   Area-specific styles go in the component's scoped .razor.css, or in a section of this file named after the area.
   Light and dark (docs/ui.md "Light and dark"): every colour is a token below. <html data-theme="light|dark"> (the admin's
   "Udseende", rendered by the server from its cookie) overrides the system's prefers-color-scheme; without it the page follows
   the system live. The dark values are written twice (the media query and [data-theme="dark"]; a test keeps them equal). New CSS
   uses tokens only: no colour of its own in a prefers-color-scheme query, no hex colour that only suits one theme. */

/* Geist and Geist Mono (Vercel, SIL Open Font License 1.1, lib/geist/LICENSE): the typeface of neoui.io, served by the website
   (font-src 'self'; no Google Fonts). Variable fonts: one file per family for every weight. */
@font-face {
  font-family: "Geist";
  src: url("../lib/geist/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../lib/geist/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* The look is NeoUI's own (neoui.io, product owner 2026-11: "more like the ones on the neoui.io page"): its neutral greys,
   a monochrome primary (near-black in light, near-white in dark), thin grey borders, Geist at 14 px. The values are NeoUI's
   neutral/zinc theme, darkened where a text needs 4.5:1 (the muted grey) or a control keeps its outline visible (--mi-input). */
:root {
  color-scheme: light dark;
  --mi-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mi-font-mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --mi-bg: #ffffff;
  /* Cards, popovers, menus and help tips (NeoUI's --card, --popover): the page's white in light, one step up in dark. */
  --mi-card: #ffffff;
  --mi-surface: #f5f5f5;
  --mi-surface-2: #ebebeb;
  --mi-text: #0a0a0a;
  --mi-text-muted: #666666;
  /* Hairlines and card borders, and (--mi-input) the outline of a field, a select, a check box or a switch's track. */
  --mi-border: #e5e5e5;
  --mi-input: #cccccc;
  --mi-focus: #737373;
  --mi-link: #0a0a0a;
  --mi-accent: #171717;
  --mi-ok: #146c2e;
  --mi-ok-bg: #e9f6ec;
  --mi-info: #0b5cad;
  --mi-info-bg: #ebf2fb;
  --mi-warn: #f2b705;
  --mi-warn-text: #5c4300;
  --mi-warn-bg: #fff7dc;
  --mi-error: #c81e1e;
  --mi-error-bg: #fdeeec;
  --mi-grey: #737373;
  --mi-online: #1a7f37;
  --mi-accent-hover: #383838;
  --mi-on-accent: #fafafa;
  /* Text on --mi-error (the danger button), the POST method's colour, the dark code block (curl preview), the canvas's marks on
     strong colours. */
  --mi-on-error: #ffffff;
  --mi-http-post: #8a4b00;
  --mi-code-bg: #171717;
  --mi-code-text: #ededed;
  --mi-code-border: transparent;
  --mi-canvas-on-strong: #ffffff;
  /* Charts (Shared/Charts, docs/ui.md "Charts"). Series 1-3: identity (blue, orange, aqua), stepped per theme and validated together
     against the card's surface for colour-blind separation. good / warn / bad / neutral: state (the same in both themes), always with
     a legend, a texture on warn and bad, and the table view - never colour alone. */
  --mi-chart-1: #2a78d6;
  --mi-chart-2: #eb6834;
  --mi-chart-3: #1baf7a;
  --mi-chart-good: #0ca30c;
  --mi-chart-warn: #fab219;
  --mi-chart-bad: #d03b3b;
  --mi-chart-neutral: #898781;
  --mi-chart-on: #ffffff;
  --mi-chart-on-warn: #0b0b0b;
  /* NeoUI's radius (--radius 0.625rem): controls rounded-md 8 px, cards rounded-xl 14 px. */
  --mi-radius: 8px;
  --mi-radius-card: 14px;
  --mi-shadow-pop: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  /* Spacing: sections are --mi-space-5 apart, a card's padding is .75rem 1rem (--mi-space-3 --mi-space-4). */
  --mi-space-1: 0.25rem;
  --mi-space-2: 0.5rem;
  --mi-space-3: 0.75rem;
  --mi-space-4: 1rem;
  --mi-space-5: 1.5rem;
  --mi-space-6: 2rem;
  --mi-gap: var(--mi-space-3);

  /* Type scale: NeoUI's text-sm (14 px) is the body, the headings are small and semibold. */
  --mi-text-body: 0.875rem;
  --mi-text-h1: 1.25rem;
  --mi-text-h2: 1rem;
  --mi-text-h3: 0.875rem;
  --mi-text-meta: 0.875rem;
  --mi-text-hint: 0.8125rem;
  --mi-text-small: 0.75rem;

  /* Density: a table row or list item 36–40 px, a control (button, input in a toolbar) 36 px. */
  --mi-row: 2.5rem;
  --mi-row-dense: 2.25rem;
  --mi-control: 2.25rem;
  /* A card's padding (NeoUI's Card made a little more compact: a tool, not a document), 1rem across on a phone. */
  --mi-card-px: 1.25rem;
  --mi-card-py: 1rem;

  /* Frame. */
  --mi-header-height: 3.5rem;
  --mi-container-max: 1920px;
  --mi-container-pad: clamp(1rem, 2vw, 2rem);
  --mi-prose: 75ch;
}

/* ===== Theme tokens: light (above, the default), dark when the system is dark and no light choice, dark by choice. ===== */
:root[data-theme="light"] { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --mi-bg: #0a0a0a;
    --mi-card: #171717;
    --mi-surface: #262626;
    --mi-surface-2: #333333;
    --mi-text: #fafafa;
    --mi-text-muted: #a1a1a1;
    --mi-border: #2e2e2e;
    --mi-input: #3d3d3d;
    --mi-focus: #a3a3a3;
    --mi-link: #fafafa;
    --mi-accent: #e5e5e5;
    --mi-ok: #6fd08c;
    --mi-ok-bg: #12291a;
    --mi-info: #8ab4f8;
    --mi-info-bg: #14202f;
    --mi-warn: #f2c94c;
    --mi-warn-text: #f2d27a;
    --mi-warn-bg: #33290a;
    --mi-error: #ff8a80;
    --mi-error-bg: #361412;
    --mi-grey: #8a8a8a;
    --mi-online: #6fd08c;
    --mi-accent-hover: #d4d4d4;
    --mi-on-accent: #171717;
    --mi-on-error: #1b0b0a;
    --mi-http-post: #f2c94c;
    --mi-code-bg: #0a0a0a;
    --mi-code-border: var(--mi-border);
    --mi-canvas-on-strong: #0a0a0a;
    --mi-chart-1: #3987e5;
    --mi-chart-2: #d95926;
    --mi-chart-3: #199e70;
    --mi-shadow-pop: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.35);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --mi-bg: #0a0a0a;
  --mi-card: #171717;
  --mi-surface: #262626;
  --mi-surface-2: #333333;
  --mi-text: #fafafa;
  --mi-text-muted: #a1a1a1;
  --mi-border: #2e2e2e;
  --mi-input: #3d3d3d;
  --mi-focus: #a3a3a3;
  --mi-link: #fafafa;
  --mi-accent: #e5e5e5;
  --mi-ok: #6fd08c;
  --mi-ok-bg: #12291a;
  --mi-info: #8ab4f8;
  --mi-info-bg: #14202f;
  --mi-warn: #f2c94c;
  --mi-warn-text: #f2d27a;
  --mi-warn-bg: #33290a;
  --mi-error: #ff8a80;
  --mi-error-bg: #361412;
  --mi-grey: #8a8a8a;
  --mi-online: #6fd08c;
  --mi-accent-hover: #d4d4d4;
  --mi-on-accent: #171717;
  --mi-on-error: #1b0b0a;
  --mi-http-post: #f2c94c;
  --mi-code-bg: #0a0a0a;
  --mi-code-border: var(--mi-border);
  --mi-canvas-on-strong: #0a0a0a;
  --mi-chart-1: #3987e5;
  --mi-chart-2: #d95926;
  --mi-chart-3: #199e70;
  --mi-shadow-pop: 0 4px 6px -1px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.35);
}
/* ===== End of theme tokens ===== */

/* ===== NeoUI bridge (docs/ui.md "NeoUI"): NeoUI's colours, radius and fonts are the --mi-* tokens above, so NeoUI's components,
   the website's own markup and the editor's canvas (which reads the tokens) have one look, in light and dark. The tokens carry
   NeoUI's own neutral look (neoui.io: neutral greys and a monochrome primary; App.razor loads base/neutral.css and no primary
   file) and stay the one place a colour is defined (they follow data-theme and the system); NeoUI's dark: variants follow the
   class "dark" that js/theme-sync.js keeps in step with data-theme. Never set a NeoUI colour variable anywhere else. ===== */
:root {
  --background: var(--mi-bg);
  --foreground: var(--mi-text);
  --card: var(--mi-card);
  --card-foreground: var(--mi-text);
  --popover: var(--mi-card);
  --popover-foreground: var(--mi-text);
  --primary: var(--mi-accent);
  --primary-foreground: var(--mi-on-accent);
  --secondary: var(--mi-surface);
  --secondary-foreground: var(--mi-text);
  --muted: var(--mi-surface);
  --muted-foreground: var(--mi-text-muted);
  --accent: var(--mi-surface);
  --accent-foreground: var(--mi-text);
  --destructive: var(--mi-error);
  --destructive-foreground: var(--mi-on-error);
  --border: var(--mi-border);
  --input: var(--mi-input);
  --ring: var(--mi-focus);
  --selection: Highlight;
  --selection-foreground: HighlightText;
  /* Alert and Badge (the soft variants; the solid ones put white text on these, so they are not used). */
  --alert-success: var(--mi-ok);
  --alert-success-foreground: var(--mi-text);
  --alert-success-bg: var(--mi-ok-bg);
  --alert-info: var(--mi-info);
  --alert-info-foreground: var(--mi-text);
  --alert-info-bg: var(--mi-info-bg);
  --alert-warning: var(--mi-warn-text);
  --alert-warning-foreground: var(--mi-text);
  --alert-warning-bg: var(--mi-warn-bg);
  --alert-danger: var(--mi-error);
  --alert-danger-foreground: var(--mi-text);
  --alert-danger-bg: var(--mi-error-bg);
  /* NeoUI's radius scale: rounded-md (controls) is --mi-radius = 0.8 × --radius, rounded-xl (cards) --mi-radius-card = 1.4 × --radius. */
  --radius: calc(var(--mi-radius) / 0.8);
  --font-sans: var(--mi-font);
  --font-heading: var(--mi-font);
  --font-mono: var(--mi-font-mono);
  --default-font-family: var(--mi-font);
  --default-mono-font-family: var(--mi-font-mono);
}

/* NeoUI's stylesheet starts with Tailwind's reset (its @layer base): no margins, no list bullets, headings in body text, borders
   and backgrounds off on buttons and fields, images and icons as blocks. The website's own markup was written for the browser's
   defaults, so it keeps them: an element with no class or whose first class is an mi- class (all of the website's own markup)
   gets the browser's value back, in the same layer, after the reset. NeoUI's elements always start their class list with
   NeoUI's classes (a Class parameter is appended), so they keep the reset. Unlayered rules (this file, the scoped .razor.css)
   still win over both. When the last legacy element of a kind is ported, remove its line. */
@layer base {
  :is(h1, h2, h3, h4, h5, h6):where(:not([class]), [class=""], [class^="mi-"]) { font-size: revert; font-weight: revert; margin-block: revert; }
  :is(p, blockquote, figure, pre, dl):where(:not([class]), [class=""], [class^="mi-"]) { margin: revert; }
  dd:where(:not([class]), [class=""], [class^="mi-"]) { margin: revert; }
  :is(ul, ol, menu):where(:not([class]), [class=""], [class^="mi-"]) { list-style: revert; margin: revert; padding: revert; }
  :is(img, svg, video, canvas, audio, iframe, embed, object):where(:not([class]), [class=""], [class^="mi-"]) { display: revert; vertical-align: revert; }
  :is(button, input, select, optgroup, textarea):where(:not([class]), [class=""], [class^="mi-"]) {
    font: revert; letter-spacing: revert; color: revert; background-color: revert; border: revert; border-radius: revert; padding: revert; margin: revert;
  }
  textarea:where(:not([class]), [class=""], [class^="mi-"]) { resize: revert; }
  :is(fieldset, legend):where(:not([class]), [class=""], [class^="mi-"]) { margin: revert; padding: revert; border: revert; }
  hr:where(:not([class]), [class=""], [class^="mi-"]) { height: revert; color: revert; border: revert; margin: revert; }
  dialog:where(:not([class]), [class=""], [class^="mi-"]) { margin: revert; padding: revert; border: revert; }
  a:where(:not([class]), [class=""], [class^="mi-"]) { text-decoration: revert; }
  table:where(:not([class]), [class=""], [class^="mi-"]) { text-indent: revert; border-collapse: revert; }
  :is(td, th, caption):where(:not([class]), [class=""], [class^="mi-"]) { padding: revert; }
}
/* ===== End of the NeoUI bridge ===== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--mi-bg);
  color: var(--mi-text);
  font-family: var(--mi-font);
  font-size: 100%;
  line-height: 1.45;
}
/* NeoUI's density: the page's text is text-sm (14 px, 20 px lines); rem sizes (NeoUI's own) stay on the 16 px root. */
body { font-size: var(--mi-text-body); line-height: 1.43; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Element defaults in the base layer (after NeoUI's reset), so NeoUI's own classes win over them on NeoUI's elements. Links as
   on neoui.io: the text's colour, underlined a little below the text (a link in a sentence is never colour alone). */
@layer base {
  a { color: var(--mi-link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }

  :focus-visible { outline: 2px solid var(--mi-focus); outline-offset: 2px; }

  h1 { font-size: var(--mi-text-h1); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 var(--mi-space-3); }
  h1:focus { outline: none; }
  h2 { font-size: var(--mi-text-h2); font-weight: 600; line-height: 1.35; }
  h3 { font-size: var(--mi-text-h3); font-weight: 600; line-height: 1.4; }

  code { font-family: var(--mi-font-mono); font-size: 0.9em; overflow-wrap: anywhere; }
}

.mi-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.mi-skip { position: absolute; left: -9999px; top: 0; }
.mi-skip:focus { left: 0.5rem; top: 0.5rem; z-index: 100; background: var(--mi-bg); padding: 0.5rem; }

/* Boot: static text until WebAssembly runs (§13.9.3). */
.mi-booting { margin: 2rem; color: var(--mi-text-muted); }
html[data-interactive="true"] #mi-booting { display: none; }

.mi-app-error { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: 0.75rem 1rem; background: var(--mi-error-bg); color: var(--mi-text); border-top: 2px solid var(--mi-error); z-index: 1000; }
.mi-app-error .reload { margin-left: 1rem; }

/* Frame: the header bar (laid out in Layout/MainLayout.razor.css), the navigation, the page container. As neoui.io's top bar:
   the brand in semibold, the pages as quiet muted links (medium weight), the current one in the text colour on NeoUI's accent. */
.mi-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--mi-text); text-decoration: none; font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }
/* The mark before the brand's name (Shared/BrandMark.razor, the favicon in the page's colours): a dark tile in light, a light one in dark. */
.mi-brandmark { flex: none; width: 1.5rem; height: 1.5rem; }
.mi-brandmark__tile { fill: var(--mi-text); }
.mi-brandmark__ink { stroke: var(--mi-bg); }
.mi-brandmark__node { fill: var(--mi-bg); }
.mi-nav { display: flex; align-items: center; }
.mi-nav__list { display: flex; flex-wrap: wrap; gap: 0.125rem; list-style: none; margin: 0; padding: 0; }
.mi-nav__link { display: inline-block; padding: 0.375rem 0.625rem; border-radius: var(--mi-radius); color: var(--mi-text-muted); font-weight: 500; text-decoration: none; transition: color 0.15s, background-color 0.15s; }
.mi-nav__link:hover { color: var(--mi-text); background: var(--mi-surface); }
.mi-nav__link.active { color: var(--mi-text); background: var(--mi-surface); }
/* "Mere" (NeoUI's DropdownMenu; its list is in the overlay host): the button as compact as the links, the pages as NeoUI's items. */
.mi-nav__more-button { display: inline-flex; align-items: center; gap: 0.35rem; height: auto; padding: 0.375rem 0.625rem; color: var(--mi-text-muted); font-size: inherit; font-weight: 500; }
.mi-nav__more-button:hover, .mi-nav__more-button[aria-expanded="true"] { color: var(--mi-text); background: var(--mi-surface); }
.mi-nav__menu { min-width: 13rem; }
.mi-nav__menu > div { display: grid; gap: 1px; }
.mi-nav__menu-link { display: block; padding: 0.375rem 0.5rem; border-radius: calc(var(--mi-radius) - 2px); color: var(--mi-text); text-decoration: none; outline: none; }
.mi-nav__menu-link:hover, .mi-nav__menu-link:focus { background: var(--mi-surface); }
.mi-nav__menu-link:focus-visible { box-shadow: 0 0 0 2px var(--mi-focus); }
.mi-nav__menu-link.active { font-weight: 600; background: var(--mi-surface); }
/* Below 768 px: one "Menu" button (☰) with every page, so the header stays one row (≤ 56 px). */
.mi-nav__toggle { display: none; }
.mi-nav__toggle[aria-expanded="true"] { background: var(--mi-surface); }
.mi-nav__panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 46; list-style: none; margin: 0; padding: var(--mi-space-2) var(--mi-container-pad) var(--mi-space-3); background: var(--mi-bg); border-bottom: 1px solid var(--mi-border); box-shadow: var(--mi-shadow-pop); }
.mi-nav__panel-link { display: flex; align-items: center; min-height: 2.75rem; padding: 0 var(--mi-space-3); border-radius: var(--mi-radius); color: var(--mi-text-muted); font-weight: 500; text-decoration: none; }
.mi-nav__panel-link:hover, .mi-nav__panel-link:focus-visible { color: var(--mi-text); background: var(--mi-surface); }
.mi-nav__panel-link.active { color: var(--mi-text); background: var(--mi-surface); }
@media (max-width: 767.98px) {
  .mi-nav { order: -1; }
  .mi-nav__toggle { display: inline-flex; }
  .mi-nav__list { display: none; }
}
@media (min-width: 768px) {
  .mi-nav__panel { display: none; }
}

/* The header's search button (a NeoUI Button in Layout/MainLayout.razor; scoped CSS does not reach a component's markup): below 768 px only. */
.mi-header__search-toggle { display: none; margin-left: auto; }
@media (max-width: 767.98px) { .mi-header__search-toggle { display: inline-flex; } }

.mi-main { padding: var(--mi-space-5) var(--mi-container-pad) var(--mi-space-6); max-width: var(--mi-container-max); margin: 0 auto; }
/* The macro editor uses the whole window: the canvas gets every pixel the macro list and the side panel leave. */
.mi-main:has(.mi-editor) { max-width: none; }

/* The login page: one card (NeoUI's Card: rounded-xl, a thin border, shadow-sm) in the middle of the page's background. */
.mi-login-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: start center; padding: clamp(1rem, 10vh, 7rem) var(--mi-container-pad) var(--mi-space-6); background: var(--mi-bg); }
.mi-login-page .mi-main { width: min(100%, 24rem); padding: 0; margin: 0; }
.mi-login { padding: var(--mi-space-5); border: 1px solid var(--mi-border); border-radius: var(--mi-radius-card); background: var(--mi-card); box-shadow: var(--shadow-sm); }
.mi-login .mi-brand { display: flex; margin: 0 0 var(--mi-space-4); color: var(--mi-text-muted); font-size: var(--mi-text-body); font-weight: 500; }
.mi-login h1 { margin-bottom: var(--mi-space-4); }
.mi-login .mi-form { gap: var(--mi-space-4); }
@media (max-width: 599.98px) {
  .mi-login-page { padding-top: var(--mi-space-4); background: var(--mi-bg); }
  .mi-login { padding: 0; border: 0; box-shadow: none; }
}

/* ===== Design system: layout building blocks (area A; docs/ui.md) ===== */

/* A vertical stack with even gaps; .mi-stack--sections puts sections --mi-space-5 apart. */
.mi-stack { display: grid; gap: var(--mi-space-4); min-width: 0; align-content: start; }
.mi-stack--tight { gap: var(--mi-space-2); }
.mi-stack--sections { gap: var(--mi-space-5); }
.mi-section { min-width: 0; }
.mi-section + .mi-section { margin-top: var(--mi-space-5); }
.mi-section__title { margin: 0 0 var(--mi-space-3); font-size: var(--mi-text-h2); }

/* Main + side column from xl (1280): .mi-split__main and .mi-split__side; one column below. --side-start puts the side first. */
.mi-split { display: grid; gap: var(--mi-space-5); align-items: start; min-width: 0; }
.mi-split > * { min-width: 0; }
@media (min-width: 1280px) {
  .mi-split { grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem); }
  .mi-split--side-start { grid-template-columns: minmax(20rem, 26rem) minmax(0, 1fr); }
  .mi-split--halves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Cards that fill the row: as many 22rem columns as fit (one on a phone); --narrow 16rem, --wide 30rem. */
.mi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr)); gap: var(--mi-space-4); min-width: 0; }
.mi-grid--narrow { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.mi-grid--wide { grid-template-columns: repeat(auto-fit, minmax(min(30rem, 100%), 1fr)); }
.mi-grid > * { min-width: 0; }

/* Form fields in two columns from xl (1280), three with --3 from xxl (1600); .mi-form-grid__full spans the row. */
.mi-form-grid { display: grid; gap: var(--mi-space-4) var(--mi-space-5); align-items: start; min-width: 0; }
.mi-form-grid > * { min-width: 0; }
.mi-form-grid__full { grid-column: 1 / -1; }
@media (min-width: 1280px) { .mi-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .mi-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* A card (NeoUI's Card look): rounded-xl, a thin border, the card colour, no heavy shadow; --mi-card-px/-py are its padding (the
   parts that reach its edges, __sub, __band, __foot, use them too). .mi-card__head is a title row with actions on the right. */
.mi-card { padding: var(--mi-card-py) var(--mi-card-px); border: 1px solid var(--mi-border); border-radius: var(--mi-radius-card); background: var(--mi-card); color: var(--mi-text); box-shadow: var(--shadow-xs); min-width: 0; }
.mi-card--muted { background: var(--mi-surface); }
@media (max-width: 599.98px) { :root { --mi-card-px: 1rem; } }
.mi-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--mi-space-2) var(--mi-space-3); margin: 0 0 var(--mi-space-3); }
.mi-card__title { margin: 0; font-size: var(--mi-text-h2); font-weight: 600; line-height: 1.35; letter-spacing: -0.005em; }
/* Section cards (docs/ui.md "Section cards"): a page's parts as cards with one header pattern — .mi-card__head holds the title
   (with its count, .mi-count, and its "?" in a .mi-titletip) on the left and the card's actions (.mi-card__actions, at most one
   primary) on the right. .mi-card__sub is a part of the card under a full-width hairline with a small muted label
   (.mi-card__label); .mi-card__band a muted strip across the card (filters); .mi-card__foot a muted footer line ("Sidst ændret …",
   links). --problem / --error put a coloured edge on the left (the state is still said in words inside). */
.mi-card__head > .mi-titletip { flex: 1 1 auto; }
.mi-card__head > .mi-titletip > .mi-card__title { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2); }
.mi-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--mi-space-2); }
.mi-card__sub { margin: var(--mi-space-3) calc(-1 * var(--mi-card-px)) 0; padding: var(--mi-space-3) var(--mi-card-px) 0; border-top: 1px solid var(--mi-border); min-width: 0; }
.mi-card__label { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2); margin: 0 0 var(--mi-space-2); color: var(--mi-text-muted); font-size: var(--mi-text-hint); font-weight: 500; }
.mi-card__band { margin: 0 calc(-1 * var(--mi-card-px)) var(--mi-space-3); padding: var(--mi-space-2) var(--mi-card-px); border-block: 1px solid var(--mi-border); background: var(--mi-surface); min-width: 0; }
.mi-card__band > .mi-toolbar { margin: 0; }
.mi-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-1) var(--mi-space-3); margin: var(--mi-space-3) calc(-1 * var(--mi-card-px)) calc(-1 * var(--mi-card-py)); padding: var(--mi-space-2) var(--mi-card-px); border-top: 1px solid var(--mi-border); border-radius: 0 0 var(--mi-radius-card) var(--mi-radius-card); background: var(--mi-surface); color: var(--mi-text-muted); font-size: var(--mi-text-hint); }
.mi-card--problem { box-shadow: inset 3px 0 0 var(--mi-warn); }
.mi-card--error { box-shadow: inset 3px 0 0 var(--mi-error); }
/* A count next to a title ("PC'er 7"): a small pill with tabular numbers. */
.mi-count { flex: none; min-width: 1.375rem; padding: 0 0.4rem; border-radius: 999px; background: var(--mi-surface); color: var(--mi-text-muted); font-size: var(--mi-text-small); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.375rem; text-align: center; }
/* Facts: label over value side by side, wrapping onto more rows when they do not fit (a PC's connection, who is logged in, macros,
   health); one column on a phone. A dl: div.mi-facts__item > dt.mi-facts__label + dd.mi-facts__value. A long value (a sentence in a
   badge) wraps inside its column. */
.mi-facts { display: flex; flex-wrap: wrap; gap: var(--mi-space-3) var(--mi-space-6); margin: 0; min-width: 0; }
.mi-facts__item { display: grid; align-content: start; gap: var(--mi-space-1); flex: 1 1 auto; min-width: 0; }
.mi-facts__value .mi-connection { flex-wrap: wrap; white-space: normal; }
.mi-facts__value .mi-badge { white-space: normal; align-items: baseline; }
.mi-facts__label { color: var(--mi-text-muted); font-size: var(--mi-text-hint); font-weight: 500; }
.mi-facts__value { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-1) var(--mi-space-2); margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* A heading and its "?" (HelpTip) side by side, the "?" outside the heading so the heading's name stays its text. */
.mi-titletip { display: flex; align-items: center; gap: var(--mi-space-2); min-width: 0; }
.mi-titletip > :is(h1, h2, h3, h4) { min-width: 0; overflow-wrap: anywhere; }

/* Text helpers. */
.mi-prose { max-width: var(--mi-prose); }
.mi-meta { color: var(--mi-text-muted); font-size: var(--mi-text-meta); }
.mi-hint { color: var(--mi-text-muted); font-size: var(--mi-text-hint); }
.mi-nowrap { white-space: nowrap; }
.mi-num { font-variant-numeric: tabular-nums; }

/* A toolbar or filter row: one row that wraps gracefully. Controls are compact (--mi-control high); .mi-toolbar__grow takes
   the free space (a search box), .mi-toolbar__end pushes what follows to the right. Labels sit inline before their control. */
.mi-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2) var(--mi-space-3); min-width: 0; margin: 0 0 var(--mi-space-3); }
.mi-toolbar > * { min-width: 0; }
.mi-toolbar__group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2); }
.mi-toolbar__grow { flex: 1 1 14rem; max-width: 28rem; }
.mi-toolbar__grow > input { width: 100%; }
.mi-toolbar__end { margin-left: auto; }
.mi-toolbar label { display: inline-flex; align-items: center; gap: var(--mi-space-1); white-space: nowrap; }

/* A sticky save bar at the bottom of a long form: the form's Gem/Fortryd stay in reach. */
.mi-savebar { position: sticky; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2) var(--mi-space-3); margin-top: var(--mi-space-4); padding: var(--mi-space-3) 0; background: var(--mi-bg); border-top: 1px solid var(--mi-border); }
.mi-savebar__status { color: var(--mi-text-muted); font-size: var(--mi-text-meta); }
.mi-savebar__actions { display: flex; flex-wrap: wrap; gap: var(--mi-space-2); margin-left: auto; }

/* The page header (Shared/PageHeader.razor): breadcrumbs, the h1 with an optional status chip and help tip, actions on the
   right (at most one primary), one meta line; ≤ ~110 px. .mi-page__head--compact is one row (the editors). The old markup
   (h1, .mi-page__meta and .mi-page__head-actions directly inside .mi-page__head) lays out the same way. */
.mi-page__head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "crumbs crumbs" "title actions" "meta actions";
  align-items: center; gap: var(--mi-space-1) var(--mi-space-4); margin: 0 0 var(--mi-space-4); min-width: 0;
}
.mi-page__head > .mi-breadcrumbs { grid-area: crumbs; }
.mi-page__head .mi-breadcrumbs ol { margin: 0; }
.mi-page__head > h1, .mi-page__title { grid-area: title; }
.mi-page__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2) var(--mi-space-3); min-width: 0; }
.mi-page__head h1 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mi-page__status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2); }
.mi-page__head > .mi-page__actions, .mi-page__head > .mi-page__head-actions { grid-area: actions; justify-self: end; }
.mi-page__head > .mi-page__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--mi-space-2); }
.mi-page__head > .mi-page__meta { grid-area: meta; }
.mi-page__meta { margin: 0; color: var(--mi-text-muted); font-size: var(--mi-text-meta); min-width: 0; }
.mi-page__head--compact { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "crumbs title actions"; gap: var(--mi-space-2) var(--mi-space-3); margin-bottom: var(--mi-space-3); }
/* Compact: the page's own crumb is the h1 next to it; the separator before it stays as the arrow into the title. */
.mi-page__head--compact > .mi-breadcrumbs li:last-child { display: none; }
.mi-page__head--compact h1 { font-size: 1.25rem; }
.mi-page__head--compact .mi-page__meta { display: inline; }
@media (max-width: 599.98px) {
  .mi-page__head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumbs" "title" "meta" "actions"; }
  .mi-page__head > .mi-page__actions, .mi-page__head > .mi-page__head-actions { justify-self: start; justify-content: flex-start; }
  .mi-page__head--compact { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "crumbs crumbs" "title actions"; }
  .mi-page__head--compact > .mi-breadcrumbs li:nth-last-child(2)[role="presentation"] { display: none; }
}

/* HelpTip (Shared/HelpTip.razor): a "?" toggle tip next to a title or label; one paragraph of help on click or focus. */
/* Its text is a popover in the top layer (admin.js showPopup places it next to the "?", inside the window): never clipped or
   covered by a panel, a scrolling box or a dialog. One open at a time (HelpTipHub). */
.mi-helptip { position: relative; display: inline-flex; vertical-align: middle; font-size: var(--mi-text-body); font-weight: normal; }
/* The "?" as NeoUI's small outline icon button, round. */
.mi-helptip__button {
  display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; border: 1px solid var(--mi-input);
  border-radius: 999px; background: transparent; color: var(--mi-text-muted); font: inherit; font-size: var(--mi-text-small); font-weight: 600; line-height: 1; cursor: pointer;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.mi-helptip__button:hover, .mi-helptip__button[aria-expanded="true"] { border-color: var(--mi-text-muted); color: var(--mi-text); background: var(--mi-surface); }
.mi-helptip__pop {
  position: fixed; inset: auto; top: 0; left: 0; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; overflow: visible;
  width: max-content; max-width: min(22rem, calc(100vw - 2rem));
}
.mi-helptip__pop:not(:popover-open) { display: none; }
.mi-helptip__bubble {
  display: block; overflow-wrap: anywhere;
  padding: var(--mi-space-3) var(--mi-space-4); border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-card);
  color: var(--mi-text); font-size: var(--mi-text-body); font-weight: normal; line-height: 1.43; text-align: left; white-space: normal; box-shadow: var(--mi-shadow-pop);
}
.mi-helptip__bubble p { margin: 0; }
.mi-helptip__bubble p + p { margin-top: var(--mi-space-2); }
@media (max-width: 599.98px) {
  .mi-helptip__pop { left: var(--mi-space-4); right: var(--mi-space-4); top: auto; bottom: var(--mi-space-4); width: auto; max-width: none; }
}

/* Buttons, tags, chips, switches and fields are NeoUI's (Button, Badge, Toggle, Switch, Input …; docs/ui.md "NeoUI"): their
   look is NeoUI's own, nothing here re-sizes or re-colours them. What stays is the website's own small parts around them. */
/* A link in a sentence that leads somewhere ("Vis alle"): a link in the text's colour and medium weight. */
.mi-link-button { display: inline-block; margin-right: 0.75rem; font-weight: 500; }
.mi-check { display: inline-flex; align-items: center; gap: 0.5rem; margin-right: 1rem; }

/* Forms */
.mi-form { display: grid; gap: 1rem; }
.mi-field { display: grid; gap: 0.5rem; }
/* A native field that NeoUI has no component for (the test call's date and time) in NeoUI's Input look. */
.mi-field > input:not([data-slot]) {
  height: var(--mi-control); padding: 0.25rem 0.75rem; border: 1px solid var(--mi-input); border-radius: var(--mi-radius);
  background: transparent; color: var(--mi-text); font: inherit; box-shadow: var(--shadow-xs); min-width: 0;
}
.mi-field > input:not([data-slot]):focus-visible { outline: none; border-color: var(--mi-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mi-focus) 50%, transparent); }
.mi-field__hint { color: var(--mi-text-muted); font-size: var(--mi-text-hint); }
/* A label with a help tip: the label text and the "?" on one line. */
/* A label and its "?": the label wraps and the "?" follows its last word, never alone on a line: the label's last line keeps
   room for it (padding), and the "?" moves into that room (a negative margin as wide as the button). */
.mi-field__label { display: block; min-width: 0; overflow-wrap: anywhere; }
.mi-field__label > :has(+ .mi-helptip) { padding-right: 1.75rem; }
.mi-field__label > .mi-helptip { margin-left: -1.5rem; }
.mi-field__label > .mi-check { margin-right: 0; }
.mi-form__error { color: var(--mi-error); margin: 0; display: flex; gap: 0.4rem; align-items: flex-start; font-size: var(--mi-text-body); }
.mi-form__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Icons and badges: shape + text + colour (§13.9.1) */
.mi-icon { flex: none; vertical-align: -0.15em; }
.mi-icon__fill { fill: currentColor; }
.mi-icon__mark { stroke: var(--mi-bg); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mi-icon__mark--dark { stroke: #1b1f24; }
.mi-icon__dot { fill: var(--mi-bg); }
.mi-icon__dot--dark { fill: #1b1f24; }
.mi-icon__ring { stroke: currentColor; stroke-width: 1.5; fill: none; }
.mi-icon__ring--dashed { stroke-dasharray: 2 2; }
.mi-icon__line { stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mi-icon__spin { transform-origin: 8px 8px; animation: mi-spin 2s linear infinite; }
@keyframes mi-spin { to { transform: rotate(360deg); } }
/* The running state's Lucide icon (Shared/StatusIcon.razor) turns. */
.mi-icon--spin { transform-origin: center; animation: mi-spin 2s linear infinite; }
@media (prefers-reduced-motion: reduce) { .mi-icon__spin, .mi-icon--spin { animation: none; } }

.mi-status--ok { color: var(--mi-ok); }
.mi-status--info { color: var(--mi-info); }
.mi-status--warn { color: var(--mi-warn); }
.mi-status--error { color: var(--mi-error); }
.mi-status--running { color: var(--mi-info); }
.mi-status--not-reached, .mi-status--not-taken, .mi-status--offline, .mi-status--reconnecting { color: var(--mi-grey); }
.mi-status--online { color: var(--mi-online); }

.mi-badge { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 500; white-space: nowrap; }
.mi-badge__text { color: var(--mi-text); }
.mi-badge.mi-status--warn .mi-badge__text { color: var(--mi-warn-text); }
.mi-badge.mi-status--error .mi-badge__text { color: var(--mi-error); }
.mi-badge.mi-status--ok .mi-badge__text { color: var(--mi-ok); }
.mi-source > .mi-badge { margin-inline-end: 0.3em; }

/* Banners, problems, empty states. A banner in NeoUI's Alert look (rounded-lg, a thin border, px-4 py-3), tinted by its state. */
.mi-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.75rem 1rem; border-radius: calc(var(--mi-radius) + 2px); border: 1px solid var(--mi-border); background: var(--mi-card); color: var(--mi-text); margin: 0.5rem 1rem; }
.mi-banner.mi-status--warn { background: var(--mi-warn-bg); border-color: color-mix(in srgb, var(--mi-warn) 55%, transparent); }
.mi-banner.mi-status--warn > span { color: var(--mi-warn-text); }
.mi-banner.mi-status--info { background: var(--mi-info-bg); border-color: color-mix(in srgb, var(--mi-info) 35%, transparent); }
.mi-banner.mi-status--error { background: var(--mi-error-bg); border-color: color-mix(in srgb, var(--mi-error) 45%, transparent); }
.mi-banner > span, .mi-banner > p { color: var(--mi-text); }
/* A problem (Shared/ProblemMessage.razor, PcTools/PcToolProblem.razor): NeoUI's Alert draws the box. */
.mi-problem { margin: 0.5rem 0; padding: 0.75rem 1rem; }
.mi-problem__text { margin: 0 0 0.5rem; display: flex; gap: 0.4rem; align-items: flex-start; color: var(--mi-text); }
/* An empty state: one muted status line in a dashed box (NeoUI's Empty look, but a line, not a centred placeholder). */
.mi-empty { padding: 1rem; border: 1px dashed var(--mi-input); border-radius: calc(var(--mi-radius) + 2px); color: var(--mi-text-muted); }
.mi-empty__text { margin: 0 0 0.5rem; display: flex; gap: 0.4rem; align-items: center; }
.mi-loading { color: var(--mi-text-muted); }

/* Explanations and details */
.mi-explanation { color: var(--mi-text); }
.mi-explanation__title { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.25rem 0; }
.mi-explanation__hint, .mi-activity__hint { margin: 0.25rem 0; }
.mi-explanation__hint-label { font-weight: 600; margin-right: 0.3rem; }
.mi-explanation__origin, .mi-activity__origin { color: var(--mi-text-muted); font-size: var(--mi-text-hint); margin: 0.25rem 0; }
.mi-value { font-weight: 600; }
.mi-details { margin: 0.5rem 0; }
.mi-details summary { cursor: pointer; color: var(--mi-text-muted); }
.mi-details__list { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; margin: 0.5rem 0; }
.mi-details__row { display: contents; }
.mi-details__row dt { color: var(--mi-text-muted); }
.mi-details__row dd { margin: 0; }
.mi-copy-status { margin-left: 0.5rem; color: var(--mi-text-muted); }

/* Strip (§13.2) */
.mi-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; list-style: none; margin: 0.35rem 0; padding: 0; }
.mi-strip__stage { display: inline-flex; align-items: center; gap: 0.25rem; }
.mi-strip__stage + .mi-strip__stage::before { content: "→"; color: var(--mi-text-muted); margin: 0 0.15rem; }
.mi-strip__label { color: var(--mi-text); }
.mi-strip__reason { color: var(--mi-text); font-weight: 600; }
.mi-strip__none { color: var(--mi-grey); }
.mi-strip__count { color: var(--mi-text-muted); margin-left: 0.5rem; }
.mi-strip--compact .mi-strip__stage + .mi-strip__stage::before { content: ""; margin: 0; }

/* Activity (§13.9.4) */
/* NeoUI buttons of shared components (a scoped .razor.css does not reach a NeoUI component's element, so their rules are here). */
.mi-timeline__older { margin-top: var(--mi-space-3); }
@media (max-width: 767.98px) { .mi-runflow__toggle { display: none; } }
.mi-timeline__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.mi-timeline__list { list-style: none; margin: 0; padding: 0; }
.mi-timeline__day-heading { margin: 1rem 0 0.25rem; font-size: var(--mi-text-body); color: var(--mi-text-muted); border-bottom: 1px solid var(--mi-border); }
.mi-timeline__gap { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; color: var(--mi-text-muted); border-top: 1px dashed var(--mi-border); border-bottom: 1px dashed var(--mi-border); }
.mi-activity { padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--mi-border); color: var(--mi-text); }
.mi-activity__head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; color: var(--mi-text-muted); }
.mi-activity__title { margin: 0.25rem 0; }
.mi-activity__links { margin: 0.25rem 0; }

/* Calls (§13.9.5) */
.mi-calls__presets { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.75rem; }
.mi-calls__day { display: inline-flex; align-items: center; gap: 0.35rem; }
.mi-calls__list { list-style: none; margin: 0; padding: 0; }
.mi-calls__item { padding: 0.6rem 0.25rem; border-bottom: 1px solid var(--mi-border); color: var(--mi-text); }
.mi-calls__sentence { margin: 0.25rem 0; display: flex; gap: 0.4rem; }
.mi-calls__folded, .mi-calls__soft, .mi-calls__truncated { color: var(--mi-text-muted); }
.mi-calls__group { margin: 1.25rem 0 0.25rem; font-size: 1rem; color: var(--mi-text-muted); }

/* Run outline (§13.9.7) */
.mi-runlist { list-style: none; margin: 0; padding: 0; container-type: inline-size; }
/* The number never wraps ("1.3.1" was broken after every character in a narrow place): its column grows to fit it and its indent. */
.mi-runlist__row { display: grid; grid-template-columns: minmax(3rem, max-content) minmax(8rem, max-content) 1fr minmax(6rem, 20%) max-content; gap: 0.5rem; align-items: center; padding: 0.35rem 0; border-bottom: 1px solid var(--mi-border); color: var(--mi-text); }
.mi-runlist__no { white-space: nowrap; }
.mi-runlist__row--depth-1 .mi-runlist__no { padding-left: 1rem; }
.mi-runlist__row--depth-2 .mi-runlist__no { padding-left: 2rem; }
.mi-runlist__row--depth-3 .mi-runlist__no, .mi-runlist__row--depth-4 .mi-runlist__no { padding-left: 3rem; }
.mi-runlist__row--not-taken { opacity: 0.7; border-bottom-style: dashed; }
.mi-runlist__note, .mi-runlist__summary, .mi-runlist__duration { color: var(--mi-text-muted); }
.mi-runlist__bar { display: block; height: 0.6rem; background: var(--mi-surface-2); border-radius: 3px; }
.mi-runlist__bar-fill { display: block; height: 100%; background: currentColor; border-radius: 3px; }
/* In a narrow place (the editor's test panel, the PC page's Makro area) the five columns squeezed a step's name to one
   letter per line: there the number keeps its column and the state, step, bar and time stack beside it. */
@container (max-width: 40rem) {
  .mi-runlist__row { grid-template-columns: minmax(2.5rem, max-content) 1fr; }
  .mi-runlist__label, .mi-runlist__bar, .mi-runlist__time { grid-column: 2; }
}

/* Tables (§13.9.3): compact rows (~38 px, --dense ~34 px), --sticky keeps the header row in view, rows highlight on hover.
   .mi-rowlink on a row's main link makes the whole row open it (other links and buttons in the row stay clickable).
   Below 768 px rows become cards: the row header (th scope=row) is the card's title, every other cell shows its column's
   name (data-label) on the left. */
.mi-table-wrap { overflow-x: auto; }
.mi-table { width: 100%; border-collapse: collapse; font-size: var(--mi-text-meta); }
.mi-table th, .mi-table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--mi-border); vertical-align: top; }
.mi-table thead th { height: 2.5rem; color: var(--mi-text-muted); font-weight: 500; vertical-align: middle; white-space: nowrap; }
.mi-table tbody tr { transition: background-color 0.15s; }
.mi-table tbody tr:hover { background: color-mix(in srgb, var(--mi-surface) 60%, transparent); }
.mi-table__caption { text-align: left; font-weight: 600; padding: 0.5rem 0; }
.mi-table--dense th, .mi-table--dense td { padding-block: 0.3rem; }
.mi-table--middle th, .mi-table--middle td { vertical-align: middle; }
.mi-table--sticky thead th { position: sticky; top: 0; z-index: 2; background: var(--mi-card); box-shadow: inset 0 -1px 0 var(--mi-border); }
.mi-table__actions { text-align: right; white-space: nowrap; }
.mi-table tr:has(.mi-rowlink) { position: relative; cursor: pointer; }
.mi-rowlink::after { content: ""; position: absolute; inset: 0; }
.mi-table tr:has(.mi-rowlink) :is(a, button, input, select, summary, [tabindex]):not(.mi-rowlink) { position: relative; z-index: 1; }
@media (max-width: 767.98px) {
  .mi-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mi-table, .mi-table tbody, .mi-table tr, .mi-table th, .mi-table td { display: block; width: 100%; }
  .mi-table tr { border: 1px solid var(--mi-border); border-radius: calc(var(--mi-radius) + 2px); margin-bottom: var(--mi-space-2); padding: var(--mi-space-2) var(--mi-space-3); background: var(--mi-card); }
  .mi-table th, .mi-table td { border-bottom: 0; padding: 0.2rem 0; }
  .mi-table tbody th[scope="row"] { font-size: var(--mi-text-body); font-weight: 600; padding-block: 0.3rem; }
  .mi-table td[data-label]:not([data-label=""]) { position: relative; padding-left: min(40%, 8.5rem); }
  .mi-table td[data-label]:not([data-label=""])::before { content: attr(data-label); position: absolute; left: 0; top: 0.2rem; width: calc(min(40%, 8.5rem) - 0.5rem); font-size: var(--mi-text-hint); color: var(--mi-text-muted); overflow-wrap: anywhere; }
  .mi-table td:empty { display: none; }
  .mi-table td .mi-badge { white-space: normal; align-items: flex-start; }
  /* Inside a card the rows are parts of it under hairlines, not cards in the card. */
  .mi-card .mi-table tr { border: 0; border-top: 1px solid var(--mi-border); border-radius: 0; margin: 0; padding: var(--mi-space-2) 0; background: none; }
  .mi-card .mi-table tbody tr:first-child { border-top: 0; }
  .mi-table__actions { text-align: left; }
  .mi-runlist__row { grid-template-columns: minmax(3rem, max-content) 1fr; }
}

/* Tabs: one row that never wraps; on a narrow screen it scrolls sideways (the selected tab scrolls into view on focus). */
/* Shared/PageTabs.razor on NeoUI's Tabs: NeoUI's muted row with the selected tab raised. The row starts at the left, as wide as its
   tabs and never wider than the page; it scrolls sideways when it does not fit (NeoUI centres a row that would then be cut off). */
.mi-tabs__list { display: flex; width: fit-content; max-width: 100%; justify-content: flex-start; flex-wrap: nowrap; gap: var(--mi-space-1); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; overscroll-behavior-x: contain; }
.mi-tabs__tab { flex: none; cursor: pointer; }
.mi-tabs__tab:hover:not([aria-selected="true"]) { color: var(--mi-text); }
.mi-tabs__badge { margin-left: 0.35rem; padding: 0 0.4rem; border-radius: 999px; background: var(--mi-surface-2); font-size: var(--mi-text-small); font-variant-numeric: tabular-nums; }
.mi-tabs__panel { margin-top: 0; padding: var(--mi-space-4) 0; }
@media (max-width: 599.98px) { .mi-tabs__tab { padding-inline: 0.6rem; } }

/* Dialogs and toasts */
/* Dialogs (Shared/ModalDialog.razor on NeoUI's DialogContent, which centres the box and draws its border, background, shadow and
   backdrop): at most 36rem (--wide 60rem, …), never taller than the window (the content scrolls); full screen below 600 px with
   the actions kept in view at the bottom (see the end of this file). The content is a block, not NeoUI's grid: the parts keep
   their own spacing. */
.mi-dialog { display: block; width: min(36rem, 92vw); max-width: min(36rem, 92vw); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem; color: var(--mi-text); }
/* The ✕ ("Luk") in the top right corner of every dialog: last in the markup (first focus and Tab order stay as they were), placed
   here; the title keeps clear of it. Title and description as NeoUI's DialogTitle (text-lg, semibold) and DialogDescription (muted). */
.mi-dialog__title { margin: 0 0 var(--mi-space-2); padding-right: 2.25rem; font-size: 1.125rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.mi-dialog__description { margin: 0 0 var(--mi-space-4); color: var(--mi-text-muted); font-size: inherit; }
.mi-dialog__close { position: absolute; top: 0.75rem; right: 0.75rem; color: var(--mi-text-muted); }
.mi-dialog__close:hover { color: var(--mi-text); }
.mi-dialog__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 1.5rem; }
.mi-dialog--wide { width: min(60rem, 94vw); max-width: min(60rem, 94vw); }
.mi-dialog__actions .mi-addmacro__back { margin-right: auto; }
/* Toasts (Shared/ToastHost.razor): NeoUI's toast look (a bordered card with a shadow, bottom right), the website's own live region. */
.mi-toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: 0.5rem; z-index: 50; max-width: min(28rem, 92vw); }
.mi-toast { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.875rem 0.75rem 0.875rem 1rem; border-radius: calc(var(--mi-radius) + 2px); border: 1px solid var(--mi-border); background: var(--mi-card); color: var(--mi-text); box-shadow: var(--shadow-lg); }
.mi-toast__text { color: var(--mi-text); flex: 1; }
.mi-toast__link { margin-inline-start: var(--mi-space-2); font-weight: 500; white-space: nowrap; }

/* Search (§8) */
.mi-search { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.mi-search__label { font-weight: 600; font-size: 1rem; }
.mi-search__input { flex: 1 1 20rem; max-width: 42rem; }
/* The results as NeoUI's popover (Command's look): the card colour, a thin border, rounded-md, items highlighted on hover. */
.mi-search__results { position: absolute; top: calc(100% + 0.25rem); left: 0; right: 0; max-width: 48rem; z-index: 40; background: var(--mi-card); border: 1px solid var(--mi-border); border-radius: var(--mi-radius); box-shadow: var(--mi-shadow-pop); padding: 0.25rem 0.375rem; max-height: 70vh; overflow-y: auto; }
.mi-search__results[hidden] { display: none; }
.mi-search__group { font-size: var(--mi-text-small); font-weight: 500; color: var(--mi-text-muted); margin: 0.5rem 0.5rem 0.25rem; }
.mi-search__list { list-style: none; margin: 0; padding: 0; }
.mi-search__list a { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.375rem 0.5rem; border-radius: calc(var(--mi-radius) - 2px); text-decoration: none; color: var(--mi-text); }
.mi-search__list a:hover, .mi-search__list a:focus-visible { background: var(--mi-surface); }
.mi-search__name { font-weight: 500; }
.mi-search__context { color: var(--mi-text-muted); }
.mi-search__note, .mi-search__empty { margin: 0.25rem 0; }

/* User menu, live indicator */
/* The user menu on NeoUI's DropdownMenu (its list is in the overlay host). */
.mi-usermenu__button { gap: 0.35rem; height: auto; padding: 0.375rem 0.5rem; font-size: inherit; font-weight: 500; }
.mi-usermenu__button[aria-expanded="true"] { background: var(--mi-surface); }
.mi-usermenu__list { min-width: 12rem; }
.mi-live { display: inline-flex; align-items: center; gap: 0.3rem; }
.mi-live__text, .mi-live__time { color: var(--mi-text-muted); }
.mi-live__time time { white-space: nowrap; border-radius: 3px; }
.mi-usermenu__initials { display: none; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--mi-surface); border: 1px solid var(--mi-border); font-size: var(--mi-text-small); font-weight: 600; }
/* The header on a phone (the bar itself is in Layout/MainLayout.razor.css): the connection is its dot ("Live" for screen
   readers only), the clock hides, and the user menu shows the initials. */
@media (max-width: 767.98px) {
  .mi-live .mi-live__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mi-live__time { display: none; }
  .mi-live { padding: 0.5rem; }
  .mi-usermenu__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mi-usermenu__initials { display: inline-grid; }
  .mi-usermenu__button { padding: 0.15rem; }
  .mi-usermenu__button > svg { display: none; }
}

/* Breadcrumbs (Shared/Breadcrumbs.razor, NeoUI's Breadcrumb draws the list and the › separators): the meta size, long names wrap. */
.mi-breadcrumbs ol { margin: 0 0 var(--mi-space-2); gap: 0.3rem 0.4rem; font-size: var(--mi-text-meta); line-height: 1.43; }
.mi-breadcrumbs li { min-width: 0; overflow-wrap: anywhere; }
/* As NeoUI's BreadcrumbLink (the base "a" rule would give it the text's colour): muted, the text's colour on hover; the page's own
   crumb stays in the text's colour. */
.mi-breadcrumbs a { color: var(--mi-text-muted); text-decoration: none; transition: color 0.15s; }
.mi-breadcrumbs a:hover { color: var(--mi-text); text-decoration: underline; }
/* "← Tilbage til …" above a sub-page's heading (the macro editor): the way back to the PC or the user. */
.mi-back { margin: 0 0 0.25rem; }
.mi-back a { font-weight: 500; }
.mi-section-title { margin: 1rem 0 0.5rem; }
.mi-health__list { list-style: none; margin: 0; padding: 0; }
.mi-time { white-space: nowrap; }

/* In the header bar the global search is compact, its label for screen readers only. It is the website's one search: Overblik
   no longer shows a second, large copy (§13.9.3). */
.mi-header__search .mi-search__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mi-header__search .mi-search__input { flex: 1 1 14rem; min-width: 0; }

/* PC tools (the PC's Makro tab and the editor's "Vælg fra PC'en"): programs, a recorded click, the program folders. */
/* The PC tools sit beside the macros (docs/ui.md "Page section cards"; PcToolsPanel's scoped CSS draws the card and its parts):
   their buttons are never primary — the Makro tab's one primary is "Brug på PC'en". */
.mi-pctools__programs, .mi-pctools__folders, .mi-pctools__click { display: grid; gap: 0.6rem; min-width: 0; }
.mi-pctools__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0; }
.mi-pctools__rule-hint { display: block; font-weight: normal; }
.mi-pctools__exe, .mi-pctools__path, .mi-pctools__file { font-family: var(--mi-font-mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.mi-pctools__note { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0; padding: 0.5rem 0.75rem; background: var(--mi-surface); border-radius: var(--mi-radius); }
.mi-pctools__where { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1rem; }
.mi-pctools__path { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.mi-pctools__entries { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.mi-pctools__entries > li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; padding: 0.3rem 0; border-bottom: 1px solid var(--mi-border); }
.mi-pctools__use { margin-left: auto; }
.mi-pctools__waiting { font-weight: 600; }
.mi-pctools__result { display: grid; gap: 0.5rem; padding: 0.75rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-surface); }
.mi-pctools__result-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; }
.mi-pctools__facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.25rem 1rem; margin: 0; }
.mi-pctools__facts dt { color: var(--mi-text-muted); }
.mi-pctools__facts dd { margin: 0; overflow-wrap: anywhere; }
.mi-setting__pick { margin-top: 0.4rem; }
.mi-setting__number { display: flex; align-items: center; gap: 0.4rem; }
.mi-setting__number input { flex: 1 1 auto; min-width: 0; }
.mi-setting__unit { color: var(--mi-text-muted); }
/* A duration (2026-11): the number and its unit on one row, the number as wide as it needs ("5" timer, "250" ms). */
.mi-duration { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.mi-duration .mi-duration__amount { flex: 1 1 6rem; width: auto; min-width: 0; }
.mi-run__fixed .mi-duration .mi-duration__amount { max-width: 8rem; }
.mi-duration .mi-duration__unit { flex: 0 0 auto; width: auto; max-width: 7rem; }
/* "Kørsel": "Højst" and its duration on one row. */
.mi-run__fixed { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; }
.mi-run__fixed .mi-duration { flex: 1 1 12rem; max-width: 16rem; }
[data-trigger-section="run"] fieldset { min-width: 0; }
.mi-setting__lastclick { display: grid; gap: 0.4rem; margin: 0.25rem 0 0.75rem; }
.mi-dialog .mi-progs { max-height: 50vh; }

/* "Programmer på PC'en": the view switch, the installed programs and "Kører nu". Compact rows in a box that scrolls on its
   own (search and filters stay above it), one column with a full-width action on a phone. The foreground program stands out. */
.mi-pctools__programs-tool, .mi-pctools__running { display: grid; gap: 0.6rem; min-width: 0; }

.mi-pctools__filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 1rem; }
.mi-pctools__filters .mi-pctools__search { flex: 1 1 15rem; }
.mi-pctools__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mi-pctools__subhead { margin: 0.4rem 0 0; font-size: var(--mi-text-h3); }
.mi-pctools__more { justify-self: start; }
.mi-progs, .mi-procs { list-style: none; margin: 0; padding: 0; max-height: 32rem; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-card); }
.mi-prog, .mi-proc { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.35rem 0.75rem; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--mi-border); }
.mi-prog:last-child, .mi-proc:last-child { border-bottom: 0; }
.mi-prog:hover, .mi-proc:hover { background: var(--mi-surface); }
.mi-proc--front, .mi-proc--front:hover { background: var(--mi-surface); box-shadow: inset 3px 0 0 var(--mi-accent); }
.mi-prog__main, .mi-proc__main { display: grid; gap: 0.15rem; min-width: 0; }
.mi-prog__head, .mi-proc__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; min-width: 0; }
.mi-prog__name, .mi-proc__name { font-weight: 500; overflow-wrap: anywhere; }
.mi-proc__company { color: var(--mi-text-muted); font-size: 0.875rem; }
.mi-prog__head .mi-badge, .mi-proc__head .mi-badge { font-size: 0.8125rem; }
.mi-pctools__subhead + .mi-field__hint { margin-top: -0.4rem; }
.mi-proc__tag { display: inline-block; padding: 0 0.45rem; border-radius: 999px; background: var(--mi-surface-2); color: var(--mi-text-muted); font-size: 0.75rem; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.mi-proc__tag--front { background: var(--mi-accent); color: var(--mi-on-accent); }
.mi-prog__meta, .mi-proc__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.65rem; min-width: 0; color: var(--mi-text-muted); font-size: 0.8125rem; }
.mi-proc__exe { padding: 0 0.3rem; border-radius: 3px; background: var(--mi-surface-2); color: var(--mi-text); font-family: var(--mi-font-mono); font-size: 0.8125rem; overflow-wrap: anywhere; }
.mi-proc__path { min-width: 0; color: var(--mi-text-muted); font-family: var(--mi-font-mono); font-size: 0.75rem; overflow-wrap: anywhere; }
.mi-proc__path--unknown { font-family: inherit; font-style: italic; }
.mi-proc__windows { display: grid; gap: 0.1rem; margin: 0.1rem 0; padding: 0; list-style: none; }
.mi-proc__window { display: flex; align-items: baseline; gap: 0.45rem; min-width: 0; font-size: 0.875rem; }
.mi-proc__window::before { content: ""; flex: none; width: 0.8em; height: 0.6em; border: 1.5px solid var(--mi-text-muted); border-top-width: 3px; border-radius: 2px; }
.mi-proc__window--front::before { border-color: var(--mi-accent); }
.mi-proc__window-title { min-width: 0; overflow-wrap: anywhere; }
.mi-proc__window-state { flex: none; color: var(--mi-text-muted); font-size: 0.75rem; white-space: nowrap; }
.mi-proc__action > button { white-space: nowrap; }
.mi-procs--background .mi-proc { padding-block: 0.35rem; }
.mi-pctools__window { display: grid; gap: 0.5rem; min-width: 0; margin: 0 0 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); }
.mi-pctools__window legend { padding: 0 0.25rem; font-weight: 600; }
@media (max-width: 599.98px) {
  .mi-progs, .mi-procs { max-height: 70vh; }
  .mi-prog, .mi-proc { grid-template-columns: minmax(0, 1fr); padding: 0.65rem 0.75rem; }
  .mi-proc__action > button { width: 100%; }
}
/* "Klik på billede": the crop dialog shows a whole screenshot, so it may be wider than other dialogs. */
.mi-dialog:has(.mi-image-crop) { max-width: min(62rem, 96vw); }
/* "Kald en web-adresse (curl)" (§7.8): the wide editor laid out like Postman, rows, chips, outputs and the curl preview. */
.mi-dialog--http { width: min(72rem, 96vw); max-width: min(72rem, 96vw); }
.mi-dialog--paste { width: min(52rem, 94vw); max-width: min(52rem, 94vw); }
/* "Test på en PC" (the macro editor): compact, the run's steps fit without a second column. */
.mi-dialog--pctest { width: min(40rem, 94vw); max-width: min(40rem, 94vw); }
.mi-http, .mi-http-step, .mi-paste { display: grid; gap: 0.9rem; min-width: 0; }
.mi-http__line { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; align-items: start; }
.mi-http__method { font-weight: 600; font-family: var(--mi-font-mono); }
.mi-http__method--get { color: var(--mi-ok); }
.mi-http__method--post { color: var(--mi-http-post); }
.mi-http__method--put, .mi-http__method--patch { color: var(--mi-info); }
.mi-http__method--delete { color: var(--mi-error); }
.mi-http__badge { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 4px; background: var(--mi-surface-2); font-family: var(--mi-font-mono); font-size: 0.8125rem; font-weight: 600; }
.mi-http__intro { margin: 0; color: var(--mi-text-muted); font-size: var(--mi-text-body); max-width: 60rem; }
.mi-http__short { width: min(22rem, 100%); }
.mi-http__tiny { width: 5rem; }
.mi-http__warning { margin: 0; padding: 0.45rem 0.7rem; border-radius: var(--mi-radius); background: var(--mi-warn-bg); color: var(--mi-warn-text); font-size: var(--mi-text-body); }
.mi-http__quick, .mi-outputs__quick, .mi-outputs__add { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.mi-http__quick-label, .mi-outputs__quick-label { color: var(--mi-text-muted); font-size: var(--mi-text-hint); margin-right: 0.15rem; }
.mi-http .mi-tabs__panel { display: grid; gap: 0.75rem; align-content: start; min-height: 14rem; }
.mi-http__preview { display: grid; gap: 0.35rem; padding-top: 0.75rem; border-top: 1px solid var(--mi-border); }
.mi-http__preview-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.mi-http__preview-title { margin: 0; font-size: var(--mi-text-body); }
.mi-http__command { margin: 0; padding: 0.7rem 0.85rem; border-radius: var(--mi-radius); background: var(--mi-code-bg); color: var(--mi-code-text); border: 1px solid var(--mi-code-border); font-family: var(--mi-font-mono); font-size: 0.8125rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 14rem; overflow: auto; }
.mi-tfield { display: grid; gap: 0.3rem; min-width: 0; }
.mi-tfield__row { display: flex; gap: 0.35rem; align-items: start; min-width: 0; }
.mi-tfield__input { flex: 1 1 auto; width: 100%; }
.mi-tfield__input--mono, textarea.mi-tfield__input--mono { font-family: var(--mi-font-mono) !important; font-size: 0.875rem !important; }
.mi-tfield__insert { flex: none; max-width: 8.5rem; color: var(--mi-link) !important; font-weight: 600; cursor: pointer; }
.mi-tfield__preview { display: block; margin: 0; color: var(--mi-text-muted); font-family: var(--mi-font-mono); font-size: 0.8125rem; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.mi-rows { display: grid; gap: 0.4rem; }
.mi-rows__head, .mi-rows__row { display: grid; grid-template-columns: 1.6rem minmax(8rem, 0.7fr) minmax(0, 1.6fr) 2rem; gap: 0.5rem; align-items: start; }
.mi-rows__head { color: var(--mi-text-muted); font-size: 0.8125rem; font-weight: 600; }
.mi-rows__row > .mi-rows__on { margin-top: 0.7rem; justify-self: center; }
.mi-rows__name input { width: 100%; font-family: var(--mi-font-mono); font-size: 0.875rem; }
.mi-rows__row--off :is(.mi-rows__name, .mi-rows__value) { opacity: 0.55; }
.mi-rows__empty { margin: 0; color: var(--mi-text-muted); font-style: italic; }
.mi-rows__remove, .mi-extract__remove { font-size: 1.2rem; line-height: 1; margin-top: 0.35rem; }
.mi-icon-button { border-radius: var(--mi-radius); min-width: 1.9rem; min-height: 1.9rem; }
.mi-icon-button:hover:not(:disabled) { background: var(--mi-surface-2); }
.mi-icon-button:disabled { opacity: 0.35; cursor: default; }
.mi-icon-button--danger:hover:not(:disabled) { color: var(--mi-error); background: var(--mi-error-bg); }
.mi-extract { display: grid; gap: 0.6rem; }
.mi-extract__row { display: grid; grid-template-columns: minmax(10rem, 0.8fr) minmax(10rem, 0.8fr) minmax(0, 1.4fr) 2rem; gap: 0.35rem 0.6rem; align-items: start; padding: 0.6rem 0.75rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-surface); }
.mi-extract__chipname { display: flex; align-items: center; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-bg); }
.mi-extract__chipname input { border: 0 !important; width: 100%; padding-left: 0.1rem !important; font-family: var(--mi-font-mono); }
.mi-extract__prefix { padding-left: 0.6rem; color: var(--mi-text-muted); font-family: var(--mi-font-mono); font-size: 0.875rem; }
.mi-extract__remove { grid-column: 4; grid-row: 1; margin-top: 1.6rem; }
.mi-extract__use { grid-column: 1 / -1; margin: 0; color: var(--mi-text-muted); font-size: var(--mi-text-hint); }
.mi-outputs { display: grid; gap: 0.75rem; }
.mi-outputs__list { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.mi-outputs__item { display: grid; gap: 0.5rem; padding: 0.7rem 0.85rem; border: 1px solid var(--mi-border); border-left: 4px solid var(--mi-accent); border-radius: var(--mi-radius); background: var(--mi-bg); }
.mi-outputs__item--fallback { border-left-color: var(--mi-grey); background: var(--mi-surface); }
.mi-outputs__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.mi-outputs__no { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: var(--mi-surface-2); font-size: 0.8125rem; font-weight: 600; }
.mi-outputs__name { flex: 1 1 14rem; font-weight: 600; }
.mi-outputs__name--fixed { flex: 1 1 auto; }
.mi-outputs__steps { color: var(--mi-text-muted); font-size: var(--mi-text-hint); white-space: nowrap; }
.mi-outputs__tools { display: inline-flex; gap: 0.1rem; }
.mi-outputs__sentence { margin: 0; font-size: var(--mi-text-body); }
.mi-outputs__conditions { display: grid; gap: 0.4rem; }
.mi-cond { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.mi-cond__word { min-width: 2.4rem; color: var(--mi-text-muted); font-weight: 600; font-size: var(--mi-text-body); }
.mi-cond__name { width: 12rem; }
.mi-cond__value { width: 12rem; }
.mi-cond__problem { flex-basis: 100%; margin: 0 0 0 2.8rem; color: var(--mi-error); font-size: var(--mi-text-hint); }
.mi-http-options { display: grid; gap: 1rem; }
.mi-http-options__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.75rem 1rem; align-items: start; }
/* Wide enough for the placeholder "Som kaldet" (a placeholder cannot wrap, so the field fits it). */
.mi-http-options__grid .mi-setting__number input { width: 8rem; max-width: 100%; flex: none; }
.mi-http-options__toggles { display: grid; gap: 0.6rem; }
.mi-http-options__indent { margin-left: 1.9rem; }
.mi-http-options__proxy { padding: 0.5rem 0.75rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); }
.mi-http-options__proxy > summary { cursor: pointer; font-weight: 600; }
.mi-http-options__proxy[open] > summary { margin-bottom: 0.5rem; }
/* A check box or radio with its label (label.mi-toggle-row: + a warning under it), or div.mi-toggle-row: the label
   (.mi-toggle-row__main) and its "?" (the label's hint is behind it, docs/ui.md). */
.mi-toggle-row { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; }
div.mi-toggle-row { gap: 0.4rem; align-items: center; cursor: auto; }
.mi-toggle-row__main { display: inline-flex; gap: 0.6rem; align-items: flex-start; min-width: 0; cursor: pointer; }
.mi-toggle-row > input, .mi-toggle-row__main > input { margin-top: 0.25rem; width: 1.05rem; height: 1.05rem; flex: none; }
label.mi-toggle-row > span { display: grid; gap: 0.1rem; }
.mi-toggle-row__label { font-weight: 600; }
.mi-toggle-row--warn .mi-toggle-row__label { color: var(--mi-warn-text); }
.mi-paste__text { width: 100%; font-family: var(--mi-font-mono) !important; font-size: 0.8125rem !important; line-height: 1.45; resize: vertical; }
.mi-paste__result { display: grid; gap: 0.25rem; padding: 0.6rem 0.8rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-surface); max-height: 16rem; overflow: auto; }
.mi-paste__dialect { margin: 0 0 0.2rem; color: var(--mi-text-muted); font-size: 0.8125rem; }
.mi-paste__line { margin: 0; font-size: var(--mi-text-body); overflow-wrap: anywhere; }
.mi-paste__line > span[aria-hidden] { display: inline-block; width: 1.1rem; font-weight: 600; }
.mi-paste__line--ok > span[aria-hidden] { color: var(--mi-ok); }
.mi-paste__line--note { color: var(--mi-text-muted); }
.mi-paste__line--error { color: var(--mi-error); font-weight: 600; }
.mi-paste__line code { padding: 0 0.3rem; border-radius: 3px; background: var(--mi-error-bg); font-family: var(--mi-font-mono); }
.mi-paste__fix { margin: 0.2rem 0; font-size: var(--mi-text-body); }
.mi-http-step__call { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; padding: 0.55rem 0.7rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-surface); }
.mi-http-step__url { min-width: 0; font-family: var(--mi-font-mono); font-size: 0.875rem; overflow-wrap: anywhere; }
.mi-http-step__url--missing { font-family: var(--mi-font); color: var(--mi-text-muted); font-style: italic; }
.mi-http-step__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mi-http-step__section { display: grid; gap: 0.35rem; }
.mi-http-step__heading { margin: 0; font-size: var(--mi-text-body); }
.mi-http-step__outputs, .mi-http-step__extracts { display: grid; gap: 0.25rem; margin: 0; padding-left: 1.3rem; font-size: var(--mi-text-body); }
.mi-http-step__rule { color: var(--mi-text-muted); }
.mi-http-step .mi-field__hint { margin: 0; }
.mi-http-echo { display: grid; gap: 0.6rem; min-width: 0; }
.mi-http-echo__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.75rem; }
.mi-http-echo__status { padding: 0.05rem 0.5rem; border-radius: 999px; font-family: var(--mi-font-mono); font-weight: 600; background: var(--mi-surface-2); }
.mi-http-echo__status--ok { background: var(--mi-ok-bg); color: var(--mi-ok); }
.mi-http-echo__status--warn { background: var(--mi-warn-bg); color: var(--mi-warn-text); }
.mi-http-echo__status--error { background: var(--mi-error-bg); color: var(--mi-error); }
.mi-http-echo__meta { color: var(--mi-text-muted); font-size: 0.875rem; }
.mi-http-echo__vars, .mi-http-echo__headers { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.2rem 0.75rem; margin: 0; font-size: 0.875rem; }
.mi-http-echo__vars dt, .mi-http-echo__headers dt { font-family: var(--mi-font-mono); color: var(--mi-text-muted); }
.mi-http-echo__vars dd, .mi-http-echo__headers dd { margin: 0; font-family: var(--mi-font-mono); overflow-wrap: anywhere; }
.mi-json { margin: 0; padding: 0.6rem 0.75rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-surface); font-family: var(--mi-font-mono); font-size: 0.8125rem; line-height: 1.55; max-height: 24rem; overflow: auto; }
.mi-json__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding: 0.05rem 0.25rem; border-radius: 3px; }
.mi-json__row:hover, .mi-json__row:focus-within { background: var(--mi-surface-2); }
.mi-json__path { color: var(--mi-info); }
.mi-json__value { color: var(--mi-text); overflow-wrap: anywhere; }
.mi-json__value--string { color: var(--mi-ok); }
.mi-json__actions { display: inline-flex; gap: 0.25rem; margin-left: auto; }
.mi-json__raw { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mi-secrets { display: grid; gap: 0.75rem; }
.mi-secrets__table td, .mi-secrets__table th { vertical-align: top; }
.mi-secrets__name { font-family: var(--mi-font-mono); font-weight: 600; }
.mi-secrets__value { font-family: var(--mi-font-mono); letter-spacing: 0.1em; }
.mi-secrets__actions { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.mi-secrets__form { display: grid; gap: 0.75rem; }
@media (max-width: 799.98px) {
  .mi-rows__head { display: none; }
  .mi-rows__row { grid-template-columns: 1.6rem minmax(0, 1fr) 2rem; }
  .mi-rows__value { grid-column: 2 / 3; }
  .mi-extract__row { grid-template-columns: minmax(0, 1fr) 2rem; }
  .mi-extract__remove { grid-column: 2; }
}
.mi-http-echoes { display: grid; gap: 0.75rem; margin-top: 0.75rem; }
.mi-http-echoes__title { margin: 0; font-size: 1rem; }
.mi-http-echoes .mi-http-echo { padding: 0.75rem 0.9rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-bg); }
/* "Kald en web-adresse (curl)": buttons keep their own width in the grids, a link-like button, the secrets page. */
.mi-http__command--empty { color: #aab1ba; font-family: var(--mi-font); font-style: italic; }
.mi-secrets__description { display: block; margin-top: 0.15rem; font-size: var(--mi-text-hint); }
.mi-secrets__plain { font-family: var(--mi-font-mono); }

/* ===== Phone overrides of the shared components (area A): after every dialog size above, so they win. ===== */
@media (max-width: 599.98px) {
  div.mi-dialog[data-mi-dialog] {
    inset: 0; translate: none; width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0;
    padding: var(--mi-space-4) var(--mi-space-4) 0; display: flex; flex-direction: column;
  }
  div.mi-dialog[data-mi-dialog] > .mi-dialog__body { flex: 1 0 auto; }
  div.mi-dialog[data-mi-dialog] .mi-dialog__actions {
    position: sticky; bottom: 0; z-index: 5; margin: var(--mi-space-4) calc(-1 * var(--mi-space-4)) 0;
    padding: var(--mi-space-3) var(--mi-space-4); background: var(--mi-bg); border-top: 1px solid var(--mi-border);
  }
  .mi-toasts { left: var(--mi-space-4); right: var(--mi-space-4); bottom: var(--mi-space-4); max-width: none; }
}

/* ===== Area D: the macro editor and the template pages (docs/ui.md). Kept here, at the end, for what the editor's parts
   render outside its scoped styles (the pages' notes, the curl editor's shared classes). ===== */
/* The macro editor fills the window (docs/ui.md "The macro editor's layout"): from 1100 px the page is a flex column exactly as tall
   as the window — the header bar and any banner (connection, idle warning) take their height, .mi-main the rest — and the editor
   fills .mi-main (FlowEditor.razor.css): its columns scroll on their own, the page never does. No height is computed from the
   header's size, so a taller header (wrapped navigation, zoom, a banner) cannot push the page into scrolling. Below 1100 px the
   editor stacks and the page scrolls as any other. */
.mi-main:has(.mi-editor--app) { padding-top: var(--mi-space-3); padding-bottom: var(--mi-space-3); }
@media (min-width: 1100px) {
  body:has(.mi-editor--app) { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  body:has(.mi-editor--app) > * { flex: none; }
  body:has(.mi-editor--app) > .mi-main { display: flex; flex: 1 1 auto; flex-direction: column; width: 100%; min-height: 0; margin: 0; }
}
/* A note in the editor's left column (whose macros run first, where a macro is tested and used). */
.mi-editor-note { display: grid; gap: var(--mi-space-2); padding: var(--mi-space-2) var(--mi-space-3); border-radius: var(--mi-radius); background: var(--mi-surface); color: var(--mi-text-muted); font-size: var(--mi-text-hint); }
.mi-editor-note p { margin: 0; }
.mi-banner.mi-editor-banner { margin: 0; }
/* The curl editor: "+ Indsæt" is a compact menu button next to the field (not a wide select); "http." stays on its line. */
.mi-tfield__insert { max-width: none; color: inherit !important; font-weight: inherit; cursor: auto; }
.mi-tfield__row { align-items: center; }
.mi-extract__prefix { white-space: nowrap; }
/* The template dialogs on a phone: the search and its count share the row without pushing it wider than the screen. */
@media (max-width: 599.98px) {
  .mi-dialog :is(input, select, textarea) { max-width: 100%; }
}
/* The editors' one-row header (PageHeader Compact with the editor's toolbar): below 1100 px the toolbar takes its own row under
   the title, and on a phone crumbs, title and toolbar stack (the title is never squeezed to a letter per line). */
@media (max-width: 1099.98px) {
  .mi-page__head--compact.mi-editor__head { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "crumbs title" "actions actions"; }
  .mi-page__head--compact.mi-editor__head > .mi-page__actions { justify-self: start; justify-content: flex-start; }
}
@media (max-width: 599.98px) {
  .mi-page__head--compact.mi-editor__head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumbs" "title" "actions"; }
}
/* ===== Area B: overview and live pages (rows that a shared component renders, so a page's scoped CSS cannot reach them). ===== */
/* Overblik's PC rows: an offline or removed PC is greyed (a problem in its status keeps its colour). */
.mi-machines tr.mi-machine--offline > :is(th, td),
.mi-machines tr.mi-machine--revoked > :is(th, td) { color: var(--mi-text-muted); }
.mi-machines tr.mi-machine--offline .mi-connection .mi-badge__text { color: var(--mi-text-muted); font-weight: 400; }
/* A PC's connection (ConnectionView): "WebSocket · i 3 t 12 min.", the "?" of a fallback right after it. */
.mi-connection { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.35rem; max-width: 100%; }
.mi-connection[data-online="false"] .mi-badge__text { color: var(--mi-text-muted); font-weight: 400; }
@media (max-width: 767.98px) {
  .mi-connection, .mi-table td .mi-connection .mi-badge { flex-wrap: nowrap; white-space: nowrap; }
}
/* One table per customer, the same columns in every one (fixed widths), so the groups read as one list. */
@media (min-width: 768px) {
  .mi-machines { table-layout: fixed; }
  .mi-machines .mi-machine__pc { width: 18%; }
  .mi-machines .mi-machine__user { width: 16%; }
  .mi-machines .mi-machine__connection { width: 20%; }
  .mi-machines .mi-machine__last-call { width: 14%; }
  .mi-machines .mi-machine__today { width: 7%; }
  .mi-machines :is(th, td) { overflow-wrap: anywhere; }
}

/* ===== Theme ("Udseende" in the user menu; docs/ui.md "Light and dark") ===== */
.mi-usermenu__label { font-weight: 600; font-size: var(--mi-text-hint); color: var(--mi-text-muted); }
.mi-usermenu__option { gap: 0.4rem; }
.mi-usermenu__check { display: inline-flex; flex: none; width: 1rem; }
.mi-usermenu__hint { margin: 0.15rem 0.5rem 0.35rem; font-size: var(--mi-text-small); color: var(--mi-text-muted); max-width: 16rem; }
/* Esc Esc and the macro switches (2026-11): "Makroer slået fra …" (MacrosStateView) wraps instead of being cut off in a narrow cell
   (Overblik's cards on a phone, the PC list's second line). */
.mi-macros-state { max-width: 100%; white-space: normal; }
.mi-macros-state .mi-badge { flex: none; }

/* "Fokus" on the run page (docs/architecture.md §7.13): what a step's focus options did, on its own line under the remark. */
.mi-runtable__focus { display: block; color: var(--mi-text-muted); font-size: var(--mi-text-hint); overflow-wrap: anywhere; }

/* "Kun jeg må administrere denne PC" (docs/architecture.md §2.6, §8): the banner, and the controls a lock of another admin disables (a fieldset that
   adds no box of its own: its "disabled" reaches every button, field and select inside, links and "?" outside it stay usable). */
.mi-pclock .mi-pclock__text { color: var(--mi-text); font-weight: 600; overflow-wrap: anywhere; }
.mi-pclock__icon { display: inline-flex; flex: none; }
.mi-lockset { display: contents; border: 0; margin: 0; padding: 0; min-width: 0; }
/* The PC page's "Det kører på PC'en": a test run shown in a macro's row (its steps, a curl answer) takes the whole row under the
   name, not the button column beside it, whose width followed the longest answer line and squeezed the name and its "when" to a
   letter per line (2026-11). */
.mi-pcmacro__actions { min-width: 0; }
.mi-pcmacro__actions:has(.mi-test__run, [role="alert"]) { grid-column: 1 / -1; }

/* ===== NeoUI area: editor-settings (the macro editor's side panel, its step inputs, the curl editor and the template parameters;
   docs/ui.md "NeoUI"). Here because a scoped .razor.css does not reach a NeoUI component's element and several of these parts render
   in a dialog's portal. Dense: the panel fits 1366 × 768 with NeoUI's small controls. ===== */
/* A setting (NeoUI's Field): its label, control, issues close together; a multi-line label keeps its line height. */
.mi-setting { gap: 0.3rem; min-width: 0; }
.mi-setting .mi-field__label > label { line-height: 1.35; }
.mi-setting__textbox, .mi-tfield__box { display: block; flex: 1 1 auto; min-width: 0; }
/* NeoUI's Textarea grows with its text (field-sizing): here it keeps its rows, the panel stays still while typing. */
.mi-setting__text, .mi-tfield__input:is(textarea), .mi-paste__text { field-sizing: fixed; resize: vertical; }
/* NeoUI's NativeSelect (4.5.3) is a select with only its size's px-2/3/4 and the chevron drawn over its right edge in the
   following div, so a select as wide as its text put the chevron over the text ("Alle kunder" on Installation). Every NeoUI
   select keeps room for its chevron. */
select.appearance-none:has(+ .pointer-events-none) { padding-right: 2rem; }
/* NeoUI's small NativeSelect (h-8) reads at the panel's size, not 12 px. */
.mi-select-sm { font-size: 0.875rem; line-height: 1.25; padding-block: 0; }
/* A condition's field, operator and value: NeoUI's sizes (the editor's own rule for the old fields sets a bigger font and padding). */
.mi-panel .mi-condition .mi-condition__part :is(select.mi-select-sm, input.mi-input-sm) { font-size: 0.875rem; line-height: 1.25; padding-block: 0; }
.mi-panel .mi-condition .mi-condition__part select.mi-select-sm { padding-inline: 0.5rem 2rem; }
/* A check box with its label (NeoUI's Checkbox + Label), and radio choices (NeoUI's RadioGroup) one under the other. */
.mi-setting__check { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; }
.mi-setting__check > label, .mi-choices__radio > label { font-weight: 400; line-height: 1.35; cursor: pointer; }
.mi-choices__radios { display: grid; gap: 0.35rem; }
/* NeoUI's FieldSet spaces its children 1 rem apart (space-y-4): the panel's groups keep their own, tighter gap. */
:is(.mi-choices, .mi-segmented-field, .mi-condition, .mi-parameter) > * { margin-block: 0; }
/* A duration's unit list: as wide as its longest unit and NeoUI's chevron. */
.mi-duration .mi-duration__unit { flex: 0 0 5.5rem; min-width: 0; max-width: none; }
.mi-duration input.mi-duration__amount { width: 0; }
.mi-choices__radio { display: inline-flex; align-items: center; gap: 0.45rem; min-width: 0; }
.mi-toggle-row:has(.mi-toggle-row__text) { align-items: flex-start; }
.mi-toggle-row:has(.mi-toggle-row__text) > button[role="checkbox"] { margin-top: 0.15rem; }
.mi-toggle-row__text { display: grid; gap: 0.1rem; }
/* A chip (NeoUI's Toggle, outline): compact; pressed it is NeoUI's "on" look, a step darker with a darker edge, and never colour
   alone (a tick or the words). */
.mi-chip-toggle { height: 1.75rem; gap: 0.3rem; padding-inline: 0.65rem; font-size: var(--mi-text-hint); }
.mi-chip-toggle[aria-pressed="true"] { border-color: var(--mi-text-muted); background: var(--mi-surface-2); color: var(--mi-text); }
.mi-chip-toggle--secret[aria-pressed="true"] { border-color: var(--mi-warn); background: var(--mi-warn-bg); color: var(--mi-warn-text); }
/* A segmented choice (NeoUI's ToggleGroup, one of them) in NeoUI's TabsList look: the options on a muted track, the chosen one raised
   (the page's colour and a small shadow); the row wraps instead of breaking a word ("Venstreklik", "I gråtoner"). */
.mi-segmented-group { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0; max-width: 100%; padding: 3px; border: 0; border-radius: calc(var(--mi-radius) + 2px); background: var(--mi-surface); }
.mi-segmented-group > span { display: flex; flex: 1 1 auto; min-width: max-content; }
.mi-segmented-group [role="radio"] { flex: 1 1 auto; height: auto; min-height: 1.75rem; gap: 0.35rem; padding: 0.25rem 0.625rem; border: 1px solid transparent; color: var(--mi-text-muted); font-size: var(--mi-text-body); font-weight: 500; }
.mi-segmented-group [role="radio"]:hover { background: transparent; color: var(--mi-text); }
.mi-segmented-group [role="radio"][aria-checked="true"] { background: var(--mi-bg); color: var(--mi-text); border-color: var(--mi-border); box-shadow: var(--shadow-sm); }
/* A link-looking button inside a sentence (NeoUI's Link Button): as tall as the text, underlined as every link. */
.mi-inline-link { height: auto; padding: 0; vertical-align: baseline; font-size: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }
/* A destructive action that is not the view's main one ("Slet" in a macro's row): NeoUI's Outline in the error colour. */
.mi-button-danger-outline { border-color: var(--mi-error); color: var(--mi-error); }
.mi-button-danger-outline:hover:not(:disabled) { background: var(--mi-error-bg); color: var(--mi-error); }
.mi-icon-danger:hover:not(:disabled) { background: var(--mi-error-bg); color: var(--mi-error); }
/* A value as a chip in a preview (NeoUI's soft Badge), and a status Badge whose words may wrap. */
.mi-setting__chip, .mi-tfield__chip { font-weight: 500; overflow-wrap: anywhere; }
.mi-badge-wrap { white-space: normal; align-items: flex-start; gap: 0.3rem; }
/* The method (GET, POST …) never breaks between its letters, also in the narrow side panel (which wraps anywhere). */
.mi-http__badge { flex: none; white-space: nowrap; overflow-wrap: normal; }
/* The curl editor's warnings (NeoUI's Alert) and its small row buttons. */
.mi-http__warning { padding: 0.45rem 0.7rem; }
.mi-json__action { height: 1.6rem; padding-inline: 0.45rem; font-size: 0.75rem; font-family: var(--mi-font); }
:is(.mi-rows, .mi-extract, .mi-outputs, .mi-http-step, .mi-http-step__section, .mi-http [role="tabpanel"]) > button { justify-self: start; }
.mi-http__kinds, .mi-focus-picker__views { justify-self: start; max-width: 100%; }
/* A view switch or a kind of body/auth reads as one compact control, not a row as wide as the dialog. */
:is(.mi-http__kinds, .mi-focus-picker__views) > .mi-segmented-group > span { flex: 0 0 auto; }
/* ===== End of NeoUI area: editor-settings ===== */
/* ===== NeoUI area: manage (Manage/, PcTools/) ===== */
/* A section card on NeoUI's Card (docs/ui.md "Page section cards", "NeoUI"): <Card Class="mi-card mi-section-card">, NeoUI's
   CardHeader (the title left, CardAction right), CardContent and CardFooter. The card's own padding goes to its parts (NeoUI's
   px-6/py-6/gap-6 made compact, as .mi-card was), so .mi-card__sub and the table rules inside a .mi-card still line up. */
.mi-card.mi-section-card { gap: var(--mi-space-4); padding: var(--mi-card-py) 0; }
.mi-section-card > [data-slot="card-header"],
.mi-section-card > [data-slot="card-content"],
.mi-section-card > [data-slot="card-footer"] { min-width: 0; padding-inline: var(--mi-card-px); }
.mi-section-card > [data-slot="card-header"] { align-items: center; gap: var(--mi-space-1) var(--mi-space-3); }
.mi-section-card > [data-slot="card-header"] > [data-slot="card-action"] { align-self: center; }
.mi-section-card > [data-slot="card-footer"] {
  flex-wrap: wrap; gap: var(--mi-space-1) var(--mi-space-3); margin-bottom: calc(-1 * var(--mi-card-py)); padding-block: var(--mi-space-3);
  border-top: 1px solid var(--mi-border); border-radius: 0 0 var(--mi-radius-card) var(--mi-radius-card); background: var(--mi-surface);
}
/* The PC tools' busy lines (NeoUI's Spinner next to the words); a folder is a dense Link button with Lucide's folder icon; the
   view switch (ToggleGroup) drawn as one segmented control. */
.mi-pctools__busy, .mi-pctools__waiting { display: inline-flex; align-items: center; gap: 0.4rem; }
.mi-pctools__folder.mi-pctools__folder { height: auto; padding: 0.1rem 0; font-weight: 500; text-decoration: underline; text-underline-offset: 0.2em; }
.mi-pctools__views { justify-self: start; gap: 0; padding: 3px; border: 0; border-radius: calc(var(--mi-radius) + 2px); background: var(--mi-surface); }
.mi-pctools__views [role="radio"] { height: 1.875rem; border: 1px solid transparent; color: var(--mi-text-muted); }
.mi-pctools__views [role="radio"]:hover { background: transparent; color: var(--mi-text); }
.mi-pctools__views [role="radio"][aria-checked="true"] { background: var(--mi-bg); color: var(--mi-text); border-color: var(--mi-border); }
.mi-pctools__views [role="radio"][aria-checked="true"]:not(:focus-visible) { box-shadow: var(--shadow-sm); }

/* ===== NeoUI area: editor-frame ===== */
/* "Tilføj trin" (StepPicker on ModalDialog): a narrow dialog next to the "+" that opened it (the inline left/top/bottom/max-height),
   or centred when opened from the outline; inside the window on small screens, full screen below 600 px like every dialog. */
.mi-dialog.mi-picker { width: min(22rem, calc(100vw - 1rem)); max-width: none; padding: 0.75rem; }
.mi-dialog.mi-picker .mi-dialog__title { margin-bottom: 0.5rem; font-size: 1rem; }
.mi-dialog.mi-picker .mi-dialog__actions { margin-top: 0.6rem; }
/* The inline place replaces NeoUI's inline stacking order (z-index 54 over its backdrop's 53 for a first dialog): given back here. */
.mi-dialog.mi-picker--anchored { translate: none; z-index: 55; }
@media (min-width: 600px) and (max-width: 767.98px) {
  .mi-dialog.mi-picker--anchored { left: 0.5rem !important; top: 0.5rem !important; bottom: auto !important; max-height: calc(100dvh - 1rem) !important; }
}
@media (max-width: 599.98px) {
  div.mi-dialog.mi-picker--anchored[data-mi-dialog] { inset: 0 !important; width: 100%; max-height: 100% !important; }
}

/* A LinkButton (an <a>) in NeoUI's Outline look: the text colour of a button, not of a link (admin.css's base "a" rule would win,
   since the Outline variant sets no colour), never underlined. */
a.mi-linkbutton, a.mi-linkbutton:hover { color: var(--mi-text); text-decoration: none; }

/* ===== NeoUI area: pages (layout, pages and their shared components; docs/ui.md "NeoUI"). NeoUI's elements are not reached by
   a component's scoped CSS, so the rules for them are here. ===== */
/* A loading state says it in words, NeoUI's spinner beside them. */
.mi-loading { display: flex; align-items: center; gap: 0.45rem; }
.mi-loading__spinner { flex: none; }
/* A bar of NeoUI's Alert (the frame's connection and idle warnings, the PC lock): icon, sentence and button on one wrapping row. */
.mi-alertbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0.5rem 1rem; padding: 0.75rem 1rem; color: var(--mi-text); }
.mi-alertbar--page { margin: 0 0 var(--mi-space-3); }
/* The menus' items (ActionMenu, in NeoUI's overlay host). */
.mi-actionmenu__button { gap: 0.35rem; }
.mi-actionmenu__list { min-width: 14rem; }
.mi-actionmenu__item--danger { color: var(--mi-error); }
.mi-actionmenu__item[aria-checked="true"] { font-weight: 600; box-shadow: inset 3px 0 0 var(--mi-accent); }
/* "Tekniske detaljer" (Shared/TechnicalDetails.razor, NeoUI's Collapsible): a small muted ghost button with a chevron. */
.mi-details__toggle { height: auto; margin-left: -0.5rem; padding: 0.2rem 0.5rem; gap: 0.3rem; color: var(--mi-text-muted); font-weight: inherit; }
/* A state as NeoUI's soft Badge (MacrosStateView, ReadinessStateView): icon + text, a sentence wraps inside the badge. */
.mi-statebadge { gap: 0.3rem; max-width: 100%; white-space: normal; overflow-wrap: anywhere; font-size: var(--mi-text-hint); }
.mi-statebadge > .mi-badge { flex: none; }
/* NeoUI's Skeleton pulses; not under reduced motion (the loading text still says it). */
@media (prefers-reduced-motion: reduce) { .mi-skeleton__row { animation: none; } }
/* A check box (NeoUI's Checkbox, a button) and its Label side by side; a toolbar's select with its label. */
.mi-check > label { font-weight: inherit; line-height: 1.3; cursor: pointer; }
.mi-overview__customer, .mi-feed__customer { display: inline-flex; align-items: center; gap: var(--mi-space-2); }
.mi-overview__customer > label, .mi-feed__customer > label { font-weight: inherit; }
/* NeoUI's Card: a section card is Class="mi-card mi-section-card" (area manage, above: CardHeader, CardAction, CardContent).
   Other cards that keep the website's padding and rhythm on NeoUI's element (the PC cards' list items, the built-in call source)
   are Class="mi-card" without it: NeoUI's flex column and gap give way to the card's own blocks. A card that names a region sits
   in a section (Card takes no attributes): .mi-cardsection passes the grid cell's height on to the card. */
.mi-card[data-slot="card"]:not(.mi-section-card) { display: block; gap: 0; }
.mi-card [data-slot="card-header"].mi-card__head { padding-inline: 0; }
.mi-card [data-slot="card-action"].mi-card__actions { align-self: center; }
.mi-card [data-slot="card-title"].mi-card__title { font-weight: 600; line-height: 1.3; letter-spacing: normal; }
.mi-card:not(.mi-section-card) > [data-slot="card-content"] { padding-inline: 0; }
.mi-cardsection { display: flex; flex-direction: column; min-width: 0; }
.mi-cardsection > [data-slot="card"] { flex: 1 1 auto; }
.mi-alertbar--trace { margin: 0.5rem 0; }
/* The login card (Pages/Login.razor, NeoUI's Card with .mi-login's padding and shadow): the website's block rhythm, not NeoUI's gap. */
.mi-login[data-slot="card"] { display: block; }
.mi-login .mi-form { display: grid; gap: var(--mi-space-4); }
/* AdminTable / .mi-table in NeoUI's table look (the website's table stays: row headers, phone cards; "Tables" above): no hairline
   under the last row. */
.mi-table tbody tr:last-child > :is(th, td) { border-bottom: 0; }
/* An Alert bar's sentence takes the row's rest and wraps there, beside its icon (not under it); buttons keep their width. */
.mi-alertbar > span:not(.mi-badge, .mi-pclock__icon, .mi-helptip) { flex: 1 1 14rem; min-width: 0; }

/* ===== Charts (Shared/Charts; docs/ui.md "Charts") =====
   Inline SVG drawn by our own components (no chart library: CSP). The plot's SVG stretches with its frame
   (preserveAspectRatio none), so lines keep their width by vector-effect and every label is HTML beside it: text never scales
   or clips. Thin marks, hairline grid, a 2 px surface gap between touching marks; colours only from the --mi-chart-* tokens;
   legends and axis text in the text tokens. Hover, focus and the arrow keys show one tooltip for the whole column. */
.mi-chart { margin: 0; min-width: 0; }
.mi-chart__legend { display: flex; flex-wrap: wrap; gap: var(--mi-space-1) var(--mi-space-4); margin: 0 0 var(--mi-space-2); padding: 0; list-style: none; font-size: var(--mi-text-hint); color: var(--mi-text-muted); }
.mi-chart__legend li { display: inline-flex; align-items: center; gap: 0.375rem; }
.mi-chart__key { flex: none; width: 0.75rem; height: 0.75rem; border-radius: 2px; background: var(--mi-chart-color, var(--mi-chart-1)); position: relative; overflow: hidden; }
.mi-chart__key--line { height: 2px; width: 1rem; border-radius: 1px; }
.mi-chart__key--band { opacity: 0.3; }
.mi-chart__key--warn::after, .mi-chart__key--bad::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--mi-text) 45%, transparent) 2px 3px); }
.mi-chart__key--bad::after { background: repeating-linear-gradient(45deg, transparent 0 2px, color-mix(in srgb, var(--mi-text) 45%, transparent) 2px 3px); }
.mi-chart__frame { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--mi-space-2); }
.mi-chart__yaxis { position: relative; min-width: 2.25rem; height: var(--mi-chart-height, 13rem); font-size: var(--mi-text-small); color: var(--mi-text-muted); font-variant-numeric: tabular-nums; }
.mi-chart__yaxis span { position: absolute; right: 0; transform: translateY(50%); white-space: nowrap; line-height: 1; }
.mi-chart__ylabel { grid-column: 1 / -1; margin: 0 0 var(--mi-space-1); font-size: var(--mi-text-small); color: var(--mi-text-muted); }
.mi-chart__plot { position: relative; height: var(--mi-chart-height, 13rem); min-width: 0; border-radius: 4px; outline-offset: 2px; }
.mi-chart__plot:focus-visible { outline: 2px solid var(--mi-focus); }
.mi-chart__svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mi-chart__grid { stroke: var(--mi-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mi-chart__baseline { stroke: var(--mi-input); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mi-chart__hit { fill: transparent; }
.mi-chart__col--active .mi-chart__hit { fill: color-mix(in srgb, var(--mi-text) 6%, transparent); }
.mi-chart__mark { fill: var(--mi-chart-color, var(--mi-chart-1)); }
.mi-chart__texture { stroke: color-mix(in srgb, var(--mi-text) 45%, transparent); stroke-width: 1.5; fill: none; }
.mi-chart__line { fill: none; stroke: var(--mi-chart-color, var(--mi-chart-1)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mi-chart__line--upper { stroke-width: 1; opacity: 0.7; }
.mi-chart__band { fill: var(--mi-chart-color, var(--mi-chart-1)); opacity: 0.12; stroke: none; }
.mi-chart__cross { stroke: var(--mi-text-muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mi-chart__dot { position: absolute; width: 0.5rem; height: 0.5rem; margin: -0.25rem 0 0 -0.25rem; border-radius: 50%; background: var(--mi-chart-color, var(--mi-chart-1)); box-shadow: 0 0 0 2px var(--mi-card); pointer-events: none; }
.mi-chart__frame--rate { grid-template-columns: auto minmax(0, 1fr) auto; }
.mi-chart__yaxis--right { min-width: 2.75rem; }
.mi-chart__yaxis--right span { right: auto; left: 0; }
.mi-chart__line--over { pointer-events: none; }
.mi-chart__plot--click .mi-chart__col { cursor: pointer; }
.mi-chart__xaxis { grid-column: 2; position: relative; height: 1.5rem; font-size: var(--mi-text-small); color: var(--mi-text-muted); font-variant-numeric: tabular-nums; }
.mi-chart__xaxis span { position: absolute; top: 0.25rem; transform: translateX(-50%); white-space: nowrap; }
.mi-chart__tip { position: absolute; z-index: 2; top: 0.25rem; min-width: 9rem; max-width: 18rem; padding: 0.5rem 0.625rem; border: 1px solid var(--mi-border); border-radius: var(--mi-radius); background: var(--mi-card); color: var(--mi-text); box-shadow: var(--mi-shadow-pop); font-size: var(--mi-text-hint); pointer-events: none; }
.mi-chart__tip--left { transform: translateX(calc(-100% - 0.75rem)); }
.mi-chart__tip--right { transform: translateX(0.75rem); }
.mi-chart__tip-title { margin: 0 0 0.25rem; color: var(--mi-text-muted); }
.mi-chart__tip-rows { display: grid; grid-template-columns: auto auto 1fr; gap: 0.125rem 0.5rem; align-items: center; margin: 0; }
.mi-chart__tip-rows dt { display: contents; }
.mi-chart__tip-rows dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.mi-chart__tip-name { color: var(--mi-text-muted); }
.mi-chart__more { margin-top: var(--mi-space-1); }
.mi-chart__toggle { height: auto; margin-left: -0.5rem; padding: 0.2rem 0.5rem; gap: 0.3rem; color: var(--mi-text-muted); font-weight: inherit; }
.mi-chart__more[data-open="true"] .mi-chart__toggle svg { transform: rotate(90deg); }
.mi-chart__table { overflow-x: auto; max-height: 22rem; overflow-y: auto; }
.mi-chart__table td, .mi-chart__table th[scope="col"]:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.mi-chart--loading .mi-chart__frame, .mi-chart--loading .mi-share { opacity: 0.45; }
.mi-chart--1 { --mi-chart-color: var(--mi-chart-1); }
.mi-chart--2 { --mi-chart-color: var(--mi-chart-2); }
.mi-chart--3 { --mi-chart-color: var(--mi-chart-3); }
.mi-chart--good { --mi-chart-color: var(--mi-chart-good); }
.mi-chart--warn { --mi-chart-color: var(--mi-chart-warn); }
.mi-chart--bad { --mi-chart-color: var(--mi-chart-bad); }
.mi-chart--neutral { --mi-chart-color: var(--mi-chart-neutral); }
/* The share bar: one whole split into parts (a figure, not a plot): 28 px, each part its own block with its share inside when it fits. */
.mi-share { display: flex; gap: 2px; height: 1.75rem; min-width: 0; }
.mi-share__part { position: relative; display: flex; align-items: center; min-width: 2px; padding: 0 0.375rem; border-radius: 4px; background: var(--mi-chart-color, var(--mi-chart-1)); color: var(--mi-chart-on); font-size: var(--mi-text-small); font-weight: 600; overflow: hidden; white-space: nowrap; }
.mi-share__part.mi-chart--warn { color: var(--mi-chart-on-warn); }
.mi-share__part.mi-chart--warn::after, .mi-share__part.mi-chart--bad::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--mi-chart-on-warn) 20%, transparent) 4px 5px); pointer-events: none; }
.mi-share__part.mi-chart--bad::after { background: repeating-linear-gradient(45deg, transparent 0 4px, color-mix(in srgb, var(--mi-chart-on-warn) 24%, transparent) 4px 5px); }
.mi-share__label { position: relative; z-index: 1; }
/* The range picker: presets as one segmented row, the custom dates beside it. */
.mi-range { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2) var(--mi-space-3); min-width: 0; }
.mi-range__custom { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2); }
.mi-range__custom input { width: 10.5rem; }
/* Stat tiles above the charts: a label, the number, a note. */
.mi-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: var(--mi-space-3); margin: 0 0 var(--mi-space-4); padding: 0; list-style: none; }
.mi-stat { min-width: 0; padding: var(--mi-space-3) var(--mi-space-4); border: 1px solid var(--mi-border); border-radius: var(--mi-radius-card); background: var(--mi-card); }
.mi-stat__label { margin: 0; font-size: var(--mi-text-hint); color: var(--mi-text-muted); }
.mi-stat__value { margin: 0.125rem 0 0; font-size: 1.5rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.mi-stat__note { margin: 0.125rem 0 0; font-size: var(--mi-text-small); color: var(--mi-text-muted); }

/* ===== "Softphone-drift" (Pages/SoftphoneOpsPage; docs/architecture.md §14.22) ===== */
.mi-ops__filters { margin-bottom: var(--mi-space-4); }
.mi-ops__charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); gap: var(--mi-space-4); margin-bottom: var(--mi-space-4); }
.mi-ops__charts > * { min-width: 0; }
.mi-ops__wide { grid-column: 1 / -1; }
.mi-ops__steps { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--mi-space-3); }
.mi-ops__steps > li { padding-left: 0.25rem; }
.mi-ops__steps p { margin: 0 0 var(--mi-space-1); }
.mi-ops__code { display: block; margin: var(--mi-space-1) 0; padding: 0.625rem 0.75rem; border: 1px solid var(--mi-code-border); border-radius: var(--mi-radius); background: var(--mi-code-bg); color: var(--mi-code-text); font-family: var(--mi-font-mono); font-size: var(--mi-text-hint); white-space: pre-wrap; overflow-wrap: anywhere; }
.mi-ops__timeline { --mi-chart-height: 8rem; }
.mi-ops__legs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--mi-space-3); }
.mi-ops__rule-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--mi-space-3); }
.mi-ops__filterrow { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--mi-space-3); margin-top: var(--mi-space-3); }
.mi-ops__filter { display: inline-flex; flex-direction: column; gap: var(--mi-space-1); min-width: 0; }
.mi-ops__filter input, .mi-ops__filter select { width: 11rem; max-width: 100%; }
.mi-ops__filter--end { margin-left: auto; }
.mi-ops__subtitle { margin: var(--mi-space-4) 0 var(--mi-space-2); font-size: var(--mi-text-body); font-weight: 600; }
.mi-ops__scroll { overflow-x: auto; }
.mi-ops__facts { display: grid; gap: var(--mi-space-1) var(--mi-space-4); margin: 0 0 var(--mi-space-2); }
.mi-ops__facts > div { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: var(--mi-space-2); }
.mi-ops__facts dt { color: var(--mi-text-muted); }
.mi-ops__facts dd { margin: 0; overflow-wrap: anywhere; }
.mi-ops__facts--tight > div { grid-template-columns: minmax(5rem, 7rem) minmax(0, 1fr); }
.mi-ops__leg { min-width: 0; padding: var(--mi-space-3); border: 1px solid var(--mi-border); border-radius: var(--mi-radius); }
.mi-ops__legtitle { display: flex; align-items: center; gap: var(--mi-space-2); margin: 0 0 var(--mi-space-2); font-size: var(--mi-text-body); font-weight: 600; }
.mi-ops__links { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--mi-space-1); }
.mi-ops__timeline { display: grid; gap: var(--mi-space-3); }
/* "Statistik" (docs/ui.md "Statistik"): the page shares the softphone page's filter row and chart grid (.mi-ops__*); its own are the
   filter chips, the three "top" lists, the rows that drill down and the compact card on the customer's, the PC's and a macro's page. */
.mi-stats-page__chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2); margin-top: var(--mi-space-3); }
.mi-stats-page__chip { display: inline-flex; align-items: center; gap: var(--mi-space-1); padding: 0.125rem 0.25rem 0.125rem 0.625rem; border: 1px solid var(--mi-border); border-radius: 999px; background: var(--mi-card); font-size: var(--mi-text-hint); }
.mi-stats-page__note { margin: 0 0 var(--mi-space-3); font-size: var(--mi-text-hint); color: var(--mi-text-muted); }
.mi-stats-page__tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: var(--mi-space-4); margin-bottom: var(--mi-space-4); }
.mi-stats-page__tops > * { min-width: 0; }
.mi-stats-page__cardhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--mi-space-2); }
.mi-stats-page__sub { display: block; font-size: var(--mi-text-small); color: var(--mi-text-muted); }
.mi-stats-page table .mi-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi-stats-page__small { --mi-chart-height: 9rem; }
.mi-statscard { --mi-chart-height: 6.5rem; }
.mi-statscard__numbers { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: var(--mi-space-2) var(--mi-space-4); margin: 0 0 var(--mi-space-3); }
.mi-statscard__numbers > div { min-width: 0; }
.mi-statscard__numbers dt { font-size: var(--mi-text-small); color: var(--mi-text-muted); }
.mi-statscard__numbers dd { margin: 0; font-size: 1.25rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.mi-statscard__foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--mi-space-2); margin: var(--mi-space-2) 0 0; font-size: var(--mi-text-hint); color: var(--mi-text-muted); }
/* "Pr. styresystem" (2026-11, §7.21): a program's name or path on a Mac and on Linux, folded under the field while empty. */
.mi-platforms { margin: 0.4rem 0 0.2rem; }
.mi-platforms > summary { cursor: pointer; color: var(--mi-text-muted); }
.mi-platforms[open] > summary { margin-bottom: 0.4rem; }
.mi-platforms__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.5rem 0.75rem; }

/* "SMS-API" (docs/architecture.md §19.12): what its dialogs show. A dialog is rendered outside the page, so the section's own stylesheet
   (Sms/SmsSection.razor.css) does not reach it: an SMS's facts as a two-column list, its sub-headings and a shown text. */
.mi-sms__facts { display: grid; grid-template-columns: minmax(9rem, max-content) minmax(0, 1fr); gap: 0.25rem var(--mi-space-4); margin: 0 0 var(--mi-space-3); }
.mi-sms__facts > dt { color: var(--mi-text-muted); }
.mi-sms__facts > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.mi-sms__subhead { display: flex; align-items: center; gap: var(--mi-space-2); margin: var(--mi-space-4) 0 var(--mi-space-2); font-size: var(--mi-text-h3); }
.mi-sms__text { margin: 0; padding: var(--mi-space-2) var(--mi-space-3); max-width: 40rem; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--mi-code-border); border-radius: var(--mi-radius); background: var(--mi-code-bg); color: var(--mi-code-text); font-family: var(--mi-font-mono); font-size: var(--mi-text-hint); }
.mi-sms__inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--mi-space-3); }
.mi-sms__clock { width: 6rem; font-variant-numeric: tabular-nums; }
.mi-sms__badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-2); }

/* SMS automations (docs/architecture.md §19.26): the shared editor and list of MaxIntegration.Sms.UI, on the admin website and the customer page. */
.mi-auto { display: flex; flex-direction: column; gap: var(--mi-space-4); min-width: 0; }
.mi-auto__group { display: flex; flex-direction: column; gap: var(--mi-space-2); min-width: 0; margin: 0; padding: var(--mi-space-3) var(--mi-space-4); border: 1px solid var(--mi-border); border-radius: var(--mi-radius); }
.mi-auto__group > legend { padding: 0 var(--mi-space-1); font-weight: 600; }
.mi-auto__sub { margin: var(--mi-space-2) 0 0; font-size: var(--mi-text-hint); font-weight: 600; }
.mi-auto__line { display: flex; flex-wrap: wrap; gap: var(--mi-space-2); align-items: center; min-width: 0; }
.mi-auto__method { flex: 0 0 7.5rem; }
.mi-auto__url { flex: 1 1 20rem; min-width: 0; }
.mi-auto__rows { display: flex; flex-direction: column; align-items: flex-start; gap: var(--mi-space-2); min-width: 0; }
.mi-auto__row { display: flex; flex-wrap: wrap; gap: var(--mi-space-2); align-items: center; width: 100%; min-width: 0; }
.mi-auto__name { flex: 1 1 10rem; min-width: 0; }
.mi-auto__value { flex: 2 1 16rem; min-width: 0; }
.mi-auto__numbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--mi-space-2) var(--mi-space-4); margin: 0; padding: 0; list-style: none; max-height: 18rem; overflow: auto; }
.mi-auto__numbers > li { display: flex; align-items: flex-start; gap: var(--mi-space-2); min-width: 0; }
.mi-auto__number { font-family: var(--mi-font-mono); }
.mi-auto__note { display: block; color: var(--mi-text-muted); font-size: var(--mi-text-hint); overflow-wrap: anywhere; }
.mi-auto__placeholders { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-1) var(--mi-space-2); }
.mi-auto__placeholders > p { flex-basis: 100%; margin: 0; }
.mi-auto__modem { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--mi-space-2) var(--mi-space-4); margin-top: var(--mi-space-3); }
.mi-auto__modem > p { margin: 0; flex: 1 1 18rem; }
.mi-mono { font-family: var(--mi-font-mono); }
.mi-auto__inbox { display: flex; flex-direction: column; gap: var(--mi-space-2); margin: 0; padding: 0; list-style: none; }
.mi-auto__inbox > li { padding: var(--mi-space-2) var(--mi-space-3); border: 1px solid var(--mi-border); border-radius: var(--mi-radius); }
.mi-auto__inbox-meta { display: flex; flex-wrap: wrap; gap: var(--mi-space-1) var(--mi-space-3); color: var(--mi-text-muted); font-size: var(--mi-text-hint); }
.mi-auto__inbox-text { margin: var(--mi-space-1) 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mi-auto__request { margin: var(--mi-space-2) 0 0; padding: var(--mi-space-2) var(--mi-space-3); max-height: 16rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--mi-code-border); border-radius: var(--mi-radius); background: var(--mi-code-bg); color: var(--mi-code-text); font-size: var(--mi-text-hint); }
.mi-auto__confirm { display: flex; flex-direction: column; gap: var(--mi-space-2); }
.mi-auto__test-mode { flex: 0 0 auto; min-width: 9rem; }
.mi-auto__delivery { display: flex; flex-wrap: wrap; align-items: center; gap: var(--mi-space-1) var(--mi-space-3); margin-top: var(--mi-space-1); }
