/* Backlog wave 35, the new look: its tokens and the bridge to REA's P4 tokens (docs/design/MODERN-UI.md, section 4). Stream 35A
   owns this file; another stream that needs a token hands its exact line back to 35A, and test/modern-tokens.test.mts lists it.
   The one rule (section 2): every selector begins :root[data-ui="modern"], so nothing here applies in classic, where the html
   element has no data-ui attribute, and everything sits inside @media (forced-colors: none), so a Windows contrast theme draws
   exactly as classic does. This is the only gateway-page sheet that holds literal colours. The gateway serves it only inside
   /modern.css, the first of its six sheets in their fixed order (tokens, frame, screens, documents, surfaces, palette), each
   followed by one line feed; it is never served on its own. Ratios are WCAG contrast ratios (test/fixtures/css-tokens.mts). */
@media (forced-colors: none) {
:root[data-ui="modern"]{
  /* Brand (the Mertex UI kit and its home-menu dashboard's navy). */
  --mv-navy:#292f47;--mv-navy-deep:#091f3a;--mv-green:#2bb673;--mv-green-dark:#136c39;--mv-orange:#faa71d;--mv-orange-dark:#d3672c;
  /* Greys. */
  --mv-grey-50:#f6f7f8;--mv-grey-75:#f1f2f4;--mv-grey-90:#eceef1;--mv-grey-100:#eaeaea;--mv-grey-200:#d5d6da;--mv-grey-300:#bdbec4;
  --mv-grey-400:#8a8b92;--mv-grey-500:#7a7b82;--mv-grey-600:#63646b;--mv-grey-700:#525358;--mv-grey-900:#414141;
  /* Surfaces: a light working area, navy for the drawer and the menu toggle. */
  --mv-bg-app:#f6f7f8;--mv-surface:#ffffff;--mv-surface-sunken:#f6f7f8;--mv-surface-hover:#f1f2f4;--mv-surface-active:#eceef1;
  --mv-surface-selected:#e6f6ed;--mv-nav:#292f47;--mv-nav-deep:#091f3a;--mv-nav-hover:#363b52;--mv-nav-current:#29474f;
  --mv-backdrop:rgba(9,31,58,.45);
  --mv-shell-accent:#69d9a4;--mv-shell-line:#565d74;--mv-shell-hover:#454c64;
  /* Text: 4.5:1 or more on every surface each is used on. */
  --mv-text-strong:#292f47;--mv-text:#414141;--mv-text-muted:#63646b;--mv-text-on-nav:#ffffff;--mv-text-on-nav-muted:#bfc1c8;
  --mv-text-on-action:#ffffff;--mv-link:#136c39;
  /* Edges: the subtle and plain edges are decorative only; an edge that is the only cue is --mv-border-control (3:1 or more). */
  --mv-border-subtle:#eaeaea;--mv-border:#d5d6da;--mv-border-control:#7a7b82;--mv-border-key:#8a8b92;
  /* Action: green-dark, with white on it at 6.50:1; the brand green only on navy. */
  --mv-action:#136c39;--mv-action-hover:#0f5a2f;--mv-action-pressed:#0d4f29;--mv-action-tint:#e6f6ed;--mv-accent-on-nav:#2bb673;
  /* Status: the orange marks are never text; warning words are --mv-warning-text. */
  --mv-success:#136c39;--mv-warning-mark:#d3672c;--mv-warning-text:#8a5a00;--mv-warning-tint:#fff4df;--mv-warning-on-nav:#faa71d;
  --mv-danger:#c0392b;--mv-danger-text:#8a201a;--mv-danger-tint:#fbebe9;--mv-info:#2a64a8;--mv-info-text:#1f4a7a;--mv-info-tint:#e8f1fb;
  --mv-neutral:#7a7b82;
  /* Focus: green-dark on light surfaces, the brand green on navy; the ring's width and offset stay classic's. */
  --mv-focus:#136c39;--mv-focus-on-nav:#2bb673;
  /* Host values, which stream 35B maps the twelve --host-* tokens to in modern-screens.css. */
  --mv-host-window:#ffffff;--mv-host-face:#f6f7f8;--mv-host-button-face:#ffffff;--mv-host-face-hover:#f1f2f4;--mv-host-face-pressed:#e6f6ed;
  --mv-host-edge:#7a7b82;--mv-host-edge-hover:#136c39;--mv-host-text:#292f47;--mv-host-text-muted:#63646b;--mv-host-caption:#ffffff;
  --mv-host-caption-text:#292f47;--mv-host-close-hover:#c0392b;
  /* A Mertex grid's own ink where Mertex gives none: classic's black, so its cells, on Mertex's row colours too, read as in classic. */
  --mv-host-grid-ink:#000000;
  /* Radii, shadows (navy-tinted) and motion. */
  --mv-radius-sm:3px;--mv-radius-md:6px;--mv-radius-lg:10px;--mv-radius-xl:16px;--mv-radius-pill:999px;
  --mv-shadow-1:0 1px 2px rgba(9,31,58,.06),0 1px 1px rgba(9,31,58,.04);
  --mv-shadow-2:0 2px 6px rgba(9,31,58,.08),0 1px 2px rgba(9,31,58,.05);
  --mv-shadow-3:0 6px 16px rgba(9,31,58,.10),0 2px 4px rgba(9,31,58,.06);
  --mv-shadow-4:0 14px 32px rgba(9,31,58,.14),0 4px 8px rgba(9,31,58,.06);
  --mv-dur-fast:120ms;--mv-dur:200ms;--mv-dur-slow:320ms;
  --mv-ease:cubic-bezier(.2,0,0,1);--mv-ease-in:cubic-bezier(0,0,0,1);--mv-ease-out:cubic-bezier(.4,0,1,1);
  /* The bridge: REA's P4 tokens (styles.css, lines 4 to 17) re-pointed, so every token-based REA surface takes the brand at once.
     The danger, warning and info border tokens keep their classic values. --brand-mark is green-dark, because REA's rule for
     marks needs 3:1 on the page, surface and sunken colours, and the brand green gives 2.61:1 on white. */
  --colour-text:#414141;--colour-text-strong:#292f47;--colour-text-muted:#63646b;--colour-text-on-dark:#ffffff;--colour-on-accent:#ffffff;
  --colour-page:#f6f7f8;--colour-surface:#ffffff;--colour-surface-sunken:#f6f7f8;--colour-surface-hover:#f1f2f4;--colour-surface-dark:#292f47;
  --colour-stage-light:#f6f7f8;--colour-stage-dark:#292f47;--surface-stage-dark:#292f47;
  --colour-border:#d5d6da;--colour-border-control:#d5d6da;--colour-border-field:#7a7b82;
  --colour-accent:#136c39;--colour-accent-strong:#0f5a2f;--colour-accent-tint:#e6f6ed;
  --colour-danger:#c0392b;--colour-danger-tint:#fbebe9;--colour-warning:#8a5a00;--colour-warning-accent:#d3672c;--colour-warning-tint:#fff4df;
  --colour-info:#2a64a8;--colour-info-tint:#e8f1fb;--colour-success:#136c39;
  --brand-mark:#136c39;--brand-ink:#292f47;
  --colour-focus:#136c39;--colour-focus-on-dark:#2bb673;
  --radius-small:3px;--radius-control:6px;--radius-surface:10px;
  --shadow-card:var(--mv-shadow-1);--shadow-floating:var(--mv-shadow-3);--shadow-raised:var(--mv-shadow-4);
  --colour-backdrop:rgba(9,31,58,.45);--colour-scrim-light:rgba(246,247,248,.85);
}
}

/* Backlog wave 35, the new look: the customer bar and its new chrome (the menu toggle, the breadcrumb and the search button;
   docs/design/MODERN-UI.md, sections 9.2 and 11.1). Stream 35A owns this file. The one rule (section 2): every selector begins
   :root[data-ui="modern"]; on an element that exists in classic a rule declares paint only, inside @media (forced-colors: none),
   with motion only inside a nested @media (prefers-reduced-motion: no-preference) and for colour properties only; only the new
   mv- chrome has a layout of its own, written in literal px. No literal colour: var(--mv-*), transparent, currentColor, inherit and
   none only. Ghost rules name .customer-bar-button and .mv-palette-button, never .customer-bar button or .customer-bar *, and
   the bar keeps its inherited text colour for Mertex's menu. No selector here names anything inside #gui-main-menu, #mv-drawer, #mv-palette or
   .mv-shortcut, or names the developer shell. The gateway serves this sheet only inside /modern.css, the second of its six sheets
   in their fixed order (tokens, frame, screens, documents, surfaces, palette), each followed by one line feed. */

/* The new chrome's own layout, in every colour mode (literal px, so it holds in forced colours, where the --mv-* tokens do not
   exist). The bar keeps its 40 px and its box: the toggle is 32 px square and the search button 30 px high, like the bar's own
   buttons. The toggle never shrinks, so it always shows; the breadcrumb gives way first (flex-shrink 100) and ends in an ellipsis,
   so it never takes width from the bar's own items or from Mertex's menu. */
:root[data-ui="modern"] .mv-menu-toggle{display:inline-grid;place-items:center;flex:0 0 auto;flex-shrink:0;box-sizing:border-box;width:32px;height:32px;
  margin:0;padding:0;border:1px solid transparent;border-radius:6px;font:inherit;line-height:1;cursor:pointer}
:root[data-ui="modern"] .mv-breadcrumb{flex:0 100 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:400;line-height:1.4}
:root[data-ui="modern"] .mv-breadcrumb-title{font-weight:600}
:root[data-ui="modern"] .mv-palette-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;flex-shrink:0;box-sizing:border-box;
  height:30px;min-width:30px;margin:0;padding:0 7px;border:1px solid transparent;border-radius:6px;font:inherit;font-size:13px;line-height:1.2;white-space:nowrap;cursor:pointer}
:root[data-ui="modern"] .mv-palette-button .mv-keycap{display:inline-flex;align-items:center;box-sizing:border-box;height:18px;padding:0 6px;border:1px solid transparent;
  border-radius:3px;font-size:12px;font-weight:400;line-height:1;white-space:nowrap}
/* The breadcrumb never takes width from Mertex's menu: it goes while the menu shows, and in narrow windows. */
:root[data-ui="modern"] .customer-bar:has(> #gui-main-menu:not([hidden])) .mv-breadcrumb{display:none}
/* The search button's keycap shows only where the bar has room for it; at 1366 px and below the button is its icon, 30 px square. */
@media (max-width:1366px){
:root[data-ui="modern"] .mv-palette-button .mv-keycap,
:root[data-ui="modern"] .mv-palette-button .mv-command-label{display:none}
:root[data-ui="modern"] .mv-palette-button{width:30px;padding:0}
}
@media (max-width:640px){
:root[data-ui="modern"] .mv-breadcrumb{display:none}
}
/* At 400 px and below the search button goes; the drawer's own row opens the command search instead (35E). */
@media (max-width:400px){
:root[data-ui="modern"] .mv-palette-button{display:none}
}

/* Reflex navigation, using the existing bar's dimensions. The host menu has its
   own light surface so host-selected text and hover colours remain legible. */
@media (forced-colors: none) {
:root[data-ui="modern"] .customer-bar {
  background-color:var(--mv-nav);
  border-bottom-color:var(--mv-nav-hover);
}
:root[data-ui="modern"] .customer-bar .customer-bar-identity,
:root[data-ui="modern"] .customer-bar .customer-bar-actions {
  color:var(--mv-text-on-nav);
  --focus-ring-colour:var(--mv-focus-on-nav);
}
:root[data-ui="modern"] .customer-bar .mertex-wordmark,
:root[data-ui="modern"] .customer-bar #customer-system,
:root[data-ui="modern"] .mv-breadcrumb-title {color:var(--mv-text-on-nav)}
:root[data-ui="modern"] .customer-bar .mertex-wordmark::before,
:root[data-ui="modern"] .customer-bar .customer-status.online .status-dot {background-color:var(--mv-shell-accent)}
:root[data-ui="modern"] .customer-bar .customer-status.pending .status-dot {background-color:var(--mv-warning-on-nav)}
:root[data-ui="modern"] .customer-bar .customer-status.offline .status-dot {background-color:var(--mv-text-on-nav-muted)}
:root[data-ui="modern"] .customer-bar .customer-status,
:root[data-ui="modern"] .mv-breadcrumb {color:var(--mv-text-on-nav-muted)}

:root[data-ui="modern"] .customer-bar .customer-bar-button {border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] .customer-bar .customer-bar-button:not([aria-pressed="true"]) {
  background-color:transparent;
  border-color:transparent;
  color:var(--mv-text-on-nav);
}
:root[data-ui="modern"] .customer-bar .customer-bar-button:not([aria-pressed="true"]):hover,
:root[data-ui="modern"] .mv-menu-toggle:hover {background-color:var(--mv-shell-hover)}
:root[data-ui="modern"] .customer-bar .customer-bar-button:not([aria-pressed="true"]):active {background-color:var(--mv-nav-deep)}
:root[data-ui="modern"] .mv-menu-toggle,
:root[data-ui="modern"] .mv-palette-button {
  color:var(--mv-text-on-nav);
  background-color:var(--mv-nav-hover);
  border-color:var(--mv-shell-line);
  border-radius:var(--mv-radius-md);
}
:root[data-ui="modern"] .mv-palette-button:hover {background-color:var(--mv-shell-hover)}
:root[data-ui="modern"] .mv-palette-button .mv-keycap {
  background-color:var(--mv-nav);
  color:var(--mv-text-on-nav-muted);
  border-color:var(--mv-shell-line);
  border-radius:var(--mv-radius-sm);
}
:root[data-ui="modern"] .mv-menu-toggle:is(:focus-visible,[data-key-focus]:focus) {
  outline:2px solid var(--mv-focus-on-nav);
  outline-offset:-4px;
}
:root[data-ui="modern"] .mv-palette-button:is(:focus-visible,[data-key-focus]:focus),
:root[data-ui="modern"] .customer-bar .customer-bar-button:is(:focus-visible,[data-key-focus]:focus) {
  outline-color:var(--mv-focus-on-nav);
}
@media (prefers-reduced-motion: no-preference) {
:root[data-ui="modern"] .customer-bar .customer-bar-button,:root[data-ui="modern"] .mv-palette-button,:root[data-ui="modern"] .mv-menu-toggle{
  transition:background-color var(--mv-dur-fast) var(--mv-ease),border-color var(--mv-dur-fast) var(--mv-ease),color var(--mv-dur-fast) var(--mv-ease)}
}
}

/* A Windows contrast theme: the bar's own items draw exactly as in classic; the new chrome uses system colours only (the --mv-*
   tokens do not exist here), with CanvasText edges, ButtonText icons and outline rings, the toggle's still inside its edge. */
@media (forced-colors: active) {
:root[data-ui="modern"] .mv-menu-toggle,:root[data-ui="modern"] .mv-palette-button{border-color:CanvasText;color:ButtonText}
:root[data-ui="modern"] .mv-palette-button .mv-keycap{border-color:CanvasText;color:CanvasText}
:root[data-ui="modern"] .mv-menu-toggle:is(:focus-visible,[data-key-focus]:focus){outline:2px solid Highlight;outline-offset:-4px}
}

/* Backlog wave 35, the new look: Mertex's GUI++ screens and the twelve --host-* re-pointings (docs/design/MODERN-UI.md, sections
   4.12, 9.16 and 14). Stream 35B owns this file. The one rule (section 2): every selector begins :root[data-ui="modern"]; on an
   element that exists in classic a rule declares paint only, inside @media (forced-colors: none), with motion only inside a
   nested @media (prefers-reduced-motion: no-preference) and for colour properties only. No literal colour: var(--mv-*),
   var(--host-*), transparent, currentColor, inherit and none only. The gateway serves this sheet only inside /modern.css, the
   third of its six sheets in their fixed order (tokens, frame, screens, documents, surfaces, palette), each followed by one line
   feed. Recognised Sales Order Entry documents and reviewed workflows have scoped layout rules in normal screen colours.
   Every rule
   passes through one of Mertex content's own anchors (a .gui-* class or #gui-* id, the status line, the TU bar, the help window,
   the combo and grid edit lists, or a data-mv-* marker); none names REA's own dialogs, the customer bar or the new chrome.
   test/modern-screens-css.test.mts checks all of this. */
@media (forced-colors: none) {
@media screen {
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-layout] {
  background-color:var(--mv-bg-app)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-layout="form"] {
  height:var(--mv-workflow-content-height)!important;min-height:var(--mv-workflow-content-height)!important;
  min-width:0!important;max-width:max(320px,calc(100% - 24px))!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-layout="page"] {overflow:auto!important}
:root[data-ui="modern"] .terminal-stage:has(#gui-virtual-desktop :is([data-mv-workflow="product-accounting"],[data-mv-workflow="cloth-order-header"])[data-mv-workflow-layout="page"]:not([hidden])) {
  container:workflow-tab-stage / inline-size;
}
:root[data-ui="modern"] #gui-virtual-desktop :is([data-mv-workflow="product-accounting"],[data-mv-workflow="cloth-order-header"])[data-mv-workflow-layout="page"] {
  min-width:0!important;max-width:max(128px,calc(100cqw - 24px))!important;
}
@container workflow-tab-stage (max-width:1240px) {
:root[data-ui="modern"] #gui-virtual-desktop .gui-auxiliary-form:has(> [data-tabset-client] > :is([data-mv-workflow="product-accounting"],[data-mv-workflow="cloth-order-header"])[data-mv-workflow-layout="page"]:not([hidden])) {
  left:8px!important;
}
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-layout] > [data-mv-workflow-part] {
  left:var(--mv-workflow-x)!important;top:var(--mv-workflow-y)!important;
  width:var(--mv-workflow-width)!important;height:var(--mv-workflow-height)!important;
}
/* Pressed and resting captions belong to the same native button. */
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-layout] > .gui-form-button[data-caption-events] > span {
  pointer-events:none;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-layout] > [data-mv-workflow-part="caption"] {
  font-family:Inter,"Segoe UI",system-ui,sans-serif!important;font-size:13px!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-cards] > section {
  background-color:var(--mv-surface);border-radius:var(--mv-radius-lg);box-shadow:inset 0 0 0 1px var(--mv-border),var(--mv-shadow-1);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow-cards] h3 {
  margin:12px 16px;color:var(--mv-text-strong);font-size:16px;font-weight:650;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow] > [data-mv-workflow-part="caption"][data-mv-order-paint="caption"] {
  color:var(--mv-text-muted)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow] > [data-mv-workflow-part="caption"][data-mv-order-paint="caption"][data-mv-workflow-current] {
  color:var(--mv-link)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow] > [data-mv-workflow-part="field"][data-mv-order-paint="reference"] {
  background-color:var(--mv-surface-sunken)!important;color:var(--mv-text)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow] > [data-mv-workflow-part="field"][data-mv-order-paint="entry"]:focus {
  box-shadow:inset 0 0 0 2px var(--mv-focus)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow="print-picking-lists"] > [data-mv-picking-action="print"]:enabled {
  color:var(--mv-text-on-action)!important;background-color:var(--mv-action)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow="print-picking-lists"] > [data-mv-picking-action="apply"]:enabled {
  color:var(--mv-text-strong)!important;background-color:var(--mv-surface-selected)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-workflow="print-picking-lists"] > [data-mv-picking-action]:focus-visible {
  outline-color:var(--mv-focus);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-window-title] > span[data-mv-workflow-section]::after {
  content:attr(data-mv-workflow-section);margin-left:14px;padding:2px 8px;border-radius:var(--mv-radius-pill);
  color:var(--mv-text-strong);background-color:var(--mv-surface-selected);font-size:12px;font-weight:600;
}
}

/* The modern host palette (part 2): the twelve host tokens, each to its new-look value. This alone repaints every classic rule
   that reads them: the native push button faces, the toolbar, the LFK and TU bars, the status line, tabs, menus, the combo and
   cell lists, the calendar, messages, scroll bars, the CEO buttons and the grid's edge strips. The text screen's two tokens are
   Mertex content and are never re-pointed. */
:root[data-ui="modern"]{--host-window:var(--mv-host-window);--host-face:var(--mv-host-face);--host-button-face:var(--mv-host-button-face);
  --host-face-hover:var(--mv-host-face-hover);--host-face-pressed:var(--mv-host-face-pressed);--host-edge:var(--mv-host-edge);
  --host-edge-hover:var(--mv-host-edge-hover);--host-text:var(--mv-host-text);--host-text-muted:var(--mv-host-text-muted);
  --host-caption:var(--mv-host-caption);--host-caption-text:var(--mv-host-caption-text);--host-close-hover:var(--mv-host-close-hover)}

/* The markers (part 3, browser/modern-host-marks.ts): a Mertex colour equal to a Windows default, and decorate's 3-D bevels, set
   inline by app.js, take the new look's default; every other Mertex colour wins. !important because the colours are inline. */
:root[data-ui="modern"] [data-mv-face="face"]{background-color:var(--mv-host-face)!important}
:root[data-ui="modern"] [data-mv-face="window"]{background-color:var(--mv-host-window)!important}
:root[data-ui="modern"] [data-mv-ink="system"]{color:var(--mv-host-text)!important}
:root[data-ui="modern"] [data-mv-relief]{box-shadow:inset 0 0 0 1px var(--mv-border-control)!important}

/* Windows (part 4). The active window carries the navy header; background windows have a white caption. Both have a
   hairline foot and keep the 32 px height, font, padding, ellipsis and cursors. Where classic draws a caption's ring as shadows, the
   ring is restated with the foot. The front window is framed in grey at classic's 2 px (green is kept for actions, focus and the
   current item); windows behind and owned windows keep the palette's 1 px edge. No filter: classic's drop-shadow stays. Window
   client areas stay square. */
:root[data-ui="modern"] #gui-virtual-desktop{background-color:var(--mv-bg-app)}
:root[data-ui="modern"] .gui-form-window-title{border-top-left-radius:var(--mv-radius-lg);border-top-right-radius:var(--mv-radius-lg);
  box-shadow:inset 0 -1px 0 var(--mv-border)}
:root[data-ui="modern"] #gui-virtual-desktop:not([inert]) [data-window-active="true"]>.gui-form-window-title{
  background-color:var(--mv-nav);color:var(--mv-text-on-nav)}
:root[data-ui="modern"] #gui-virtual-desktop:not([inert]) [data-window-active="true"]>.gui-form-window-title>button:focus-visible{
  box-shadow:inset 0 0 0 2px var(--mv-focus-on-nav)}
:root[data-ui="modern"] .gui-auxiliary-form[data-window-modal="true"][data-window-active="true"]{outline-color:var(--mv-grey-600)}
:root[data-ui="modern"] .gui-auxiliary-form[data-window-modal="true"][data-window-active="true"]>.gui-form-window-title{
  box-shadow:-2px 0 0 var(--mv-grey-600),2px 0 0 var(--mv-grey-600),0 -2px 0 var(--mv-grey-600),-2px -2px 0 var(--mv-grey-600),
  2px -2px 0 var(--mv-grey-600),inset 0 -1px 0 var(--mv-border)}
:root[data-ui="modern"] .gui-auxiliary-form[data-window-modal="true"]:not([data-window-active="true"])>.gui-form-window-title{
  box-shadow:-1px 0 0 var(--host-edge),1px 0 0 var(--host-edge),0 -1px 0 var(--host-edge),-1px -1px 0 var(--host-edge),1px -1px 0 var(--host-edge),
  inset 0 -1px 0 var(--mv-border)}
/* While a Mertex message or the calendar shows, the window under it looks like one behind (classic's id rule keeps its outline). */
:root[data-ui="modern"] #gui-virtual-desktop[inert] .gui-auxiliary-form[data-window-modal="true"][data-window-active="true"]>.gui-form-window-title{
  box-shadow:-1px 0 0 var(--host-edge),1px 0 0 var(--host-edge),0 -1px 0 var(--host-edge),-1px -1px 0 var(--host-edge),1px -1px 0 var(--host-edge),
  inset 0 -1px 0 var(--mv-border)}
/* REA's "Opening Mertex…" card inside the main window: navy heading, muted words, the symbol on the selected tint. */
:root[data-ui="modern"] .gui-main-window-pending h3{color:var(--mv-text-strong)}
:root[data-ui="modern"] .gui-main-window-pending p{color:var(--mv-text-muted)}
:root[data-ui="modern"] .gui-window-symbol{background-color:var(--mv-surface-selected);color:var(--mv-action)}

/* Sales Order Entry. The actions rail, page navigation and field hierarchy
   use the native nodes and their exact metrics. The three order-paint marks
   identify only the original ORD1/2/3 caption, entry and reference palettes. */
@media screen {
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i]:has(> .gui-form-tabs) > .gui-form-window-title{
  box-shadow:inset 3px 0 0 var(--mv-shell-accent),inset 0 -1px 0 var(--mv-border)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu{
  background-color:var(--mv-nav-deep);color:var(--mv-text-on-nav);border-color:var(--mv-shell-line);border-radius:0}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > button,
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > details > summary{
  color:var(--mv-text-on-nav)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > button[data-grayed="true"],
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu:not(.gui-main-menu) > button:disabled{
  color:var(--mv-text-on-nav-muted)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > details[open] > summary,
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > details > summary:is(:hover,:focus-visible),
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > button:not(:disabled):is(:hover,:focus-visible){
  color:var(--mv-text-on-nav);background-color:var(--mv-shell-hover);box-shadow:inset 0 -2px 0 var(--mv-shell-accent)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > details > summary:focus-visible,
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > button:focus-visible{
  outline-color:var(--mv-focus-on-nav)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > details > button{
  color:var(--mv-text);background-color:var(--mv-surface)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-menu > details > button:disabled{
  color:var(--mv-text-muted)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-tabs{
  background-color:var(--mv-surface);border-color:var(--mv-border);box-shadow:inset 0 -1px 0 var(--mv-border)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-tabs button{
  border-radius:var(--mv-radius-sm);color:var(--mv-text-muted)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-tabs button:not([aria-current]):not(:disabled):hover{
  color:var(--mv-text-strong);background-color:var(--mv-surface-hover)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-tabs button[aria-current="page"]{
  color:var(--mv-text-on-nav);background-color:var(--mv-nav);box-shadow:inset 0 -3px 0 var(--mv-shell-accent)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > .gui-form-tabs button[aria-current="page"]:focus-visible{
  box-shadow:inset 0 0 0 2px var(--mv-focus-on-nav)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] [data-mv-order-paint="caption"]{
  color:var(--mv-text-strong)!important;background-color:transparent!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] [data-mv-order-paint="entry"]{
  background-color:var(--mv-surface)!important;color:var(--mv-text-strong)!important;
  box-shadow:inset 0 0 0 1px var(--mv-border-control)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] [data-mv-order-paint="reference"]{
  background-color:var(--mv-surface-active)!important;color:var(--mv-text)!important;
  box-shadow:inset 0 0 0 1px var(--mv-border-subtle)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] > :is([aria-label="Header" i],[aria-label="Delivery" i]) > :is([data-mv-order-paint="entry"],[data-mv-order-paint="reference"]){
  border-radius:var(--mv-radius-md)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] [data-mv-order-paint="entry"]:hover:not([readonly]){
  box-shadow:inset 0 0 0 1px var(--mv-text-strong)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] :is([data-mv-order-paint="entry"],[data-mv-order-paint="reference"]):focus:not([readonly]){
  box-shadow:inset 0 0 0 2px var(--mv-action)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] .gui-form-label[data-mv-order-field-label][data-mv-order-paint="caption"],
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] .gui-form-label[data-mv-order-field-label][data-mv-face="window"][data-mv-ink="system"]{
  background-color:var(--mv-surface-selected)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] > :is([aria-label="Header" i],[aria-label="Delivery" i]) > :is(.gui-form-text,.gui-form-multiline,input.gui-form-combo)[data-mv-relief]{
  border-radius:var(--mv-radius-sm)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] :is(.gui-form-text,.gui-form-multiline,input.gui-form-combo)[data-mv-relief]:focus:not([readonly]){
  box-shadow:inset 3px 0 0 var(--mv-action),inset 0 0 0 1px var(--mv-action)!important}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] .gui-form-button[data-native-face="true"]:not(:disabled)::before{
  border-radius:var(--mv-radius-md);border-color:var(--mv-border-control);background-color:var(--mv-surface);
  box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] .gui-form-button[data-native-face="true"]:not(:disabled):hover::before{
  border-color:var(--mv-action);box-shadow:inset 0 -2px 0 var(--mv-action)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] .gui-form-button[data-native-face="true"]:is([data-normal-caption="F2-Save" i],[data-normal-caption="F2-&Save" i],[data-normal-caption="Save" i],[data-normal-caption="&Save" i]):not(:disabled){
  color:var(--mv-text-on-action)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] .gui-form-button[data-native-face="true"]:is([data-normal-caption="F2-Save" i],[data-normal-caption="F2-&Save" i],[data-normal-caption="Save" i],[data-normal-caption="&Save" i]):not(:disabled)::before{
  background-color:var(--mv-action);border-color:var(--mv-action);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .gui-auxiliary-form[aria-label="Sales Order Entry" i] > [data-tabset-client] .gui-form-button[data-native-face="true"]:is([data-normal-caption="F2-Save" i],[data-normal-caption="F2-&Save" i],[data-normal-caption="Save" i],[data-normal-caption="&Save" i]):not(:disabled):hover::before{
  background-color:var(--mv-action-hover);border-color:var(--mv-action-hover)}
}

/* Controls (part 5). A text field or memo with decorate's bevel (now the hairline above) takes small corners, and a darker
   hairline under the pointer while it can be typed in; its padding, font, border width, scroll bar and read-only face stay, and
   its ring is classic's. Lists, boxes and options take the green accent; a chosen item is a face plus a 2 px edge, never the face
   alone (1.12:1 on white, WCAG 1.4.11). The plain list's options carry an inline background, so its hover needs !important; the
   list-level flag keeps the hover to a list Mertex lets the person choose in (app.js sets it on the list itself). */
:root[data-ui="modern"] :is(.gui-form-text,.gui-form-multiline,input.gui-form-combo)[data-mv-relief]{border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] :is(.gui-form-text,.gui-form-multiline,input.gui-form-combo)[data-mv-relief]:not([readonly]):not(:disabled):hover{
  box-shadow:inset 0 0 0 1px var(--mv-grey-700)!important}
:root[data-ui="modern"] select.gui-form-combo{accent-color:var(--mv-action)}
:root[data-ui="modern"] .gui-form-combo-list{border-color:var(--mv-border);border-radius:var(--mv-radius-md);box-shadow:var(--mv-shadow-3)}
:root[data-ui="modern"] .gui-form-combo-list>[role="option"][aria-selected="true"]{box-shadow:inset 2px 0 0 var(--mv-action)}
:root[data-ui="modern"] .gui-form-selectlist [role="option"][aria-selected="true"]{box-shadow:inset 2px 0 0 var(--mv-action)}
:root[data-ui="modern"] .gui-form-selectlist[data-selection-enabled="true"] [role="option"][aria-selected="false"]:hover{
  background-color:var(--mv-surface-hover)!important}
:root[data-ui="modern"] .gui-form-toggle input[type="checkbox"]:not([data-native-cross]),
:root[data-ui="modern"] .gui-form-radio input[type="radio"]{accent-color:var(--mv-action)}
:root[data-ui="modern"] .gui-form-button[data-native-face="true"]::before{border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] .gui-form-scrollbar .gui-scrollbar-thumb{border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] .host-status>progress{accent-color:var(--mv-action)}

/* Bars and menus (part 6). Tabs keep their font, weight, padding, gaps and border widths, which the tab layout Mertex is told
   depends on: their edges turn transparent at classic's width, and the current tab takes the selected tint with a green underline
   drawn inside it. Menus, the toolbar, the LFK and TU bars and the status line are flat strips with a hairline foot; their
   heights and padding stay (the form menu bar's height places Mertex's embedded pages). Nothing is drawn over a button's centre
   and no opacity or visibility is touched: the TU bar's buttonShown tells Mertex what it sees. */
:root[data-ui="modern"] [data-gui-comparison="true"]>.gui-form-tabs{border-bottom-color:var(--mv-border)}
:root[data-ui="modern"] [data-gui-comparison="true"]>.gui-form-tabs button{border-color:transparent;color:var(--mv-host-text-muted)}
:root[data-ui="modern"] [data-gui-comparison="true"]>.gui-form-tabs button:not(:disabled):hover{color:var(--mv-host-text)}
:root[data-ui="modern"] .gui-form-tabs [aria-current="page"]{background-color:var(--mv-surface-selected);box-shadow:inset 0 -2px 0 var(--mv-action)}
:root[data-ui="modern"] [data-gui-comparison="true"]>.gui-form-tabs [aria-current="page"]{background-color:var(--mv-surface-selected);border-color:transparent;
  color:var(--mv-host-text);box-shadow:inset 0 -2px 0 var(--mv-action)}
/* The menu host is a zero-height positioning anchor. Put the readable surface
   on the visible menu itself when it sits in the navy customer header. */
:root[data-ui="modern"] .gui-main-menu {
  background-color:var(--mv-host-window);
  border-radius:var(--mv-radius-sm);
}
:root[data-ui="modern"] .gui-main-menu :is(summary,button:not(:disabled)):hover,
:root[data-ui="modern"] .gui-main-menu :is(summary,button):focus-visible{background-color:var(--mv-surface-hover);border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] .gui-main-menu-drop{border-color:var(--mv-border);border-radius:var(--mv-radius-md);box-shadow:var(--mv-shadow-3)}
:root[data-ui="modern"] .gui-main-menu-drop .gui-main-menu-drop{border-left-color:var(--mv-border);border-radius:0;box-shadow:none}
:root[data-ui="modern"] .gui-main-menu-drop>hr{border-top-color:var(--mv-border)}
:root[data-ui="modern"] .gui-main-menu [data-grayed="true"]{color:var(--mv-host-text-muted)}
:root[data-ui="modern"] .gui-main-menu-check{color:var(--mv-action)}
/* The standalone application exit belongs to the navy header. Other host menus keep their own surface. */
:root[data-ui="modern"] .gui-main-menu:has(> [data-application-exit]){background-color:var(--mv-nav-hover)}
:root[data-ui="modern"] .gui-main-menu > button[data-application-exit]{color:var(--mv-text-on-nav)}
:root[data-ui="modern"] .gui-main-menu > button[data-application-exit]:disabled{color:var(--mv-text-on-nav-muted)}
:root[data-ui="modern"] .gui-main-menu > button[data-application-exit]:not(:disabled):is(:hover,:focus-visible){background-color:var(--mv-shell-hover)}
:root[data-ui="modern"] #gui-toolbar{background-color:var(--mv-surface);border-bottom-color:var(--mv-border)}
:root[data-ui="modern"] .gui-toolbar-button{border-radius:var(--mv-radius-sm);color:var(--mv-host-text)}
:root[data-ui="modern"] .gui-toolbar-button:not(:disabled):not([aria-disabled="true"]):hover{background-color:var(--mv-surface-hover)}
/* Mertex may supply help for a tool without an installed bitmap. Keep its tooltip and a quiet edge; only an unnamed,
   iconless spacer blends into the toolbar. All slots retain the border width used by the bitmap and geometry proofs. */
:root[data-ui="modern"] .gui-toolbar-button:is(:disabled,[aria-disabled="true"]){color:var(--mv-host-text-muted);border-color:var(--mv-border)}
:root[data-ui="modern"] .gui-toolbar-button[aria-disabled="true"]:not([data-button-bitmap]){background-color:var(--mv-surface)}
:root[data-ui="modern"] .gui-toolbar-button[aria-hidden="true"]{border-color:transparent}
:root[data-ui="modern"] .gui-toolbar-button[aria-disabled="true"][aria-label]:hover{border-color:var(--mv-border-control)}
:root[data-ui="modern"] .gui-lfk-bar{border-bottom-color:var(--mv-border)}
:root[data-ui="modern"] .gui-lfk-button{border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] .host-status{border-top-color:var(--mv-border)}
:root[data-ui="modern"] .host-status-more{color:var(--mv-link)}

/* Grids, lookups, the calendar, messages and CEO windows (part 7). In a grid only the headings, the lines and the frame change:
   the grid's proof reads its data cells' and row numbers' colours, which stay Mertex's, and its headings' text alone. A heading
   takes background-color only, never the shorthand, which would wipe its sort arrow. A ring grid's painted strips give way to its
   own face, its widths unchanged. The cell list's chosen item takes the 2 px edge, as the plain list's does. A grid's ink stays
   classic's black where Mertex gives none (it is never marked, and --host-text is navy here), so a cell on a row Mertex coloured
   with a background alone reads as in classic; Mertex's own grid and cell foregrounds are inline and still win. */
:root[data-ui="modern"] .gui-form-mvgrid{color:var(--mv-host-grid-ink)}
:root[data-ui="modern"] .gui-form-mvgrid th{background-color:var(--mv-surface-sunken)!important}
:root[data-ui="modern"] .gui-form-mvgrid :is(td,th):not(.gui-mv-grid-locked){border-color:var(--mv-border)!important}
:root[data-ui="modern"] .gui-form-mvgrid .gui-mv-grid-locked{border-top-color:var(--mv-border)!important;border-bottom-color:var(--mv-border)!important;
  border-left-color:var(--mv-border)!important;box-shadow:inset -1px 0 0 var(--mv-border)!important}
:root[data-ui="modern"] .gui-form-mvgrid[data-mv-grid-frame="line"]{border-color:var(--mv-border-control)!important}
:root[data-ui="modern"] .gui-form-mvgrid[data-mv-grid-frame="ring"]{background-image:none!important;outline-color:var(--mv-border-control)!important}
:root[data-ui="modern"] .gui-mv-grid-choices>[role="option"][aria-selected="true"]{box-shadow:inset 2px 0 0 var(--mv-action)}
/* The grid's cell editing menu (in body, styled inline): a white popover with a hairline, by paint alone. */
:root[data-ui="modern"] [data-grid-edit-menu]{border-color:var(--mv-border)!important;border-radius:var(--mv-radius-md)!important;
  background-color:var(--mv-surface)!important;box-shadow:var(--mv-shadow-3)!important}
:root[data-ui="modern"] [data-grid-edit-menu] button:not(:disabled):hover{background-color:var(--mv-surface-hover)!important;border-radius:var(--mv-radius-sm)!important}
/* The lookup's push buttons are flat in the new look (classic keeps SBClient's raised ones on purpose). Their bevel is the
   stylesheet's (gui-selection.js clears the inline one) but their face is Mertex's inline colour, so the pressed face needs
   !important. The bands, cells, status box, separator, the current row's dotted rectangle and the dotted focus stay. */
:root[data-ui="modern"] [data-selection-button="true"].gui-form-control{box-shadow:inset 0 0 0 1px var(--mv-border-control);border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] [data-selection-button="true"].gui-form-control:active:enabled{box-shadow:inset 0 0 0 1px var(--mv-border-control);
  background-color:var(--mv-host-face-pressed)!important}
/* The calendar: a soft card; its title bar, chosen day, hover and list edges come from the palette. Its Office highlights, its
   12 px Arial and its two dotted focus rectangles stay. */
:root[data-ui="modern"] .gui-calendar-card{border-color:var(--mv-border);border-radius:var(--mv-radius-md);box-shadow:var(--mv-shadow-3)}
/* Mertex's messages: a soft card with a hairline, a white footer, the default choice primary and the others secondary. Every paint
   property an REA .button rule could set is written here for every state, with .gui-dialog-buttons in each selector, so no other
   sheet's cascade decides a Mertex button. Classic's .42 disabled opacity stays. The icon discs follow the bridge. */
:root[data-ui="modern"] .gui-dialog-card{border-radius:var(--mv-radius-lg);box-shadow:0 0 0 1px var(--mv-border),var(--mv-shadow-4)}
:root[data-ui="modern"] .gui-dialog-buttons{background-color:var(--mv-surface);border-top-color:var(--mv-border)}
:root[data-ui="modern"] .gui-dialog-buttons button{border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] .gui-dialog-buttons .button.primary,
:root[data-ui="modern"] .gui-dialog-buttons .button.primary:disabled{background-color:var(--mv-action);border-color:var(--mv-action);
  color:var(--mv-text-on-action);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .gui-dialog-buttons .button.primary:hover:not(:disabled){background-color:var(--mv-action-hover);border-color:var(--mv-action-hover);
  color:var(--mv-text-on-action);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .gui-dialog-buttons .button.primary:active:enabled{background-color:var(--mv-action-pressed);border-color:var(--mv-action-pressed);
  color:var(--mv-text-on-action);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .gui-dialog-buttons .button.secondary,
:root[data-ui="modern"] .gui-dialog-buttons .button.secondary:disabled{background-color:var(--mv-surface);border-color:var(--mv-border);
  color:var(--mv-text-strong);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .gui-dialog-buttons .button.secondary:hover:not(:disabled){background-color:var(--mv-surface-hover);border-color:var(--mv-border);
  color:var(--mv-text-strong);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .gui-dialog-buttons .button.secondary:active:enabled{background-color:var(--mv-surface-active);border-color:var(--mv-border);
  color:var(--mv-text-strong);box-shadow:var(--mv-shadow-1)}
/* CEO windows: the report buttons and the editor's menus by token and radius; the terminal and its rulers stay classic. */
:root[data-ui="modern"] .gui-ceo-report-buttons button{border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] .gui-ceo-editor-menu details>div{border-color:var(--mv-border);border-radius:var(--mv-radius-md);box-shadow:var(--mv-shadow-3)}

/* Decoration behind native controls. Its dimensions come from the current page definition. */
@media screen {
:root[data-ui="modern"] [data-mv-order-panels]{background-color:var(--mv-bg-app)}
:root[data-ui="modern"] [data-mv-order-panel="body"]{background-color:var(--mv-surface);border-radius:var(--mv-radius-md);box-shadow:inset 0 0 0 1px var(--mv-border)}
:root[data-ui="modern"] [data-mv-order-panel="actions"]{background-color:var(--mv-surface-hover);box-shadow:inset 0 1px 0 var(--mv-border)}
}


/* A recognised order document owns its visual layout. The host still owns
   every field, action and keyboard request. Other native windows keep the
   original geometry above. Only the body scrolls while editing an order. */
@media screen {
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] {
  left:max(8px,calc((100% - 1568px) / 2))!important;
  top:8px!important;
  width:min(calc(100% - 16px),1568px)!important;
  height:calc(100% - 16px)!important;
  min-width:0!important;
  min-height:0!important;
  grid-template-areas:"title" "commands" "pages" "document"!important;
  grid-template-rows:auto auto auto minmax(0,1fr);
  background-color:var(--mv-bg-app)!important;
  border-radius:var(--mv-radius-lg);
  outline-color:var(--mv-border);
  box-shadow:0 0 0 1px var(--mv-border),var(--mv-shadow-3)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-window-title {
  grid-area:title!important;
  position:relative;
  left:auto;right:auto;top:auto;
  width:100%;height:auto;min-height:54px;
  box-sizing:border-box;
  padding:8px 16px 8px 22px;
  font:650 24px/1.2 Inter,"Segoe UI",system-ui,sans-serif;
  letter-spacing:-.035em;
  background-color:var(--mv-surface)!important;
  color:var(--mv-text-strong)!important;
  box-shadow:inset 4px 0 0 var(--mv-action)!important;
  border-color:transparent;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-window-title > button {
  width:32px;height:32px;
  border-radius:var(--mv-radius-md);
  color:var(--mv-text-muted);
  font-size:22px;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-window-title > button:hover:enabled {
  background-color:var(--mv-danger-tint);
  color:var(--mv-danger-text);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-window-title > button:focus-visible {
  box-shadow:inset 0 0 0 2px var(--mv-focus)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu {
  grid-area:commands!important;
  align-items:flex-start;
  gap:2px 3px;
  min-height:34px;
  padding:0 16px 4px;
  z-index:3;
  background-color:var(--mv-surface);
  color:var(--mv-text);
  border-color:var(--mv-border-subtle);
  font:500 13px/1.25 Inter,"Segoe UI",system-ui,sans-serif;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > button,
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details > summary {
  padding:6px 8px;
  margin:0;
  border-radius:var(--mv-radius-sm);
  color:var(--mv-text);
  white-space:nowrap;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details {
  position:relative;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details[open]::details-content {
  position:absolute;left:0;top:100%;
  min-width:max-content;max-height:min(48vh,360px);overflow-y:auto;
  padding:4px;
  border-radius:var(--mv-radius-md);
  background-color:var(--mv-surface);
  box-shadow:inset 0 0 0 1px var(--mv-border),var(--mv-shadow-3);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details[open] > summary,
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details > summary:is(:hover,:focus-visible),
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > button:not(:disabled):is(:hover,:focus-visible) {
  background-color:var(--mv-surface-selected);
  color:var(--mv-action);box-shadow:none;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > button[data-grayed="true"],
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu:not(.gui-main-menu) > button:disabled {
  color:var(--mv-text-muted);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details > summary:focus-visible,
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > button:focus-visible {outline-color:var(--mv-focus)}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details > button {
  border:0;border-radius:var(--mv-radius-sm);margin:0;
  font:inherit;padding:6px 10px;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details > button:enabled:hover {background-color:var(--mv-surface-selected)}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-tabs {
  grid-area:pages!important;
  min-height:38px;
  padding:0 20px;
  gap:16px;
  background-color:var(--mv-surface);
  border-color:var(--mv-border);
  box-shadow:none;
  font:600 14px/1.2 Inter,"Segoe UI",system-ui,sans-serif;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-tabs > button {
  padding:8px 3px;
  min-height:38px;
  border-radius:0;
  color:var(--mv-text-muted);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-tabs > button[aria-current="page"] {
  background-color:var(--mv-surface);
  color:var(--mv-action);
  box-shadow:inset 0 -3px 0 var(--mv-action);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-tabs > button:focus-visible {
  outline:2px solid var(--mv-focus);outline-offset:-3px;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > [data-tabset-client] {
  grid-area:document!important;
  z-index:0;
  width:100%!important;height:100%!important;min-height:0;
  overflow:hidden!important;border-bottom-left-radius:var(--mv-radius-lg);border-bottom-right-radius:var(--mv-radius-lg);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] :is([data-mv-document],[data-mv-order-layout="lines"]) {
  left:0!important;top:0!important;width:100%!important;height:100%!important;
  min-width:0!important;min-height:0!important;
  overflow:auto!important;
  scrollbar-gutter:stable;
  scroll-padding:16px;
  background-color:var(--mv-bg-app)!important;
  box-shadow:none!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-control] {
  left:var(--mv-doc-x)!important;top:var(--mv-doc-y)!important;
  width:var(--mv-doc-w)!important;height:var(--mv-doc-h)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part] {
  left:var(--mv-line-x)!important;top:var(--mv-line-y)!important;
  width:var(--mv-line-w)!important;height:var(--mv-line-h)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] :is([data-mv-document-section],[data-mv-order-section]) {
  background-color:var(--mv-surface);
  border-radius:var(--mv-radius-lg);
  box-shadow:inset 0 0 0 1px var(--mv-border),var(--mv-shadow-1);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-section][data-mv-document-current] {
  box-shadow:inset 3px 0 0 var(--mv-action),inset 0 0 0 1px var(--mv-border),var(--mv-shadow-1);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-heading],
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-order-section] > h3 {
  margin:0;padding:12px 16px 0;
  color:var(--mv-text-strong);
  font:650 17px/22px Inter,"Segoe UI",system-ui,sans-serif;
  letter-spacing:-.025em;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-order-section="lines-grid"] > h3 {
  margin:0 14px;padding:12px 2px 31px;
  box-shadow:inset 0 -28px 0 var(--mv-surface-hover);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] :is([data-mv-document-section="actions"],[data-mv-order-section="lines-actions"]) {
  background-color:var(--mv-bg-app);
  border-radius:0;
  box-shadow:inset 0 1px 0 var(--mv-border);
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-control="caption"],
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part$="-label"],
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="column"] {
  font:600 13px/17px Inter,"Segoe UI",system-ui,sans-serif!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-control="caption"][data-mv-order-paint="caption"],
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part$="-label"][data-mv-order-paint="caption"] {
  color:var(--mv-text-muted)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-control="caption"][data-mv-document-key][data-mv-order-paint="caption"] {
  color:var(--mv-text-strong)!important;font-weight:650!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-control="caption"][data-mv-order-field-label][data-mv-order-paint="caption"] {
  background-color:transparent!important;color:var(--mv-action)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-control="value"],
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part$="-value"] {
  font:400 14px/1.25 Inter,"Segoe UI",system-ui,sans-serif!important;
  font-variant-numeric:tabular-nums;
  padding-inline:8px!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-key="order-number"][data-mv-document-control="value"] {
  font-size:17px!important;font-weight:650!important;letter-spacing:-.02em;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-key="customer"][data-mv-document-control="value"] {
  font-size:15px!important;font-weight:600!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] :is([data-mv-document-control="value"],[data-mv-line-part$="-value"])[data-mv-order-paint="reference"] {
  background-color:var(--mv-surface-sunken)!important;
  box-shadow:inset 0 0 0 1px var(--mv-border-subtle)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="column"] {
  font-size:12px!important;font-weight:650!important;
  padding-inline:2px!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="column"][data-mv-order-paint="caption"] {
  background-color:var(--mv-surface-hover)!important;
  color:var(--mv-text)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="cell"] {
  font:400 13px/1.25 Inter,"Segoe UI",system-ui,sans-serif!important;
  font-variant-numeric:tabular-nums;
  padding-inline:clamp(0px,calc((var(--mv-line-w) - 27px)/7),7px)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="cell"][data-mv-order-paint="entry"]:not(:focus) {
  box-shadow:inset -1px -1px 0 var(--mv-border-control)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="cell"][data-mv-line-stripe="even"][data-mv-order-paint="entry"]:not(:focus) {
  background-color:var(--mv-surface-sunken)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="cell"][data-mv-line-current-row][data-mv-order-paint="entry"]:not(:focus) {
  background-color:var(--mv-surface-selected)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="column"][data-mv-order-paint="caption"][data-mv-line-current-column] {
  color:var(--mv-link)!important;box-shadow:inset 0 -2px var(--mv-action)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-position] {
  margin:0 12px;color:var(--mv-text-muted);font-size:12px;font-weight:500;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part="total-value"] {font-weight:650!important}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-line-part$="-value"][data-mv-order-paint="reference"] {
  border-radius:var(--mv-radius-md)!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] [data-mv-document-control="message"] {
  white-space:normal!important;overflow-wrap:anywhere!important;
  font:500 14px/20px Inter,"Segoe UI",system-ui,sans-serif!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] :is([data-mv-document-control="action"],[data-mv-line-part="action"]) {
  font:600 13px/1.2 Inter,"Segoe UI",system-ui,sans-serif!important;
}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] :is([data-mv-document-control="value"],[data-mv-line-part="cell"])[data-mv-order-paint="entry"]:focus:not([readonly]) {
  color:var(--mv-text-strong)!important;
  outline:2px solid var(--mv-focus);outline-offset:1px;
  box-shadow:inset 0 0 0 1px var(--mv-focus)!important;
}
@media (max-width:700px) {
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] {left:0!important;top:0!important;width:100%!important;height:100%!important}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-window-title {min-height:46px;padding:6px 10px 6px 15px;font-size:21px}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu {padding:0 6px 3px;gap:0}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > button,
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-menu > details > summary {padding:5px}
:root[data-ui="modern"] #gui-virtual-desktop [data-mv-order-document] > .gui-form-tabs {padding:0 12px;gap:14px}
}
}

/* Character workflows such as RT Scanner Emulation keep their native cell grid.
   The caption marks which window has keyboard focus, outside the measured client. */
@media screen {
:root[data-ui="modern"] #gui-virtual-desktop .gui-auxiliary-form:has(> [data-ceo-kind="character"]) > .gui-form-window-title {
  background-color:var(--mv-nav);
  color:var(--mv-text-on-nav);
  box-shadow:inset 0 -1px 0 var(--mv-shell-line);
}
:root[data-ui="modern"] #gui-virtual-desktop:not([inert]) .gui-auxiliary-form:not([inert]):has(> [data-ceo-kind="character"]:focus-within) > .gui-form-window-title {
  box-shadow:inset 4px 0 0 var(--mv-shell-accent),inset 0 -2px 0 var(--mv-shell-accent);
}
}
/* Motion: hover and press colours ease in over --mv-dur-fast, colour properties only, and never under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
:root[data-ui="modern"] :is(.gui-lfk-button,.gui-toolbar-button),
:root[data-ui="modern"] [data-gui-comparison="true"]>.gui-form-tabs button{transition:background-color var(--mv-dur-fast) var(--mv-ease),
  border-color var(--mv-dur-fast) var(--mv-ease),color var(--mv-dur-fast) var(--mv-ease)}
}
}

/* Backlog wave 35, the new look: REA's "This page cannot be shown here." box on the gateway page and its Try again
   (docs/design/MODERN-UI.md, sections 13 and 15). Stream 35C owns this file from the wave's base on; the base leaves only this
   comment. The one rule (section 2): every selector begins :root[data-ui="modern"]; on an element that exists in classic a rule
   declares paint only, inside @media (forced-colors: none), with motion only inside a nested @media (prefers-reduced-motion:
   no-preference) and for colour properties only. No literal colour: var(--mv-*), transparent, currentColor, inherit and none
   only. .gui-browser-control is never styled. The gateway serves this sheet only inside /modern.css, the fourth of its six sheets
   in their fixed order (tokens, frame, screens, documents, surfaces, palette), each followed by one line feed. */
@media (forced-colors: none) {
/* The box: a white card (--mv-surface) with a lighter edge at styles.css's own width and style, the control corner and the text
   colour (10.21:1 on white). A decorative warning bar sits inside its left edge, drawn as a shadow so that it needs no box of its
   own; the words carry the meaning. Its ring stays styles.css's, coloured through the bridge's --colour-focus (6.50:1 on white). */
:root[data-ui="modern"] .gui-browser-unavailable{background-color:var(--mv-surface);border-color:var(--mv-border);border-radius:var(--mv-radius-md);
  color:var(--mv-text);box-shadow:inset 3px 0 0 var(--mv-warning-mark)}
/* Its Try again takes the secondary look (13.19:1 on white, 11.78:1 on its hover face), at its classic size, words and states. */
:root[data-ui="modern"] .gui-browser-unavailable .button.secondary{background-color:var(--mv-surface);border-color:var(--mv-border);
  color:var(--mv-text-strong);box-shadow:var(--mv-shadow-1);border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] .gui-browser-unavailable .button.secondary:hover:not([aria-disabled="true"]){background-color:var(--mv-surface-hover)}
}
/* The ledger posting prompt carries its own last-run detail, decision and
   native buttons. The confirmation stays fully readable at browser zoom. */
@media (forced-colors: none) {
  :root[data-ui="modern"] .mv-finance-posting-copy {
    display:block;background-color:var(--mv-surface-sunken);color:var(--mv-text);padding:12px 16px;
    border-radius:var(--mv-radius-md);box-shadow:inset 3px 0 var(--mv-warning-mark);
    line-height:1.55;
  }
  :root[data-ui="modern"] .mv-finance-posting-line[data-mv-posting-line="heading"] {
    color:var(--mv-text-strong);font-size:1rem;font-weight:700;
  }
  :root[data-ui="modern"] .mv-finance-posting-line[data-mv-posting-line="rule"] {
    color:var(--mv-text-muted);font-size:.7em;
  }
  :root[data-ui="modern"] .mv-finance-posting-line[data-mv-posting-line="question"] {
    color:var(--mv-warning-text);font-weight:700;
  }
  /* Keep the host-drawn allocation grid and period/close-date columns in
     place. A trailing rule separates the summary labels from their figures. */
  :root[data-ui="modern"] :is([data-mv-workflow="cash-receipts"],[data-mv-workflow="cash-receipts-legacy"]) [data-mv-workflow-group="2"][data-mv-workflow-part="caption"] {
    box-shadow:inset -2px 0 var(--mv-action)!important;
  }
  :root[data-ui="modern"] [data-mv-workflow="period-end-details"] [data-mv-workflow-group="1"][data-mv-workflow-part="caption"] {
    box-shadow:inset 0 -1px var(--mv-border)!important;
  }
  /* Account number and currency appear on both sides of a bank transfer.
     Native colour-tuple recognition preserves special host inks and faces. */
  :root[data-ui="modern"] [data-mv-workflow="bank-transfer"][data-mv-workflow-layout] > [data-mv-order-paint="caption"] {
    color:var(--mv-text-muted)!important;
  }
  :root[data-ui="modern"] [data-mv-workflow="bank-transfer"][data-mv-workflow-layout] > [data-mv-order-paint="reference"] {
    color:var(--mv-text)!important;background-color:var(--mv-surface-sunken)!important;
  }
}

/* Backlog wave 35, the new look: REA's dialogs, cards, notices, viewers, the stage's REA panels and the on-screen keys
   (docs/design/MODERN-UI.md, sections 9 and 16). Stream 35D owns this file from the wave's base on. The one rule (section 2):
   every selector begins :root[data-ui="modern"] and passes through an REA anchor; on an element that exists in classic a rule
   declares paint only, inside @media (forced-colors: none), with motion only inside a nested @media
   (prefers-reduced-motion: no-preference) and for colour properties only. No literal colour: var(--mv-*), transparent,
   currentColor, inherit and none only. The gateway serves this sheet only inside /modern.css, the fifth of its six sheets in their
   fixed order (tokens, frame, screens, documents, surfaces, palette), each followed by one line feed.
   Most of the look comes from the tokens sheet's bridge, which re-points styles.css's P4 tokens; this sheet overrides only
   styles.css's literal colours and the deliberate differences (white dialog footers, the light stage, the larger corners of the
   sign-in, Log in to Mertex and start-up cards, keycaps, the notices' white faces). The prefix weighs (0,2,0), so a classic rule
   that ties is overridden with its own selector, written out (Enter's keys), never with !important; !important appears only on the
   workbook viewer's frame, whose colours are inline. styles.css's button, label, input, select and textarea rules also reach
   Mertex's fields and the text screen, so no rule here uses a bare element type, and the .button family is written only under the
   REA anchor group, because Mertex's messages and the unavailable box's Try again carry .button too. Nothing here may give the
   five self-proving surfaces (the mail card, the file chooser, the workbook viewer, the report text and the PDF or picture preview)
   or an ancestor of them opacity, visibility, display, an animation or @starting-style (section 16.2). test/modern-surfaces-css
   .test.mts holds the anchors and every rule's proof. */
@media (forced-colors: none) {
/* Customer Help owns these dialog boxes. Its controls come from the classic page and keep their listeners. */
:root[data-ui="modern"] #support-dialog[data-help-layout] {
  width: min(680px, calc(100vw - 32px));
  border-radius: var(--mv-radius-xl);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .dialog-heading {
  padding: 16px clamp(14px, 3vw, 24px);
  background-color: var(--mv-navy);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .dialog-heading .eyebrow {
  color: var(--mv-text-on-nav-muted);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #support-title {
  color: var(--mv-text-on-nav);
  font-size: 24px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .dialog-body {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px clamp(10px, 3vw, 22px);
  background-color: var(--mv-bg-app);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-section-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] :is(.support-extra, #customer-ui-look-row) {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--mv-border);
  border-radius: var(--mv-radius-lg);
  background-color: var(--mv-surface);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] :is(h3, legend) {
  color: var(--mv-text-strong);
  font-size: 15px;
  font-weight: 650;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-ui-look-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 16px;
  border-inline-start: 4px solid var(--mv-action);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-ui-look-row h3 {
  margin: 0;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-ui-look-help {
  grid-column: 1;
  margin: 0;
  color: var(--mv-text-muted);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-ui-look {
  grid-column: 2;
  grid-row: 1 / span 2;
  white-space: normal;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-settings legend {
  float: left;
  width: 100%;
  margin: 0 0 8px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-settings legend + label {
  display: flex;
  clear: both;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-settings .support-setting {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--mv-border-subtle);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-settings .field-help {
  margin: 2px 0 0;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-text-size {
  min-width: 0;
  max-width: 100%;
}
@media (min-width: 521px) {
  :root[data-ui="modern"] #support-dialog[data-help-layout] .support-setting:has(> #customer-text-size) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  :root[data-ui="modern"] #support-dialog[data-help-layout] #customer-text-size {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #support-settings-status:has(.dialog-status-text:empty) {
  margin: 0;
  min-height: 0;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-saved-login-section {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-saved-login-section :is(h3, p) {
  flex: 1 1 100%;
  margin: 0;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #customer-saved-login-section :is(#customer-saved-login, #customer-forget-login) {
  max-width: 100%;
  white-space: normal;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] summary {
  cursor: pointer;
  color: var(--mv-action);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] summary:focus-visible {
  outline: var(--focus-ring-width) solid var(--mv-focus);
  outline-offset: var(--focus-ring-offset);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] summary h3 {
  display: inline;
  margin-inline-start: 4px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-shortcuts {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0 18px;
  margin-top: 8px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-shortcuts li {
  padding-block: 6px;
  border-top: 1px solid var(--mv-border-subtle);
}
:root[data-ui="modern"] #support-dialog[data-help-layout] .support-shortcuts kbd {
  min-width: 0;
  padding: 2px 6px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #support-details {
  margin-top: 10px;
}
:root[data-ui="modern"] #support-dialog[data-help-layout] #support-sessions {
  margin-inline-end: auto;
}
@media (max-width: 520px) {
  :root[data-ui="modern"] #support-dialog[data-help-layout] #customer-ui-look-row {
    grid-template-columns: minmax(0, 1fr);
  }
  :root[data-ui="modern"] #support-dialog[data-help-layout] #customer-ui-look {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    margin-top: 6px;
  }
}
/* 9.1 Buttons: primary green-dark with white words, secondary white with a hairline, subtle a ghost. A rest rule here outranks
   classic's hover, so each hover and press is restated. Disabled keeps classic's .42 with no rule. */
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.primary{background-color:var(--mv-action);border-color:var(--mv-action);color:var(--mv-text-on-action);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.primary:hover{background-color:var(--mv-action-hover);border-color:var(--mv-action-hover)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.primary:active{background-color:var(--mv-action-pressed);border-color:var(--mv-action-pressed)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.secondary{background-color:var(--mv-surface);border-color:var(--mv-border);color:var(--mv-text-strong);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.secondary:not(:disabled):hover{background-color:var(--mv-surface-sunken)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.secondary:not(:disabled):active{background-color:var(--mv-surface-active)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.subtle{background-color:transparent;border-color:transparent;color:var(--mv-text-strong)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.subtle:not(:disabled):hover{background-color:var(--mv-surface-hover)}
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button.subtle:not(:disabled):active{background-color:var(--mv-surface-active)}
/* 9.3 REA's own fields, under their anchors only: a white face, the 4.21:1 control edge, a darker edge under the pointer and a
   sunken face while read-only (the copy boxes and the mail card's fields). Check boxes take the bridge's accent; the file input
   keeps the bridge's sunken face and dashed edge, and its button takes the secondary look. */
:root[data-ui="modern"] :is(.dialog,.gui-login-form,.empty-card,.gui-blocked-panel,.report-window,.mail-card,.file-dialog,.check-page) :is(input:not([type=checkbox],[type=radio],[type=file]),select,textarea){background-color:var(--mv-surface);border-color:var(--mv-border-control);color:var(--mv-text)}
:root[data-ui="modern"] :is(.dialog,.gui-login-form,.empty-card,.gui-blocked-panel,.report-window,.mail-card,.file-dialog,.check-page) :is(input:not([type=checkbox],[type=radio],[type=file]),select,textarea):hover:not(:disabled,[readonly]){border-color:var(--mv-grey-700)}
:root[data-ui="modern"] :is(.dialog,.gui-login-form,.empty-card,.gui-blocked-panel,.report-window,.mail-card,.file-dialog,.check-page) :is(input:not([type=checkbox],[type=radio],[type=file]),textarea)[readonly]{background-color:var(--mv-surface-sunken)}
:root[data-ui="modern"] :is(.dialog,.gui-login-form,.empty-card,.gui-blocked-panel,.report-window,.mail-card,.file-dialog,.check-page) label{color:var(--mv-text)}
/* An error line on its tint, except the sign-in card's and Log in to Mertex's, which classic draws with no background. */
:root[data-ui="modern"] :is(#connect-dialog,#saved-login-dialog,.gui-login-form) .form-error{background-color:var(--mv-danger-tint);color:var(--mv-danger-text)}
:root[data-ui="modern"] .file-dialog input[type=file]::file-selector-button{background-color:var(--mv-surface);border-color:var(--mv-border);color:var(--mv-text-strong);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .file-dialog input[type=file]:enabled::file-selector-button:hover{background-color:var(--mv-surface-sunken)}
/* 9.5 Keycaps: Help's shortcut keys and the text-screen note's keys and prompt. Their 1 px border, padding and font stay. */
:root[data-ui="modern"] #support-dialog .support-shortcuts kbd,:root[data-ui="modern"] .notice-card.text-screen-note :is(kbd,samp){background-color:var(--mv-grey-50);border-color:var(--mv-border);box-shadow:inset 0 -1px 0 var(--mv-border-key);border-radius:var(--mv-radius-sm);color:var(--mv-text)}
/* 9.6 This window's pill in Sessions, and Sessions' rows: their hairline, a smaller corner and a hover face. */
:root[data-ui="modern"] #sessions-dialog .sessions-row{border-color:var(--mv-border);border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] #sessions-dialog .sessions-row:hover{background-color:var(--mv-surface-hover)}
:root[data-ui="modern"] #sessions-dialog .sessions-row .sessions-here{border-radius:var(--mv-radius-pill);background-color:var(--mv-action-tint);color:var(--mv-success)}
/* 9.11 Dialogs and cards. The bridge gives the shared dialog its edge, corners, shadow, backdrop and text; its footer is white. */
:root[data-ui="modern"] .dialog .dialog-actions:not(.dialog-actions--inline){background-color:var(--mv-surface)}
:root[data-ui="modern"] :is(#auth-dialog,#mertex-login-dialog){border-radius:var(--mv-radius-xl)}
:root[data-ui="modern"] .startup-card .startup-card-inner{border-radius:var(--mv-radius-xl);box-shadow:var(--mv-shadow-3)}
/* The start, ended and stopped cards have no border in classic: their hairline is a box-shadow spread, before their shadow. */
:root[data-ui="modern"] .end-user .empty-card{box-shadow:0 0 0 1px var(--mv-border),var(--mv-shadow-3)}
:root[data-ui="modern"] .gui-blocked-panel{box-shadow:0 0 0 1px var(--mv-border),var(--mv-shadow-3)}
:root[data-ui="modern"] .gui-blocked-panel .gui-blocked-help{color:var(--mv-text-muted);border-top-color:var(--mv-border)}
:root[data-ui="modern"] .gui-blocked-panel .gui-blocked-dropped{border-left-color:var(--mv-info);color:var(--mv-text)}
/* 9.13 The light working area: every stage state but the text screen (white in classic, and kept) and the Wyse 60 grid (its dark
   scroll bar cannot change) becomes the app background with a hairline, and its ring re-points to green-dark, because the stage
   carries the on-dark ring colour (styles.css .sidebar,.terminal-stage), which is 2.43:1 here. That one declaration reaches every
   ring on the stage: the stage's own, the start buttons, the SB+ login panel, the reconnect card and Mertex's controls, which the
   bridge already gives the same green-dark. */
:root[data-ui="modern"] .terminal-stage:not(.text-screen-active):not(.legacy-grid){background-color:var(--mv-bg-app);background-image:none;border-color:var(--mv-border);--focus-ring-colour:var(--mv-focus)}
/* The Wyse 60 grid's class stays on the stage once its session has gone (app.js sets it only while a text screen fits), so the
   start and ended card would sit on a stage whose edge and ring are the dark stage's. Behind that card there is no grid and no
   scroll bar, so the stage takes the light working area there too. */
:root[data-ui="modern"] .terminal-stage.legacy-grid:not(.text-screen-active):has(>#terminal-empty:not([hidden])){background-color:var(--mv-bg-app);background-image:none;border-color:var(--mv-border);--focus-ring-colour:var(--mv-focus)}
:root[data-ui="modern"] .terminal-empty{background-color:var(--mv-bg-app);background-image:none;color:var(--mv-text-strong);--focus-ring-colour:var(--mv-focus)}
/* The developer view's start and ended text (its card is display:contents), which classic draws light on the dark stage. The
   customer view's connection line keeps its own error colour. */
:root[data-ui="modern"] .terminal-empty :is(p,small):not(.customer-connect-status){color:var(--mv-text-muted)}
:root[data-ui="modern"] .terminal-empty .empty-symbol{color:var(--mv-action);border-color:var(--mv-border);background-color:var(--mv-surface)}
:root[data-ui="modern"] .gui-login-panel :is(.gui-login-form,.gui-login-waiting){color:var(--mv-text)}
:root[data-ui="modern"] .gui-login-panel .gui-login-status{color:var(--mv-text-muted)}
/* The busy outline, 3.41:1 on the light stage, in every state; the text screen's frame keeps its white and its --host-edge edge. */
:root[data-ui="modern"] .terminal-stage.key-busy{outline-color:var(--mv-warning-mark)}
:root[data-ui="modern"] .terminal-stage.text-screen-active{box-shadow:var(--mv-shadow-1)}
/* 9.12 Notices: white cards with a hairline, the tone their 3 px left edge and their title's words. The shadow and the ring
   (inside the card's edge) are the bridge's and classic's; the layer's place and gaps stay. */
:root[data-ui="modern"] .notice-card{background-color:var(--mv-surface);border-color:var(--mv-border);border-left-color:var(--mv-info);color:var(--mv-text)}
:root[data-ui="modern"] .notice-card[data-tone="warning"]{border-left-color:var(--mv-warning-mark)}
:root[data-ui="modern"] .notice-card:is([data-tone="error"],.error,[data-kind="refusal"]){border-left-color:var(--mv-danger)}
:root[data-ui="modern"] .notice-card .notice-card-title{color:var(--mv-text-strong)}
:root[data-ui="modern"] .notice-card :is(.gui-wait-notice-reference,.dropped-call-reference,.tell-notice-reference){color:var(--mv-text-muted)}
/* 9.15 The report window: its names and tools in the strong text, the tools as ghosts with a hairline, Download filled, rows with a
   hover face, the desk the app background and the pages' shadows the report shadow. The paper stays white with its own ink, and
   the HTML report frame, Find's marks and the PDF text layer are never named. */
:root[data-ui="modern"] .report-window :is(.report-window-title,.report-list-name){color:var(--mv-text-strong)}
:root[data-ui="modern"] .report-window .report-button{background-color:transparent;border-color:var(--mv-border);color:var(--mv-text-strong)}
:root[data-ui="modern"] .report-window .report-button:hover{background-color:var(--mv-surface-hover);border-color:var(--mv-border)}
:root[data-ui="modern"] .report-window .report-button:active{background-color:var(--mv-surface-active)}
:root[data-ui="modern"] .report-window .report-window-actions .report-download{background-color:var(--mv-action);border-color:var(--mv-action);color:var(--mv-text-on-action)}
:root[data-ui="modern"] .report-window .report-window-actions .report-download:hover{background-color:var(--mv-action-hover);border-color:var(--mv-action-hover)}
:root[data-ui="modern"] .report-window .report-window-actions .report-download:active{background-color:var(--mv-action-pressed);border-color:var(--mv-action-pressed)}
:root[data-ui="modern"] .report-window .report-list-row{border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] .report-window .report-list-row:hover{background-color:var(--mv-surface-hover);border-color:var(--mv-border)}
:root[data-ui="modern"] .report-window .report-file-badge{background-image:none;border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] .report-window :is(.report-preview,.report-pdf-controls){background-color:var(--mv-bg-app)}
:root[data-ui="modern"] .report-window .report-tool-group{background-color:var(--mv-surface);border-color:var(--mv-border);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] .report-window .report-tool:not([aria-pressed="true"]){color:var(--mv-text-strong)}
:root[data-ui="modern"] .report-window .report-tool:hover:not(:disabled){background-color:var(--mv-surface-hover)}
:root[data-ui="modern"] .report-window :is(.report-page-label,.report-zoom-label,.report-find-status,.report-preview-message){color:var(--mv-text)}
:root[data-ui="modern"] .report-window :is(.report-pdf-page,.report-text-page,.report-html-page,.report-image){box-shadow:var(--mv-shadow-2)}
/* The workbook viewer's frame only: it is styled inline, so its edge, shadow and text colour take !important; never a cell, its
   table, its viewport or a box, and its plain buttons stay native (colouring one shows the browser's outset border). */
:root[data-ui="modern"] dialog.workbook-viewer{border-color:var(--mv-border)!important;box-shadow:var(--mv-shadow-4)!important;color:var(--mv-text)!important;border-radius:var(--mv-radius-lg)}
/* 9.14 On-screen keys as keycaps, their foot drawn inside (an outer foot is cut by the customer's scrolling key row). Heights,
   widths, padding, gaps and fonts stay classic's, so the strips stay 40 px (52 px on touch). Enter is primary, written out after
   the generic rules, because a generic key rule ties with classic's Enter and would un-fill it. */
:root[data-ui="modern"] :is(.gui-field-keys,.key-controls) button{background-color:var(--mv-surface);border-color:var(--mv-border);box-shadow:inset 0 -1px 0 var(--mv-border-key);border-radius:var(--mv-radius-md);color:var(--mv-text)}
:root[data-ui="modern"] :is(.gui-field-keys,.key-controls) button:not(:disabled):hover{background-color:var(--mv-surface-hover);color:var(--mv-text-strong)}
:root[data-ui="modern"] :is(.gui-field-keys,.key-controls) button:not(:disabled):active{background-color:var(--mv-surface-active);box-shadow:none}
:root[data-ui="modern"] :is(.gui-field-keys button[data-gui-field-key="Enter"],.key-controls button.enter-key){background-color:var(--mv-action);border-color:var(--mv-action);box-shadow:inset 0 -1px 0 var(--mv-action-pressed);color:var(--mv-text-on-action)}
:root[data-ui="modern"] :is(.gui-field-keys button[data-gui-field-key="Enter"],.key-controls button.enter-key):not(:disabled):hover{background-color:var(--mv-action-hover);border-color:var(--mv-action-hover);color:var(--mv-text-on-action)}
:root[data-ui="modern"] :is(.gui-field-keys button[data-gui-field-key="Enter"],.key-controls button.enter-key):not(:disabled):active{background-color:var(--mv-action-pressed);border-color:var(--mv-action-pressed);box-shadow:none}
/* The network check (network-check.html): its result rows and its state pills, a tint with its ink beside the check's name. */
:root[data-ui="modern"] .check-page .check-results li{border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] .check-page .check-results .check-state{border-radius:var(--mv-radius-pill);background-color:var(--mv-grey-100);color:var(--mv-text-muted)}
:root[data-ui="modern"] .check-page .check-results li[data-state="pass"] .check-state{background-color:var(--mv-action-tint);border-color:var(--mv-action-tint);color:var(--mv-action)}
:root[data-ui="modern"] .check-page .check-results li[data-state="fail"] .check-state{background-color:var(--mv-danger-tint);color:var(--mv-danger-text)}
/* Hover and press colour changes take the fast duration, colours only, and nothing moves under reduce. */
@media (prefers-reduced-motion: no-preference) {
:root[data-ui="modern"] :is(.dialog,.startup-card,.empty-card,.gui-blocked-panel,.session-reconnect,.gui-login-panel,.notice-card,.report-window,.mail-card,.file-dialog,.check-page) .button,:root[data-ui="modern"] :is(.gui-field-keys,.key-controls) button,:root[data-ui="modern"] .report-window :is(.report-button,.report-tool,.report-list-row),:root[data-ui="modern"] #sessions-dialog .sessions-row{transition:background-color var(--mv-dur-fast) var(--mv-ease),border-color var(--mv-dur-fast) var(--mv-ease),color var(--mv-dur-fast) var(--mv-ease)}
}
}

/* Backlog wave 35, the new look: the navy drawer, the command palette, Help's runtime shortcut row and the developer console's
   paint (docs/design/MODERN-UI.md, sections 11.3, 11.4, 11.5 and 12). Stream 35E owns this file from the wave's base on. The one
   rule (section 2): every selector begins :root[data-ui="modern"]; on an element that exists in classic (the developer shell, Help's
   shortcut list) a rule declares paint only, inside @media (forced-colors: none), with motion only inside a nested
   @media (prefers-reduced-motion: no-preference) and for colour properties only; only the new mv- dialogs and Help's runtime row
   have a layout of their own, written in literal px. No literal colour: var(--mv-*), transparent, currentColor, inherit and none
   only. Nothing here names .customer-bar or anything in it. The gateway serves this sheet only inside /modern.css, the sixth and
   last of its six sheets in their fixed order (tokens, frame, screens, documents, surfaces, palette), each followed by one line
   feed.
   Help's runtime row (li.mv-shortcut) takes Help's own list and keycap rules, so nothing here names it. Every developer rule passes
   through body:not(.end-user): the customer view's body carries end-user (applyEndUserShell), so none of them can match there. */

/* The drawer and the palette: their own layout, in literal px so that it holds in forced colours, where the --mv-* tokens do not
   exist. Both are modal dialogs over the page, never docked: the stage, and the desktop size Mertex is told, never change. */
:root[data-ui="modern"] #mv-drawer{box-sizing:border-box;position:fixed;inset:0 auto 0 0;width:min(240px,calc(100vw - 48px));max-width:none;height:100%;max-height:none;margin:0;padding:8px;border:0 solid;overflow:auto;overscroll-behavior:contain;font-size:13px;line-height:1.4}
:root[data-ui="modern"] #mv-drawer[open]{display:flex;flex-direction:column;justify-content:space-between;gap:8px}
:root[data-ui="modern"] .mv-drawer-rows,:root[data-ui="modern"] .mv-drawer-foot{display:flex;flex-direction:column;gap:2px;flex:none}
:root[data-ui="modern"] .mv-drawer-foot{padding-top:8px;border-top:1px solid}
:root[data-ui="modern"] .mv-drawer-row{display:flex;align-items:center;gap:10px;box-sizing:border-box;width:100%;height:36px;min-height:36px;flex:none;margin:0;padding:0 12px;border:0;font-size:13px;line-height:1.4;text-align:left;white-space:nowrap;outline-offset:-2px}
:root[data-ui="modern"] .mv-drawer-icon{flex:none;width:16px;height:16px}
:root[data-ui="modern"] .mv-drawer-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
:root[data-ui="modern"] .mv-drawer-detail{flex:none;font-size:12px}
:root[data-ui="modern"] .mv-drawer-current{font-weight:600}
/* The bar's search button hides at 400 px and below; only there does the drawer offer the palette instead. */
@media (min-width:401px){
:root[data-ui="modern"] .mv-drawer-search{display:none}
}
:root[data-ui="modern"] #mv-palette{box-sizing:border-box;position:fixed;inset:0 0 auto;width:min(640px,calc(100vw - 32px));max-width:none;height:auto;max-height:calc(100% - 12vh - 16px);margin:12vh auto 0;padding:0;border:1px solid;overflow:auto;overscroll-behavior:contain;font-size:13px;line-height:1.4}
:root[data-ui="modern"] #mv-palette[open]{display:flex;flex-direction:column}
:root[data-ui="modern"] .mv-palette-search{display:flex;align-items:center;gap:10px;box-sizing:border-box;height:48px;flex:none;padding:0 16px;border-bottom:1px solid}
:root[data-ui="modern"] .mv-palette-icon{flex:none;width:16px;height:16px}
:root[data-ui="modern"] .mv-palette-input{flex:1 1 auto;box-sizing:border-box;width:auto;min-width:0;height:32px;min-height:0;margin:0;padding:0 4px;border:0;font-size:15px;line-height:1.4}
:root[data-ui="modern"] .mv-palette-list{box-sizing:border-box;flex:0 1 auto;min-height:0;max-height:min(60vh,420px);overflow:auto;overscroll-behavior:contain;padding:4px 8px 8px}
:root[data-ui="modern"] .mv-palette-group-label{padding:8px 8px 4px;font-size:12px;font-weight:600;line-height:1.4}
:root[data-ui="modern"] .mv-palette-option{display:flex;align-items:center;gap:10px;box-sizing:border-box;height:36px;padding:0 8px;font-size:13px;line-height:1.4;white-space:nowrap;cursor:default}
:root[data-ui="modern"] .mv-palette-name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
:root[data-ui="modern"] .mv-palette-keys{display:flex;flex:none;gap:4px}
:root[data-ui="modern"] .mv-palette .mv-keycap{display:inline-flex;align-items:center;box-sizing:border-box;height:18px;padding:0 6px;border:1px solid;font:inherit;font-size:12px;line-height:1}
:root[data-ui="modern"] .mv-palette-empty{margin:0;padding:24px;font-size:13px;line-height:1.4;text-align:center}
:root[data-ui="modern"] .mv-palette-empty:not([hidden]){display:flex;flex-direction:column;align-items:center;gap:12px}

@keyframes mv-drawer-in{from{opacity:0;transform:translateX(-8px)}}
@keyframes mv-palette-in{from{opacity:0;transform:translateY(-8px)}}

@media (forced-colors: none) {
/* The drawer: navy, white words, the current row marked by its face and a 3 px green bar, rings inside each row on navy. */
:root[data-ui="modern"] #mv-drawer{--focus-ring-colour:var(--mv-focus-on-nav);background-color:var(--mv-nav);color:var(--mv-text-on-nav);box-shadow:var(--mv-shadow-4)}
:root[data-ui="modern"] #mv-drawer::backdrop{background-color:var(--mv-backdrop)}
:root[data-ui="modern"] .mv-drawer-foot{border-top-color:var(--mv-nav-hover)}
:root[data-ui="modern"] .mv-drawer-row{background-color:transparent;color:var(--mv-text-on-nav);border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] button.mv-drawer-row:hover{background-color:var(--mv-nav-hover)}
:root[data-ui="modern"] .mv-drawer-current{background-color:var(--mv-nav-current);box-shadow:inset 3px 0 0 var(--mv-accent-on-nav)}
:root[data-ui="modern"] .mv-drawer-detail{color:var(--mv-text-on-nav-muted)}
/* The palette: white, a hairline, the largest shadow; the active option is a face plus a 2 px green-dark edge (the face alone is
   1.16:1 on white). */
:root[data-ui="modern"] #mv-palette{--focus-ring-colour:var(--mv-focus);background-color:var(--mv-surface);color:var(--mv-text);border-color:var(--mv-border);border-radius:var(--mv-radius-lg);box-shadow:var(--mv-shadow-4)}
:root[data-ui="modern"] #mv-palette::backdrop{background-color:var(--mv-backdrop)}
:root[data-ui="modern"] .mv-palette-search{border-bottom-color:var(--mv-border);color:var(--mv-text-muted)}
:root[data-ui="modern"] .mv-palette-input{background-color:transparent;color:var(--mv-text-strong);caret-color:var(--mv-text-strong);border-radius:var(--mv-radius-sm)}
:root[data-ui="modern"] .mv-palette-input::placeholder{color:var(--mv-text-muted)}
:root[data-ui="modern"] .mv-palette-group-label{color:var(--mv-text-muted)}
:root[data-ui="modern"] .mv-palette-option{background-color:transparent;color:var(--mv-text);border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] .mv-palette-option .mv-palette-icon{color:var(--mv-text-muted)}
:root[data-ui="modern"] .mv-palette-option-active{background-color:var(--mv-surface-active);box-shadow:inset 2px 0 0 var(--mv-action)}
:root[data-ui="modern"] .mv-palette .mv-keycap{background-color:var(--mv-grey-50);border-color:var(--mv-border);box-shadow:inset 0 -1px 0 var(--mv-border-key);border-radius:var(--mv-radius-sm);color:var(--mv-text)}
:root[data-ui="modern"] .mv-palette-empty{color:var(--mv-text-muted)}

/* The developer console (section 11.5), by paint only and only in the developer view: every width, height and breakpoint is
   classic's. The sidebar's navy and its on-navy ring come through the bridge as well; they are said here once more. */
:root[data-ui="modern"] body:not(.end-user) .sidebar{--focus-ring-colour:var(--mv-focus-on-nav);background-color:var(--mv-nav);color:var(--mv-text-on-nav-muted)}
:root[data-ui="modern"] body:not(.end-user) .sidebar .nav-item{color:var(--mv-text-on-nav-muted)}
:root[data-ui="modern"] body:not(.end-user) .sidebar .nav-item:hover{background-color:var(--mv-nav-hover);color:var(--mv-text-on-nav)}
:root[data-ui="modern"] body:not(.end-user) .sidebar .nav-item.active{background-color:var(--mv-nav-current);color:var(--mv-text-on-nav);box-shadow:inset 3px 0 0 var(--mv-accent-on-nav)}
:root[data-ui="modern"] body:not(.end-user) .sidebar .nav-item.active>span{color:var(--mv-accent-on-nav)}
:root[data-ui="modern"] body:not(.end-user) .session-tabs .session-tab.active{background-color:var(--mv-surface);border-color:var(--mv-border);color:var(--mv-text-strong)}
:root[data-ui="modern"] body:not(.end-user) .toolbar-more-menu .toolbar-menu-item:hover:not(:disabled){background-color:var(--mv-surface-hover)}
:root[data-ui="modern"] body:not(.end-user) .topbar{border-bottom-color:var(--mv-border);color:var(--mv-text-strong)}
:root[data-ui="modern"] body:not(.end-user) .intro-row{color:var(--mv-text-strong)}
:root[data-ui="modern"] body:not(.end-user) .session-tabs{background-color:var(--mv-surface-sunken);border-bottom-color:var(--mv-border)}
:root[data-ui="modern"] body:not(.end-user) .terminal-toolbar{color:var(--mv-text)}
:root[data-ui="modern"] body:not(.end-user) .workspace-expand{background-color:var(--mv-surface);border-color:var(--mv-border);color:var(--mv-text-strong);border-radius:var(--mv-radius-md);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] body:not(.end-user) .workspace-expand:hover{background-color:var(--mv-surface-sunken)}
:root[data-ui="modern"] body:not(.end-user) .workspace-expand:active{background-color:var(--mv-surface-active)}
:root[data-ui="modern"] body:not(.end-user) .toolbar-more[aria-expanded="true"]{background-color:var(--mv-action-tint);border-color:var(--mv-action);color:var(--mv-success)}
:root[data-ui="modern"] body:not(.end-user) .toolbar-more-menu{background-color:var(--mv-surface);border-color:var(--mv-border);color:var(--mv-text);border-radius:var(--mv-radius-md);box-shadow:var(--mv-shadow-3)}
:root[data-ui="modern"] body:not(.end-user) .icon-button{color:var(--mv-text-muted);border-radius:var(--mv-radius-md)}
:root[data-ui="modern"] body:not(.end-user) .icon-button:hover{background-color:var(--mv-surface-hover)}
:root[data-ui="modern"] body:not(.end-user) .card{background-color:var(--mv-surface);border-color:var(--mv-border);color:var(--mv-text);border-radius:var(--mv-radius-lg);box-shadow:var(--mv-shadow-1)}
:root[data-ui="modern"] body:not(.end-user) .context-column{color:var(--mv-text)}
:root[data-ui="modern"] body:not(.end-user) .tag{background-color:var(--mv-grey-100);color:var(--mv-text-muted);border-radius:var(--mv-radius-pill)}
:root[data-ui="modern"] body:not(.end-user) .tag.teal{background-color:var(--mv-action-tint);color:var(--mv-success)}
:root[data-ui="modern"] body:not(.end-user) .text-button{color:var(--mv-link)}

@media (prefers-reduced-motion: no-preference) {
/* The dialogs come in from 8 px away with opacity; hover faces change colour only. Nothing moves under reduce. */
:root[data-ui="modern"] #mv-drawer[open]{animation:mv-drawer-in var(--mv-dur) var(--mv-ease-in)}
:root[data-ui="modern"] #mv-palette[open]{animation:mv-palette-in var(--mv-dur) var(--mv-ease-in)}
:root[data-ui="modern"] button.mv-drawer-row,:root[data-ui="modern"] .mv-palette-option{transition:background-color var(--mv-dur-fast) var(--mv-ease)}
:root[data-ui="modern"] body:not(.end-user) .workspace-expand{transition:background-color var(--mv-dur-fast) var(--mv-ease),border-color var(--mv-dur-fast) var(--mv-ease),color var(--mv-dur-fast) var(--mv-ease)}
:root[data-ui="modern"] body:not(.end-user) .icon-button{transition:background-color var(--mv-dur-fast) var(--mv-ease)}
}
}

/* Forced colours: the tokens do not exist here, so the new chrome uses system colours only, and its rings stay outlines that the
   system draws. Every existing element draws exactly as in classic. */
@media (forced-colors: active) {
:root[data-ui="modern"] #mv-drawer,:root[data-ui="modern"] #mv-palette{background-color:Canvas;color:CanvasText;border-color:CanvasText}
:root[data-ui="modern"] #mv-drawer{border-right-width:1px}
:root[data-ui="modern"] .mv-drawer-row,:root[data-ui="modern"] .mv-palette-option{background-color:Canvas;color:ButtonText}
:root[data-ui="modern"] .mv-drawer-current,:root[data-ui="modern"] .mv-palette-option-active{background-color:Highlight;color:HighlightText}
:root[data-ui="modern"] .mv-drawer-foot,:root[data-ui="modern"] .mv-palette-search,:root[data-ui="modern"] .mv-palette .mv-keycap{border-color:CanvasText}
}

