/* ForgeOS shared components, built only on platform tokens: button, close button, toast,
 * dialog and sheet, field, select, check and switch, chip, badge, avatar, figure, card,
 * empty state, skeleton, menu, segmented control, tooltip and table wrapper. Wave 8
 * (2026-10-28) added everything after the toast, so a page asks for one of these rather
 * than drawing its own; /os/system shows each with its class.
 *
 * Why it exists (design-system audit, 2026-10-24): a class scan found 87
 * first classes on <button> and fifteen separate *-btn families. The same
 * primary action was an indigo pill at 38px, an indigo pill at 52px, an
 * orange circle at 40px and a cream pill at 44px, so it was never obvious
 * what could be pressed. Seven lanes were rewriting the page sheets at the
 * time, so the component lives here and the families move onto it from the
 * migration plan rather than in one sweep. /os/system draws every piece from
 * this file, so the reference cannot drift from what ships.
 *
 * forgeos-ui.js links this sheet itself on first use, so a page that only
 * needs a dialog now and then pays nothing until then. */

/* ── Button ─────────────────────────────────────────────────────────────── */
.m19-btn {
  --b-bg: var(--m19-surface); --b-ink: var(--m19-ink); --b-line: var(--m19-line-strong);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--m19-space-2);
  min-block-size: var(--m19-tap); padding-block: 0; padding-inline: var(--m19-space-4);
  border: 1px solid var(--b-line); border-radius: var(--m19-radius-pill);
  background: var(--b-bg); color: var(--b-ink);
  font: inherit; font-size: var(--m19-text-md); font-weight: var(--m19-weight-semibold); line-height: 1.2;
  text-decoration: none; white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--m19-motion-fast) var(--m19-ease-out),
    border-color var(--m19-motion-fast) var(--m19-ease-out), transform var(--m19-motion-fast) var(--m19-ease-out);
}
.m19-btn:hover { --b-bg: var(--m19-surface-2); }
.m19-btn:active { transform: translateY(1px); }
.m19-btn:focus-visible { outline: var(--m19-focus-ring); outline-offset: var(--m19-focus-offset); }
.m19-btn:disabled, .m19-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.m19-btn svg { inline-size: 1.15em; block-size: 1.15em; flex: none; }

.m19-btn--primary { --b-bg: var(--m19-brand-600); --b-ink: var(--m19-on-accent-light); --b-line: var(--m19-brand-600); }
/* The label is white in both themes, so hover only ever darkens the ground. */
.m19-btn--primary:hover { --b-bg: color-mix(in srgb, var(--m19-brand-600) 86%, black); }
.m19-btn--quiet { --b-bg: transparent; --b-ink: var(--m19-ink-2); --b-line: transparent; }
.m19-btn--quiet:hover { --b-bg: var(--m19-surface-2); --b-ink: var(--m19-ink); }
/* White on the danger fill measures 3.3:1; the ink tone is the ground a label
   survives on, and surface inverts with it in dark (tests/test_design_system.py). */
.m19-btn--danger { --b-bg: var(--m19-state-danger-ink); --b-ink: var(--m19-surface); --b-line: var(--m19-state-danger-ink); }
/* Toward ink, which is away from the label in both themes. */
.m19-btn--danger:hover { --b-bg: color-mix(in srgb, var(--m19-state-danger-ink) 88%, var(--m19-ink)); }

/* Small draws at 36px and still takes a 44px press: the hit area grows, the ink does not. */
.m19-btn--sm { min-block-size: 36px; padding-inline: var(--m19-space-3); font-size: var(--m19-text-sm); }
.m19-btn--sm::after { content: ""; position: absolute; inset: -4px 0; }
.m19-btn--lg { min-block-size: 52px; padding-inline: var(--m19-space-6); font-size: var(--m19-text-lg); }

/* ── Close button ───────────────────────────────────────────────────────── */
/* The cross is drawn, not a glyph: "×" sits off-centre in half the fonts we
   fall back to, and an icon font is one more thing to fail to load. */
.m19-close {
  position: relative; flex: none;
  inline-size: var(--m19-tap); block-size: var(--m19-tap); padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--m19-ink-2); cursor: pointer;
  transition: background-color var(--m19-motion-fast) var(--m19-ease-out);
}
.m19-close::before, .m19-close::after {
  content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: 50%;
  inline-size: 16px; block-size: 2px; margin: -1px 0 0 -8px; border-radius: 1px; background: currentColor;
  transform: rotate(45deg);
}
.m19-close::after { transform: rotate(-45deg); }
.m19-close:hover { background: var(--m19-surface-2); color: var(--m19-ink); }
.m19-close:focus-visible { outline: var(--m19-focus-ring); outline-offset: 0; }

/* ── Toast ──────────────────────────────────────────────────────────────── */
/* The region is a manual popover where the browser has one, so it sits in the top layer
   above every page's own stack however high that numbers; the token is the fallback. */
.m19-toasts {
  position: fixed; z-index: var(--m19-z-toast); inset-inline: 0;
  inset-block-end: calc(var(--m19-space-4) + env(safe-area-inset-bottom));
  display: grid; justify-items: center; gap: var(--m19-space-2);
  padding-inline: var(--m19-space-4); pointer-events: none;
}
.m19-toasts[popover] { inset-block-start: auto; inline-size: auto; block-size: auto; margin: 0; padding-block: 0; border: 0; background: none; overflow: visible; }
.m19-toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--m19-space-2);
  inline-size: min(480px, 100%); min-block-size: 52px;
  padding-block: var(--m19-space-1); padding-inline: var(--m19-space-4) var(--m19-space-1);
  border-radius: var(--m19-radius-md); box-shadow: var(--m19-shadow-lg);
  background: var(--m19-ink); color: var(--m19-surface);
  font-size: var(--m19-text-md); line-height: 1.4;
  animation: m19-rise var(--m19-motion-base) var(--m19-ease-out) both;
}
.m19-toast-text { flex: 1; min-inline-size: 0; overflow-wrap: break-word; }
.m19-toast .m19-btn--quiet { --b-ink: var(--m19-surface); }
.m19-toast .m19-btn--quiet:hover { --b-bg: color-mix(in srgb, var(--m19-surface) 14%, transparent); }
.m19-toast .m19-close { color: var(--m19-surface); }
.m19-toast .m19-close:hover { background: color-mix(in srgb, var(--m19-surface) 14%, transparent); }
@keyframes m19-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Confirm dialog ─────────────────────────────────────────────────────── */
.m19-dialog {
  inline-size: min(440px, calc(100vw - 2 * var(--m19-space-4))); max-block-size: calc(100dvh - 2 * var(--m19-space-4));
  padding: var(--m19-space-6); border: 1px solid var(--m19-line); border-radius: var(--m19-radius-lg);
  background: var(--m19-surface); color: var(--m19-ink); box-shadow: var(--m19-shadow-lg);
  font-size: var(--m19-text-md); line-height: 1.5;
}
.m19-dialog::backdrop { background: var(--m19-scrim); }
.m19-dialog-title { margin: 0 0 var(--m19-space-2); font-size: var(--m19-text-lg); font-weight: var(--m19-weight-semibold); line-height: 1.3; }
.m19-dialog-body { margin: 0; color: var(--m19-ink-2); overflow-wrap: break-word; }
.m19-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--m19-space-2); margin-block-start: var(--m19-space-6); }
/* ── Sheet ──────────────────────────────────────────────────────────────── */
/* Advanced choices open here, never as a form in the stream: a <dialog class="m19-sheet">
   docked to the end edge on a wide screen, a bottom sheet on a phone. */
.m19-sheet {
  inline-size: min(440px, 100vw); max-inline-size: 100vw; block-size: 100dvh; max-block-size: 100dvh;
  margin: 0; margin-inline-start: auto; padding: var(--m19-space-6); border: 0; border-inline-start: 1px solid var(--m19-line);
  background: var(--m19-surface); color: var(--m19-ink); box-shadow: var(--m19-shadow-lg); overflow: auto;
}
.m19-sheet::backdrop { background: var(--m19-scrim); }
/* In from its edge and back out, the backdrop fading with it (mo-018): they rose 8px
   and went in one frame. A dialog on a wide screen pops; on a phone both are sheets. */
:is(.m19-sheet, .m19-dialog), :is(.m19-sheet, .m19-dialog)::backdrop {
  --t: var(--m19-motion-slow);
  transition: transform var(--t) var(--m19-ease-out), opacity var(--t) var(--m19-ease-out), overlay var(--t) allow-discrete, display var(--t) allow-discrete;
}
.m19-dialog { --t: var(--m19-motion-base); }
.m19-sheet:not([open]) { transform: translateX(100%); }
.m19-sheet:not([open]):dir(rtl) { transform: translateX(-100%); }
.m19-dialog:not([open]) { opacity: 0; transform: scale(.96); }
:is(.m19-sheet, .m19-dialog):not([open])::backdrop { opacity: 0; }
@starting-style {
  .m19-sheet[open] { transform: translateX(100%); }
  .m19-sheet[open]:dir(rtl) { transform: translateX(-100%); }
  .m19-dialog[open] { opacity: 0; transform: scale(.96); }
  :is(.m19-sheet, .m19-dialog)[open]::backdrop { opacity: 0; }
}

/* On a phone a dialog is a bottom sheet (design-086): a centred box sat where the thumb
   cannot reach. Full width from the bottom edge, clear of the home indicator, the two
   choices stacked full width with the one that acts on top. */
@media (max-width: 599.98px) {
  .m19-dialog, .m19-sheet {
    inline-size: 100%; max-inline-size: 100%; block-size: fit-content; max-block-size: 88dvh; margin: auto 0 0;
    padding: var(--m19-space-5) var(--m19-space-5) calc(var(--m19-space-5) + env(safe-area-inset-bottom));
    border: 0; border-block-start: 1px solid var(--m19-line); border-radius: var(--m19-radius-xl) var(--m19-radius-xl) 0 0;
  }
  .m19-dialog { --t: var(--m19-motion-slow); }
  :is(.m19-dialog, .m19-sheet):not([open]), :is(.m19-dialog, .m19-sheet):not([open]):dir(rtl) { opacity: 1; transform: translateY(100%); }
  @starting-style { :is(.m19-dialog, .m19-sheet)[open], :is(.m19-dialog, .m19-sheet)[open]:dir(rtl) { opacity: 1; transform: translateY(100%); } }
  .m19-dialog-actions { flex-direction: column-reverse; }
  .m19-dialog-actions .m19-btn { inline-size: 100%; white-space: normal; }
}

/* ── Fields ─────────────────────────────────────────────────────────────── */
/* One text field (design-094): label above, a 44px box, help below. 16px text, so a
   phone never zooms the page on focus (design-186). */
.m19-field { display: grid; align-content: start; gap: var(--m19-space-1); min-inline-size: 0; }
.m19-field > label, .m19-label { font-size: var(--m19-text-base); font-weight: var(--m19-weight-medium); color: var(--m19-ink-2); }
.m19-field :is(input, textarea), .m19-select {
  inline-size: 100%; min-block-size: var(--m19-tap); margin: 0; padding: 0 var(--m19-space-3);
  border: 1px solid var(--m19-line-strong); border-radius: var(--m19-radius-md);
  background-color: var(--m19-surface); color: var(--m19-ink); font: inherit; font-size: max(16px, 1rem);
}
.m19-field textarea { padding-block: var(--m19-space-2); line-height: 1.5; }
.m19-field :is(input, textarea):focus-visible, .m19-select:focus-visible { outline: var(--m19-focus-ring); outline-offset: 0; }
.m19-field ::placeholder { color: var(--m19-ink-3); opacity: 1; }
.m19-field [aria-invalid="true"] { border-color: var(--m19-state-danger); }
.m19-help, .m19-error { margin: 0; font-size: var(--m19-text-sm); color: var(--m19-ink-3); }
.m19-error { color: var(--m19-state-danger-ink); }
/* A native <select>, kept native for readers and phone pickers, drawn as the field is
   (design-081). The chevron is two gradients in the text colour, so it themes. */
.m19-select {
  appearance: none; block-size: var(--m19-tap); padding-inline-end: var(--m19-space-10); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 20px center, right 15px center; background-size: 5px 5px; background-repeat: no-repeat;
}
[dir="rtl"] .m19-select { background-position: left 15px center, left 20px center; }
/* A 20px box beside its label; the whole row is the 44px press (design-082). */
.m19-check { display: inline-flex; align-items: center; gap: var(--m19-space-3); min-block-size: var(--m19-tap); cursor: pointer; }
.m19-check > input:not(.m19-switch) { flex: none; inline-size: 20px; block-size: 20px; min-block-size: 0; margin: 0; padding: 0; accent-color: var(--m19-brand-600); cursor: pointer; }
/* A switch is a checkbox with role="switch", 40 by 24; the knob is a gradient, so no
   pseudo-element is asked of an <input>. Put it in a .m19-check for the press. */
input.m19-switch {
  appearance: none; flex: none; inline-size: 40px; block-size: 24px; min-block-size: 0; margin: 0; padding: 0;
  border: 0; border-radius: var(--m19-radius-pill); cursor: pointer;
  background: radial-gradient(circle at 12px 50%, var(--m19-on-accent-light) 8px, transparent 9px) var(--m19-ink-3);
}
input.m19-switch:checked { background: radial-gradient(circle at 28px 50%, var(--m19-on-accent-light) 8px, transparent 9px) var(--m19-brand-600); }
[dir="rtl"] .m19-switch { transform: scaleX(-1); }
.m19-switch:focus-visible { outline: var(--m19-focus-ring); outline-offset: var(--m19-focus-offset); }

/* ── Chip, badge, avatar, figure ───────────────────────────────────────── */
/* A suggestion chip sends words. Filled and borderless, so it never reads as a button
   that changes a setting (design-010); 36px drawn, 44px pressed. */
.m19-chip {
  position: relative; display: inline-flex; align-items: center; gap: var(--m19-space-2);
  min-block-size: 36px; padding-inline: var(--m19-space-3); border: 0; border-radius: var(--m19-radius-pill);
  background: var(--m19-surface-2); color: var(--m19-ink-2); font: inherit; font-size: var(--m19-text-sm);
  text-decoration: none; cursor: pointer; transition: background-color var(--m19-motion-fast) var(--m19-ease-out);
}
.m19-chip::after { content: ""; position: absolute; inset: -4px 0; }
.m19-chip:hover { background: var(--m19-surface-3); color: var(--m19-ink); }
.m19-chip[aria-pressed="true"] { background: var(--m19-brand-100); color: var(--m19-brand-700); }
.m19-badge {
  display: inline-flex; align-items: center; min-block-size: 20px; padding-inline: var(--m19-space-2);
  border-radius: var(--m19-radius-pill); background: var(--m19-state-neutral-soft); color: var(--m19-state-neutral-ink);
  font-size: var(--m19-text-xs); font-weight: var(--m19-weight-semibold); white-space: nowrap;
}
.m19-badge[data-tone="success"] { background: var(--m19-state-success-soft); color: var(--m19-state-success-ink); }
.m19-badge[data-tone="warning"] { background: var(--m19-state-warning-soft); color: var(--m19-state-warning-ink); }
.m19-badge[data-tone="danger"] { background: var(--m19-state-danger-soft); color: var(--m19-state-danger-ink); }
.m19-badge[data-tone="accent"] { background: var(--m19-brand-100); color: var(--m19-brand-700); }
/* One avatar (design-093): one initial, written as a capital, on the accent's lightest tint. */
.m19-avatar {
  display: inline-grid; place-items: center; flex: none; inline-size: 32px; block-size: 32px; border-radius: 50%;
  background: var(--m19-brand-100); color: var(--m19-brand-700); overflow: hidden;
  font-size: var(--m19-text-base); font-weight: var(--m19-weight-semibold); line-height: 1;
}
/* A figure that changes keeps its width (design-052). */
.m19-stat { display: grid; gap: var(--m19-space-1); }
.m19-stat-value { font-size: var(--m19-text-2xl); font-weight: var(--m19-weight-semibold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.m19-stat-label { font-size: var(--m19-text-sm); color: var(--m19-ink-3); }

/* ── Card, empty state, skeleton ───────────────────────────────────────── */
.m19-card { min-inline-size: 0; padding: var(--m19-space-5); border: 1px solid var(--m19-line); border-radius: var(--m19-radius-lg); background: var(--m19-surface); box-shadow: var(--m19-shadow-xs); }
.m19-empty { display: grid; justify-items: center; gap: var(--m19-space-2); padding: var(--m19-space-10) var(--m19-space-4); text-align: center; color: var(--m19-ink-2); }
.m19-empty[hidden] { display: none; }
.m19-empty-title { margin: 0; font-size: var(--m19-text-lg); font-weight: var(--m19-weight-semibold); color: var(--m19-ink); }
.m19-empty p { margin: 0; max-inline-size: 36em; }
/* The shape of what is coming, never a bare "Loading…" (design-021). Give it the final
   row's size; the shimmer stops under reduced motion. */
.m19-skeleton {
  display: block; min-block-size: 1em; border-radius: var(--m19-radius-xs);
  background: linear-gradient(90deg, var(--m19-surface-2) 30%, var(--m19-surface-3) 50%, var(--m19-surface-2) 70%) 0 0 / 300% 100%;
  animation: m19-shimmer 1.2s linear infinite;
}
@keyframes m19-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ── Menu ───────────────────────────────────────────────────────────────── */
/* One menu (design-092): the account, +, title and row menus had four paddings, radii
   and icon sizes. Set --m19-menu-origin to the anchor's corner so it grows from there. */
.m19-menu {
  z-index: var(--m19-z-menu); min-inline-size: 200px; padding: 6px; border: 1px solid var(--m19-line);
  border-radius: var(--m19-radius-md); background: var(--m19-surface); color: var(--m19-ink); box-shadow: var(--m19-shadow-md);
  transform-origin: var(--m19-menu-origin, top left); animation: m19-pop var(--m19-motion-fast) var(--m19-ease-out) both;
}
.m19-menu-item {
  display: flex; align-items: center; gap: var(--m19-space-3); inline-size: 100%; min-block-size: 40px;
  padding-inline: var(--m19-space-3); border: 0; border-radius: var(--m19-radius-sm); background: none; color: inherit;
  font: inherit; font-size: var(--m19-text-base); text-align: start; text-decoration: none; cursor: pointer;
}
.m19-menu-item svg { inline-size: 18px; block-size: 18px; flex: none; color: var(--m19-ink-2); }
.m19-menu-item:hover { background: var(--m19-surface-2); outline: none; }
/* The tint alone is about 1.1:1 and gone in High Contrast (a9-098). */
.m19-menu-item:focus-visible { background: var(--m19-surface-2); outline: var(--m19-focus-ring); outline-offset: -2px; }
.m19-menu-item:is([aria-checked="true"], [aria-current]) { color: var(--m19-brand-700); }
.m19-menu-sep { block-size: 1px; margin: 6px 0; border: 0; background: var(--m19-line); }
@media (pointer: coarse) { .m19-menu-item { min-block-size: 48px; } }
@keyframes m19-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* ── Segmented control ─────────────────────────────────────────────────── */
/* Tabs that look like tabs (design-095): one track, the chosen segment raised. One row
   at every width; a phone scrolls it sideways rather than wrapping it into a grid. */
.m19-segmented {
  display: flex; gap: 2px; inline-size: max-content; max-inline-size: 100%; block-size: 40px; padding: 3px;
  border-radius: var(--m19-radius-pill); background: var(--m19-surface-2); overflow-x: auto; scrollbar-width: none;
}
.m19-segmented > [role="tab"] {
  flex: none; padding-inline: var(--m19-space-4); border: 0; border-radius: var(--m19-radius-pill);
  background: none; color: var(--m19-ink-2); font: inherit; font-size: var(--m19-text-base); font-weight: var(--m19-weight-medium);
  white-space: nowrap; cursor: pointer;
}
.m19-segmented > [aria-selected="true"] { background: var(--m19-surface); color: var(--m19-ink); box-shadow: var(--m19-shadow-xs); }
.m19-segmented > [role="tab"]:focus-visible { outline: var(--m19-focus-ring); outline-offset: -3px; }

/* ── Tooltip ────────────────────────────────────────────────────────────── */
/* The name of an icon-only control on hover or focus, after 400ms (design-101).
   forgeos-ui.js places it; the control's aria-label stays its real name. */
.m19-tip {
  position: fixed; z-index: var(--m19-z-toast); max-inline-size: 240px; padding: 6px var(--m19-space-2);
  border-radius: var(--m19-radius-xs); background: var(--m19-ink); color: var(--m19-surface);
  font-size: var(--m19-text-sm); line-height: 1.3; pointer-events: none; animation: m19-pop var(--m19-motion-fast) var(--m19-ease-out) both;
}
.m19-tip kbd { margin-inline-start: var(--m19-space-2); font: inherit; opacity: .7; }

/* ── Wide tables ────────────────────────────────────────────────────────── */
/* A table wider than a phone scrolls inside its own box, never the page. The
   box takes focus (tabindex=0, role=region, a name) so a keyboard can scroll it. */
.m19-table-wrap { max-inline-size: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.m19-table-wrap:focus-visible { outline: var(--m19-focus-ring); outline-offset: var(--m19-focus-offset); }
.m19-table-wrap > table { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .m19-btn, .m19-close, .m19-chip, .m19-switch { transition: none; }
  .m19-btn:active { transform: none; }
  .m19-toast, .m19-menu, .m19-tip, .m19-skeleton { animation: none; }
  :is(.m19-sheet, .m19-dialog), :is(.m19-sheet, .m19-dialog)::backdrop { transition: none; }
}
@media (forced-colors: active) {
  .m19-btn { border-color: ButtonText; }
  .m19-btn--primary, .m19-btn--danger { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .m19-close::before, .m19-close::after { background: ButtonText; }
  .m19-toast, .m19-dialog, .m19-sheet, .m19-menu, .m19-tip, .m19-card, .m19-chip, .m19-badge, .m19-segmented { border: 1px solid CanvasText; }
  .m19-segmented > [aria-selected="true"], .m19-switch:checked { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .m19-switch { border: 1px solid ButtonText; }
  .m19-btn:focus-visible, .m19-close:focus-visible, .m19-table-wrap:focus-visible { outline-color: Highlight; }
}

/* ── Reading choices (c9-082) ───────────────────────────────────────────── */
/* Settings → Preferences, set on the root by forgeos-css-loader.js. The text
   sizes scale every rem on the page, as a step of the reading size token
   (1rem at the root, so 110% is 1.1 of it); the easier font is plain, open letter
   shapes with wider letter and word spacing (British Dyslexia Association
   style guide), from fonts the device already has. */
:root[data-fx-text="90"] { font-size: calc(var(--m19-text-md) * .9); }
:root[data-fx-text="110"] { font-size: calc(var(--m19-text-md) * 1.1); }
:root[data-fx-text="120"] { font-size: calc(var(--m19-text-md) * 1.2); }
:root[data-fx-text="130"] { font-size: calc(var(--m19-text-md) * 1.3); }
:root[data-fx-font="system"] body { --font: system-ui, sans-serif; --m19-font: system-ui, sans-serif; }
:root[data-fx-font="readable"] body {
  --font: "Atkinson Hyperlegible", Verdana, Tahoma, "Segoe UI", system-ui, sans-serif; --m19-font: var(--font);
  letter-spacing: .02em; word-spacing: .08em;
}
:root[data-fx-font="readable"] .cw-bubble { line-height: 1.7; }
/* "Les fichiers ne sont pas encore sur ce serveur" was cut at 12 letters in
   the chat's rail (a9-169): the note wraps under the name, which ends in an
   ellipsis. Here, not in forgeos-chat.css: the rows are drawn after a fetch. */
#rail .cw-rail-label:has(> .cw-rail-off) { text-overflow: ellipsis; -webkit-mask-image: none; mask-image: none; }
#rail .cw-rail-off { white-space: normal; }
/* A toggled control's own display never beats the hidden attribute. */
.m19-btn[hidden], .m19-toast[hidden], .m19-field[hidden] { display: none; }

/* site-10: the browser's own "Choose files" button wears the shared button: it was the one unstyled control
   on the page (Marketplace, Studio, Docs, Home, the chat), drawn by each browser its own way. */
input[type="file"]::file-selector-button {
  min-block-size: var(--m19-tap); margin-inline-end: var(--m19-space-3); padding-inline: var(--m19-space-4);
  border: 1px solid var(--m19-line-strong); border-radius: var(--m19-radius-pill);
  background: var(--m19-surface); color: var(--m19-ink);
  font: inherit; font-size: var(--m19-text-sm); font-weight: var(--m19-weight-semibold); cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--m19-surface-2); }
