/*! Veyns UI 0.2.0 | design reference for Veyns server consoles | fonts: SIL OFL 1.1, icons: Lucide ISC + Veyns */

@layer vx.tokens, vx.base, vx.components, vx.shell, vx.utilities;

/* 00-fonts.css */
/*
 * Typefaces are self-hosted so the kit works under `font-src 'self'` and on
 * air-gapped on-premises installs. Atkinson Hyperlegible Next and Mono were
 * drawn to keep 0/O, 1/l/I and rn/m apart, which matters when operators
 * read account IDs, key fingerprints and release hashes aloud.
 * Licence: SIL OFL 1.1 (licenses/).
 */
@font-face {
  font-family: "Veyns Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Veyns Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Veyns Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Veyns Sans";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Veyns Mono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Veyns Mono";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* 01-tokens.css */
/*
 * Tokens. The greys come from the Veyns Auth app (#8C8C94, #6E6E78, #46464E),
 * which carry a faint violet cast (hue ~245°). The single accent, "vein", is
 * that same hue at full strength, so it reads as part of the grey family
 * rather than a second brand colour.
 *
 * Surfaces:
 *   data-surface="customer"     mist chrome   end-user pages, developer console, sandbox admin
 *   data-surface="engineering"  graphite chrome   restricted operator consoles (Auth, PSP, TEE)
 * The chrome tone tells an operator which kind of console they are in before
 * they read anything.
 */
@layer vx.tokens {
  :root {
    /* Raw palette */
    --vx-grey-0: #ffffff;
    --vx-grey-25: #f8f8fa;
    --vx-grey-50: #f1f1f4;
    --vx-grey-100: #e6e6eb;
    --vx-grey-150: #dcdce2;
    --vx-grey-200: #cfcfd6;
    --vx-grey-300: #b5b5be;
    --vx-grey-400: #8c8c94;
    --vx-grey-500: #6e6e78;
    --vx-grey-600: #575760;
    --vx-grey-700: #46464e;
    --vx-grey-800: #2d2d34;
    --vx-grey-850: #232329;
    --vx-grey-900: #1a1a1f;
    --vx-grey-950: #0e0e12;

    --vx-vein-50: #eeeffb;
    --vx-vein-100: #dfe0f6;
    --vx-vein-300: #9fa3e0;
    --vx-vein-500: #5a5fc2;
    --vx-vein-600: #4549a8;
    --vx-vein-700: #373a8a;

    --vx-green-50: #e9f4ee;
    --vx-green-600: #237a4b;
    --vx-green-700: #1b6039;
    --vx-amber-50: #fbf2dc;
    --vx-amber-600: #946000;
    --vx-amber-700: #7a4f00;
    --vx-red-50: #fbebe9;
    --vx-red-600: #b42f25;
    --vx-red-700: #95241c;

    /* Chrome: top bar and sidebar share one canvas behind the sheet */
    --vx-chrome: #e1e1e7;
    --vx-chrome-ink: #26262c;
    --vx-chrome-ink-2: #56565f;
    --vx-chrome-hover: #d4d4dc;
    --vx-chrome-line: #c9c9d1;
    --vx-chrome-field: #f4f4f7;
    --vx-nav-active: var(--vx-sheet);
    --vx-nav-active-ink: var(--vx-ink);
    --vx-nav-active-line: #c4c4cc;
    --vx-flyout: var(--vx-sheet);

    /* Sheet: the white working surface */
    --vx-sheet: #ffffff;
    --vx-sheet-line: #c8c8d0;
    --vx-sunk: #f7f7f9;
    --vx-raised: #ffffff;
    --vx-hover: #f1f1f4;
    --vx-selected: var(--vx-vein-50);

    --vx-ink: #1e1e24;
    --vx-ink-2: #5a5a64;
    --vx-ink-3: #6e6e78;
    --vx-ink-disabled: #a4a4ad;
    --vx-ink-inverse: #ffffff;

    --vx-line: #dadae0;
    --vx-line-soft: #ebebef;
    --vx-line-strong: #b9b9c2;

    --vx-accent: var(--vx-vein-600);
    --vx-accent-hover: var(--vx-vein-700);
    --vx-link: var(--vx-vein-600);
    --vx-focus: var(--vx-vein-500);

    --vx-primary: var(--vx-grey-800);
    --vx-primary-hover: var(--vx-grey-950);
    --vx-primary-ink: #ffffff;

    --vx-ok: var(--vx-green-600);
    --vx-ok-bg: var(--vx-green-50);
    --vx-ok-ink: var(--vx-green-700);
    --vx-warn: var(--vx-amber-600);
    --vx-warn-bg: var(--vx-amber-50);
    --vx-warn-ink: var(--vx-amber-700);
    --vx-danger: var(--vx-red-600);
    --vx-danger-bg: var(--vx-red-50);
    --vx-danger-ink: var(--vx-red-700);
    --vx-info-bg: var(--vx-vein-50);
    --vx-info-ink: var(--vx-vein-700);
    --vx-neutral-bg: var(--vx-grey-50);
    --vx-neutral-ink: var(--vx-grey-600);

    --vx-art: #cfcfd6;
    --vx-scrim: rgb(20 20 26 / 0.42);
    --vx-shadow-pop: 0 1px 2px rgb(20 20 30 / 0.08), 0 8px 24px rgb(20 20 30 / 0.12);
    --vx-shadow-sheet: 0 0 0 1px var(--vx-sheet-line);

    /* Type — scale follows the classic 12 / 14 / 16 / 18 / 21 / 24 / 30 / 36 steps */
    --vx-font: "Veyns Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --vx-mono: "Veyns Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
    --vx-text-xs: 0.75rem;
    --vx-text-sm: 0.8125rem;
    --vx-text-md: 0.875rem;
    --vx-text-lg: 1rem;
    --vx-text-xl: 1.125rem;
    --vx-text-2xl: 1.3125rem;
    --vx-text-3xl: 1.5rem;
    --vx-text-4xl: 1.875rem;
    --vx-text-5xl: 2.25rem;
    --vx-leading: 1.5;
    --vx-leading-tight: 1.25;

    /* Space — 4px base */
    --vx-space-1: 0.25rem;
    --vx-space-2: 0.5rem;
    --vx-space-3: 0.75rem;
    --vx-space-4: 1rem;
    --vx-space-5: 1.25rem;
    --vx-space-6: 1.5rem;
    --vx-space-8: 2rem;
    --vx-space-10: 2.5rem;
    --vx-space-12: 3rem;

    /* Radius follows hierarchy: the sheet is the softest, controls the tightest */
    --vx-radius-sheet: 12px;
    --vx-radius-box: 8px;
    --vx-radius-control: 6px;
    --vx-radius-tag: 4px;

    /* Shell metrics */
    --vx-topbar-h: 48px;
    --vx-sidebar-w: 256px;
    --vx-sidebar-w-compact: 52px;
    --vx-sheet-gap: 8px;
    --vx-content-max: 1200px;
    --vx-control-h: 32px;
    --vx-control-h-sm: 28px;
    --vx-control-h-lg: 40px;
    --vx-icon: 16px;
    --vx-icon-stroke: 1.75;

    --vx-ease: cubic-bezier(0.2, 0, 0, 1);
    --vx-dur: 160ms;

    color-scheme: light;
  }

  /* Engineering consoles: graphite chrome around the same white sheet */
  [data-surface="engineering"] {
    --vx-chrome: #2b2b31;
    --vx-chrome-ink: #ececf0;
    --vx-chrome-ink-2: #a9a9b3;
    --vx-chrome-hover: #3a3a42;
    --vx-chrome-line: #45454e;
    --vx-chrome-field: #36363d;
    --vx-nav-active: #46464e;
    --vx-nav-active-ink: #ffffff;
    --vx-nav-active-line: #5a5a63;
    --vx-flyout: #2b2b31;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --vx-chrome: #16161a;
      --vx-chrome-ink: #e4e4ea;
      --vx-chrome-ink-2: #9d9da7;
      --vx-chrome-hover: #26262c;
      --vx-chrome-line: #2f2f36;
      --vx-chrome-field: #202025;
      --vx-nav-active: #232329;
      --vx-nav-active-ink: #ffffff;
      --vx-nav-active-line: #3a3a42;
      --vx-flyout: #1d1d22;
      --vx-sheet: #1d1d22;
      --vx-sheet-line: #303038;
      --vx-sunk: #18181c;
      --vx-raised: #232329;
      --vx-hover: #26262c;
      --vx-selected: #262845;
      --vx-ink: #ececf0;
      --vx-ink-2: #a9a9b3;
      --vx-ink-3: #8f8f99;
      --vx-ink-disabled: #5d5d66;
      --vx-line: #34343c;
      --vx-line-soft: #2a2a31;
      --vx-line-strong: #4a4a53;
      --vx-accent: #9fa3e0;
      --vx-accent-hover: #c0c3ee;
      --vx-link: #a9adea;
      --vx-focus: #9fa3e0;
      --vx-primary: #ececf0;
      --vx-primary-hover: #ffffff;
      --vx-primary-ink: #1a1a1f;
      --vx-ok: #5cc28a;
      --vx-ok-bg: #173324;
      --vx-ok-ink: #8fdcb1;
      --vx-warn: #e0a93a;
      --vx-warn-bg: #3a2c10;
      --vx-warn-ink: #f0c877;
      --vx-danger: #ef7a70;
      --vx-danger-bg: #401c19;
      --vx-danger-ink: #f6aaa3;
      --vx-info-bg: #262845;
      --vx-info-ink: #c0c3ee;
      --vx-neutral-bg: #26262c;
      --vx-neutral-ink: #b5b5be;
      --vx-art: #3d3d45;
      --vx-scrim: rgb(0 0 0 / 0.6);
      --vx-shadow-pop: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.5);
      color-scheme: dark;
    }
    :root:not([data-theme="light"]) [data-surface="engineering"] {
      --vx-chrome: #0f0f12;
      --vx-chrome-hover: #1f1f24;
      --vx-nav-active: #2a2a31;
      --vx-flyout: #1a1a1f;
    }
  }

  :root[data-theme="dark"] {
    --vx-chrome: #16161a;
    --vx-chrome-ink: #e4e4ea;
    --vx-chrome-ink-2: #9d9da7;
    --vx-chrome-hover: #26262c;
    --vx-chrome-line: #2f2f36;
    --vx-chrome-field: #202025;
    --vx-nav-active: #232329;
    --vx-nav-active-ink: #ffffff;
    --vx-nav-active-line: #3a3a42;
    --vx-flyout: #1d1d22;
    --vx-sheet: #1d1d22;
    --vx-sheet-line: #303038;
    --vx-sunk: #18181c;
    --vx-raised: #232329;
    --vx-hover: #26262c;
    --vx-selected: #262845;
    --vx-ink: #ececf0;
    --vx-ink-2: #a9a9b3;
    --vx-ink-3: #8f8f99;
    --vx-ink-disabled: #5d5d66;
    --vx-line: #34343c;
    --vx-line-soft: #2a2a31;
    --vx-line-strong: #4a4a53;
    --vx-accent: #9fa3e0;
    --vx-accent-hover: #c0c3ee;
    --vx-link: #a9adea;
    --vx-focus: #9fa3e0;
    --vx-primary: #ececf0;
    --vx-primary-hover: #ffffff;
    --vx-primary-ink: #1a1a1f;
    --vx-ok: #5cc28a;
    --vx-ok-bg: #173324;
    --vx-ok-ink: #8fdcb1;
    --vx-warn: #e0a93a;
    --vx-warn-bg: #3a2c10;
    --vx-warn-ink: #f0c877;
    --vx-danger: #ef7a70;
    --vx-danger-bg: #401c19;
    --vx-danger-ink: #f6aaa3;
    --vx-info-bg: #262845;
    --vx-info-ink: #c0c3ee;
    --vx-neutral-bg: #26262c;
    --vx-neutral-ink: #b5b5be;
    --vx-art: #3d3d45;
    --vx-scrim: rgb(0 0 0 / 0.6);
    --vx-shadow-pop: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.5);
    color-scheme: dark;
  }
  :root[data-theme="dark"] [data-surface="engineering"] {
    --vx-chrome: #0f0f12;
    --vx-chrome-hover: #1f1f24;
    --vx-nav-active: #2a2a31;
    --vx-flyout: #1a1a1f;
  }
}

/* 02-base.css */
@layer vx.base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    margin: 0;
    background: var(--vx-chrome);
    color: var(--vx-ink);
    font-family: var(--vx-font);
    font-size: var(--vx-text-md);
    line-height: var(--vx-leading);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre, blockquote {
    margin: 0;
  }

  h1, h2, h3, h4 {
    line-height: var(--vx-leading-tight);
    text-wrap: balance;
  }

  p, li, dd {
    text-wrap: pretty;
  }

  fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }

  legend {
    padding: 0;
  }

  img, svg, video {
    display: block;
    max-width: 100%;
  }

  button, input, select, textarea {
    font: inherit;
    color: inherit;
  }

  a {
    color: var(--vx-link);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
  }

  a:hover {
    color: var(--vx-accent-hover);
  }

  code, kbd, samp, pre {
    font-family: var(--vx-mono);
    font-size: 0.923em;
  }

  :focus-visible {
    outline: 2px solid var(--vx-focus);
    outline-offset: 2px;
  }

  ::selection {
    background: var(--vx-vein-100);
    color: var(--vx-ink);
  }

  [hidden] {
    display: none !important;
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  /* Pages that are not full consoles (sign-in, OTP, consent popup) sit on the sheet colour */
  body.vx-plain {
    background: var(--vx-sunk);
  }
}

@layer vx.utilities {
  .vx-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .vx-mono {
    font-family: var(--vx-mono);
    font-size: 0.923em;
    letter-spacing: 0;
  }

  .vx-muted {
    color: var(--vx-ink-2);
  }

  .vx-subtle {
    color: var(--vx-ink-3);
  }

  .vx-nowrap {
    white-space: nowrap;
  }

  .vx-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vx-num {
    font-variant-numeric: tabular-nums;
    text-align: end;
  }

  .vx-stack {
    display: flex;
    flex-direction: column;
    gap: var(--vx-gap, var(--vx-space-4));
  }

  .vx-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-gap, var(--vx-space-2));
  }

  .vx-spacer {
    flex: 1 1 auto;
  }

  .vx-gap-1 { --vx-gap: var(--vx-space-1); }
  .vx-gap-3 { --vx-gap: var(--vx-space-3); }
  .vx-gap-6 { --vx-gap: var(--vx-space-6); }
  .vx-gap-8 { --vx-gap: var(--vx-space-8); }
}

/* 03-shell.css */
/*
 * Shell: top bar and sidebar share the chrome canvas; the page lives on a
 * white sheet inset from the chrome. The active navigation item takes the
 * sheet colour, so the eye connects "where I am" with "what I am looking at".
 * There is deliberately no right-hand rail: the account button is the only
 * control at the top-right.
 */
@layer vx.shell {
  .vx-app {
    display: grid;
    grid-template-columns: var(--vx-sidebar-w) minmax(0, 1fr);
    grid-template-rows: var(--vx-topbar-h) minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "side sheet";
    height: 100vh;
    height: 100dvh;
    background: var(--vx-chrome);
    color: var(--vx-chrome-ink);
  }

  .vx-app[data-sidebar="compact"] {
    grid-template-columns: var(--vx-sidebar-w-compact) minmax(0, 1fr);
  }

  .vx-skip {
    position: absolute;
    inset-inline-start: var(--vx-space-2);
    top: -100px;
    z-index: 50;
    padding: var(--vx-space-2) var(--vx-space-3);
    border-radius: var(--vx-radius-control);
    background: var(--vx-sheet);
    color: var(--vx-ink);
  }

  .vx-skip:focus {
    top: var(--vx-space-2);
  }

  /* ---------- Top bar ---------- */

  .vx-topbar {
    grid-area: top;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--vx-space-3);
    padding-inline: var(--vx-space-2) var(--vx-space-3);
    min-width: 0;
  }

  .vx-topbar__start,
  .vx-topbar__end {
    display: flex;
    align-items: center;
    gap: var(--vx-space-1);
    min-width: 0;
  }

  .vx-topbar__menu {
    display: none;
  }

  .vx-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--vx-space-3);
    height: 40px;
    padding: 4px;
    padding-inline-end: var(--vx-space-2);
    border-radius: var(--vx-radius-box);
    color: inherit;
    text-decoration: none;
  }

  /* Chrome colours only in the top bar; a brand inside a card follows the card */
  .vx-topbar .vx-brand {
    color: var(--vx-chrome-ink);
  }

  .vx-topbar .vx-brand:hover {
    background: var(--vx-chrome-hover);
    color: var(--vx-chrome-ink);
  }

  /* The logo as the designers supplied it: white halftone on black */
  .vx-logo {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 8px;
    background: #000;
    color: #fff;
  }

  .vx-logo > svg {
    width: 24px;
    height: 16px;
  }

  .vx-logo--lg {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .vx-logo--lg > svg {
    width: 42px;
    height: 28px;
  }

  .vx-brand__product {
    color: inherit;
    font-size: var(--vx-text-md);
    font-weight: 650;
    line-height: 20px;
    white-space: nowrap;
  }

  .vx-search {
    position: relative;
    justify-self: center;
    width: min(100%, 520px);
  }

  .vx-search > .vx-icon {
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    translate: 0 -50%;
    color: var(--vx-chrome-ink-2);
    pointer-events: none;
  }

  .vx-search input {
    width: 100%;
    height: var(--vx-control-h);
    padding-inline: 34px 12px;
    border: 1px solid var(--vx-chrome-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-chrome-field);
    color: var(--vx-chrome-ink);
    transition: background var(--vx-dur) var(--vx-ease), border-color var(--vx-dur) var(--vx-ease);
  }

  .vx-search input::placeholder {
    color: var(--vx-chrome-ink-2);
    opacity: 1;
  }

  .vx-search input:hover {
    border-color: var(--vx-line-strong);
  }

  .vx-search input:focus {
    outline: none;
    border-color: var(--vx-focus);
    background: var(--vx-sheet);
    color: var(--vx-ink);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vx-focus) 25%, transparent);
  }

  .vx-search input::-webkit-search-cancel-button {
    display: none;
  }

  /* Go-to results under the search field */
  .vx-goto {
    position: absolute;
    inset-inline: 0;
    top: calc(100% + 4px);
    z-index: 30;
    margin: 0;
    padding: 4px;
    list-style: none;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-raised);
    box-shadow: var(--vx-shadow-pop);
    color: var(--vx-ink);
  }

  .vx-goto__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--vx-space-3);
    padding: 7px 10px;
    border-radius: var(--vx-radius-control);
    cursor: pointer;
  }

  .vx-goto__item small {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-xs);
  }

  .vx-goto__item[aria-selected="true"],
  .vx-goto__item:hover {
    background: var(--vx-hover);
  }

  .vx-goto__empty {
    padding: 7px 10px;
    color: var(--vx-ink-2);
  }

  .vx-account-btn {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .vx-account-btn:hover {
    background: var(--vx-chrome-hover);
  }

  /* ---------- Sidebar ---------- */

  .vx-sidebar {
    grid-area: side;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: var(--vx-space-1) var(--vx-space-2) var(--vx-space-2);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--vx-chrome-line) transparent;
  }

  .vx-sidebar__foot {
    margin-top: auto;
    padding-top: var(--vx-space-3);
  }

  /* Context: which server and environment this console controls */
  .vx-context {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 2px var(--vx-space-2);
    padding: var(--vx-space-2);
    margin-bottom: var(--vx-space-2);
    border-radius: var(--vx-radius-box);
    color: var(--vx-chrome-ink);
    text-decoration: none;
  }

  a.vx-context:hover {
    background: var(--vx-chrome-hover);
    color: var(--vx-chrome-ink);
  }

  .vx-context .vx-tile {
    grid-row: span 2;
  }

  .vx-context__kind {
    color: var(--vx-chrome-ink-2);
    font-size: var(--vx-text-xs);
    line-height: 16px;
  }

  .vx-context__name {
    overflow: hidden;
    font-weight: 700;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vx-nav,
  .vx-nav__sub {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .vx-nav + .vx-nav {
    margin-top: var(--vx-space-2);
    padding-top: var(--vx-space-2);
    border-top: 1px solid var(--vx-chrome-line);
  }

  .vx-nav__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--vx-space-3);
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: var(--vx-radius-control);
    background: transparent;
    color: var(--vx-chrome-ink);
    font-size: var(--vx-text-md);
    line-height: 18px;
    text-align: start;
    text-decoration: none;
    cursor: pointer;
  }

  .vx-nav__item:hover {
    background: var(--vx-chrome-hover);
    color: var(--vx-chrome-ink);
  }

  .vx-nav__item > .vx-icon {
    color: var(--vx-chrome-ink-2);
  }

  .vx-nav__item[aria-current="page"] {
    border-color: var(--vx-nav-active-line);
    background: var(--vx-nav-active);
    color: var(--vx-nav-active-ink);
    font-weight: 650;
  }

  .vx-nav__item[aria-current="page"] > .vx-icon {
    color: currentColor;
  }

  .vx-nav__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vx-nav__count {
    min-width: 20px;
    color: var(--vx-chrome-ink-2);
    font-size: var(--vx-text-xs);
    text-align: end;
  }

  .vx-nav__chev {
    color: var(--vx-chrome-ink-2);
    transition: rotate var(--vx-dur) var(--vx-ease);
  }

  .vx-nav__group > .vx-nav__item[aria-expanded="true"] > .vx-nav__chev {
    rotate: 90deg;
  }

  .vx-nav__group > .vx-nav__item[aria-expanded="false"] + .vx-nav__sub {
    display: none;
  }

  /* Group with an active child keeps a quiet marker when collapsed */
  .vx-nav__group:has([aria-current="page"]) > .vx-nav__item {
    font-weight: 650;
  }

  .vx-nav__sub .vx-nav__item {
    padding-inline-start: 38px;
  }

  .vx-nav__flyout-title {
    display: none;
  }

  /* Restricted engineering entries carry a small lock after the label */
  .vx-nav__lock {
    width: 12px;
    height: 12px;
    color: var(--vx-chrome-ink-2);
  }

  /* ---------- Compact sidebar ---------- */

  .vx-app[data-sidebar="compact"] .vx-sidebar {
    padding-inline: 6px;
    overflow: visible;
  }

  .vx-app[data-sidebar="compact"] .vx-context {
    grid-template-columns: auto;
    justify-content: center;
    padding: 4px 0;
  }

  .vx-app[data-sidebar="compact"] .vx-context__kind,
  .vx-app[data-sidebar="compact"] .vx-context__name,
  .vx-app[data-sidebar="compact"] .vx-context .vx-env,
  .vx-app[data-sidebar="compact"] .vx-nav__chev,
  .vx-app[data-sidebar="compact"] .vx-nav__count,
  .vx-app[data-sidebar="compact"] .vx-nav__lock {
    display: none;
  }

  .vx-app[data-sidebar="compact"] .vx-nav__item {
    justify-content: center;
    padding-inline: 0;
  }

  /* In compact mode the label becomes the item's tooltip */
  .vx-app[data-sidebar="compact"] .vx-nav > li > .vx-nav__item > .vx-nav__label,
  .vx-app[data-sidebar="compact"] .vx-sidebar__foot .vx-nav__label {
    position: absolute;
    inset-inline-start: calc(100% + 10px);
    top: 50%;
    z-index: 5;
    translate: -4px -50%;
    padding: 4px 8px;
    border-radius: var(--vx-radius-tag);
    background: var(--vx-grey-900);
    color: #fff;
    font-size: var(--vx-text-sm);
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--vx-dur) var(--vx-ease), translate var(--vx-dur) var(--vx-ease);
  }

  .vx-app[data-sidebar="compact"] .vx-nav__item:hover > .vx-nav__label,
  .vx-app[data-sidebar="compact"] .vx-nav__item:focus-visible > .vx-nav__label {
    opacity: 1;
    translate: 0 -50%;
  }

  /* Groups open as a flyout panel beside the rail */
  .vx-app[data-sidebar="compact"] .vx-nav__group {
    position: relative;
  }

  .vx-app[data-sidebar="compact"] .vx-nav__group > .vx-nav__item > .vx-nav__label {
    display: none;
  }

  .vx-app[data-sidebar="compact"] .vx-nav__group > .vx-nav__sub,
  .vx-app[data-sidebar="compact"] .vx-nav__group > .vx-nav__item[aria-expanded="false"] + .vx-nav__sub {
    position: absolute;
    inset-inline-start: calc(100% + 4px);
    top: -4px;
    z-index: 6;
    display: none;
    min-width: 220px;
    padding: 4px;
    border: 1px solid var(--vx-chrome-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-flyout);
    box-shadow: var(--vx-shadow-pop);
  }

  /* A transparent bridge keeps the flyout open while the pointer crosses the gap */
  .vx-app[data-sidebar="compact"] .vx-nav__group > .vx-nav__sub::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: -8px;
    width: 8px;
  }

  /* Must outrank the collapsed-group rule above, which also matches in compact mode */
  .vx-app[data-sidebar="compact"] .vx-nav__group:is(:hover, :focus-within) > .vx-nav__item[aria-expanded] + .vx-nav__sub {
    display: flex;
  }

  .vx-app[data-sidebar="compact"] .vx-nav__flyout-title {
    display: block;
    padding: 6px 10px 4px;
    color: var(--vx-chrome-ink-2);
    font-size: var(--vx-text-xs);
    font-weight: 650;
  }

  .vx-app[data-sidebar="compact"] .vx-nav__sub .vx-nav__item {
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .vx-app[data-sidebar="compact"] .vx-nav__sub .vx-nav__item[aria-current="page"] {
    border-color: transparent;
    background: var(--vx-chrome-hover);
    color: var(--vx-chrome-ink);
  }

  .vx-app[data-sidebar="compact"] .vx-sidebar__foot [data-vx-action="toggle-sidebar"] > .vx-icon {
    rotate: 180deg;
  }

  /* ---------- Sheet ---------- */

  .vx-sheet {
    grid-area: sheet;
    position: relative;
    min-width: 0;
    min-height: 0;
    margin: 0 var(--vx-sheet-gap) var(--vx-sheet-gap) 0;
    overflow: auto;
    border-radius: var(--vx-radius-sheet);
    background: var(--vx-sheet);
    box-shadow: var(--vx-shadow-sheet);
    color: var(--vx-ink);
    scrollbar-gutter: stable;
  }

  .vx-sheet:focus {
    outline: none;
  }

  .vx-page {
    width: 100%;
    max-width: var(--vx-content-max);
    margin-inline: auto;
    padding: var(--vx-space-4) var(--vx-space-6) var(--vx-space-12);
  }

  .vx-page--wide {
    max-width: none;
  }

  .vx-page--narrow {
    max-width: 760px;
  }

  /* Two-column body: main column plus a quiet "about" column, as on a repository page */
  .vx-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--vx-space-8);
    align-items: start;
  }

  /* ---------- Drawer (small screens) ---------- */

  .vx-scrim {
    display: none;
  }

  @media (max-width: 1024px) {
    .vx-split {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  @media (max-width: 767px) {
    .vx-app,
    .vx-app[data-sidebar="compact"],
    .vx-app:not([data-sidebar="compact"]) {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas:
        "top"
        "sheet";
    }

    .vx-topbar {
      gap: var(--vx-space-2);
      padding-inline: var(--vx-space-2);
    }

    .vx-topbar__menu {
      display: inline-grid;
    }

    .vx-brand__product {
      display: none;
    }

    .vx-sheet {
      margin: 0 var(--vx-sheet-gap) var(--vx-sheet-gap);
    }

    .vx-page {
      padding: var(--vx-space-4) var(--vx-space-4) var(--vx-space-10);
    }

    .vx-sidebar,
    .vx-app[data-sidebar="compact"] .vx-sidebar {
      position: fixed;
      inset-block: 0;
      inset-inline-start: 0;
      z-index: 40;
      width: min(300px, 86vw);
      padding: var(--vx-space-3) var(--vx-space-2);
      overflow-y: auto;
      background: var(--vx-chrome);
      box-shadow: var(--vx-shadow-pop);
      translate: -105% 0;
      visibility: hidden;
      transition: translate 220ms var(--vx-ease), visibility 0s linear 220ms;
    }

    [dir="rtl"] .vx-sidebar {
      translate: 105% 0;
    }

    .vx-app[data-drawer="open"] .vx-sidebar {
      translate: 0 0;
      visibility: visible;
      transition: translate 220ms var(--vx-ease), visibility 0s;
    }

    .vx-app[data-drawer="open"] .vx-scrim {
      position: fixed;
      inset: 0;
      z-index: 39;
      display: block;
      background: var(--vx-scrim);
    }

    /* The drawer always shows full labels, whatever the desktop preference */
    .vx-app .vx-sidebar .vx-context {
      grid-template-columns: auto minmax(0, 1fr);
      justify-content: stretch;
      padding: var(--vx-space-2);
    }

    .vx-app .vx-sidebar .vx-context__kind,
    .vx-app .vx-sidebar .vx-context__name {
      display: block;
    }

    .vx-app .vx-sidebar .vx-nav__item {
      justify-content: flex-start;
      padding-inline: 10px;
    }

    .vx-app .vx-sidebar .vx-nav__sub .vx-nav__item {
      padding-inline-start: 38px;
    }

    .vx-app .vx-sidebar .vx-nav__label,
    .vx-app[data-sidebar="compact"] .vx-sidebar .vx-nav > li > .vx-nav__item > .vx-nav__label,
    .vx-app[data-sidebar="compact"] .vx-sidebar .vx-sidebar__foot .vx-nav__label,
    .vx-app[data-sidebar="compact"] .vx-sidebar .vx-nav__group > .vx-nav__item > .vx-nav__label {
      position: static;
      display: block;
      padding: 0;
      background: none;
      color: inherit;
      font-size: inherit;
      opacity: 1;
      translate: none;
    }

    .vx-app[data-sidebar="compact"] .vx-sidebar .vx-nav__chev,
    .vx-app[data-sidebar="compact"] .vx-sidebar .vx-nav__count {
      display: block;
    }

    .vx-app .vx-sidebar .vx-nav__group > .vx-nav__sub,
    .vx-app[data-sidebar="compact"] .vx-sidebar .vx-nav__group > .vx-nav__sub {
      position: static;
      display: flex;
      min-width: 0;
      padding: 0;
      border: 0;
      background: none;
      box-shadow: none;
    }

    .vx-app .vx-sidebar .vx-nav__group > .vx-nav__item[aria-expanded="false"] + .vx-nav__sub {
      display: none;
    }

    .vx-app .vx-sidebar .vx-nav__flyout-title,
    .vx-sidebar__foot [data-vx-action="toggle-sidebar"] {
      display: none;
    }
  }
}

/* 04-components.css */
@layer vx.components {
  /* ---------- Icons ---------- */

  .vx-icon {
    display: inline-block;
    width: var(--vx-icon);
    height: var(--vx-icon);
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: var(--vx-icon-stroke);
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.2em;
  }

  .vx-icon--sm { --vx-icon: 14px; }
  .vx-icon--lg { --vx-icon: 20px; --vx-icon-stroke: 1.6; }
  .vx-icon--xl { --vx-icon: 24px; --vx-icon-stroke: 1.5; }

  .vx-mark {
    fill: currentColor;
    stroke: none;
  }

  /* ---------- Identity marks ---------- */

  .vx-tile {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-control);
    background: var(--vx-vein-50);
    color: var(--vx-vein-700);
    font-size: var(--vx-text-md);
    font-weight: 700;
    line-height: 1;
    text-transform: none;
  }

  .vx-tile--lg {
    width: 56px;
    height: 56px;
    border-radius: var(--vx-radius-box);
    font-size: var(--vx-text-3xl);
    font-weight: 500;
  }

  [data-surface="engineering"] .vx-context .vx-tile {
    border-color: var(--vx-chrome-line);
    background: var(--vx-chrome-hover);
    color: var(--vx-chrome-ink);
  }

  .vx-avatar {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: none;
    overflow: hidden;
    border-radius: 50%;
    background: var(--vx-grey-100);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
    color: var(--vx-grey-800);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }

  .vx-avatar > svg {
    width: 100%;
    height: 100%;
  }

  .vx-avatar--lg {
    width: 64px;
    height: 64px;
    font-size: 20px;
  }

  /* Environment: production is solid so it is never mistaken for a sandbox */
  .vx-env {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-self: start;
    height: 18px;
    padding-inline: 6px;
    border: 1px solid currentColor;
    border-radius: var(--vx-radius-tag);
    color: var(--vx-chrome-ink-2);
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
  }

  .vx-env::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

  .vx-env[data-env="production"] {
    border-color: var(--vx-chrome-ink);
    background: var(--vx-chrome-ink);
    color: var(--vx-chrome);
  }

  .vx-env[data-env="sandbox"] {
    border-style: dashed;
  }

  .vx-env[data-env="lab"],
  .vx-env[data-env="demo"] {
    border-style: dotted;
  }

  .vx-kbd,
  kbd {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding-inline: 5px;
    border: 1px solid var(--vx-line-strong);
    border-bottom-width: 2px;
    border-radius: var(--vx-radius-tag);
    background: var(--vx-sheet);
    color: var(--vx-ink-2);
    font-family: var(--vx-mono);
    font-size: 11px;
    line-height: 1;
  }

  /* ---------- Buttons ---------- */

  .vx-btn {
    --vx-btn-bg: var(--vx-sheet);
    --vx-btn-ink: var(--vx-ink);
    --vx-btn-line: var(--vx-line-strong);
    --vx-btn-hover: var(--vx-hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--vx-space-2);
    height: var(--vx-control-h);
    padding-inline: 12px;
    border: 1px solid var(--vx-btn-line);
    border-radius: var(--vx-radius-control);
    background: var(--vx-btn-bg);
    color: var(--vx-btn-ink);
    font-size: var(--vx-text-md);
    font-weight: 550;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--vx-dur) var(--vx-ease), border-color var(--vx-dur) var(--vx-ease), box-shadow var(--vx-dur) var(--vx-ease);
  }

  .vx-btn:hover {
    background: var(--vx-btn-hover);
    color: var(--vx-btn-ink);
  }

  .vx-btn:active {
    box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.12);
  }

  .vx-btn:disabled,
  .vx-btn[aria-disabled="true"] {
    border-color: var(--vx-line);
    background: var(--vx-sunk);
    color: var(--vx-ink-disabled);
    box-shadow: none;
    cursor: not-allowed;
  }

  .vx-btn--primary {
    --vx-btn-bg: var(--vx-primary);
    --vx-btn-ink: var(--vx-primary-ink);
    --vx-btn-line: var(--vx-primary);
    --vx-btn-hover: var(--vx-primary-hover);
  }

  .vx-btn--danger {
    --vx-btn-bg: var(--vx-danger);
    --vx-btn-ink: #fff;
    --vx-btn-line: var(--vx-danger);
    --vx-btn-hover: var(--vx-red-700);
  }

  .vx-btn--danger-quiet {
    --vx-btn-ink: var(--vx-danger);
    --vx-btn-line: color-mix(in srgb, var(--vx-danger) 45%, var(--vx-line));
    --vx-btn-hover: var(--vx-danger-bg);
  }

  .vx-btn--ghost {
    --vx-btn-bg: transparent;
    --vx-btn-line: transparent;
  }

  .vx-btn--link {
    --vx-btn-bg: transparent;
    --vx-btn-line: transparent;
    --vx-btn-hover: transparent;
    --vx-btn-ink: var(--vx-link);
    height: auto;
    padding: 0;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.18em;
  }

  .vx-btn--sm {
    height: var(--vx-control-h-sm);
    padding-inline: 10px;
    font-size: var(--vx-text-sm);
  }

  .vx-btn--lg {
    height: var(--vx-control-h-lg);
    padding-inline: 16px;
    font-size: var(--vx-text-lg);
  }

  .vx-btn--block {
    width: 100%;
  }

  /* Touch targets for phone-first flows (approve, deny, pair): at least 48px */
  .vx-btn--touch {
    min-height: 48px;
    padding-inline: 18px;
    font-size: var(--vx-text-lg);
  }

  .vx-icon-btn {
    display: inline-grid;
    place-items: center;
    width: var(--vx-control-h);
    height: var(--vx-control-h);
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--vx-radius-control);
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .vx-icon-btn:hover {
    background: var(--vx-hover);
  }

  .vx-topbar .vx-icon-btn:hover,
  .vx-sidebar .vx-icon-btn:hover {
    background: var(--vx-chrome-hover);
  }

  .vx-icon-btn--bordered {
    border-color: var(--vx-line-strong);
    background: var(--vx-sheet);
  }

  /* Joined buttons, e.g. an action with its count */
  .vx-btn-group {
    display: inline-flex;
  }

  .vx-btn-group > .vx-btn,
  .vx-btn-group > .vx-icon-btn,
  .vx-btn-group > .vx-btn-count {
    border-radius: 0;
  }

  .vx-btn-group > :first-child {
    border-start-start-radius: var(--vx-radius-control);
    border-end-start-radius: var(--vx-radius-control);
  }

  .vx-btn-group > :last-child {
    border-start-end-radius: var(--vx-radius-control);
    border-end-end-radius: var(--vx-radius-control);
  }

  .vx-btn-group > * + * {
    margin-inline-start: -1px;
  }

  .vx-btn-count {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: var(--vx-control-h);
    padding-inline: 10px;
    border: 1px solid var(--vx-line-strong);
    background: var(--vx-sheet);
    color: var(--vx-ink);
    font-weight: 550;
  }

  /* ---------- Breadcrumbs and page head ---------- */

  .vx-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-crumbs li + li::before {
    content: "/";
    margin-inline-end: 6px;
    color: var(--vx-ink-3);
  }

  .vx-crumbs a {
    color: var(--vx-ink-2);
    text-decoration: none;
  }

  .vx-crumbs a:hover {
    color: var(--vx-ink);
    text-decoration: underline;
  }

  .vx-crumbs [aria-current="page"] {
    color: var(--vx-ink);
    font-weight: 650;
  }

  .vx-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-space-3) var(--vx-space-4);
    padding-block: var(--vx-space-6) var(--vx-space-5);
  }

  .vx-page-head__title {
    display: flex;
    align-items: center;
    gap: var(--vx-space-4);
    min-width: 0;
    margin-inline-end: auto;
  }

  .vx-page-head h1 {
    font-size: var(--vx-text-4xl);
    font-weight: 700;
    letter-spacing: -0.015em;
    overflow-wrap: anywhere;
  }

  .vx-page-head p {
    margin-top: 2px;
    color: var(--vx-ink-2);
    max-width: 72ch;
  }

  .vx-page-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-space-2);
  }

  .vx-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-space-2);
    margin-bottom: var(--vx-space-4);
  }

  .vx-section {
    margin-top: var(--vx-space-8);
  }

  .vx-section > h2,
  .vx-section__head h2 {
    font-size: var(--vx-text-xl);
    font-weight: 700;
  }

  .vx-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--vx-space-2) var(--vx-space-4);
    margin-bottom: var(--vx-space-3);
  }

  .vx-section__head p {
    color: var(--vx-ink-2);
    margin-inline-end: auto;
  }

  .vx-section > h2 {
    margin-bottom: var(--vx-space-3);
  }

  /* ---------- Boxes ---------- */

  .vx-box {
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-raised);
  }

  .vx-box--sunk {
    background: var(--vx-sunk);
  }

  .vx-box__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-space-2) var(--vx-space-4);
    padding: var(--vx-space-3) var(--vx-space-4);
  }

  .vx-box__row + .vx-box__row {
    border-top: 1px solid var(--vx-line);
  }

  .vx-box__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-space-2) var(--vx-space-4);
    padding: var(--vx-space-3) var(--vx-space-4);
    border-bottom: 1px solid var(--vx-line);
  }

  .vx-box__head h2,
  .vx-box__head h3 {
    font-size: var(--vx-text-lg);
    font-weight: 700;
    margin-inline-end: auto;
  }

  .vx-box__body {
    padding: var(--vx-space-4);
  }

  /* ---------- Tables ---------- */

  .vx-table-wrap {
    position: relative;
    overflow-x: auto;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-raised);
  }

  .vx-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--vx-text-md);
  }

  .vx-table caption {
    padding: var(--vx-space-3) var(--vx-space-4);
    color: var(--vx-ink-2);
    text-align: start;
  }

  .vx-table th,
  .vx-table td {
    padding: 11px var(--vx-space-4);
    border-bottom: 1px solid var(--vx-line-soft);
    text-align: start;
    vertical-align: middle;
  }

  .vx-table thead th {
    border-bottom-color: var(--vx-line);
    background: var(--vx-sunk);
    color: var(--vx-ink);
    font-weight: 700;
    white-space: nowrap;
  }

  .vx-table thead th:first-child { border-start-start-radius: var(--vx-radius-box); }
  .vx-table thead th:last-child { border-start-end-radius: var(--vx-radius-box); }

  .vx-table tbody tr:last-child > * {
    border-bottom: 0;
  }

  .vx-table tbody tr:hover > * {
    background: var(--vx-hover);
  }

  .vx-table tbody tr[aria-selected="true"] > * {
    background: var(--vx-selected);
  }

  .vx-table td.vx-num,
  .vx-table th.vx-num {
    text-align: end;
  }

  .vx-cell-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--vx-space-2);
    color: var(--vx-ink);
    font-weight: 550;
    text-decoration: none;
  }

  a.vx-cell-primary:hover {
    color: var(--vx-link);
    text-decoration: underline;
  }

  .vx-cell-primary > .vx-icon {
    color: var(--vx-ink-2);
  }

  .vx-table--compact th,
  .vx-table--compact td {
    padding-block: 7px;
  }

  .vx-table-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-space-2);
    padding: var(--vx-space-3) var(--vx-space-4);
    border-top: 1px solid var(--vx-line);
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  /* ---------- Badges and status ---------- */

  .vx-badge {
    --vx-badge-bg: var(--vx-neutral-bg);
    --vx-badge-ink: var(--vx-neutral-ink);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding-inline: 8px;
    border-radius: 999px;
    background: var(--vx-badge-bg);
    color: var(--vx-badge-ink);
    font-size: var(--vx-text-sm);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .vx-badge > .vx-icon {
    --vx-icon: 13px;
    --vx-icon-stroke: 2;
  }

  .vx-badge--ok { --vx-badge-bg: var(--vx-ok-bg); --vx-badge-ink: var(--vx-ok-ink); }
  .vx-badge--warn { --vx-badge-bg: var(--vx-warn-bg); --vx-badge-ink: var(--vx-warn-ink); }
  .vx-badge--danger { --vx-badge-bg: var(--vx-danger-bg); --vx-badge-ink: var(--vx-danger-ink); }
  .vx-badge--info { --vx-badge-bg: var(--vx-info-bg); --vx-badge-ink: var(--vx-info-ink); }

  .vx-badge--outline {
    border: 1px solid var(--vx-line-strong);
    background: transparent;
  }

  /* Restricted: engineering-only data on an otherwise shared page */
  .vx-badge--restricted {
    --vx-badge-bg: var(--vx-grey-800);
    --vx-badge-ink: #fff;
    border-radius: var(--vx-radius-tag);
  }

  .vx-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
  }

  .vx-status::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--vx-ink-3);
  }

  .vx-status--ok::before { background: var(--vx-ok); }
  .vx-status--warn::before { background: var(--vx-warn); }
  .vx-status--danger::before { background: var(--vx-danger); }
  .vx-status--off::before { border: 1.5px solid var(--vx-ink-3); background: transparent; }

  /* ---------- Alerts ---------- */

  .vx-alert {
    --vx-alert-bg: var(--vx-info-bg);
    --vx-alert-ink: var(--vx-info-ink);
    --vx-alert-line: color-mix(in srgb, var(--vx-alert-ink) 25%, transparent);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--vx-space-1) var(--vx-space-3);
    align-items: start;
    padding: var(--vx-space-3) var(--vx-space-4);
    border: 1px solid var(--vx-alert-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-alert-bg);
    color: var(--vx-ink);
  }

  .vx-alert > .vx-icon {
    --vx-icon: 18px;
    margin-top: 1px;
    color: var(--vx-alert-ink);
  }

  .vx-alert__title {
    font-weight: 700;
  }

  .vx-alert__body {
    color: var(--vx-ink);
  }

  .vx-alert__actions {
    display: flex;
    gap: var(--vx-space-2);
    grid-column: 2;
    margin-top: var(--vx-space-2);
  }

  .vx-alert--ok { --vx-alert-bg: var(--vx-ok-bg); --vx-alert-ink: var(--vx-ok); }
  .vx-alert--warn { --vx-alert-bg: var(--vx-warn-bg); --vx-alert-ink: var(--vx-warn); }
  .vx-alert--danger { --vx-alert-bg: var(--vx-danger-bg); --vx-alert-ink: var(--vx-danger); }
  .vx-alert--neutral { --vx-alert-bg: var(--vx-sunk); --vx-alert-ink: var(--vx-ink-2); --vx-alert-line: var(--vx-line); }

  /* ---------- Forms ---------- */

  .vx-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .vx-label {
    color: var(--vx-ink);
    font-weight: 650;
  }

  .vx-label small {
    margin-inline-start: 4px;
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
    font-weight: 400;
  }

  .vx-help {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--vx-danger);
    font-size: var(--vx-text-sm);
    font-weight: 550;
  }

  .vx-input,
  .vx-select,
  .vx-textarea {
    width: 100%;
    min-height: var(--vx-control-h);
    padding: 5px 10px;
    border: 1px solid var(--vx-line-strong);
    border-radius: var(--vx-radius-control);
    background: var(--vx-sheet);
    color: var(--vx-ink);
    font-size: var(--vx-text-md);
    line-height: 20px;
  }

  .vx-input::placeholder,
  .vx-textarea::placeholder {
    color: var(--vx-ink-3);
    opacity: 1;
  }

  .vx-input:hover,
  .vx-select:hover,
  .vx-textarea:hover {
    border-color: var(--vx-grey-400);
  }

  .vx-input:focus,
  .vx-select:focus,
  .vx-textarea:focus {
    outline: none;
    border-color: var(--vx-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vx-focus) 22%, transparent);
  }

  .vx-input[aria-invalid="true"],
  .vx-select[aria-invalid="true"],
  .vx-textarea[aria-invalid="true"] {
    border-color: var(--vx-danger);
  }

  .vx-input:disabled,
  .vx-select:disabled,
  .vx-textarea:disabled {
    background: var(--vx-sunk);
    color: var(--vx-ink-disabled);
  }

  .vx-input--mono {
    font-family: var(--vx-mono);
    letter-spacing: 0.02em;
  }

  .vx-select {
    padding-inline-end: 32px;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--vx-ink-2) 50%), linear-gradient(135deg, var(--vx-ink-2) 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
  }

  [dir="rtl"] .vx-select {
    background-position: 15px 50%, 10px 50%;
    padding-inline: 10px 32px;
  }

  .vx-textarea {
    min-height: 88px;
    resize: vertical;
  }

  .vx-form {
    display: grid;
    gap: var(--vx-space-5);
    max-width: 560px;
  }

  .vx-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--vx-space-2);
    padding-top: var(--vx-space-2);
  }

  .vx-check {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--vx-space-2);
    cursor: pointer;
  }

  .vx-check input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--vx-primary);
  }

  .vx-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--vx-space-3);
    cursor: pointer;
  }

  .vx-switch input {
    appearance: none;
    position: relative;
    width: 34px;
    height: 20px;
    margin: 0;
    border-radius: 999px;
    background: var(--vx-grey-300);
    cursor: pointer;
    transition: background var(--vx-dur) var(--vx-ease);
  }

  .vx-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    inset-inline-start: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
    transition: translate var(--vx-dur) var(--vx-ease);
  }

  .vx-switch input:checked {
    background: var(--vx-primary);
  }

  .vx-switch input:checked::after {
    translate: 14px 0;
  }

  [dir="rtl"] .vx-switch input:checked::after {
    translate: -14px 0;
  }

  /* One-time code: one box per digit, pasted codes spread across the boxes */
  .vx-otp {
    display: flex;
    gap: var(--vx-space-2);
  }

  .vx-otp input {
    width: 44px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--vx-line-strong);
    border-radius: var(--vx-radius-control);
    background: var(--vx-sheet);
    color: var(--vx-ink);
    font-family: var(--vx-mono);
    font-size: var(--vx-text-3xl);
    text-align: center;
  }

  .vx-otp input:focus {
    outline: none;
    border-color: var(--vx-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vx-focus) 22%, transparent);
  }

  .vx-otp input:nth-child(3) {
    margin-inline-end: var(--vx-space-3);
  }

  /* Single-field alternative for pages that must not split the code */
  .vx-code-input {
    width: min(100%, 12ch);
    height: 52px;
    padding-inline: 12px;
    border: 1px solid var(--vx-line-strong);
    border-radius: var(--vx-radius-control);
    background: var(--vx-sheet);
    color: var(--vx-ink);
    font-family: var(--vx-mono);
    font-size: var(--vx-text-3xl);
    letter-spacing: 0.3em;
    text-align: center;
  }

  .vx-code-input:focus {
    outline: none;
    border-color: var(--vx-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vx-focus) 22%, transparent);
  }

  /* Segmented choice, e.g. 7 / 30 / 90 days */
  .vx-segmented {
    display: inline-flex;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
    border: 1px solid var(--vx-line-strong);
    border-radius: var(--vx-radius-control);
    background: var(--vx-sunk);
  }

  .vx-segmented button,
  .vx-segmented label {
    flex: none;
    height: 26px;
    padding-inline: 10px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
    font-weight: 600;
    line-height: 26px;
    cursor: pointer;
  }

  .vx-segmented [aria-pressed="true"],
  .vx-segmented input:checked + span {
    background: var(--vx-sheet);
    color: var(--vx-ink);
    box-shadow: 0 0 0 1px var(--vx-line), 0 1px 2px rgb(0 0 0 / 0.06);
  }

  /* ---------- Tabs ---------- */

  .vx-tabs {
    display: flex;
    gap: var(--vx-space-1);
    margin-bottom: var(--vx-space-5);
    overflow-x: auto;
    border-bottom: 1px solid var(--vx-line);
    scrollbar-width: none;
  }

  .vx-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--vx-space-2);
    height: 40px;
    padding-inline: var(--vx-space-3);
    border: 0;
    background: transparent;
    color: var(--vx-ink-2);
    font-weight: 550;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }

  .vx-tab:hover {
    color: var(--vx-ink);
  }

  .vx-tab[aria-selected="true"],
  .vx-tab[aria-current="page"] {
    color: var(--vx-ink);
    font-weight: 700;
  }

  .vx-tab[aria-selected="true"]::after,
  .vx-tab[aria-current="page"]::after {
    content: "";
    position: absolute;
    inset-inline: var(--vx-space-2);
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--vx-ink);
  }

  .vx-tab .vx-badge {
    height: 18px;
    padding-inline: 6px;
    font-size: var(--vx-text-xs);
  }

  /* ---------- Facts: a quiet list of labelled values with icons ---------- */

  .vx-facts {
    display: grid;
    gap: var(--vx-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .vx-facts > li,
  .vx-facts > div {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    gap: var(--vx-space-3);
  }

  .vx-facts .vx-icon {
    margin-top: 2px;
    color: var(--vx-ink-2);
  }

  .vx-facts strong {
    font-weight: 700;
  }

  .vx-facts dt {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-facts dd {
    grid-column: 2;
  }

  .vx-facts + .vx-facts {
    margin-top: var(--vx-space-5);
    padding-top: var(--vx-space-5);
    border-top: 1px solid var(--vx-line);
  }

  .vx-aside h2 {
    margin-bottom: var(--vx-space-3);
    font-size: var(--vx-text-lg);
    font-weight: 700;
  }

  /* Key/value rows for configuration and runtime evidence */
  .vx-kv {
    display: grid;
    grid-template-columns: minmax(140px, 30%) minmax(0, 1fr);
    margin: 0;
  }

  .vx-kv > dt,
  .vx-kv > dd {
    padding: 10px var(--vx-space-4);
    border-bottom: 1px solid var(--vx-line-soft);
  }

  .vx-kv > dt {
    color: var(--vx-ink-2);
  }

  .vx-kv > dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .vx-kv > dt:last-of-type,
  .vx-kv > dd:last-of-type {
    border-bottom: 0;
  }

  .vx-kv .vx-status {
    white-space: normal;
  }

  @media (max-width: 560px) {
    .vx-kv {
      grid-template-columns: minmax(0, 1fr);
    }

    .vx-kv > dt {
      padding-bottom: 0;
      border-bottom: 0;
      font-size: var(--vx-text-sm);
    }

    .vx-kv > dd {
      padding-top: 2px;
    }
  }

  /* ---------- Metrics ---------- */

  /* Separators come from a 1px gap over the line colour, so they stay single
     however the tiles wrap. The last tile fills its row. */
  .vx-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-line);
  }

  .vx-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--vx-space-4);
    min-width: 0;
    background: var(--vx-raised);
  }

  .vx-stat:last-child {
    grid-column: auto / -1;
  }

  /* Cells: labelled values in a grid, e.g. readiness or policy facts */
  .vx-cells {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-line);
    margin: 0;
  }

  .vx-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: var(--vx-space-3) var(--vx-space-4);
    background: var(--vx-raised);
  }

  .vx-cell:last-child {
    grid-column: auto / -1;
  }

  .vx-cell__label {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-cell__value {
    color: var(--vx-ink);
    font-size: var(--vx-text-lg);
    font-weight: 700;
    overflow-wrap: anywhere;
  }

  .vx-cell__note {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-stat__label {
    display: flex;
    align-items: center;
    gap: var(--vx-space-2);
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-stat__value {
    font-size: var(--vx-text-3xl);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  .vx-stat__note {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-meter {
    display: flex;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--vx-grey-100);
    gap: 2px;
  }

  .vx-meter > span {
    height: 100%;
    background: var(--vx-grey-700);
  }

  .vx-meter > span:nth-child(2) { background: var(--vx-grey-400); }
  .vx-meter > span:nth-child(3) { background: var(--vx-vein-500); }
  .vx-meter > span:nth-child(4) { background: var(--vx-grey-300); }

  .vx-meter--ok > span { background: var(--vx-ok); }
  .vx-meter--warn > span { background: var(--vx-warn); }
  .vx-meter--danger > span { background: var(--vx-danger); }

  /* ---------- Values: IDs, hashes, tokens ---------- */

  .vx-value {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--vx-line-strong);
    border-radius: var(--vx-radius-control);
    background: var(--vx-sheet);
  }

  .vx-value > code,
  .vx-value > output {
    min-width: 0;
    padding: 5px 10px;
    overflow: hidden;
    color: var(--vx-ink);
    font-family: var(--vx-mono);
    font-size: var(--vx-text-md);
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vx-value > .vx-icon-btn {
    width: 30px;
    height: 30px;
    border-inline-start: 1px solid var(--vx-line-strong);
    border-radius: 0;
    color: var(--vx-ink-2);
  }

  .vx-value > .vx-icon-btn:last-child {
    border-start-end-radius: var(--vx-radius-control);
    border-end-end-radius: var(--vx-radius-control);
  }

  .vx-value--block {
    display: flex;
    align-self: stretch;
    width: 100%;
  }

  .vx-value--block > code,
  .vx-value--block > output {
    flex: 1 1 auto;
  }

  .vx-value[data-masked="true"] > output {
    letter-spacing: 0.12em;
    color: var(--vx-ink-2);
  }

  .vx-id {
    font-family: var(--vx-mono);
    font-size: 0.923em;
    white-space: nowrap;
  }

  pre.vx-code {
    padding: var(--vx-space-3) var(--vx-space-4);
    overflow-x: auto;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-sunk);
    color: var(--vx-ink);
    font-size: var(--vx-text-sm);
    line-height: 1.6;
  }

  .vx-method {
    display: inline-block;
    min-width: 52px;
    padding: 2px 6px;
    border-radius: var(--vx-radius-tag);
    background: var(--vx-neutral-bg);
    color: var(--vx-neutral-ink);
    font-family: var(--vx-mono);
    font-size: var(--vx-text-xs);
    font-weight: 700;
    text-align: center;
  }

  .vx-method[data-method="GET"] { background: var(--vx-info-bg); color: var(--vx-info-ink); }
  .vx-method[data-method="POST"] { background: var(--vx-ok-bg); color: var(--vx-ok-ink); }
  .vx-method[data-method="DELETE"] { background: var(--vx-danger-bg); color: var(--vx-danger-ink); }
  .vx-method[data-method="PUT"],
  .vx-method[data-method="PATCH"] { background: var(--vx-warn-bg); color: var(--vx-warn-ink); }

  /* ---------- Empty state: the halftone mark, dimmed, with one next step ---------- */

  .vx-empty {
    display: grid;
    justify-items: center;
    gap: var(--vx-space-2);
    padding: var(--vx-space-12) var(--vx-space-6);
    text-align: center;
  }

  .vx-empty__art {
    width: 96px;
    height: 66px;
    margin-bottom: var(--vx-space-3);
    color: var(--vx-art);
  }

  .vx-empty h2,
  .vx-empty h3 {
    font-size: var(--vx-text-xl);
    font-weight: 700;
  }

  .vx-empty p {
    max-width: 48ch;
    color: var(--vx-ink-2);
  }

  .vx-empty .vx-btn {
    margin-top: var(--vx-space-3);
  }

  /* ---------- Pagination ---------- */

  .vx-pagination {
    display: flex;
    align-items: center;
    gap: var(--vx-space-2);
    margin-inline-start: auto;
  }

  /* ---------- Large lists: search, filters, cursor pager ----------
     Lists that can hold millions of rows never show "page N of M": the
     server pages with cursors and totals are approximate. See docs/DATA-LISTS.md. */

  .vx-list {
    display: grid;
    gap: var(--vx-space-3);
  }

  .vx-list__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--vx-space-2);
  }

  .vx-list__field {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .vx-list__field > span {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-xs);
    font-weight: 600;
  }

  .vx-field-search {
    position: relative;
    flex: 1 1 260px;
    min-width: min(100%, 220px);
    max-width: 420px;
  }

  /* Icon sits on the input row, whether or not a label is stacked above */
  .vx-field-search > .vx-icon {
    position: absolute;
    inset-inline-start: 10px;
    bottom: calc((var(--vx-control-h) - var(--vx-icon)) / 2);
    color: var(--vx-ink-2);
    pointer-events: none;
  }

  .vx-field-search .vx-input {
    padding-inline-start: 32px;
    font-family: var(--vx-mono);
    font-size: var(--vx-text-sm);
  }

  .vx-field-search .vx-input::placeholder {
    font-family: var(--vx-font);
    font-size: var(--vx-text-md);
  }

  .vx-select--auto {
    width: auto;
    max-width: 100%;
  }

  .vx-list__hint {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-list__hint[data-tone="danger"] {
    color: var(--vx-danger);
    font-weight: 550;
  }

  .vx-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--vx-space-2);
    min-height: 0;
  }

  .vx-chips:empty {
    display: none;
  }

  .vx-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding-inline: 10px 4px;
    border: 1px solid var(--vx-line-strong);
    border-radius: 999px;
    background: var(--vx-sunk);
    color: var(--vx-ink);
    font-size: var(--vx-text-sm);
    white-space: nowrap;
  }

  .vx-chip strong {
    font-weight: 650;
  }

  .vx-chip button {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--vx-ink-2);
    cursor: pointer;
  }

  .vx-chip button:hover {
    background: var(--vx-hover);
    color: var(--vx-ink);
  }

  .vx-chip button .vx-icon {
    --vx-icon: 12px;
    --vx-icon-stroke: 2.2;
  }

  /* Loading: keep the old rows visible but quiet, and run a thin bar along the top */
  .vx-table-wrap[aria-busy="true"] tbody {
    opacity: 0.45;
    transition: opacity 120ms linear 120ms;
  }

  .vx-table-wrap[aria-busy="true"]::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 0;
    z-index: 2;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--vx-accent), transparent);
    background-size: 40% 100%;
    background-repeat: no-repeat;
    animation: vx-progress 900ms ease-in-out infinite;
  }

  @keyframes vx-progress {
    from { background-position: -40% 0; }
    to { background-position: 140% 0; }
  }

  .vx-list__state {
    display: grid;
    justify-items: center;
    gap: var(--vx-space-2);
    padding: var(--vx-space-10) var(--vx-space-4);
    color: var(--vx-ink-2);
    text-align: center;
  }

  .vx-list__state strong {
    color: var(--vx-ink);
    font-size: var(--vx-text-lg);
  }

  .vx-list__state .vx-icon {
    --vx-icon: 24px;
    color: var(--vx-ink-3);
  }

  .vx-pager__range {
    color: var(--vx-ink-2);
    font-variant-numeric: tabular-nums;
  }

  .vx-pager__range strong {
    color: var(--vx-ink);
    font-weight: 650;
  }

  .vx-skeleton-row td {
    padding-block: 14px;
  }

  /* ---------- Disclosure (details/summary) ---------- */

  .vx-disclosure > summary {
    display: inline-flex;
    align-items: center;
    gap: var(--vx-space-2);
    padding: 6px 0;
    color: var(--vx-ink);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
  }

  .vx-disclosure > summary::-webkit-details-marker {
    display: none;
  }

  .vx-disclosure > summary::before {
    content: "";
    width: 7px;
    height: 7px;
    margin-inline: 3px 2px;
    border-right: 1.75px solid currentColor;
    border-bottom: 1.75px solid currentColor;
    rotate: -45deg;
    transition: rotate var(--vx-dur) var(--vx-ease);
  }

  .vx-disclosure[open] > summary::before {
    rotate: 45deg;
  }

  [dir="rtl"] .vx-disclosure > summary::before {
    rotate: 135deg;
  }

  .vx-disclosure > summary:hover {
    color: var(--vx-link);
  }

  .vx-disclosure__body {
    padding: var(--vx-space-2) 0 var(--vx-space-3) 20px;
  }

  /* ---------- Menus (popover) ---------- */

  .vx-menu {
    min-width: 240px;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-box);
    background: var(--vx-raised);
    box-shadow: var(--vx-shadow-pop);
    color: var(--vx-ink);
  }

  .vx-menu[popover] {
    position: fixed;
    inset: auto;
    top: calc(var(--vx-topbar-h) - 4px);
    right: var(--vx-space-3);
  }

  [dir="rtl"] .vx-menu[popover] {
    right: auto;
    left: var(--vx-space-3);
  }

  .vx-menu__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 var(--vx-space-3);
    align-items: center;
    padding: var(--vx-space-3);
  }

  .vx-menu__head .vx-avatar {
    grid-row: span 2;
    width: 36px;
    height: 36px;
  }

  .vx-menu__head strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vx-menu__head span {
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-menu hr {
    margin: 4px 0;
    border: 0;
    border-top: 1px solid var(--vx-line);
  }

  .vx-menu__item {
    display: flex;
    align-items: center;
    gap: var(--vx-space-3);
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--vx-radius-control);
    background: transparent;
    color: var(--vx-ink);
    font-size: var(--vx-text-md);
    text-align: start;
    text-decoration: none;
    cursor: pointer;
  }

  .vx-menu__item:hover {
    background: var(--vx-hover);
    color: var(--vx-ink);
  }

  .vx-menu__item > .vx-icon {
    color: var(--vx-ink-2);
  }

  .vx-menu__item[aria-pressed="true"]::after {
    content: "";
    width: 6px;
    height: 6px;
    margin-inline-start: auto;
    border-radius: 50%;
    background: var(--vx-ink);
  }

  .vx-menu__label {
    padding: 6px 10px 2px;
    color: var(--vx-ink-2);
    font-size: var(--vx-text-xs);
    font-weight: 650;
  }

  /* ---------- Dialog ---------- */

  .vx-dialog {
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100dvh - 64px);
    padding: 0;
    border: 1px solid var(--vx-line);
    border-radius: var(--vx-radius-sheet);
    background: var(--vx-raised);
    box-shadow: var(--vx-shadow-pop);
    color: var(--vx-ink);
  }

  .vx-dialog::backdrop {
    background: var(--vx-scrim);
  }

  .vx-dialog[open] {
    animation: vx-dialog-in 180ms var(--vx-ease);
  }

  @keyframes vx-dialog-in {
    from {
      opacity: 0;
      translate: 0 6px;
    }
  }

  .vx-dialog__head {
    display: flex;
    align-items: center;
    gap: var(--vx-space-3);
    padding: var(--vx-space-4) var(--vx-space-5);
    border-bottom: 1px solid var(--vx-line);
  }

  .vx-dialog__head h2 {
    margin-inline-end: auto;
    font-size: var(--vx-text-xl);
    font-weight: 700;
  }

  .vx-dialog__body {
    display: grid;
    gap: var(--vx-space-4);
    padding: var(--vx-space-5);
  }

  .vx-dialog__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--vx-space-2);
    padding: var(--vx-space-3) var(--vx-space-5);
    border-top: 1px solid var(--vx-line);
    background: var(--vx-sunk);
    border-end-start-radius: var(--vx-radius-sheet);
    border-end-end-radius: var(--vx-radius-sheet);
  }

  /* ---------- Toasts ---------- */

  .vx-toasts {
    position: fixed;
    inset-block-end: var(--vx-space-5);
    inset-inline-start: 50%;
    z-index: 60;
    display: grid;
    gap: var(--vx-space-2);
    translate: -50% 0;
    pointer-events: none;
  }

  .vx-toast {
    display: flex;
    align-items: center;
    gap: var(--vx-space-3);
    min-width: 260px;
    max-width: min(480px, calc(100vw - 32px));
    padding: 10px 14px;
    border-radius: var(--vx-radius-box);
    background: var(--vx-grey-900);
    box-shadow: var(--vx-shadow-pop);
    color: #fff;
    pointer-events: auto;
    animation: vx-toast-in 200ms var(--vx-ease);
  }

  .vx-toast > .vx-icon {
    color: #c9cbf2;
  }

  .vx-toast--danger > .vx-icon {
    color: #ffb4ab;
  }

  @keyframes vx-toast-in {
    from {
      opacity: 0;
      translate: 0 8px;
    }
  }

  /* ---------- Loading ---------- */

  .vx-spinner {
    animation: vx-spin 900ms linear infinite;
  }

  @keyframes vx-spin {
    to {
      rotate: 360deg;
    }
  }

  .vx-skeleton {
    display: block;
    height: 12px;
    border-radius: var(--vx-radius-tag);
    background: linear-gradient(90deg, var(--vx-grey-50), var(--vx-grey-100), var(--vx-grey-50));
    background-size: 200% 100%;
    animation: vx-shimmer 1.4s ease-in-out infinite;
  }

  @keyframes vx-shimmer {
    to {
      background-position: -200% 0;
    }
  }

  /* ---------- Standalone card pages: sign in, one-time code, consent ---------- */

  .vx-card-page {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    place-items: center;
    padding: var(--vx-space-6) var(--vx-space-4);
    background: var(--vx-chrome);
  }

  .vx-card {
    width: min(420px, 100%);
    border: 1px solid var(--vx-sheet-line);
    border-radius: var(--vx-radius-sheet);
    background: var(--vx-sheet);
    color: var(--vx-ink);
  }

  .vx-card__head {
    display: grid;
    gap: var(--vx-space-4);
    padding: var(--vx-space-6) var(--vx-space-6) 0;
  }

  .vx-card__head .vx-brand {
    justify-self: start;
    margin-inline-start: -6px;
    color: var(--vx-ink);
  }

  .vx-card__head .vx-brand__product {
    color: var(--vx-ink);
  }

  .vx-card__foot .vx-env {
    border-color: var(--vx-line-strong);
    background: transparent;
    color: var(--vx-ink-2);
  }

  .vx-card__head .vx-brand:hover {
    background: var(--vx-hover);
    color: var(--vx-ink);
  }

  .vx-card__head h1 {
    font-size: var(--vx-text-3xl);
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .vx-card__head p {
    color: var(--vx-ink-2);
  }

  .vx-card__body {
    display: grid;
    gap: var(--vx-space-4);
    padding: var(--vx-space-6);
  }

  .vx-card__foot {
    display: flex;
    flex-wrap: wrap;
    gap: var(--vx-space-2) var(--vx-space-4);
    padding: var(--vx-space-3) var(--vx-space-6);
    border-top: 1px solid var(--vx-line);
    color: var(--vx-ink-2);
    font-size: var(--vx-text-sm);
  }

  .vx-card__foot a {
    color: var(--vx-ink-2);
  }

  .vx-steps {
    display: flex;
    gap: var(--vx-space-1);
  }

  .vx-steps > span {
    height: 3px;
    flex: 1 1 0;
    border-radius: 3px;
    background: var(--vx-grey-150);
  }

  .vx-steps > [aria-current="step"],
  .vx-steps > [data-done] {
    background: var(--vx-ink);
  }
}
