/* License-q admin styling, in Microsoft's Fluent 2 design language (#14048). Replaces Bootstrap 2 +
   AngularJS; no framework, nothing to keep up to date. Dark mode follows the operator's OS setting until
   they pick one with the toggle in the header.

   Every colour, radius, spacing step, shadow and type size comes from fluent-tokens.css, which must be
   linked first and carries Fluent's own token names. Controls are the existing hand-written markup,
   re-skinned to the Fluent 2 component specs (Button, Input, Checkbox, TabList, DataGrid, Badge, Tag,
   MessageBar, Menu, Dialog, NavDrawer) -- no component library, so no page had to change.

   Two layers sit in front of the Fluent tokens here. The nine short variables below (--bg, --fg, ...) are
   the original semantic set, kept as a compatibility layer: crm.css used to read only those, and three
   inline styles in Release-q pages still do. And a handful of --app-* tokens name the few surfaces this
   app has that Fluent does not (the app chrome behind the content card, a grid row under the pointer).

   Light and dark: every token is written once with light-dark(), and the *used* color-scheme decides
   which half applies -- one declaration cannot drift from its twin. color-scheme also themes what CSS
   does not reach: scrollbars, select drop-downs, date pickers. light-dark() needs Chrome 123+/Firefox
   120+/Safari 17.5+, an acceptable floor for one internal operator on current Chrome.

   Contrast is computed, not eyeballed: FluentTokensTests parses the light-dark() pairs and checks every
   text-on-surface pair this file uses against WCAG AA in both themes. A failing pair is invisible in a
   screenshot, which is the reason the test exists. */
:root {
    color-scheme: light dark;

    /* The compatibility layer. Same nine names and jobs as before the re-skin. */
    --bg:        var(--colorNeutralBackground1);
    --fg:        var(--colorNeutralForeground1);
    /* Foreground3, not 4: #707070 is 4.35:1 on the grey app chrome, #616161 is 5.7:1. */
    --muted:     var(--colorNeutralForeground3);
    --border:    var(--colorNeutralStroke1);
    /* The brand as text: links, the emphasised chart line, accent outlines. Light is the exact Opti-Q
       purple (9.8:1 on white), dark is brand110 (6.0:1 on #292929, 5.2:1 on a hovered row). */
    --accent:    var(--colorBrandForegroundLink);
    --accent-fg: var(--colorNeutralForegroundInverted);
    /* A quiet filled area inside the content: code blocks, filter bars, chips. Fluent's Background3. */
    --row-alt:   var(--colorNeutralBackground3);
    --danger:    var(--colorStatusDangerForeground1);
    --ok:        var(--colorStatusSuccessForeground1);

    /* App surfaces. The chrome (sidebar and header) is grey and the page content sits on one card --
       light Background3 behind Background1, dark Background2 behind Background1, the way Fluent apps
       layer a canvas behind content. */
    --app-chrome:     light-dark(#f5f5f5, #1f1f1f);
    /* A nav item under the pointer or selected, on the chrome. */
    --app-nav-hover:  light-dark(#ebebeb, #2e2e2e);
    /* A grid row under the pointer. Dark is #333333, not Fluent's #3d3d3d: on #3d3d3d the dark link,
       success and danger text all measure below 4.5:1. */
    --app-row-hover:  light-dark(#f5f5f5, #333333);

    /* Fluent MessageBar intent icons (InfoFilled, ErrorCircleFilled), as masks so they take the intent's
       themed colour. Shared with crm.css's .callout. */
    --app-icon-info:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm-.5 6a.5.5 0 0 1 1 0v4a.5.5 0 0 1-1 0V7Zm.5-2.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z'/%3E%3C/svg%3E");
    --app-icon-error: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1Zm-.5 3.5a.5.5 0 0 1 1 0V9a.5.5 0 0 1-1 0V4.5Zm.5 6.25a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z'/%3E%3C/svg%3E");
}

/* The operator's explicit choice, stamped onto <html> by the head script before first paint and
   again by the toggle. With the attribute absent, the declaration above keeps following the OS --
   so "follow the system" stays the default and is not a third thing to store. */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"]  { color-scheme: dark; }

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--app-chrome);
    color: var(--fg);
    /* Fluent body1: 14/20 Segoe UI. */
    font-family: var(--fontFamilyBase);
    font-size: var(--fontSizeBase300);
    line-height: var(--lineHeightBase300);
    font-weight: var(--fontWeightRegular);
}

/* Fluent focus indicator: a 2px outline in StrokeFocus2, keyboard only. Controls with their own
   indicator (text inputs, the underline) override it below. */
:focus-visible { outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2); outline-offset: 1px; }

.page { display: flex; min-height: 100vh; }

/* Fluent NavDrawer on the app chrome: no border, the content card beside it does the separating. */
.sidebar {
    width: 240px;
    flex: 0 0 240px;
    padding: var(--spacingVerticalM) var(--spacingHorizontalS);
    background: var(--app-chrome);
    display: flex;
    flex-direction: column;
    /* #14041: the sidebar stays in view while a long page scrolls. It used to be as tall as the page, so
       `ul.secondary { margin-top: auto }` put Settings and Hangfire at the bottom of the PAGE -- below a
       long table, out of sight. Screen-high and sticky, they sit at the bottom of the SCREEN instead, and a
       menu taller than the screen scrolls inside itself. align-self: the flex row would otherwise stretch
       the sidebar to the page's height again, and a stretched box has nothing to stick within. */
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
}

/* Narrow-screen furniture of #14041; shown by the media query at the end of this file. */
.nav-toggle, .nav-close, .header-brand, .nav-backdrop, .narrow-only { display: none; }

/* Fluent subtitle2 beside the mark. */
.sidebar .brand {
    display: flex;
    align-items: center;
    gap: var(--spacingHorizontalS);
    padding: var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalL);
    font-size: var(--fontSizeBase400);
    line-height: var(--lineHeightBase400);
    font-weight: var(--fontWeightSemibold);
}

/* The Opti-Q mark. No light plate and no filter in dark mode: this asset has the brand purple as its
   own background, which is exactly why the icon is used here and the wordmark is not. The wordmark is
   purple on transparent and would all but vanish on the dark sidebar. */
.sidebar .brand-icon {
    height: 28px;
    width: auto;
    flex: none;
    border-radius: var(--borderRadiusMedium);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--spacingVerticalXXS); }
.sidebar ul.secondary { margin-top: auto; border-top: 1px solid var(--colorNeutralStroke2); padding-top: var(--spacingVerticalS); }

/* Fluent NavItem: 36px, rounded, Foreground2; the selected one gets the selected fill, Foreground1
   semibold and the 4x16 brand indicator bar on its left edge. The bar is the compound brand colour
   (light #662483, dark brand100) -- it carries the state, so the selected item is not told apart by a
   near-invisible grey alone. */
.sidebar a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 0 var(--spacingHorizontalM);
    border-radius: var(--borderRadiusMedium);
    color: var(--colorNeutralForeground2);
    text-decoration: none;
}
.sidebar a:hover { background: var(--app-nav-hover); color: var(--colorNeutralForeground1); }
.sidebar a.active { background: var(--app-nav-hover); color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.sidebar a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--strokeWidthThickest);
    height: 16px;
    margin-top: -8px;
    border-radius: var(--borderRadiusCircular);
    background: var(--colorCompoundBrandForeground1);
}
.sidebar a:focus-visible { outline-offset: -2px; }

main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

/* App bar on the chrome, 48px. */
main > header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--spacingHorizontalS);
    min-height: 48px;
    padding: var(--spacingVerticalS) var(--spacingHorizontalL);
    background: var(--app-chrome);
    color: var(--colorNeutralForeground2);
}
main > header a { color: var(--colorBrandForegroundLink); text-decoration: none; }
main > header a:hover { text-decoration: underline; }

/* Theme toggle, in the header beside Sign out.

   Both icons are always in the DOM, stacked in one grid cell, and which one is visible is decided
   by light-dark() -- the same mechanism as the palette. That matters for more than tidiness: the
   button is server-rendered markup, so anything that swapped its contents in JS would be undone the
   next time Blazor re-rendered the header. Nothing here is stateful, so there is nothing to resync,
   which is the same reasoning that made the item 13 warning panels <details>.

   The icon shows the mode you would switch *to*: a moon while light, a sun while dark.

   Inline SVG rather than an emoji, deliberately -- B3 was an emoji with no glyph in the operator's
   font that drew as an empty box, and the control the page's whole appearance hangs off is the
   worst possible place to repeat that. */
/* Fluent subtle icon button, 32x32. */
.theme-toggle {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: var(--borderRadiusMedium);
    background: var(--colorSubtleBackground);
    cursor: pointer;
    line-height: 0;
}
/* button.-qualified so it outranks the generic button hover further down. */
button.theme-toggle:hover, button.theme-toggle:active { background: var(--app-nav-hover); }
.theme-toggle svg { grid-area: 1 / 1; width: 20px; height: 20px; }
.theme-toggle .i-sun { color: light-dark(transparent, var(--colorNeutralForeground2)); }
.theme-toggle .i-moon { color: light-dark(var(--colorNeutralForeground2), transparent); }
.theme-toggle:hover .i-sun { color: light-dark(transparent, var(--fg)); }
.theme-toggle:hover .i-moon { color: light-dark(var(--fg), transparent); }

/* Language picker, in the header beside the theme toggle.

   A <details> menu like Grid settings, and styled off the same rules, so there is one dropdown idiom in
   this app rather than two. Anchored to its right edge for the same reason .col-menu-list is: it sits
   near the right edge of the viewport, and a box growing rightwards from there would widen the document
   and scroll the whole page sideways. */
.lang { position: relative; }
/* Fluent subtle MenuButton on the app bar. */
.lang > summary {
    display: flex;
    align-items: center;
    gap: var(--spacingHorizontalSNudge);
    min-height: 32px;
    cursor: pointer;
    padding: 0 var(--spacingHorizontalS);
    border-radius: var(--borderRadiusMedium);
    list-style: none;
    color: var(--colorNeutralForeground2);
}
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover { background: var(--app-nav-hover); color: var(--fg); }

/* Fluent Menu popover: Background1, shadow16, 4px padding, 32px items; selected = Background1Selected,
   semibold. Shared by the language menu, Grid settings and the Release-q filter drop-downs. In dark the
   popover is the same #292929 as the card it opens over, so it also takes a Stroke2 hairline. */
.lang-list {
    position: absolute;
    right: 0;
    z-index: 5;
    margin-top: var(--spacingVerticalXS);
    padding: var(--spacingVerticalXS);
    min-width: 9rem;
    background: var(--colorNeutralBackground1);
    border: 1px solid light-dark(transparent, var(--colorNeutralStroke2));
    border-radius: var(--borderRadiusMedium);
    box-shadow: var(--shadow16);
    display: grid;
    gap: var(--spacingVerticalXXS);
}
.lang-list a {
    display: flex;
    align-items: center;
    gap: var(--spacingHorizontalS);
    min-height: 32px;
    padding: 0 var(--spacingHorizontalS);
    border-radius: var(--borderRadiusMedium);
    color: var(--fg);
    text-decoration: none;
    white-space: nowrap;
}
.lang-list a:hover { background: var(--colorNeutralBackground1Hover); }
.lang-list a.active { background: var(--colorNeutralBackground1Selected); font-weight: var(--fontWeightSemibold); }

/* 2:1, the proportion both flags are drawn at. The hairline keeps the German flag's white-adjacent
   edges and the Union Jack's blue field from bleeding into the surface behind them. */
.flag {
    flex: none;
    width: 18px;
    height: 9px;
    border: 1px solid var(--border);
    border-radius: 1px;
}

/* Present for screen readers, absent from the page. The toggle's label cannot be visible text
   without the button growing into the header. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* The content card: the whole page body on one Fluent card (Background1, XLarge radius, shadow4) on the
   grey chrome. One element in MainLayout, so no page needed a wrapper. flex: 1 lets a short page's card
   still reach the bottom of the window. Narrow screens drop the card (see the media query). */
main > article {
    flex: 1 0 auto;
    min-width: 0;
    margin: 0 var(--spacingHorizontalL) var(--spacingVerticalL) 0;
    padding: var(--spacingVerticalXXL) var(--spacingHorizontalXXL);
    border-radius: var(--borderRadiusXLarge);
    background: var(--colorNeutralBackground1);
    box-shadow: var(--shadow4);
}

/* Fluent type ramp: page title title3 (24/32), section subtitle2 (16/22), sub-section body1Strong. */
h1, h2, h3 { font-weight: var(--fontWeightSemibold); }
h1 { font-size: var(--fontSizeBase600); line-height: var(--lineHeightBase600); margin: 0 0 var(--spacingVerticalL); }
h2 { font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); }
h3 { font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); }

/* Fluent Link. */
a { color: var(--colorBrandForegroundLink); text-decoration: none; }
a:hover { color: var(--colorBrandForegroundLinkHover); text-decoration: underline; }

.notice { padding: var(--spacingVerticalXXXL); max-width: 40rem; }

/* Wide grids scroll inside their own container; the page never scrolls sideways. No frame of its own:
   Fluent's DataGrid sits straight on its surface, separated by its row dividers. */
.grid-wrap { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: var(--fontSizeBase300); line-height: var(--lineHeightBase300); }

/* table-layout: fixed is what makes columns resizable at all. With the default `auto`, the browser
   re-derives every width from content on each render, so a width set by dragging is thrown away and
   one long device id stretches its column past the viewport. Fixed means a th width is honoured. */
table[data-grid-key] { table-layout: fixed; }

/* Fluent DataGrid cell: 8px sides, 34px rows at body1. */
th, td { padding: 7px var(--spacingHorizontalS); text-align: left; }

/* Truncate rather than nowrap. Every cell used to be `white-space: nowrap`, which is why the Usages
   grid was unusable: 14 columns each as wide as its longest value pushed the interesting ones far
   off-screen behind a horizontal scrollbar. Now a cell clips with an ellipsis and the full value is
   in its title attribute. */
table[data-grid-key] th,
table[data-grid-key] td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fluent header cell: opaque (it is sticky), semibold, a Stroke2 divider under it. */
thead th {
    background: var(--colorNeutralBackground1);
    border-bottom: 1px solid var(--colorNeutralStroke2);
    font-weight: var(--fontWeightSemibold);
    position: relative;   /* anchors the resize handle */
}

/* Headers stay visible while scrolling a long grid. */
.grid-wrap thead th { position: sticky; top: 0; z-index: 1; }

/* Fluent DataGrid rows: no zebra stripes, a Stroke2 divider under each row and a hover fill. */
tbody tr { border-bottom: 1px solid var(--colorNeutralStroke2); }
tbody tr:hover { background: var(--app-row-hover); }
tr.selected, tr[aria-selected="true"] { background: var(--colorSubtleBackgroundSelected); }

td.wrap { font-size: var(--fontSizeBase200); color: var(--muted); }

/* Monospace for opaque identifiers: it makes a truncated guid comparable at a glance. */
td.id { font-family: var(--fontFamilyMonospace); font-size: var(--fontSizeBase200); }

/* Resize handle. Sits in the header's right padding, so it never overlaps the label. */
.col-resize {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
}
/* Fluent's resize indicator: a 2px brand line, drawn only while it is under the pointer or dragged. */
.col-resize:hover,
body.col-resizing .col-resize { background: linear-gradient(to right, transparent 3px, var(--colorBrandStroke1) 3px 5px, transparent 5px); }

/* While dragging, suppress text selection across the whole page. */
body.col-resizing { cursor: col-resize; user-select: none; }

/* .col-hidden is gone with item 12. A hidden column used to be a header and a set of nth-child-matched
   body cells with display:none; since order and visibility moved into Blazor, a hidden column is simply
   not rendered. That also removed the latent bug in the matching: it assumed cell order equalled header
   order, which stopped being true the moment columns could move. */

/* Sortable headers. The label is a button so it is keyboard reachable; the resize handle sits beside
   it and stops its own events, so dragging an edge never triggers a sort. */
thead th .sort {
    all: unset;
    cursor: pointer;
    font: inherit;
    font-weight: var(--fontWeightSemibold);
    color: inherit;
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: var(--borderRadiusMedium);
}
/* Fluent sortable header: hover darkens the label to Foreground1, the sorted column is Foreground1 with
   its arrow; neither is brand-coloured. */
thead th { color: var(--colorNeutralForeground2); }
thead th .sort:hover, thead th.sorted { color: var(--colorNeutralForeground1); }
thead th .sort:focus-visible { outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2); outline-offset: -2px; }

/* Filter bar: a filled, borderless Background3 strip, Fluent's filled container. */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacingHorizontalS);
    align-items: center;
    margin-bottom: var(--spacingVerticalM);
    padding: var(--spacingVerticalS) var(--spacingHorizontalM);
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground3);
}
.filters label { display: flex; gap: var(--spacingHorizontalSNudge); align-items: center; font-size: var(--fontSizeBase200); color: var(--muted); }
.filters .spacer { flex: 1; }

/* Grid settings menu. Rendered by GridSettings.razor from the page's column list since item 12 -- it
   was built from the table's headers by grid.js before that, which could not offer reordering because
   order has to be part of Blazor's render. */
.col-menu { position: relative; display: inline-block; }
/* Fluent secondary MenuButton. */
.col-menu > summary {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    cursor: pointer;
    padding: 0 var(--spacingHorizontalM);
    border: 1px solid var(--colorNeutralStroke1);
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground1);
    font-weight: var(--fontWeightSemibold);
    list-style: none;
}
.col-menu > summary:hover { background: var(--colorNeutralBackground1Hover); border-color: var(--colorNeutralStroke1Hover); }
.col-menu > summary::-webkit-details-marker { display: none; }
.col-menu-list {
    position: absolute;
    /* Anchored to the trigger's RIGHT edge, not its left. With neither offset set, an absolutely
       positioned box starts where it would have sat statically and grows rightwards, so a 14rem menu
       whose trigger is near the right edge pushes the document wider -- and then the whole page
       scrolls sideways, which is the one thing item 1 said must never happen. Measured on Usages,
       whose toolbar is the longest and pushes the trigger furthest right: at a 933px viewport the
       page overflowed by 18px and at 883px by 68px. Anchoring right is enough on its own because the
       trigger's right edge is inside the viewport by definition, so the menu can only grow inwards. */
    right: 0;
    z-index: 5;
    margin-top: var(--spacingVerticalXS);
    padding: var(--spacingVerticalS);
    min-width: 14rem;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--colorNeutralBackground1);
    border: 1px solid light-dark(transparent, var(--colorNeutralStroke2));
    border-radius: var(--borderRadiusMedium);
    box-shadow: var(--shadow16);
    display: grid;
    gap: var(--spacingVerticalXS);
}
.col-menu-list label { display: flex; gap: var(--spacingHorizontalS); align-items: center; min-height: 28px; font-weight: var(--fontWeightRegular); }
.col-menu-reset { margin-top: var(--spacingVerticalS); }

/* One row per column: the visibility checkbox on the left, the two move buttons pushed right. The
   label takes the slack and truncates, so a long column name cannot widen the menu -- which is what
   made the page scroll sideways before the right-anchoring above. */
.col-menu-row { display: flex; align-items: center; gap: .5rem; }
.col-menu-row label { flex: 1; min-width: 0; }
.col-menu-row label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The list is vertical and the columns are horizontal, so the arrows need the one-line explanation
   above them; see the hint in GridSettings.razor. */
.col-menu-hint { margin: 0 0 var(--spacingVerticalXXS); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }

/* Small subtle icon buttons. */
.col-menu-move { display: flex; gap: var(--spacingHorizontalXXS); flex: none; }
.col-menu-move button {
    min-height: 24px;
    min-width: 24px;
    padding: 0 var(--spacingHorizontalXS);
    border-color: transparent;
    background: var(--colorSubtleBackground);
    font-size: var(--fontSizeBase200);
    font-weight: var(--fontWeightRegular);
    line-height: 1;
}
.col-menu-move button:hover:not(:disabled) { background: var(--colorSubtleBackgroundHover); }
/* Disabled at the ends of the row. Kept in place rather than hidden, so the buttons do not jump
   around as a column is walked from one end to the other. */
.col-menu-move button:disabled { background: transparent; border-color: transparent; }

/* Footer under a paged grid. */
.pager { display: flex; gap: var(--spacingHorizontalM); align-items: center; margin-top: var(--spacingVerticalM); }

/* Fluent Toolbar: 8px between controls. */
.toolbar { display: flex; gap: var(--spacingHorizontalS); align-items: center; margin-bottom: var(--spacingVerticalL); flex-wrap: wrap; }
.toolbar input[type=search] { min-width: 16rem; }

/* Fluent Button, medium. The default is the secondary appearance; .primary is the brand fill. Special
   buttons (tabs, segmented, filters, sort headers, menu arrows) reset what they do not want. */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacingHorizontalSNudge);
    min-height: 32px;
    padding: 5px var(--spacingHorizontalM);
    font: inherit;
    font-weight: var(--fontWeightSemibold);
    line-height: var(--lineHeightBase300);
    border: 1px solid var(--colorNeutralStroke1);
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground1);
    color: var(--colorNeutralForeground1);
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
    transition: background var(--durationFaster) var(--curveEasyEase), border-color var(--durationFaster) var(--curveEasyEase);
}
/* The enabled states never reach a disabled button: :where() keeps them at the weight they had, so page
   rules that restyle a button still win, and button:disabled below is the only rule a disabled one shows. */
:is(button, .btn):hover:where(:not(:disabled)) { background: var(--colorNeutralBackground1Hover); border-color: var(--colorNeutralStroke1Hover); color: var(--colorNeutralForeground1); text-decoration: none; }
:is(button, .btn):active:where(:not(:disabled)) { background: var(--colorNeutralBackground1Pressed); border-color: var(--colorNeutralStroke1Pressed); }
:is(button, .btn).primary:where(:not(:disabled)) { background: var(--colorBrandBackground); border-color: transparent; color: var(--colorNeutralForegroundOnBrand); }
:is(button, .btn).primary:hover:where(:not(:disabled)) { background: var(--colorBrandBackgroundHover); color: var(--colorNeutralForegroundOnBrand); }
:is(button, .btn).primary:active:where(:not(:disabled)) { background: var(--colorBrandBackgroundPressed); }
/* Fluent's focus on a filled button: the 2px outer ring plus a 1px inner ring in StrokeFocus1, so the
   indicator shows against the brand fill too. */
:is(button, .btn).primary:focus-visible { box-shadow: inset 0 0 0 1px var(--colorStrokeFocus1); }
/* Fluent Button, small: 24px, caption1. For a grid row or a hint line, so the row keeps its height. */
:is(button, .btn).small { min-height: 24px; padding: 0 var(--spacingHorizontalS); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
button.danger { color: var(--colorStatusDangerForeground1); }
button.danger:hover { color: var(--colorStatusDangerForeground1); }
/* Fluent disabled: flat fill and foreground, not a faded copy of the enabled look. */
button:disabled, button:disabled:hover, button:disabled:active {
    background: var(--colorNeutralBackgroundDisabled);
    border-color: var(--colorNeutralStrokeDisabled);
    color: var(--colorNeutralForegroundDisabled);
    cursor: default;
}

/* A square button carrying one icon, for row furniture that has no room for a word.

   The feature rows on the license page are why it exists: a select, a value box and a "Remove" button
   in a .toolbar, which wraps -- and once the label became "Entfernen" the button wrapped onto its own
   line for every row, so a three-feature license was six lines tall. The icon is the same width in
   every language.

   Inline SVG rather than an emoji or a font glyph, and the label lives in title + aria-label: B3 was an
   emoji with no glyph in the operator's font that drew as an empty box, and an unlabelled icon button
   is a button nobody can identify. */
/* Fluent subtle icon-only Button, 32x32, 20px icon. */
button.icon-btn {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    min-height: 0;
    padding: 0;
    line-height: 1;
    border-color: transparent;
    background: var(--colorSubtleBackground);
    color: var(--colorNeutralForeground2);
}
button.icon-btn:hover { color: var(--fg); border-color: transparent; background: var(--colorSubtleBackgroundHover); }
button.icon-btn:active { background: var(--colorSubtleBackgroundPressed); }
button.icon-btn.danger { color: var(--colorStatusDangerForeground1); }
button.icon-btn.danger:hover { color: var(--colorStatusDangerForeground1); }
button.icon-btn svg { width: 18px; height: 18px; }
/* Fluent's subtle and transparent buttons stay unfilled when disabled; only the foreground greys. After
   the appearances above and as heavy as button.icon-btn.danger, so it wins over each of them. */
button:disabled:is(.icon-btn, .link-button, .filter-button, .theme-toggle, .nav-toggle, .nav-close) {
    background: transparent;
    border-color: transparent;
    color: var(--colorNeutralForegroundDisabled);
}

/* One row of the license page's feature editor: the key, its value, and the delete button.

   Not a .toolbar, which is what it used to be, because a toolbar wraps -- and the row it wraps inside is
   `form.stack`, which is max-width: 34rem whatever the window is doing. A select holding 26 characters of
   feature name plus a value box fills that on its own, so the last item dropped onto a line of its own.
   That was true of the "Entfernen" button and it stayed true of a 2rem icon, which is what made the
   button look like the problem when the wrapping was.

   So: never wrap, and let the two fields shrink instead. min-width: 0 is the load-bearing part -- a flex
   item will not shrink below its intrinsic content width without it, and a <select> holding
   "License.AllowMultipleUsagesPerUser" has a very wide one. The select ellipsises what it cannot show,
   and its full text is in the dropdown anyway. */
.feature-row {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-bottom: .5rem;
    flex-wrap: nowrap;
}
.feature-row select { flex: 1 1 12rem; min-width: 0; }
.feature-row input { flex: 1 1 5rem; min-width: 0; }

/* The value slot. Since item 20 it holds whatever the feature's definition asks for -- a text box, a
   number box, a choice list or a checkbox -- so the slot takes the flex share the bare value box used
   to, and the control fills it. A checkbox must not: stretched to 5rem it centres in empty space and
   reads as a misaligned box. */
.feature-row .feature-value { flex: 1 1 5rem; min-width: 0; display: flex; align-items: center; }
.feature-row .feature-value > input,
.feature-row .feature-value > select { flex: 1 1 auto; width: 100%; min-width: 0; }
.feature-row .feature-value > input[type=checkbox] { flex: none; width: auto; margin: 0 .3rem; }

/* Where the info button would be on a row without a description, so value boxes line up. */
.feature-row .icon-spacer { flex: none; width: 2rem; }

/* Under a feature row: a stored value that does not fit the feature's definition. Not red -- nothing
   is broken, the value is kept and still ships -- but marked, so it is not mistaken for a hint. Red is
   for a value the operator has just entered, which blocks the save. */
.feature-warning {
    margin: calc(-1 * var(--spacingVerticalXS)) 0 var(--spacingVerticalS);
    padding-left: var(--spacingHorizontalS);
    border-left: var(--strokeWidthThick) solid var(--colorStatusWarningBorder1);
    font-size: var(--fontSizeBase200);
    line-height: var(--lineHeightBase200);
}
.feature-warning.error { border-left-color: transparent; padding-left: 0; }

/* A feature's description: rendered markdown, opened by the row's info button on the license page and
   previewed under the textarea on the product page. In the flow, under its row, rather than floating:
   a positioned popover inside a 34rem form is exactly the shape that made B2's menu overflow the page.
   Colours are the palette tokens only, so both themes hold. */
/* Fluent MessageBar, info intent: neutral fill, Stroke1, 4px radius, no coloured side bar. */
.feature-info {
    margin: calc(-1 * var(--spacingVerticalXS)) 0 var(--spacingVerticalS);
    padding: var(--spacingVerticalS) var(--spacingHorizontalM);
    border: 1px solid var(--colorNeutralStroke1);
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground3);
    font-weight: var(--fontWeightRegular);
    overflow-wrap: anywhere;
}
/* The info icon in its own column, as the MessageBar draws it. */
.feature-info { position: relative; padding-left: calc(var(--spacingHorizontalM) + 16px + var(--spacingHorizontalS)); }
.feature-info::before {
    content: "";
    position: absolute;
    left: var(--spacingHorizontalM);
    top: calc(var(--spacingVerticalS) + 2px);
    width: 16px;
    height: 16px;
    background: var(--colorNeutralForeground3);
    -webkit-mask: var(--app-icon-info) center / contain no-repeat;
    mask: var(--app-icon-info) center / contain no-repeat;
}
.feature-info > :first-child { margin-top: 0; }
.feature-info > :last-child { margin-bottom: 0; }
.feature-info p, .feature-info ul, .feature-info ol { margin: var(--spacingVerticalSNudge) 0; }
.feature-info table { border-collapse: collapse; }
.feature-info th, .feature-info td { border: 1px solid var(--colorNeutralStroke2); padding: var(--spacingVerticalXXS) var(--spacingHorizontalSNudge); }

/* The product page's feature list: one line per feature -- name, a few words of its definition,
   Edit… and Remove. The definition itself is edited in .feature-dialog. */
.feature-def {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 9rem auto auto;
    align-items: center;
    gap: var(--spacingHorizontalS);
    padding: var(--spacingVerticalSNudge) 0;
    border-bottom: 1px solid var(--colorNeutralStroke2);
}
/* A grid rather than a wrapping flex row, so Edit… and Remove line up from row to row whatever the
   summary says. A knob has no Edit…, so its note takes that column too. */
.feature-def > .hint { grid-column: span 2; }
.feature-summary { font-size: var(--fontSizeBase200); font-weight: var(--fontWeightRegular); color: var(--muted); }
.feature-has-info { margin-left: .25rem; color: var(--accent); cursor: help; }

/* A native <dialog> opened modally: the browser supplies the backdrop, Esc and the inert page; this
   only gives it the page's colours and a width that suits a form. */
/* Fluent Dialog: Background1, XLarge radius, shadow64, 24px padding, subtitle1 title, overlay backdrop. */
.feature-dialog {
    width: min(36rem, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    padding: var(--spacingVerticalXXL);
    border: 1px solid light-dark(transparent, var(--colorNeutralStroke2));
    border-radius: var(--borderRadiusXLarge);
    background: var(--colorNeutralBackground1);
    color: var(--fg);
    box-shadow: var(--shadow64);
}
.feature-dialog::backdrop { background: var(--colorBackgroundOverlay); }
.feature-dialog > .stack { display: grid; gap: var(--spacingVerticalL); }
.feature-dialog h2 { margin: 0; font-size: var(--fontSizeBase500); line-height: var(--lineHeightBase500); }
/* The page's form rules, which this dialog sits outside of: label above its field, hint under it. */
.feature-dialog label { display: grid; gap: var(--spacingVerticalXS); font-weight: var(--fontWeightSemibold); }
.feature-dialog label select { justify-self: start; }
.feature-dialog label :is(input, select, textarea) { font-weight: var(--fontWeightRegular); }
.feature-dialog .hint { display: block; font-weight: var(--fontWeightRegular); color: var(--muted); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
.feature-dialog .toolbar { margin-bottom: 0; }
.feature-dialog .toolbar label { flex: 1; }
.feature-dialog textarea { width: 100%; box-sizing: border-box; }
.feature-dialog .feature-info { margin: 0; }

/* Fluent Input / Select / Textarea, outline appearance, medium: 32px, Stroke1 with the accessible
   stroke as the bottom edge (6.2:1 light, 6.5:1 dark against the field), and on focus the brand
   underline -- Fluent draws it with a pseudo-element, a bare input has none, so it is an inset shadow
   on the bottom edge here. :where() keeps the selector at element weight, so the many page rules that
   size a field still win. */
:where(input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=submit], [type=button]), select, textarea) {
    font: inherit;
    font-weight: var(--fontWeightRegular);
    min-height: 32px;
    padding: 5px var(--spacingHorizontalMNudge);
    border: 1px solid var(--colorNeutralStroke1);
    border-bottom-color: var(--colorNeutralStrokeAccessible);
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground1);
    color: var(--fg);
    transition: box-shadow var(--durationNormal) var(--curveDecelerateMid);
}
:where(input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=submit], [type=button]), select, textarea):hover {
    border-color: var(--colorNeutralStroke1Hover);
    border-bottom-color: var(--colorNeutralStrokeAccessibleHover);
}
:where(input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=submit], [type=button]), select, textarea):focus,
:where(input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=submit], [type=button]), select, textarea):focus-visible {
    outline: none;
    border-bottom-color: var(--colorCompoundBrandStroke);
    box-shadow: inset 0 -1px 0 var(--colorCompoundBrandStroke);
}
:where(input, select, textarea)::placeholder { color: var(--colorNeutralForeground4); }
:where(input, select, textarea):disabled {
    background: var(--colorNeutralBackgroundDisabled);
    border-color: var(--colorNeutralStrokeDisabled);
    color: var(--colorNeutralForegroundDisabled);
    cursor: default;
}
/* Blazor's validation class. */
:where(input, select, textarea).invalid { border-color: var(--colorPaletteRedBorder2); }
textarea { line-height: var(--lineHeightBase300); }

/* Fluent Checkbox and Radio, 16px: the accessible stroke at rest, the compound brand colour checked, a
   tick drawn with a mask so it takes the themed foreground. accent-color is the fallback for a browser
   that ignores appearance: none on these. */
input[type=checkbox], input[type=radio] {
    appearance: none;
    flex: none;
    width: 16px;
    height: 16px;
    margin: 0 var(--spacingHorizontalXS) 0 0;
    vertical-align: middle;
    display: inline-grid;
    place-content: center;
    border: 1px solid var(--colorNeutralStrokeAccessible);
    background: var(--colorNeutralBackground1);
    accent-color: var(--colorCompoundBrandBackground);
    cursor: pointer;
}
input[type=checkbox] { border-radius: var(--borderRadiusSmall); }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--colorNeutralStrokeAccessibleHover); }
input[type=checkbox]:checked {
    border-color: var(--colorCompoundBrandBackground);
    background: var(--colorCompoundBrandBackground);
}
input[type=checkbox]:checked::after {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--colorNeutralForegroundInverted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
input[type=checkbox]:checked:hover { background: var(--colorCompoundBrandBackgroundHover); border-color: var(--colorCompoundBrandBackgroundHover); }
input[type=radio]:checked { border-color: var(--colorCompoundBrandStroke); box-shadow: inset 0 0 0 3px var(--colorNeutralBackground1), inset 0 0 0 8px var(--colorCompoundBrandStroke); }
input[type=checkbox]:disabled, input[type=radio]:disabled { border-color: var(--colorNeutralStrokeDisabled); background: var(--colorNeutralBackgroundDisabled); cursor: default; }
input[type=checkbox]:disabled:checked { background: var(--colorNeutralForegroundDisabled); }

/* Fluent Field: semibold label above the control, caption1 hint under it. */
form.stack { display: grid; gap: var(--spacingVerticalL); max-width: 34rem; }
form.stack label { display: grid; gap: var(--spacingVerticalXS); font-weight: var(--fontWeightSemibold); }
form.stack .hint { font-weight: var(--fontWeightRegular); color: var(--muted); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
/* A checkbox field: the box left of its label (Settings › Release-q, #14054). */
form.stack label.check { display: flex; gap: var(--spacingHorizontalS); align-items: center; }
/* A group of fields (the license page's features): an outline Card with its legend as the title, in
   place of the browser's grooved frame. Pages that lay a fieldset out themselves (.edit-form) win. */
fieldset {
    margin: 0;
    padding: var(--spacingVerticalS) var(--spacingHorizontalL) var(--spacingVerticalL);
    border: 1px solid var(--colorNeutralStroke1);
    border-radius: var(--borderRadiusMedium);
    min-width: 0;
}
legend { padding: 0 var(--spacingHorizontalXS); font-weight: var(--fontWeightSemibold); }

/* A question answered in the page instead of a browser dialog (#14021): delete, take over from Crm-q. License-q's
   own, not Crm-q's .callout, so the account page does not depend on Crm-q's stylesheet. */
/* Fluent MessageBar with actions: neutral (info) for a question, the danger intent for a destructive
   one, whose confirming button turns into Fluent's filled danger button (white on #c50f1f, 6.1:1). */
.confirm-box {
    max-width: 52rem;
    margin: var(--spacingVerticalL) 0;
    padding: var(--spacingVerticalM) var(--spacingHorizontalM);
    border: 1px solid var(--colorNeutralStroke1);
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground3);
}
.confirm-box.danger { background: var(--colorStatusDangerBackground1); border-color: var(--colorStatusDangerBorder1); }
/* The MessageBar's intent icon in a column of its own on the left (see .feature-info). */
.confirm-box { position: relative; padding-left: calc(var(--spacingHorizontalM) + 16px + var(--spacingHorizontalS)); }
.confirm-box::before {
    content: "";
    position: absolute;
    left: var(--spacingHorizontalM);
    top: calc(var(--spacingVerticalM) + 2px);
    width: 16px;
    height: 16px;
    background: var(--colorNeutralForeground3);
    -webkit-mask: var(--app-icon-info) center / contain no-repeat;
    mask: var(--app-icon-info) center / contain no-repeat;
}
.confirm-box.danger::before { background: var(--colorStatusDangerForeground1); -webkit-mask-image: var(--app-icon-error); mask-image: var(--app-icon-error); }
.confirm-box.danger button.danger:where(:not(:disabled)) { background: var(--colorStatusDangerBackground3); border-color: transparent; color: var(--colorNeutralForegroundOnBrand); }
.confirm-box.danger button.danger:hover:where(:not(:disabled)) { background: var(--colorStatusDangerBackground3Hover); color: var(--colorNeutralForegroundOnBrand); }
.confirm-box > strong { display: block; margin-bottom: var(--spacingVerticalSNudge); }
.confirm-box > p { margin: var(--spacingVerticalS) 0; }
.confirm-box .toolbar { margin: var(--spacingVerticalS) 0 0; }
.confirm-box .take-over-company { display: grid; gap: var(--spacingVerticalXS); font-weight: var(--fontWeightSemibold); max-width: 34rem; margin-bottom: var(--spacingVerticalS); }
table.take-over { border-collapse: collapse; width: 100%; }
table.take-over th, table.take-over td { text-align: left; padding: var(--spacingVerticalXS) var(--spacingHorizontalS); border-bottom: 1px solid var(--colorNeutralStroke2); vertical-align: middle; }
table.take-over th { font-size: var(--fontSizeBase200); color: var(--muted); background: transparent; }
table.take-over td:first-child { width: 7rem; }
table.take-over select { width: 100%; }
table.take-over tr.changed td { font-weight: var(--fontWeightSemibold); }
.crm-companies { max-width: 52rem; }
.crm-companies .hint { color: var(--muted); font-size: var(--fontSizeBase200); margin: calc(-1 * var(--spacingVerticalS)) 0 0; }
/* Fluent Tag, small, circular, filled. */
a.chip {
    display: inline-flex;
    gap: var(--spacingHorizontalSNudge);
    align-items: center;
    min-height: 24px;
    padding: 0 var(--spacingHorizontalS);
    border: 1px solid transparent;
    border-radius: var(--borderRadiusCircular);
    background: var(--colorNeutralBackground3);
}

.validation-message, .error { color: var(--danger); }
.success { color: var(--ok); }
.muted { color: var(--muted); }
.expired { color: var(--danger); font-weight: var(--fontWeightSemibold); }

dl.detail { display: grid; grid-template-columns: max-content 1fr; gap: var(--spacingVerticalSNudge) var(--spacingHorizontalL); }
dl.detail dt { color: var(--muted); }
dl.detail dd { margin: 0; word-break: break-all; }

/* Opti-Q wordmark on the sign-in page.

   Dark mode gets a white HALO around the letterforms, not a plate behind them. The plate worked but
   looked like a sticker: a hard white rectangle floating on a near-black card.

   A glow via drop-shadow is brand-safe in the way that matters -- it adds light around the glyphs and
   leaves every brand hex untouched. brightness() or invert() would have been easier and would have
   altered the purple, which the design system explicitly forbids.

   This is the one place the file cannot use light-dark(): that function produces a COLOR, and filter
   takes a filter list. So the dark case is stated three times -- once for the OS preference, once for
   the explicit dark choice, and once to force it off for an operator who picked light on a dark machine.
   The order matters: the attribute selectors must come after the media query to win. This is exactly the
   duplication the palette comment at the top of the file avoids, and it is unavoidable for a
   non-colour property. */
.brand-wordmark {
    display: block;
    width: 11rem;
    max-width: 100%;
    height: auto;
    /* Left, not centred: the heading, the labels and the form below are all left-aligned, and a
       centred mark was the only centred thing on the card. */
    margin: 0 0 .9rem;
}

:root {
    /* Two stops: a tight one to separate the glyph edges from the background, and a wider soft one so
       the mark sits in its own light rather than looking outlined. */
    --wordmark-glow: drop-shadow(0 0 1px #fff) drop-shadow(0 0 5px rgba(255, 255, 255, .75));
}

@media (prefers-color-scheme: dark) {
    .brand-wordmark { filter: var(--wordmark-glow); }
}

:root[data-theme="dark"] .brand-wordmark { filter: var(--wordmark-glow); }
:root[data-theme="light"] .brand-wordmark { filter: none; }

/* ---- dashboard warnings -------------------------------------------------------------------

   The dashboard leads with what is wrong and is silent when nothing is. These carry the only
   colour on the page, so they have to earn it: .urgent means devices are on a license that is
   about to run out (or just did), and nothing else turns red. .quiet is the same panel when the
   expiring licenses have nobody on them -- present, readable, not shouting. */
/* Fluent: an outline Card whose header is a MessageBar -- only the summary is tinted (danger for
   .urgent, neutral for .quiet), so the tables that unfold inside stay on the plain card surface. */
details.alarm {
    margin: 0 0 var(--spacingVerticalL);
    border: 1px solid var(--colorNeutralStroke1);
    border-radius: var(--borderRadiusMedium);
    background: var(--colorNeutralBackground1);
    overflow: hidden;
}
details.alarm > summary {
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--spacingVerticalXS) var(--spacingHorizontalM);
    padding: var(--spacingVerticalS) var(--spacingHorizontalM);
    background: var(--colorNeutralBackground3);
}
details.alarm > :not(summary) { margin-left: var(--spacingHorizontalM); margin-right: var(--spacingHorizontalM); }
details.alarm .alarm-head { font-weight: var(--fontWeightSemibold); }
details.alarm .alarm-sub { font-size: var(--fontSizeBase200); }
details.alarm[open] > summary { margin-bottom: var(--spacingVerticalM); border-bottom: 1px solid var(--colorNeutralStroke2); }
details.alarm[open] { padding-bottom: var(--spacingVerticalM); }

details.alarm.urgent { border-color: var(--colorStatusDangerBorder1); }
details.alarm.urgent > summary { background: var(--colorStatusDangerBackground1); }
details.alarm.urgent .alarm-head { color: var(--danger); }

/* The all-clear. A line, not a badge -- it is the absence of news. */
.all-clear { margin: 0 0 var(--spacingVerticalL); }

/* A warning with nothing to unfold: seats being refused, which is a link to another page rather than
   a table to expand here. It earns the same red as .urgent -- somebody cannot work -- but not the
   panel, because there is nothing behind the summary to open. */
.alarm-line { margin: 0 0 var(--spacingVerticalL); font-weight: var(--fontWeightSemibold); }
.alarm-line a { color: var(--danger); }

/* Row weight follows the tier, and it is the ranking that does the work here: a license with
   devices on it reads first and fully, one that has merely gone quiet recedes. */
tbody tr.tier-noted td { color: var(--muted); }
tbody tr.tier-dormant td { color: var(--muted); }

/* The never-activated pile, folded inside the panel. Two clicks deep on purpose. */
details.dormant { margin: var(--spacingVerticalS) var(--spacingHorizontalM) var(--spacingVerticalM); }
details.dormant > summary { cursor: pointer; font-size: var(--fontSizeBase200); }
details.dormant[open] > summary { margin-bottom: var(--spacingVerticalS); }

code { font-family: var(--fontFamilyMonospace); font-size: var(--fontSizeBase200); }

/* ---- charts ------------------------------------------------------------------------------

   Three categorical hues plus a muted step for "we could not tell". Validated as a set against
   the surfaces the charts are drawn on -- the content card, #ffffff light and #292929 dark since the
   Fluent re-skin (#14048; the dark set was re-run against #292929 then and still passes: lightness
   band, chroma floor, worst adjacent CVD separation dE 9.4, contrast 4.0 / 3.8 / 4.3 to the surface).
   On the light surface aqua and orange sit below 3:1 against white, which is why the legend prints
   each series' value next to its name -- the number, not the hue, is what carries the reading there.
   Dark is its own set of steps, not an automatic flip. Keep Fluent's warning orange off chart pages:
   it is the same family as --viz-2. */
.viz {
    --viz-1: light-dark(#2a78d6, #3987e5);      /* blue    — Windows */
    --viz-2: light-dark(#eb6834, #d95926);      /* orange  — iOS */
    --viz-3: light-dark(#1baf7a, #199e70);      /* aqua    — Android */
    --viz-none: #898781;                        /* muted   — Unknown, one value for both */
}

.viz h3 { font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); margin: var(--spacingVerticalXL) 0 var(--spacingVerticalS); }

/* A window picker sitting in a heading, so it reads as part of the title. Fluent's small Select. */
select.inline { font-size: var(--fontSizeBase200); font-weight: var(--fontWeightRegular); vertical-align: middle; min-height: 24px; padding: 1px var(--spacingHorizontalS); }

.viz-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--spacingVerticalS) var(--spacingHorizontalXL); }
.viz-legend { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalXS) var(--spacingHorizontalL); font-size: var(--fontSizeBase200); color: var(--muted); }
.viz-key { display: inline-flex; align-items: center; gap: .35rem; }
.viz-key strong { color: var(--fg); font-variant-numeric: tabular-nums; }
.viz-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.viz-chart { width: 100%; height: auto; max-width: 60rem; display: block; }

/* The dashboard's version. Narrower as well as shorter, so it reads as context beside the
   warnings rather than competing with them -- but not so narrow that the 10px tick labels in a
   720-wide viewBox scale below legibility (42rem/720 keeps them at ~9.3px). */
.viz-chart.compact { max-width: 42rem; }

/* ---- customer lines ----------------------------------------------------------------------

   Eight or nine customers is past what a categorical palette can carry, so identity is not
   carried by colour at all: every line is the same muted ink, hovering dims the set and lifts
   one to the accent, and the names are in the table underneath. Adding more hues would be the
   wrong fix -- see the series-count ladder. */
.viz-lines { width: 100%; height: auto; max-width: 60rem; display: block; }
.viz-lines.compact { max-width: 34rem; }

.viz-lines .viz-line path {
    fill: none;
    stroke: var(--viz-none);
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* "Other" is the summed tail, not a customer. Dashed so it is not read as one company. */
.viz-lines .viz-line.other path { stroke-dasharray: 4 3; }

/* A fat invisible stroke under each line: 1.5px is not something anyone can hover on purpose. */
.viz-lines .viz-line-hit { stroke: transparent !important; stroke-width: 12; }

.viz-lines:hover .viz-line path { opacity: .25; }
.viz-lines .viz-line:hover path { opacity: 1; stroke: var(--accent); stroke-width: 2.25; }

/* Fold: the small chart is the summary, so clicking the picture opens the detail. */
details.viz-fold > summary { cursor: pointer; display: block; }
details.viz-fold > summary::marker { color: var(--muted); }
details.viz-fold .viz-fold-label { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
details.viz-fold .viz-fold-label h3 { display: inline; }
details.viz-fold .viz-fold-label span { font-size: var(--fontSizeBase200); }
/* Once open, the small preview in the summary would be a second copy of the same chart. */
details.viz-fold[open] > summary .viz-lines { display: none; }

.viz-grid { stroke: var(--colorNeutralStroke2); stroke-width: 1; }
.viz-axis { stroke: var(--colorNeutralStroke1); stroke-width: 1; }
.viz-tick { fill: var(--colorNeutralForeground3); font-size: var(--fontSizeBase100); font-variant-numeric: tabular-nums; }

.viz-spark { width: 140px; height: 26px; display: block; }
.viz-spark-line { fill: none; stroke: var(--viz-1); stroke-width: 1.5; }
.viz-spark-fill { fill: var(--viz-1); opacity: .16; stroke: none; }

.viz-table td { font-variant-numeric: tabular-nums; }
.viz-table { table-layout: fixed; }
.viz-table th, .viz-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================================
   Release-q (#13896): tabs under the one "Releases" sidebar entry, release cards, status pills,
   product logos and variant icons, filter chips, the text editor and the mail preview frame.
   Everything reads the nine semantic tokens above; the pill colours are tints of the same three
   hues the rest of the app already uses for ok / accent / danger.
   ========================================================================================== */

/* Fluent TabList, the one tab style of the app (Release-q links, product page and Crm-q company page
   buttons): transparent tabs, Foreground2; the selected one Foreground1 semibold over a 3px rounded
   indicator in the compound brand colour. Selected is .on (License-q) or aria-selected (Crm-q). */
.tabs { display: flex; flex-wrap: wrap; gap: var(--spacingHorizontalXS); border-bottom: 1px solid var(--colorNeutralStroke2); margin: 0 0 var(--spacingVerticalL); }
.tabs :is(a, button) {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--spacingHorizontalSNudge);
    min-height: 0;
    padding: var(--spacingVerticalMNudge) var(--spacingHorizontalM);
    border: 0;
    border-radius: var(--borderRadiusMedium) var(--borderRadiusMedium) 0 0;
    background: transparent;
    color: var(--colorNeutralForeground2);
    font: inherit;
    font-weight: var(--fontWeightRegular);
    text-decoration: none;
}
.tabs :is(a, button):hover { background: transparent; color: var(--colorNeutralForeground1); text-decoration: none; }
.tabs :is(a, button):hover::after { content: ""; position: absolute; left: var(--spacingHorizontalM); right: var(--spacingHorizontalM); bottom: -1px; height: var(--strokeWidthThicker); border-radius: var(--borderRadiusCircular); background: var(--colorNeutralStroke1Hover); }
.tabs :is(a.on, button.on, [aria-selected="true"]) { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.tabs :is(a.on, button.on, [aria-selected="true"])::after,
.tabs :is(a.on, button.on, [aria-selected="true"]):hover::after {
    content: ""; position: absolute; left: var(--spacingHorizontalM); right: var(--spacingHorizontalM); bottom: -1px;
    height: var(--strokeWidthThicker); border-radius: var(--borderRadiusCircular); background: var(--colorCompoundBrandStroke);
}
.tabs :is(a, button):focus-visible { outline-offset: -2px; }
/* Straight under a page title the tabs belong to it; anywhere else they start a section of their own. */
:not(h1) + .tabs { margin-top: var(--spacingVerticalXXL); }

.product-image { border-radius: 22%; object-fit: contain; flex: none; display: inline-block; vertical-align: middle; }
.product-image.fallback {
    display: inline-grid; place-items: center; font-weight: var(--fontWeightBold);
    background: var(--colorNeutralBackground3); color: var(--muted); border: 1px solid var(--colorNeutralStroke2);
}

.btn.upload { position: relative; overflow: hidden; }
.btn.upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.variant-row { display: flex; flex-wrap: wrap; gap: var(--spacingHorizontalSNudge); align-items: center; padding: var(--spacingVerticalSNudge) 0; border-bottom: 1px solid var(--colorNeutralStroke2); }
.variant-row input { flex: 1 1 8rem; min-width: 0; }
.variant-row input.key { flex: 0 1 12rem; font-family: var(--fontFamilyMonospace); }
/* Headings over the variant boxes, sized like the boxes below them. */
.variant-head { font-size: var(--fontSizeBase200); font-weight: var(--fontWeightSemibold); color: var(--muted); padding-bottom: var(--spacingVerticalXXS); }
.variant-head .icon-slot { flex: 0 0 28px; }
.variant-head .name { flex: 1 1 8rem; min-width: 0; }
.variant-head .key { flex: 0 1 12rem; }

/* min(17rem, 100%): a column never wider than the page. Everything inside a card may shrink and wrap
   (minmax(0, 1fr), min-width: 0, flex-wrap), so a long store label, note or version wraps inside the card
   instead of running past its border when the columns are at their narrowest. */
/* Fluent Card, outline appearance: the cards sit on the content card, so a second shadow would only
   blur; a Stroke1 frame and a Medium radius set them apart. */
.release-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); gap: var(--spacingHorizontalL); margin-bottom: var(--spacingVerticalL); }
.release-card { border: 1px solid var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalM); display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--spacingVerticalSNudge); min-width: 0; }
.release-card .head { display: flex; gap: var(--spacingHorizontalM); align-items: center; margin-bottom: var(--spacingVerticalXS); color: inherit; text-decoration: none; border-radius: var(--borderRadiusMedium); }
.release-card .head > div { min-width: 0; overflow-wrap: anywhere; }
.release-card .head strong { font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); font-weight: var(--fontWeightSemibold); }
.release-card a.head:hover { color: inherit; text-decoration: none; }
.release-card a.head:hover strong, .release-card a.head:focus-visible strong { color: var(--accent); text-decoration: underline; }
.release-card .row { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: .5rem; row-gap: .1rem; align-items: baseline; min-width: 0; }
.release-card .row > * { min-width: 0; }
/* The value keeps to the right, also when it wraps under its pill. */
.release-card .row > :is(.muted, .ver):last-child { margin-left: auto; text-align: right; }
.release-card .ver { overflow-wrap: anywhere; }
/* Store page and console of a store variant, opening in a new tab. */
.store-links { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalXXS) var(--spacingHorizontalM); font-size: var(--fontSizeBase200); }
.store-links a { white-space: nowrap; }
.release-card .store-links { padding-top: var(--spacingVerticalSNudge); border-top: 1px solid var(--colorNeutralStroke2); margin-top: var(--spacingVerticalXXS); }
.pull-status .store-links { margin-bottom: var(--spacingVerticalXS); }
.release-card .sub { font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); color: var(--muted); overflow-wrap: anywhere; }
.with-icon { display: inline-flex; gap: var(--spacingHorizontalSNudge); align-items: center; }

.ver { font-family: var(--fontFamilyMonospace); font-weight: var(--fontWeightSemibold); }

/* Fluent Badge, medium, circular, outline appearance: 20px, caption1Strong, the status colour on
   text and border. Warning text is WarningForeground2 light (8.0:1) / Foreground1 dark. */
.pill {
    display: inline-flex; align-items: center; min-height: 20px; margin: 0 var(--spacingHorizontalXXS);
    padding: 0 var(--spacingHorizontalSNudge); border: 1px solid transparent; border-radius: var(--borderRadiusCircular);
    font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); font-weight: var(--fontWeightSemibold);
    white-space: nowrap; vertical-align: middle;
}
.pill.release, .pill.ok { color: var(--ok); border-color: currentColor; }
.pill.beta { color: var(--accent); border-color: currentColor; }
.pill.hotfix, .pill.warn { color: light-dark(var(--colorStatusWarningForeground2), var(--colorStatusWarningForeground1)); border-color: currentColor; }
.pill.internal, .pill.muted { color: var(--muted); border-color: var(--colorNeutralStroke1); }
.pill.error { color: var(--danger); border-color: currentColor; }
/* #14022: a state that needs the operator, in text rather than a pill (the Notifications page's Crm-q panel). */
.warn-text { color: light-dark(var(--colorStatusWarningForeground2), var(--colorStatusWarningForeground1)); }
.standing-panel { margin-bottom: var(--spacingVerticalXXL); }
/* #14052: a build's actions (BuildActions), a Fluent split button: "Send mail…" and an arrow that opens the
   menu, two small buttons sharing one outline. */
.action-split { display: inline-flex; white-space: nowrap; vertical-align: middle; }
.action-split > .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; font-weight: var(--fontWeightRegular); }
.action-split > .action-caret { border-left-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 0 6px;
    box-shadow: inset 1px 0 0 var(--colorNeutralStroke1); }
/* The menu is a popover in the top layer, so the scrolling table cannot clip it. Under the arrow where the
   browser can anchor it (flipped up near the bottom of the window), centred where it cannot. */
.action-menu[popover] { min-width: 16rem; max-width: 24rem; padding: var(--spacingVerticalXS); color: var(--fg);
    background: var(--colorNeutralBackground1); border: 1px solid light-dark(transparent, var(--colorNeutralStroke2));
    border-radius: var(--borderRadiusMedium); box-shadow: var(--shadow16); }
@supports (anchor-name: --a) {
    .action-menu[popover] { inset: auto; margin: var(--spacingVerticalXS) 0 0; top: anchor(bottom); right: anchor(right);
        position-try-fallbacks: flip-block; }
}
.action-menu :is(a, button) { display: block; width: 100%; text-align: left; padding: 6px var(--spacingHorizontalS);
    border: 0; border-radius: var(--borderRadiusMedium); background: none; color: var(--fg); font: inherit;
    font-weight: var(--fontWeightRegular); text-decoration: none; cursor: pointer; min-height: 0; }
.action-menu :is(a, button):hover:not(:disabled) { background: var(--colorSubtleBackgroundHover); }
.action-menu button:disabled, .action-menu button:disabled:hover { background: none; color: var(--colorNeutralForegroundDisabled); cursor: default; }
.action-menu hr { border: 0; border-top: 1px solid var(--colorNeutralStroke2); margin: var(--spacingVerticalXS) 0; }
.action-menu-note { display: block; padding: 0 var(--spacingHorizontalS) var(--spacingVerticalXS); color: var(--muted);
    font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
td.nowrap { white-space: nowrap; }

/* #14044: broken or expiring credentials, above every admin page: a Fluent MessageBar, danger intent for
   broken or expired, warning intent for expiring soon. */
.banner { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalXS) var(--spacingHorizontalS); align-items: baseline;
    margin: 0 0 var(--spacingVerticalL); padding: var(--spacingVerticalS) var(--spacingHorizontalM);
    border: var(--strokeWidthThin) solid; border-radius: var(--borderRadiusMedium); }
.banner.error { color: var(--colorStatusDangerForeground1); background: var(--colorStatusDangerBackground1); border-color: var(--colorStatusDangerBorder1); }
.banner.warn { color: light-dark(var(--colorStatusWarningForeground2), var(--colorStatusWarningForeground1)); background: var(--colorStatusWarningBackground1); border-color: var(--colorStatusWarningBorder1); }
.banner strong, .banner a { font-weight: var(--fontWeightSemibold); }
.banner a { color: inherit; margin-left: auto; }
.credential-error { font-size: var(--fontSizeBase200); overflow-wrap: break-word; }
.inline-edit { display: flex; gap: var(--spacingHorizontalS); align-items: center; flex-wrap: wrap; }
/* #14026: where a build came from. Pulled history is a brand tint badge, a pipeline build stays neutral. */
.pill.pulled { color: var(--colorBrandForeground2); background: var(--colorBrandBackground2); border-color: var(--colorBrandStroke2); }
.pill.pipeline { color: var(--muted); border-color: var(--colorNeutralStroke1); }
.small { font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
/* Fluent's small Select, sized for a grid row. */
.type-select { font-size: var(--fontSizeBase200); min-height: 24px; padding: 1px var(--spacingHorizontalS); }
/* The Version column's hotfix mark: Fluent Badge, tint appearance, warning intent -- filled, unlike the
   outlined pills, so it stands out in a long list. WarningForeground2 on WarningBackground2: 5.6:1 in both
   themes. The flame is decorative, the word carries it. */
.hotfix-badge {
    display: inline-flex; align-items: center; gap: var(--spacingHorizontalXXS); margin-left: var(--spacingHorizontalSNudge); vertical-align: 1px;
    min-height: 20px; padding: 0 var(--spacingHorizontalSNudge) 0 var(--spacingHorizontalXS); border-radius: var(--borderRadiusCircular); white-space: nowrap;
    font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); font-weight: var(--fontWeightSemibold);
    color: var(--colorStatusWarningForeground2); background: var(--colorStatusWarningBackground2); border: 1px solid transparent;
}
.hotfix-badge svg { color: var(--colorStatusWarningForeground2); flex: none; }
/* Beside the version rather than under it. */
td:has(> .hotfix-badge) { white-space: nowrap; }

/* Releases > Settings: the Azure DevOps history source per product, and the pull's progress (#14026). */
.history-source { display: grid; gap: var(--spacingVerticalSNudge); }
.history-source h3 { margin: var(--spacingVerticalXS) 0 0; }
.history-source .pull-status { font-size: var(--fontSizeBase200); white-space: normal; }
.pull-line { display: inline-flex; flex-wrap: wrap; gap: var(--spacingHorizontalS); align-items: center; }
.pull-running { color: var(--accent); }
/* Fluent ProgressBar: a 4px rounded track, the bar in the compound brand colour. */
.pull-bar { display: inline-block; width: 12rem; max-width: 100%; height: 4px; border-radius: var(--borderRadiusCircular); background: var(--colorNeutralBackground6); overflow: hidden; }
.pull-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--colorCompoundBrandBackground); transition: width var(--durationSlower) var(--curveEasyEase); }
/* A plain-text state where the others show a pill: the same gap the pill's margin gives. */
.state-note { margin-left: var(--spacingHorizontalSNudge); }


/* WorkItemTypeIcon: an emoji in the box the 18px PNG had, so rows keep their alignment. */
.type-icon { display: inline-block; width: 18px; text-align: center; font-size: 15px; line-height: 1; flex: none;
             font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-weight: 400; }
h1 .type-icon { width: auto; font-size: .85em; }

.item-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr)); gap: var(--spacingHorizontalXL); align-items: start; }
/* Fluent Card, outline appearance (see .release-card). */
.panel { border: 1px solid var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalL); display: grid; gap: var(--spacingVerticalM); margin-bottom: var(--spacingVerticalL); }
.panel h2 { margin: 0; }
.source-text { background: var(--colorNeutralBackground3); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalS) var(--spacingHorizontalM); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); white-space: pre-wrap; max-height: 18rem; overflow: auto; }
.finding { display: flex; gap: var(--spacingHorizontalS); align-items: baseline; }
.finding::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--colorStatusWarningBackground3); flex: none; transform: translateY(-1px); }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--spacingHorizontalM); }
.media-grid figure { margin: 0; display: grid; gap: var(--spacingVerticalXS); font-size: var(--fontSizeBase200); }
.media-grid img, .media-grid video { width: 100%; height: 7rem; object-fit: contain; background: var(--colorNeutralBackground3); border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); }
.media-grid select { font-size: var(--fontSizeBase200); }
/* A thumbnail is a button that opens the image or video large (ReleaseItem.razor, MediaThumb.razor). */
.media-thumb { position: relative; display: block; width: 100%; min-height: 0; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--borderRadiusMedium); }
.media-thumb:is(:hover, :active) { background: none; }
.media-thumb:hover img, .media-thumb:hover video, .media-thumb:focus-visible img, .media-thumb:focus-visible video { border-color: var(--colorBrandStroke1); }
.media-thumb video { pointer-events: none; }
.media-play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: var(--borderRadiusCircular); background: var(--colorBackgroundOverlay); color: var(--colorNeutralForegroundOnBrand); pointer-events: none; }
.media-unplaced { display: grid; gap: var(--spacingVerticalS); border: 1px dashed var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalS) var(--spacingHorizontalM); }
.media-unplaced .hint { display: block; font-size: var(--fontSizeBase200); }
.media-add { display: flex; flex-wrap: wrap; gap: var(--spacingHorizontalXS); }
.media-add button { flex: 1 1 auto; font-size: var(--fontSizeBase200); }
.media-dialog { width: min(80rem, calc(100vw - 2rem)); }
/* Not the dialog's form label (field under its caption): the checkbox sits beside its text. */
.media-dialog label.with-icon { display: inline-flex; align-items: center; gap: var(--spacingHorizontalS); flex: none; }
.media-large { display: grid; place-items: center; background: var(--colorNeutralBackground3); border-radius: var(--borderRadiusMedium); min-height: 12rem; }
.media-large :is(img, video) { max-width: 100%; max-height: calc(100vh - 14rem); object-fit: contain; }

.text-editor textarea { width: 100%; font-family: var(--fontFamilyMonospace); font-size: var(--fontSizeBase200); }
.text-editor input { width: 100%; }
.text-preview { border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalS) var(--spacingHorizontalM); }
.text-preview > :first-child { margin-top: 0; }
.text-preview > :last-child { margin-bottom: 0; }

.compose { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(28rem, 100%), 1fr)); gap: var(--spacingHorizontalXL); align-items: start; }
.compose > .panel { min-width: 0; }
/* align-items: start keeps a field at its own height when its neighbour carries a hint underneath, so two
   controls in a row share their top edge and their height. */
.compose .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); gap: var(--spacingVerticalM); align-items: start; }
/* One column that may shrink: a select is otherwise as wide as its longest option and runs under its
   neighbour. align-content: start stops a stretched label from growing the control's row. */
.compose label { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--spacingVerticalXS); font-weight: var(--fontWeightSemibold); }
.compose label > :is(input:not([type=checkbox]), select, textarea) { width: 100%; min-width: 0; font-weight: var(--fontWeightRegular); }
/* Inputs and selects render at different heights by default; one height for both -- Fluent's 32px. */
.compose :is(input:not([type=checkbox]), select) { height: 32px; }
.compose .hint { font-weight: var(--fontWeightRegular); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
.send-bar { border-top: 1px solid var(--colorNeutralStroke2); padding-top: var(--spacingVerticalM); margin: var(--spacingVerticalS) 0 0; }
.send-bar input[type=email] { flex: 1 1 12rem; min-width: 0; max-width: 18rem; }
.compose label.check { display: flex; gap: var(--spacingHorizontalS); align-items: flex-start; font-weight: var(--fontWeightRegular); padding: var(--spacingVerticalSNudge) 0; border-bottom: 1px solid var(--colorNeutralStroke2); }
.compose label.check input[type=checkbox] { margin-top: 2px; }
/* AI help on Send release mail: a button with its hint beside it, wrapping under it when narrow. */
.compose .note-field { display: grid; gap: var(--spacingVerticalSNudge); }
.compose .ai-row { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalSNudge) var(--spacingHorizontalS); align-items: center; }
.compose .ai-row .hint { flex: 1 1 14rem; min-width: 0; }
/* The AI's reason under a purely technical item, with its two actions. */
.compose .item-ai { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalXS) var(--spacingHorizontalS); align-items: center; margin-top: var(--spacingVerticalXS); font-size: var(--fontSizeBase200); }
.compose .item-ai > .muted:first-child { flex-basis: 100%; }
.compose .missing-texts { display: grid; gap: var(--spacingVerticalS); border: 1px dashed var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalS) var(--spacingHorizontalM); }
.compose .missing-item { display: grid; gap: var(--spacingVerticalSNudge); padding-top: var(--spacingVerticalS); border-top: 1px solid var(--colorNeutralStroke2); min-width: 0; }
.compose .missing-item .text-preview { overflow-wrap: anywhere; }
/* Texts in all languages (Send release mail): one row per item with its EN/DE/FR state. */
.compose .all-languages { display: grid; gap: var(--spacingVerticalSNudge); border: 1px dashed var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalS) var(--spacingHorizontalM); margin-bottom: var(--spacingVerticalS); }
.compose .all-languages .pill { font-family: var(--fontFamilyMonospace); margin: 0 var(--spacingHorizontalXXS); }
.compose .language-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: var(--spacingHorizontalSNudge); align-items: center; padding: var(--spacingVerticalXS) 0; border-bottom: 1px solid var(--colorNeutralStroke2); }
.compose .language-row label.check { align-items: center; gap: var(--spacingHorizontalXS); padding: 0; border-bottom: 0; }
/* An item title that opens the work item dialog: reads as text, acts as a button. */
button.item-link { min-height: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: var(--fontWeightRegular); text-align: left; cursor: pointer; }
button.item-link:hover { color: var(--accent); text-decoration: underline; background: none; }
button.pill { min-height: 0; background: none; cursor: pointer; font-family: inherit; }
.item-dialog { width: min(60rem, calc(100vw - 2rem)); overflow: auto; }
.item-dialog .source-text { max-height: 12rem; overflow: auto; }
.item-dialog summary { cursor: pointer; font-weight: var(--fontWeightSemibold); }
/* The recipient list (#14045): one row per recipient, ticked or not; the clicked one is what the preview shows.
   Rows wrap their tags under the name when narrow, never sideways. An outline list; the selected row is the
   brand tint with the 3px brand indicator on its left edge, as a selected nav item. */
.compose .recipients { list-style: none; margin: 0; padding: 0; border: 1px solid var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); max-height: 26rem; overflow-y: auto; }
.compose .recipient { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalXS) var(--spacingHorizontalS); align-items: center; padding: var(--spacingVerticalSNudge) var(--spacingHorizontalS); border-top: 1px solid var(--colorNeutralStroke2); min-width: 0; }
.compose .recipients > .recipient:first-child { border-top: 0; }
.compose .recipient.selected { background: var(--colorBrandBackground2); box-shadow: inset var(--strokeWidthThicker) 0 0 var(--colorCompoundBrandStroke); }
.compose .recipient.off .who, .compose .recipient.off .addr { color: var(--muted); }
/* A button only so the row is clickable and focusable: none of the Fluent Button's frame, height or centring. */
.compose .recipient-main { flex: 1 1 14rem; min-width: 0; min-height: 0; display: grid; justify-content: stretch; gap: var(--spacingVerticalXXS); text-align: left; background: none; border: 0; border-radius: var(--borderRadiusMedium); padding: 0; color: inherit; font: inherit; cursor: pointer; }
.compose .recipient-main:is(:hover, :active) { background: none; }
.compose .recipient .who { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalXXS) var(--spacingHorizontalSNudge); align-items: baseline; overflow-wrap: anywhere; }
.compose .recipient .addr { font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); color: var(--muted); overflow-wrap: anywhere; }
.compose .recipient .tags { display: flex; flex-wrap: wrap; gap: var(--spacingHorizontalXS); align-items: center; margin-left: auto; }
.compose .offered, .compose .selected-recipient, .compose .confirm-send, .compose .send-results { display: grid; gap: var(--spacingVerticalSNudge); border: 1px dashed var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalS) var(--spacingHorizontalM); }
.compose .offered .recipient { padding: var(--spacingVerticalXS) 0; }
.compose .selected-recipient { border-style: solid; border-color: var(--colorBrandStroke2); }
.compose .confirm-send { border-style: solid; border-color: var(--colorBrandStroke1); }
.compose .send-results ul, .compose .request-problems ul, .compose .contact-hits { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--spacingVerticalXS); }
.compose .send-results li, .compose .contact-hits li { display: flex; flex-wrap: wrap; gap: var(--spacingVerticalXS) var(--spacingHorizontalS); align-items: center; overflow-wrap: anywhere; }
.compose .contact-hits { border: 1px solid var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalSNudge) var(--spacingHorizontalS); max-height: 14rem; overflow-y: auto; }
.compose .contact-hits li > span { flex: 1 1 12rem; min-width: 0; }
.compose .add-recipient > summary, .compose .request-problems > summary { cursor: pointer; font-weight: var(--fontWeightSemibold); }
.compose .add-grid { display: grid; gap: var(--spacingVerticalS); padding-top: var(--spacingVerticalS); }
.compose .add-button { align-self: end; }
.compose .preview-for { margin: 0 0 var(--spacingVerticalSNudge); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); color: var(--muted); overflow-wrap: anywhere; }
/* Fluent ToggleButton group: joined secondary buttons, the pressed one in the selected fill, semibold. */
.seg { display: inline-flex; border: 1px solid var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); overflow: hidden; }
.seg button { min-height: 30px; border: 0; border-right: 1px solid var(--colorNeutralStroke1); border-radius: 0; font-weight: var(--fontWeightRegular); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--colorNeutralBackground1Selected); color: var(--fg); font-weight: var(--fontWeightSemibold); }

/* The mail preview runs in a sandboxed iframe: it is HTML built for mail clients, and must neither
   inherit this page's styles nor run anything. Its grey is the mail's own canvas, not a theme colour. */
.mail-frame { width: 100%; min-height: 34rem; border: 1px solid var(--colorNeutralStroke2); border-radius: var(--borderRadiusMedium); background: #eceef1; }
/* Send release mail: the preview stays beside the form while it scrolls (two columns only; stacked, it
   simply follows the form), and fills the window's height. */
.compose > .preview-panel { position: sticky; top: var(--spacingVerticalL); }
.preview-panel .mail-frame { height: calc(100vh - 10rem); min-height: 24rem; }
.compose .item-tabs { margin: 0 0 var(--spacingVerticalS); }
.compose .item-tabs .pill { margin-left: var(--spacingHorizontalXS); font-weight: var(--fontWeightRegular); }
.mail-dialog { width: min(52rem, calc(100vw - 2rem)); }

.settings-product { border: 1px solid var(--colorNeutralStroke1); border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalM) var(--spacingHorizontalL); margin-bottom: var(--spacingVerticalL); display: grid; gap: var(--spacingVerticalM); }
.settings-product .head { display: flex; gap: var(--spacingHorizontalM); align-items: center; flex-wrap: wrap; }
.settings-product table input, .settings-product table select { width: 100%; font-size: var(--fontSizeBase200); }

/* Product page (#13896): the logo beside the product's own properties, then tabs for features,
   variants and setup files. The properties keep the form width of every other edit page; the tabs
   get the full width, because the variant rows and the setup-file grid need it. */
.product-form { display: grid; gap: var(--spacingVerticalL); }
.product-head { display: flex; flex-wrap: wrap; gap: var(--spacingHorizontalXXL); align-items: flex-start; }
.product-logo { display: grid; gap: var(--spacingVerticalS); justify-items: start; width: 13rem; }
.product-logo .toolbar { margin: 0; }
.product-logo .hint { color: var(--muted); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
.product-props { display: grid; gap: var(--spacingVerticalL); flex: 1 1 26rem; max-width: 40rem; }
.product-props label, .upload-form label { display: grid; gap: var(--spacingVerticalXS); font-weight: var(--fontWeightSemibold); }
.product-props .hint, .upload-form .hint, .tab-panel > .hint { font-weight: var(--fontWeightRegular); color: var(--muted); font-size: var(--fontSizeBase200); line-height: var(--lineHeightBase200); }
.product-props .toolbar { margin: 0; }
/* A checkbox with its hint under it, kept together rather than spaced like two fields. */
.product-props .check-field { display: grid; gap: var(--spacingVerticalXS); }
.product-props label.check, .confirm-box label.check { display: flex; gap: var(--spacingHorizontalS); align-items: center; }
.confirm-box label.check { font-weight: var(--fontWeightSemibold); }
.frozen-note { white-space: pre-wrap; }
.product-form > .tabs { margin: var(--spacingVerticalS) 0 0; }
.tab-panel { display: grid; gap: var(--spacingVerticalM); }
/* Fluent CounterBadge in a tab, neutral tint: circular, Background6 (Background5 is pure black in dark,
   which read as a hole in the card), caption1Strong. */
.tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; font-size: var(--fontSizeBase200); font-weight: var(--fontWeightSemibold); padding: 0 var(--spacingHorizontalSNudge); border-radius: var(--borderRadiusCircular); background: var(--colorNeutralBackground6); color: var(--colorNeutralForeground2); }
.upload-form { display: grid; gap: var(--spacingVerticalL); max-width: 34rem; }
/* Built-in store marks (PlatformIcon). The Apple mark follows the text colour, so it stays visible in dark mode. */
.platform-icon { flex: none; display: inline-block; vertical-align: middle; }
.platform-icon.apple { color: var(--fg); }
.check-verdict { display: flex; flex-wrap: wrap; gap: var(--spacingHorizontalSNudge); align-items: baseline; }

/* Filter bar after the Azure DevOps one (#13896): keyword box, then one multi-select dropdown per
   category. A category with a choice is highlighted and names it ("iCL Portal (+1)"). Fluent's filled
   container, with the input's focus ring moved onto the whole bar. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--spacingHorizontalXS); border: 1px solid transparent; border-radius: var(--borderRadiusMedium); padding: var(--spacingVerticalXS) var(--spacingHorizontalS); margin-bottom: var(--spacingVerticalM); background: var(--colorNeutralBackground3); }
.filter-bar:has(.filter-keyword input:focus) { border-color: var(--colorNeutralStroke1); border-bottom-color: var(--colorCompoundBrandStroke); }
.filter-keyword { display: flex; align-items: center; gap: var(--spacingHorizontalSNudge); flex: 1 1 18rem; color: var(--muted); }
.filter-keyword input { flex: 1; border: 0; background: transparent; padding: 5px var(--spacingHorizontalXXS); font: inherit; color: var(--fg); min-width: 8rem; }
.filter-keyword input:focus { outline: none; box-shadow: none; }
.filter-dropdown { position: relative; }
/* Fluent subtle MenuButton; with a choice made it becomes a brand-tint toggle (brand160 fill, 6.0:1). */
.filter-button { display: inline-flex; align-items: center; gap: var(--spacingHorizontalSNudge); border: 1px solid transparent; background: transparent; color: var(--fg); padding: 5px var(--spacingHorizontalS); font-weight: var(--fontWeightRegular); white-space: nowrap; }
.filter-button:hover { background: var(--colorSubtleBackgroundHover); border-color: transparent; }
.filter-button.on, .filter-button.on:hover { background: var(--colorBrandBackground2); color: var(--colorBrandForeground2); border-color: var(--colorBrandStroke2); font-weight: var(--fontWeightSemibold); }
.filter-backdrop { position: fixed; inset: 0; z-index: 9; }
/* Fluent Menu with checkable items (see .lang-list). */
.filter-menu { position: absolute; right: 0; top: calc(100% + var(--spacingVerticalXS)); z-index: 10; min-width: 14rem; max-height: 22rem; overflow: auto; background: var(--colorNeutralBackground1); border: 1px solid light-dark(transparent, var(--colorNeutralStroke2)); border-radius: var(--borderRadiusMedium); box-shadow: var(--shadow16); padding: var(--spacingVerticalXS); }
.filter-option { display: flex; align-items: center; gap: var(--spacingHorizontalS); min-height: 32px; padding: 0 var(--spacingHorizontalS); border-radius: var(--borderRadiusMedium); cursor: pointer; white-space: nowrap; }
.filter-option:hover { background: var(--colorNeutralBackground1Hover); }
.filter-option.on { background: var(--colorNeutralBackground1Selected); font-weight: var(--fontWeightSemibold); }
.filter-menu-foot { border-top: 1px solid var(--colorNeutralStroke2); margin-top: var(--spacingVerticalXS); padding: var(--spacingVerticalXS) var(--spacingHorizontalS) 0; display: flex; justify-content: flex-end; }
/* Fluent transparent Button. */
.link-button { min-height: 24px; border: 0; background: none; padding: var(--spacingVerticalXXS) var(--spacingHorizontalXS); color: var(--colorNeutralForeground2); font-weight: var(--fontWeightSemibold); }
.link-button:hover { background: none; color: var(--colorBrandForeground1); }
.filter-clear { display: inline-flex; align-items: center; min-height: 32px; padding: 0 var(--spacingHorizontalS); border-radius: var(--borderRadiusMedium); color: var(--colorNeutralForeground2); text-decoration: none; font-size: var(--fontSizeBase400); }
.filter-clear:hover { color: var(--fg); background: var(--colorSubtleBackgroundHover); text-decoration: none; }

/* ==========================================================================================
   #14041: phones and tablets in portrait.

   "Narrow" is a width OR a shape: anything up to 1023px, and a portrait tablet up to 1100px (an iPad Pro
   12.9" is 1024 wide upright). A tablet on its side keeps the desktop grids and the sidebar. The same query
   is repeated in app.js (the drawer closes when it stops matching); keep them equal.

   Two things change: the sidebar becomes a drawer behind a menu button, and every table becomes a list
   of cards. grid.js stamps each body cell with its column header as data-label, so no page has to know.
   ========================================================================================== */
@media (max-width: 1023.98px), (orientation: portrait) and (max-width: 1100px) {

    /* ---- the menu ---- */
    .page { display: block; }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        width: min(280px, 85vw);
        background: var(--colorNeutralBackground1);
        overscroll-behavior: contain;
        transform: translateX(-100%);
        /* visibility, not just the transform: a closed drawer must also be out of the tab order and the
           accessibility tree, and CSS can do that without an attribute that Blazor's enhanced navigation
           would patch away. It flips at the end of the slide on close and at the start on open. */
        visibility: hidden;
        /* Fluent overlay drawer motion: in on DecelerateMid, out on AccelerateMid. */
        transition: transform var(--durationGentle) var(--curveAccelerateMid), visibility 0s linear var(--durationGentle);
    }
    .page.nav-open .sidebar {
        transform: none;
        visibility: visible;
        box-shadow: var(--shadow64);
        transition: transform var(--durationGentle) var(--curveDecelerateMid);
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 20;
        background: var(--colorBackgroundOverlay);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--durationGentle) var(--curveEasyEase), visibility 0s linear var(--durationGentle);
    }
    .page.nav-open .nav-backdrop { opacity: 1; visibility: visible; transition: opacity var(--durationGentle) var(--curveEasyEase); }

    /* Fluent subtle icon buttons, at the 44px touch size. */
    .nav-toggle, .nav-close {
        display: grid;
        place-items: center;
        flex: none;
        width: 44px;
        height: 44px;
        padding: 0;
        line-height: 0;
        border-color: transparent;
        background: var(--colorSubtleBackground);
        color: var(--colorNeutralForeground2);
    }
    .nav-toggle:hover, .nav-close:hover { background: var(--colorSubtleBackgroundHover); border-color: transparent; }
    .nav-toggle svg, .nav-close svg { width: 20px; height: 20px; }

    .sidebar .brand { padding: 0 var(--spacingHorizontalS) var(--spacingVerticalS); gap: var(--spacingHorizontalM); }
    /* 44px touch targets. */
    .sidebar a { display: flex; align-items: center; min-height: 44px; }
    .sidebar a:hover, .sidebar a.active { background: var(--colorNeutralBackground1Selected); }

    /* The header carries the menu button, so it stays in view; the brand fills the space after it. */
    main > header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: var(--colorNeutralBackground1);
        border-bottom: 1px solid var(--colorNeutralStroke2);
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: var(--spacingVerticalSNudge) var(--spacingHorizontalM);
        padding: var(--spacingVerticalS) var(--spacingHorizontalM);
    }
    .header-brand {
        display: flex;
        align-items: center;
        gap: var(--spacingHorizontalS);
        /* Basis 0: the brand gives way before anything wraps onto a second header row. */
        flex: 1 1 0;
        min-width: 0;
        color: var(--fg);
        font-size: var(--fontSizeBase400);
        line-height: var(--lineHeightBase400);
        font-weight: var(--fontWeightSemibold);
    }
    .header-brand .brand-icon { height: 28px; width: auto; flex: none; border-radius: var(--borderRadiusMedium); }
    .header-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .theme-toggle { width: 44px; height: 44px; }
    /* Only the flag (its title still names the language) and no user name, so the header stays one row. */
    .lang > summary { min-height: 44px; padding: 0 var(--spacingHorizontalM); }
    .lang > summary > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    main > header .user { display: none; }

    /* No card on a phone: the content takes the whole width, on the card's surface, and the page behind
       it is that surface too so nothing grey shows between the header and the content. */
    body { background: var(--colorNeutralBackground1); }
    main > article { margin: 0; padding: var(--spacingVerticalM); border-radius: 0; box-shadow: none; }

    /* ---- the rest of the page ---- */
    .toolbar input[type=search], .quality-filter { flex: 1 1 100%; min-width: 0; width: 100%; }
    .filters label { flex: 1 1 14rem; }
    .filters label :is(select, input:not([type=checkbox])) { flex: 1; min-width: 0; }
    .filters .spacer { display: none; }
    .tab-panel .toolbar { justify-content: flex-start; }
    form.stack { max-width: none; }
    /* A label that holds a select is a grid whose one column is as wide as the select's longest option,
       which pushes the page sideways; the column has to be allowed to shrink. */
    :is(.compose, .product-props, .upload-form, .edit-form, form.stack, .feature-dialog) label { grid-template-columns: minmax(0, 1fr); }
    select, input, textarea { max-width: 100%; }
    .edit-form { grid-template-columns: minmax(0, 1fr); }
    .item-cols, .compose, .detail-columns, .merge-pair { grid-template-columns: minmax(0, 1fr); }
    dl.detail { grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); }
    .segmented { max-width: 100%; overflow-x: auto; }

    /* ---- tables as cards ----
       Read-only tables opt in with class="cards"; the sortable grids (data-grid-key) always do. Tables with
       inputs in their cells (ReleaseSettings, the take-over table) opt out by not having the class and keep
       scrolling sideways inside .grid-wrap. */
    .grid-wrap:has(> :is(table.cards, table[data-grid-key])) { border: 0; border-radius: 0; overflow: visible; }

    :is(table.cards, table[data-grid-key]),
    :is(table.cards, table[data-grid-key]) :is(tbody, tr, td) { display: block; table-layout: auto; width: auto; }

    :is(table.cards, table[data-grid-key]) tbody tr,
    :is(table.cards, table[data-grid-key]) tbody tr:nth-child(even) {
        margin-bottom: var(--spacingVerticalS);
        padding: var(--spacingVerticalS) var(--spacingHorizontalM);
        border: 1px solid var(--colorNeutralStroke1);
        border-radius: var(--borderRadiusMedium);
        background: var(--colorNeutralBackground1);
    }

    /* Label left, value right. Not a two-column grid on the cell: every text run and element in a cell
       would become a grid item of its own, so "iCL Portal · Server package 2.2.6.0 [Release]" broke into
       three, and the version landed in the label column. The label floats in the cell's left padding
       instead, and the value flows as it does on a wide screen. 7.5rem as in the mockup. */
    :is(table.cards, table[data-grid-key]) td {
        display: flow-root;
        padding: .2rem 0 .2rem 8.1rem;
        text-align: left !important;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
    }
    :is(table.cards, table[data-grid-key]) td::before {
        content: attr(data-label);
        float: left;
        width: 7.5rem;
        margin-left: -8.1rem;
        padding-top: 1px;
        /* The cell's own font is for its value: a monospace id or a bold expiry must not restyle its label. */
        color: var(--muted);
        font: var(--fontWeightRegular) var(--fontSizeBase200)/var(--lineHeightBase300) var(--fontFamilyBase);
        overflow-wrap: break-word;
    }
    /* No header to name it (the "no rows" line, an unlabelled actions column), or nothing in it. */
    :is(table.cards, table[data-grid-key]) td:is(:not([data-label]), [data-label=""]) { display: block; padding-left: 0; }
    :is(table.cards, table[data-grid-key]) td:is(:not([data-label]), [data-label=""])::before { content: none; }
    :is(table.cards, table[data-grid-key]) td[data-empty] { display: none; }
    /* The first cell is the card's title: no label, a little more weight. */
    :is(table.cards, table[data-grid-key]) td:first-child { display: block; padding-left: 0; font-size: var(--fontSizeBase400); line-height: var(--lineHeightBase400); font-weight: var(--fontWeightSemibold); padding-bottom: var(--spacingVerticalXS); }
    :is(table.cards, table[data-grid-key]) td:first-child::before { content: none; }

    /* Plain tables have nothing to sort by: the header row goes -- except a header cell holding a control
       (Notifications' "select all ready"), which stays above the cards with its caption beside it. */
    table.cards thead { display: none; }
    table.cards thead:has(input) { display: block; margin-bottom: .6rem; }
    table.cards thead:has(input) tr { display: block; }
    table.cards thead:has(input) th { display: none; }
    table.cards thead:has(input) th:has(input) { display: block; position: static; padding: 0; border: 0; background: none; }
    table.cards thead th label { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 400; }
    .narrow-only { display: inline; }

    /* The sortable grids keep their header buttons, as a wrapping row of chips above the cards. The
       caption is the layout's localized data-sort-label, copied onto the row by grid.js. */
    table[data-grid-key] thead { display: block; }
    table[data-grid-key] thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .75rem; }
    table[data-grid-key] thead tr[data-sort-label]::before { content: attr(data-sort-label); color: var(--muted); font-size: 12px; }
    table[data-grid-key] thead th {
        display: block;
        position: static;
        width: auto !important;
        padding: 0;
        border: 0;
        background: none;
        overflow: visible;
    }
    table[data-grid-key] thead th:not(:has(.sort)) { display: none; }
    /* Fluent small ToggleButtons, circular; the sorted one is the brand-tint pressed state. */
    table[data-grid-key] thead th .sort {
        width: auto;
        padding: var(--spacingVerticalSNudge) var(--spacingHorizontalM);
        border: 1px solid var(--colorNeutralStroke1);
        border-radius: var(--borderRadiusCircular);
        background: var(--colorNeutralBackground1);
        font-size: var(--fontSizeBase200);
        font-weight: var(--fontWeightRegular);
    }
    table[data-grid-key] thead th.sorted .sort {
        border-color: var(--colorBrandStroke2);
        background: var(--colorBrandBackground2);
        color: var(--colorBrandForeground2);
        font-weight: var(--fontWeightSemibold);
    }
    table[data-grid-key] .col-resize { display: none; }

    /* Column visibility still applies; the settings menu is a mouse-and-wide-screen tool. */
    .col-menu { display: none; }
}
