/* uxoneweb.css — the UxOneWeb renderer's checked-in static stylesheet (Docs/123 chrome row,
   item 6 — owner-discussed design, binding).

   THE ONE COPY OF THIS FILE YOU MAY EDIT LIVES AT Web/UxOneWeb/wwwroot/uxoneweb.css (GH #730).
   Ux1Web's build copies it to Web/Ux1Web/wwwroot/css/uxoneweb.css, which is gitignored and
   OVERWRITTEN on every build — so an edit made there survives until the next build and then
   vanishes, with nothing to say it did. This banner is deliberately in the SOURCE rather than
   prepended to the copy: the copy is byte-identical, so it carries the warning to exactly the
   reader who needs it, and the two files stay comparable with no machinery to strip a header.
   If you are reading this under Samples/, close it and open the path above.

   SCOPE RULES (Docs/122 §5.2):
   - Leaf/chrome INTERNALS only — CSS never does region layout. Region geometry is the §18
     kernel's, transcribed as absolute positions by WebLayoutControl. Flex here appears only
     inside renderer chrome (back band, dialogs, cards, adorned-host rows) — the same place
     Android uses LinearLayout for chrome composition.
   - Class-based: controls add classes; dynamic PER-INSTANCE values (kernel rects, severity
     accents resolved per notification, solved strip visibility) stay inline via setStyle.
     This file is never generated.
   - Density seam: the custom properties below are set ONCE at boot from Ux1Metrics + the
     neutral Ux1SeverityAccentPalette via WebThemeSeam.ApplyRootProperties (the façade's
     SetRootStyleProperty). Everything margin-shaped in this file derives from
     --ttr-margin-base with the Ux1MarginSize multipliers (Half .5 / Default 1.5 / Largest 2 /
     Triple 3) — no absolute px except hairline borders.

   The head copies this file into its wwwroot (css/uxoneweb.css) the same way it copies
   uxoneweb.js — single source here, never edit the copy. */

:root {
    /* Boot-time defaults; WebThemeSeam re-stamps these from the live Ux1Metrics + palette.
       Values here only cover the window before the runtime boots (nothing renders then). */
    --ttr-font-size: 14px;
    --ttr-margin-base: 4px;
    /* Resolved font family (GH #197 — user pref ?? the active theme's text.fontFamily, completed
       with web's metric-compatible fallback tail). Re-stamped by WebThemeSeam at boot, on every
       theme switch and on every metrics-axes generation. The literal here only covers the window
       before the runtime boots; it must stay equal to WebMeasurementService.DefaultFontFamilyStack. */
    --ttr-font-family: "Segoe UI", Selawik, system-ui, sans-serif;
    /* chrome-exempt: severity-accent seam defaults — Ux1SeverityAccentPalette stamps these at runtime */
    --ttr-accent-info: #0078D4;
    --ttr-accent-positive: #107C10;
    --ttr-accent-caution: #9D5D00;
    --ttr-accent-critical: #D13438;
}

/* Renderer element reset — every UxOneWeb-created element carries class 'ux1' (WebControl
   contract): border-box so kernel rects are outer boxes, no UA margins.

   font-family (GH #197): CHROME text follows the resolved family from here. Measured leaf text
   sets font-family INLINE from the same resolution (WebTextStyling over the manager's
   FontFamilyStack) and therefore wins over this rule by specificity — this covers the text the
   measurement path never sees: class-styled chrome (buttons, dialog chrome, bands) and, crucially,
   form controls, which do NOT inherit font-family from an ancestor in any engine. Without it a
   theme-authored family moved measured text while leaving every <input>/<button> on the UA font.
   Icon-glyph classes re-declare font-family: "Material Symbols Outlined" and are unaffected. */
.ux1 {
    box-sizing: border-box;
    margin: 0;
    font-family: var(--ttr-font-family, "Segoe UI", Selawik, system-ui, sans-serif);
}

/* font-size (GH #2041): the rule above is GH #197's argument about the FAMILY, and a form control
   does not inherit the SIZE either — every engine's UA sheet stamps a whole `font` shorthand on
   <input>/<select>/<textarea>/<button>, so one with no size of its own renders at Chromium's
   13.333px while every measured leaf beside it renders at the resolved metrics size. Measured on
   dev slot 2 in the Requisitions date-range popover: the `<input type=date>` read 13.3333px against
   its sibling `input.ux1-textbox`'s 14px, and the same held for the popover's <select>s and its
   span-count box — controls the renderer builds imperatively and therefore never styles inline.
   A local `font: inherit` moves only the family (GH #5994). This rule is the answer for every
   surface rather than one.

   ZERO-SPECIFICITY on purpose. `:where(...)` contributes nothing, so this rule weighs exactly
   `.ux1` (0-1-0) and sits immediately after it — so EVERY later single-class rule that authors a
   size for a form control still wins on source order (`.ux1-dock-pane-close`, the floating-chrome
   glyph buttons, the rail toggle), and an inline size from WebTextStyling wins outright. Only a
   control with no size at all moves, which is the whole population this is about. Not
   `font-size: inherit`: nothing in the chain declares a size, so inheriting would land on the
   document's 16px — further from the metrics, not closer. */
:where(input, select, textarea, button).ux1 {
    font-size: var(--ttr-font-size, 14px);
}

/* ---- real-phone substrate (Docs/187 §3.4, slice A1, GH #4994) ------------------------------

   Two rules a phone browser needs and no simulated profile ever asked for. Both are gated on a
   fact about the VISITOR'S BROWSER, never on the device profile or the conventions, so a desktop
   tab simulating `?device=phone` is untouched by either and no desktop pixel moves.

   1. THE iOS FOCUS-ZOOM FLOOR. Safari on iOS zooms the page when a focused text field's computed
      font-size is under 16px, and does not zoom back. The floor is PER VISITOR: the
      `-webkit-touch-callout` feature test matches iOS WebKit and nothing else (it is the
      property iOS alone implements — Chromium, Firefox and desktop Safari all answer false), so
      the metrics seed stays 14 for everyone and only a text-entry control, only on iOS, is
      lifted. `max()` rather than a bare 16px so a visitor who chose a LARGER font keeps it.
      `!important` because a measured text field carries its size INLINE (WebTextStyling), which
      no selector outranks otherwise. Buttons are deliberately absent: they take no caret, so
      they never zoom, and they are measured at the metrics size.

      RESIDUAL, stated because the measure pass cannot see it (§22): on iOS the text INSIDE a
      field renders up to 2px larger than the size its box was measured for. The box is the
      kernel's and does not move; a content-sized field can therefore clip a long value a
      little earlier than the measurement predicted. Not verified on a device by this slice. */
@supports (-webkit-touch-callout: none) {
    :where(input, select, textarea).ux1 {
        font-size: max(16px, var(--ttr-font-size, 14px)) !important;
    }
}

/* 2. A LONG-PRESS ON A ROW IS NOT A TEXT SELECTION. On a touch-primary browser a press held on
      a row starts the engine's own text selection (and, on iOS, raises its callout bubble)
      before any gesture of ours can read it. Rows are the `data-row` / `data-tree-row` markers
      the list, grid and tree controls already stamp, and `data-card` is the cards wall's tile,
      which takes the same hold (Docs/187 B2). `(pointer: coarse)` on purpose: a mouse
      user selecting and copying a value out of a grid row is a real desktop habit, and the
      ticket's reason for this rule is the long-press. A field inside a row keeps its selection
      — an inherited `none` would stop a caret being placed in it on WebKit. */
@media (pointer: coarse) {
    [data-row],
    [data-card],
    [data-tree-row] {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    :is([data-row], [data-card], [data-tree-row]) :is(input, textarea) {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* 3. THE TRAILING ROW SWIPE (D29; Docs/187 B2, GH #4998). Markers and the two custom properties
      are WebRowSwipeHost's, which writes the offset and the tray width on the ROW.
      `touch-action: pan-y` hands the browser the vertical pan and keeps the horizontal drag for
      the page's pointer layer; without it a touch drag is taken for a pan and the stream ends in
      `pointercancel` before a swipe can start.
      The offset rules hold only while the row is ACTIVE: a resting row carries no transform
      (which would re-anchor a fixed-position descendant) and no clip, and its tray is not
      displayed, so a closed row is geometrically the row it was before this rule existed. */
[data-swipe-row] {
    position: relative;
    touch-action: pan-y;
}

[data-swipe-row][data-swipe-active] {
    overflow: hidden;
}

[data-swipe-row][data-swipe-active] > [data-swipe-content] {
    transform: translateX(var(--ttr-swipe-x, 0px));
}

[data-swipe-tray] {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    width: var(--ttr-swipe-zone, 0px);
    transform: translateX(var(--ttr-swipe-x, 0px));
    margin: 0;
    padding: 0;
    border: 0;
    /* No font of its own: the tray is a renderer <button>, so the `:where` hoist above gives it the
       metrics size (GH #5994). */
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
}

[data-swipe-row][data-swipe-active] > [data-swipe-tray] {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- page backdrop (GH #217) -------------------------------------------------------------

   The web twin of the Android activity-root backdrop (GH #196): the PAGE itself takes the
   theme's canvas surface, so anywhere the shell's chrome root does not cover — the host's own
   viewport element, the strip behind a band that does not reach an edge, the pre-boot window —
   shows the theme's canvas instead of the UA's white. Without this a dark theme rethemed every
   painted surface and left white strips in every gap (the GH #209 verification finding).

   Deliberately the SAME var the atom-surface root paints (--ttr-atom-root-bg → the palette's
   surface.canvas role) rather than a second `--ttr-canvas` stamp of the same value: the page
   backdrop and the root atom surface ARE the one canvas colour, and two vars carrying it is the
   RGB-drift shape this seam exists to prevent. It rides the ThemeChanged re-stamp for free —
   pure paint, no measurement impact.

   `html` alone is not enough in engines that propagate the BODY background to the canvas when
   html has none; stating both is unambiguous everywhere. */
html,
body {
    background: var(--ttr-atom-root-bg, #E9E9EC);
}

/* ---- focus ring (GH #96) ---------------------------------------------------------------

   The renderer defines its OWN ring because every engine's default paints one OUTSIDE the
   element's border-box, and leaves sit at absolute kernel positions inside ancestors that
   legitimately clip (.ux1-chrome-root / .ux1-dialog / the content slot — all overflow:hidden).
   A ring painted outside the box therefore loses whichever ancestor edge it crosses: the top
   edge vanished for a field at top:0, and the last dialog field lost its bottom and right.

   outline-offset:-2px paints the ring INSIDE the border-box, which makes it structurally
   unclippable at any position AND keeps it free of the layout: it reserves no space, so the
   §18 kernel keeps sizing the control and never a paint-time affordance (the reason this shape
   is right rather than teaching ancestors to overflow:visible). It overlaps the 1px #888 input
   border by design — the focused field reads as an accent-bordered box.

   :focus-visible, not :focus — a pointer click on a button stays quiet, while keyboard nav and
   text entry (which engines always treat as focus-visible) keep the affordance. Scoped to the
   focusable tags so the modal <dialog>, which showModal() focuses when it has no autofocus
   target, never rings. NEVER `outline: none` here: this is an accessibility affordance (§20 —
   the user-preference/author-responsibility split puts a visible focus indicator on us).

   THE TWO CONTROLS THAT DO SUPPRESS IT ARE RECORDED, because "never" with unrecorded exceptions
   is a rule the next reader either breaks or over-obeys. Both suppress it because they declare a
   focus treatment OF THEIR OWN, which is the exact condition this ring exists to cover the
   absence of — the ring is the affordance for a control that declares NONE, so painting it over
   a control that does is a SECOND, undeclared indicator rather than a redundancy:

     .ux1-textbox:focus  — the boxed edit face, whose focus treatment is a border-colour swap
                           (see the rule further down this file).
     the QUERY PILL      — the three query-pill sites (WebArrayViewSearchPill,
                           WebSearchFilterControl, WebPickerField's popup search), whose face is
                           `Ux1ChromeRole.QueryPill`: a 2px bottom RULE and nothing else, re-inked
                           per state from `Ux1QueryPillFace.Ink`. The ring was a 2px rectangle
                           inset into a face whose whole statement is that it has no rectangle
                           (GH #1802). Suppressed inline in each control's own paint pass rather
                           than by a class here, because that pass is the one writer of that
                           element's `border`/`outline` and a split would let a class and an
                           inline write disagree about the same box.

   A suppression is only legitimate WITH the declared treatment beside it. GH #1802's review found
   the query pill's fourth state — error AND focused — resolving to the same ink as error alone,
   i.e. suppressing the ring and then declaring nothing in the one state a user sits in longest;
   `palette.feedback.errorBorderFocus` is what closed it. Check that before adding a third row. */
.ux1:is(input, button, select, textarea):focus-visible {
    outline: var(--ttr-focus-w, 2px) solid var(--ttr-accent-info);
    outline-offset: -2px;
}

/* ---- validation / unavailability severity border (GH #497; reshaped by GH #2494) ----------

   The web twin of WPF's Ux1ValidationAdorner. WebAdornmentHost adds exactly one of these classes
   to the adorned control as the worst severity moves, and removes it when the rows clear — it
   never writes a colour.

   GH #2494 (owner ruling 2026-09-04) replaced GH #497's LEADING bar with a 1px BOTTOM border on
   this head and WPF; Android's and iOS's own marks are named in Ux1AdornmentVisuals. The negative Y offset is
   what puts the inset shadow on the bottom edge — `calc(-1 * …)` rather than a second stamped var,
   so the thickness has exactly one source. All three severities wear the SAME geometry and differ
   only in hue: the decorator says "look here" and the colour says how loudly.

   Still a CLASS + an INSET box-shadow, rather than a child paint object or a real border, because
   the controls that most need the decorator are <input> elements: a void element can hold no child,
   a floating sibling would need the arranged rect the §18 kernel only produces later, and a
   `border-bottom` would take a pixel of the control's content box and re-open the §18 solve. The
   inset shadow reserves no space (the kernel keeps sizing content, never a paint-time affordance),
   composites over the control's own background without touching it, and leaves the focus ring alone
   — that ring is an `outline`, so the two affordances stack instead of fighting. Thickness and hue
   come from the --ttr-adorn-* vars WebThemeSeam stamps out of the neutral Ux1AdornmentVisuals
   table, which is what makes an already-decorated control re-ink on a theme switch (Docs/141
   tier 1) and is what keeps this head and WPF on one AUTHORED number.

   One authored number is not one rendered thickness. WPF snaps that number to a whole count of
   device pixels because it draws the rect itself; this head stamps `1px` and leaves device-pixel
   alignment to the browser. The two therefore coincide at integer display scale and differ at a
   fractional one (at 1.5, WPF paints 2 device pixels and this head paints one CSS pixel) — a
   deliberate split of responsibility, not a drift.

   No fallback on purpose: an unstamped root leaves the shadow invalid-at-computed-value-time
   (no border) rather than baking a second copy of a table value into this file. */
.ux1-validation-error {
    box-shadow: inset 0 calc(-1 * var(--ttr-adorn-t)) 0 0 var(--ttr-adorn-error);
}

.ux1-validation-warning {
    box-shadow: inset 0 calc(-1 * var(--ttr-adorn-t)) 0 0 var(--ttr-adorn-warning);
}

.ux1-validation-info {
    box-shadow: inset 0 calc(-1 * var(--ttr-adorn-t)) 0 0 var(--ttr-adorn-info);
}

/* ---- native browser widgetry (GH #196) ---------------------------------------------------

   The web sibling of WPF's themed Slider/ScrollBar templates (GH #192): controls the engine
   draws itself, which no .ux1- class reaches. Three families, three levers:

   1. What a control paints OUTSIDE its own box — the <select> dropdown list, the
      <input type=date> calendar panel and its inner spin/calendar glyphs. Nothing in CSS
      selects those; `color-scheme` (stamped as a real property on :root by WebThemeSeam from
      the resolved theme's darkness) is the ONLY lever, and it also gives every native control
      its correct light/dark default palette.
   2. Scrollbar gutters, which any overflow container grows — `scrollbar-color` (standard) plus
      the WebKit pseudo-elements for the engines that still only speak those.
   3. The form-control accent (checkbox tick, radio dot) — one `accent-color` on .ux1.

   SELECTOR NOTE: the range rules key on the ELEMENT (`input[type="range"]`), not on .ux1,
   because measureHtml() measures its snippet in THIS document and WebControlMarkup.Slider
   emits a bare <input type="range"> with no class. An .ux1-scoped rule would style the
   rendered slider and not the measured one — the §22 measure-vs-render drift channel. */

.ux1 {
    accent-color: var(--ttr-accent, #0067C0);
}

/* Range input. `appearance:none` + explicit parts, mirroring the WPF template: neutral
   control-border rail, accent fill below the thumb, accent thumb ringed in the surface color
   so it separates from the fill. The fill split is the ONE per-instance value — WebSliderControl
   writes it inline as the --ttr-slider-fill custom property (custom properties inherit into
   pseudo-elements, which is what makes a value-driven gradient reachable at all), so this stays
   a static rule per the file's scope contract. Chromium has no ::-webkit-slider-progress, so the
   same gradient serves both engines rather than two divergent code paths. */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: calc(var(--ttr-font-size) * 9);
    height: calc(var(--ttr-font-size) * 1.3);
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: calc(var(--ttr-font-size) * 0.3);
    border-radius: 9999px;
    background:
        linear-gradient(to right,
            var(--ttr-accent, #0067C0) 0 var(--ttr-slider-fill, 0%),
            var(--ttr-ctl-border, #E5E5E5) var(--ttr-slider-fill, 0%) 100%);
}

/* margin-top centres the thumb on the rail: -(thumb - track) / 2 = -(0.9 - 0.3) / 2 em. */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: calc(var(--ttr-font-size) * 0.9);
    height: calc(var(--ttr-font-size) * 0.9);
    margin-top: calc(var(--ttr-font-size) * -0.3);
    border-radius: 50%;
    background: var(--ttr-accent, #0067C0);
    border: var(--ttr-border-w, 1px) solid var(--ttr-ctl-surface, #FFFFFF);
}

input[type="range"]::-moz-range-track {
    height: calc(var(--ttr-font-size) * 0.3);
    border-radius: 9999px;
    background:
        linear-gradient(to right,
            var(--ttr-accent, #0067C0) 0 var(--ttr-slider-fill, 0%),
            var(--ttr-ctl-border, #E5E5E5) var(--ttr-slider-fill, 0%) 100%);
}

input[type="range"]::-moz-range-thumb {
    width: calc(var(--ttr-font-size) * 0.9);
    height: calc(var(--ttr-font-size) * 0.9);
    border-radius: 50%;
    background: var(--ttr-accent, #0067C0);
    border: var(--ttr-border-w, 1px) solid var(--ttr-ctl-surface, #FFFFFF);
}

input[type="range"]:disabled {
    cursor: default;
    opacity: var(--ttr-btn-disabled-opacity, 0.6);
}

/* Scrollbars. Slim, arrow-less, transparent gutter with a neutral thumb — the WPF ScrollBar
   template's grammar, through the STANDARD properties only. Both declared on :root and
   inherited, so every overflow container in the renderer picks them up.

   Deliberately NO ::-webkit-scrollbar block, despite it being the older way: the moment ANY
   ::-webkit-scrollbar rule matches an element, Chromium switches that scrollbar to legacy
   custom-scrollbar mode and IGNORES scrollbar-color / scrollbar-width — and legacy mode also
   restores the stepper ARROW BUTTONS, which then render from the UA's own palette. Verified
   live on the launcher rail (GH #196): with both declared, a dark-theme rail grew a light
   arrow-button scrollbar — strictly worse than the pre-fix state, where `color-scheme: dark`
   alone had already darkened it. The standard properties are supported by every engine we
   target, and `color-scheme` covers the rest.

   Both properties are declared on .ux1 as well as :root, because `scrollbar-width` — unlike
   `scrollbar-color` — does NOT inherit, and it is load-bearing rather than cosmetic: at the
   `auto` width Chromium draws the CLASSIC scrollbar, stepper arrow buttons and all, which is
   what the launcher rail was showing (GH #196 live check). `thin` is what produces the slim,
   arrow-less bar the WPF ScrollBar template defines. */
html,
.ux1 {
    scrollbar-color: var(--ttr-scroll-thumb, #CCCCCC) transparent;
    scrollbar-width: thin;
}

/* <select>: `color-scheme` already themes the popup list the engine renders out of document
   flow, but the closed box itself is chrome we own — give it the same face as .ux1-textbox so a
   picker row reads as a field, not a UA button. (Every <select> the renderer creates carries
   class ux1 — WebControl's contract.) */
select.ux1 {
    background: var(--ttr-ctl-surface, #FFFFFF);
    color: var(--ttr-ink-primary, #1F1F1F);
    border: var(--ttr-border-w, 1px) solid var(--ttr-ctl-border, #E5E5E5);
    border-radius: var(--ttr-ctl-radius, 4px);
    /* Fallback = the table's RESOLVED edit-field inset at default metrics (GH #304's mb-authored
       1.125/0.75 recipe → 3px 4.5px). It read "4px 6px" — the pre-#304 hand-roll — which is the
       fallback slot drifting from what the seam actually stamps (GH #369). */
    padding: var(--ttr-textbox-pad, 3px 4.5px);
    cursor: pointer;
}

select.ux1:hover:not(:disabled) {
    border-color: var(--ttr-ctl-border-hover, #CCCCCC);
}

select.ux1:focus {
    border-color: var(--ttr-ctl-border-focus, #0067C0);
}

/* Opening placeholder spin (WebInteractionManager.BuildOpeningPlaceholder). */
@keyframes ux1spin {
    from { rotate: 0deg; }
    to { rotate: 360deg; }
}

.ux1-spinner-host {
    animation: ux1spin 1.2s linear infinite;
    color: #888; /* chrome-exempt: text-ink family (Docs/132 §1.9 → Ux1TextStylePolicy follow-up) */
}

/* ---- device chrome (WebChrome) --------------------------------------------------------- */

.ux1-chrome-root {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* GH #103: the atom-surface root backdrop — every app/window root paints medium grey so
       composed-atom cards read as cards. */
    background: var(--ttr-atom-root-bg, #E9E9EC);
}

/* ---- atom-layout surface card (GH #103; one tier since GH #4741) -------------------------- */

/* A composed atom's slot two or more levels below the root IS the card: off-white fill,
   light-blue rounded hairline. (A slot ONE level below the root takes no card at all.) The
   border+padding inset is booked into the slot dims by Ux1AtomSurfaces.InflateSlotDims, and
   the inner layout arranges into the content box (WebAtomSurfaceCard reports the inset). */
.ux1-atom-card {
    background: var(--ttr-atom-card-bg, #FAFAFC);
    border: 1px solid var(--ttr-atom-card-border, #BBD6EE);
    border-radius: var(--ttr-atom-card-radius, 6px);
    padding: var(--ttr-atom-card-pad, 6px);
    box-sizing: border-box;
}

/* Body row filling the chrome root (no chrome back band — browser back is the web back
   affordance, GH #124): content slot + (while docked) the rail toggle and dock region
   (Docs/136 / GH #6). */
.ux1-chrome-body {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.ux1-chrome-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* ---- docked application panes (Docs/136 / GH #6) ----------------------------------------- */

/* While a pane is docked, the content slot is the launcher rail: fixed width (inline, from
   Ux1DockSizing — 0 when collapsed), hairline separator toward the toggle. */
.ux1-chrome-body.ux1-docked > .ux1-chrome-content {
    flex: none;
    border-right: 1px solid var(--ttr-band-hairline, rgba(0, 0, 0, 0.08));
}

/* Collapse/expand chevron strip between the rail and the dock region. Hidden until docked. */
.ux1-rail-toggle {
    display: none;
    flex: none;
    width: calc(var(--ttr-margin-base) * 4);
    border: none;
    background: var(--ttr-band-bg, #F5F5F7);
    border-right: 1px solid var(--ttr-band-hairline, rgba(0, 0, 0, 0.08));
    cursor: pointer;
    padding: 0;
    font-size: calc(var(--ttr-font-size) * 1.1);
}

.ux1-chrome-body.ux1-docked > .ux1-rail-toggle {
    display: block;
}

/* Dock region: hosts the docked panes; hidden while nothing is docked. Flex so the future
   N-pane split shares the space (per-pane flex from placement proportions). */
.ux1-dock-region {
    display: none;
    flex: 1;
    min-width: 0;
}

.ux1-chrome-body.ux1-docked > .ux1-dock-region {
    display: flex;
}

/* Right dock region: hosts a docked modeless-dialog panel (GH #118) beside the shown content —
   independent of the Center region, so it coexists with the full launcher OR a Center-docked app
   without narrowing either. Fixed width (inline, from Ux1DockSizing.EdgePanelWidth); hidden until
   a modeless dialog docks (.ux1-right-docked). */
.ux1-right-dock-region {
    display: none;
    flex: none;
    min-width: 0;
    border-left: 1px solid var(--ttr-band-hairline, rgba(0, 0, 0, 0.08));
}

.ux1-chrome-body.ux1-right-docked > .ux1-right-dock-region {
    display: flex;
}

/* A docked application pane: slim header band (close X) over the content slot. The pane is an
   atom-surface root like the app window it replaces (GH #103). */
.ux1-dock-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--ttr-dialog-bg, #E9E9EC);
}

/* Docked pane header: the decided title (GH #213 — the same resolved
   Ux1InteractionPresentation.Title the dialog kinds paint) at the leading edge, close X at the
   trailing edge. It was close-only and right-aligned; space-between keeps the X exactly where it
   was while giving the title the rest of the band. */
.ux1-dock-pane-header {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--ttr-margin-base) * 1);
    background: var(--ttr-dtitle-bg, #F5F5F7);
    border-bottom: 1px solid var(--ttr-band-hairline, rgba(0, 0, 0, 0.08));
    /* The DialogTitleBand inset its .ux1-dialog-header sibling already reads (GH #369) — the pane
       header IS that band (it carries the same decided title), so a hand-rolled Half tier here was
       a second source for one number. */
    padding: var(--ttr-dtitle-pad, calc(var(--ttr-margin-base) * 1) calc(var(--ttr-margin-base) * 2));
    min-height: var(--ttr-dtitle-h, calc(var(--ttr-font-size) * 2));
}

.ux1-dock-pane-close {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: calc(var(--ttr-font-size) * 1.1);
}

.ux1-dock-pane-content {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* ---- presented-surface title band (GH #213) ---------------------------------------------

   The VISIBLE title every in-chrome presented surface draws above its content — the web half of
   "the decided title (Ux1DialogTitlePolicy) reaches the presenter and is spent only on the
   accessible name". Chrome from the DialogTitleBand role (its own tint and hairline; the band
   floor derived in the policy from the toolbar band family, which has no fill or line since
   GH #6681 T1) and the run from the one neutral band text style;
   the ink is the shared primary ink var, like every other text (GH #209).

   `flex: none` in the dialog's chrome column: the band takes its height off the top and the
   content slot (flex: 1) keeps the rest — the band can never overlay or clip content. The
   Window kind additionally books this height into the dialog box it derives from the content's
   natural dims (WebChrome.ApplyWindowSize), so a content-sized dialog grows by the band instead
   of losing a band's worth of content. */
.ux1-dialog-header,
.ux1-dock-pane-title {
    /* Ux1ChromeTextStyles.DialogTitleBand, stamped by WebThemeSeam; no fallback restating it (GH #5937). */
    font-size: var(--ttr-dtitle-fs);
    font-weight: var(--ttr-dtitle-weight);
    color: var(--ttr-ink-primary, #1F1F1F);
    /* One line, ellipsised — a title band never wraps into the content's height. */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ux1-dialog-header {
    flex: none;
    display: flex;
    align-items: center;
    height: var(--ttr-dtitle-h, calc(var(--ttr-font-size) * 2));
    padding: var(--ttr-dtitle-pad, calc(var(--ttr-margin-base) * 1) calc(var(--ttr-margin-base) * 2));
    background: var(--ttr-dtitle-bg, #F5F5F7);
    border-bottom: 1px solid var(--ttr-dtitle-hairline, rgba(0, 0, 0, 0.08));
}

/* The docked pane's title shares the run but not the band — its band is the pane header, which
   already exists (and already carries the close X). */
.ux1-dock-pane-title {
    min-width: 0;
}

/* ---- interaction dialogs (<dialog>-based presenters) ------------------------------------ */

/* Shared dialog chrome. showModal() gives top-layer + focus-trap + inert backdrop natively.
   Surface/scrim/shadow ride the chrome-policy custom properties (Docs/131 / GH #93) — the
   shadow synthesizes the OS window chrome WPF dialogs get natively. */
.ux1-dialog {
    border: none;
    padding: 0;
    background: var(--ttr-ctl-surface, #FFFFFF);
    overflow: hidden;
    display: flex;         /* chrome column: optional handle band over the content slot */
    flex-direction: column;
    box-shadow: var(--ttr-dialog-shadow, 0 8px 32px rgba(0, 0, 0, 0.3));
}

.ux1-dialog:not([open]) {
    display: none;
}

.ux1-dialog::backdrop {
    background: var(--ttr-scrim, rgba(0, 0, 0, 0.35));
}

/* Atom-interaction dialog variants share the atom-surface root backdrop (GH #103 owner
   decision: dialogs are atom-surface roots). Sheets and the confirmation dialog keep the white
   .ux1-dialog base — they're compact framework chrome, not atom-layout backdrops. */
.ux1-dialog-window,
.ux1-dialog-fullscreen {
    background: var(--ttr-dialog-bg, #E9E9EC);
}

/* Fullscreen takeover: fills the viewport, clear of the safe area — no ring of its own. Its
   content is inset ONCE, by the neutral client-edge stamp inside its layout (GH #5594), as the
   WPF, Android and iOS takeovers are: a ring here as well put the content two tiers in. Full
   bleed, so square: a rounded corner would show the scrim at the screen's corners.

   DYNAMIC viewport units, plus the safe area (Docs/187 §3.4, GH #4994). A <dialog> is in the
   top layer, so `#shell-root`'s own safe-area inset does not reach it and it states its own.
   `100vh` on a phone browser is the viewport with the toolbar COLLAPSED — taller than what is
   on screen while the toolbar shows, which put this dialog's bottom edge under it; `dvh`/`dvw`
   follow the toolbar. The `vh`/`vw` pair is kept ABOVE as the fallback for an engine with no
   dynamic units (it drops the declaration it cannot parse and keeps the one before), and it
   subtracts the same `env()` terms the `inset` line adds: `env()` is years older than `dvw`,
   so an engine can honour the inset and still land on the fallback, where a box sized without
   them over-constrains and spills past the right inset. On a desktop browser the units are
   the same length and every `env()` is 0. */
.ux1-dialog-fullscreen {
    position: fixed;
    inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    width: calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    width: calc(100dvw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-width: none;
    max-height: none;
    border-radius: 0;
}

/* Window: content-sized centered modal (GH #93 / Docs/131 §2.4 — the WPF dialog-window twin
   for desktop web). Explicit width/height come inline from WebChrome (content dims clamped to
   the neutral interaction-window caps); inset:0 + margin:auto centers. The content slot takes
   the WINDOW's share of the dialog content inset, as WPF's window padding does: the content is
   stamped with the outer-atom tier inside its layout (GH #5594), and the two sum to the role's
   ContentPadding (GH #4740). The 3px fallback is that remainder at the default margin base. */
.ux1-dialog-window {
    position: fixed;
    inset: 0;
    margin: auto;
    max-width: none;
    max-height: none;
    border-radius: var(--ttr-dialog-radius, 4px);
}

.ux1-dialog-window > .ux1-dialog-content {
    padding: var(--ttr-dialog-pad, 3px);
}

/* Bottom sheet: full-width, bottom-anchored, capped at 60% of the viewport (the
   MobileChromeControl / AndroidChrome SheetMaxHeightFraction spec).

   Same migration as the fullscreen kind above (GH #4994): dynamic units, and the sheet's own
   answer to the safe area. It stays anchored to the SCREEN's bottom edge — its surface runs
   under the home indicator, as a native sheet's does — and pads its CONTENT clear of it; the
   padding is 0 wherever the browser has no unsafe area.

   The two WIDTH lines keep their static twin above them as the fallback. The CAP cannot have
   one, and a `vh` line above it would not be one: a var() declaration whose value the engine
   cannot use is invalid at computed-value time — it computes to `none` rather than falling back
   to an earlier declaration. So the cap's unit is chosen where it is EMITTED: it arrives as
   --ttr-sheet-max-h from WebChromeCss.Vh, which picks `dvh` or `vh` once at boot from what the
   engine supports (GH #5014), as do WebChrome's inline `height` and the popup caps. The literal
   here is only the pre-boot fallback, so it is the unit every engine parses. */
.ux1-dialog-sheet {
    position: fixed;
    inset: auto 0 0 0;
    margin: 0;
    width: 100vw;
    width: 100dvw;
    max-width: 100vw;
    max-width: 100dvw;
    max-height: var(--ttr-sheet-max-h, 60vh);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-radius: var(--ttr-sheet-radius, 12px) var(--ttr-sheet-radius, 12px) 0 0;
}

/* No-<dialog> engine fallback (the façade's showModalDialog sets the open attribute): fixed
   center-ish overlay; no backdrop (scrim-free degrade). */
.ux1-dialog[open] {
    z-index: var(--ttr-z-modal-dialog);
}

/* Sheet drag-handle band: a visual grab affordance; tap dismisses (routed through
   OnDismissRequested — the close policy stays authoritative). */
.ux1-sheet-handle {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ttr-sheet-band-minh, calc(var(--ttr-margin-base) * 6));
    cursor: pointer;
}

.ux1-sheet-handle-pill {
    width: var(--ttr-sheet-pill-w, calc(var(--ttr-margin-base) * 9));
    height: var(--ttr-sheet-pill-h, var(--ttr-margin-base));
    border-radius: var(--ttr-sheet-pill-radius, calc(var(--ttr-margin-base) * 0.5));
    background: var(--ttr-sheet-pill-ink, #CCCCCC);
}

.ux1-dialog-content {
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* ---- top-layer surfaces under the desktop simulation frame (Docs/187 C4, GH #5005) ------- */

/* A <dialog> is in the top layer and the rules above size it off the VIEWPORT. Under the head's
   simulation frame the viewport is a desktop window and the simulated screen is a box inside
   it, so each top-layer kind restates its POSITION AND SIZE against that box. --ttr-screen-* is
   the screen: the hosting page defines it beside its own #shell-root frame rule, and each read
   here falls back to the viewport, so a page that defines none keeps the geometry above.
   --ttr-frame-safe-* stand where env(safe-area-inset-*) stands above. Sizing and position
   only: every paint declaration is the base rule's. Nothing here matches without the class
   WebSimulationFrame stamps.

   --ttr-screen-left and -width hold percentages of the WIDTH, -top and -height of the HEIGHT,
   so each is read only on its own axis. The scrim (::backdrop) is not restated and still
   covers the window. */
html.ttr-sim-frame .ux1-dialog-fullscreen {
    inset: calc(var(--ttr-screen-top, 0px) + var(--ttr-frame-safe-top, 0px))
           auto
           auto
           calc(var(--ttr-screen-left, 0px) + var(--ttr-frame-safe-left, 0px));
    width: calc(var(--ttr-screen-width, 100%)
                - var(--ttr-frame-safe-left, 0px) - var(--ttr-frame-safe-right, 0px));
    height: calc(var(--ttr-screen-height, 100%)
                 - var(--ttr-frame-safe-top, 0px) - var(--ttr-frame-safe-bottom, 0px));
}

/* The two centred kinds: all four edges are the screen's, and their own `margin: auto` centres
   them in it as it centred them in the viewport. Two rules with one `inset`, not one grouped
   selector, so each kind's frame geometry is one rule a reader (and a pin) can take whole. */
html.ttr-sim-frame .ux1-dialog-window {
    inset: var(--ttr-screen-top, 0px)
           calc(100% - var(--ttr-screen-left, 0px) - var(--ttr-screen-width, 100%))
           calc(100% - var(--ttr-screen-top, 0px) - var(--ttr-screen-height, 100%))
           var(--ttr-screen-left, 0px);
}

html.ttr-sim-frame .ux1-confirm {
    inset: var(--ttr-screen-top, 0px)
           calc(100% - var(--ttr-screen-left, 0px) - var(--ttr-screen-width, 100%))
           calc(100% - var(--ttr-screen-top, 0px) - var(--ttr-screen-height, 100%))
           var(--ttr-screen-left, 0px);
    min-width: min(calc(var(--ttr-screen-width, 100%) * 0.8), var(--ttr-confirm-minw, 360px));
    max-width: min(calc(var(--ttr-screen-width, 100%) * 0.8), var(--ttr-confirm-maxw, 540px));
}

/* The sheet: anchored to the SCREEN's bottom edge, the screen's width, and capped at the same
   fraction of the screen's height that --ttr-sheet-max-h is of the viewport's
   (--ttr-frame-sheet-max-fraction, stamped from the one neutral spec). max-height outranks
   WebChrome's inline `height`, which stays in the viewport's unit. */
html.ttr-sim-frame .ux1-dialog-sheet {
    inset: auto
           auto
           calc(100% - var(--ttr-screen-top, 0px) - var(--ttr-screen-height, 100%))
           var(--ttr-screen-left, 0px);
    width: var(--ttr-screen-width, 100%);
    max-width: var(--ttr-screen-width, 100%);
    max-height: calc(var(--ttr-screen-height, 100%) * var(--ttr-frame-sheet-max-fraction, 1));
    padding-bottom: var(--ttr-frame-safe-bottom, 0px);
}

/* ---- confirmation dialog ----------------------------------------------------------------- */

/* Width bounds + inset from the ConfirmationDialog chrome spec (WPF: MinWidth 360 / MaxWidth
   540 / Margin 16). */
.ux1-confirm {
    position: fixed;
    margin: auto;
    min-width: min(80vw, var(--ttr-confirm-minw, 360px));
    max-width: min(80vw, var(--ttr-confirm-maxw, 540px));
    border-radius: var(--ttr-dialog-radius, calc(var(--ttr-margin-base) * 1));
    padding: var(--ttr-confirm-pad, calc(var(--ttr-margin-base) * 4));
    display: block; /* not the chrome column — a simple flow dialog */
}

.ux1-confirm:not([open]) {
    display: none;
}

/* A presented surface's title — the confirmation dialog's, the sign-in refusal's, the user picker's —
   reads the title band's run (Ux1ChromeTextStyles.DialogTitleBand), never 600 / x1.1 of its own. An
   action sheet's header overrides it inline with ConfirmationSheetHeader (WebConfirmationPresenter).
   The body text — the message and the "don't ask again" row — is ConfirmationBody (GH #5937). */
.ux1-confirm-title {
    font-weight: var(--ttr-dtitle-weight);
    font-size: var(--ttr-dtitle-fs);
    margin-bottom: calc(var(--ttr-margin-base) * 2);
}

.ux1-confirm-message {
    font-size: var(--ttr-confirm-body-fs);
    font-weight: var(--ttr-confirm-body-weight);
    margin-bottom: calc(var(--ttr-margin-base) * 3);
    white-space: pre-wrap;
}

.ux1-confirm-suppress {
    display: flex;
    align-items: center;
    gap: calc(var(--ttr-margin-base) * 1);
    margin-bottom: calc(var(--ttr-margin-base) * 3);
    font-size: var(--ttr-confirm-body-fs);
    font-weight: var(--ttr-confirm-body-weight);
}

/* The answers take ONE width — max(the wider answer, the floor), a dialog commit strip's rule
   (Ux1DialogCommitStrip.MemberWidth, GH #5659), so the two kinds of dialog match. A max-content grid
   of 1fr columns IS that max: each column resolves to the widest answer's max-content (the floor is
   the buttons' own min-width), and the row keeps to the trailing edge. */
.ux1-confirm-buttons {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    width: max-content;
    margin-left: auto;
    gap: calc(var(--ttr-margin-base) * 1.5);
}

/* Confirmation buttons are TextButton-role chrome (the WPF Ux1Buttons.Text path). The min-width
   is the role's dialog answer-button floor (GH #394) — a short "OK" still reads as a button.
   Their run is the prompt's body run, the message's (Ux1ChromeTextStyles.ConfirmationBody, stamped by
   WebThemeSeam), which is the ambient body WPF's dialog paints its answers at (GH #5994). */
.ux1-confirm-button {
    font-size: var(--ttr-confirm-body-fs);
    font-weight: var(--ttr-confirm-body-weight);
    min-width: var(--ttr-btn-minw, 80px);
    padding: var(--ttr-btn-pad, 6px 14px);
    border: var(--ttr-border-w, 1px) solid var(--ttr-ctl-border, #E5E5E5);
    border-radius: var(--ttr-ctl-radius, 4px);
    background: var(--ttr-ctl-surface, #FFFFFF);
    cursor: pointer;
}

.ux1-confirm-button:hover:not(:disabled) {
    background: var(--ttr-hover-subtle, #ECECEC);
}

.ux1-confirm-button:active:not(:disabled) {
    background: var(--ttr-pressed-subtle, #DDDDDD);
}

/* The confirm answer is the prompt's default verb, and wears the face a dialog commit strip's
   default wears (GH #5659; "dialogs match", GH #4727) through the one face class below
   (.ux1-action-face, Docs/195 J3). It used to be the severity INFO accent with a brightness
   filter, a second accent the chrome table never named. */

/* ---- surfaces (adorned atom host) --------------------------------------------------------- */

/* The adorned host is renderer chrome around the kernel-arranged inline control — flex is
   sanctioned here exactly as Android's LinearLayout is. */
.ux1-adorned {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Positioning container for the viewport overlay layer below (Docs/139 §9.4) — the wrapper
       an OutsideScroller overlay pins to when this host owns the internal scroll. */
    position: relative;
}

/* Viewport-pinned overlay layer (Docs/139 §9.4): an out-of-flow sibling of a scrolling element,
   inset to that scroller's content box by its owner. Overlays parented here stay pinned to what
   the user can SEE instead of riding the scrolled content. Pointer-transparent so spanning the
   viewport costs no input; overlay children opt back in. Above the in-flow content, below the
   selection pill's own tier. Layer + order: Ux1StackingLayer.ContentOverlayLayer (GH #804). */
.ux1-overlay-viewport-layer {
    position: absolute;
    pointer-events: none;
    overflow: visible;
    z-index: var(--ttr-z-content-overlay-layer);
}

.ux1-adorned-content {
    position: relative;
    flex: none;
    overflow: visible;
}

.ux1-adorned-content-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* GH #143: the .ux1-adorn-cluster rule is gone with the dormant WebSurfaceAdornedAtomControl
   cluster path — the adornment cluster is a declared overlay node whose mount
   (WebAdornmentClusterMount) positions everything from solved bounds. */

/* Selection pill (Docs/139 §9): PAINT ONLY — tint, border, radius, shadow. Placement is the
   kernel's (the declared Ux1RegionForOverlay's anchor/gap solved by Ux1OverlayPlacement and
   transcribed as absolute bounds), and so is the interior inset: WebSelectionPillMount resolves
   the SAME SelectionPill spec's padding and bakes it into the absolutely-positioned children's
   offsets, so a CSS `padding` here would be inert (absolute children position off the padding
   box) as well as a second decider. The legacy rule's position/left/transform were exactly the
   D3 violation this slice removes. */
.ux1-selection-pill {
    background: var(--ttr-selpill-bg, #E0E0E6);
    border: 1px solid var(--ttr-selpill-border, #C0C0C6);
    border-radius: var(--ttr-selpill-radius, calc(var(--ttr-margin-base) * 2));
    box-shadow: var(--ttr-selpill-shadow, 0 2px 6px rgba(0, 0, 0, 0.15));
}

/* Icon button (burger, strip icons, icon-only actions). Intrinsic 2em policy box so
   flow/strip contexts get the WPF IconOnlyButton hit target without a kernel rect
   (kernel-arranged contexts override via inline bounds, which beat the class). Hover = the
   WPF IconHoverChrome treatment — transparent at rest, 8% black tint + small rounding on
   mouse-over, and like WPF it only fires while enabled; disabled dims to the policy opacity
   (GH #93 follow-up). */
.ux1-icon-button {
    border: none;
    background: transparent;
    color: var(--ttr-icon-ink, #1F1F1F);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    border-radius: var(--ttr-icon-radius, 2px);
    width: var(--ttr-icon-box, 28px);
    height: var(--ttr-icon-box, 28px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Compact icon button — the IconButton chrome role under Ux1ChromeVariant.Compact (GH #200/#388):
   75% of the standard box in each dimension. Combined with .ux1-icon-button (which supplies the
   shared rest/hover/disabled chrome); only the box overrides here, and the glyph font-size is set
   inline from the varied spec's glyph metric. */
.ux1-icon-button-small {
    width: var(--ttr-icon-small-box, 21px);
    height: var(--ttr-icon-small-box, 21px);
}

.ux1-icon-button:hover:not(:disabled) {
    background: var(--ttr-hover-tint, rgba(0, 0, 0, 0.078));
}

.ux1-icon-button:disabled {
    opacity: var(--ttr-icon-disabled-opacity, 0.5);
    cursor: default;
}

/* Labelled action button — the TextButton chrome-policy role (WPF Fluent Button parity:
   padding/border/radius/surface via the seam vars; hover + pressed washes — GH #93). */
.ux1-action-button {
    padding: var(--ttr-btn-pad, 6px 14px);
    border: var(--ttr-border-w, 1px) solid var(--ttr-ctl-border, #E5E5E5);
    border-radius: var(--ttr-ctl-radius, 4px);
    background: var(--ttr-ctl-surface, #FFFFFF);
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    /* D31 (GH #4999): the platform touch-target floor's minimum, 0 unless one is installed. */
    min-height: var(--ttr-btn-minh, 0px);
}

.ux1-action-button:hover:not(:disabled) {
    background: var(--ttr-hover-subtle, #ECECEC);
}

.ux1-action-button:active:not(:disabled) {
    background: var(--ttr-pressed-subtle, #DDDDDD);
}

/* THE ONE ACTION FACE (Docs/195 J3, GH #5835): a labelled action's face as the neutral record
   composes it (Ux1ActionFace), over the box its base class books — a commit strip's default verb
   (GH #5659), a style's face, and the confirmation prompts' primary answers. The values are the
   element's own --ttr-face-* vars, which WebChromeCss.ApplyActionFace sets in the same call that
   adds the class; it is the only writer, so no rule here carries a fallback (one would be a second
   copy of the record's values). The default face's vars reference the seam's --ttr-default-btn-*
   root vars, so a theme re-stamp repaints it with no rebuild; a style face's carry resolved values,
   which the tier-2 rebuild re-resolves (F2). The label's ink is inline too: WebTextStyling stamps the
   label's colour inline, and no class outranks that. */
.ux1-action-button.ux1-action-face,
.ux1-confirm-button.ux1-action-face {
    background: var(--ttr-face-rest);
    border-color: var(--ttr-face-border);
    border-radius: var(--ttr-face-radius);
}

.ux1-action-button.ux1-action-face:hover:not(:disabled),
.ux1-confirm-button.ux1-action-face:hover:not(:disabled) {
    background: var(--ttr-face-hover);
}

.ux1-action-button.ux1-action-face:active:not(:disabled),
.ux1-confirm-button.ux1-action-face:active:not(:disabled) {
    background: var(--ttr-face-pressed);
}

.ux1-action-button.ux1-action-face:disabled,
.ux1-confirm-button.ux1-action-face:disabled {
    opacity: var(--ttr-face-disabled);
}

/* Docs/195 §7 item 4 — a transparent-fill face under forced-colors: active — needs NO rule here,
   measured rather than argued (GH #5835, Chromium's emulated forced colors, 2026-10-24): the engine
   forces every author colour to a system one, a TRANSPARENT edge included, and keeps only a
   background's alpha, so the outlined and the link face keep a system-colour boundary on their own,
   exactly as a plain button does. A ButtonText edge stated here read identically, i.e. inert. */

/* Related-atom link (RelatedAtomLink role): link-styled text, no box — the reference is content
   that happens to be navigable. This rule inks the glyph; the label's ink is stamped inline
   (WebRelatedAtomChipControl, GH #5940 R9), because the text funnel's inline ink out-ranks a class;
   the underline is stamped inline from the spec. Hover deepens the ink instead of washing a surface. */
.ux1-related-link {
    color: var(--ttr-link-ink, #004F94);
}

.ux1-related-link:hover {
    filter: brightness(0.85);
}

/* A chip that claims its atom's default action (Ux1ChipSurfacePolicy) is a button: the whole pill
   activates on one click, so it wears a button's hover wash. Stamped as a class rather than inline
   because the rest surface is inline (StylePill) and only a class can carry the pseudo-state. Chips
   with no default action never get the class and keep the plain pill. */
.ux1-chip-activatable:hover {
    background: var(--ttr-chip-hover, #ECECEC);
}

.ux1-action-button:disabled {
    opacity: var(--ttr-btn-disabled-opacity, 0.6);
    cursor: default;
}

/* Single-line text editor — the TextBox chrome-policy role (WPF Fluent TextBox parity:
   padding, rounded corners, hover border, focus accent border — GH #93). The focus border
   replaces the generic focus ring for this control (the border IS the focus affordance,
   as on WPF). */
.ux1-textbox {
    padding: var(--ttr-textbox-pad, 3px 4.5px);
    border: var(--ttr-border-w, 1px) solid var(--ttr-ctl-border, #E5E5E5);
    border-radius: var(--ttr-ctl-radius, 4px);
    background: var(--ttr-ctl-surface, #FFFFFF);
    min-width: 0;
    /* Uniform edit-field height (GH #300): every edit-field face — textbox, select, date input,
       picker/set-filter faces — books the same border-box 2em the chrome policy authors. */
    box-sizing: border-box;
    min-height: var(--ttr-editfield-minh, 28px);
}

.ux1-textbox:hover:not(:disabled) {
    border-color: var(--ttr-ctl-border-hover, #CCCCCC);
}

.ux1-textbox:focus {
    border-color: var(--ttr-ctl-border-focus, #0067C0);
    outline: none;
}

/* GH #1196 — THE watermark rule, and the only place on this head an ink can reach a placeholder at
   all. A ::placeholder is a pseudo-element, so no inline `color` can touch it and every
   placeholder-attribute field in the app — the array-view search pill, every title-as-watermark
   text field, the picker popups' query box — fell through to the UA's own grey. Measured on
   200e5aeb3 at framework-default appearance: rgb(117,117,117) against the neutral rgb(128,128,128),
   on a head whose every other leaf took the theme's ink.

   `--ttr-ink-prompt` and NOT `--ttr-ink-placeholder`: the second is the PALETTE member's var and
   serves this register's siblings too (a picker popup's empty state), so pointing this rule at it
   would put the whole stylesheet's prompt back on a palette read one indirection out. The name is
   Ux1PromptFace.WebCustomProperty's, spelled in WebThemeSeam from that member — a rule and its stamp
   are two files that must agree, and a var spelled twice is how one goes quietly unfed.

   No colour of its own beyond the fallback, which is the neutral value at framework defaults and
   exists only for the pre-stamp frame; a second literal here would be a second authority on a value
   the member states.

   `opacity: 1` because Firefox's UA placeholder is translucent by default, which would dilute a
   colour the member states exactly. */
.ux1::placeholder {
    color: var(--ttr-ink-prompt, #808080);
    opacity: 1;
}

/* GH #1084 — a filter face whose whole run IS a placeholder attribute (the degraded search pill).
   A ::placeholder colour cannot be set inline, so WebSearchFilterControl paints the element's own
   `color` from Ux1FilterControlFaces.NotContentInk and this rule inherits it onto the pseudo. No
   colour of its own: a literal here would be a second authority on a value the neutral member
   states, which is the whole defect the member exists to close.

   SCOPED to the marker attribute deliberately, and it stays scoped now that the rule above exists.
   Every OTHER input's watermark is a PROMPT, not a not-content face, and the two registers are
   separate decisions (GH #1196) that happen to resolve to one colour — widening this to
   `.ux1::placeholder` would recolour every field in the app off a filter-family member. The
   attribute selector out-specifies the prompt rule, so this face keeps its own answer wherever both
   apply.

   `opacity: 1` because Firefox's UA placeholder is translucent by default, which would dilute a
   colour the member states exactly. */
.ux1[data-filter-degraded]::placeholder {
    color: inherit;
    opacity: 1;
}

/* Search-field inline clear ✕ (slot.yaml textFieldAffordance, meaning:search — WebEditTextControl
   renders those fields as the semantic type=search). Chromium's native cancel button already
   matches the WPF visibility contract (shown only while the field has text); this restyles its
   default circle-x into the shared SearchClearInk ✕ glyph via an alpha mask. */
.ux1-textbox[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    cursor: pointer;
    background-color: var(--ttr-search-clear-ink, #808080);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path d="M1.5 1.5l9 9M10.5 1.5l-9 9" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path d="M1.5 1.5l9 9M10.5 1.5l-9 9" stroke="black" stroke-width="1.8" stroke-linecap="round"/></svg>') center / contain no-repeat;
}

/* Settings-style toggle pill — the TogglePill chrome-policy role (Docs/132 §3 decision 5:
   WPF's 40×20 track / 12 thumb grammar, em-authored). The appearance:none checkbox IS the
   track; :checked fills it and slides/recolors the sibling thumb. Geometry + colors ride the
   --ttr-pill-* vars WebThemeSeam stamps from the spec. */
.ux1-toggle-pill {
    appearance: none;
    margin: 0;
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: var(--ttr-border-w, 1px) solid var(--ttr-pill-border, #8A8A8A);
    border-radius: 9999px;
    background: transparent;
    cursor: pointer;
}

.ux1-toggle-pill:hover:not(:disabled) {
    border-color: var(--ttr-pill-border-hover, #5A5A5A);
}

.ux1-toggle-pill:checked {
    background: var(--ttr-pill-on, #0067C0);
    border-color: var(--ttr-pill-on, #0067C0);
}

.ux1-toggle-pill:checked:hover:not(:disabled) {
    background: var(--ttr-pill-on-hover, #1A76C6);
    border-color: var(--ttr-pill-on-hover, #1A76C6);
}

.ux1-toggle-pill:disabled {
    cursor: default;
}

/* Whole-pill disabled dim rides the label root (WPF dims the entire ToggleButton). */
.ux1-toggle:has(.ux1-toggle-pill:disabled) {
    opacity: var(--ttr-pill-disabled-opacity, 0.5);
    cursor: default;
}

.ux1-toggle-thumb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: var(--ttr-pill-thumb-left, 4px);
    width: var(--ttr-pill-thumb, 12px);
    height: var(--ttr-pill-thumb, 12px);
    border-radius: 50%;
    background: var(--ttr-pill-thumb-ink, #5A5A5A);
    transition: left 0.12s;
    pointer-events: none;
}

.ux1-toggle-pill:checked + .ux1-toggle-thumb {
    left: var(--ttr-pill-thumb-left-on, 24px);
    background: var(--ttr-pill-thumb-ink-on, #FFFFFF);
}

/* Popup overlay card (burger menu, sticky-notification popup): white, hairline border,
   rounded, Largest-tier inset — the WPF/Android BuildOverlayChrome treatment. EVERY value
   (colors, shadow, rounding, inset) comes from the OverlayCard chrome-policy role through the
   seam vars; the rounding/inset used to be re-authored here as calc() on the margin base, which
   is why a theme's geometry.cornerRadius.overlay could not reach a web overlay (GH #369). */
.ux1-overlay-card {
    position: fixed;
    background: var(--ttr-overlay-bg, #FFFFFF);
    border: 1px solid var(--ttr-overlay-border, #B0B0B4);
    border-radius: var(--ttr-overlay-radius, calc(var(--ttr-margin-base) * 0.75));
    padding: var(--ttr-overlay-pad, calc(var(--ttr-margin-base) * 2));
    box-shadow: var(--ttr-overlay-shadow, 0 2px 8px rgba(0, 0, 0, 0.25));
    /* Ux1StackingLayer.OverlayCard (GH #804) — above every structural layer, the pane separator
       included. It used to be a bare 40 against the separator's 100, so a splitter painted a
       hairline across any card it crossed and took the clicks in that 9px strip. */
    z-index: var(--ttr-z-overlay-card);
}

/* Lookup-picker candidate row (WebLookupControl) and a sidebar row (WebChoiceArrayControl, which
   takes the flat-list row's class): hover tint is the one state inline styles can't express —
   everything else on the row stays inline per the scope rules. Rows are transparent at rest
   (ambient surface shows through); selected rows paint an inline background, which wins over the
   class :hover. */
.ux1-lookup-row:hover,
.ux1-list-row:hover {
    background: var(--ttr-row-hover, rgba(0, 0, 0, 0.08));
}

/* A collection ITEM row — a flat-list row (WebListArrayControl stamps .ux1-item-row beside
   .ux1-list-row) and a columnar-grid row (WebGridArrayControl) — is marked under the pointer the
   way the elected conventions declare (D35, GH #6062; GH #6064): WebThemeSeam stamps the fill and
   the shadow. Under the web preset the row LIFTS — no fill, the ItemHoverLift shadow, and no box
   moves; under Windows it takes the row wash. Lookup and menu rows are not items and keep theirs. */
.ux1-list-row.ux1-item-row:hover,
.ux1-grid-row:hover {
    background: var(--ttr-item-hover-fill);
    box-shadow: var(--ttr-item-hover-shadow);
}

/* Every leaf of the trailing column a hover strip TAKES THE SLOT of — the date and each flag — fades
   while the strip shows and refuses hits, so a faded in-row star is not clickable while invisible
   (GH #6064, GH #6116; WebAdornmentClusterMount.YieldedLeafClass). A class, so an opacity or a
   pointer-events the leaf states of its own is handed back untouched when it comes off. `!important`
   because a flag indicator paints its glyph opacity INLINE (WebBooleanIndicatorControl), and an
   author-normal inline declaration outranks a class rule: without it every flag kept painting under the
   strip and only the date faded (measured live, GH #6116). */
.ux1-reveal-yielded {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* A hover strip on a SCRIM (an image-hero card, GH #6062 / GH #6064): its glyphs paint in inverse
   ink over the gradient the mount draws. The strip's own burger POPUP is a descendant too and sits
   on an ordinary card, so it is excluded. */
[data-reveal-container="Scrim"] .ux1-icon-button:not([data-burger-menu] *) {
    color: var(--ttr-ink-inverse, #FFFFFF);
}

/* The VALUE TIP (GH #6188, WebValueTip): a cut-off run's full text over the run, in its own font and ink.
   Placed over the run the moment the pointer enters it, TRANSPARENT — so the pointer is already over an
   element with an empty `title` and no native tooltip opens over the cut-off text — and revealed after
   the policy's delay (`data-shown`). Its box (surface, hairline, rounding, inset, lift, layer) is the
   Ux1ChromeRole.ValueTip role's, written inline by the module from WebChromeCss; only the structure is
   here. */
.ux1-value-tip {
    position: fixed;
    white-space: nowrap;
    box-sizing: content-box;
    pointer-events: auto;
    opacity: 0;
}
.ux1-value-tip[data-shown] {
    opacity: 1;
}

/* A writable indicator's GHOST glyph on a pointer device (GH #4183, Ux1FlagToggleFaces.GlyphVisible):
   hidden at rest and revealed at its muted ink (--ux1-ghost-opacity, stamped by
   WebBooleanIndicatorControl) while its row, or the glyph itself, is hovered or keyboard-focused.
   Opacity rather than visibility, so the hidden glyph still hit-tests and still takes focus. */
.ux1-indicator-ghost-rest {
    opacity: 0;
}
.ux1-lookup-row:hover .ux1-indicator-ghost-rest,
.ux1-list-row:hover .ux1-indicator-ghost-rest,
.ux1-grid-row:hover .ux1-indicator-ghost-rest,
[role="row"]:hover .ux1-indicator-ghost-rest,
.ux1-indicator-ghost-rest:hover,
.ux1-indicator-ghost-rest:focus-visible {
    opacity: var(--ux1-ghost-opacity, 0.3);
}

/* Burger-menu row (WebOverflowMenu, GH #771): a menu row is a row, so it joins the RowHover
   family above — and it ALSO paints the wash under keyboard focus, because a menu's focus
   indicator IS its highlight (the rows carry tabindex=-1 and the arrow model moves real DOM
   focus). Outline suppressed for the same reason: the wash is the focus ring.
   At REST a row paints its realized face's fill (Docs/189 PE-B3: --ttr-menu-row-rest, stamped on the row alone by
   WebOverflowMenu.RowRestFillVar), which the wash below replaces; unset, it is transparent — today's row. */
.ux1-menu-row {
    background: var(--ttr-menu-row-rest, transparent);
}

.ux1-menu-row:hover,
.ux1-menu-row:focus {
    background: var(--ttr-row-hover, rgba(0, 0, 0, 0.08));
    outline: none;
}

/* Ux1OverflowMenuPolicy.PaintsWash, transcribed (GH #817): an UNAVAILABLE row washes in NEITHER
   channel — "if an item is disabled, its background should remain default and its TEXT should
   appear subdued" (owner ruling). Focus is included and is the case that matters: the menu seats
   focus on its FIRST row at open, so a focus wash surviving unavailability paints a dead row as
   the hot one on every open. `aria-disabled` rather than a bespoke class: it is the same fact the
   row must announce for its role="menuitem", and one attribute cannot disagree with itself. The
   SUBDUE half rides inline opacity on the half the row painted
   (WebOverflowMenuRow.ApplyAvailability). "Default" is the row's rest fill: a realized face's where it states one. */
.ux1-menu-row[aria-disabled="true"]:hover,
.ux1-menu-row[aria-disabled="true"]:focus {
    background: var(--ttr-menu-row-rest, transparent);
}

/* The policy's ContentIsFlat statement (Ux1OverflowMenuItem.ContentIsFlat — owner directive on
   GH #771): a plain ACTION hosted in a menu row sheds its button chrome and reads as menu-item
   text. The button element stays (its click contract carries the §2 flush and the confirmation
   gate); only the face goes — border, surface, padding, and its own hover/pressed washes, which
   the ROW's wash above replaces. */
.ux1-menu-item-flat .ux1-action-button,
.ux1-menu-item-flat .ux1-action-button:hover:not(:disabled),
.ux1-menu-item-flat .ux1-action-button:active:not(:disabled) {
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    text-align: left;
}

/* ...but NOT its disabled face (GH #817). The flat rule sheds the button's BOX; shedding the
   subdue with it is what the ticket reported on WPF, where replacing the template took the
   disabled trigger away. The number is the OverlayMenuItem role's, not .ux1-action-button's
   generic one, so the words in a menu row subdue by exactly as much as the glyph beside them
   (which is the icon family's dim) — one row, one degree of unavailability. */
.ux1-menu-item-flat .ux1-action-button:disabled {
    opacity: var(--ttr-menu-item-disabled-opacity, 0.5);
}

/* ---- array loading strip (WebArrayLoadingIndicator, Docs/112 §6.2) ---------------------- */

/* Hairline overlay pinned to the body region's top edge — must not reserve layout space
   (position from the owner: top 0 in the wrap host; the grid overrides top inline to sit
   below its header). Accent fill is per-instance inline (matches WPF's BarBrush exactly). */
@keyframes ux1pulse {
    from { opacity: 0.35; }
    to { opacity: 1; }
}

.ux1-loading-strip {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    visibility: hidden;
    z-index: var(--ttr-z-progress);
    pointer-events: none;
}

.ux1-loading-strip.ux1-loading-active {
    visibility: visible;
}

/* The PULSE is a second class, applied only when Ux1OperationVisualPolicy.LoadingStripAnimates
   says so (GH #900). Folding it into .ux1-loading-active made "the strip is lit" and "the strip
   moves" one byte, so a motion.reduce theme could only choose between a pulsing strip and no
   strip at all — and §20 asks for the animation to go while the state stays. Not a
   `prefers-reduced-motion` media query: that is the OS signal, and this framework's gate is the
   THEME's motion.reduce, which the stylesheet cannot see. */
.ux1-loading-strip.ux1-loading-active.ux1-loading-pulse {
    animation: ux1pulse 0.7s ease-in-out infinite alternate;
}

/* ---- notifications ------------------------------------------------------------------------ */

/* Transient toast layer: bottom-anchored stack (the Android bottom-stack mirror), pass-through
   outside the cards. */
.ux1-toast-layer {
    position: absolute;
    left: calc(var(--ttr-margin-base) * 2);
    right: calc(var(--ttr-margin-base) * 2);
    bottom: calc(var(--ttr-margin-base) * 2);
    z-index: var(--ttr-z-notification);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: var(--ttr-margin-base);
}

/* One full notification card (toast / sticky popup — pixel-identical, Docs/072 §2d).
   Chrome from the NotificationCard policy role via --ttr-notif-* (Docs/132 phase 4); the
   severity accent bar's color is per-instance (inline, from the neutral palette). */
.ux1-toast-card {
    pointer-events: auto;
    display: flex;
    flex-direction: row;
    background: var(--ttr-notif-bg, #FFFFFF);
    border: 1px solid var(--ttr-notif-hairline, #C8C8CC);
    border-radius: var(--ttr-notif-radius, var(--ttr-margin-base));
    box-shadow: var(--ttr-notif-shadow, 0 2px 6px rgba(0, 0, 0, 0.2));
    padding: var(--ttr-notif-pad, calc(var(--ttr-margin-base) * 2));
}

.ux1-card-accent {
    flex: none;
    width: var(--ttr-notif-bar-w, var(--ttr-margin-base));
    margin-right: calc(var(--ttr-margin-base) * 2);
    border-radius: var(--ttr-notif-bar-radius, calc(var(--ttr-margin-base) * 0.5));
}

.ux1-card-glyph {
    flex: none;
    font-family: "Material Symbols Outlined";
    font-size: var(--ttr-notif-glyph-fs, calc(var(--ttr-font-size) * 1.4));
    margin-right: calc(var(--ttr-margin-base) * 2);
    align-self: flex-start;
}

.ux1-card-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* The card's and the banner's headline, and the card line, read their neutral entries' size AND weight
   (Ux1ChromeTextStyles.NotificationHeadline; the NotificationCard role's secondary text), stamped by
   WebThemeSeam — a weight or a size restated here would be a second source (Docs/199 §3.2, GH #5937).
   The size is not optional: no rule in a card's or a banner's chain states one (GH #6049). No
   fallback: the variables are always stamped before a card exists. */
.ux1-card-headline {
    font-size: var(--ttr-notif-headline-fs);
    font-weight: var(--ttr-notif-headline-weight);
    color: var(--ttr-notif-headline-ink, #1A1A1A);
}

.ux1-card-line {
    font-size: var(--ttr-notif-secondary-fs);
    font-weight: var(--ttr-notif-secondary-weight);
    color: var(--ttr-notif-secondary-ink, var(--ttr-ink-secondary, #616161));
}

/* Response buttons are .ux1-action-button (the TextButton policy role) — the former compact
   .ux1-card-button chrome retired per Docs/132 §3.3. */
.ux1-card-buttons {
    display: flex;
    flex-direction: row;
    gap: var(--ttr-margin-base);
    margin-top: var(--ttr-margin-base);
}

/* Sticky tight banner (Docs/112 §5.2): slim severity-washed strip docked above the root atom
   content. Wash/accent colors are per-instance (inline). Hidden at rest. No margin: the gap under
   it is the band's, booked by WebNotificationBannerBand from the neutral tier (GH #5087), and a
   margin is outside the rect that band reads, so it booked nothing (GH #5212). */
.ux1-banner {
    display: none;
    flex-direction: row;
    align-items: center;
    border-radius: var(--ttr-banner-radius, calc(var(--ttr-margin-base) * 0.5));
    border: 1px solid transparent;
    padding: var(--ttr-banner-pad, calc(var(--ttr-margin-base) * 0.5) calc(var(--ttr-margin-base) * 1.5));
    cursor: pointer;
}

.ux1-banner.ux1-revealed {
    display: flex;
}

/* Square bar per the StickyBanner spec (AccentBarRadius null) — the pre-policy 0.25mb
   rounding retired for cross-renderer parity. */
.ux1-banner-accent {
    flex: none;
    align-self: stretch;
    width: var(--ttr-banner-bar-w, calc(var(--ttr-margin-base) * 0.5));
    margin-right: var(--ttr-margin-base);
}

.ux1-banner-glyph {
    flex: none;
    font-family: "Material Symbols Outlined";
    font-size: var(--ttr-banner-glyph-fs, var(--ttr-font-size));
    margin-right: var(--ttr-margin-base);
}

.ux1-banner-headline {
    flex: 1;
    min-width: 0;
    font-size: var(--ttr-notif-headline-fs);
    font-weight: var(--ttr-notif-headline-weight);
    color: var(--ttr-banner-headline-ink, #1A1A1A);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The "+N more" count's ink is Ux1ChromeTextStyles.StickyBannerCountInk, stamped inline by WebNotificationBanner
   (GH #5940 R4): the count's role a rung down, where this rule dimmed the headline's ink to a 0.7 opacity of its own.
   Its size and weight: WebThemeSeam's "+N more" stamp says which run (GH #6049). */
.ux1-banner-count {
    flex: none;
    margin-left: var(--ttr-margin-base);
    font-size: var(--ttr-banner-count-fs);
    font-weight: var(--ttr-banner-count-weight);
}

/* Sticky corner badge (Docs/112 §5.3): small severity-filled pill top-right of non-root atom
   presentations. Fill color is per-instance (inline). Hidden at rest. */
.ux1-badge {
    display: none;
    position: absolute;
    top: var(--ttr-badge-offset, calc(var(--ttr-margin-base) * 0.25));
    right: var(--ttr-badge-offset, calc(var(--ttr-margin-base) * 0.25));
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-width: var(--ttr-badge-min, calc(var(--ttr-font-size) * 1.143));
    min-height: var(--ttr-badge-min, calc(var(--ttr-font-size) * 1.143));
    /* Pill rounding = min-side/2, derived (StickyBadge spec authors the box, not the radius). */
    border-radius: calc(var(--ttr-badge-min, calc(var(--ttr-font-size) * 1.143)) / 2);
    padding: var(--ttr-badge-pad, calc(var(--ttr-margin-base) * 0.25) calc(var(--ttr-margin-base) * 0.5));
    color: var(--ttr-badge-ink, #FFFFFF);
    cursor: pointer;
    z-index: var(--ttr-z-adornment);
}

.ux1-badge.ux1-revealed {
    display: flex;
}

.ux1-badge-glyph {
    font-family: "Material Symbols Outlined";
    font-size: var(--ttr-badge-glyph-fs, calc(var(--ttr-font-size) * 0.786));
}

/* The count's size and weight: the StickyBadge role's secondary text (text.count one step down),
   stamped whole by WebThemeSeam (GH #5937). */
.ux1-badge-count {
    font-size: var(--ttr-badge-count-fs);
    font-weight: var(--ttr-badge-count-weight);
    margin-left: calc(var(--ttr-margin-base) * 0.25);
}

/* ---- separator drag mode (GH #121 / Docs/140 §3a) -----------------------------------------
   WebPaneSeparatorControl toggles ONE of these on <html> for a drag's duration (SetRootClass;
   removed on release / blur-cancel / unmount). The !important descendant rules are the point:
   the generic listener path has no preventDefault, and descendants carry their own cursor
   declarations (buttons pointer, inputs text), so only a class-keyed override can hold the
   resize cursor and suppress native text selection across the WHOLE page while the
   arrange-lagged pointer travels far outside the thin band. */

html.ux1-drag-col, html.ux1-drag-col *,
html.ux1-drag-row, html.ux1-drag-row *,
html.ux1-drag-move, html.ux1-drag-move * {
    user-select: none !important;
}

html.ux1-drag-col, html.ux1-drag-col * { cursor: col-resize !important; }
html.ux1-drag-row, html.ux1-drag-row * { cursor: row-resize !important; }
html.ux1-drag-move, html.ux1-drag-move * { cursor: move !important; }

/* ---- target mode (GH #1751 / #1782, Docs/158) ------------------------------------------------
   The crosshair the quasimode wears, on the SAME root-class mechanism the separator drag uses and
   for the identical reason: descendants carry their own cursor declarations (buttons pointer,
   inputs text), so nothing but a class-keyed !important rule can hold one cursor across the whole
   page for a mode's duration. WebTargetModeService toggles it through SetRootClass on enter/exit —
   the DOM twin of WPF's Mouse.OverrideCursor = Cursors.Cross.

   The mode's own surfaces are EXCLUDED from the rule rather than overridden by a second one, and
   that is a correction rather than a style preference (GH #1782 review, finding 2). The first
   spelling was a second `!important` declaring `pointer` over every exempt element and descendant —
   and an author `!important` outranks an author-normal INLINE declaration, so it beat
   WebMenuCard's own inline `cursor: default` on a disabled row and reached the non-interactive
   caption rows (the header naming the target, the accelerator hint) which set no cursor at all.
   Measured live on dev slot 1 before the fix: the header row `Operations for Title` read
   `cursor: pointer` while the mode was up — a row that cannot be picked advertising pickability,
   which is the opposite of what the exemption is for.

   `:not()` with a descendant selector inside it is the fix: the crosshair simply never applies
   inside an exempt subtree, so each element there keeps the cursor it would have with the mode off
   — inline `pointer` on an invocable row, inline `default` on a disabled one, the icon button's own
   class rule on the affordance. Nothing has to enumerate which descendants are interactive, which
   is the list that would go wrong the day a menu grows a checkbox. */
html.ux1-target-mode,
html.ux1-target-mode *:not([data-ttr-mode-exempt], [data-ttr-mode-exempt] *) {
    cursor: crosshair !important;
}

/* ---- appearance picker (Docs/141 §2.9, atom-generated since GH #623) ------------------------
   Gear: floating launcher-chrome affordance top-right of the chrome root (the rail toggle only
   exists while docked, so the gear owns its spot). Icon-button chrome + Material Symbols
   ligature glyph.

   Dialog: the DialogWindow-role chrome (.ux1-dialog-window). Its CONTENT is generated from
   TaAppearanceDraft through the ordinary partition/idiom pipeline, so the hand-rolled row / title /
   button-band rules that used to live here are gone with the form they styled — including the
   selects' hand-rolled 9 em floor, which the axis control now takes from the chrome table's
   TextBox.MinWidth (GH #394; the chrome-literal gate's web allowlist row for that field went with
   it). The box's own bounds are Ux1InteractionWindowSizing's, applied inline like every other
   presented surface, so nothing here restates a width either. */

/* The floating affordance cluster (GH #737): the appearance gear and the assistant toggle, stacked
   inward from the chrome root's trailing top corner. `top`/`right` are NOT authored here — every
   member's offset is stamped inline from Ux1FloatingChromeClusterLayout, which also states the
   footprint the cluster reserves from other trailing-edge surfaces. The two used to be `right:`
   literals in this file, so nothing in the tree said how much room the cluster took, and three
   docked-pane headers drew their close ✕ into exactly these pixels. Placement and reservation are
   now one statement and cannot drift apart. */
.ux1-appearance-gear,
.ux1-assistant-toggle,
.ux1-chrome-overflow {
    position: absolute;
    /* Ux1StackingLayer.FloatingChrome (GH #804) — strictly BELOW .ux1-overlay-card. The two were
       both a bare 40, so an open menu overlapping the cluster won or lost on document order. */
    z-index: var(--ttr-z-floating-chrome);
    font-family: "Material Symbols Outlined";
    font-size: calc(var(--ttr-font-size) * 1.15);
}

/* Auxiliary region: the host-owned pane edge (the assistant conversation). Structurally the right
   dock region's twin — fixed width from Ux1DockSizing.EdgePanelWidth, hidden until something
   mounts — but a region of its own, because the dock host's edges belong to the coordinator's
   registry and this pane is not an interaction row (see WebChrome.MountAuxiliaryPane). */
.ux1-aux-region {
    display: none;
    flex: none;
    min-width: 0;
    border-left: 1px solid var(--ttr-band-hairline, rgba(0, 0, 0, 0.08));
}

.ux1-chrome-body.ux1-aux-docked > .ux1-aux-region {
    display: flex;
}

.ux1-appearance-dialog {
    display: flex;
    flex-direction: column;
}

.ux1-appearance-dialog[open] {
    display: flex;
}

/* ---- attention-chip spotlight (WebSpotlightPresenter, GH #747) ------------------------------ */

/* The wash an assistant `attention` chip lays over its target atom's on-screen region. Everything
   the DESIGN states is inline and comes off Ux1SpotlightPolicy — the colour, the peak opacity, the
   duration and the easing (Ux1SpotlightPolicy.FadeCurve, spelled as the cubic-bezier its four
   numbers ARE). What lives here is renderer chrome only, per Docs/122 §5.2: positioning, the
   pointer-events rule and the stacking tier.

   `position: fixed` because the region's rect arrives as viewport coordinates
   (getBoundingClientRect) and the wash is appended to the ELECTED SURFACE's own root — so a
   spotlight on an atom inside a modal <dialog> rides that dialog's top-layer stacking context and
   is not painted under it, while the fixed box still lands on the viewport rect regardless of which
   ancestor it hangs from.

   NEVER hit-testable: the spotlight is feedback, not an affordance. A wash that swallowed the click
   that follows the user's eye to it would be worse than no wash at all (the WPF adorner's rule,
   transcribed). */
.ux1-spotlight-wash {
    position: fixed;
    pointer-events: none;
    z-index: var(--ttr-z-attention-wash);
}

/* The fade. Peak-to-zero, so the element's own opacity carries the ramp and the background stays
   the flat role colour — the same split as the WPF adorner (opaque brush + animated Opacity), which
   is what lets the two heads be compared on the curve rather than on a composited colour.

   The peak arrives as a custom property because a keyframe cannot read the element's own starting
   opacity. */
@keyframes ux1-spotlight-fade {
    from { opacity: var(--ux1-spotlight-peak); }
    to { opacity: 0; }
}

/* The animation is a SECOND class, applied only when Ux1MotionPreference says animations are on —
   the .ux1-loading-pulse shape (GH #900), and for the same reason. Ux1SpotlightWash.ReduceMotion
   makes the wash HOLD at peak and then clear rather than ramping, so folding the animation into the
   base class would leave a reduced-motion theme choosing between a ramp and no highlight at all,
   and removing the highlight answers an accessibility preference by deleting the affordance's only
   feedback. Not a `prefers-reduced-motion` media query: that is the OS signal, and this framework's
   gate is the THEME's motion.reduce, which the stylesheet cannot see. */
.ux1-spotlight-wash.ux1-spotlight-fading {
    animation-name: ux1-spotlight-fade;
    animation-fill-mode: forwards;
}

/* ---- target-mode chrome (WebTargetModeService, GH #1782 / Docs/158 D8 + R5) ------------------- */

/* The DESIGNATION highlight — the stroke and wash over whatever the pointer currently designates.
   Every value the design states is inline and comes off Ux1TargetModePolicy (DesignationStroke,
   DesignationWash, DesignationStrokeThickness, DesignationCornerRadius); what lives here is
   renderer chrome only, per Docs/122 §5.2: positioning, the pointer-events rule and the stacking
   tier — the .ux1-spotlight-wash split, transcribed rather than re-decided.

   `position: fixed` because the designated region's rect arrives as viewport coordinates
   (getBoundingClientRect) and the element is appended to #shell-root, which outlives the
   manager generation the region belongs to.

   NEVER hit-testable, and here that is load-bearing rather than polite: the highlight sits directly
   under the pointer by construction, so a hit-testable one would be the answer to every subsequent
   `document.elementFromPoint` and the mode would designate its own feedback. */
.ux1-target-designation {
    position: fixed;
    pointer-events: none;
    z-index: var(--ttr-z-attention-wash);
}

/* The in-mode instruction BANNER (R5). Mode legibility is a requirement, not polish: a mode a user
   enters twice a month and cannot see the exit for is entered once. Its surface is the OverlayCard
   role — Ux1TargetModePolicy.BannerRole, which the WPF slice recorded as a CORRECTION over
   StickyBanner (that role authors ink only, so the words landed on bare content).

   IT READS THE ROLE'S OWN VARS AND DOES NOT CARRY .ux1-overlay-card, and that is a decision rather
   than a copy. The class is this head's CLICK-TARGET card family: every member is registered in
   WebProbeInput.OverlayRootSelector so scope=overlay can reach the rows inside it, and
   WebOverlayRootRegistrationTests fails a member that is not. A banner has no rows and is
   pointer-events: none, so joining that family would put a surface nothing can click into the list
   `scope=overlay` picks its LAST VISIBLE member from — i.e. it could shadow the operations menu
   opened a moment later. The five declarations below are the same five --ttr-overlay-* vars the
   class reads, so a theme moves the banner and the cards together and no number is restated.

   Bottom edge per Ux1TargetModePolicy.BannerEdge, centred, with the gap stamped inline from
   BannerEdgeGap. pointer-events: none because the banner is a statement, not an affordance, and it
   floats over exactly the content the user is about to point at. */
.ux1-target-banner {
    position: fixed;
    pointer-events: none;
    z-index: var(--ttr-z-overlay-card);
    background: var(--ttr-overlay-bg, #FFFFFF);
    border: 1px solid var(--ttr-overlay-border, #B0B0B4);
    border-radius: var(--ttr-overlay-radius, calc(var(--ttr-margin-base) * 0.75));
    padding: var(--ttr-overlay-pad, calc(var(--ttr-margin-base) * 2));
    box-shadow: var(--ttr-overlay-shadow, 0 2px 8px rgba(0, 0, 0, 0.25));
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    max-width: calc(100vw - var(--ttr-margin-base) * 2);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- surface material (Docs/187 §3.3, GH #5001) ------------------------------------------

   A platform skin can give a surface role a MATERIAL: glass is a translucent fill over a blurred,
   saturated backdrop with a lit rim. WebThemeSeam stamps what the theme says, per surface stem
   (band / dtitle / footer / sheet / overlay / actionbar): `-bg` is the role's OPAQUE fill, `-glass`
   the fill a backdrop-capable engine paints, `-edge` the rim and, for the three that float (sheet,
   overlay, actionbar — the D27 bar, GH #5169), `-backdrop` the filter.

   THIS BLOCK IS THE ONE PLACE THAT DECIDES WHICH OF THE TWO A SURFACE PAINTS. It derives
   `-paint` and `-rim` per stem (and `-blur` for the floating three), and every consumer reads those: the class rules
   below and, for surfaces styled inline, WebChromeCss.SurfacePaint. The first :root block is the
   OPAQUE TINT, which is the fallback by construction (a head with no backdrop capability draws the
   opaque tint): an engine without backdrop-filter never leaves it, and a visitor asking for reduced
   transparency is put back on it by the media block, live, with no re-stamp.

   The reduced-transparency block is LAST and unconditional, deliberately not an `@media not (...)`
   around the glass block: an engine that does not know the feature drops this block and keeps the
   glass, where the negated form would evaluate unknown and switch the glass off for it.

   Under the brand and the material skin every `-glass` equals its `-bg`, every `-backdrop` is
   `none` and every `-edge` is the zero shadow, so this block changes no pixel there. Tonal
   elevation needs nothing here: the tint is already composed into `-bg`. */
:root {
    --ttr-band-paint: var(--ttr-band-bg, #F5F5F7);
    --ttr-band-rim: 0 0 0 0 transparent;
    --ttr-dtitle-paint: var(--ttr-dtitle-bg, #F5F5F7);
    --ttr-dtitle-rim: 0 0 0 0 transparent;
    --ttr-footer-paint: var(--ttr-footer-bg, transparent);
    --ttr-footer-rim: 0 0 0 0 transparent;
    --ttr-sheet-paint: var(--ttr-sheet-bg, #FFFFFF);
    --ttr-sheet-blur: none;
    --ttr-sheet-rim: 0 0 0 0 transparent;
    --ttr-overlay-paint: var(--ttr-overlay-bg, #FFFFFF);
    --ttr-overlay-blur: none;
    --ttr-overlay-rim: 0 0 0 0 transparent;
    --ttr-actionbar-paint: var(--ttr-actionbar-bg, #F5F5F7);
    --ttr-actionbar-blur: none;
    --ttr-actionbar-rim: 0 0 0 0 transparent;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root {
        --ttr-band-paint: var(--ttr-band-glass, var(--ttr-band-bg, #F5F5F7));
        --ttr-band-rim: var(--ttr-band-edge, 0 0 0 0 transparent);
        --ttr-dtitle-paint: var(--ttr-dtitle-glass, var(--ttr-dtitle-bg, #F5F5F7));
        --ttr-dtitle-rim: var(--ttr-dtitle-edge, 0 0 0 0 transparent);
        --ttr-footer-paint: var(--ttr-footer-glass, var(--ttr-footer-bg, transparent));
        --ttr-footer-rim: var(--ttr-footer-edge, 0 0 0 0 transparent);
        --ttr-sheet-paint: var(--ttr-sheet-glass, var(--ttr-sheet-bg, #FFFFFF));
        --ttr-sheet-blur: var(--ttr-sheet-backdrop, none);
        --ttr-sheet-rim: var(--ttr-sheet-edge, 0 0 0 0 transparent);
        --ttr-overlay-paint: var(--ttr-overlay-glass, var(--ttr-overlay-bg, #FFFFFF));
        --ttr-overlay-blur: var(--ttr-overlay-backdrop, none);
        --ttr-overlay-rim: var(--ttr-overlay-edge, 0 0 0 0 transparent);
        --ttr-actionbar-paint: var(--ttr-actionbar-glass, var(--ttr-actionbar-bg, #F5F5F7));
        --ttr-actionbar-blur: var(--ttr-actionbar-backdrop, none);
        --ttr-actionbar-rim: var(--ttr-actionbar-edge, 0 0 0 0 transparent);
    }
}

@media (prefers-reduced-transparency: reduce) {
    :root {
        --ttr-band-paint: var(--ttr-band-bg, #F5F5F7);
        --ttr-band-rim: 0 0 0 0 transparent;
        --ttr-dtitle-paint: var(--ttr-dtitle-bg, #F5F5F7);
        --ttr-dtitle-rim: 0 0 0 0 transparent;
        --ttr-footer-paint: var(--ttr-footer-bg, transparent);
        --ttr-footer-rim: 0 0 0 0 transparent;
        --ttr-sheet-paint: var(--ttr-sheet-bg, #FFFFFF);
        --ttr-sheet-blur: none;
        --ttr-sheet-rim: 0 0 0 0 transparent;
        --ttr-overlay-paint: var(--ttr-overlay-bg, #FFFFFF);
        --ttr-overlay-blur: none;
        --ttr-overlay-rim: 0 0 0 0 transparent;
        --ttr-actionbar-paint: var(--ttr-actionbar-bg, #F5F5F7);
        --ttr-actionbar-blur: none;
        --ttr-actionbar-rim: 0 0 0 0 transparent;
    }
}

/* The class-styled surfaces. PAINT declarations only, stated after each surface's own rule so
   they win at equal specificity without that rule being edited. Each `box-shadow` restates the
   surface's own shadow var behind the rim, because the property is one list. */
.ux1-dialog-header {
    background: var(--ttr-dtitle-paint);
    box-shadow: var(--ttr-dtitle-rim);
}

/* The class-drawn surface that wears the TOOLBAR band's paint (GH #5141): the dock's collapse strip.
   It read --ttr-band-bg directly and stayed opaque under glass while every inline band beside it took
   the glass fill. Since GH #6681 T1 that paint is no fill at all, so the strip's chevron sits on the
   surface with its own hairline beside it. */
.ux1-rail-toggle {
    background: var(--ttr-band-paint);
    box-shadow: var(--ttr-band-rim);
}

/* A docked pane's header IS the title band (it carries the same decided title and reads the
   DialogTitleBand inset, GH #213 / GH #369), so it wears the title band's paint: it kept the band tint
   when GH #6681 T1 took the toolbar's, exactly as the .ux1-dialog-header beside it did. */
.ux1-dock-pane-header {
    background: var(--ttr-dtitle-paint);
    box-shadow: var(--ttr-dtitle-rim);
}

/* The bottom sheet paints its OWN role (SheetSurface). It took the text button's surface off the
   .ux1-dialog base — the same colour under every shipped theme, and a role no skin could reach. */
.ux1-dialog-sheet {
    background: var(--ttr-sheet-paint);
    box-shadow: var(--ttr-sheet-rim), var(--ttr-dialog-shadow, 0 8px 32px rgba(0, 0, 0, 0.3));
}

.ux1-overlay-card,
.ux1-target-banner {
    background: var(--ttr-overlay-paint);
    box-shadow: var(--ttr-overlay-rim), var(--ttr-overlay-shadow, 0 2px 8px rgba(0, 0, 0, 0.25));
}

/* THE BLUR, on the surfaces that FLOAT over content — the sheet, the one card every menu and
   popover is drawn on, and the D27 primary action bar parked over the content's bottom trailing
   corner (GH #5169; it paints -paint and -rim inline, through WebChromeCss.SurfacePaint). A band
   and a title band sit in flow with nothing behind them to blur, so they take the fill and the rim
   and no filter.

   On a ::before, never on the surface itself: a non-none backdrop-filter makes its element the
   containing block of every position:fixed descendant, and these surfaces HOLD fixed-position
   cards (a choice popup inside the filter popover, a picker inside the appearance sheet) that
   place themselves in viewport coordinates. The pseudo-element is out of flow, takes no pointer
   events and sits under the surface's content (z-index -1 inside the stacking context a fixed,
   z-indexed card and a top-layer dialog each form), so under an opaque skin, where the filter is
   `none`, it paints and moves nothing. */
.ux1-dialog-sheet::before,
.ux1-overlay-card::before,
.ux1-target-banner::before,
.ux1-primary-action-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* stacking-exempt: orders the pseudo-element under its own surface's content, inside that surface's stacking context; no shell layer */
    border-radius: inherit;
    pointer-events: none;
}

.ux1-dialog-sheet::before {
    -webkit-backdrop-filter: var(--ttr-sheet-blur);
    backdrop-filter: var(--ttr-sheet-blur);
}

.ux1-overlay-card::before,
.ux1-target-banner::before {
    -webkit-backdrop-filter: var(--ttr-overlay-blur);
    backdrop-filter: var(--ttr-overlay-blur);
}

.ux1-primary-action-bar::before {
    -webkit-backdrop-filter: var(--ttr-actionbar-blur);
    backdrop-filter: var(--ttr-actionbar-blur);
}

/* THE BLUR STAYS ON THE BOX THAT IS SHOWING when the surface scrolls ITSELF (GH #5141). An
   absolutely positioned child of a scroll container scrolls WITH the content, so on a card that is
   its own scroller (a menu, a columns list, a cheatsheet, a picker sheet — `overflow-y: auto` on
   the card element) the ::before above left with the rows and the card's lower band showed the
   page through the 0.72 fill unblurred: measured on dev slot 4, the grid columns menu scrolled
   39 px with the blur box 39 px short of the card's bottom edge.

   Each surface names ITS OWN block-axis scroll timeline and its ::before follows it, translated by
   exactly the distance scrolled: the keyframes run 0 → 100000px over a range of 0 → 100000px of
   scroll offset, so progress × distance is the offset itself (100000px is not a size anything
   paints at; it is the longest scroll this pins, far past any card's capped content). A NAMED
   timeline rather than scroll(nearest), because a surface that does not scroll would otherwise find
   the next scroller OUT and move with the page; named, a surface that is no scroll container, or
   one with nothing to scroll, leaves the timeline inactive and the pseudo-element where it stands.
   A nested card finds its own name first. The translated box ends at the scroller's own bottom, so
   it adds no scrollable overflow.

   Not motion: nothing animates on screen, the blur just stays put, so no motion preference gates it.
   An engine without scroll-driven animations (Safari before 26, Firefox without the flag) drops
   this block and keeps the behaviour above. */
@supports (animation-timeline: scroll()) {
    .ux1-dialog-sheet,
    .ux1-overlay-card {
        scroll-timeline: --ttr-surface-scroll block;
    }

    .ux1-dialog-sheet::before,
    .ux1-overlay-card::before {
        animation: ttr-surface-pin auto linear both;
        animation-timeline: --ttr-surface-scroll;
        animation-range: 0px 100000px;
    }
}

@keyframes ttr-surface-pin {
    from { translate: 0 0; }
    to { translate: 0 100000px; }
}
