Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

135 KB
Raw Blame
/* Model Hub visual tokens.
 *
 * Every color resolves through a theme token, so the surface follows the app's
 * light/dark switch instead of assuming the dark frame it was drawn on. The base
 * block carries the dark values; the two light blocks below mirror the
 * structure index.css uses ([data-theme="light"] for the explicit pick, the media
 * query for "system") and re-state only what cannot simply flip channel.
 *
 * Washes (fills, hairline borders) flip the neutral channel at the same alpha,
 * exactly as --border / --input do in index.css. Inks cannot: white at 55% over
 * the dark frame is a legible label, while the same alpha over #ffffff is white
 * on white — the defect this file shipped. Each light ink step re-anchors on
 * --muted, whose light value is already contrast-matched to its dark one.
 *
 * Accent washes need no light branch: color-mix over --gold / --violet / --mint /
 * --cyan / --destructive lands on the dark accent hex in dark mode and follows
 * the light accents on its own. Accent *inks* do need one, because an accent
 * dimmed toward transparency reads as "quiet" over black and "washed out" over
 * white; light re-anchors those on the full ink.
 *
 * Which accent token a rule reaches for follows index.css: a fill, hairline or
 * wire takes --X, and anything that renders as text or an icon takes --X-ink.
 * They are different values in light, where a vivid brand fill and a legible
 * label pull in opposite directions.
 *
 * Where a token is declared follows one rule: it has to resolve wherever it is
 * read. A name declared on a dialog root is only in scope under that root, so
 * a class that travels -- rendered under a second root, or portalled out of the
 * first -- reads nothing there and the property falls back to its initial
 * value, drawing nothing rather than failing. So a token one class reads is
 * declared on that class; a token several classes read is declared in the
 * shared `:root` block below; a token that styles a root's own chrome stays on
 * the root, because the root is its only reader. The exception is a use written
 * `var(--x, fallback)`: it draws either way, so declaring --x on a context root
 * is a deliberate override there rather than the defect above.
 * `scripts/travellingTokens.mjs` checks this for the shared guard body, the
 * class the defect was found on. Extending that check to every class this file
 * styles is #1856: the generalized version drew a fresh finding on every
 * review, because answering "which elements does this selector match" in the
 * general case is a re-implementation of the cascade.
 */
:root {
  --route-manual-soft: color-mix(in srgb, var(--route-manual) 12%, transparent);
  --route-manual-border: color-mix(in srgb, var(--route-manual) 25%, transparent);
  /* Neutral wash channel: white over the dark frame. */
  --model-hub-wash-channel: 255 255 255;
  --model-hub-wash-03: rgb(var(--model-hub-wash-channel) / 1.2%);
  --model-hub-wash-05: rgb(var(--model-hub-wash-channel) / 2%);
  --model-hub-wash-06: rgb(var(--model-hub-wash-channel) / 2.4%);
  --model-hub-wash-08: rgb(var(--model-hub-wash-channel) / 3.1%);
  --model-hub-wash-0a: rgb(var(--model-hub-wash-channel) / 3.9%);
  --model-hub-wash-0f: rgb(var(--model-hub-wash-channel) / 5.9%);
  --model-hub-wash-14: rgb(var(--model-hub-wash-channel) / 7.8%);
  --model-hub-wash-24: rgb(var(--model-hub-wash-channel) / 14.1%);
  --model-hub-wash-33: rgb(var(--model-hub-wash-channel) / 20%);

  /* Ink ladder, each step named for its alpha byte on the dark frame. */
  --model-hub-ink-40: rgb(var(--model-hub-wash-channel) / 25%);
  --model-hub-ink-4d: rgb(var(--model-hub-wash-channel) / 30.2%);
  --model-hub-ink-59: rgb(var(--model-hub-wash-channel) / 34.9%);
  --model-hub-ink-73: rgb(var(--model-hub-wash-channel) / 45.1%);
  --model-hub-ink-8c: rgb(var(--model-hub-wash-channel) / 54.9%);
  --model-hub-muted-b3: color-mix(in srgb, var(--muted) 70.2%, transparent);
  --model-hub-muted-cc: color-mix(in srgb, var(--muted) 80%, transparent);

  /* Accent washes: tiles, pills, status strips, hairlines. */
  --model-hub-gold-14: color-mix(in srgb, var(--gold) 7.8%, transparent);
  --model-hub-gold-1a: color-mix(in srgb, var(--gold) 10.2%, transparent);
  --model-hub-gold-4d: color-mix(in srgb, var(--gold) 30.2%, transparent);
  --model-hub-gold-59: color-mix(in srgb, var(--gold) 34.9%, transparent);
  --model-hub-gold-66: color-mix(in srgb, var(--gold) 40%, transparent);
  --model-hub-violet-1a: color-mix(in srgb, var(--violet) 10.2%, transparent);
  --model-hub-violet-24: color-mix(in srgb, var(--violet) 14.1%, transparent);
  --model-hub-violet-4d: color-mix(in srgb, var(--violet) 30.2%, transparent);
  --model-hub-mint-14: color-mix(in srgb, var(--mint) 7.8%, transparent);
  --model-hub-mint-1a: color-mix(in srgb, var(--mint) 10.2%, transparent);
  --model-hub-mint-4d: color-mix(in srgb, var(--mint) 30.2%, transparent);
  --model-hub-cyan-1a: color-mix(in srgb, var(--cyan) 10.2%, transparent);
  --model-hub-cyan-4d: color-mix(in srgb, var(--cyan) 30.2%, transparent);

  /* Accent inks, dimmed a step from the accent's own ink token. */
  --model-hub-gold-ink: color-mix(in srgb, var(--gold-ink) 85.1%, transparent);
  --model-hub-violet-ink: color-mix(in srgb, var(--violet-ink) 80%, transparent);
  --model-hub-mint-ink: color-mix(in srgb, var(--mint-ink) 80%, transparent);

  /* Danger and success roles, shared by the key dialog and the adopt drawer.
   * The danger ink mixes toward --foreground rather than transparency: that is
   * what lifts dark --destructive-ink to #ff8a8a and deepens the
   * light one instead of fading it into the surface. */
  --model-hub-danger-ink: color-mix(in srgb, var(--destructive-ink) 80%, var(--foreground));
  --model-hub-danger-fill: color-mix(in srgb, var(--destructive) 7.8%, transparent);
  --model-hub-danger-border: color-mix(in srgb, var(--destructive) 25%, transparent);
  --model-hub-success-fill: color-mix(in srgb, var(--mint) 7.8%, transparent);
  --model-hub-success-border: color-mix(in srgb, var(--mint) 25%, transparent);
  /* A brand button held at low emphasis: the fill fades toward the surface. Once
   * it fades it is a wash, not a fill, so the label follows the wash rule and
   * takes --mint-ink rather than the fill's paired --primary-foreground. That
   * matters in light, where --primary-foreground is white: white on a 34.9%
   * mint wash over a light dialog is ~1.4:1, i.e. the same invisible-label bug
   * this palette work started from. --mint-ink is asserted against every
   * neutral surface in both themes, so one value serves both. */
  --model-hub-dim-brand-fill: color-mix(in srgb, var(--mint) 34.9%, transparent);

  /* Modal scrim and lifted-surface shadows, cast in the theme's own extreme:
   * dimming toward --background, shadowing in the darkest ink the theme owns. */
  --model-hub-scrim: color-mix(in srgb, var(--background) 87.8%, transparent);
  --model-hub-menu-shadow: 0 10px 28px color-mix(in srgb, var(--background) 50%, transparent);
  --model-hub-dialog-shadow: 0 16px 40px 0 color-mix(in srgb, var(--background) 60%, transparent);
  --model-hub-drawer-shadow: -18px 0 48px color-mix(in srgb, var(--background) 65.1%, transparent);
}

[data-theme="light"] {
  --model-hub-wash-channel: 8 8 18;
  --model-hub-ink-40: color-mix(in srgb, var(--muted) 50%, transparent);
  --model-hub-ink-4d: color-mix(in srgb, var(--muted) 55%, transparent);
  --model-hub-ink-59: color-mix(in srgb, var(--muted) 65%, transparent);
  --model-hub-ink-73: color-mix(in srgb, var(--muted) 80%, transparent);
  --model-hub-ink-8c: var(--muted);
  --model-hub-gold-ink: var(--gold-ink);
  --model-hub-violet-ink: var(--violet-ink);
  --model-hub-mint-ink: var(--mint-ink);
  --model-hub-menu-shadow: 0 10px 28px color-mix(in srgb, var(--foreground) 14%, transparent);
  --model-hub-dialog-shadow: 0 16px 40px 0 color-mix(in srgb, var(--foreground) 14%, transparent);
  --model-hub-drawer-shadow: -18px 0 48px color-mix(in srgb, var(--foreground) 16%, transparent);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --model-hub-wash-channel: 8 8 18;
    --model-hub-ink-40: color-mix(in srgb, var(--muted) 50%, transparent);
    --model-hub-ink-4d: color-mix(in srgb, var(--muted) 55%, transparent);
    --model-hub-ink-59: color-mix(in srgb, var(--muted) 65%, transparent);
    --model-hub-ink-73: color-mix(in srgb, var(--muted) 80%, transparent);
    --model-hub-ink-8c: var(--muted);
    --model-hub-gold-ink: var(--gold-ink);
    --model-hub-violet-ink: var(--violet-ink);
    --model-hub-mint-ink: var(--mint-ink);
    --model-hub-menu-shadow: 0 10px 28px color-mix(in srgb, var(--foreground) 14%, transparent);
    --model-hub-dialog-shadow: 0 16px 40px 0 color-mix(in srgb, var(--foreground) 14%, transparent);
    --model-hub-drawer-shadow: -18px 0 48px color-mix(in srgb, var(--foreground) 16%, transparent);
  }
}

/* Metrics more than one class reads, so no one class can own them. Each is
 * declared once, here, where every element inherits it — including the dialog
 * and drawer contents Radix portals out of the surface's own subtree, which is
 * why this is `:root` rather than a wrapper class. A metric only one class
 * reads is not here: it sits on that class. */
:root {
  /* Dialog chrome, shared by the dialogs that draw a footer action row. */
  --model-hub-dialog-foot-height: 61px;
  --model-hub-dialog-action-radius: 7px;

  /* Overview: the upstream graph's wires, and the card's footer buttons. */
  --model-hub-wire-active-width: 1.75px;
  --model-hub-wire-muted-width: 1px;
  --model-hub-footer-action-height: 30px;

  /* Add-subscription dialog. */
  --model-hub-add-sub-body-gap: 14px;

  /* Add-API-key dialog. */
  --model-hub-add-key-field-gap: 6px;
  --model-hub-add-key-hint-size: 10.5px;
  --model-hub-add-key-strip-gap: 10px;
  --model-hub-add-key-strip-radius: 9px;
  --model-hub-add-key-strip-title-size: 12px;
  --model-hub-add-key-control-fill: var(--model-hub-wash-08);
  --model-hub-add-key-success-fill: var(--model-hub-success-fill);

  /* Route chain dialog. */
  --model-hub-route-head-height: 72px;
  --model-hub-route-hop-radius: 8px;

  /* Source detail panel, including its tier table. */
  --model-hub-source-radius: 0px;
  --model-hub-source-action-radius: 7px;
  --model-hub-source-table-row-height: 40px;
  --model-hub-source-table-columns: minmax(0, 1fr) auto;
  --model-hub-source-table-gap: 12px;
  --model-hub-source-table-padding-x: 20px;
  --model-hub-source-table-padding-y: 7px;
  --model-hub-source-age-size: 11px;
  --model-hub-source-tier-size: 10.5px;
  --model-hub-source-summary-ink: var(--model-hub-muted-b3);
  --model-hub-source-chip-padding-y: 4px;
  --model-hub-source-chip-padding-x: 9px;

  /* Direct-connection card. */
  --model-hub-direct-gap: 16px;
  --model-hub-direct-radius: 14px;

  /* Provider order drawer. */
  --model-hub-order-row-height: 58px;
  --model-hub-order-row-radius: 8px;
  --model-hub-order-grip-size: 14px;
  --model-hub-order-grip-dim: var(--model-hub-wash-33);
  --model-hub-order-meta-size: 10.5px;

  /* Usage tab. */
  --model-hub-usage-padding-x: 18px;
  --model-hub-usage-columns: minmax(0, 1fr) 104px 84px 84px 116px;
  --model-hub-usage-gutter: 16px;
  --model-hub-usage-title-size: 13px;
  --model-hub-usage-label-size: 11px;
  --model-hub-usage-cell-size: 12px;
  --model-hub-usage-note-size: 10.5px;
  --model-hub-usage-column-radius: 2px;
  --model-hub-usage-note-ink: var(--model-hub-muted-b3);

  /* Subscription quota tab. Reuses the usage tab's gutter and type scale. */
  --model-hub-quota-bar-height: 6px;
  --model-hub-quota-bar-radius: 4px;
  --model-hub-quota-left-size: 17px;
  --model-hub-quota-hint-size: 10px;
  --model-hub-quota-row-gap: 14px;
  --model-hub-quota-nested-indent: 12px;

  /* Tools tab: hosted tools (frames pDd61, kPTBo). Reuses the usage tab's type scale. */
  --model-hub-tools-gap: 16px;
  --model-hub-tool-group-gap: 10px;
  --model-hub-tool-pad-x: 20px;
  --model-hub-tool-line-pad-y: 10px;
  --model-hub-tool-row-pad-x: 14px;
  --model-hub-tool-row-pad-y: 9px;

  /* Backend model catalog dialog. `--model-hub-catalog-row-gap` is read from a
   * Tailwind arbitrary value in the dialog's markup, which has no selector of
   * its own to declare it on. */
  --model-hub-catalog-pad-x: 20px;
  --model-hub-catalog-row-pad-x: 16px;
  --model-hub-catalog-row-pad-y: 10px;
  --model-hub-catalog-row-gap: 14px;
  --model-hub-catalog-grip-size: 16px;
  --model-hub-catalog-note-size: 11px;

  /* Model editor. */
  --model-hub-model-pad-x: 24px;
  --model-hub-model-control-radius: 8px;
  --model-hub-model-note-size: 11px;
  --model-hub-model-match-height: 31px;

  /* Model picker. */
  --model-hub-picker-row-pad-x: 12px;
  --model-hub-picker-row-gap: 10px;
  --model-hub-picker-name-size: 12.5px;
}

.model-hub-accent-tile--cyan { background: var(--model-hub-cyan-1a); }
.model-hub-accent-tile--mint { background: var(--model-hub-mint-1a); }
.model-hub-accent-tile--gold { background: var(--model-hub-gold-1a); }
.model-hub-accent-tile--violet { background: var(--model-hub-violet-24); }
.model-hub-accent-tile--neutral { background: var(--model-hub-wash-0a); }
.model-hub-accent-ink--cyan { color: var(--cyan-ink); }
.model-hub-accent-ink--mint { color: var(--mint-ink); }
.model-hub-accent-ink--gold { color: var(--gold-ink); }
.model-hub-accent-ink--violet { color: var(--violet-ink); }
.model-hub-accent-ink--neutral { color: var(--muted); }
.model-hub-accent-pill--cyan { border-color: var(--model-hub-cyan-4d); background: var(--model-hub-cyan-1a); color: var(--cyan-ink); }
.model-hub-accent-pill--mint { border-color: var(--model-hub-mint-4d); background: var(--model-hub-mint-1a); color: var(--mint-ink); }
.model-hub-accent-pill--gold { border-color: var(--model-hub-gold-4d); background: var(--model-hub-gold-1a); color: var(--gold-ink); }
.model-hub-accent-pill--violet { border-color: var(--model-hub-violet-4d); background: var(--model-hub-violet-1a); color: var(--violet-ink); }
.model-hub-accent-pill--neutral { border-color: var(--model-hub-wash-14); background: var(--model-hub-wash-0a); color: var(--muted); }

/* One owner for the surface's 10.5px status pill. Every frame draws it as a 23px
   box: a 1px border plus 3px insets over a 15px line box. The line-height is the
   part that has to be pinned — inherited leading grows the same padding into a
   25px box, which is what every pill on the page was doing. Colour stays at the
   call site (`.model-hub-accent-pill--*`, `.model-hub-upstream-count`,
   `.model-hub-takeover-chip`, Badge variants); this owns only the shape. */
.model-hub-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 15px;
  white-space: nowrap;
}

.model-hub-source-interface-pill {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  border-color: var(--model-hub-wash-14);
  background: var(--model-hub-wash-0a);
  color: var(--muted);
}

.model-hub-ink-mint { color: var(--mint-ink); }
.model-hub-ink-gold { color: var(--gold-ink); }
.model-hub-ink-violet { color: var(--violet-ink); }
.model-hub-ink-40 { color: var(--model-hub-ink-40); }
.model-hub-ink-59 { color: var(--model-hub-ink-59); }
.model-hub-ink-73 { color: var(--model-hub-ink-73); }
.model-hub-ink-muted-b3 { color: var(--model-hub-muted-b3); }
.model-hub-fill-03 { background: var(--model-hub-wash-03); }
.model-hub-fill-05 { background: var(--model-hub-wash-05); }
.model-hub-fill-08 { background: var(--model-hub-wash-08); }
.model-hub-fill-0a { background: var(--model-hub-wash-0a); }
.model-hub-border-14 { border-color: var(--model-hub-wash-14); }
.model-hub-border-33 { border-color: var(--model-hub-wash-33); }
.model-hub-action-mint { color: var(--mint-ink); }
.model-hub-action-mint:hover { color: var(--model-hub-mint-ink); }
.model-hub-status-gold { border-color: var(--model-hub-gold-66); background: var(--model-hub-gold-14); color: var(--gold-ink); }
.model-hub-status-mint { border-color: var(--model-hub-mint-4d); background: var(--model-hub-mint-14); color: var(--mint-ink); }
.model-hub-add-key-error-ink { color: var(--model-hub-danger-ink); }

.model-hub-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  width: 100%;
}

.model-hub-shell-head {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.model-hub-shell-identity {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.model-hub-shell-title {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 9px;
}

.model-hub-shell-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.model-hub-tabs { scrollbar-width: thin; }
.model-hub-tabs svg { flex-shrink: 0; }

@media (max-width: 639px) {
  .model-hub-shell-identity { flex-basis: 100%; }
  .model-hub-shell-actions { width: 100%; }
}

.model-hub-shell-head h1 {
  color: var(--foreground);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: normal;
  white-space: nowrap;
}

/* The glyph is the control: the frame draws a bare 13px hint icon beside the
   page title, exactly like the one in the sources panel head, with no 26px box
   around it pushing the title's baseline off-centre. */
.model-hub-shell-info {
  width: 13px;
  height: 13px;
  color: var(--model-hub-ink-40);
}

.model-hub-shell-info svg {
  width: 13px;
  height: 13px;
}

.model-hub-detail-back {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--model-hub-wash-0a);
  color: var(--muted);
}

.model-hub-detail-back:hover { color: var(--foreground); }
.model-hub-detail-back > svg { width: 14px; height: 14px; }

.model-hub-runtime-pill {
  display: inline-flex;
  width: fit-content;
  flex-shrink: 0;
  white-space: nowrap;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--model-hub-mint-4d);
  border-radius: 999px;
  background: var(--model-hub-mint-1a);
  padding: 3px 8px;
  color: var(--mint-ink);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: normal;
}

.model-hub-runtime-pill > svg {
  width: 12px;
  height: 12px;
}

.model-hub-runtime-pill--error {
  border-color: color-mix(in srgb, var(--destructive) 30%, transparent);
  background: color-mix(in srgb, var(--destructive) 10%, transparent);
  color: var(--destructive-ink);
}

.model-hub-runtime-pill--direct {
  border-color: var(--model-hub-wash-14);
  background: var(--model-hub-wash-0a);
  color: var(--muted);
}

.model-hub-runtime-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.model-hub-runtime-closed {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-block: 1px solid var(--border);
  padding: 56px 24px;
  text-align: center;
}

.model-hub-runtime-closed-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--model-hub-wash-05);
  color: var(--muted);
}

.model-hub-runtime-closed-icon > svg {
  width: 18px;
  height: 18px;
}

.model-hub-runtime-closed h2 {
  color: var(--foreground);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.35;
}

.model-hub-runtime-closed p {
  max-width: 440px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0;
  line-height: 1.65;
}

.model-hub-takeover-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--model-hub-violet-4d);
  border-radius: 999px;
  background: var(--model-hub-violet-1a);
  padding: 4px 10px;
  color: var(--violet-ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.model-hub-overview {
  --model-hub-agent-head-action-height: 28px;
  --model-hub-agent-head-action-leading: 16px;
  --model-hub-agent-head-status-height: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.model-hub-overview-chevron,
.model-hub-overview-info { color: var(--model-hub-ink-40); }
/* Each agent header separates identity/status from count/actions. Keep both
   actions on the same controls row, including narrow desktop columns. */
.model-hub-agent-head-action {
  height: var(--model-hub-agent-head-action-height, 36px);
  padding-block: 0;
  line-height: var(--model-hub-agent-head-action-leading, 17px);
}
.model-hub-agent-head-actions {
  display: flex;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}
.model-hub-agent-head-actions > .model-hub-agent-head-action {
  min-width: 0;
  min-height: var(--model-hub-agent-head-action-height, 36px);
  height: auto;
  white-space: normal;
}
.model-hub-agent-head-status { line-height: var(--model-hub-agent-head-status-height, 16px); }
.model-hub-agent-mode-trigger {
  height: var(--model-hub-agent-head-action-height, 28px);
  max-width: 190px;
  background: var(--model-hub-wash-0a);
}
.model-hub-mode-menu-current { background: var(--model-hub-wash-0a); }
.model-hub-mode-menu-title { letter-spacing: 0; }
.model-hub-upstream-count {
  border-color: var(--model-hub-wash-14);
  background: var(--model-hub-wash-0a);
  color: var(--muted);
}
.model-hub-takeover-chip {
  border-color: var(--model-hub-violet-4d);
  background: var(--model-hub-violet-1a);
  color: var(--violet-ink);
}

.model-hub-overview-body { position: relative; }

.model-hub-overview-grid {
  --model-hub-track-gap: 0px;
  --model-hub-rail-track: 80px;
  --model-hub-upstream-track: 420px;
}

.model-hub-upstream-info {
  --model-hub-upstream-info-ink: var(--model-hub-ink-40);
  width: 13px;
  height: 13px;
  color: var(--model-hub-upstream-info-ink);
}

.model-hub-upstream-info svg { width: 13px; height: 13px; }

.model-hub-upstream-group-label {
  --model-hub-upstream-group-ink: var(--model-hub-ink-59);
  color: var(--model-hub-upstream-group-ink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.model-hub-upstream-detail {
  --model-hub-upstream-detail-ink: var(--model-hub-muted-cc);
  color: var(--model-hub-upstream-detail-ink);
}
.model-hub-route-origin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  height: 23px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
}
.model-hub-route-origin--automatic { color: var(--mint-ink); background: var(--model-hub-mint-1a); border-color: var(--model-hub-mint-4d); }
.model-hub-route-origin--manual { color: var(--route-manual); background: var(--route-manual-soft); border-color: var(--route-manual-border); }
.model-hub-route-origin--passthrough { color: var(--gold-ink); background: var(--model-hub-gold-1a); border-color: var(--model-hub-gold-4d); }
.model-hub-route-origin:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.model-hub-model-open:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.model-hub-origin-help { width: 340px; max-width: calc(100vw - 32px); white-space: pre-line; font-size: 12px; line-height: 1.6; }
.model-hub-route-mode { gap: 6px; }
.model-hub-route-mode-copy { font-size: 11.5px; line-height: 17px; }
/* A switch that saving would apply, and the one way back from it. */
.model-hub-route-pending { gap: 12px; padding: 8px 12px; border: 1px solid var(--model-hub-gold-4d); border-radius: 8px; background: var(--model-hub-gold-1a); color: var(--gold-ink); font-size: 11.5px; line-height: 17px; overflow-wrap: anywhere; }
.model-hub-route-pending-undo { gap: 4px; color: inherit; }
.model-hub-route-pending-undo:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 2px; }
.model-hub-route-pending-undo:disabled { opacity: 0.6; }
.model-hub-route-pending-undo > svg { width: 12px; height: 12px; }
.model-hub-route-ordinal[data-origin="automatic"] { color: var(--mint-ink); background: var(--model-hub-mint-1a); }
.model-hub-route-ordinal[data-origin="passthrough"] { color: var(--gold-ink); background: var(--model-hub-gold-1a); }
.model-hub-route-custom { display: grid; grid-template-columns: minmax(80px, auto) minmax(0, 1fr); gap: var(--model-hub-route-custom-gap, 8px); align-items: center; padding: 0 12px var(--model-hub-route-custom-pad-block-end, 12px); font-size: 12px; }
.model-hub-route-custom select { min-width: 0; height: var(--model-hub-route-custom-source-height, 32px); border: 1px solid var(--border); border-radius: 6px; background: var(--background); color: var(--foreground); padding: 0 8px; }
/* The label term of the budgeted band, drawn rather than assumed: a bare
   `line-height: normal` is font metrics, and a band the panel's arithmetic
   depends on may not be a different height on the machine that renders it. */
.model-hub-route-custom label { line-height: var(--model-hub-route-custom-label-height, 18px); }
.model-hub-default-counts { margin-top: auto; padding: 20px; font-size: 12px; color: var(--muted); }
.model-hub-recorded-turn { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-left: 2px solid var(--destructive-ink); font-size: 12px; overflow-wrap: anywhere; color: var(--muted); }
.model-hub-recorded-turn strong { color: var(--destructive-ink); }
.model-hub-recorded-turn-badge { gap: 4px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--model-hub-danger-fill); color: var(--destructive-ink); font-size: 10.5px; }
.model-hub-recorded-turn-badge:hover { background: var(--model-hub-danger-border); }
.model-hub-recorded-turn-badge > svg { width: 11px; height: 11px; }
.model-hub-recorded-turn-summary { gap: 4px; color: var(--muted); overflow-wrap: anywhere; }
.model-hub-recorded-turn-summary strong { color: var(--destructive-ink); }
@media (max-width: 640px) {
  .model-hub-model-row { height: 72px; }
}
.model-hub-model-row {
  border-radius: 8px;
  --model-hub-model-row-fill: var(--model-hub-wash-05);
  background: var(--model-hub-model-row-fill);
}
.model-hub-model-mode-chip {
  --model-hub-model-mode-fill: var(--model-hub-wash-0a);
  background: var(--model-hub-model-mode-fill);
}
.model-hub-model-current {
  --model-hub-model-current-ink: var(--model-hub-muted-cc);
  color: var(--model-hub-model-current-ink);
}
.model-hub-model-current--takeover {
  --model-hub-takeover-current-ink: var(--model-hub-violet-ink);
  color: var(--model-hub-takeover-current-ink);
}
.model-hub-model-collapse {
  --model-hub-model-collapse-ink: var(--model-hub-ink-59);
  justify-content: flex-start;
  padding: 0 12px;
  color: var(--model-hub-model-collapse-ink);
  font-size: 11px;
  font-weight: 500;
}
.model-hub-model-collapse svg { width: 13px; height: 13px; }
.model-hub-model-collapse--repair {
  --model-hub-model-collapse-ink: var(--model-hub-danger-ink);
}

.model-hub-footer-action {
  --model-hub-footer-action-font-size: 11.5px;
  --model-hub-footer-action-radius: 7px;
  height: var(--model-hub-footer-action-height);
  padding-inline: 12px;
  border-radius: var(--model-hub-footer-action-radius);
  font-size: var(--model-hub-footer-action-font-size);
  font-weight: 600;
}
/* Both footer buttons sit on one 30px band. The frame strokes the outlined one
   *outside* that band, so its border-box is the 2px taller of the two — which is
   why the design reads 88x30 next to 113x32 rather than two equal heights. */
.model-hub-footer-action--filled { border-width: 0; }
.model-hub-footer-action--outlined { height: calc(var(--model-hub-footer-action-height) + 2px); }

.model-hub-subscription-menu-row--active,
.model-hub-subscription-menu-row:hover,
.model-hub-subscription-menu-row:focus-visible {
  background: var(--model-hub-wash-08);
}

.model-hub-add-sub-overlay { background: var(--model-hub-scrim); }

.model-hub-add-sub-dialog {
  --model-hub-add-sub-width: 620px;
  width: min(var(--model-hub-add-sub-width), calc(100vw - 32px));
  max-width: var(--model-hub-add-sub-width);
  min-width: 0;
  border-radius: 14px;
}

.model-hub-add-sub-head {
  --model-hub-add-sub-head-height: 72px;
  min-height: var(--model-hub-add-sub-head-height);
  height: auto;
  padding: 16px 20px;
  gap: 4px;
}

.model-hub-add-sub-title {
  --model-hub-add-sub-title-size: 15px;
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-add-sub-title-size);
}
.model-hub-add-sub-subtitle {
  --model-hub-add-sub-subtitle-size: 10.5px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-add-sub-subtitle-size);
}
.model-hub-add-sub-close {
  width: 27px;
  height: 27px;
  color: var(--model-hub-ink-59);
}
.model-hub-add-sub-close svg { width: 15px; height: 15px; }

.model-hub-add-sub-body {
  --model-hub-add-sub-body-padding: 20px;
  gap: var(--model-hub-add-sub-body-gap);
  padding: var(--model-hub-add-sub-body-padding);
}

.model-hub-add-sub-options { gap: var(--model-hub-add-sub-body-gap); }

.model-hub-add-sub-option {
  --model-hub-add-sub-option-gap: 12px;
  --model-hub-add-sub-option-radius: 10px;
  --model-hub-add-sub-option-padding: 14px;
  padding: var(--model-hub-add-sub-option-padding);
  border-width: 1px;
  border-radius: var(--model-hub-add-sub-option-radius);
  gap: var(--model-hub-add-sub-option-gap);
}
.model-hub-add-sub-option--idle {
  --model-hub-add-sub-option-idle-fill: var(--model-hub-wash-05);
  background: var(--model-hub-add-sub-option-idle-fill);
}

.model-hub-add-sub-option-copy {
  --model-hub-add-sub-copy-gap: 6px;
  gap: var(--model-hub-add-sub-copy-gap);
}
.model-hub-add-sub-option-label {
  --model-hub-add-sub-label-size: 13.5px;
  font-size: var(--model-hub-add-sub-label-size);
}
.model-hub-add-sub-badge { padding: 3px 8px; font-size: 10px; }
.model-hub-add-sub-description {
  --model-hub-add-sub-description-line: 18px;
  --model-hub-add-sub-description-size: 11.5px;
  font-size: var(--model-hub-add-sub-description-size);
  line-height: var(--model-hub-add-sub-description-line);
}
.model-hub-add-sub-risk {
  --model-hub-add-sub-risk-ink: var(--model-hub-gold-ink);
  --model-hub-add-sub-risk-line: 17px;
  --model-hub-add-sub-risk-size: 11px;
  --model-hub-add-sub-risk-padding-x: 11px;
  --model-hub-add-sub-risk-padding-y: 9px;
  --model-hub-add-sub-risk-radius: 8px;
  padding: var(--model-hub-add-sub-risk-padding-y) var(--model-hub-add-sub-risk-padding-x);
  border-radius: var(--model-hub-add-sub-risk-radius);
  font-size: var(--model-hub-add-sub-risk-size);
  color: var(--model-hub-add-sub-risk-ink);
  line-height: var(--model-hub-add-sub-risk-line);
}
.model-hub-add-sub-hint {
  --model-hub-add-sub-hint-line: 17px;
  --model-hub-add-sub-hint-size: 11px;
  min-height: var(--model-hub-add-sub-hint-line);
  font-size: var(--model-hub-add-sub-hint-size);
  line-height: var(--model-hub-add-sub-hint-line);
}
.model-hub-add-sub-foot {
  height: var(--model-hub-dialog-foot-height);
  padding: 14px 20px;
}
.model-hub-dialog-action {
  --model-hub-dialog-action-size: 12px;
  --model-hub-dialog-action-height: 33px;
  height: var(--model-hub-dialog-action-height);
  padding-inline: 14px;
  border-radius: var(--model-hub-dialog-action-radius);
  font-size: var(--model-hub-dialog-action-size);
}

.model-hub-add-key-overlay { background: var(--model-hub-scrim); }

.model-hub-add-key-dialog {
  --model-hub-add-key-width: 560px;
  --model-hub-add-key-radius: 14px;
  width: min(var(--model-hub-add-key-width), calc(100vw - 32px));
  max-width: var(--model-hub-add-key-width);
  min-width: 0;
  border-radius: var(--model-hub-add-key-radius);
}

.model-hub-add-key-head {
  flex-shrink: 0;
  --model-hub-add-key-head-gap: 4px;
  --model-hub-add-key-head-padding-x: 20px;
  --model-hub-add-key-head-padding-y: 16px;
  padding: var(--model-hub-add-key-head-padding-y) var(--model-hub-add-key-head-padding-x);
  gap: var(--model-hub-add-key-head-gap);
}
.model-hub-add-key-title {
  --model-hub-add-key-title-size: 15px;
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-add-key-title-size);
}
.model-hub-add-key-subtitle {
  --model-hub-add-key-subtitle-size: 10.5px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-add-key-subtitle-size);
}
.model-hub-add-key-body {
  min-height: 0;
  overflow-y: auto;
  --model-hub-add-key-body-gap: 14px;
  --model-hub-add-key-body-padding: 20px;
  padding: var(--model-hub-add-key-body-padding);
  gap: var(--model-hub-add-key-body-gap);
}
.model-hub-add-key-field {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: var(--model-hub-add-key-field-gap);
}
.model-hub-add-key-label {
  --model-hub-add-key-label-size: 11.5px;
  color: var(--model-hub-ink-8c);
  font-size: var(--model-hub-add-key-label-size);
  font-weight: 600;
}
.model-hub-add-key-input {
  --model-hub-add-key-input-size: 11.5px;
  --model-hub-add-key-input-padding: 12px;
  --model-hub-add-key-input-radius: 8px;
  --model-hub-add-key-input-height: 36px;
  height: var(--model-hub-add-key-input-height);
  border-radius: var(--model-hub-add-key-input-radius);
  border-color: var(--border);
  background: var(--model-hub-add-key-control-fill);
  padding-inline: var(--model-hub-add-key-input-padding);
  font-size: var(--model-hub-add-key-input-size);
}
.model-hub-add-key-secret { width: 100%; }
.model-hub-add-key-hint {
  color: var(--model-hub-muted-b3);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: var(--model-hub-add-key-hint-size);
}
.model-hub-add-key-protocol-area {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: var(--model-hub-add-key-field-gap);
}
.model-hub-add-key-protocol-area.is-idle { opacity: 0.55; }
.model-hub-add-key-protocol-idle-row,
.model-hub-add-key-protocol-detecting,
.model-hub-add-key-protocol-manual {
  display: flex;
  gap: 3px;
}
/* Two lines, not one: the statement and its badge, then the sentence that
   explains them. The hint is the longer text of the two, so beside the statement
   it wrapped around the name it is about; underneath, it starts where that name
   starts and reads as its subordinate. */
.model-hub-add-key-protocol-idle-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.model-hub-add-key-protocol-idle-line {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
/* The element that carries the statement is the element that sizes it. The idle
   row holds two deliberately different scales -- this 12px statement and the
   10.5px hint on the line below -- so the scale sits on each child rather than on
   the row the way the single-child detecting row does. Color stays inherited so
   the row's `.is-idle` dimming keeps applying to it. */
.model-hub-add-key-protocol-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--model-hub-add-key-strip-title-size);
  font-weight: 600;
}
/* Why the interface beside it is settled, on the idle row and on both result
   strips. It declares its own size for the same reason the statement does, and
   takes both border and ink from `currentColor` so it annotates whatever it sits
   in -- mint inside ①″ -- rather than introducing an ink of its own. On a strip
   it goes to the trailing edge, out of the way of text that wraps; on the idle
   row it stays on the statement's own line, directly after it. */
.model-hub-add-key-protocol-badge {
  --model-hub-add-key-badge-size: 10px;
  flex-shrink: 0;
  align-self: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 7px;
  opacity: 0.75;
  font-size: var(--model-hub-add-key-badge-size);
  font-weight: 600;
  white-space: nowrap;
}
.model-hub-add-key-strip .model-hub-add-key-protocol-badge {
  margin-inline-start: auto;
}
.model-hub-add-key-protocol-manual {
  flex-direction: column;
}
.model-hub-add-key-protocol-detecting {
  flex-direction: row;
  align-items: center;
  gap: var(--model-hub-add-key-strip-gap);
  color: var(--foreground);
  font-size: var(--model-hub-add-key-strip-title-size);
  font-weight: 600;
}
.model-hub-add-key-protocol-disclosure {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--model-hub-muted-b3);
  font-size: var(--model-hub-add-key-hint-size);
  font-weight: 600;
}
/* Interface glyphs and vendor marks are one visual family at one size, so they
   share the rule rather than each declaring a height and drifting apart. Two
   names because a vendor's logo is not a statement about its interface.
   The height is the only size here: `vendorMarks.ts` boxes every mark into a
   10:7 box holding 19 units of ink in 24, so one height is one ink height for
   all of them, and the slot takes that shape from the ratio rather than from a
   second px value that could be changed without the first. It is wider than it
   is tall because a mark is not: matching cap heights across a wordmark and a
   monogram needs the room the widest of them asks for, and a fixed slot is what
   keeps the labels beside them in one column.
   `width: auto` is what makes "the height is the only size" true rather than
   merely intended: a ratio decides a width only while the other one is
   indefinite, so a drawing arriving with its own `width` attribute — every
   lucide icon ships `width="24" height="24"` — would otherwise keep that width
   beside the shared height and push its label out of the column. */
.model-hub-add-key-protocol-glyph,
.model-hub-add-key-vendor-glyph {
  height: 14px;
  width: auto;
  aspect-ratio: 10 / 7;
  flex-shrink: 0;
}
.model-hub-add-key-action {
  --model-hub-add-key-action-size: 12px;
  --model-hub-add-key-action-radius: 7px;
  --model-hub-add-key-action-padding-x: 14px;
  --model-hub-add-key-action-padding-y: 8px;
  height: auto;
  border-radius: var(--model-hub-add-key-action-radius);
  padding: var(--model-hub-add-key-action-padding-y) var(--model-hub-add-key-action-padding-x);
  font-size: var(--model-hub-add-key-action-size);
  font-weight: 600;
}
.model-hub-add-key-strip {
  --model-hub-add-key-strip-padding-x: 13px;
  --model-hub-add-key-strip-padding-y: 11px;
  display: flex;
  align-items: flex-start;
  gap: var(--model-hub-add-key-strip-gap);
  width: 100%;
  padding: var(--model-hub-add-key-strip-padding-y) var(--model-hub-add-key-strip-padding-x);
  border: 1px solid var(--border);
  border-radius: var(--model-hub-add-key-strip-radius);
}
.model-hub-add-key-strip--working { background: var(--model-hub-add-key-control-fill); }
.model-hub-add-key-strip--error {
  --model-hub-add-key-error-border: var(--model-hub-danger-border);
  --model-hub-add-key-error-fill: var(--model-hub-danger-fill);
  border-color: var(--model-hub-add-key-error-border);
  background: var(--model-hub-add-key-error-fill);
}
.model-hub-add-key-strip--advisory {
  --model-hub-add-key-advisory-border: var(--model-hub-gold-59);
  --model-hub-add-key-advisory-fill: var(--model-hub-gold-14);
  border-color: var(--model-hub-add-key-advisory-border);
  background: var(--model-hub-add-key-advisory-fill);
}
.model-hub-add-key-strip--inventory {
  --model-hub-add-key-inventory-height: 59px;
  min-height: var(--model-hub-add-key-inventory-height);
  align-items: center;
}
.model-hub-add-key-strip--success {
  --model-hub-add-key-success-border: var(--model-hub-success-border);
  align-items: center;
  border-color: var(--model-hub-add-key-success-border);
  background: var(--model-hub-add-key-success-fill);
  color: var(--mint-ink);
  font-size: var(--model-hub-add-key-strip-title-size);
  font-weight: 600;
}
.model-hub-add-key-strip--success .model-hub-add-key-protocol-glyph {
  color: var(--mint-ink);
}
.model-hub-add-key-strip-title {
  font-size: var(--model-hub-add-key-strip-title-size);
  font-weight: 600;
}
.model-hub-add-key-strip-detail {
  --model-hub-add-key-strip-detail-line: 16px;
  --model-hub-add-key-strip-detail-size: 10.5px;
  color: var(--model-hub-muted-b3);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: var(--model-hub-add-key-strip-detail-size);
  line-height: var(--model-hub-add-key-strip-detail-line);
}
.model-hub-add-key-outcome-wrap {
  --model-hub-add-key-outcome-padding-x: 20px;
  --model-hub-add-key-outcome-padding-y: 14px;
  padding: var(--model-hub-add-key-outcome-padding-y) var(--model-hub-add-key-outcome-padding-x);
}
.model-hub-add-key-segments {
  width: fit-content;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--model-hub-add-key-strip-radius);
  background: var(--model-hub-wash-0a);
}
.model-hub-add-key-segment {
  --model-hub-add-key-segment-size: 11.5px;
  --model-hub-add-key-segment-radius: 6px;
  --model-hub-add-key-segment-padding-x: 14px;
  --model-hub-add-key-segment-padding-y: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--model-hub-add-key-segment-radius);
  padding: var(--model-hub-add-key-segment-padding-y) var(--model-hub-add-key-segment-padding-x);
  color: var(--muted);
  font-size: var(--model-hub-add-key-segment-size);
  font-weight: 500;
}
.model-hub-add-key-segment.is-selected {
  background: var(--model-hub-add-key-success-fill);
  color: var(--mint-ink);
}
.model-hub-add-key-foot {
  flex-shrink: 0;
  --model-hub-add-key-footer-fill: var(--model-hub-wash-05);
  --model-hub-add-key-foot-gap: 8px;
  --model-hub-add-key-foot-padding-x: 20px;
  --model-hub-add-key-foot-padding-y: 14px;
  gap: var(--model-hub-add-key-foot-gap);
  padding: var(--model-hub-add-key-foot-padding-y) var(--model-hub-add-key-foot-padding-x);
  background: var(--model-hub-add-key-footer-fill);
}
/* The fill is a wash here, so the label leaves the brand pair and takes the ink
 * token — see --model-hub-dim-brand-fill. The hover rule repeats the pair to
 * hold the button steady: a dimmed action is deliberately not interactive-looking. */
.model-hub-add-key-action--dim {
  --model-hub-add-key-dim-primary: var(--model-hub-dim-brand-fill);
  background: var(--model-hub-add-key-dim-primary);
  color: var(--mint-ink);
}
.model-hub-add-key-action--dim:hover {
  background: var(--model-hub-add-key-dim-primary);
  color: var(--mint-ink);
}

.model-hub-route-overlay { background: var(--model-hub-scrim); }

.model-hub-route-dialog {
  --model-hub-route-width: 520px;
  --model-hub-route-viewport-inset: 16px;
  --model-hub-route-radius: 14px;
  /* Centred, like every other modal in the design file: each one whose frame
     carries an explicit height sits at exactly (viewport - dialog) / 2. The
     route dialog is the one hug-height frame there, so its 300px `y` is a round
     stand-in for the 332.5px its own head/body/foot measure to — and read as a
     literal `top` it only held at the 1100px-tall artboard, leaving the dialog
     near the bottom of every shorter viewport. Placement is `top: 50%` plus the
     element's own translate; what belongs here is the room a centred box may
     take. A centred box of at most this height clears both insets by
     construction, so the footer cannot be pushed off the bottom. */
  width: min(
    var(--model-hub-route-width),
    calc(
      100vw - var(--model-hub-route-viewport-inset) -
        var(--model-hub-route-viewport-inset)
    )
  );
  max-width: var(--model-hub-route-width);
  max-height: calc(
    100dvh - var(--model-hub-route-viewport-inset) -
      var(--model-hub-route-viewport-inset)
  );
  border-radius: var(--model-hub-route-radius);
  border-color: var(--model-hub-wash-24);
  box-shadow: var(--model-hub-dialog-shadow);
}
.model-hub-route-head { min-height: var(--model-hub-route-head-height); flex-shrink: 0; padding: 16px 20px; gap: 4px; border-color: var(--model-hub-wash-14); }
.model-hub-route-close { width: 26px; height: 26px; margin: -5px -5px -5px 0; color: var(--model-hub-ink-59); }
.model-hub-route-close > svg { width: 15px; height: 15px; }
.model-hub-route-title {
  --model-hub-route-title-size: 15px;
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-route-title-size);
}
.model-hub-route-subtitle {
  --model-hub-route-subtitle-size: 10.5px;
  font-size: var(--model-hub-route-subtitle-size);
}
.model-hub-route-body {
  --model-hub-route-body-gap: 14px;
  min-height: 0;
  flex: 0 1 auto;
  overflow-y: auto;
  padding: 20px;
  gap: var(--model-hub-route-body-gap);
}
.model-hub-route-label {
  --model-hub-route-label-size: 10.5px;
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-route-label-size);
  letter-spacing: 1.1px;
}
.model-hub-route-list {
  --model-hub-route-list-gap: 2px;
  gap: var(--model-hub-route-list-gap);
}
.model-hub-route-hop {
  --model-hub-route-hop-gap: 10px;
  --model-hub-route-hop-height: 52px;
  min-height: var(--model-hub-route-hop-height);
  height: auto;
  padding: 6px 8px;
  gap: var(--model-hub-route-hop-gap);
  border-radius: var(--model-hub-route-hop-radius);
}
.model-hub-route-hop[data-editable]:hover,
.model-hub-route-hop[data-editable]:focus-within { background: var(--model-hub-wash-08); }
.model-hub-route-ordinal {
  --model-hub-route-ordinal-radius: 6px;
  --model-hub-route-ordinal-size: 22px;
  width: var(--model-hub-route-ordinal-size);
  height: var(--model-hub-route-ordinal-size);
  border-radius: var(--model-hub-route-ordinal-radius);
  font-size: 11px;
}
.model-hub-route-hop-copy { gap: 3px; }
.model-hub-route-hop-name,
.model-hub-route-hop-model { white-space: normal; overflow-wrap: anywhere; }
.model-hub-route-hop-name { font-size: 12px; }
.model-hub-route-hop-model { font-size: 10.5px; }
.model-hub-route-grip { width: 14px; height: 14px; color: var(--model-hub-ink-4d); }
.model-hub-route-grip > svg { width: 14px; height: 14px; }
.model-hub-route-grip[aria-grabbed="true"] { color: var(--mint-ink); }
.model-hub-route-invalid,
.model-hub-route-invalid-summary { color: var(--destructive-ink); font-size: 10px; line-height: 14px; }
/* The picker opens from a button that sits near the bottom of an anchored
   dialog, so it has to bound itself against the space Radix reports instead of
   letting a long model list run past the dialog and off the screen. Its metrics
   live here rather than on `.model-hub-route-dialog` because the popover is
   portalled out of the dialog and inherits nothing from it — which is the same
   reason the metrics its confirmation shares with the dialog's Cancel/Save are
   declared at `:root` and not on either root.

   Bounding the panel is only half of it: the bound has to land on the list, so
   every fixed band (search, column head, confirm foot) stays out of the way and
   the remaining space is what scrolls. `min-height: 0` on each link of that
   chain is what lets a flex item shrink below its content and hand the overflow
   to the one element that owns `overflow-y: auto`. */
.model-hub-route-selector {
  /* Every band that cannot shrink, named once so the floor below is arithmetic
     rather than a number someone re-eyeballs. A band added to the panel without
     a term here is what `modelHubStylePolicy.test.ts` fails on: the manual
     source/model pair was added straight into the flex column, nothing
     recomputed, and the list — the only child that can give — went to a sliver.
     Each term is what its band draws, hairline included, and the rendered band
     census in `e2e/model-catalog/route-direct-edit.spec.ts` measures every one
     of them against the band on screen: a term that drifts low is a panel that
     overflows the bound it just declared, one that drifts high is room taken
     off the list for nothing. */
  --model-hub-route-selector-hairline: 1px;
  /* The popover draws that same hairline around itself, and `max-height` is
     border-box: a bound written in band space is two pixels short of the column
     it has to hold, which is the confirm row's own border painting over it. */
  --model-hub-route-selector-frame: calc(var(--model-hub-route-selector-hairline) * 2);
  --model-hub-route-selector-search-input: 34px;
  --model-hub-route-selector-search-height: calc(
    var(--model-hub-route-selector-search-input) + var(--model-hub-route-selector-hairline)
  );
  --model-hub-route-selector-head-height: 26px;
  --model-hub-route-selector-confirm-height: 33px;
  --model-hub-route-selector-foot-pad-block: 8px;
  --model-hub-route-selector-foot-height: calc(
    var(--model-hub-route-selector-hairline) +
      var(--model-hub-route-selector-foot-pad-block) * 2 +
      var(--model-hub-route-selector-confirm-height)
  );
  /* What the disclosure's own toggle draws. Budgeted only where it is
     rendered: a subscription-only inventory has no model ID to type, so the
     panel there is genuinely one band shorter and must not be held open for a
     row that is not on screen. */
  --model-hub-route-selector-manual-row: 30px;
  --model-hub-route-selector-manual-height: 0px;
  /* What the disclosure adds when it is opened. The pair is a two-column grid,
     so what it adds is one complete field column — the label, the gap the
     shared `Field` draws under it, and the taller of the two controls — plus
     the band's own bottom padding. Summing both controls would budget a second
     row that is not on screen. Terms rather than an override of the primitives:
     if one of those heights changes, the rendered census fails on the term
     instead of this panel silently mis-budgeting the band. */
  --model-hub-route-custom-label-height: 18px;
  --model-hub-route-custom-field-gap: 8px;
  --model-hub-route-custom-source-height: 32px;
  --model-hub-route-custom-model-height: 36px;
  --model-hub-route-custom-gap: 8px;
  --model-hub-route-custom-pad-block-end: 12px;
  /* Folded, so zero too — which is what lets the room below the trigger bound
     the panel in the state it opens in, and still leaves its border around the
     confirm row once the pair is on screen. */
  --model-hub-route-selector-manual-fields-height: 0px;
  --model-hub-route-selector-bands: calc(
    var(--model-hub-route-selector-search-height) +
      var(--model-hub-route-selector-head-height) +
      var(--model-hub-route-selector-manual-height) +
      var(--model-hub-route-selector-manual-fields-height) +
      var(--model-hub-route-selector-foot-height)
  );
  /* Three candidate rows: the least that still reads as a list to scroll. */
  --model-hub-route-selector-list-min: 84px;
  --model-hub-route-selector-max: 300px;
  --model-hub-route-selector-room: var(
    --radix-popover-content-available-height,
    var(--model-hub-route-selector-max)
  );
  /* The reported room bounds the panel — it is what is on screen below the
     trigger, and this popover neither flips nor scrolls the page, so anything
     past it is unreachable rather than merely clipped. The one thing the room
     may not do is take the panel below its own fixed bands: there the panel
     would stop drawing its border around the confirm row instead of shrinking. */
  max-height: max(
    calc(var(--model-hub-route-selector-bands) + var(--model-hub-route-selector-frame)),
    min(
      var(--model-hub-route-selector-max),
      var(--model-hub-route-selector-room)
    )
  );
}
/* The horizontal reading of that same report, for the one variant that does not
   borrow its width from its trigger. `avoidCollisions={false}` turns off both
   of Radix's collision middlewares — the side-axis flip this panel must not do,
   and the align-axis shift that would have pushed it back into view — so a
   420px panel aligned to the end of a row action sat a panel-width from the
   right edge and hung its left edge off screen. `collisionPadding` is inert
   there for the same reason: nothing reads it once detection is off.
   `size` is not gated (`@radix-ui/react-popper` applies it unconditionally), so
   the available-width report survives, and for a `bottom`/`end` placement
   floating-ui computes it as `width - overflow.left`: exactly the width whose
   left edge lands on the padding line; the Add trigger's `start` placement
   reads `width - overflow.right` the same way. Bounding by it contains the
   panel without restoring the flip. Where the room is ampler than the design width —
   every desktop placement — the min is the design width and nothing moves. */
.model-hub-route-selector--width-route {
  --model-hub-route-selector-inline-max: 420px;
  --model-hub-route-selector-inline-room: var(
    --radix-popover-content-available-width,
    var(--model-hub-route-selector-inline-max)
  );
  width: min(
    var(--model-hub-route-selector-inline-max),
    var(--model-hub-route-selector-inline-room)
  );
}
.model-hub-route-selector--manual {
  --model-hub-route-selector-manual-height: calc(
    var(--model-hub-route-selector-hairline) + var(--model-hub-route-selector-manual-row)
  );
}
.model-hub-route-selector--manual-open {
  --model-hub-route-selector-manual-fields-height: calc(
    var(--model-hub-route-custom-label-height) + var(--model-hub-route-custom-field-gap) +
      max(
        var(--model-hub-route-custom-source-height),
        var(--model-hub-route-custom-model-height)
      ) + var(--model-hub-route-custom-pad-block-end)
  );
}
.model-hub-route-selector-manual-toggle {
  height: var(--model-hub-route-selector-manual-row);
  padding-inline: 12px;
  color: var(--model-hub-ink-73);
  font-size: 11.5px;
}
.model-hub-route-selector-manual-toggle:hover { color: var(--foreground); }
.model-hub-route-selector-command { min-height: 0; flex: 1 1 auto; }
.model-hub-route-selector [cmdk-input-wrapper] {
  flex-shrink: 0;
  padding-inline: 10px;
  border-color: var(--model-hub-wash-14);
}
.model-hub-route-selector [cmdk-input] {
  height: var(--model-hub-route-selector-search-input);
  padding-block: 0;
  font-size: 12px;
  line-height: 17px;
}
.model-hub-route-selector-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.model-hub-route-selector-head {
  flex-shrink: 0;
  padding: 8px 12px 4px;
  color: var(--model-hub-ink-73);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 14px;
}
/* The list is the only child that can give, so without a floor it is what every
   fixed band is paid for out of — which is how the manual source/model pair,
   added straight into the column, left a sliver of green where the candidates
   were. The floor is three rows wherever the room reaches, and the room minus
   the bands where it does not: a floor held past that point would not produce a
   list, only a confirm button below the fold. */
.model-hub-route-selector-list {
  min-height: clamp(
    0px,
    calc(
      min(var(--model-hub-route-selector-max), var(--model-hub-route-selector-room)) -
        var(--model-hub-route-selector-frame) - var(--model-hub-route-selector-bands)
    ),
    var(--model-hub-route-selector-list-min)
  );
  max-height: none;
  flex: 1 1 auto;
  overflow-y: auto;
}
/* The source column, kept in view. The group lays its heading over the first
   column while its rows span the whole grid, so the name occupies the cell the
   rows leave empty and the selected row still washes edge to edge under it.
   Sticky against the list means the name is on screen for exactly as long as
   one of its own models is: the next group's heading arrives at the top by
   pushing this one out, which is the same order the groups are read in. */
.model-hub-route-selector-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  /* cmdk's group ships `overflow: hidden`. Left on, it would be the heading's
     own scroll container — a box that never scrolls — and the heading would
     stick to the top of the group it is already at the top of, which is to say
     it would not move at all. The list is the scroller; the group is not. */
  overflow: visible;
  padding: 0 6px 6px;
}
.model-hub-route-selector-group [cmdk-group-heading] {
  position: sticky;
  top: 0;
  z-index: 1;
  grid-area: 1 / 1 / 2 / 2;
  align-self: start;
  /* It is drawn over the top visible row, and it is that row's sibling, not its
     child — so without this the source half of the row the user is most likely
     to aim at swallows the click and the hover, and the one row nearest the
     pointer is the one that does not answer it. The name is a label; nothing in
     it is aimed at. */
  pointer-events: none;
  /* Aligned with the rows it labels: the row's own inline padding, and the
     block padding that centers one line in the 28px row beside it. */
  padding: 6px 8px;
  /* Its grid cell bounds the column, not the text: a source named at length
     would otherwise run straight across the models it is there to label. Kept
     from the cell this replaced, which truncated for the same reason. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--foreground);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 16px;
}
.model-hub-route-selector-group [cmdk-group-items] { grid-area: 1 / 1 / 2 / -1; }
.model-hub-route-candidate { min-height: 28px; font-size: 11.5px; line-height: 16px; }
.model-hub-route-candidate-model { grid-column: 2; color: var(--model-hub-ink-73); }
.model-hub-route-candidate:hover { background: var(--model-hub-wash-0a); }
.model-hub-route-candidate[data-selected="true"] {
  background: var(--model-hub-mint-1a);
  color: var(--mint-ink);
}
.model-hub-route-candidate[data-selected="true"] .model-hub-route-candidate-model { color: inherit; }
.model-hub-route-selector-foot {
  padding: var(--model-hub-route-selector-foot-pad-block) 10px;
  border-color: var(--model-hub-wash-14);
}
.model-hub-route-selector-confirm {
  --model-hub-route-selector-confirm-size: 12px;
  height: var(--model-hub-route-selector-confirm-height);
  border-radius: var(--model-hub-dialog-action-radius);
  font-size: var(--model-hub-route-selector-confirm-size);
}
.model-hub-route-actions { gap: 2px; }
.model-hub-route-action { width: 26px; height: 26px; border-radius: 6px; }
.model-hub-route-action:hover:not(:disabled) { background: var(--model-hub-wash-0f); color: var(--foreground); }
.model-hub-route-remove:hover:not(:disabled) { color: var(--destructive-ink); }
.model-hub-route-action > svg { width: 13px; height: 13px; }
.model-hub-route-tools { gap: 8px; }
.model-hub-route-defaults { gap: 2px; font-size: 12px; }
.model-hub-route-defaults:hover { color: var(--foreground); }
.model-hub-route-defaults > svg { width: 12px; height: 12px; }
.model-hub-route-menu-anchor { display: inline-flex; }
.model-hub-route-menu-item { gap: 8px; padding: 10px; font-size: 13px; }
.model-hub-route-menu-item > svg { width: 14px; height: 14px; }
.model-hub-route-foot { height: var(--model-hub-dialog-foot-height); flex-shrink: 0; padding: 14px 20px; border-color: var(--model-hub-wash-14); }
@media (max-width: 640px) {
  .model-hub-route-foot { flex-wrap: wrap; min-height: var(--model-hub-dialog-foot-height); height: auto; }
}

.model-hub-source-detail {
  --model-hub-source-gap: 0px;
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  gap: var(--model-hub-source-gap);
}

.model-hub-source-dialog { display: flex; }
.model-hub-source-notices {
  --model-hub-source-notices-max-height: min(160px, 25dvh);
  max-height: var(--model-hub-source-notices-max-height);
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.model-hub-source-dialog > button {
  top: 18px;
  right: 18px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
}

.model-hub-source-bar {
  --model-hub-source-bar-gap: 12px;
  --model-hub-source-bar-padding-x: 20px;
  --model-hub-source-bar-padding-y: 14px;
  --model-hub-source-bar-height: 82px;
  min-height: var(--model-hub-source-bar-height);
  padding: var(--model-hub-source-bar-padding-y) var(--model-hub-source-bar-padding-x);
  gap: var(--model-hub-source-bar-gap);
  padding-right: 58px;
  border-radius: var(--model-hub-source-radius);
}
.model-hub-source-tile {
  --model-hub-source-tile-radius: 9px;
  --model-hub-source-tile-size: 36px;
  width: var(--model-hub-source-tile-size);
  height: var(--model-hub-source-tile-size);
  border-radius: var(--model-hub-source-tile-radius);
}
.model-hub-source-copy {
  --model-hub-source-copy-gap: 4px;
  gap: var(--model-hub-source-copy-gap);
}
.model-hub-source-eyebrow {
  color: var(--model-hub-ink-59);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 13px;
}
.model-hub-source-line {
  --model-hub-source-line-height: 17px;
  min-height: var(--model-hub-source-line-height);
  line-height: var(--model-hub-source-line-height);
}
.model-hub-source-title {
  --model-hub-source-title-size: 15px;
  font-size: var(--model-hub-source-title-size);
}
.model-hub-source-state {
  --model-hub-source-state-size: 12px;
  font-size: var(--model-hub-source-state-size);
}
.model-hub-source-age { font-size: var(--model-hub-source-age-size); }
.model-hub-source-summary {
  --model-hub-source-summary-line: 15px;
  --model-hub-source-summary-size: 10.5px;
  color: var(--model-hub-source-summary-ink);
  font-size: var(--model-hub-source-summary-size);
  line-height: var(--model-hub-source-summary-line);
}
.model-hub-source-action {
  --model-hub-source-action-size: 12px;
  --model-hub-source-action-height: 32px;
  width: auto;
  height: var(--model-hub-source-action-height);
  padding-inline: 11px;
  border-radius: var(--model-hub-source-action-radius);
  font-size: var(--model-hub-source-action-size);
  font-weight: 600;
}
/* The bar's `···` is not a square: the frame gives it the action row's radius and
   a slightly wide, slightly short box so it reads as part of that row rather than
   as an icon button dropped beside it. */
.model-hub-source-more {
  width: 32px;
  height: 32px;
  border-radius: var(--model-hub-source-action-radius);
}
.model-hub-source-metadata dt {
  color: var(--model-hub-ink-73);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 14px;
}
.model-hub-source-metadata dd {
  margin-top: 2px;
  color: var(--foreground);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 15px;
}
.model-hub-source-search { background: var(--model-hub-wash-05); }
.model-hub-source-table { border-radius: var(--model-hub-source-radius); }
/* Every band sits inside the same table edges and splits its cells by the same
   gap, whether or not it stands in the table's columns. */
.model-hub-source-table-head,
.model-hub-source-table-row,
.model-hub-source-table-draft {
  column-gap: var(--model-hub-source-table-gap);
  padding-inline: var(--model-hub-source-table-padding-x);
}

/* The columns are what a heading makes a claim about, so only the bands read
   against that heading take them. */
.model-hub-source-table-head,
.model-hub-source-table-row {
  grid-template-columns: var(--model-hub-source-table-columns);
}
.model-hub-source-row-action {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--background);
}
.model-hub-source-table-head {
  --model-hub-source-table-head-fill: var(--model-hub-wash-05);
  --model-hub-source-label-size: 11px;
  --model-hub-source-table-head-height: 36px;
  height: var(--model-hub-source-table-head-height);
  /* Grid items stretch by default, so a plain text cell renders its glyphs at
     the top of a 35px box while a `flex items-center` cell centres them. That
     mismatch is what makes the header row look ragged; the design centres every
     column against the 36px band. */
  align-items: center;
  background: var(--model-hub-source-table-head-fill);
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-source-label-size);
  line-height: 15px;
}
.model-hub-source-table-row {
  min-height: var(--model-hub-source-table-row-height);
  padding-block: var(--model-hub-source-table-padding-y);
}
/* Capability chips (frame FB4vC): their own column from md, a full-width line
   under the model id below it. */
@media (min-width: 768px) {
  .model-hub-source-table--capabilities {
    --model-hub-source-table-columns: minmax(0, 0.8fr) minmax(0, 1.7fr) auto;
  }
}
@media (max-width: 767px) {
  .model-hub-source-table--capabilities .model-hub-source-capabilities {
    grid-column: 1 / -1;
    order: 3;
  }
}
.model-hub-capability-detail { font-size: var(--model-hub-usage-cell-size); line-height: 18px; }
/* A chip is its label (which opens the detail) and, on a refusal, a trailing clear. */
.model-hub-capability-chip { padding: 0; }
.model-hub-capability-chip > button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: inherit;
}
.model-hub-capability-chip > .model-hub-capability-clear {
  border-left: 1px solid var(--model-hub-gold-66);
  border-radius: 0 999px 999px 0;
}
.model-hub-capability-clear:disabled { opacity: 0.5; }
.model-hub-source-capabilities-failure { font-size: var(--model-hub-source-tier-size); }
.model-hub-capability-explain { color: var(--model-hub-usage-note-ink); }
.model-hub-capability-facts {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 8px 10px;
  background: var(--model-hub-wash-05);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-capability-facts dt { color: var(--model-hub-ink-73); }
.model-hub-capability-facts dd { overflow-wrap: anywhere; }
/* The draft spans the table width, with commands on their own trailing line. */
.model-hub-source-table-draft {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-block: var(--model-hub-source-table-padding-y);
}
.model-hub-source-table-draft > .flex { grid-column: 1 / -1; }
/* Stated as a span to both edges rather than as a column count: the count is a
   layout decision that has already changed once, and a cell carrying `col-span-3`
   through that change is how the failure line ends up in an implicit fourth
   track. Correct in the stacked band below md too, where there is one column. */
.model-hub-source-draft-line { grid-column: 1 / -1; }
.model-hub-source-add-hint {
  color: var(--model-hub-source-summary-ink);
  font-size: var(--model-hub-source-tier-size);
}
.model-hub-source-model {
  --model-hub-source-model-size: 12px;
  font-size: var(--model-hub-source-model-size);
  line-height: 16px;
}
.model-hub-source-manual-id {
  --model-hub-source-manual-input-radius: 7px;
  border-radius: var(--model-hub-source-manual-input-radius);
}
/* A pill is a fixed label, so it is never the part of a row that gives. Both
   declarations are load-bearing and neither works alone: `nowrap` because a
   Chinese label has no min-content floor — it breaks between characters, so a
   flex row that runs short turns 手动添加 into two lines instead of overflowing —
   and `flex-shrink: 0` because nowrap alone would let the fill shrink out from
   under text that no longer wraps. Stated here rather than at a call site: the
   label beside a field or a truncating id is the same shape everywhere it
   appears, and the field or the id is what should absorb the shortfall. */
.model-hub-source-pill {
  --model-hub-source-pill-size: 10px;
  font-size: var(--model-hub-source-pill-size);
  line-height: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
.model-hub-source-tier { font-size: var(--model-hub-source-tier-size); }
@media (hover: hover) {
  .model-hub-source-table-row:hover { background: var(--model-hub-wash-0a); }
  .model-hub-source-row-action { opacity: 0; transition: opacity 120ms ease; }
  .model-hub-source-table-row:hover .model-hub-source-row-action,
  .model-hub-source-table-row:focus-within .model-hub-source-row-action { opacity: 1; }
}
/* Entry pills are fills, not outlines, and the two origins differ by weight of
   fill and ink rather than by border. */
.model-hub-source-entry-pill {
  --model-hub-source-entry-fill: var(--model-hub-wash-0a);
  --model-hub-source-pill-padding-x: 8px;
  --model-hub-source-pill-padding-y: 3px;
  padding: var(--model-hub-source-pill-padding-y) var(--model-hub-source-pill-padding-x);
  border-color: transparent;
  background: var(--model-hub-source-entry-fill);
  color: var(--muted);
}
.model-hub-source-entry-pill--manual {
  --model-hub-source-entry-manual-fill: var(--model-hub-wash-14);
  background: var(--model-hub-source-entry-manual-fill);
  color: var(--foreground);
}
.model-hub-source-footnote {
  --model-hub-source-footnote-size: 11.5px;
  min-height: 16px;
  color: var(--model-hub-ink-8c);
  font-size: var(--model-hub-source-footnote-size);
  line-height: 16px;
}

.model-hub-guard-overlay { background: var(--model-hub-scrim); }
/* The worked example behind the scope rule at the top of this file. The guard
   dialog's own chrome — head, title, subtitle, close, foot, action — has one
   reader each, so each metric sits on the class that reads it. The evidence
   BODY below is a different kind of thing: `GuardImpact` and `GuardGapList` are
   shared, and they also mount outside this dialog — in the catalog dialog's
   focused removal confirmation, which is a plain ConfirmDialog. A body token
   declared on this root would reach only this dialog; elsewhere `var()` would
   name a property no ancestor declares, which is invalid at computed-value
   time, so the declaration would draw nothing: the label lost its gap AND its size, and the count lost its padding
   AND its size, which is not a pill missing a margin but 「Hops that will be
   removed2 hops」 in one unbroken run at the inherited font.

   It is the argument `.model-hub-route-selector` makes further up, arrived at
   from the other side. There a popover is portalled out of its dialog and
   inherits nothing; here nothing is portalled — the body is simply mounted
   somewhere else, which the stylesheet cannot see and the token scope must not
   assume. So each body class carries what it and its descendants consume, and a
   caller may mount it under any root at all. */
.model-hub-guard-dialog {
  --model-hub-guard-width: 520px;
  --model-hub-guard-radius: 14px;
  width: min(var(--model-hub-guard-width), calc(100vw - 32px));
  min-width: 0;
  gap: 0;
  border-radius: var(--model-hub-guard-radius);
  box-shadow: var(--model-hub-dialog-shadow);
}
.model-hub-guard-head {
  --model-hub-guard-head-gap: 4px;
  --model-hub-guard-head-padding-x: 20px;
  --model-hub-guard-head-padding-y: 16px;
  min-width: 0;
  padding: var(--model-hub-guard-head-padding-y) var(--model-hub-guard-head-padding-x);
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-guard-head-gap);
  border-bottom: 1px solid var(--border);
}
.model-hub-guard-title {
  --model-hub-guard-title-size: 15px;
  min-width: 0;
  flex: 1 1 auto;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-guard-title-size);
  font-weight: 700;
}
.model-hub-guard-subtitle {
  --model-hub-guard-subtitle-size: 10.5px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--model-hub-guard-subtitle-size);
}
.model-hub-guard-close {
  --model-hub-guard-close-icon-size: 15px;
  --model-hub-guard-close-size: 27px;
  width: var(--model-hub-guard-close-size);
  height: var(--model-hub-guard-close-size);
  color: var(--model-hub-ink-59);
}
.model-hub-guard-close svg { width: var(--model-hub-guard-close-icon-size); height: var(--model-hub-guard-close-icon-size); }
/* The travelling body. Each class declares the metrics it and its own
   selector-descendants consume, so none of them depends on where a caller
   mounted it — not on the guard dialog, and not on each other either: a hop
   outside a list still measures like a hop. */
.model-hub-guard-body {
  --model-hub-guard-body-padding: 20px;
  --model-hub-guard-body-gap: 14px;
  padding: var(--model-hub-guard-body-padding);
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-guard-body-gap);
}
.model-hub-guard-label {
  --model-hub-guard-label-gap: 6px;
  --model-hub-guard-label-size: 10.5px;
  --model-hub-guard-count-padding-y: 3px;
  --model-hub-guard-count-padding-x: 8px;
  --model-hub-guard-count-size: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--model-hub-guard-label-gap);
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-guard-label-size);
  font-weight: 700;
}
.model-hub-guard-label > span { padding: var(--model-hub-guard-count-padding-y) var(--model-hub-guard-count-padding-x); border: 1px solid var(--border); border-radius: 999px; background: var(--model-hub-wash-0a); color: var(--muted); font-size: var(--model-hub-guard-count-size); font-weight: 600; }
.model-hub-guard-list {
  --model-hub-guard-list-padding: 8px;
  --model-hub-guard-list-gap: 6px;
  --model-hub-guard-list-radius: 10px;
  padding: var(--model-hub-guard-list-padding);
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-guard-list-gap);
  border: 1px solid var(--border);
  border-radius: var(--model-hub-guard-list-radius);
  background: var(--background);
}
.model-hub-guard-hop {
  --model-hub-guard-hop-height: 52px;
  --model-hub-guard-hop-padding-x: 10px;
  --model-hub-guard-hop-gap: 10px;
  --model-hub-guard-hop-radius: 8px;
  --model-hub-guard-hop-name-size: 12px;
  --model-hub-guard-hop-detail-gap: 3px;
  --model-hub-guard-hop-detail-size: 10.5px;
  min-height: var(--model-hub-guard-hop-height);
  padding: 0 var(--model-hub-guard-hop-padding-x);
  display: flex;
  align-items: center;
  gap: var(--model-hub-guard-hop-gap);
  border: 1px solid var(--border);
  border-radius: var(--model-hub-guard-hop-radius);
  background: var(--model-hub-wash-08);
}
.model-hub-guard-hop strong { display: block; color: color-mix(in srgb, var(--foreground) 70.2%, transparent); font-size: var(--model-hub-guard-hop-name-size); font-weight: 600; }
.model-hub-guard-hop span span { margin-top: var(--model-hub-guard-hop-detail-gap); display: block; color: var(--model-hub-muted-b3); font-family: 'JetBrains Mono', monospace; font-size: var(--model-hub-guard-hop-detail-size); }
.model-hub-guard-hint {
  --model-hub-guard-hint-gap: 7px;
  --model-hub-guard-hint-size: 11.5px;
  --model-hub-guard-hint-line: 17px;
  --model-hub-guard-hint-icon-size: 13px;
  --model-hub-guard-hint-icon-offset: 2px;
  display: flex;
  align-items: flex-start;
  gap: var(--model-hub-guard-hint-gap);
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-guard-hint-size);
  line-height: var(--model-hub-guard-hint-line);
}
.model-hub-guard-hint svg { width: var(--model-hub-guard-hint-icon-size); height: var(--model-hub-guard-hint-icon-size); margin-top: var(--model-hub-guard-hint-icon-offset); flex: none; color: var(--model-hub-ink-59); }
.model-hub-guard-foot {
  --model-hub-guard-foot-gap: 8px;
  --model-hub-guard-foot-padding-x: 20px;
  --model-hub-guard-foot-padding-y: 14px;
  padding: var(--model-hub-guard-foot-padding-y) var(--model-hub-guard-foot-padding-x);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--model-hub-guard-foot-gap);
  border-top: 1px solid var(--border);
  background: var(--model-hub-wash-05);
}
.model-hub-guard-action {
  --model-hub-guard-action-size: 12px;
  --model-hub-guard-action-radius: 7px;
  --model-hub-guard-action-padding-x: 14px;
  --model-hub-guard-action-padding-y: 8px;
  height: auto;
  padding: var(--model-hub-guard-action-padding-y) var(--model-hub-guard-action-padding-x);
  border-radius: var(--model-hub-guard-action-radius);
  font-size: var(--model-hub-guard-action-size);
  font-weight: 600;
}

.model-hub-direct {
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-direct-gap);
}
.model-hub-direct-grid {
  --model-hub-direct-benefits-width: 452px;
  gap: var(--model-hub-direct-gap);
}
.model-hub-direct-card {
  --model-hub-direct-card-height: 330px;
  min-height: var(--model-hub-direct-card-height);
  border-radius: var(--model-hub-direct-radius);
}
.model-hub-direct-head {
  --model-hub-direct-head-height: 56px;
  min-height: var(--model-hub-direct-head-height);
}
.model-hub-direct-content {
  --model-hub-direct-content-gap: 10px;
  --model-hub-direct-content-padding: 12px;
  padding: var(--model-hub-direct-content-padding);
  gap: var(--model-hub-direct-content-gap);
}
.model-hub-direct-row {
  --model-hub-direct-row-radius: 10px;
  border: 1px solid var(--model-hub-wash-14);
  border-radius: var(--model-hub-direct-row-radius);
}
.model-hub-direct-row--backend { height: 64px; }
.model-hub-direct-backend-copy,
.model-hub-direct-benefit-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.model-hub-direct-backend-name { font-size: 12.5px; font-weight: 600; }
.model-hub-direct-backend-detail { color: var(--model-hub-muted-cc); font-size: 11px; line-height: normal; }
.model-hub-direct-benefit-title-row { width: 100%; }
.model-hub-direct-benefit-detail { width: 100%; color: var(--muted); font-size: 11.5px; line-height: 19px; }
.model-hub-direct-note {
  --model-hub-direct-note-height: 49px;
  min-height: var(--model-hub-direct-note-height);
  padding: 14px 18px;
  border-radius: var(--model-hub-direct-radius);
  border-color: var(--model-hub-wash-14);
  background: var(--model-hub-wash-06);
  color: var(--muted);
}
.model-hub-direct-kind-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  border-color: var(--model-hub-wash-14);
  background: var(--model-hub-wash-0a);
  color: var(--muted);
}
.model-hub-direct-switch { border-color: var(--model-hub-wash-24); background: var(--model-hub-wash-0a); }

.model-hub-direct-empty {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.model-hub-direct-empty h2 {
  color: var(--foreground);
  font-size: 15px;
  font-weight: 700;
}

.model-hub-direct-empty p,
.model-hub-direct-empty span {
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.model-hub-order-overlay { background: var(--model-hub-scrim); }

.model-hub-order-drawer {
  --model-hub-order-width: 460px;
  width: min(var(--model-hub-order-width), 100vw);
  border-left: 1px solid var(--border-strong);
  /* Clears the desktop shell's overlay title bar (0 elsewhere). */
  padding-top: var(--shell-titlebar-inset);
  box-shadow: var(--model-hub-drawer-shadow);
}

.model-hub-order-head {
  --model-hub-order-head-gap: 6px;
  --model-hub-order-head-padding-x: 20px;
  --model-hub-order-head-padding-y: 18px;
  min-height: 82px;
  padding: var(--model-hub-order-head-padding-y) var(--model-hub-order-head-padding-x);
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-order-head-gap);
}
.model-hub-order-title {
  --model-hub-order-title-size: 15px;
  font-size: var(--model-hub-order-title-size);
}
.model-hub-order-info { width: 13px; height: 13px; color: var(--model-hub-ink-59); }
.model-hub-order-subtitle {
  --model-hub-order-subtitle-line: 17px;
  --model-hub-order-subtitle-size: 11.5px;
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-order-subtitle-size);
  line-height: var(--model-hub-order-subtitle-line);
}
.model-hub-order-close { color: var(--model-hub-ink-59); }
.model-hub-order-body {
  --model-hub-order-body-gap: 18px;
  --model-hub-order-body-padding: 20px;
  padding: var(--model-hub-order-body-padding);
  gap: var(--model-hub-order-body-gap);
}
.model-hub-order-section {
  --model-hub-order-section-gap: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-order-section-gap);
}
.model-hub-order-section-head {
  --model-hub-order-section-size: 10.5px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  row-gap: 4px;
  font-size: var(--model-hub-order-section-size);
  font-weight: 700;
  letter-spacing: 1.1px;
  color: var(--model-hub-ink-73);
}
.model-hub-order-section-head > .model-hub-order-section-explanation {
  display: block;
  flex: 1 1 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--model-hub-order-meta-size);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 15px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.model-hub-order-row {
  --model-hub-order-row-gap: 10px;
  --model-hub-order-row-padding-x: 12px;
  --model-hub-order-row-padding-y: 8px;
  min-height: var(--model-hub-order-row-height);
  height: auto;
  padding-inline: var(--model-hub-order-row-padding-x);
  padding-block: var(--model-hub-order-row-padding-y);
  display: flex;
  align-items: center;
  gap: var(--model-hub-order-row-gap);
  border: 1px solid var(--border);
  border-radius: var(--model-hub-order-row-radius);
}
.model-hub-order-row--ordered {
  --model-hub-order-row-ordered: var(--model-hub-wash-08);
  background: var(--model-hub-order-row-ordered);
}
.model-hub-order-row--held {
  --model-hub-order-row-held: var(--model-hub-wash-05);
  background: var(--model-hub-order-row-held);
}
.model-hub-order-grip {
  --model-hub-order-grip-ink: var(--model-hub-ink-4d);
  width: var(--model-hub-order-grip-size);
  height: var(--model-hub-order-grip-size);
  flex: none;
  color: var(--model-hub-order-grip-ink);
}
.model-hub-order-grip svg { width: 100%; height: 100%; }
.model-hub-order-grip:disabled { color: var(--model-hub-order-grip-dim); }
.model-hub-order-grip.is-grabbed { color: var(--mint-ink); }
.model-hub-order-ordinal {
  --model-hub-order-ordinal-fill: var(--model-hub-wash-0a);
  --model-hub-order-ordinal-radius: 6px;
  --model-hub-order-ordinal-size: 22px;
  width: var(--model-hub-order-ordinal-size);
  height: var(--model-hub-order-ordinal-size);
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--model-hub-order-ordinal-radius);
  background: var(--model-hub-order-ordinal-fill);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
}
.model-hub-order-ordinal.is-first { background: var(--mint-soft); color: var(--mint-ink); }
/* A row that can move is dragged by its ordinal: it reads as the position, and invites a grab on hover. */
.model-hub-order-ordinal.is-handle {
  border: 0;
  cursor: grab;
  touch-action: manipulation;
  transition: background-color 120ms ease, color 120ms ease;
}
.model-hub-order-ordinal.is-handle[aria-disabled='true'] { cursor: default; }
.model-hub-order-ordinal.is-handle:not([aria-disabled='true']):hover { background: var(--model-hub-wash-14); color: var(--foreground); }
.model-hub-order-ordinal.is-handle.is-first:not([aria-disabled='true']):hover { background: var(--mint-soft); color: var(--mint-ink); box-shadow: inset 0 0 0 1px var(--mint-ink); }
.model-hub-order-ordinal.is-handle:focus-visible { outline: 2px solid var(--mint); outline-offset: 1px; }
.model-hub-tool-executor-row.is-dragging {
  position: relative;
  z-index: 10;
  box-shadow: var(--model-hub-menu-shadow);
}
.model-hub-tool-executor-row.is-dragging .model-hub-order-ordinal.is-handle { cursor: grabbing; }
.model-hub-order-name {
  --model-hub-order-name-size: 12.5px;
  font-size: var(--model-hub-order-name-size);
  font-weight: 600;
}
.model-hub-order-name,
.model-hub-order-meta {
  white-space: normal;
  overflow-wrap: anywhere;
}
.model-hub-order-identity {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 3px;
}
.model-hub-order-meta {
  color: var(--model-hub-muted-b3);
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--model-hub-order-meta-size);
  line-height: normal;
}
.model-hub-order-tag {
  --model-hub-order-tag-size: 10px;
  --model-hub-order-tag-padding-x: 8px;
  --model-hub-order-tag-padding-y: 3px;
  padding: var(--model-hub-order-tag-padding-y) var(--model-hub-order-tag-padding-x);
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--model-hub-order-tag-size);
  font-weight: 600;
}
.model-hub-order-row-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 3px;
}
.model-hub-order-row-action {
  min-height: 0;
  padding: 0;
  flex: none;
  border: 1px solid var(--border);
  background: var(--model-hub-wash-0a);
}
.model-hub-order-row-action:hover { background: var(--model-hub-wash-14); }
.model-hub-order-held-icon { width: var(--model-hub-order-grip-size); height: var(--model-hub-order-grip-size); flex: none; color: var(--model-hub-order-grip-dim); }
.model-hub-order-empty,
.model-hub-order-state {
  min-height: var(--model-hub-order-row-height);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--border);
  border-radius: var(--model-hub-order-row-radius);
  color: var(--muted);
  font-size: 11.5px;
}
.model-hub-order-state--error { color: var(--destructive-ink); }
.model-hub-order-foot {
  --model-hub-order-foot-fill: var(--model-hub-wash-05);
  --model-hub-order-foot-gap: 8px;
  --model-hub-order-foot-padding-x: 20px;
  --model-hub-order-foot-padding-y: 14px;
  min-height: 61px;
  padding: var(--model-hub-order-foot-padding-y) var(--model-hub-order-foot-padding-x);
  gap: var(--model-hub-order-foot-gap);
  background: var(--model-hub-order-foot-fill);
}
.model-hub-order-action {
  --model-hub-order-foot-action-size: 12px;
  --model-hub-order-foot-action-radius: 7px;
  --model-hub-order-foot-action-padding-x: 14px;
  --model-hub-order-foot-action-padding-y: 8px;
  min-height: 33px;
  padding: var(--model-hub-order-foot-action-padding-y) var(--model-hub-order-foot-action-padding-x);
  border-radius: var(--model-hub-order-foot-action-radius);
  font-size: var(--model-hub-order-foot-action-size);
  font-weight: 600;
}

/* 用量 tab.
 *
 * design.pen has no frame for this tab on the local surface, so the geometry is
 * borrowed from the source table above rather than invented: the same 18px
 * gutter, 36px head, 11px column label, and wash-05 head fill. Importing a
 * second panel's spacing into the middle of this one would read as two
 * surfaces stitched together.
 *
 * Every ink here resolves through a step the light blocks already re-anchor
 * (ink-73 / ink-8c / muted-b3), so this block needs no light branch of its own.
 * The one genuinely new unit is the day chart, and its two colors are a wash and
 * an accent fill — both of which flip correctly on their own.
 */
.model-hub-usage {
  --model-hub-usage-gap: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-usage-gap);
}
.model-hub-usage-bar {
  --model-hub-usage-bar-padding-x: 18px;
  --model-hub-usage-bar-padding-y: 13px;
  padding: var(--model-hub-usage-bar-padding-y) var(--model-hub-usage-bar-padding-x);
}
.model-hub-usage-title { font-size: var(--model-hub-usage-title-size); }
.model-hub-usage-note {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-usage-failure {
  padding: 11px var(--model-hub-usage-padding-x);
  font-size: var(--model-hub-usage-cell-size);
}
.model-hub-usage-pending { font-size: var(--model-hub-usage-title-size); }

/* Tools tab. */
.model-hub-tools { gap: var(--model-hub-tools-gap); }
.model-hub-tools-title { font-size: 15px; line-height: 21px; }
.model-hub-tools-subtitle,
.model-hub-tools-foot {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-cell-size);
  line-height: 18px;
}
.model-hub-tools-foot { font-size: var(--model-hub-usage-note-size); line-height: 16px; }
.model-hub-tool-group { gap: var(--model-hub-tool-group-gap); }
.model-hub-tool-group-title {
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-usage-label-size);
  line-height: 15px;
}
.model-hub-tool-card-head { padding: 14px var(--model-hub-tool-pad-x); }
.model-hub-tool-name { font-size: 14px; line-height: 20px; }
.model-hub-tool-description,
.model-hub-tool-state { font-size: var(--model-hub-usage-cell-size); }
.model-hub-tool-description { color: var(--model-hub-usage-note-ink); }
/* A status line, and the Advanced toggle, each a full-width row under the head. */
.model-hub-tool-status,
.model-hub-tool-advanced-toggle {
  padding: var(--model-hub-tool-line-pad-y) var(--model-hub-tool-pad-x);
  font-size: var(--model-hub-usage-cell-size);
  line-height: 18px;
}
.model-hub-tool-image {
  padding: 12px var(--model-hub-tool-pad-x) 14px;
  font-size: var(--model-hub-usage-cell-size);
}
.model-hub-tool-image-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(96px, auto);
  column-gap: var(--model-hub-usage-gutter);
  row-gap: 6px;
  padding: var(--model-hub-tool-row-pad-y) var(--model-hub-tool-row-pad-x);
}
@media (max-width: 767px) {
  .model-hub-tool-image-row { grid-template-columns: minmax(0, 1fr) auto; }
  .model-hub-tool-image-row > :first-child { grid-column: 1 / -1; }
}
.model-hub-tool-advanced-body {
  padding: 2px var(--model-hub-tool-pad-x) 16px;
  font-size: var(--model-hub-usage-cell-size);
}
.model-hub-tool-executor-row,
.model-hub-tool-pair-row {
  column-gap: var(--model-hub-usage-gutter);
  row-gap: 6px;
  padding: var(--model-hub-tool-row-pad-y) var(--model-hub-tool-row-pad-x);
}
/* An order row: position (arrows, ordinal), identity, price, switch. The price and switch columns have one width in
   every row, so prices line up down the list whatever their text, and each switch sits at the row's end. */
.model-hub-tool-executor-row {
  --model-hub-order-price-width: 8.5rem;
  --model-hub-order-switch-width: 36px;
  grid-template-columns: auto minmax(0, 1fr) var(--model-hub-order-price-width) var(--model-hub-order-switch-width);
}
.model-hub-tool-executor-row.is-off > :nth-child(2),
.model-hub-tool-executor-row.is-off > :nth-child(3) { opacity: 0.55; }
.model-hub-order-price {
  justify-self: end;
  max-width: 100%;
  overflow: hidden;
  color: var(--foreground);
  font-size: var(--model-hub-usage-cell-size);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.model-hub-order-price { text-underline-offset: 2px; }
a.model-hub-order-price:hover { text-decoration: underline; }
.model-hub-order-price.is-muted { color: var(--model-hub-usage-note-ink); font-weight: 400; }
.model-hub-order-switch { display: flex; justify-content: flex-end; }
.model-hub-order-stepper { display: flex; flex-direction: column; }
.model-hub-order-step {
  display: inline-flex;
  width: 18px;
  height: 14px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--model-hub-usage-note-ink);
}
.model-hub-order-step svg { width: 12px; height: 12px; }
.model-hub-order-step:hover:not(:disabled) { background: var(--model-hub-wash-14); color: var(--foreground); }
.model-hub-order-step:focus-visible { outline: 2px solid var(--mint); outline-offset: 0; }
.model-hub-order-step:disabled { opacity: 0.3; }
.model-hub-order-kind {
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
  line-height: 16px;
}
.model-hub-tool-pair-row { grid-template-columns: minmax(0, 1fr) minmax(0, auto) auto; }
/* Below md a row stacks: identity, then its state or price, then its actions. */
@media (max-width: 767px) {
  .model-hub-tool-executor-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .model-hub-tool-executor-row > :nth-child(3) { grid-column: 2 / -1; grid-row: 2; }
  .model-hub-tool-executor-row > .model-hub-order-price { justify-self: start; }
  .model-hub-tool-pair-row { grid-template-columns: minmax(0, 1fr) auto; }
  .model-hub-tool-pair-row > :nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}
.model-hub-tool-cost-note {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
  line-height: 15px;
}
.model-hub-tool-note {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
  line-height: 16px;
}
.model-hub-usage-empty {
  padding: 26px var(--model-hub-usage-padding-x);
  font-size: var(--model-hub-usage-cell-size);
}
.model-hub-usage-stat {
  padding: 13px var(--model-hub-usage-padding-x) 14px;
  gap: 5px;
}
.model-hub-usage-stat-label {
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-usage-label-size);
}
.model-hub-usage-stat-value {
  --model-hub-usage-value-size: 20px;
  font-size: var(--model-hub-usage-value-size);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.model-hub-usage-stat-note {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-usage-card-head {
  padding: 11px var(--model-hub-usage-padding-x);
}
.model-hub-usage-section-title {
  --model-hub-usage-section-size: 12px;
  font-size: var(--model-hub-usage-section-size);
}
/* Grid items stretch by default, which would leave a plain text cell drawing its
 * glyphs against the top of the box while a flex cell beside it centres them. */
.model-hub-usage-head {
  --model-hub-usage-head-fill: var(--model-hub-wash-05);
  --model-hub-usage-head-height: 36px;
  min-height: var(--model-hub-usage-head-height);
  padding: 0 var(--model-hub-usage-padding-x);
  grid-template-columns: var(--model-hub-usage-columns);
  gap: var(--model-hub-usage-gutter);
  align-items: center;
  background: var(--model-hub-usage-head-fill);
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-usage-label-size);
}
.model-hub-usage-row {
  --model-hub-usage-row-padding-y: 9px;
  --model-hub-usage-row-min-height: 46px;
  min-height: var(--model-hub-usage-row-min-height);
  padding: var(--model-hub-usage-row-padding-y) var(--model-hub-usage-padding-x);
  grid-template-columns: var(--model-hub-usage-columns);
  gap: var(--model-hub-usage-gutter);
  font-size: var(--model-hub-usage-cell-size);
}
.model-hub-usage-row--model {
  --model-hub-usage-model-ink: var(--model-hub-ink-8c);
  --model-hub-usage-model-indent: 14px;
  padding-left: calc(var(--model-hub-usage-padding-x) + var(--model-hub-usage-model-indent));
  color: var(--model-hub-usage-model-ink);
}
.model-hub-usage-source,
.model-hub-usage-model,
.model-hub-usage-cell { min-width: 0; }
.model-hub-usage-cell { font-variant-numeric: tabular-nums; }
.model-hub-usage-cell-label {
  color: var(--model-hub-ink-73);
  font-size: var(--model-hub-usage-note-size);
  font-variant-numeric: normal;
}
.model-hub-usage-gone {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-usage-plot {
  padding: 16px var(--model-hub-usage-padding-x) 12px;
  gap: 9px;
}
.model-hub-usage-chart {
  --model-hub-usage-chart-gap: 3px;
  --model-hub-usage-chart-height: 132px;
  height: var(--model-hub-usage-chart-height);
  gap: var(--model-hub-usage-chart-gap);
}
/* The track is drawn even where the column is not: a bar of zero height in an
 * empty row cannot be told apart from a day the report never covered, and that
 * distinction is the reason the series is plotted day by day at all. */
.model-hub-usage-track {
  --model-hub-usage-track-fill: var(--model-hub-wash-08);
  min-width: 0;
  height: 100%;
  border-radius: var(--model-hub-usage-column-radius);
  background: var(--model-hub-usage-track-fill);
}
.model-hub-usage-column {
  --model-hub-usage-column-fill: color-mix(in srgb, var(--mint) 55%, transparent);
  border-radius: var(--model-hub-usage-column-radius);
  background: var(--model-hub-usage-column-fill);
}
.model-hub-usage-a11y-table { contain: strict; }
.model-hub-usage-axis {
  --model-hub-usage-axis-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  --model-hub-usage-axis-gap: 12px;
  display: grid;
  grid-template-columns: var(--model-hub-usage-axis-columns);
  gap: var(--model-hub-usage-axis-gap);
  align-items: start;
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-usage-axis-label {
  min-width: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.model-hub-usage-axis-label:last-child { text-align: right; }
.model-hub-usage-peak {
  color: var(--model-hub-ink-73);
  text-align: center;
}

/* Modern Model Hub usage analytics. The report is dense and interactive, so
 * this surface owns its layout while reusing the shell's neutral and accent
 * tokens. The tooltip is kept in one stable corner: changing the bucket must
 * not move the pin target away from the pointer. */
.model-hub-usage-analytics {
  --model-hub-usage-unknown: var(--gold);
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.model-hub-usage-heading,
.model-hub-usage-filter-bar,
.model-hub-usage-card-header,
.model-hub-usage-details-actions,
.model-hub-usage-tooltip-head,
.model-hub-usage-tooltip-actions,
.model-hub-usage-chart-foot {
  display: flex;
  align-items: center;
}

.model-hub-usage-heading {
  justify-content: space-between;
  gap: 16px;
}

.model-hub-usage-heading h2 {
  color: var(--foreground);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.model-hub-usage-heading p,
.model-hub-usage-card-header p {
  margin-top: 4px;
  color: var(--model-hub-muted-b3);
  font-size: var(--model-hub-usage-note-size);
  line-height: 1.45;
}

.model-hub-usage-window {
  flex: none;
}

.model-hub-usage-filter-bar {
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--model-hub-wash-03);
}

.model-hub-usage-filter {
  position: relative;
}

.model-hub-usage-filter-trigger {
  max-width: min(230px, 42vw);
}

.model-hub-usage-filter-trigger.is-filtered {
  border-color: var(--model-hub-mint-4d);
  background: var(--model-hub-mint-14);
}

.model-hub-usage-filter-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  display: flex;
  width: min(310px, calc(100vw - 36px));
  max-height: 360px;
  flex-direction: column;
  gap: 3px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--model-hub-menu-shadow);
}

.model-hub-usage-filter-search {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid var(--input);
  border-radius: 7px;
  color: var(--muted);
}

.model-hub-usage-filter-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 12px;
}

.model-hub-usage-filter-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--foreground);
  font-size: 12px;
  text-align: left;
}

.model-hub-usage-filter-option:hover,
.model-hub-usage-filter-option[aria-selected="true"] {
  background: var(--model-hub-wash-08);
}

.model-hub-usage-filter-divider {
  height: 1px;
  margin: 3px 0;
  background: var(--border);
}

.model-hub-usage-filter-empty,
.model-hub-usage-filter-foot {
  margin: 5px 8px;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
}

.model-hub-usage-filter-context {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
  white-space: nowrap;
}

.model-hub-usage-select {
  position: relative;
  display: inline-flex;
  min-width: 132px;
  align-items: center;
  gap: 7px;
  padding: 6px 28px 6px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--foreground);
  background: var(--surface);
}

.model-hub-usage-select select {
  min-width: 0;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
}

.model-hub-usage-select > svg:last-child {
  position: absolute;
  right: 8px;
  pointer-events: none;
}

.model-hub-usage-reset {
  color: var(--destructive-ink);
}

.model-hub-usage-loading,
.model-hub-usage-failure,
.model-hub-usage-empty-state,
.model-hub-usage-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  color: var(--model-hub-ink-73);
  font-size: 12px;
}

.model-hub-usage-failure {
  justify-content: space-between;
  border-color: var(--model-hub-danger-border);
  background: var(--model-hub-danger-fill);
  color: var(--model-hub-danger-ink);
}

.model-hub-usage-failure button {
  color: var(--destructive-ink);
  font-weight: 600;
}

.model-hub-usage-empty-state {
  min-height: 180px;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.model-hub-usage-empty-state h3 {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 650;
}

.model-hub-usage-empty-state p {
  max-width: 480px;
  color: var(--model-hub-muted-b3);
  font-size: 12px;
}

.model-hub-usage-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.model-hub-usage-stat-grid--priced { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.model-hub-usage-stat-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--model-hub-wash-03);
}

.model-hub-usage-analytics .model-hub-usage-stat-label {
  color: var(--model-hub-ink-73);
  font-size: 10.5px;
}

.model-hub-usage-analytics .model-hub-usage-stat-value {
  color: var(--foreground);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.model-hub-usage-analytics .model-hub-usage-stat-note {
  min-height: 15px;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
  line-height: 1.4;
}

.model-hub-usage-notice {
  border-color: var(--model-hub-gold-4d);
  background: var(--model-hub-gold-14);
  color: var(--model-hub-gold-ink);
}

.model-hub-usage-card {
  min-width: 0;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.model-hub-usage-card-header {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 11px;
  border-bottom: 1px solid var(--border);
}

.model-hub-usage-card-header h3 {
  color: var(--foreground);
  font-size: 13px;
  font-weight: 650;
}

.model-hub-usage-card-header h3 span {
  margin-left: 5px;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
  font-weight: 500;
}

.model-hub-usage-group-control {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
}

.model-hub-usage-group-control > div,
.model-hub-usage-table-group {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--model-hub-wash-03);
}

.model-hub-usage-group-control button,
.model-hub-usage-table-group button {
  padding: 4px 7px;
  border-radius: 5px;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
}

.model-hub-usage-group-control button.is-selected,
.model-hub-usage-table-group button.is-selected,
.model-hub-usage-group-control button:hover,
.model-hub-usage-table-group button:hover {
  background: var(--model-hub-wash-14);
  color: var(--foreground);
}

.model-hub-usage-group-control button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.model-hub-usage-chart-content {
  min-width: 0;
  padding: 12px 16px 13px;
}

/* UsageChart sets the left margin to the plot's axis gutter, so the first
 * swatch sits over the plot's left edge. */
.model-hub-usage-legend {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px 6px;
  margin-bottom: 8px;
}

.model-hub-usage-legend-item {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--model-hub-ink-73);
  font-size: 10.5px;
  transition: background-color .12s ease, border-color .12s ease, opacity .12s ease;
}

.model-hub-usage-legend-item:hover {
  border-color: var(--border);
  background: var(--model-hub-wash-05);
}

.model-hub-usage-legend-item:focus-visible {
  border-color: var(--model-hub-gold-4d);
  outline: none;
}

.model-hub-usage-legend-item.is-hidden {
  opacity: .5;
}

.model-hub-usage-legend-item.is-hidden > span:not(.model-hub-usage-legend-swatch),
.model-hub-usage-legend-item.is-hidden strong {
  text-decoration: line-through;
}

.model-hub-usage-legend-item.is-hidden .model-hub-usage-legend-swatch {
  background: transparent !important;
  box-shadow: inset 0 0 0 1.5px var(--model-hub-muted-b3);
}

.model-hub-usage-legend-swatch {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
}

.model-hub-usage-legend-item strong {
  margin-left: 2px;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.model-hub-usage-chart-wrap {
  position: relative;
  min-width: 0;
  min-height: 236px;
}

.model-hub-usage-svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 236px;
  overflow: visible;
  touch-action: pan-y;
}

/* Every grid line, the baseline included, is the same quiet dash. */
.model-hub-usage-grid {
  stroke: var(--border);
  stroke-dasharray: 2 5;
  opacity: .7;
}

.model-hub-usage-tick {
  fill: var(--model-hub-muted-b3);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.model-hub-usage-tick--y {
  opacity: .78;
}

.model-hub-usage-highlight {
  fill: var(--model-hub-wash-05);
}

/* The non-active columns keep ~.6 of their ink (.88 × .68). */
.model-hub-usage-series.is-dimmed {
  opacity: .68;
}

.model-hub-usage-crosshair {
  stroke: var(--model-hub-gold);
  stroke-width: 1;
  opacity: .6;
}

.model-hub-usage-hit-area {
  cursor: crosshair;
  fill: transparent;
  outline: none;
}

.model-hub-usage-hit-area:focus-visible {
  fill: var(--model-hub-mint-14);
  stroke: var(--mint);
  stroke-width: 1;
}

.model-hub-usage-unknown-point {
  fill: var(--model-hub-usage-unknown);
  stroke: var(--background);
  stroke-width: 1.5;
}

/* Placed beside the crosshair by UsageChart through left:0 + translateX, so a
 * bucket change moves it on the compositor. The transition is short enough to
 * read as following, never as lagging. */
.model-hub-usage-tooltip {
  position: absolute;
  z-index: 10;
  top: 14px;
  left: 0;
  width: 264px;
  pointer-events: auto;
  padding: 9px 10px;
  transition: transform 90ms ease-out;
  border: 1px solid var(--model-hub-gold-4d);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 96%, var(--gold) 4%);
  box-shadow: var(--model-hub-menu-shadow);
  color: var(--foreground);
}

.model-hub-usage-tooltip.is-docked {
  top: 5px;
  right: 5px;
  left: auto;
  width: calc(100% - 10px);
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .model-hub-usage-tooltip { transition: none; }
}

.model-hub-usage-tooltip.is-pinned {
  border-color: var(--model-hub-mint-4d);
  background: color-mix(in srgb, var(--surface) 96%, var(--mint) 4%);
}

.model-hub-usage-tooltip-head {
  justify-content: space-between;
  gap: 10px;
  color: var(--model-hub-ink-73);
  font-size: 11px;
  line-height: 1.35;
}

.model-hub-usage-tooltip-range {
  min-width: 0;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
}

.model-hub-usage-tooltip-range small {
  margin-left: 6px;
  color: var(--model-hub-muted-b3);
  font-size: 10px;
}

.model-hub-usage-tooltip-actions {
  flex: none;
  gap: 6px;
  color: var(--model-hub-mint-ink);
}

.model-hub-usage-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--model-hub-wash-08);
  color: var(--foreground);
}

.model-hub-usage-pin:hover,
.model-hub-usage-pin:focus-visible {
  border-color: var(--model-hub-mint-4d);
  color: var(--mint-ink);
}

.model-hub-usage-tooltip-total {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 8px;
}

.model-hub-usage-tooltip-total strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.model-hub-usage-tooltip-total span,
.model-hub-usage-tooltip-foot {
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
}

.model-hub-usage-tooltip-lines {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.model-hub-usage-tooltip-lines > div,
.model-hub-usage-tooltip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.model-hub-usage-tooltip-lines span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: var(--model-hub-ink-73);
  font-size: 10.5px;
}

.model-hub-usage-tooltip-lines i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 999px;
}

.model-hub-usage-tooltip-lines b {
  flex: none;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.model-hub-usage-tooltip-foot {
  margin-top: 8px;
}

.model-hub-usage-chart-foot {
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
}

.model-hub-usage-details {
  overflow: hidden;
}

.model-hub-usage-details-header {
  flex-wrap: wrap;
}

.model-hub-usage-details-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.model-hub-usage-table-scroll {
  overflow-x: auto;
}

.model-hub-usage-table-scroll table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 11px;
}

.model-hub-usage-table-scroll th,
.model-hub-usage-table-scroll td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.model-hub-usage-table-scroll th:first-child,
.model-hub-usage-table-scroll td:first-child {
  min-width: 190px;
  text-align: left;
}

.model-hub-usage-table-scroll thead th {
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
  font-weight: 550;
}

.model-hub-usage-table-scroll thead button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
}

.model-hub-usage-table-scroll tbody th {
  color: var(--foreground);
  font-weight: 550;
}

.model-hub-usage-table-scroll tbody tr:hover {
  background: var(--model-hub-wash-03);
}

/* Usage that outlived its providers: kept in every total, set back from the live rows. */
.model-hub-usage-table-scroll tbody tr.is-removed th {
  color: var(--muted);
}

.model-hub-usage-row-name,
.model-hub-usage-row-detail {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-hub-usage-row-detail {
  margin-top: 3px;
  color: var(--model-hub-muted-b3);
  font-size: 10px;
  font-weight: 450;
}

.model-hub-usage-table-total {
  color: var(--mint-ink);
  font-weight: 650;
}

/* No price (or one still being fetched) is not an amount; only money takes the money colour. */
.model-hub-usage-table-total.is-unpriced {
  color: var(--muted);
}

.model-hub-usage-table-empty {
  padding: 22px 12px !important;
  color: var(--model-hub-muted-b3);
  text-align: center !important;
}

.model-hub-usage-table-scroll tfoot th,
.model-hub-usage-table-scroll tfoot td {
  border-bottom: 0;
  color: var(--foreground);
  font-weight: 650;
}

.model-hub-usage-table-foot {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 14px;
  color: var(--model-hub-muted-b3);
  font-size: 10.5px;
  line-height: 1.45;
}

/* Subscription quota. A tone is one ink, read by every part of a window that
 * speaks for it — bar, remaining figure, pace line, status pill — so a warning
 * cannot be amber in one place and neutral in the next. */
.model-hub-quota-tone--ok { --model-hub-quota-tone: var(--mint-ink); }
.model-hub-quota-tone--warn { --model-hub-quota-tone: var(--gold-ink); }
.model-hub-quota-tone--danger { --model-hub-quota-tone: var(--destructive-ink); }
.model-hub-quota-tone--stale { --model-hub-quota-tone: var(--model-hub-ink-73); }
.model-hub-quota-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.model-hub-quota-stats--valued { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 950px) {
  .model-hub-quota-stats--valued { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* What the account's use would cost at API prices, against its monthly fee. */
.model-hub-quota-value {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.model-hub-quota-value > div { min-width: 0; padding: 10px 12px; }
.model-hub-quota-value > div + div { border-left: 1px solid var(--border); }
.model-hub-quota-value span { display: block; color: var(--model-hub-ink-8c); font-size: var(--model-hub-usage-label-size); }
.model-hub-quota-value b {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 6px;
  margin-top: 5px;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.model-hub-quota-value em {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-label-size);
  font-style: normal;
  font-weight: 400;
}
.model-hub-quota-value em.is-good { color: var(--mint-ink); }
.model-hub-quota-value-note {
  margin-top: 6px;
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-label-size);
}
.model-hub-quota-stat--primary { border-color: var(--model-hub-mint-4d); }
.model-hub-quota-stat-unit {
  margin-left: 5px;
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-label-size);
  font-weight: 400;
}
.model-hub-quota-timeline {
  padding: 11px 14px;
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-quota-timeline-title {
  margin-right: 6px;
  color: var(--model-hub-ink-8c);
  font-size: var(--model-hub-usage-label-size);
}
.model-hub-quota-chip {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  color: var(--model-hub-ink-8c);
}
.model-hub-quota-chip b {
  color: var(--foreground);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.model-hub-quota-chip.model-hub-quota-tone--danger {
  border-color: color-mix(in srgb, var(--model-hub-quota-tone) 40%, transparent);
}
.model-hub-quota-chip.model-hub-quota-tone--danger b { color: var(--model-hub-quota-tone); }
.model-hub-quota-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.model-hub-quota-card { padding: 16px var(--model-hub-usage-padding-x) 18px; }
.model-hub-quota-account { font-size: var(--model-hub-usage-title-size); }
.model-hub-quota-plan {
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--model-hub-ink-8c);
  font-size: var(--model-hub-usage-note-size);
  font-weight: 500;
}
.model-hub-quota-account-label {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-quota-status {
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--model-hub-quota-tone) 30%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--model-hub-quota-tone) 7%, transparent);
  color: var(--model-hub-quota-tone);
  font-size: var(--model-hub-usage-note-size);
  white-space: nowrap;
}
.model-hub-quota-dot {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--model-hub-quota-tone, currentColor);
}
.model-hub-quota-stale,
.model-hub-quota-unread {
  margin-top: 14px;
  padding: 8px 10px;
  border: 1px dashed var(--input);
  border-radius: 8px;
  color: var(--model-hub-ink-8c);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-quota-rows {
  gap: var(--model-hub-quota-row-gap);
  margin-top: 18px;
}
.model-hub-quota-card--retained .model-hub-quota-rows { opacity: 0.55; }
.model-hub-quota-row { min-width: 0; }
.model-hub-quota-row--nested {
  padding-left: var(--model-hub-quota-nested-indent);
  border-left: 2px solid var(--border);
}
/* One line beside the remaining figure: a long name ellipsizes, never wraps under it. */
.model-hub-quota-row-title {
  font-size: var(--model-hub-usage-cell-size);
  white-space: nowrap;
}
.model-hub-quota-row-title small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 4;
  margin-left: 8px;
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-quota-hint-size);
}
.model-hub-quota-left b {
  color: var(--foreground);
  font-size: var(--model-hub-quota-left-size);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.model-hub-quota-left.model-hub-quota-tone--warn b,
.model-hub-quota-left.model-hub-quota-tone--danger b { color: var(--model-hub-quota-tone); }
.model-hub-quota-left span {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-quota-hint-size);
}
.model-hub-quota-bar {
  position: relative;
  height: var(--model-hub-quota-bar-height);
  margin-top: 7px;
  border-radius: var(--model-hub-quota-bar-radius);
  background: var(--model-hub-wash-14);
}
.model-hub-quota-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: var(--model-hub-quota-bar-radius);
  background: color-mix(in srgb, var(--model-hub-quota-tone) 85%, transparent);
}
.model-hub-quota-time-mark {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--foreground);
  opacity: 0.55;
}
.model-hub-quota-row-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--model-hub-ink-8c);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-quota-pace.model-hub-quota-tone--warn,
.model-hub-quota-pace.model-hub-quota-tone--danger { color: var(--model-hub-quota-tone); }
.model-hub-quota-reset { white-space: nowrap; }
/* A countdown whose exact moment opens on hover, focus, or tap. */
.model-hub-quota-time {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 3px;
  cursor: help;
}
.model-hub-quota-time:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: 2px;
}
.model-hub-quota-scoped {
  margin: 2px 0 -4px;
  color: var(--model-hub-ink-8c);
  font-size: var(--model-hub-usage-note-size);
}
.model-hub-quota-scoped span {
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-quota-hint-size);
}
.model-hub-quota-foot {
  padding: 0 2px;
  color: var(--model-hub-usage-note-ink);
  font-size: var(--model-hub-usage-note-size);
  line-height: 1.6;
}

@media (min-width: 1024px) {
  .model-hub-direct-grid {
    grid-template-columns: minmax(0, 1fr) var(--model-hub-direct-benefits-width);
  }
}

/* Four cost-bearing cards need the full width; between tablet and desktop they pair up. */
@media (max-width: 1100px) {
  .model-hub-usage-stat-grid--priced { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .model-hub-source-table-head { display: none; }
  .model-hub-source-table-row,
  .model-hub-source-table-draft { grid-template-columns: minmax(0, 1fr); }
  .model-hub-source-bar { align-items: center; }
  .model-hub-source-toolbar > div:last-child { flex-wrap: wrap; }
  .model-hub-source-action { width: auto; flex: 1 1 0; }
  .model-hub-direct-card { min-height: 0; }
  /* Stacked, each cell carries its own label, so the column gutter becomes a
   * line gap and 16px of it would read as four separate rows. */
  .model-hub-usage-row { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .model-hub-usage-heading { align-items: flex-start; flex-direction: column; }
  .model-hub-usage-window { width: 100%; }
  .model-hub-usage-filter-context { width: 100%; margin-left: 0; }
  .model-hub-usage-stat-grid,
  .model-hub-usage-stat-grid--priced { grid-template-columns: 1fr; }
  .model-hub-usage-card-header { align-items: flex-start; flex-direction: column; }
  .model-hub-usage-group-control { width: 100%; align-items: flex-start; flex-direction: column; }
  .model-hub-usage-group-control > div { width: 100%; }
  .model-hub-usage-group-control button { flex: 1; }
  .model-hub-usage-details-actions { width: 100%; justify-content: flex-start; }
  /* One account per line; the pace and reset lines stack so neither truncates. */
  .model-hub-quota-grid { grid-template-columns: minmax(0, 1fr); }
  .model-hub-quota-row-foot { flex-direction: column; gap: 4px; }
  .model-hub-quota-reset { white-space: normal; }
  .model-hub-quota-timeline-title { width: 100%; }
  .model-hub-quota-value > div { padding: 9px 8px; }
  .model-hub-quota-value b { font-size: 12px; }
}

@media (min-width: 1024px) {
  .model-hub-shell { padding-top: 4px; }
}

@media (min-width: 1280px) {
  .model-hub-overview-grid {
    display: grid;
    grid-template-columns: var(--model-hub-upstream-track) var(--model-hub-rail-track) minmax(0, 1fr);
    gap: var(--model-hub-track-gap);
    align-items: start;
  }
  /* Beside the routes, providers stay in view while the Agent column scrolls,
     so every wire keeps both of its ends on screen. */
  .model-hub-upstream-card {
    position: sticky;
    top: 16px;
  }
}

.model-hub-wire {
  fill: none;
  opacity: 0.24;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 120ms ease;
}

.model-hub-wire--highlighted {
  opacity: 1;
}

.model-hub-wire--native {
  stroke: var(--cyan);
  stroke-width: var(--model-hub-wire-active-width);
  filter: drop-shadow(var(--shadow-glow-wire-cyan));
}

.model-hub-wire--gateway {
  stroke: var(--mint);
  stroke-width: var(--model-hub-wire-active-width);
  filter: drop-shadow(var(--shadow-glow-wire-mint));
}

.model-hub-wire--passthrough {
  stroke: var(--gold-ink);
  stroke-width: var(--model-hub-wire-active-width);
}

.model-hub-wire--connected_unused {
  stroke: color-mix(in srgb, var(--foreground) 15%, transparent);
  stroke-width: var(--model-hub-wire-muted-width);
}

.model-hub-wire--takeover {
  stroke: var(--violet);
  stroke-width: var(--model-hub-wire-active-width);
  filter: drop-shadow(var(--shadow-glow-wire-violet));
}

.model-hub-wire--unavailable {
  stroke: var(--gold);
  stroke-width: var(--model-hub-wire-muted-width);
}

.model-hub-wire-node {
  --model-hub-wire-node: 7px;
  r: calc(var(--model-hub-wire-node) / 2);
}

.model-hub-wire-node--shared-anchor {
  --model-hub-wire-node-stroke: 1.25px;
  fill: var(--background);
  stroke: var(--model-hub-ink-73);
  stroke-width: var(--model-hub-wire-node-stroke);
}

.model-hub-legend {
  --model-hub-legend-height: 34px;
  min-height: var(--model-hub-legend-height);
}

.model-hub-legend-swatch {
  width: 20px;
  height: 2px;
  border-radius: 2px;
}

.model-hub-legend-swatch--connected_unused {
  height: 1px;
}

.model-hub-legend-swatch--passthrough {
  background: var(--gold-ink);
}

/* ── Backend model catalog ────────────────────────────────────────────────
 * The catalog dialog and its row editor: two halves of one editing surface. The
 * metrics they share — the 40px control height that puts search and 「Add model」
 * on one line, the row borders, the chip shape — drift the moment they are
 * declared twice, so each is declared once in the shared block at the top.
 */

.model-hub-catalog-head {
  --model-hub-catalog-head-height: 70px;
  min-height: var(--model-hub-catalog-head-height);
  padding: 0 var(--model-hub-catalog-pad-x);
}
.model-hub-catalog-title {
  --model-hub-catalog-title-size: 18px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-catalog-title-size);
}

.model-hub-catalog-body {
  --model-hub-catalog-body-gap: 12px;
  gap: var(--model-hub-catalog-body-gap);
  padding: 16px var(--model-hub-catalog-pad-x) 0;
}

/* The one height search and 「Add model」 both answer to. */
.model-hub-catalog-control {
  --model-hub-catalog-control-height: 40px;
  height: var(--model-hub-catalog-control-height);
}

.model-hub-catalog-search {
  --model-hub-catalog-control-radius: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--model-hub-catalog-control-radius);
  background: var(--background);
}
.model-hub-catalog-search:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring);
}

.model-hub-catalog-columns {
  --model-hub-catalog-column-size: 11px;
  padding: 4px 4px 0;
  font-size: var(--model-hub-catalog-column-size);
  font-weight: 600;
  color: var(--muted);
}

.model-hub-catalog-row {
  --model-hub-catalog-row-radius: 10px;
  --model-hub-catalog-row-height: 62px;
  min-height: var(--model-hub-catalog-row-height);
  padding: var(--model-hub-catalog-row-pad-y) var(--model-hub-catalog-row-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--model-hub-catalog-row-radius);
  background: var(--background);
}
.model-hub-catalog-row--locked {
  --model-hub-catalog-row-locked-fill: var(--model-hub-wash-05);
  background: var(--model-hub-catalog-row-locked-fill);
}
.model-hub-catalog-row--static { min-height: 48px; }

.model-hub-catalog-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--model-hub-catalog-grip-size);
  color: var(--model-hub-ink-4d);
}
.model-hub-catalog-grip.is-grabbed { color: var(--mint-ink); }
.model-hub-catalog-grip:disabled { color: var(--model-hub-wash-33); }
.model-hub-catalog-grip-icon {
  width: var(--model-hub-catalog-grip-size);
  height: var(--model-hub-catalog-grip-size);
  flex: none;
  color: var(--model-hub-ink-4d);
}

.model-hub-catalog-name {
  --model-hub-catalog-name-size: 13.5px;
  font-size: var(--model-hub-catalog-name-size);
  font-weight: 600;
  color: var(--foreground);
}
.model-hub-catalog-id {
  --model-hub-catalog-id-size: 11.5px;
  font-size: var(--model-hub-catalog-id-size);
  color: var(--muted);
}

.model-hub-catalog-action {
  --model-hub-catalog-action-radius: 8px;
  --model-hub-catalog-action-size: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--model-hub-catalog-action-size);
  height: var(--model-hub-catalog-action-size);
  border: 1px solid var(--border);
  border-radius: var(--model-hub-catalog-action-radius);
  background: var(--background);
  color: var(--muted);
}
.model-hub-catalog-action:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--foreground);
}
.model-hub-catalog-action:disabled { opacity: 0.5; }
.model-hub-catalog-action--danger { color: var(--model-hub-danger-ink); }
.model-hub-catalog-action--danger:hover:not(:disabled) {
  border-color: var(--model-hub-danger-border);
  background: var(--model-hub-danger-fill);
  color: var(--model-hub-danger-ink);
}

.model-hub-catalog-blocked {
  margin-top: 6px;
  font-size: var(--model-hub-catalog-note-size);
  font-weight: 600;
  color: var(--model-hub-danger-ink);
}
/* The guard's evidence inside the focused removal's confirmation. The body is
 * the same one the guard dialog shows and brings its own parts, so this only has
 * to stack them and set the scale. */
.model-hub-catalog-consequence {
  --model-hub-catalog-consequence-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--model-hub-catalog-consequence-size);
  color: var(--foreground);
}

.model-hub-catalog-legacy {
  padding: 0 2px 4px;
  font-size: var(--model-hub-catalog-note-size);
  color: var(--muted);
}

.model-hub-catalog-foot {
  --model-hub-catalog-foot-pad-y: 14px;
  padding: var(--model-hub-catalog-foot-pad-y) var(--model-hub-catalog-pad-x);
}
.model-hub-catalog-count {
  --model-hub-catalog-count-size: 12px;
  font-size: var(--model-hub-catalog-count-size);
  color: var(--muted);
}

.model-hub-model-editor-head {
  --model-hub-model-head-height: 84px;
  min-height: var(--model-hub-model-head-height);
  padding: 0 var(--model-hub-model-pad-x);
}
.model-hub-model-editor-eyebrow {
  --model-hub-model-eyebrow-size: 11px;
  font-size: var(--model-hub-model-eyebrow-size);
  font-weight: 600;
  color: var(--muted);
}
.model-hub-model-editor-title {
  --model-hub-model-title-size: 18px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  font-size: var(--model-hub-model-title-size);
}

.model-hub-model-editor-body {
  --model-hub-model-section-gap: 20px;
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-model-section-gap);
  padding: 18px var(--model-hub-model-pad-x);
}
.model-hub-model-editor-foot { padding: 14px var(--model-hub-model-pad-x); }

.model-hub-model-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.model-hub-model-section-label {
  --model-hub-model-section-size: 11px;
  font-size: var(--model-hub-model-section-size);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.model-hub-model-field-label {
  --model-hub-model-label-size: 12px;
  font-size: var(--model-hub-model-label-size);
  font-weight: 600;
  color: var(--foreground);
}

.model-hub-model-control {
  --model-hub-model-control-height: 40px;
  height: var(--model-hub-model-control-height);
}

.model-hub-model-token {
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--model-hub-model-control-radius);
  background: var(--background);
}
.model-hub-model-token:focus-within {
  border-color: var(--ring);
  box-shadow: 0 0 0 1px var(--ring);
}
.model-hub-model-token.is-invalid { border-color: var(--model-hub-danger-border); }
.model-hub-model-token-suffix {
  font-size: 11.5px;
  color: var(--muted);
}

.model-hub-model-chip {
  --model-hub-model-chip-size: 12px;
  --model-hub-model-chip-radius: 7px;
  --model-hub-model-chip-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: var(--model-hub-model-chip-height);
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--model-hub-model-chip-radius);
  background: var(--background);
  font-size: var(--model-hub-model-chip-size);
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.model-hub-model-chip:hover:not(:disabled) { border-color: var(--border-strong); }
.model-hub-model-chip.is-on {
  border-color: var(--model-hub-mint-4d);
  background: var(--model-hub-mint-14);
  color: var(--mint-ink);
}
.model-hub-model-chip--add { border-style: dashed; }
.model-hub-model-chip--custom { padding-right: 6px; }

/* The 「Model」 typeahead. It floats over the fields below it rather than
 * displacing them: the frame draws it in layout flow, but every field it can
 * fill sits underneath, and pushing them down on each keystroke moves the very
 * values the user is about to check. Same metrics, overlay layering. */
.model-hub-model-match-list {
  /* Nine rows: the ranked read returns at most eight matches, and the 「use what
   * I typed」 escape is always the last one, so the cap is reached rather than
   * guessed — and a shorter list is still exactly as tall as its rows. */
  max-height: calc(var(--model-hub-model-match-height) * 9);
  overflow: hidden auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--model-hub-model-control-radius);
  background: var(--surface-2);
  box-shadow: var(--model-hub-menu-shadow);
}
.model-hub-model-match {
  min-height: var(--model-hub-model-match-height);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.model-hub-model-match:last-child { border-bottom: none; }
.model-hub-model-match:hover { background: var(--model-hub-wash-05); }
.model-hub-model-match.is-selected { background: var(--model-hub-mint-14); }
/* The 「use what I typed」 row is an escape, not a suggestion: no fill, so it
 * reads as the plain sentence the frame draws. */
.model-hub-model-match--literal { border-bottom: none; }
.model-hub-model-match--literal.is-selected { background: var(--model-hub-wash-08); }
.model-hub-model-match-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--foreground);
}
/* The id, the vendor and the context window: one type, three facts, so they are
 * one rule. Which of them a match carries is the read's answer, not a style. */
.model-hub-model-match-id,
.model-hub-model-match-meta {
  font-size: 11px;
  color: var(--muted);
}
.model-hub-model-match-literal {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--foreground);
}
.model-hub-model-match-state {
  min-height: var(--model-hub-model-match-height);
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.model-hub-model-note {
  font-size: var(--model-hub-model-note-size);
  color: var(--muted);
}
.model-hub-model-error {
  font-size: var(--model-hub-model-note-size);
  font-weight: 600;
  color: var(--model-hub-danger-ink);
}

/* ---------------------------------------------------------------------------
 * The 「Add models」 picker.
 *
 * It wears .model-hub-catalog-dialog for the shell — same width, head height,
 * title size, body padding, 40px search, footer padding — because it IS the
 * catalog's other half and the two are seen back to back. Only what the picker
 * has and the catalog does not lives here: the grouped list and its 36px
 * multi-select rows, a third of the catalog row's height because a pick is one
 * line of text, not an editable record.
 */

.model-hub-picker-list {
  --model-hub-picker-group-gap: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-picker-group-gap);
}
.model-hub-picker-group {
  --model-hub-picker-group-inner-gap: 4px;
  display: flex;
  flex-direction: column;
  gap: var(--model-hub-picker-group-inner-gap);
}
.model-hub-picker-group-head {
  --model-hub-picker-head-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 0;
  font-size: var(--model-hub-picker-head-size);
  font-weight: 600;
  color: var(--muted);
}

.model-hub-picker-row {
  --model-hub-picker-row-radius: 8px;
  --model-hub-picker-row-height: 36px;
  display: flex;
  align-items: center;
  gap: var(--model-hub-picker-row-gap);
  min-height: var(--model-hub-picker-row-height);
  padding: 0 var(--model-hub-picker-row-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--model-hub-picker-row-radius);
  background: var(--background);
  text-align: left;
}

.model-hub-picker-row--suppliers {
  /* What a stacked row measures: the strip sits 4px under the name
   * it belongs to. The indent is not a length — the strip starts where the
   * entry does, which is already past the checkbox. */
  --model-hub-picker-stack-gap: 4px;
  --model-hub-picker-suppliers-row-height: 52px;
}
.model-hub-picker-row.is-picked {
  border-color: var(--mint);
  background: var(--mint-soft);
}
/* An already-listed row is shown, not offered: it stays legible so the search
 * answers 「it exists」, and greys its name so it never looks pickable. */
.model-hub-picker-row--listed .model-hub-picker-name { color: var(--muted); }

/* Everything the row says about one model, beside its checkbox: the label, and
 * the strip naming its suppliers when it has any. */
.model-hub-picker-entry {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: var(--model-hub-picker-row-gap);
}

.model-hub-picker-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.model-hub-picker-name {
  font-size: var(--model-hub-picker-name-size);
  font-weight: 600;
  color: var(--foreground);
}
/* A row with no display name shows its id where the name would go — same size,
 * lighter weight, monospaced, because then the id IS the label. */
.model-hub-picker-name--id { font-weight: 500; }
.model-hub-picker-id {
  --model-hub-picker-id-size: 11px;
  font-size: var(--model-hub-picker-id-size);
  color: var(--muted);
}

/* Chips wrap rather than overflow: what the row displays is exactly what
 * `expected_suppliers` sends, so a clipped strip would hide part of the
 * agreement the user is confirming. The row grows only when they wrap. */
.model-hub-picker-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.model-hub-picker-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: var(--model-hub-picker-name-size);
  color: var(--muted);
}

@media (max-width: 767px) {
  /* Narrow enough that a name, an id, and a supplier strip cannot share one
   * line. Only rows that actually carry chips stack — declared by the row, not
   * inferred with :has(), so the height is decided where the data is known. */
  .model-hub-picker-row--suppliers {
    min-height: var(--model-hub-picker-suppliers-row-height);
    padding: 6px var(--model-hub-picker-row-pad-x);
  }
  /* The strip moves under the label, and the entry is what stacks it — so the
   * checkbox stays centred on both. Stacking the label's own contents instead
   * put a name above its id — two lines for one reading, which frame B‴ keeps
   * together — and left the strip still sharing the line it was supposed to
   * leave. It also broke the label's `truncate`: a column sizes its children
   * to their own text, so a long name overran the chips rather than being cut
   * at the row's edge. `stretch`, not `flex-start`, for the same reason. */
  .model-hub-picker-row--suppliers .model-hub-picker-entry {
    flex-direction: column;
    align-items: stretch;
    gap: var(--model-hub-picker-stack-gap);
  }
}