/* Case kit: the stepped sections of the project pages and the pieces their
 * pictures are drawn with. Loaded by the project pages that use them,
 * together with js/case-kit.js.
 *
 * The work is told slide by slide. Here a slide is a section (.cs): the
 * copy on the left, a picture (the stage) on the right. A section with
 * steps (data-steps) is a scroll track: its frame stays pinned to the
 * screen while scrolling walks through the steps, and past the last one
 * the page moves on. case-kit.js sets the deck's own state hooks, so a
 * scene's CSS reads like the deck's: the section gets data-step="k" and
 * .st-1 … .st-k, and every [data-s] element in it gets .is-on once its step
 * has come and .is-now while it is the current one.
 *
 * The stage is the deck's canvas, drawn at a fixed size (1124 x 822 unless
 * --w and --h say otherwise) and scaled to the room it has; the copy is
 * real text at the site's sizes. From 1024 x 620 up a section is a
 * screen-high slide. Below that it stacks: the copy, then the picture,
 * which stays at the top while the steps come up under it as cards. With
 * reduced motion nothing is pinned and every section shows its last step;
 * its points still switch the picture when clicked. */

.cs {
  --lg: #2f208b;
  --lg-400: #5344b2;
  --lg-100: #e2deff;
  --lg-50: #f4f2ff;
  --nick: #e25f2a;
  --nick-50: #fdebd4;
  --ok: #2f7a4b;
  --ok-500: #3e8b20;
  --ok-tint: #e7f4e3;
  --warn: #b45309;
  --warn-tint: #fff4e0;
  --bad: #b42318;
  --bad-tint: #fdeceb;
  --accent-tint: #fff1e6;
  --display: var(--serif);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* How far one step scrolls. */
  --step-len: 56vh;
  position: relative;
}

.cs .ic {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.125em;
}

/* ---------------------------------------------------------------- stacked */

.cs__frame {
  display: flex;
  flex-direction: column;
  width: min(680px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding-top: 120px;
}

/* The copy's parts take their places in the frame itself, so the picture
 * can come between the lede and the steps. */
.cs__copy {
  display: contents;
}

.cs__head {
  order: 1;
}

.cs__lede,
.cs__extra {
  order: 2;
}

.cs__stage {
  order: 3;
}

.cs-pts {
  order: 4;
}

.cs__note {
  order: 5;
}

.cs__title {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.cs__lede {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.cs__lede strong {
  color: var(--ink);
  font-weight: inherit;
}

.cs__note {
  margin: 20px 0 0;
  color: var(--quiet);
  font-size: 13px;
  line-height: 1.45;
}

/* The picture: a fixed canvas, scaled (case-kit.js sets --k) inside a box of
 * exactly its scaled size. The box carries the dotted card ground, so the
 * pattern stays on whole pixels whatever the scale.
 *
 * Scaled with a transform, not with `zoom`. Zoom goes into the font size, and
 * WebKit will not compute a font below 9px that way: on an iPhone, where the
 * canvases are near a third of their size, every label came out two or three
 * times too big for its box. A transform leaves the layout alone, so the
 * negative margins take back the room the unscaled canvas would keep. */
.cs__stage {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.cs__box {
  position: relative;
  /* A formatting context of its own, so the canvas's negative margin
   * shortens this box and does not collapse through it. */
  display: flow-root;
  overflow: hidden;
  border-radius: 3px;
  background: var(--card) url("/images/v2/card-pattern.png");
  image-rendering: pixelated;
}

.cs__box--plain {
  overflow: visible;
  background: none;
}

.cs__canvas {
  position: relative;
  width: calc(var(--w, 1124) * 1px);
  height: calc(var(--h, 822) * 1px);
  margin-right: calc(var(--w, 1124) * (var(--k, 0.3) - 1) * 1px);
  margin-bottom: calc(var(--h, 822) * (var(--k, 0.3) - 1) * 1px);
  transform: scale(var(--k, 0.3));
  transform-origin: 0 0;
  image-rendering: auto;
}

/* The steps: numbered points whose numbers match the picture's state. */
.cs-pts {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: pt;
}

.cs-pts li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  counter-increment: pt;
  cursor: pointer;
}

.cs-pts li::before {
  content: counter(pt);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  background: #000;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition: background-color 0.25s, transform 0.35s var(--ease);
}

.cs-pts > li > b {
  grid-column: 2;
  align-self: center;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cs-pts > li > b + span {
  grid-column: 2;
  min-height: 0;
  overflow: hidden;
  padding-top: 3px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.45;
}

.cs-pts li.is-now::before {
  background: var(--accent);
  transform: scale(1.08);
}

.cs-pts > li:hover > b {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Pinned, the picture stays at the top and the steps come up under it as
 * cards; each takes over as it passes two thirds of the way up. */
.cs-pin .cs[data-steps] .cs__stage {
  position: sticky;
  top: 72px;
  z-index: 2;
  padding: 10px 0 14px;
  background: #fff;
}

/* Stuck, it also covers the strip above it, behind the menu, so the cards
 * that went by do not show at the top of the screen. It reaches the screen's
 * edges and no further: the frame sits one gutter in, and anything past that
 * made a phone open the page 8px wider than its screen. */
.cs-pin .cs[data-steps] .cs__stage::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--gutter));
  right: calc(-1 * var(--gutter));
  bottom: 100%;
  height: 80px;
  background: #fff;
  visibility: hidden;
}

.cs-pin .cs[data-steps] .cs__stage.is-stuck::before {
  visibility: visible;
}

.cs-pin .cs[data-steps] .cs-pts {
  gap: 0;
  margin-top: 0;
  padding-bottom: 30vh;
}

.cs-pin .cs[data-steps] .cs-pts li {
  margin-top: 46vh;
  padding: 16px 16px 18px;
  background: #fff;
  box-shadow: 0 0 0 1px #e6e6e6, 0 18px 36px -26px rgba(0, 0, 0, 0.45);
}

.cs-pin .cs[data-steps] .cs-pts li:first-child {
  margin-top: 22vh;
}

/* Numbers in the copy: big figures on the dotted card ground. */
.cs__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.cs__stats--3 {
  grid-template-columns: 1.3fr 1fr 1fr;
}

/* Three figures do not fit side by side on a small phone. */
@media (max-width: 420px) {
  .cs__stats--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cs__stats li {
  padding: 12px 14px 13px;
  background: var(--card) url("/images/v2/card-pattern.png");
  image-rendering: pixelated;
}

.cs__stats b {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  image-rendering: auto;
}

.cs__stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  image-rendering: auto;
}

/* Links on to other sections, numbered like them. They come in one after
 * another as the list comes into view (each li carries its --i). Pointed
 * at, focused or lit by a scene (.is-lit), a black fill sweeps across and an
 * arrow slides in. The label is white in difference mode, so it reads dark
 * on the grey and white on the black at every moment of the sweep. */
.cs__tour {
  display: grid;
  /* minmax(0, …): a long label wraps in its button on a 320px phone rather
   * than widening the page. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.cs__tour a {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  overflow: hidden;
  background: var(--card);
  font-size: 14px;
  line-height: 1.25;
}

.cs__tour a > span {
  color: #fff;
  mix-blend-mode: difference;
}

.cs__tour a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #000;
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.45s var(--ease);
}

.cs__tour a::after {
  content: "→";
  margin-left: auto;
  padding-left: 6px;
  color: #fff;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s, transform 0.4s var(--ease);
}

.cs__tour a:is(:hover, :focus-visible, .is-lit)::before {
  transform: none;
}

.cs__tour a:is(:hover, :focus-visible, .is-lit)::after {
  opacity: 1;
  transform: none;
}

.cs__tour b {
  min-width: 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .js .cs__tour[data-reveal] {
    opacity: 1;
    transform: none;
  }

  .js .cs__tour[data-reveal] li {
    opacity: 0;
    transform: translateY(14px);
  }

  .js .cs__tour[data-reveal].is-in li {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s ease, transform 0.7s var(--ease);
    transition-delay: calc(var(--i, 0) * 60ms + 120ms);
  }
}

/* ---------------------------------------------------------------- slides */

@media (min-width: 1024px) and (min-height: 620px) {
  .cs__frame {
    --pad-x: clamp(24px, 4vw, 72px);
    position: relative;
    display: grid;
    grid-template-columns: clamp(330px, 29vw, 440px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: clamp(40px, 4.4vw, 84px);
    align-items: center;
    width: auto;
    max-width: 1800px;
    height: 100vh;
    height: 100svh;
    margin: 0 auto;
    padding: 88px var(--pad-x) 40px;
  }

  .cs__copy {
    display: block;
    min-height: 0;
  }

  .cs__title {
    font-size: clamp(30px, 1.15vw + 2.3vh, 46px);
  }

  .cs__lede {
    margin-top: 18px;
    font-size: clamp(15px, 0.55vw + 1.05vh, 18px);
  }

  .cs-pts {
    gap: clamp(10px, 1.5vh, 16px);
    margin-top: clamp(18px, 3vh, 30px);
  }

  .cs-pts li {
    grid-template-columns: 26px minmax(0, 1fr);
    transition: grid-template-rows 0.45s var(--ease);
  }

  .cs-pts li::before {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }

  .cs-pts > li > b {
    font-size: clamp(14.5px, 0.5vw + 0.95vh, 17px);
  }

  .cs-pts > li > b + span {
    font-size: clamp(13px, 0.42vw + 0.85vh, 15px);
  }

  .cs__stats b {
    font-size: clamp(26px, 0.9vw + 1.6vh, 36px);
  }

  .cs__stage {
    align-self: stretch;
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 0;
    margin: 0;
  }

  .cs-pin .cs[data-steps] {
    height: calc(100vh + var(--n, 0) * var(--step-len));
    height: calc(100svh + var(--n, 0) * var(--step-len));
  }

  .cs-pin .cs[data-steps] > .cs__frame {
    position: sticky;
    top: 0;
  }

  /* Pinned, the cards go back to a plain list beside the picture. */
  .cs-pin .cs[data-steps] .cs__stage {
    position: static;
    padding: 0;
    background: none;
  }

  .cs-pin .cs[data-steps] .cs__stage::before {
    content: none;
  }

  .cs-pin .cs[data-steps] .cs-pts {
    gap: clamp(10px, 1.5vh, 16px);
    margin-top: clamp(18px, 3vh, 30px);
    padding-bottom: 0;
  }

  .cs-pin .cs[data-steps] .cs-pts li,
  .cs-pin .cs[data-steps] .cs-pts li:first-child {
    margin-top: 0;
    padding: 0;
    background: none;
    box-shadow: none;
  }

  /* A wide picture (three screens side by side) goes under the copy: the
   * title and the lede share the top row, the steps are drawn in the
   * picture, and the list stays for screen readers. */
  .cs--wide .cs__frame {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-items: end;
    row-gap: clamp(20px, 3.6vh, 40px);
  }

  .cs--wide .cs__copy {
    display: contents;
  }

  .cs--wide .cs__head {
    grid-column: 1;
    grid-row: 1;
  }

  .cs--wide .cs__lede {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }

  .cs--wide .cs__stage {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  /* Some scenes play their steps in the picture alone; on a slide their
   * list stays for screen readers. */
  .cs-pts--quiet,
  .cs--wide .cs-pts {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* On a shorter screen only the current step keeps its description open. */
@media (min-width: 1024px) and (min-height: 620px) and (max-height: 860px) {
  .cs-pin .cs[data-steps] .cs-pts li {
    grid-template-rows: auto 0fr;
  }

  .cs-pin .cs[data-steps] .cs-pts li.is-now {
    grid-template-rows: auto 1fr;
  }
}

/* ---------------------------------------------------------------- pieces the scenes share */

/* A part that arrives with its step. */
.cs .appear {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s ease, transform 0.6s var(--ease);
}

.cs .appear.is-on {
  opacity: 1;
  transform: none;
}

/* A part outlined while its step is the current one. */
.cs .hl {
  outline: 3px solid transparent;
  outline-offset: 5px;
  transition: box-shadow 0.3s ease, outline-color 0.3s ease;
}

.cs .hl.is-now {
  outline-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .cs *,
  .cs *::before,
  .cs *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
}

@media (forced-colors: active) {
  .cs__tour a > span {
    mix-blend-mode: normal;
  }

  .cs-pts li.is-now::before {
    outline: 2px solid CanvasText;
  }

  .cs .hl.is-now {
    outline-color: Highlight;
  }
}

/* ================================================================ the pictures' parts
 *
 * The deck's shared pieces, as they were: modern windows, phones, the
 * old platform's grey Win9x windows, the admin panel's shell and its
 * controls (the real panel is shadcn in Legends purple, drawn a little
 * larger here so it reads in a small picture). Sizes are canvas pixels. */

/* ------------------------------------------------------------------ modern window */
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.09), 0 2px 4px -1px rgba(16, 24, 40, 0.06), 0 26px 60px -20px rgba(16, 24, 40, 0.3);
}
.win__bar {
  position: relative;
  flex: none;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #f6f6f7;
  border-bottom: 1px solid #e9e9ec;
}
.win__dots { display: flex; gap: 7px; flex: none; }
.win__dots i { width: 11px; height: 11px; border-radius: 50%; background: #dcdce1; }
.win__url {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 26px;
  margin: 0 46px 0 4px;
  border-radius: 7px;
  background: #fff;
  border: 1px solid #e7e7ea;
  color: #6b6b72;
  font: 500 13.5px/1 var(--sans);
  white-space: nowrap;
  overflow: hidden;
}
.win__url .ic { font-size: 12px; color: #a0a0a7; }
.win__title { flex: 1; text-align: center; margin-right: 46px; font: 600 13.5px/1 var(--sans); color: #55555c; white-space: nowrap; }
.win__demo {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 5px 8px;
  border-radius: 6px;
  background: #ececef;
  color: #85858c;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.win__body { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #fff; }
.shot { display: block; width: 100%; height: auto; }

/* ------------------------------------------------------------------ phone */
.phone {
  position: absolute;
  width: 280px;
  height: 590px;
  padding: 9px;
  border-radius: 46px;
  background: #121215;
  box-shadow: inset 0 0 0 1.5px #2c2c31, 0 30px 60px -22px rgba(16, 24, 40, 0.5);
}
.phone__scr { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 38px; background: #fff; }
.phone__isl { position: absolute; top: 9px; left: 50%; z-index: 6; width: 82px; height: 24px; margin-left: -41px; border-radius: 14px; background: #121215; }
.phone__scr > img.fill { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ------------------------------------------------------------------ old platform window (Win9x, grey on purpose) */
.w9 {
  position: absolute;
  display: flex;
  flex-direction: column;
  padding: 3px;
  background: #c3c3c3;
  box-shadow: inset -1px -1px 0 #0a0a0a, inset 1px 1px 0 #dfdfdf, inset -2px -2px 0 #808080, inset 2px 2px 0 #fff, 0 18px 40px -22px rgba(0, 0, 0, 0.45);
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  color: #111;
}
.w9__bar {
  flex: none;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 3px 0 8px;
  background: linear-gradient(90deg, #7b7b7b, #b8b8b8);
  color: #fff;
  font: 700 14.5px/1 Tahoma, Verdana, sans-serif;
  white-space: nowrap;
}
.w9--blue .w9__bar { background: linear-gradient(90deg, #0a246a, #3a6ea5); }
.w9__btns { margin-left: auto; display: flex; gap: 2px; }
.w9__btns i {
  position: relative;
  width: 20px;
  height: 18px;
  background: #c3c3c3;
  box-shadow: inset -1px -1px 0 #0a0a0a, inset 1px 1px 0 #fff, inset -2px -2px 0 #808080;
}
.w9__btns i:last-child::before, .w9__btns i:last-child::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 9px;
  height: 2px;
  background: #111;
  transform: rotate(45deg);
}
.w9__btns i:last-child::after { transform: rotate(-45deg); }
.w9__btns i:first-child::before { content: ""; position: absolute; left: 5px; bottom: 4px; width: 7px; height: 2px; background: #111; }
.w9__body {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 3px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: inset 1px 1px 0 #808080, inset -1px -1px 0 #fff;
  font-size: 15.5px;
  line-height: 1.38;
  overflow: hidden;
}
.w9__btn {
  display: inline-grid;
  place-items: center;
  min-width: 96px;
  height: 30px;
  padding: 0 12px;
  background: #c3c3c3;
  box-shadow: inset -1px -1px 0 #0a0a0a, inset 1px 1px 0 #fff, inset -2px -2px 0 #808080;
  font: 14px Tahoma, Verdana, sans-serif;
}

/* ------------------------------------------------------------------ panel shell */
.pnl { font-family: var(--sans); color: #0a0d12; font-size: 15px; line-height: 1.35; }
.pnl .win__body { display: flex; }
.pside {
  flex: none;
  width: 212px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px 10px;
  background: #fafafa;
  border-right: 1px solid #ededee;
  overflow: hidden;
}
.pside__tenant { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; margin-bottom: 6px; border-bottom: 1px solid #ededee; }
.pside__logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--lg);
  color: #fff;
  font-size: 16px;
}
.pside__name { min-width: 0; flex: 1; }
.pside__name b { display: block; font-size: 13.5px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.pside__name small { display: block; font-size: 11.5px; color: #8a8a92; white-space: nowrap; }
.pside__tenant > .ic { color: #9a9aa1; font-size: 15px; }
.pside__item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 31px;
  padding: 0 9px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #2b2b31;
  white-space: nowrap;
}
.pside__item .ic { font-size: 16px; color: #5d5d64; }
.pside__item .chev { margin-left: auto; font-size: 13px; color: #a8a8ae; }
.pside__item.is-active { background: var(--lg-50); color: var(--lg); font-weight: 600; }
.pside__item.is-active .ic { color: var(--lg); }
.pside__item--sub { height: 27px; padding-left: 35px; font-size: 13px; color: #45454c; }
.pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pcrumbs {
  flex: none;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  border-bottom: 1px solid #f0f0f2;
  font-size: 13.5px;
  color: #74747b;
  white-space: nowrap;
}
.pcrumbs .ic { font-size: 16px; color: #8a8a92; }
.pcrumbs i { width: 1px; height: 16px; background: #e6e6e9; }
.pcrumbs b { color: #1b1b20; font-weight: 500; }
.pcontent { position: relative; flex: 1; min-height: 0; padding: 18px 22px; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.phead h4 { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font: 700 23px/1.15 var(--sans); letter-spacing: -0.015em; }
.phead p { margin: 5px 0 0; color: #6b6b72; font-size: 14px; }
.pactions { display: flex; gap: 8px; flex: none; }

/* ------------------------------------------------------------------ panel controls */
.u-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid #e3e3e7;
  background: #fff;
  font: 500 14px/1 var(--sans);
  color: #1b1b20;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s;
}
.u-btn .ic { font-size: 15px; }
.u-btn--pri { background: var(--lg); border-color: var(--lg); color: #fff; }
.u-btn--ok { background: #16a34a; border-color: #16a34a; color: #fff; }
.u-btn--bad { color: #dc2626; border-color: #f5c2c2; }
.u-btn--sm { height: 29px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.u-btn.is-press { transform: scale(0.95); box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.2); }
.u-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  background: #f1f1f3;
  color: #3f3f46;
  font: 600 12.5px/1 var(--sans);
  letter-spacing: 0;
  white-space: nowrap;
}
.u-badge .ic { font-size: 12px; }
.u-badge--lg { background: var(--lg); color: #fff; }
.u-badge--soft { background: var(--lg-50); color: var(--lg); box-shadow: inset 0 0 0 1px var(--lg-100); }
.u-badge--ok { background: #e7f6e8; color: #15803d; }
.u-badge--warn { background: #fff3dc; color: #b45309; }
.u-badge--bad { background: #fdeceb; color: #b42318; }
.u-badge--line { background: #fff; box-shadow: inset 0 0 0 1px #e3e3e7; }
.u-badge--nick { background: var(--nick-50); color: #b8461b; }
.u-card { position: relative; background: #fff; border: 1px solid #e9e9ec; border-radius: 14px; padding: 16px 18px; }
.u-card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; font: 650 16px/1.2 var(--sans); letter-spacing: -0.01em; }
.u-card__h small { font-weight: 500; font-size: 12.5px; color: #8a8a92; }
.u-label { display: block; margin: 0 0 6px; font: 600 13px/1.2 var(--sans); color: #26262b; }
.u-help { margin-top: 5px; font-size: 12px; color: #8a8a92; }
.u-input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid #e3e3e7;
  border-radius: 9px;
  background: #fff;
  font-size: 14px;
  color: #1b1b20;
  white-space: nowrap;
  overflow: hidden;
}
.u-input--muted { color: #9a9aa1; }
.u-input .ic { color: #9a9aa1; font-size: 15px; }
.u-input .ic.r { margin-left: auto; }
.u-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: #f1f1f3; }
.u-seg span { padding: 7px 13px; border-radius: 8px; font: 500 13.5px/1 var(--sans); color: #55555c; white-space: nowrap; transition: background 0.25s, color 0.25s; }
.u-seg span.on { background: #fff; color: #1b1b20; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.09); }
.u-seg--pri span.on { background: var(--lg); color: #fff; }
.u-tabs { display: flex; gap: 22px; border-bottom: 1px solid #ececef; font-size: 14.5px; white-space: nowrap; }
.u-tabs span { padding: 0 0 10px; color: #6b6b72; }
.u-tabs span.on { color: var(--lg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--lg); }
.u-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid #e3e3e7;
  border-radius: 9px;
  background: #fff;
  color: #3f3f46;
  font: 500 14px/1 var(--sans);
  white-space: nowrap;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.u-chip.on { background: var(--lg); border-color: var(--lg); color: #fff; }
.u-chip.off { color: #b5b5bb; border-style: dashed; }
.u-switch { display: block; position: relative; flex: none; width: 38px; height: 22px; border-radius: 11px; background: #d9d9de; transition: background 0.3s; }
.u-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22); transition: transform 0.35s var(--ease); }
.u-switch.on { background: var(--lg); }
.u-switch.on::after { transform: translateX(16px); }
.u-switch--ok.on { background: #16a34a; }
.u-check { display: grid; place-items: center; flex: none; width: 19px; height: 19px; border-radius: 5px; border: 1.5px solid #cfcfd5; background: #fff; color: #fff; font-size: 12px; transition: background 0.25s, border-color 0.25s; }
.u-check .ic { stroke-width: 3.4; opacity: 0; }
.u-check.on { background: var(--lg); border-color: var(--lg); }
.u-check.on .ic { opacity: 1; }
.u-lang { display: inline-flex; gap: 3px; }
.u-lang i { display: grid; place-items: center; min-width: 25px; height: 19px; padding: 0 4px; border-radius: 5px; background: #16a34a; color: #fff; font: 700 10.5px/1 var(--sans); font-style: normal; }
.u-lang i.no { background: #e7e7ec; color: #9a9aa1; }
.u-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.u-table th { padding: 0 10px 9px; border-bottom: 1px solid #ececef; text-align: left; font: 600 12px/1.2 var(--sans); color: #7a7a82; white-space: nowrap; }
.u-table td { padding: 10px; border-bottom: 1px solid #f2f2f4; vertical-align: middle; }
.u-table tr:last-child td { border-bottom: 0; }
.u-mono { font-family: var(--mono); font-size: 13px; }
.u-mask { color: #8a8a92; letter-spacing: 0.06em; }
.u-toast {
  position: absolute;
  z-index: 15;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #141417;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.55);
  font-size: 14px;
  line-height: 1.38;
}
.u-toast > .ic { font-size: 18px; margin-top: 1px; color: #4ade80; }
.u-toast b { display: block; font-weight: 600; }
.u-toast span { color: #b9b9c0; }
.u-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; flex: none; }

/* ------------------------------------------------------------------ storefront bits (Legends web and app) */
.sf { font-family: var(--sans); color: #141a2a; }
.sf-btn { display: inline-grid; place-items: center; height: 30px; padding: 0 14px; border-radius: 8px; background: var(--lg); color: #fff; font: 600 12.5px/1 var(--sans); white-space: nowrap; }
.sf-btn--ghost { background: var(--lg-50); color: var(--lg); }

/* small caption chips under pictures */
.cap { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; background: #000; color: #fff; font: 600 13px/1 var(--sans); letter-spacing: 0.02em; white-space: nowrap; z-index: 8; }
.cap .ic { font-size: 14px; }
.cap--light { background: #fff; color: #1b1b1b; box-shadow: 0 0 0 1px #e3e3e3; }

/* Icon rail: a collapsed panel sidebar for narrow panel windows. */
.prail { flex: none; width: 54px; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; background: #fafafa; border-right: 1px solid #ededee; }
.prail span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #5d5d64; font-size: 17px; }
.prail span:first-child { margin-bottom: 6px; background: var(--lg); color: #fff; }
.prail span.on { background: var(--lg-50); color: var(--lg); }
.u-blur { filter: blur(6px); user-select: none; }
