/* @nax/ui frame: the sidebar beside every signed-in page, which folds to a rail of its icons, the
   bar a phone has in its place, and the page's body. Drawn by `Frame` (src/Frame.tsx).

   Taken rule for rule from Naxirion Discover on 2 Dec 2026; Reflex drew it alike, without the
   count on a link. Decision numbers are Discover's. The account switcher (`AccountSwitcher`), which
   a product hands to the frame, is styled near the end of this file, and the rules before it fold
   it with the rail; since 1.0.0 it is the sidebar's only dropdown (the owner, 4 Dec 2026). Search (`CommandPalette`) and the
   dialog for opening a customer's account (`OpenAccountDialog`), which the frame's parts open,
   come last. Anything else a product puts in the frame (under the sections, the bands over the
   page) it styles itself.

   Load it after kit.css and before the product's own styles. The sidebar draws with the product's
   --side-accent and --side-on-accent.

   A product that loads neither base.css nor kit.css (Manage: kit.css would restyle its own class
   names, and base.css its own elements) loads frame-kit.css in their place, which holds the few of
   their rules the frame draws with. So the frame's own boxes and buttons say here what base.css
   would otherwise have given them: how they are measured, their font, their pointer, the
   keyboard's ring. And the frame says its own text (0.7.3), so it reads alike whatever typeface
   and size a product's pages use. */

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

/* Drawn as Manage's sidebar is (D167): its parts run edge to edge, set apart by full-width lines,
   and only the sections, and whatever the product puts under them, scroll, so the switcher stays
   at the top and anything the product puts at the foot stays there. */
.sidebar {
  /* Inside it the page's own colours are the sidebar's (D231), so what the product puts in it (the
     switcher, anything under the sections or at the foot) draws itself on navy, or on the dark theme's
     slate (D233), with no colours of its own. Menus and tips open outside it, on the page. */
  --paper: var(--side);
  --surface: var(--side);
  --sunk: var(--side-hover);
  --ground-fill: var(--side-hover);
  --ink: var(--side-strong);
  --muted: var(--side-muted);
  --faint: var(--side-faint);
  --rule: var(--side-rule);
  --rule-strong: var(--side-rule-strong);
  --accent: var(--side-accent);
  --on-accent: var(--side-on-accent);
  --accent-soft: color-mix(in srgb, var(--accent) 11%, var(--surface));
  color-scheme: dark;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--side);
  color: var(--side-ink);
  border-right: 1px solid var(--side-rule);
  display: flex;
  flex-direction: column;
}

/* The frame's own text (0.7.3): the sidebar, the phone's bar, and the menus and tips its parts
   open at the page's root read alike in every product, in the family's typeface (--font-frame),
   whatever a product's pages say. Inside them the product's body typeface is the frame's, so a
   rule that names --font-body draws in it too. Since 0.8.0 every product's pages are in the
   family's text face as well, so nothing changes there. */
.sidebar,
.appbar,
.switcher-menu,
.section-menu,
.tip {
  --font-body: var(--font-frame);
  font-family: var(--font-frame);
  line-height: 1.5;
}

.sidebar,
.appbar {
  font-size: var(--text-md);
}

/* Every box in the frame's parts is measured as base.css measures every box in Discover and
   Reflex, its border and padding inside its width: without it a menu is 244px, not 230px, and
   runs past the sidebar (Manage, which loads no base.css). As light as base.css's rule. */
:where(.sidebar, .appbar, .sheet, .switcher-menu, .section-menu, .tip),
:where(.sidebar, .appbar, .sheet, .switcher-menu, .section-menu, .tip) * {
  box-sizing: border-box;
}

/* A product's own rule for links (Manage's sets a size on every one) gives way to the frame's
   text. As light as that rule, so any rule of a class still wins. */
:where(.sidebar, .appbar) a {
  font-size: inherit;
}

/* The keyboard's ring on the frame's links and buttons, as base.css draws it on every one, and
   as light. */
:where(.sidebar, .appbar) :is(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  /* The logo on the folded rail's centre line (D230). */
  padding: 16px 16px 12px 21px;
  font: 600 var(--text-md)/1.2 var(--font-body);
  color: var(--side-strong);
  text-decoration: none;
  min-width: 0;
}

.side-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-brand .logo {
  width: 22px;
  height: 22px;
  flex: none;
}

.side-brand img.logo {
  object-fit: contain;
  border-radius: 4px;
}

.side-brand .monogram {
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: var(--side-accent);
  color: var(--side-on-accent);
  font: 600 var(--text-xs)/1 var(--font-body);
  text-transform: uppercase;
}

/* Who you are, or whose account you are in: drawn as Manage's "where you are", with no box, and
   answering the pointer as Manage's user menu does (D167). */
.side-where {
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--side-rule);
}

.side-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.side-nav {
  display: grid;
  gap: 2px;
  padding: 4px 0;
}

.side-nav .group {
  font: 600 var(--text-xs)/1 var(--font-body);
  color: var(--side-muted);
  padding: 16px 16px 6px 20px;
}

/* Rows are rounded bands inset from the edges, as Manage's are (D231), and hover is a step short
   of the current section's band so it is never read as it. */
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  /* Each icon on the folded rail's centre line (D230): 12px in and 12px of row, and folded the
     band is a square around it. */
  margin: 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-control);
  color: var(--side-ink);
  text-decoration: none;
  font-weight: 400;
  transition:
    background-color 200ms ease-in-out,
    color 200ms ease-in-out;
}

.side-nav a:hover {
  background: var(--side-hover);
}

.side-nav a:focus-visible {
  outline-offset: 2px;
}

.side-nav a svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--side-muted);
}

/* The current section is a band, its name bold and its icon in the product's accent, as Manage
   marks its own (D231). The words stay ink: only the icon takes the colour. */
.side-nav a[aria-current="page"] {
  background: var(--side-sel);
  color: var(--side-strong);
}

.side-nav a[aria-current="page"] .name {
  font-weight: 600;
}

.side-nav a[aria-current="page"] svg {
  color: var(--side-accent);
}

/* Turning bold would widen a name and move what follows it, so each name keeps room for its bold
   self: a hidden copy in bold, no taller than nothing. */
.side-nav .name {
  display: inline-flex;
  flex-direction: column;
}

.side-nav .name::before {
  content: attr(data-text);
  height: 0;
  visibility: hidden;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  font-weight: 600;
}

.side-nav .count {
  margin-left: auto;
  font: var(--text-xs)/1 var(--font-body);
  padding: 3px 6px;
  border-radius: 9px;
  background: none;
  color: var(--side-muted);
}

/* A section that opens to its pages (0.9.0, Watch's menu): its name is a row as a link's is, with
   a chevron that turns while it is open, and its pages hang under it from a line on the rail's
   centre, without icons, sliding open as Watch's did. Its icon takes the accent while this page is
   one of its pages, as a current link's does. */
.side-nav button.side-section-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  /* A line high, as a link is, with its name or (folded) without it, so no icon moves as the
     rail folds. */
  min-height: calc(1lh + 20px);
  margin: 0 12px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--side-ink);
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 200ms ease-in-out,
    color 200ms ease-in-out;
}

.side-nav button.side-section-head:hover:not(:disabled),
.side-nav button.side-section-head[data-state="open"] {
  background: var(--side-hover);
}

.side-nav button.side-section-head svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--side-muted);
}

.side-nav button.side-section-head .chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  transition: transform 200ms ease;
}

.side-nav button.side-section-head[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.side-section.within > button.side-section-head {
  color: var(--side-strong);
}

.side-section.within > button.side-section-head svg:not(.chevron) {
  color: var(--side-accent);
}

.side-section-pages {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 180ms cubic-bezier(0.2, 0, 0, 1);
}

.side-section-pages[data-open] {
  grid-template-rows: 1fr;
}

.side-section-pages > div {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
}

/* Inside what closes, as padding would not be: a closed section is one row high, as a link is. */
.side-section-pages > div > a:first-child {
  margin-top: 2px;
}

/* The line the pages hang from: under the section's icon, on the folded rail's centre line. */
.side-section-pages > div::before {
  content: "";
  position: absolute;
  left: 31.5px;
  top: 2px;
  bottom: 8px;
  width: 1px;
  background: var(--side-rule);
}

/* A page's name starts where its section's does. */
.side-section-pages a {
  padding: 8px 12px 8px 38px;
}

/* The page you are on is marked on the line too. */
.side-section-pages a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: var(--side-accent);
}

@media (prefers-reduced-motion: reduce) {
  .side-section-pages,
  .side-nav button.side-section-head .chevron {
    transition: none;
  }
}

/* A folded section's pages, beside the rail: its name at the head, its pages read as the menu's
   items whatever a product's rule for links says, and the page you are on in bold. */
.section-menu a.menu-item,
.section-menu a.menu-item:hover,
.section-menu a.menu-item:focus-visible {
  font-weight: 400;
  font-size: inherit;
  color: var(--ink);
  text-decoration: none;
  outline: none;
}

.section-menu a.menu-item[aria-current="page"] {
  font-weight: 600;
}

/* The sidebar beside the page folds to a rail of its icons and back, as HostedScan's does: 236px to
   64px in 200ms, the page widening in the same frames. Everything in it keeps its place from the
   left, so the rail closes over it and nothing moves: icons sit on the line 32px in, the rail's
   centre. Words fade out at once as it folds and in over the end of its opening, so none is ever
   squeezed onto a second line. The phone's sidebar, in its menu, never folds. */
.side-head {
  position: relative;
}

button.side-fold,
.side-nav .badge {
  display: none;
}

@media (min-width: 961px) {
  .app-shell {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .app-shell > .sidebar {
    --fold-time: 200ms;
    width: 236px;
    overflow: hidden;
    transition: width var(--fold-time) cubic-bezier(0.2, 0, 0, 1);
  }

  :root[data-side="folded"] .app-shell > .sidebar {
    width: 64px;
  }

  /* The sidebar clips now, so the brand's ring goes inside it as the sections' do. */
  .app-shell > .sidebar .side-brand:focus-visible {
    outline-offset: -3px;
  }

  /* Clipped rather than squeezed: each keeps its open width while the rail closes over it. The
     product's name only: a partner with no logo has its initials, also a span, and they are the
     rail's logo. */
  .app-shell > .sidebar .side-brand > span:not(.logo) {
    flex: none;
    max-width: 134px;
  }

  .app-shell > .sidebar button.side-search {
    overflow: hidden;
  }

  .app-shell > .sidebar button.side-search > * {
    flex: none;
  }

  .app-shell > .sidebar .side-nav .group {
    position: relative;
    white-space: nowrap;
    transition: color 120ms linear 80ms;
  }

  /* The switcher keeps its open width while it folds, and takes the rail's once it has, so the
     grey it turns under the pointer is a square there and not a band cut off at the edge. */
  /* From the left: every button centres what it holds, and once the switcher is narrower than its
     avatar, name and arrow, centring pulled the avatar 16px off the rail's line. */
  .app-shell > .sidebar .switcher {
    width: 220px;
    padding-left: 10px;
    justify-content: start;
  }

  :root[data-side="folded"] .app-shell > .sidebar button.switcher {
    width: 48px;
    transition:
      background-color 200ms ease-in-out,
      width 0s linear var(--fold-time);
  }

  /* A section's name too: its band a square around its icon once folded, so its word and its
     pages open beside the rail, not a row's width past its edge. */
  :root[data-side="folded"] .app-shell > .sidebar .side-nav button.side-section-head {
    width: 40px;
    transition:
      background-color 200ms ease-in-out,
      color 200ms ease-in-out,
      width 0s linear var(--fold-time);
  }

  /* Words fade out at once and back in over the last 120ms of the opening. */
  .app-shell > .sidebar
    :is(
      .side-brand > span:not(.logo),
      .switcher .who,
      .switcher > svg,
      button.side-search span,
      button.side-search kbd,
      .side-nav .name,
      .side-nav .count,
      .side-section-head .chevron
    ) {
    transition: opacity 120ms linear 80ms;
  }

  :root[data-side="folded"] .app-shell > .sidebar
    :is(
      .side-brand > span:not(.logo),
      .switcher .who,
      .switcher > svg,
      button.side-search span,
      button.side-search kbd,
      .side-nav .name,
      .side-nav .count,
      .side-section-head .chevron
    ) {
    opacity: 0;
    transition-delay: 0s;
  }


  /* The Account heading becomes a short line in its place, so no icon moves up or down. */
  .app-shell > .sidebar .side-nav .group::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 21px;
    width: 24px;
    height: 1px;
    background: var(--side-rule);
    opacity: 0;
    transition: opacity 120ms linear;
  }

  :root[data-side="folded"] .app-shell > .sidebar .side-nav .group {
    color: transparent;
    transition-delay: 0s;
  }

  :root[data-side="folded"] .app-shell > .sidebar .side-nav .group::after {
    opacity: 1;
    transition-delay: 80ms;
  }

  /* A link's count (Discover's scans in progress), on its icon once the count beside its name has
     gone. */
  .app-shell > .sidebar .side-nav .badge {
    display: block;
    position: absolute;
    /* From the row, which starts 12px in (D231): 46px from the sidebar's edge, as it was. */
    left: 22px;
    top: 5px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--side-strong);
    color: var(--side);
    font: 600 10px/15px var(--font-body);
    text-align: center;
    opacity: 0;
    transition: opacity 120ms linear;
  }

  :root[data-side="folded"] .app-shell > .sidebar .side-nav .badge {
    opacity: 1;
    transition-delay: 80ms;
  }

  /* The button: beside the logo while open, as HostedScan's. */
  button.side-fold {
    position: absolute;
    top: 13px;
    left: 196px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--side-muted);
    transition:
      opacity 120ms linear 80ms,
      background-color 200ms ease-in-out,
      color 200ms ease-in-out;
    cursor: pointer;
  }

  button.side-fold:hover:not(:disabled) {
    background: var(--side-hover);
    color: var(--side-strong);
  }

  button.side-fold:focus-visible {
    outline-offset: -2px;
  }

  button.side-fold svg {
    width: 16px;
    height: 16px;
  }

  /* Folded, it waits over the logo, moving there only once the rail has closed, and shows only
     while the pointer is on the logo's row or Tab reaches it. Never on focus alone: a click leaves
     the button focused, and the logo would be gone after every fold. */
  :root[data-side="folded"] button.side-fold {
    left: 18px;
    opacity: 0;
    transition:
      opacity 120ms linear,
      left 0s linear var(--fold-time),
      background-color 200ms ease-in-out,
      color 200ms ease-in-out;
  }

  :root[data-side="folded"] .side-head:hover button.side-fold,
  :root[data-side="folded"] button.side-fold:focus-visible {
    opacity: 1;
    transition:
      opacity 100ms linear,
      left 0s linear var(--fold-time),
      background-color 200ms ease-in-out,
      color 200ms ease-in-out;
  }

  .app-shell > .sidebar .side-brand .logo {
    transition: opacity 100ms linear;
  }

  :root[data-side="folded"] .side-head:hover .side-brand .logo,
  :root[data-side="folded"] .side-head:has(button.side-fold:focus-visible) .side-brand .logo {
    opacity: 0;
  }
}

@media (min-width: 961px) and (prefers-reduced-motion: reduce) {
  .app-shell > .sidebar,
  .app-shell > .sidebar * {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* A fold shown without its movement (`markFolded`): a choice the product hands in, such as the
   person's own from Watch's server, arriving after the page has drawn. */
:root[data-side-still] .app-shell > .sidebar,
:root[data-side-still] .app-shell > .sidebar * {
  transition: none !important;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  padding: 10px 24px;
  min-height: 56px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
}

.crumbs b {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crumbs .sep {
  color: var(--rule-strong);
}

/* In the sidebar since D107: search under the account switcher.
   Search is drawn as Manage's field is (D167): its shortcut plain text, its border the only thing
   the pointer changes. */
button.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin: 12px 12px 4px;
  padding: 0 12px;
  border: 1px solid var(--side-rule);
  border-radius: 8px;
  background: var(--side-2);
  color: var(--side-muted);
  font-family: inherit;
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: 1.3;
  white-space: nowrap;
  justify-content: flex-start;
  cursor: pointer;
  transition: border-color 100ms;
}

button.side-search:hover:not(:disabled) {
  background: var(--side-2);
  border-color: var(--side-hover-line);
}

button.side-search svg {
  width: 15px;
  height: 15px;
}

button.side-search kbd {
  margin-left: auto;
  font: var(--text-xs)/1 var(--font-mono);
  color: var(--side-muted);
  background: transparent;
}

.side-foot {
  display: grid;
  gap: 8px;
  padding: 8px 8px 12px;
  border-top: 1px solid var(--side-rule);
}

button.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  padding: 6px;
  cursor: pointer;
}

button.menu-button:hover:not(:disabled) {
  background: var(--sunk);
}

button.menu-button svg {
  width: 15px;
  height: 15px;
}

.page-body {
  box-sizing: border-box;
  width: 100%;
  /* Lists use the width (D107); forms keep their own narrower measures. */
  max-width: 1800px;
  padding: var(--space-6);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  /* Parts of a page are set apart by space rather than boxes (D122), so there is more of it. */
  gap: var(--space-5);
  align-content: start;
  flex: 1;
}

/* Side-by-side panels use the screen (the dashboard, D93), as every page does since D107. */
.page-body.wide {
  max-width: 1800px;
}

/* Pages that lay themselves out (`bare`, Manage's) bring their own spacing: the frame only gives
   them the column, which they fill from top to bottom. On a phone too: it outranks the phone's
   padding below. */
.page-body.bare {
  display: flex;
  flex-direction: column;
  max-width: none;
  padding: 0;
  gap: 0;
}

/* The bar across the top is a phone's alone (D107): elsewhere the page's heading says where you are,
   and search and the account switcher are in the sidebar. */
@media (min-width: 961px) {
  .appbar {
    display: none;
  }
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell > .sidebar {
    display: none;
  }

  button.menu-button {
    display: inline-flex;
  }

  .appbar {
    padding-inline: 16px;
  }

  .page-body {
    padding: 16px;
  }
}

.sheet > .sidebar {
  position: static;
  height: 100%;
}

/* The account switcher at the sidebar's head (`AccountSwitcher`). Taken rule for rule from Discover
   and Reflex on 2 Dec 2026, and last here, as it came after every rule above in both. */

.switcher {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  padding: 8px;
  background: transparent;
  color: var(--side-ink);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 200ms ease-in-out;
}

button.switcher:hover:not(:disabled) {
  background: var(--side-hover);
}

.switcher .avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-control);
  background: var(--side-sel);
  color: var(--side-strong);
  font: 600 var(--text-xs)/28px var(--font-body);
  text-align: center;
  text-transform: uppercase;
}

.switcher.acting .avatar {
  background: var(--warn-bg);
  color: var(--warn);
}

/* Fewer than every customer in view (0.9.0): the badge takes the accent, open or folded to the
   rail, as Watch's filter button did while it narrowed the view. */
.switcher.narrowed .avatar {
  background: var(--side-accent);
  color: var(--side-on-accent);
}

/* The scope reads as one line to a screen reader and to the tests ("Fabrikam Ltd · managed by
   Northwind MSP"), and as two to the eye: whose account, and the line under it. */
.switcher .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: var(--text-xs);
  color: var(--side-muted);
  line-height: 1.35;
}

.switcher .who b {
  color: var(--side-strong);
  font-weight: 600;
  font-size: var(--text-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switcher .who .first {
  order: -1;
}

.switcher .who small {
  font-size: var(--text-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switcher svg {
  width: 15px;
  height: 15px;
  color: var(--side-muted);
}

button.switcher[data-state="open"] {
  background: var(--side-hover);
}

.switcher-menu .avatar {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 6px;
  background: var(--sunk);
  color: var(--ink);
  font: 600 var(--text-xs)/26px var(--font-body);
  text-align: center;
  text-transform: uppercase;
}

.switcher-menu .avatar.acting {
  background: var(--warn-bg);
  color: var(--warn);
}

.switcher-menu .account {
  display: grid;
  min-width: 0;
  line-height: 1.3;
}

.switcher-menu .account b {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.switcher-menu .menu-item.more {
  padding-left: 46px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.switcher-menu .account small {
  font-size: var(--text-xs);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The switcher's own links (a partner's Help, since 1.0.0) read as its other items, whatever a
   product's rule for links says (Manage's is bold, and rings and darkens one). */
.switcher-menu a.menu-item,
.switcher-menu a.menu-item:hover,
.switcher-menu a.menu-item:focus-visible {
  font-weight: 400;
  font-size: inherit;
  color: var(--ink);
  outline: none;
}

/* Search (`CommandPalette`, ⌘K, which the sidebar's search opens too) and the dialog staff open a
   customer's account in (`OpenAccountDialog`, from the account switcher, search or the product's
   own pages). Taken rule for rule from Discover and Reflex on 3 Dec 2026, in their order. */

.palette kbd {
  margin-left: auto;
  font: var(--text-xs)/1 var(--font-mono);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 3px 5px;
  color: var(--muted);
  background: var(--surface);
}

/* Choosing one of many: a filter over a scrolling list. */
.picker {
  display: grid;
  gap: 8px;
}

.picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-control);
  padding: 0 10px;
  background: var(--surface);
}

.picker-search:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
}

.picker-search svg {
  width: 15px;
  height: 15px;
  color: var(--faint);
}

.picker-search input {
  flex: 1;
  border: 0;
  outline: none;
  padding-inline: 0;
  background: transparent;
}

.picker-list {
  display: grid;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 4px;
}

.picker-list > p {
  margin: 8px;
}

button.picker-option {
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  text-align: left;
}

button.picker-option:hover:not(:disabled) {
  background: var(--sunk);
}

button.picker-option[aria-selected="true"] {
  background: var(--sunk);
}

.picker-option .avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--sunk);
  color: var(--muted);
  font: 600 var(--text-xs)/24px var(--font-body);
  text-align: center;
  text-transform: uppercase;
  flex: none;
}

.picker-option .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-option .tick {
  margin-left: auto;
  color: var(--ink);
}

/* Choosing several (`ChooseCustomersDialog`, 0.9.0): a box that is ticked, and the customer's
   second word (Watch's code) after its name. */
.picker-option .box {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  background: var(--surface);
}

.picker-option .box.on {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.picker-option .box svg {
  width: 12px;
  height: 12px;
}

.picker-option .detail {
  margin-left: auto;
  font: var(--text-xs)/1 var(--font-mono);
  color: var(--muted);
}

.picker-count {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: var(--text-xs);
}

.picker-count button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.palette {
  top: 10vh;
  width: min(640px, calc(100vw - 32px));
  padding: 0;
  gap: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.palette-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}

.palette-input svg {
  width: 17px;
  height: 17px;
  color: var(--faint);
  flex: none;
}

.palette-input input {
  flex: 1;
  border: 0;
  padding: 4px 0;
  font-size: var(--text-lg);
  background: transparent;
  outline: none;
}

.palette-list {
  overflow-y: auto;
  max-height: min(56vh, 460px);
  padding: 6px;
}

.palette-group {
  padding: 10px 10px 4px;
  font: 600 var(--text-xs)/1 var(--font-body);
  color: var(--faint);
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  cursor: pointer;
  min-width: 0;
}

.palette-item[aria-selected="true"] {
  background: var(--sunk);
}

.palette-item svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex: none;
}

.palette-item .text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-item .hint {
  margin-left: auto;
  font: var(--text-xs) var(--font-body);
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

.palette-empty {
  padding: 18px 12px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.palette-foot {
  display: flex;
  gap: 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--rule);
  background: var(--surface);
  font-size: var(--text-xs);
  color: var(--faint);
}

.palette-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.palette-foot kbd {
  margin: 0;
}
