/*
 * The Sample brand kit's styles: loader, shimmer, page motion, the app bar
 * and switcher, the source badge, the icon tones, the drawn underline and
 * the scrollbars. Documented in docs/brand-kit.md.
 *
 * Every class starts with sb- and every colour is a token below, so the kit
 * looks the same on pages whose own tokens are named differently.
 *
 * The kit has to look right on pages it does not control. The API site once
 * had `.top nav { display: flex }`, which caught the switcher's menu (a nav
 * inside its header) and laid it out sideways, far wider than the window.
 * So the pieces that sit inside other people's headers (the switcher and the
 * app bar) double their root class for specificity a page rule will not
 * reach by accident, and the switcher resets every element it owns before
 * styling it. Page rules like `header nav a` or `.top svg` cannot reach in.
 */
:root {
  --sb-bg: #060708;
  --sb-panel: #0d0f12;
  --sb-panel-hi: #14171c;
  --sb-line: rgba(255, 255, 255, 0.08);
  --sb-line-hi: rgba(255, 255, 255, 0.15);
  --sb-text: #f4f5f7;
  --sb-muted: #a3a8b4;
  --sb-faint: #6f7480;
  --sb-cookie: #f0c483;
  --sb-cookie-deep: #e5a85f;
  --sb-ink: #241a0e;
  --sb-sky: #63a4ee;
  --sb-leaf: #9fd27a;
  --sb-rose: #ef6a6f;
  --sb-mint: #5fd0b8;
  --sb-slate: #a3a8b4;
  --sb-ease: cubic-bezier(.2, .7, .2, 1);
  --sb-spring: cubic-bezier(.16, 1, .3, 1);
  --sb-font: -apple-system, "SF Pro Text", "Inter", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Read by screen readers, not shown. */
.sb-vh {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important;
}
.sb-pos { position: relative; }

/* ---- scrollbars ----
 *
 * Thin and dark everywhere, so no Sample page shows a bright white bar.
 * :where() keeps these at zero specificity: a page that styles or hides its
 * own scrollbars still wins. Chrome 121+ drops every ::-webkit-scrollbar
 * rule on an element that has scrollbar-color, so the standard properties
 * are only for browsers without the -webkit- ones (Firefox).
 */
:where(html) { color-scheme: dark; }
::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, .13); background-clip: padding-box;
  border: 2.5px solid transparent; border-radius: 999px; min-height: 36px;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(240, 196, 131, .55); }
::-webkit-scrollbar-thumb:active { background-color: rgba(240, 196, 131, .75); }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
:where(html)::-webkit-scrollbar-track { background: #08090b; }
@supports not selector(::-webkit-scrollbar) {
  :where(*) { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .16) transparent; }
  :where(html) { scrollbar-color: rgba(255, 255, 255, .18) #08090b; }
  :where(body *):hover { scrollbar-color: rgba(240, 196, 131, .45) transparent; }
}

/* ---- loader ---- */

.sb-loader.sb-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  margin: 0; box-sizing: border-box;
  color: var(--sb-muted); font: 500 14px/1.4 var(--sb-font); text-align: center; letter-spacing: normal; text-transform: none;
  animation: sb-fade-in .2s var(--sb-ease) both;
}
.sb-loader--overlay.sb-loader--overlay, .sb-loader--page.sb-loader--page {
  z-index: 60;
  /* Tinted in cookie gold, so a wait looks like Sample Bot rather than a grey screen. */
  background: radial-gradient(60% 55% at 50% 50%, rgba(240, 196, 131, .16), rgba(240, 196, 131, .05) 70%), rgba(10, 8, 5, .62);
  -webkit-backdrop-filter: blur(3px) saturate(120%);
  backdrop-filter: blur(3px) saturate(120%);
}
.sb-loader--overlay.sb-loader--overlay { position: absolute; inset: 0; border-radius: inherit; }
.sb-loader--page.sb-loader--page { position: fixed; inset: 0; z-index: 1000; }
.sb-loader--block.sb-loader--block { min-height: 220px; padding: 28px 16px; }
.sb-loader--boot.sb-loader--boot { min-height: 70vh; min-height: 70dvh; padding: 32px 16px; }
.sb-loader.sb-loader.sb-out { animation: sb-fade-out .2s ease both; }

.sb-loader .sb-loader-mark { position: relative; width: 64px; height: 64px; margin: 0; padding: 0; }
.sb-loader--block .sb-loader-mark { width: 48px; height: 48px; }
/* A warm glow behind the cookie, breathing slowly. */
.sb-loader .sb-loader-mark::before {
  content: ""; position: absolute; inset: -40%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 196, 131, .32), rgba(240, 196, 131, 0));
  animation: sb-breathe 2.4s ease-in-out infinite;
}
.sb-loader .sb-loader-mark .sb-cookie {
  position: relative; display: block; width: 100%; height: 100%; max-width: none;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45));
  animation: sb-float 2.4s ease-in-out infinite;
}
.sb-loader .sb-loader-line {
  position: relative; margin: 0; padding: 0 0 12px; max-width: 32ch;
  color: var(--sb-muted); font: inherit; letter-spacing: .005em;
}
/* A gold line under the words that draws itself, again and again. */
.sb-loader .sb-loader-line::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 72px; height: 2px; margin-left: -36px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sb-cookie-deep), var(--sb-cookie));
  box-shadow: 0 0 12px rgba(240, 196, 131, .55);
  transform-origin: left center;
  animation: sb-draw-loop 1.6s var(--sb-ease) infinite;
}

@keyframes sb-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}
@keyframes sb-breathe { 0%, 100% { opacity: .55; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes sb-draw-loop {
  0% { transform: scaleX(0); transform-origin: left center; }
  45% { transform: scaleX(1); transform-origin: left center; }
  55% { transform: scaleX(1); transform-origin: right center; }
  100% { transform: scaleX(0); transform-origin: right center; }
}
@keyframes sb-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sb-fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ---- shimmer ---- */

.sb-skel-group { display: grid; gap: 10px; padding: 4px 0; }
.sb-skel.sb-skel {
  display: block; border-radius: 6px; margin: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .11) 45%, rgba(255, 255, 255, .05) 80%);
  background-size: 300% 100%;
  animation: sb-shimmer 1.5s ease-in-out infinite;
}
.sb-skel-line.sb-skel-line { height: 12px; width: 100%; }
.sb-skel-sub.sb-skel-sub { height: 9px; opacity: .7; }
.sb-w0.sb-w0 { width: 92%; } .sb-w1.sb-w1 { width: 76%; } .sb-w2.sb-w2 { width: 84%; } .sb-w3.sb-w3 { width: 58%; }
.sb-skel-row { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.sb-skel-dot.sb-skel-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.sb-skel-col { display: grid; gap: 7px; flex: 1; min-width: 0; }
@keyframes sb-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---- page and view motion ---- */

body { animation: sb-fade-in .24s ease-out both; }
.sb-view { animation: sb-view-in .28s var(--sb-ease) both; }
@keyframes sb-view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* An animation, not opacity: body's fade-in fill would override a plain declaration. */
html.sb-leaving body { animation: sb-fade-out .15s ease both; }
/* While the next page loads, a gold line runs along the top of the window. */
html.sb-leaving::after {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 2147483000; pointer-events: none;
  background: linear-gradient(90deg, rgba(240, 196, 131, 0), var(--sb-cookie) 30%, var(--sb-cookie-deep) 70%, rgba(229, 168, 95, 0));
  box-shadow: 0 0 14px rgba(240, 196, 131, .7);
  transform-origin: left center;
  animation: sb-progress 1.2s var(--sb-ease) both;
}
@keyframes sb-progress { from { transform: scaleX(0); } to { transform: scaleX(.85); } }

/* ---- drawn underline ----
 *
 * <span class="sb-draw">words</span>: a gold underline that draws itself in
 * under the words, once, when the page opens. Add sb-draw--late to start it
 * after a headline's own entrance.
 */
.sb-draw { position: relative; display: inline-block; white-space: nowrap; }
.sb-draw::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.06em; height: .1em; min-height: 3px; border-radius: 999px;
  background: linear-gradient(90deg, var(--sb-cookie-deep), var(--sb-cookie) 55%, #ffe2b3);
  box-shadow: 0 0 18px rgba(240, 196, 131, .45);
  transform-origin: left center;
  animation: sb-draw 1s var(--sb-spring) .35s both;
}
.sb-draw--late::after { animation-delay: .9s; }
@keyframes sb-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- source badge ---- */

.sb-src.sb-src { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; font: 600 12px/1 var(--sb-font); color: var(--sb-muted); }
.sb-src .sb-cookie { width: 16px; height: 16px; flex: none; max-width: none; margin: 0; }
.sb-src--other .sb-cookie { filter: grayscale(1) brightness(.8); opacity: .65; }
.sb-src--sample .sb-src-name { color: var(--sb-cookie); }

/* ---- icons ---- */

.sb-icon.sb-icon {
  display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; vertical-align: middle;
  margin: 0; padding: 0; border: 0; background: none; color: var(--sb-tone); line-height: 0;
}
.sb-icon.sb-icon > svg {
  display: block; width: 100%; height: 100%; max-width: none; margin: 0; padding: 0;
  fill: none; stroke: currentColor; background: none; border: 0; box-shadow: none;
}
.sb-icon--tile.sb-icon--tile { width: 28px; height: 28px; border-radius: 8px; background: var(--sb-tone-bg); }
.sb-icon--tile.sb-icon--tile > svg { width: 17px; height: 17px; }
.sb-icon--lg.sb-icon--tile.sb-icon--tile { width: 40px; height: 40px; border-radius: 11px; }
.sb-icon--lg.sb-icon--tile.sb-icon--tile > svg { width: 22px; height: 22px; }
.sb-tone-gold { --sb-tone: #f0c483; --sb-tone-bg: rgba(240, 196, 131, .14); --sb-tone-glow: rgba(240, 196, 131, .35); }
.sb-tone-sky { --sb-tone: #7db5f2; --sb-tone-bg: rgba(99, 164, 238, .15); --sb-tone-glow: rgba(99, 164, 238, .35); }
.sb-tone-leaf { --sb-tone: #a9d986; --sb-tone-bg: rgba(159, 210, 122, .14); --sb-tone-glow: rgba(159, 210, 122, .32); }
.sb-tone-rose { --sb-tone: #f28a8e; --sb-tone-bg: rgba(239, 106, 111, .14); --sb-tone-glow: rgba(239, 106, 111, .32); }
.sb-tone-mint { --sb-tone: #6fd6c1; --sb-tone-bg: rgba(95, 208, 184, .13); --sb-tone-glow: rgba(95, 208, 184, .32); }
.sb-tone-slate { --sb-tone: #b4b9c4; --sb-tone-bg: rgba(255, 255, 255, .07); --sb-tone-glow: rgba(255, 255, 255, .16); }

/* ---- app switcher ----
 *
 * How it stays immune to the page around it:
 *
 *  - Every selector starts with `.sb-apps:is(.sb-apps, #sb-kit)`. :is() takes
 *    the weight of its heaviest choice, an id, so the rule weighs (1,1,0)
 *    while still matching on the class alone. A page rule would need an id
 *    of its own to reach in, and pages do not style their headers that way.
 *  - Inside, every element the switcher owns is reset with `all: unset`
 *    first (at (1,1,0)), then styled at (1,2,0) or more. So a page's
 *    `header nav { display: flex }`, `.top a { padding }` or `span { ... }`
 *    is wiped out before it can stretch anything. Pseudo-elements a page
 *    adds (`nav a::after`) are switched off the same way.
 *  - svg is not reset (unset would throw away the fill and stroke its markup
 *    sets) but gets explicit sizes, so `svg { width: 100% }` cannot blow up
 *    an icon.
 *  - Where it sits (display, position, margin, flex) is left at class
 *    weight on purpose, so a page can still hide or place the whole thing.
 */
.sb-apps { position: relative; display: block; flex: none; margin: 0; }
.sb-apps:is(.sb-apps, #sb-kit) {
  box-sizing: border-box; width: auto; height: auto; min-width: 0; max-width: none; padding: 0; border: 0; float: none;
  background: none; box-shadow: none; outline: 0; opacity: 1; visibility: visible; filter: none; transform: none;
  font: 500 14px/1.35 var(--sb-font); font-style: normal; font-variant: normal; color: var(--sb-text);
  letter-spacing: normal; word-spacing: normal; text-align: left; text-indent: 0; text-transform: none; text-shadow: none;
  text-decoration: none; white-space: normal; direction: ltr; list-style: none; cursor: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.sb-apps:is(.sb-apps, #sb-kit) :where(*:not(svg, svg *)) { all: unset; box-sizing: border-box; }
.sb-apps:is(.sb-apps, #sb-kit) :where(*:not(svg, svg *))::before,
.sb-apps:is(.sb-apps, #sb-kit) :where(*:not(svg, svg *))::after { content: none; }
.sb-apps:is(.sb-apps, #sb-kit) :where(svg) {
  display: block; flex: none; width: 16px; height: 16px; min-width: 0; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: none; box-shadow: none; vertical-align: middle; overflow: visible;
  position: static; opacity: 1; transform: none; filter: none;
}

/* The trigger: a small glass pill. */
.sb-apps:is(.sb-apps, #sb-kit) > summary {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; min-width: 36px; padding: 0 10px 0 10px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, .12); color: var(--sb-text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 1px 2px rgba(0, 0, 0, .4);
  font: 600 13.5px/1 var(--sb-font); letter-spacing: -.005em; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, color .2s ease;
}
.sb-apps:is(.sb-apps, #sb-kit) > summary::-webkit-details-marker { display: none; }
.sb-apps:is(.sb-apps, #sb-kit) > summary::marker { content: ""; }
.sb-apps:is(.sb-apps, #sb-kit) > summary:hover {
  border-color: rgba(240, 196, 131, .42);
  background: linear-gradient(180deg, rgba(240, 196, 131, .10), rgba(240, 196, 131, .03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 3px rgba(240, 196, 131, .07), 0 6px 20px -6px rgba(240, 196, 131, .35);
}
.sb-apps:is(.sb-apps, #sb-kit)[open] > summary {
  border-color: rgba(240, 196, 131, .6); color: #fff3df;
  background: linear-gradient(180deg, rgba(240, 196, 131, .18), rgba(240, 196, 131, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 3px rgba(240, 196, 131, .1), 0 8px 26px -8px rgba(240, 196, 131, .5);
}
.sb-apps:is(.sb-apps, #sb-kit) > summary:focus-visible { outline: 2px solid var(--sb-cookie); outline-offset: 2px; }
.sb-apps:is(.sb-apps, #sb-kit) > summary > svg.sb-apps-glyph {
  width: 15px; height: 15px; fill: var(--sb-cookie); stroke: none;
  transition: transform .3s var(--sb-spring);
}
.sb-apps:is(.sb-apps, #sb-kit) > summary:hover > svg.sb-apps-glyph,
.sb-apps:is(.sb-apps, #sb-kit)[open] > summary > svg.sb-apps-glyph { transform: rotate(90deg); }
/* Older markup drew nine dots; same place, same size. */
.sb-apps:is(.sb-apps, #sb-kit) > summary > svg:not(.sb-caret, .sb-apps-glyph) { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.sb-apps:is(.sb-apps, #sb-kit) > summary > svg.sb-caret {
  width: 13px; height: 13px; margin-left: -2px; fill: none; stroke: currentColor; color: var(--sb-faint);
  transition: transform .25s var(--sb-spring), color .2s ease;
}
.sb-apps:is(.sb-apps, #sb-kit) > summary:hover > svg.sb-caret { color: var(--sb-muted); }
.sb-apps:is(.sb-apps, #sb-kit)[open] > summary > svg.sb-caret { transform: rotate(180deg); color: var(--sb-cookie); }
.sb-apps:is(.sb-apps, #sb-kit) > summary > .sb-apps-cur { display: inline; color: inherit; }
/* Labelled (in the app bar on a phone): the app you are in, with its icon. */
.sb-apps:is(.sb-apps, #sb-kit) > summary > .sb-icon--tile {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; margin-left: -4px;
  color: var(--sb-tone); background: var(--sb-tone-bg);
}
.sb-apps:is(.sb-apps, #sb-kit) > summary > .sb-icon--tile > svg { width: 14px; height: 14px; fill: none; stroke: currentColor; }

/*
 * The panel: dark glass with a warm rim and a gold light along its top edge.
 * Mostly opaque, because a blur inside a header that blurs too only sees the
 * header, not the page.
 */
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 90;
  display: block; width: 324px; max-width: calc(100vw - 24px);
  max-height: var(--sb-maxh, min(560px, calc(100vh - 90px))); overflow: auto; overscroll-behavior: contain;
  padding: 6px; border-radius: 18px; isolation: isolate;
  color: var(--sb-text); text-align: left;
  background:
    radial-gradient(140% 70% at 100% 0%, rgba(240, 196, 131, .13), rgba(240, 196, 131, 0) 55%),
    radial-gradient(100% 60% at 0% 100%, rgba(229, 140, 60, .07), rgba(229, 140, 60, 0) 60%),
    linear-gradient(180deg, #14151a, #0b0c0f);
  /* Opaque, with no backdrop blur: inside a header that blurs too, the blur
     only sees the header, and Chrome let the page's text show through. */
  border: 1px solid rgba(240, 196, 131, .22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 0 1px rgba(0, 0, 0, .6),
    0 24px 60px -12px rgba(0, 0, 0, .85),
    0 0 60px -14px rgba(240, 196, 131, .28);
  translate: var(--sb-nudge, 0px) 0;
  transform-origin: top right;
  animation: sb-menu-in .32s var(--sb-spring) both;
  scrollbar-width: none;
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-menu::-webkit-scrollbar { display: none; }
/* The light along the top edge. */
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-menu::before {
  content: ""; position: absolute; top: -1px; left: 18%; right: 18%; height: 1px; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(240, 196, 131, 0), rgba(255, 226, 179, .95), rgba(240, 196, 131, 0));
}
.sb-apps--labelled:is(.sb-apps, #sb-kit) .sb-apps-menu { left: 0; right: auto; transform-origin: top left; }

/* The head: the cookie, a name, and the key that closes it. Old pages have a plain <p>. */
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-head {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 10px 9px;
  color: var(--sb-faint); font: 650 11px/1 var(--sb-font); letter-spacing: .09em; text-transform: uppercase;
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-head > svg.sb-cookie { width: 16px; height: 16px; filter: drop-shadow(0 2px 6px rgba(240, 196, 131, .35)); }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-head > span { display: block; flex: 1; color: var(--sb-muted); }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-head > kbd {
  display: inline-block; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--sb-line-hi);
  color: var(--sb-faint); background: rgba(255, 255, 255, .03); font: 600 10px/1 var(--sb-font); letter-spacing: .04em; text-transform: none;
}
@media (hover: none), (pointer: coarse) { .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-head > kbd { display: none; } }

/* One app per row. Pages written before the list have the items straight in the menu. */
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-list,
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-menu:not(:has(.sb-apps-list)) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-list { padding: 4px 0 0; border-top: 1px solid var(--sb-line); }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-grid { display: contents; }

.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 8px 10px 8px 8px; border-radius: 12px; border: 1px solid transparent;
  color: var(--sb-text); text-decoration: none; cursor: pointer; font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s ease, border-color .18s ease;
  animation: sb-item-in .4s var(--sb-spring) both;
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:nth-child(2) { animation-delay: .025s; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:nth-child(3) { animation-delay: .05s; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:nth-child(4) { animation-delay: .075s; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:nth-child(5) { animation-delay: .1s; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:nth-child(6) { animation-delay: .125s; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:nth-child(n+7) { animation-delay: .15s; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:hover,
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:focus-visible {
  background: linear-gradient(90deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .025));
  border-color: rgba(255, 255, 255, .06); outline: none;
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:focus-visible { border-color: rgba(240, 196, 131, .55); }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:active { background: rgba(255, 255, 255, .08); }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item[aria-current="page"] {
  background: linear-gradient(90deg, rgba(240, 196, 131, .15), rgba(240, 196, 131, .03));
  border-color: rgba(240, 196, 131, .26);
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item > .sb-icon--tile {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex: none;
  color: var(--sb-tone);
  background: radial-gradient(120% 120% at 30% 15%, var(--sb-tone-bg), rgba(255, 255, 255, .015));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 16px -8px var(--sb-tone-glow, transparent);
  transition: box-shadow .25s ease, transform .3s var(--sb-spring);
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item > .sb-icon--tile > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:hover > .sb-icon--tile {
  transform: scale(1.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 22px -6px var(--sb-tone-glow, transparent);
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item > span:not(.sb-icon, .sb-apps-here) { display: block; flex: 1; min-width: 0; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item b {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--sb-text); font: 620 14px/1.25 var(--sb-font); letter-spacing: -.01em;
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item small {
  display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--sb-faint); font: 500 12.5px/1.3 var(--sb-font);
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:hover small { color: var(--sb-muted); }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item[aria-current="page"] b { color: var(--sb-cookie); }
/* An arrow that slides in on hover; "Here" on the app you are in. */
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item > svg.sb-apps-go {
  width: 15px; height: 15px; fill: none; stroke: currentColor; color: var(--sb-cookie);
  opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .25s var(--sb-spring);
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:hover > svg.sb-apps-go,
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item:focus-visible > svg.sb-apps-go { opacity: 1; transform: none; }
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-here {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 8px 3px 7px; border-radius: 999px;
  color: var(--sb-cookie); background: rgba(240, 196, 131, .1); border: 1px solid rgba(240, 196, 131, .25);
  font: 650 11px/1 var(--sb-font); letter-spacing: .02em;
}
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-here::before {
  content: ""; display: block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--sb-cookie); box-shadow: 0 0 8px rgba(240, 196, 131, .9);
}
/* Older markup has no "Here": a gold dot marks the app instead. */
.sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item[aria-current="page"]:not(:has(.sb-apps-here))::after {
  content: ""; position: absolute; top: 50%; right: 12px; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%;
  background: var(--sb-cookie); box-shadow: 0 0 10px rgba(240, 196, 131, .9);
}

@keyframes sb-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(.97); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes sb-item-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* In the website's header: beside the buttons, gone where the menu takes over. */
header.site .sb-apps { flex: none; }
@media (max-width: 860px) { header.site .sb-apps { display: none; } }

/* On a phone the panel is a full-width sheet with the page dimmed behind it.
   brand.js slides it in line with the window's edges. */
@media (max-width: 560px) {
  .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-menu {
    width: calc(100vw - 24px); max-width: none; border-radius: 20px; padding: 8px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .08),
      0 0 0 1px rgba(0, 0, 0, .6),
      0 28px 70px -12px rgba(0, 0, 0, .85),
      0 0 0 100vmax rgba(3, 4, 5, .66);
  }
  .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item { padding: 10px 12px 10px 10px; }
  .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item > .sb-icon--tile { width: 38px; height: 38px; border-radius: 11px; }
  .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item > svg.sb-apps-go { opacity: .5; transform: none; color: var(--sb-faint); }
}

/* ---- app bar ----
 *
 * The same armour as the switcher, for the parts the kit draws. What the
 * page puts on the right (extraHtml) is the page's own and is left alone,
 * and the bar's place on the page (position, top, z-index, display) stays
 * at class weight, so the CAD can let it scroll away on a phone and the
 * desktop app can hide it.
 */
.sb-bar { position: sticky; top: 0; z-index: 50; display: block; margin: 0; }
.sb-bar:is(.sb-bar, #sb-kit) {
  box-sizing: border-box; width: auto; height: auto; padding: 0; border: 0; float: none;
  background: linear-gradient(180deg, rgba(8, 9, 11, .86), rgba(6, 7, 8, .74));
  -webkit-backdrop-filter: saturate(170%) blur(16px);
  backdrop-filter: saturate(170%) blur(16px);
  border-bottom: 1px solid var(--sb-line);
  box-shadow: 0 1px 0 rgba(240, 196, 131, .05), 0 10px 30px -20px rgba(0, 0, 0, .8);
  font: 500 14px/1.35 var(--sb-font); font-style: normal; color: var(--sb-text);
  letter-spacing: normal; text-align: left; text-transform: none; text-shadow: none; white-space: normal;
  -webkit-font-smoothing: antialiased;
}
.sb-bar:is(.sb-bar, #sb-kit) :where(.sb-bar-in, .sb-brand, .sb-brand :not(svg, svg *), .sb-tabs, .sb-tab, .sb-bar-end, .sb-user, .sb-user *, .sb-signout) {
  all: unset; box-sizing: border-box;
}
.sb-bar:is(.sb-bar, #sb-kit) :where(.sb-brand, .sb-tab, .sb-user, .sb-signout)::before,
.sb-bar:is(.sb-bar, #sb-kit) :where(.sb-brand, .sb-tab, .sb-user, .sb-signout)::after { content: none; }
/* A thread of gold under the bar, brightest in the middle. */
.sb-bar:is(.sb-bar, #sb-kit)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(240, 196, 131, 0) 10%, rgba(240, 196, 131, .35) 50%, rgba(240, 196, 131, 0) 90%);
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-bar-in {
  height: 56px; margin: 0; padding: 0 16px;
  display: flex; align-items: center; gap: 14px; min-width: 0;
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none; cursor: pointer;
  color: var(--sb-text); text-decoration: none; font: 660 15px/1 var(--sb-font); letter-spacing: -0.015em; white-space: nowrap;
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-brand > img {
  display: block; width: 28px; height: 28px; max-width: none; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(240, 196, 131, .18);
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-brand > span { display: inline; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-tabs { display: flex; gap: 2px; min-width: 0; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-tab {
  position: relative; display: inline-block; padding: 7px 11px; border-radius: 8px; cursor: pointer;
  color: var(--sb-muted); text-decoration: none; font: 500 14px/1.2 var(--sb-font); white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-tab:hover { color: var(--sb-text); background: rgba(255, 255, 255, .06); }
.sb-bar:is(.sb-bar, #sb-kit) .sb-tab[aria-current="page"] { color: var(--sb-text); background: rgba(240, 196, 131, .10); }
.sb-bar:is(.sb-bar, #sb-kit) .sb-tab[aria-current="page"]::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--sb-cookie-deep), var(--sb-cookie));
  box-shadow: 0 0 10px rgba(240, 196, 131, .6);
  transform-origin: left center; animation: sb-draw .6s var(--sb-spring) .1s both;
}
/*
 * A server's own colour, when the bar shows a server (setServer, or the
 * server option). brand.js sets --sb-accent only when the colour reads on
 * the dark bar; without it everything here falls back to the gold.
 */
.sb-bar:is(.sb-bar, #sb-kit)[data-sb-accent] .sb-tab[aria-current="page"] { background: color-mix(in srgb, var(--sb-accent, var(--sb-cookie)) 13%, transparent); }
.sb-bar:is(.sb-bar, #sb-kit)[data-sb-accent] .sb-tab[aria-current="page"]::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--sb-accent, var(--sb-cookie)) 75%, #000), var(--sb-accent, var(--sb-cookie)));
  box-shadow: 0 0 10px color-mix(in srgb, var(--sb-accent, var(--sb-cookie)) 60%, transparent);
}
.sb-bar:is(.sb-bar, #sb-kit)[data-sb-accent]::after {
  background: linear-gradient(90deg, transparent 10%, color-mix(in srgb, var(--sb-accent, var(--sb-cookie)) 40%, transparent) 50%, transparent 90%);
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-brand--server { gap: 10px; min-width: 0; flex: 0 1 auto; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-face { position: relative; display: block; flex: none; width: 30px; height: 30px; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-img,
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-none {
  display: block; width: 30px; height: 30px; max-width: none; border-radius: 9px; object-fit: cover;
  background: var(--sb-panel-hi);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 4px 16px color-mix(in srgb, var(--sb-accent, var(--sb-cookie)) 28%, transparent);
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-none {
  display: grid; place-items: center; color: var(--sb-ink); font: 700 14px/1 var(--sb-font);
  background: linear-gradient(140deg, #ffe2b3, var(--sb-cookie) 50%, var(--sb-cookie-deep));
}
.sb-bar:is(.sb-bar, #sb-kit)[data-sb-accent] .sb-srv-none { color: #fff; background: var(--sb-accent); text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
/* The small cookie on the corner says "this runs on Sample Bot". */
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-badge {
  position: absolute; right: -5px; bottom: -4px; display: grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%; background: #0b0c10; box-shadow: 0 0 0 1.5px #0b0c10;
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-badge .sb-cookie { display: block; width: 14px; height: 14px; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-txt b {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch;
  font: 660 14.5px/1.1 var(--sb-font); letter-spacing: -0.01em; color: var(--sb-text);
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-srv-txt small { display: block; font: 500 11px/1.1 var(--sb-font); color: var(--sb-muted); letter-spacing: .01em; }
.sb-bar:is(.sb-bar, #sb-kit) :is(.sb-tab, .sb-brand, .sb-user, .sb-signout):focus-visible { outline: 2px solid var(--sb-cookie); outline-offset: 2px; }
.sb-bar .sb-apps--labelled { display: none; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-bar-end { margin: 0 0 0 auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-user {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 8px 4px 4px; border-radius: 999px;
  color: var(--sb-text); text-decoration: none; font: 500 14px/1.2 var(--sb-font);
}
.sb-bar:is(.sb-bar, #sb-kit) a.sb-user { cursor: pointer; }
.sb-bar:is(.sb-bar, #sb-kit) a.sb-user:hover { background: rgba(255, 255, 255, .06); }
.sb-bar:is(.sb-bar, #sb-kit) .sb-user-face { display: block; width: 28px; height: 28px; max-width: none; border-radius: 50%; flex: none; object-fit: cover; background: var(--sb-panel-hi); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.sb-bar:is(.sb-bar, #sb-kit) .sb-user-face--none { display: grid; place-items: center; color: var(--sb-ink); background: var(--sb-cookie); font: 700 13px/1 var(--sb-font); }
.sb-bar:is(.sb-bar, #sb-kit) .sb-user-name { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.sb-bar:is(.sb-bar, #sb-kit) .sb-signout {
  display: inline-block; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  color: var(--sb-muted); text-decoration: none; font: 500 13px/1.2 var(--sb-font); white-space: nowrap;
}
.sb-bar:is(.sb-bar, #sb-kit) .sb-signout:hover { color: var(--sb-text); background: rgba(255, 255, 255, .06); }

@media (max-width: 900px) {
  .sb-bar:is(.sb-bar, #sb-kit) .sb-tabs { display: none; }
  .sb-bar .sb-apps--labelled { display: block; }
  .sb-desk { display: none !important; }
}
@media (max-width: 1100px) {
  .sb-bar:is(.sb-bar, #sb-kit) .sb-srv-txt b { max-width: 14ch; }
}
@media (max-width: 520px) {
  .sb-bar:is(.sb-bar, #sb-kit) .sb-bar-in { gap: 10px; padding: 0 12px; }
  .sb-bar:is(.sb-bar, #sb-kit) .sb-brand > span, .sb-bar:is(.sb-bar, #sb-kit) .sb-user-name { display: none; }
  .sb-bar:is(.sb-bar, #sb-kit) .sb-brand--server > .sb-srv-face { display: block; }
  .sb-bar:is(.sb-bar, #sb-kit) .sb-brand--server > .sb-srv-txt { display: flex; }
  .sb-bar:is(.sb-bar, #sb-kit) .sb-srv-txt b { max-width: 12ch; }
  .sb-bar:is(.sb-bar, #sb-kit) .sb-user { padding: 2px; }
}
@media (max-width: 380px) {
  .sb-bar:is(.sb-bar, #sb-kit) .sb-brand--server > .sb-srv-txt { display: none; }
}

/* ---- the stage ----
 * The backdrop for a page's one big moment, like signing in: a gold light
 * from above, a faint grid that fades out, and a glass card on top. Setup
 * and the CAD both use it, so every door into Sample looks the same.
 */
.sb-stage { position: relative; isolation: isolate; overflow: hidden; }
.sb-stage::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 16%, rgba(255, 200, 130, .24), rgba(255, 200, 130, 0) 70%),
    radial-gradient(36% 40% at 16% 74%, rgba(236, 130, 50, .13), rgba(236, 130, 50, 0) 70%),
    radial-gradient(36% 40% at 86% 62%, rgba(255, 214, 160, .10), rgba(255, 214, 160, 0) 70%); }
.sb-stage::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 228, 190, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 228, 190, .05) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 35%, #000 20%, transparent 75%); }
.sb-glass:is(.sb-glass, #sb-kit) {
  background: linear-gradient(180deg, rgba(24, 26, 32, .88), rgba(12, 13, 17, .94));
  border: 1px solid rgba(240, 196, 131, .22); border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 30px 90px -30px rgba(0, 0, 0, .9), 0 0 90px -30px rgba(240, 196, 131, .35);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.sb-stage .sb-cookie { filter: drop-shadow(0 14px 34px rgba(240, 196, 131, .45)); }
/* Gold words, for a headline's key words. Pairs with .sb-draw. */
.sb-gold { background: linear-gradient(100deg, #ffe2b3, var(--sb-cookie) 45%, var(--sb-cookie-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--sb-cookie); }

/* ---- less motion ---- */

@media (prefers-reduced-motion: reduce) {
  body, .sb-view, .sb-loader.sb-loader, .sb-loader.sb-loader.sb-out,
  .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-menu, .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item { animation: none; }
  .sb-loader .sb-loader-mark .sb-cookie, .sb-loader .sb-loader-mark::before { animation: none; }
  .sb-loader .sb-loader-line::after { animation: none; transform: none; }
  .sb-skel.sb-skel { animation: none; background: rgba(255, 255, 255, .07); }
  .sb-draw::after, .sb-bar:is(.sb-bar, #sb-kit) .sb-tab[aria-current="page"]::after { animation: none; }
  html.sb-leaving body, html.sb-leaving::after { animation: none; }
  .sb-apps:is(.sb-apps, #sb-kit) > summary, .sb-apps:is(.sb-apps, #sb-kit) > summary > svg,
  .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item, .sb-apps:is(.sb-apps, #sb-kit) .sb-apps-item > *,
  .sb-bar:is(.sb-bar, #sb-kit) .sb-tab { transition: none; }
  .sb-apps:is(.sb-apps, #sb-kit) > summary:hover > svg.sb-apps-glyph,
  .sb-apps:is(.sb-apps, #sb-kit)[open] > summary > svg.sb-apps-glyph { transform: none; }
}

/* White label (SampleBrand.setServer with own: true): only the server's three apps, no Sample marks. */
html.sb-own .sb-bar .sb-tab:not([data-sb-app="cad"]):not([data-sb-app="staff"]):not([data-sb-app="setup"]),
html.sb-own .sb-apps-item:not([data-sb-app="cad"]):not([data-sb-app="staff"]):not([data-sb-app="setup"]),
html.sb-own .sb-apps-head { display: none !important; }
.sb-loader-logo { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; display: block; }
