/* generated by bun run brand sync from brand/css/openbelt.css: edit the source, then sync */
/* OpenBelt's look in one link: <link rel="stylesheet" href="brand/css/openbelt.css" />. */
/* OpenBelt's three families: variable latin subsets, self-hosted (licences in OFL.txt). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("../fonts/inter-tight.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/jetbrains-mono.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* generated by bun run brand sync from brand/DESIGN.md: edit DESIGN.md, then sync */
/* Dark first: dark by default, <html data-theme="light"> for light, data-theme="system" to follow the OS. */
:root {
  color-scheme: dark;
  --openbelt-color-primary: #f8f7f3;
  --openbelt-color-on-primary: #0c0b0a;
  --openbelt-color-action: #35332e;
  --openbelt-color-on-action: #f8f7f3;
  --openbelt-color-neutral: #0c0b0a;
  --openbelt-color-backdrop: #000000;
  --openbelt-color-surface: #181714;
  --openbelt-color-subtle: #22201c;
  --openbelt-color-sidebar: #141311;
  --openbelt-color-sidebar-selected: #2a2824;
  --openbelt-color-border: #2b2925;
  --openbelt-color-border-strong: #403d36;
  --openbelt-color-muted: #a39e91;
  --openbelt-color-success: #67d29a;
  --openbelt-color-warning: #f2c14e;
  --openbelt-color-error: #ff7a6b;
  --openbelt-color-highlight: #ffd43b;
  --openbelt-color-art-blue: #7cb4ff;
  --openbelt-color-art-violet: #b49cff;
  --openbelt-color-art-teal: #5fd4c8;
  --openbelt-color-art-coral: #ff9f7a;
  --openbelt-font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-font-body: "Inter", system-ui, sans-serif;
  --openbelt-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --openbelt-type-hero: 650 104px/1.12 "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-tracking-hero: -0.035em;
  --openbelt-type-display: 650 67px/1 "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-tracking-display: -0.04em;
  --openbelt-type-h1: 650 43px/1.05 "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-tracking-h1: -0.03em;
  --openbelt-type-h2: 650 34px/1.1 "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-tracking-h2: -0.03em;
  --openbelt-type-h3: 650 27px/1.15 "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-tracking-h3: -0.025em;
  --openbelt-type-h4: 650 22px/1.2 "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-tracking-h4: -0.02em;
  --openbelt-type-h5: 650 18px/1.25 "Inter Tight", "Inter", system-ui, sans-serif;
  --openbelt-tracking-h5: -0.015em;
  --openbelt-type-body-lg: 400 18px/1.55 "Inter", system-ui, sans-serif;
  --openbelt-tracking-body-lg: 0;
  --openbelt-type-body-md: 400 14px/1.5 "Inter", system-ui, sans-serif;
  --openbelt-tracking-body-md: 0;
  --openbelt-type-body-sm: 400 12px/1.45 "Inter", system-ui, sans-serif;
  --openbelt-tracking-body-sm: 0;
  --openbelt-type-label: 550 13px/1.2 "Inter", system-ui, sans-serif;
  --openbelt-tracking-label: 0;
  --openbelt-type-mono-md: 400 13px/1.6 "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --openbelt-tracking-mono-md: 0;
  --openbelt-type-mono-sm: 400 12px/1.5 "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --openbelt-tracking-mono-sm: 0;
  --openbelt-radius-sm: 6px;
  --openbelt-radius-md: 10px;
  --openbelt-radius-lg: 12px;
  --openbelt-radius-full: 9999px;
  --openbelt-space-2xs: 4px;
  --openbelt-space-xs: 8px;
  --openbelt-space-sm: 12px;
  --openbelt-space-md: 16px;
  --openbelt-space-lg: 24px;
  --openbelt-space-xl: 32px;
  --openbelt-space-2xl: 48px;
  --openbelt-space-3xl: 64px;
  --openbelt-space-4xl: 96px;
  --openbelt-space-5xl: 128px;
  --openbelt-control-height: 32px;
  --openbelt-duration: 140ms;
  --openbelt-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --openbelt-icon-stroke: 1.5;
  --openbelt-tile-radius: 22%;
}

:root[data-theme="light"] {
  color-scheme: light;
  --openbelt-color-primary: #0c0b0a;
  --openbelt-color-on-primary: #fffefb;
  --openbelt-color-action: #0c0b0a;
  --openbelt-color-on-action: #fffefb;
  --openbelt-color-neutral: #fffefb;
  --openbelt-color-backdrop: #fffefb;
  --openbelt-color-surface: #f8f7f3;
  --openbelt-color-subtle: #f1efe9;
  --openbelt-color-sidebar: #f6f5f0;
  --openbelt-color-sidebar-selected: #e8e5dc;
  --openbelt-color-border: #e4e1d8;
  --openbelt-color-border-strong: #d1cdc1;
  --openbelt-color-muted: #6f6a5f;
  --openbelt-color-success: #2f7a55;
  --openbelt-color-warning: #8a5f00;
  --openbelt-color-error: #b8352a;
  --openbelt-color-highlight: #856000;
  --openbelt-color-art-blue: #2f63b8;
  --openbelt-color-art-violet: #6a4fc2;
  --openbelt-color-art-teal: #1f7f78;
  --openbelt-color-art-coral: #b5502f;
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --openbelt-color-primary: #0c0b0a;
    --openbelt-color-on-primary: #fffefb;
    --openbelt-color-action: #0c0b0a;
    --openbelt-color-on-action: #fffefb;
    --openbelt-color-neutral: #fffefb;
    --openbelt-color-backdrop: #fffefb;
    --openbelt-color-surface: #f8f7f3;
    --openbelt-color-subtle: #f1efe9;
    --openbelt-color-sidebar: #f6f5f0;
    --openbelt-color-sidebar-selected: #e8e5dc;
    --openbelt-color-border: #e4e1d8;
    --openbelt-color-border-strong: #d1cdc1;
    --openbelt-color-muted: #6f6a5f;
    --openbelt-color-success: #2f7a55;
    --openbelt-color-warning: #8a5f00;
    --openbelt-color-error: #b8352a;
    --openbelt-color-highlight: #856000;
    --openbelt-color-art-blue: #2f63b8;
    --openbelt-color-art-violet: #6a4fc2;
    --openbelt-color-art-teal: #1f7f78;
    --openbelt-color-art-coral: #b5502f;
  }
}

/* Base: reset, type, links, focus, reduced motion. Values come from tokens.css only. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation; /* no double-tap zoom; a pinch still zooms */
}

body {
  margin: 0;
  background: var(--openbelt-color-neutral);
  color: var(--openbelt-color-primary);
  font: var(--openbelt-type-body-md);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0;
  text-wrap: balance;
}

h1 {
  font: var(--openbelt-type-h1);
  letter-spacing: var(--openbelt-tracking-h1);
}

h2 {
  font: var(--openbelt-type-h2);
  letter-spacing: var(--openbelt-tracking-h2);
}

h3 {
  font: var(--openbelt-type-h3);
  letter-spacing: var(--openbelt-tracking-h3);
}

h4 {
  font: var(--openbelt-type-h4);
  letter-spacing: var(--openbelt-tracking-h4);
}

h5 {
  font: var(--openbelt-type-h5);
  letter-spacing: var(--openbelt-tracking-h5);
}

p {
  margin: 0;
  text-wrap: pretty;
}

/* Mono has no colour for links, so links in text are underlined. Navigation opts out. */
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--openbelt-color-border-strong);
  transition: text-decoration-color var(--openbelt-duration) var(--openbelt-ease);
}

a:hover {
  text-decoration-color: currentColor;
}

code,
kbd,
pre,
samp {
  font: var(--openbelt-type-mono-md);
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--openbelt-color-primary);
  outline-offset: 2px;
}

::selection {
  background: var(--openbelt-color-primary);
  color: var(--openbelt-color-on-primary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* Every control answers a press, and a disclosure row a hover, unless its component says otherwise
   (:where() keeps these weaker than any class). */
:where(button, [role="button"], [role="tab"], [role^="menuitem"]):not(:disabled):active {
  translate: 0 1px;
}

:where(details > summary) {
  cursor: pointer;
}

:where(details > summary):hover {
  background-color: var(--openbelt-color-subtle);
}

:where(details > summary):active {
  background-color: var(--openbelt-color-border);
}

/* Corners. Where the browser draws squircles (corner-shape: Chrome, Safari), every corner is one, and the scale is 1.6x
   bigger, because a squircle looks sharper than a round corner of the same radius. Elsewhere corners are round at
   tokens.css's sizes. A full radius gives a squircle capsule (buttons); what must stay a circle takes
   corner-shape: round (components.css, .round). */
@supports (corner-shape: squircle) {
  :root {
    --openbelt-radius-sm: 10px;
    --openbelt-radius-md: 16px;
    --openbelt-radius-lg: 20px;
  }

  *,
  *::before,
  *::after {
    corner-shape: squircle;
  }
}

/* Components: plain HTML plus these classes. */

.slot {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url("../logo/slot.svg") no-repeat center / contain;
  mask: url("../logo/slot.svg") no-repeat center / contain;
}

/* Lucide icons from the sprite: <svg class="icon"><use href="brand/icons/sprite.svg#globe" /></svg> */
.icon {
  display: inline-block;
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--openbelt-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}

.icon-lg {
  width: 20px;
  height: 20px;
  vertical-align: -4px;
}

/* One control height: 32px, 44px for a thumb (below 820px, or a touch screen: the smallest target a
   finger hits reliably). Buttons, inputs, selects and menu items take it, so controls side by side match. */
@media (max-width: 820px), (pointer: coarse) {
  :root {
    --openbelt-control-height: 44px;
  }
}

/* Buttons: one shape (a capsule), one primary per view, secondary (a soft fill) for the rest, ghost inside toolbars.
   A soft fill is something to press or type in; fields take it too (.input). */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--openbelt-space-xs);
  height: var(--openbelt-control-height);
  padding: 0 var(--openbelt-space-sm);
  border: 1px solid transparent;
  border-radius: var(--openbelt-radius-full);
  font: var(--openbelt-type-label);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    border-color var(--openbelt-duration) var(--openbelt-ease),
    color var(--openbelt-duration) var(--openbelt-ease),
    transform var(--openbelt-duration) var(--openbelt-ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--openbelt-color-action);
  color: var(--openbelt-color-on-action);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--openbelt-color-action) 86%, var(--openbelt-color-on-action));
}

/* The soft fill is a little of the ink over whatever is behind it, so it reads on the page and on a filled card. */
.btn-secondary {
  background: color-mix(in srgb, var(--openbelt-color-primary) 8%, transparent);
  color: var(--openbelt-color-primary);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--openbelt-color-primary) 14%, transparent);
}

.btn-ghost {
  background: transparent;
  color: var(--openbelt-color-muted);
}

.btn-ghost:hover,
.btn-ghost[aria-current] {
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
}

/* A button on an Action fill (the band while an admin views the workspace as someone): on-action text, and on hover the fill a
   step toward it, as .btn-primary's hover. */
.btn-on-action {
  background: transparent;
  color: var(--openbelt-color-on-action);
}

.btn-on-action:hover {
  background: color-mix(in srgb, var(--openbelt-color-action) 86%, var(--openbelt-color-on-action));
}

.btn-lg {
  height: 40px;
  padding: 0 var(--openbelt-space-md);
  font-size: 14px;
}

.btn-square {
  width: var(--openbelt-control-height);
  padding: 0;
}

.btn:disabled {
  cursor: default;
  opacity: 0.6;
}

/* Text inputs: a soft fill, like .btn-secondary, with no outline. The border stays, transparent, so focus can draw one
   without moving the text. */
.input {
  height: var(--openbelt-control-height);
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: var(--openbelt-radius-sm);
  clip-path: var(--openbelt-squircle-sm);
  background: color-mix(in srgb, var(--openbelt-color-primary) 8%, transparent);
  color: var(--openbelt-color-primary);
  font: var(--openbelt-type-body-md);
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    border-color var(--openbelt-duration) var(--openbelt-ease);
}

/* iOS Safari zooms into a field whose text is under 16px when it takes focus, so for a thumb fields are 16px. */
@media (max-width: 820px), (pointer: coarse) {
  .input {
    font-size: 16px;
  }
}

.input::placeholder {
  color: var(--openbelt-color-muted);
}

.input:hover {
  background: color-mix(in srgb, var(--openbelt-color-primary) 12%, transparent);
}

/* Focus on a field moves its own border, with a soft ring: no second outline around the first. */
.input:focus-visible {
  outline: none;
  border-color: var(--openbelt-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--openbelt-color-primary) 14%, transparent);
}

/* A select drawn like an input, its chevron an icon:
   <span class="select"><select class="input">…</select><svg class="icon">…chevron-down</svg></span> */
.select {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.select select {
  width: 100%;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

.select .icon {
  position: absolute;
  right: 10px;
  top: calc(50% - 8px);
  color: var(--openbelt-color-muted);
  pointer-events: none;
}

/* A search field: the icon inside a field, and its key when it has one. The page sets only its width.
   <label class="find"><svg class="icon">…search</svg><input class="input" type="search"><span class="kbd">/</span></label> */
.find {
  position: relative;
  display: block;
  min-width: 0;
}

.find > .icon {
  position: absolute;
  left: 10px;
  top: calc(50% - 8px);
  color: var(--openbelt-color-muted);
  pointer-events: none;
}

.find > .input {
  width: 100%;
  padding-left: 32px;
}

.find > .kbd {
  position: absolute;
  right: 8px;
  top: calc(50% - 9px);
}

.find:has(> .kbd) > .input {
  padding-right: 34px;
}

/* A label over its control. */
.field {
  display: grid;
  gap: var(--openbelt-space-2xs);
  min-width: 0;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-label);
}

/* Something to copy (a token, a command): mono text that wraps, a copy button at its end. */
.copy-field {
  display: flex;
  align-items: flex-start;
  gap: var(--openbelt-space-xs);
  min-width: 0;
  padding: 2px 2px 2px var(--openbelt-space-sm);
  background: var(--openbelt-color-surface);
  border: 1px solid var(--openbelt-color-border);
  border-radius: var(--openbelt-radius-sm);
}

.copy-field code {
  flex: 1;
  min-width: 0;
  padding: 5px 0;
  font: var(--openbelt-type-mono-sm);
  overflow-wrap: anywhere;
}

.copy-field .btn {
  flex: none;
  width: 28px;
  height: 28px;
  padding: 0;
}

/* One-time code across discrete digit slots: one real input covers the slots, so autofill, paste,
   mobile keyboards and screen readers work natively while each digit reads in its own box.
   <div class="otp" data-otp="6"><input class="otp-input" id="code" name="code" inputmode="numeric"
   autocomplete="one-time-code" required /><div class="otp-slots" aria-hidden="true"><span class="otp-slot"></span>…</div></div> */
.otp {
  position: relative;
  display: block;
  width: 100%;
}

.otp-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  letter-spacing: 1em;
}

.otp-input::selection {
  background: transparent;
  color: transparent;
}

.otp-input:focus-visible {
  outline: none;
}

.otp-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--openbelt-space-xs);
  pointer-events: none;
}

.otp-slot {
  position: relative;
  display: grid;
  place-items: center;
  height: 56px;
  border: 1px solid transparent;
  border-radius: var(--openbelt-radius-sm);
  clip-path: var(--openbelt-squircle-sm);
  background: color-mix(in srgb, var(--openbelt-color-primary) 8%, transparent);
  color: var(--openbelt-color-primary);
  font: 550 24px/1 var(--openbelt-font-mono);
  font-variant-numeric: tabular-nums;
  user-select: none;
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    border-color var(--openbelt-duration) var(--openbelt-ease),
    box-shadow var(--openbelt-duration) var(--openbelt-ease);
}

.otp:hover .otp-slot:not([data-active="true"], [data-selected="true"]) {
  background: color-mix(in srgb, var(--openbelt-color-primary) 11%, transparent);
}

.otp-slot[data-filled="true"] {
  border-color: var(--openbelt-color-border-strong);
  background: color-mix(in srgb, var(--openbelt-color-primary) 6%, transparent);
}

.otp-slot[data-selected="true"] {
  border-color: var(--openbelt-color-primary);
  background: color-mix(in srgb, var(--openbelt-color-primary) 14%, transparent);
}

.otp-slot[data-active="true"] {
  border-color: var(--openbelt-color-primary);
  background: var(--openbelt-color-surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--openbelt-color-primary) 14%, transparent);
}

.otp-slot[data-caret="true"]::after {
  content: "";
  width: 1.5px;
  height: 22px;
  border-radius: var(--openbelt-radius-full);
  background: var(--openbelt-color-primary);
  animation: otp-caret 1.1s steps(1) infinite;
}

.otp:has(.otp-input[aria-invalid="true"]) .otp-slot:not([data-active="true"]) {
  border-color: color-mix(in srgb, var(--openbelt-color-error) 55%, transparent);
}

.otp[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

@keyframes otp-caret {
  0%,
  50% {
    opacity: 1;
  }

  50.01%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 360px) {
  .otp-slot {
    height: 48px;
    font-size: 20px;
  }
}

/* A segmented control (grid or list): its buttons in one outline, as tall as an input. */
.seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--openbelt-color-border-strong);
  border-radius: var(--openbelt-radius-full);
}

.seg .btn {
  height: calc(var(--openbelt-control-height) - 6px);
  width: calc(var(--openbelt-control-height) - 6px);
}

/* Pick one of a few, each with a line on what it means: radios as rows in one outline, the
   picked one a tone up. <div class="choices"><label><input type="radio" name="n" value="v">
   <span><b>Title</b><span>What it means.</span></span></label>…</div> */
.choices {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--openbelt-color-border-strong);
  border-radius: var(--openbelt-radius-md);
  overflow: hidden;
}

.choices > label {
  display: flex;
  align-items: flex-start;
  gap: var(--openbelt-space-sm);
  padding: var(--openbelt-space-sm) var(--openbelt-space-md);
  color: var(--openbelt-color-primary);
  font: var(--openbelt-type-body-md);
  cursor: pointer;
  transition: background-color var(--openbelt-duration) var(--openbelt-ease);
}

.choices > label + label {
  border-top: 1px solid var(--openbelt-color-border);
}

.choices > label:hover {
  background: var(--openbelt-color-surface);
}

.choices > label:has(input:checked) {
  background: var(--openbelt-color-subtle);
}

.choices input {
  appearance: none;
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  border: 1px solid var(--openbelt-color-border-strong);
  border-radius: var(--openbelt-radius-full);
  background: transparent;
}

.choices input:checked {
  border-color: var(--openbelt-color-primary);
}

.choices input:checked::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--openbelt-radius-full);
  background: var(--openbelt-color-primary);
}

.choices b {
  display: block;
  font-weight: 550;
}

.choices label > span > span {
  display: block;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-sm);
}

/* Rows in one bordered box, a 1px rule between them: settings, tokens, connections. */
.list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--openbelt-color-neutral);
  border: 1px solid var(--openbelt-color-border);
  border-radius: var(--openbelt-radius-md);
}

.list > * {
  min-width: 0;
  padding: var(--openbelt-space-md);
}

/* A row's own fill (hover, picked) follows the box's corners. */
.list > :first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.list > :last-child {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

/* Between shown rows only, so a hidden row (a filter's) leaves no rule at the top. */
.list > :not([hidden]) ~ :not([hidden]) {
  border-top: 1px solid var(--openbelt-color-border);
}

/* What just happened, on the page: an icon in the status colour, then the words. No rail. */
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--openbelt-space-sm);
  padding: var(--openbelt-space-sm) var(--openbelt-space-md);
  background: var(--openbelt-color-subtle);
  border-radius: var(--openbelt-radius-md);
  clip-path: var(--openbelt-squircle-md);
}

.notice > .icon {
  margin-top: 2px;
  vertical-align: 0;
}

.notice > div {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: var(--openbelt-space-2xs);
}

.notice > div b {
  font-weight: 600;
}

.notice > div span {
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-sm);
}

.notice-success > .icon {
  color: var(--openbelt-color-success);
}

.notice-error > .icon {
  color: var(--openbelt-color-error);
}

/* Surfaces: a card sits on the page, a panel is one tone off it. Borders, not shadows. */
.card {
  background: var(--openbelt-color-neutral);
  border: 1px solid var(--openbelt-color-border);
  border-radius: var(--openbelt-radius-md);
}

.panel {
  background: var(--openbelt-color-surface);
  border: 1px solid var(--openbelt-color-border);
  border-radius: var(--openbelt-radius-md);
}

/* The one shadow: things that float above the page (dialogs, menus, toasts). */
.overlay {
  border: 1px solid var(--openbelt-color-border);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.24);
}

/* Behind a drawer or dialog: dims the page, and a click on it closes what's open. Fades in with
   .open; hidden (and not clickable) without it. <div class="scrim" aria-hidden="true"></div> */
.scrim {
  position: fixed;
  inset: 0;
  background: rgb(12 11 10 / 0.32);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--openbelt-duration) var(--openbelt-ease),
    visibility 0s linear var(--openbelt-duration);
}

.scrim.open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--openbelt-duration) var(--openbelt-ease);
}

/* toast: start */
/* A toast: what OpenBelt asks or tells while you work, floating at the bottom (centered over the
   content canvas on desktop via --toast-offset, inset from the edges on a phone). Inverted surface
   (warm paper on dark pages, deep ink on light pages with OpenBelt's charcoal primary button) so
   every toast separates cleanly over any workspace page or user app with no border.
   - Status pill (.toast.toast-status): content-hugging capsule for confirmations, errors (.toast-error),
     warnings (.toast-warning), successes (.toast-success), updates, and undo, with optional actions
     and an icon-only .toast-close button.
   - Ask card (.toast): compact card with a 32px identity slot (.toast-logo or .app-tile), .toast-brand
     wordmark, or .toast-icon, a .toast-title, an optional .toast-detail line, and .toast-actions
     (primary first, ghost second).
   The app frame and the SDK's Shadow DOM inject this section (toast.ts), so it carries its own buttons. */
.toast {
  --toast-bg: var(--openbelt-color-primary);
  --toast-fg: var(--openbelt-color-on-primary);
  --toast-muted: color-mix(in srgb, var(--openbelt-color-on-primary) 62%, transparent);
  --toast-action: var(--openbelt-color-on-primary);
  --toast-on-action: var(--openbelt-color-primary);
  --toast-action-hover: color-mix(
    in srgb,
    var(--openbelt-color-on-primary) 86%,
    var(--openbelt-color-primary)
  );
  --toast-ghost-hover: color-mix(in srgb, var(--openbelt-color-on-primary) 9%, transparent);
  --toast-success: color-mix(
    in srgb,
    var(--openbelt-color-success) 62%,
    var(--openbelt-color-on-primary)
  );
  --toast-error: color-mix(
    in srgb,
    var(--openbelt-color-error) 76%,
    var(--openbelt-color-on-primary)
  );
  --toast-warning: color-mix(
    in srgb,
    var(--openbelt-color-warning) 64%,
    var(--openbelt-color-on-primary)
  );
  position: fixed;
  z-index: 48;
  left: calc(50% + var(--toast-offset, 0px));
  bottom: var(--openbelt-space-lg);
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(396px, calc(100vw - 2 * var(--openbelt-space-sm)));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--openbelt-space-2xs);
  column-gap: var(--openbelt-space-sm);
  padding: var(--openbelt-space-md) 18px;
  background: var(--toast-bg);
  color: var(--toast-fg);
  border-radius: var(--openbelt-radius-lg);
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.2),
    0 16px 40px rgb(0 0 0 / 0.34);
  font: var(--openbelt-type-body-md);
  text-align: left;
  animation: toast-in 160ms var(--openbelt-ease);
}

:root[data-theme="light"] .toast {
  --toast-muted: color-mix(in srgb, var(--openbelt-color-on-primary) 68%, transparent);
  --toast-action: color-mix(
    in srgb,
    var(--openbelt-color-muted) 42%,
    var(--openbelt-color-primary)
  );
  --toast-on-action: var(--openbelt-color-on-primary);
  --toast-action-hover: color-mix(
    in srgb,
    var(--openbelt-color-muted) 56%,
    var(--openbelt-color-primary)
  );
  --toast-ghost-hover: color-mix(in srgb, var(--openbelt-color-on-primary) 10%, transparent);
  --toast-success: color-mix(
    in srgb,
    var(--openbelt-color-success) 74%,
    var(--openbelt-color-on-primary)
  );
  --toast-error: color-mix(
    in srgb,
    var(--openbelt-color-error) 74%,
    var(--openbelt-color-on-primary)
  );
  --toast-warning: color-mix(
    in srgb,
    var(--openbelt-color-warning) 74%,
    var(--openbelt-color-on-primary)
  );
  box-shadow:
    0 2px 6px rgb(0 0 0 / 0.16),
    0 16px 38px rgb(0 0 0 / 0.28);
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .toast {
    --toast-muted: color-mix(in srgb, var(--openbelt-color-on-primary) 68%, transparent);
    --toast-action: color-mix(
      in srgb,
      var(--openbelt-color-muted) 42%,
      var(--openbelt-color-primary)
    );
    --toast-on-action: var(--openbelt-color-on-primary);
    --toast-action-hover: color-mix(
      in srgb,
      var(--openbelt-color-muted) 56%,
      var(--openbelt-color-primary)
    );
    --toast-ghost-hover: color-mix(in srgb, var(--openbelt-color-on-primary) 10%, transparent);
    --toast-success: color-mix(
      in srgb,
      var(--openbelt-color-success) 74%,
      var(--openbelt-color-on-primary)
    );
    --toast-error: color-mix(
      in srgb,
      var(--openbelt-color-error) 74%,
      var(--openbelt-color-on-primary)
    );
    --toast-warning: color-mix(
      in srgb,
      var(--openbelt-color-warning) 74%,
      var(--openbelt-color-on-primary)
    );
    box-shadow:
      0 2px 6px rgb(0 0 0 / 0.16),
      0 16px 38px rgb(0 0 0 / 0.28);
  }
}

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

.toast[hidden] {
  display: none;
}

/* One toast at a time: an active ask dialog takes precedence over status toasts, and a device ask over all others. */
body:has(> .device-ask:not([hidden])) > .toast:not(.device-ask) {
  display: none;
}

body:has(> .toast[role="dialog"]:not([hidden])) > .toast:not([role="dialog"]) {
  display: none;
}

.toast:has(> .toast-icon) {
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: var(--openbelt-space-xs);
}

.toast:has(> .toast-logo),
.toast:has(> .app-tile) {
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: var(--openbelt-space-sm);
}

.toast:has(> .toast-icon, > .toast-logo, > .app-tile) > * {
  grid-column: 2;
}

.toast > .toast-icon,
.toast > .toast-logo,
.toast > .app-tile {
  grid-column: 1;
  grid-row: 1;
}

.toast:has(> .toast-detail) > .app-tile,
.toast:has(> .toast-detail) > .toast-logo {
  grid-row: 1 / span 2;
  align-self: start;
}

.toast-icon {
  align-self: center;
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--openbelt-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--toast-muted);
}

.toast-success > .toast-icon {
  color: var(--toast-success);
}

.toast-error > .toast-icon {
  color: var(--toast-error);
}

.toast-warning > .toast-icon {
  color: var(--toast-warning);
}

.toast-logo,
.toast-logo svg,
.toast-logo img {
  display: block;
  width: 32px;
  height: 32px;
}

.toast-logo svg,
.toast-logo img {
  border-radius: var(--openbelt-tile-radius);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--toast-fg) 14%, transparent);
}

.toast > .app-tile {
  --size: 32px;
}

.toast:has(> .toast-logo):not(:has(> .toast-detail)) > .toast-title,
.toast:has(> .app-tile):not(:has(> .toast-detail)) > .toast-title {
  min-height: 32px;
  display: flex;
  align-items: center;
}

.toast-brand {
  color: var(--toast-muted);
  margin-bottom: var(--openbelt-space-2xs);
}

.toast-brand svg {
  display: block;
  width: auto;
  height: calc(14px * 1.033475);
}

.toast-title {
  margin: 0;
  font: 600 15px / 1.3 var(--openbelt-font-display);
  letter-spacing: var(--openbelt-tracking-h5);
  overflow-wrap: anywhere;
}

.toast-detail {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  color: var(--toast-muted);
  font: var(--openbelt-type-body-sm);
}

.toast-detail .icon {
  flex: none;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--openbelt-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--openbelt-space-sm);
}

.toast-actions[hidden] {
  display: none;
}

.toast-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: min(460px, calc(100vw - 2 * var(--openbelt-space-sm)));
  min-height: 42px;
  padding: 6px 8px 6px 14px;
  border-radius: var(--openbelt-radius-full);
}

.toast-status:not(:has(> .toast-actions:not([hidden]), > .toast-close:not([hidden]))) {
  padding-right: var(--openbelt-space-md);
}

.toast-status > .toast-title {
  min-width: 0;
  font: var(--openbelt-type-label);
  letter-spacing: normal;
  line-height: 1.35;
}

.toast-status > .toast-actions {
  margin: 0 0 0 6px;
  gap: var(--openbelt-space-2xs);
  flex: none;
}

.toast .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 var(--openbelt-space-sm);
  border: 1px solid transparent;
  border-radius: var(--openbelt-radius-full);
  box-shadow: none;
  font: var(--openbelt-type-label);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    color var(--openbelt-duration) var(--openbelt-ease),
    opacity var(--openbelt-duration) var(--openbelt-ease),
    transform var(--openbelt-duration) var(--openbelt-ease);
}

.toast .btn[hidden] {
  display: none;
}

.toast .btn:active {
  transform: translateY(1px);
}

.toast .btn:focus-visible,
.toast-close:focus-visible {
  outline: 2px solid var(--toast-fg);
  outline-offset: 2px;
}

.toast .btn-primary {
  background: var(--toast-action);
  color: var(--toast-on-action);
}

.toast .btn-primary:hover {
  background: var(--toast-action-hover);
}

.toast .btn-ghost {
  background: transparent;
  color: var(--toast-muted);
}

.toast .btn-ghost:hover {
  background: var(--toast-ghost-hover);
  color: var(--toast-fg);
}

.toast-close {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: var(--openbelt-radius-full);
  background: transparent;
  color: var(--toast-muted);
  cursor: pointer;
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    color var(--openbelt-duration) var(--openbelt-ease);
}

.toast-close[hidden] {
  display: none;
}

.toast-close:hover {
  background: var(--toast-ghost-hover);
  color: var(--toast-fg);
}

.toast-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--openbelt-icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Waiting on an answer: dimmed, and nothing else takes a click. */
.toast .btn:disabled,
.toast .btn[aria-busy="true"] {
  cursor: progress;
}

.toast .btn[aria-busy="true"] {
  opacity: 0.6;
}

@media (max-width: 820px), (pointer: coarse) {
  .toast .btn {
    height: 36px;
  }
}

@media (max-width: 560px) {
  .toast {
    left: var(--openbelt-space-sm);
    right: var(--openbelt-space-sm);
    bottom: calc(var(--openbelt-space-sm) + env(safe-area-inset-bottom));
    width: auto;
    transform: none;
  }

  .toast:not(.toast-status) > .toast-actions {
    grid-column: 1 / -1;
  }

  .toast:not(.toast-status) > .toast-actions > .btn {
    flex: 1;
  }

  .toast-status {
    left: var(--openbelt-space-sm);
    right: var(--openbelt-space-sm);
    margin-inline: auto;
    width: fit-content;
    max-width: calc(100vw - 2 * var(--openbelt-space-sm));
    transform: none;
  }
}
/* toast: end */

/* A menu: what floats from the button that opens it (aria-haspopup="menu", aria-expanded), with
   .overlay. role="menu"; items are role="menuitem" links or buttons. A choice (.menu-choice) is a
   row like an item (its icon and label in the same place) with its options at the end,
   role="menuitemradio" with aria-checked: bare icons, the chosen one on subtle. No lines between
   rows; .menu-sep is for a menu long enough to need groups.
   <div class="menu overlay" role="menu"><a class="menu-item" role="menuitem">…</a>
   <div class="menu-choice" role="group"><span class="label">icon, label</span><span class="options">…</span></div></div> */
.menu {
  display: grid;
  gap: 1px;
  min-width: 200px;
  padding: var(--openbelt-space-2xs);
  background: var(--openbelt-color-neutral);
  border-radius: var(--openbelt-radius-sm);
  clip-path: var(--openbelt-squircle-sm);
}

.menu[hidden] {
  display: none;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  height: var(--openbelt-control-height);
  padding: 0 var(--openbelt-space-xs);
  border-radius: calc(var(--openbelt-radius-sm) - var(--openbelt-space-2xs));
  color: var(--openbelt-color-primary);
  font: var(--openbelt-type-body-md);
  text-align: left;
  text-decoration: none;
  transition: background-color var(--openbelt-duration) var(--openbelt-ease);
}

.menu-item > .icon {
  color: var(--openbelt-color-muted);
}

.menu-item:hover,
.menu-item:focus {
  background: var(--openbelt-color-subtle);
}

.menu-item:active {
  background: var(--openbelt-color-border);
}

.menu-item:focus-visible,
.menu-choice [role="menuitemradio"]:focus-visible {
  outline-offset: -2px;
}

.menu-sep {
  height: 1px;
  margin: var(--openbelt-space-2xs) calc(-1 * var(--openbelt-space-2xs));
  background: var(--openbelt-color-border);
}

.menu-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--openbelt-space-xs);
  height: var(--openbelt-control-height);
  padding: 0 var(--openbelt-space-2xs) 0 var(--openbelt-space-xs);
  color: var(--openbelt-color-primary);
  font: var(--openbelt-type-body-md);
}

.menu-choice .label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-choice .label > .icon {
  color: var(--openbelt-color-muted);
}

.menu-choice .options {
  display: inline-flex;
  gap: 2px;
}

.menu-choice [role="menuitemradio"] {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: calc(var(--openbelt-radius-sm) - var(--openbelt-space-2xs));
  color: var(--openbelt-color-muted);
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    color var(--openbelt-duration) var(--openbelt-ease);
}

.menu-choice [role="menuitemradio"]:hover {
  color: var(--openbelt-color-primary);
  background: var(--openbelt-color-subtle);
}

.menu-choice [role="menuitemradio"]:active {
  background: var(--openbelt-color-border);
}

.menu-choice [role="menuitemradio"][aria-checked="true"] {
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
}

.menu-choice [role="menuitemradio"] .icon {
  width: 14px;
  height: 14px;
  vertical-align: 0;
}

/* Status: colour plus an icon or a label, never colour alone. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--openbelt-space-2xs);
  height: 20px;
  padding: 0 var(--openbelt-space-xs);
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: var(--openbelt-radius-full);
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-sm);
  font-weight: 550;
  white-space: nowrap;
}

.badge .icon {
  width: 12px;
  height: 12px;
  vertical-align: 0;
}

.badge-success {
  color: var(--openbelt-color-success);
}

.badge-warning {
  color: var(--openbelt-color-warning);
}

.badge-error {
  color: var(--openbelt-color-error);
}

/* Keys and code. A key is in "OpenBelt Keys", JetBrains Mono with the ⌘ the brand's subset drops (the platform serves it,
   palette.ts), else the mono font. JetBrains Mono draws ⌘ at x-height: <span class="cmd">⌘</span>K sets it as tall as
   the K, on its baseline, lighter so its stroke matches. */
.kbd {
  display: inline-block;
  padding: 0 5px;
  border-radius: calc(var(--openbelt-radius-sm) * 0.6);
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-muted);
  font:
    400 12px/1.5 "OpenBelt Keys",
    var(--openbelt-font-mono);
}

.kbd .cmd {
  margin-right: 0.06em;
  font-size: 1.28em;
  font-weight: 250;
  line-height: 0;
}

.code {
  margin: 0;
  padding: var(--openbelt-space-sm) var(--openbelt-space-md);
  overflow: auto;
  background: var(--openbelt-color-surface);
  border: 1px solid var(--openbelt-color-border);
  border-radius: var(--openbelt-radius-sm);
  font: var(--openbelt-type-mono-md);
  white-space: pre;
}

.code .prompt,
.code .comment {
  color: var(--openbelt-color-muted);
  user-select: none;
}

.code .ok {
  color: var(--openbelt-color-success);
}

/* Small type helpers. */
.eyebrow {
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-mono-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--openbelt-color-muted);
}

.type-display {
  font: var(--openbelt-type-display);
  letter-spacing: var(--openbelt-tracking-display);
}

.type-body-lg {
  font: var(--openbelt-type-body-lg);
}

/* Empty states: centred, quiet. A small picture, what's missing in one line, what to do in one
   more, then one action. <div class="empty"><div class="art">…</div><b>No apps yet</b>
   <p>Ask an agent to build one.</p><button class="btn btn-secondary">…</button></div> */
.empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--openbelt-space-2xs);
  padding: var(--openbelt-space-4xl) var(--openbelt-space-md);
  color: var(--openbelt-color-muted);
  text-align: center;
}

.empty > b {
  color: var(--openbelt-color-primary);
  font-weight: 550;
}

.empty > p {
  max-width: 36ch;
}

.empty > .art {
  margin-bottom: var(--openbelt-space-md);
}

.empty > .btn {
  margin-top: var(--openbelt-space-md);
}

.empty .icon {
  width: 20px;
  height: 20px;
}

.empty .btn .icon {
  width: 16px;
  height: 16px;
}

/* Where a page's list would be and it has nothing (.empty.boxed), or a search matches nothing
   (.empty.boxed.compact: no picture, less room): a filled card right under the page's header. */
.empty.boxed {
  padding: var(--openbelt-space-3xl) var(--openbelt-space-md);
  border-radius: var(--openbelt-radius-lg);
  clip-path: var(--openbelt-squircle-lg);
  background: var(--openbelt-color-surface);
}

.empty.boxed.compact {
  padding: var(--openbelt-space-2xl) var(--openbelt-space-md);
}

@media (max-width: 820px) {
  .empty.boxed {
    padding: var(--openbelt-space-2xl) var(--openbelt-space-md);
  }
}

/* A section with nothing in it: one filled row where its list would be, saying "No … yet", with
   at most one action at its end. <div class="empty-row">No API tokens yet<a class="btn btn-secondary">…</a></div> */
.empty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--openbelt-space-sm);
  min-height: var(--openbelt-control-height);
  padding: var(--openbelt-space-sm) var(--openbelt-space-md);
  border-radius: var(--openbelt-radius-md);
  clip-path: var(--openbelt-squircle-md);
  background: var(--openbelt-color-surface);
  color: var(--openbelt-color-muted);
}

/* An empty state's picture: three tiles fanned like a stack of cards, the front one on the page's
   tone with a stronger edge, holding
   what the page is about (an icon, or a page's own small drawing).
   <div class="art tiles" aria-hidden="true"><i></i><i></i><i><svg class="icon">…</svg></i></div> */
.tiles {
  position: relative;
  width: 112px;
  height: 80px;
}

.tiles > i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--openbelt-color-border);
  border-radius: var(--openbelt-radius-md);
  background: var(--openbelt-color-surface);
}

.tiles > i:nth-child(1) {
  transform: translate(-14px, 4px) rotate(-9deg);
}

.tiles > i:nth-child(2) {
  transform: translate(14px, -2px) rotate(7deg);
  background: var(--openbelt-color-subtle);
}

.tiles > i:nth-child(3) {
  display: grid;
  place-items: center;
  border-color: var(--openbelt-color-border-strong);
  background: var(--openbelt-color-neutral);
  color: var(--openbelt-color-muted);
}

.empty .tiles > i:nth-child(3) > .icon {
  width: 28px;
  height: 28px;
}

/* On a phone, everything a thumb taps is the control height (44px). */
@media (max-width: 820px), (pointer: coarse) {
  .menu-choice [role="menuitemradio"],
  .copy-field .btn {
    width: var(--openbelt-control-height);
    height: var(--openbelt-control-height);
  }

  .btn-lg {
    height: var(--openbelt-control-height);
  }

  .menu-choice [role="menuitemradio"] .icon {
    width: 16px;
    height: 16px;
  }

  .copy-field {
    align-items: center;
  }
}

.workspace-opening:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--openbelt-space-lg);
  background: var(--openbelt-color-neutral);
}

.workspace-opening-mark {
  display: grid;
  place-items: center;
  width: var(--openbelt-space-2xl);
  height: var(--openbelt-space-2xl);
  color: var(--openbelt-color-primary);
}

.workspace-opening-mark svg {
  width: var(--openbelt-space-xl);
  height: var(--openbelt-space-xl);
}

.workspace-opening-progress {
  width: var(--openbelt-space-5xl);
  height: var(--openbelt-space-2xs);
  overflow: hidden;
  border-radius: var(--openbelt-radius-full);
  background: var(--openbelt-color-border);
}

.workspace-opening-progress::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--openbelt-color-muted);
  transform-origin: left;
  transform: scaleX(0);
  animation: workspace-opening 12s linear 80ms both;
}

@keyframes workspace-opening {
  from {
    transform: scaleX(0);
    animation-timing-function: ease-out;
  }
  4.167% {
    transform: scaleX(0.7);
  }
  25% {
    transform: scaleX(0.9);
  }
  to {
    transform: scaleX(0.95);
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-opening-progress::after {
    animation: none;
    transform: scaleX(0.65);
    width: 100%;
    opacity: 0.5;
  }
}

/* ---- The store's pieces (the gallery, an app's page, the app panel). ---- */

/* An app's icon: its Lucide icon (openbelt.json "icon") or first letter on its colour, lit from above, the logo's corner. Size
   from --size. <span class="app-tile" style="--tile: <colour>"><svg class="icon">…</svg></span>, or S for the letter */
.app-tile {
  --size: 40px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: var(--openbelt-tile-radius);
  background: var(--tile, var(--openbelt-color-muted));
  background: linear-gradient(
    oklch(from var(--tile, var(--openbelt-color-muted)) calc(l + 0.07) c h),
    oklch(from var(--tile, var(--openbelt-color-muted)) calc(l - 0.08) c h)
  );
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.28),
    inset 0 0 0 0.5px light-dark(rgb(0 0 0 / 0.08), rgb(255 255 255 / 0.12)),
    0 1px 2px light-dark(rgb(0 0 0 / 0.14), rgb(0 0 0 / 0.5));
  color: var(--openbelt-color-on-primary);
  /* Black or white, whichever reads on the tile's own colour (at least 4.5:1 either side of the cut). */
  color: oklch(from var(--tile, var(--openbelt-color-muted)) clamp(0, (0.6 - l) * 1000, 1) 0 0);
  font: 650 calc(var(--size) * 0.44) / 1 var(--openbelt-font-display);
  text-transform: uppercase;
  overflow: hidden;
}

/* An icon is a graphic, so 3:1 is enough: white stays on mid colours (orange, blue) that a letter would need black on, and on
   light ones (yellow, lime) the icon is a deep shade of the tile's own hue rather than black. */
.app-tile:has(> .icon) {
  color: oklch(
    from var(--tile, var(--openbelt-color-muted)) clamp(0.27, (0.72 - l) * 1000, 1)
      calc(clamp(0, (l - 0.72) * 1000, 1) * 0.07) h
  );
}

.app-tile > .icon {
  width: 54%;
  height: 54%;
  stroke-width: 2;
  vertical-align: 0;
}

.app-tile > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The few places at the top of a page: pills, the current one filled.
   <nav class="pills"><a href="/" aria-current="page">Today</a><a href="/apps">Apps</a></nav> */
.pills {
  display: flex;
  gap: 2px;
}

.pills > a,
.pills > button {
  display: inline-flex;
  align-items: center;
  height: var(--openbelt-control-height);
  padding: 0 var(--openbelt-space-sm);
  border: 0;
  border-radius: var(--openbelt-radius-full);
  background: transparent;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-label);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    color var(--openbelt-duration) var(--openbelt-ease);
}

.pills > :hover {
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
}

.pills > [aria-current],
.pills > [aria-pressed="true"] {
  background: var(--openbelt-color-sidebar-selected);
  color: var(--openbelt-color-primary);
}

/* On a phone the same places sit along the bottom, above the home indicator. No line on top: while there is page under
   the bar (data-below on the root), it fades out into the bar instead.
   <nav class="tabbar"><a href="/" aria-current="page"><svg class="icon">…</svg>Today</a>…</nav> */
.tabbar {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  display: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  padding: var(--openbelt-space-2xs) 0 max(var(--openbelt-space-xs), env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--openbelt-color-neutral) 94%, transparent);
  backdrop-filter: blur(14px);
}

.tabbar::before {
  content: "";
  position: absolute;
  inset: auto 0 100%;
  height: 32px;
  background: linear-gradient(transparent, var(--openbelt-color-neutral));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--openbelt-duration) var(--openbelt-ease);
}

:root[data-below] .tabbar::before {
  opacity: 1;
}

.tabbar > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-sm);
  font-weight: 550;
  text-decoration: none;
}

.tabbar > a[aria-current] {
  color: var(--openbelt-color-primary);
}

.tabbar .icon {
  width: 22px;
  height: 22px;
}

@media (max-width: 820px) {
  .tabbar {
    display: grid;
  }
}

/* Views of one thing: text with a line under the current one.
   <nav class="tabs"><a href="…" aria-current="page">People <span class="count">4</span></a>…</nav> */
.tabs {
  display: flex;
  gap: var(--openbelt-space-2xs);
  border-bottom: 1px solid var(--openbelt-color-border);
}

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 var(--openbelt-space-sm);
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-label);
  text-decoration: none;
  transition:
    color var(--openbelt-duration) var(--openbelt-ease),
    border-color var(--openbelt-duration) var(--openbelt-ease);
}

.tabs a:hover {
  color: var(--openbelt-color-primary);
}

.tabs a:active {
  transform: translateY(1px);
}

.tabs a[aria-current="page"] {
  color: var(--openbelt-color-primary);
  border-bottom-color: var(--openbelt-color-primary);
}

.tabs .count {
  font-weight: 400;
}

/* Filters, one or more on: <div class="chips"><button aria-pressed="true">All 32</button>…</div> */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--openbelt-space-xs);
}

.chips > button,
.chips > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--openbelt-control-height);
  padding: 0 var(--openbelt-space-sm);
  border: 0;
  border-radius: var(--openbelt-radius-full);
  background: transparent;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-label);
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    color var(--openbelt-duration) var(--openbelt-ease);
}

.chips > :hover {
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
}

.chips > :active {
  transform: translateY(1px);
}

.chips > [aria-pressed="true"],
.chips > [aria-current] {
  background: var(--openbelt-color-sidebar-selected);
  color: var(--openbelt-color-primary);
}

/* A person: their initials on their tint (the page sets --hue with tintStyle, colors.ts, and draws AVATAR_CSS),
   or their picture. Size from --size; .avatar-sm 22px, .avatar-lg 40px. Several overlap in .avatar-stack. */
.avatar {
  --size: 28px;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: var(--openbelt-radius-full);
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
  font: 600 calc(var(--size) * 0.4) / 1 var(--openbelt-font-body);
  text-transform: uppercase;
  overflow: hidden;
}

.avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  --size: 22px;
}

.avatar-lg {
  --size: 40px;
}

.avatar-stack {
  display: inline-flex;
}

.avatar-stack > .avatar + .avatar {
  margin-left: -6px;
  box-shadow: 0 0 0 2px var(--openbelt-color-neutral);
}

/* On or off, at once: <button class="switch" role="switch" aria-checked="true" aria-label="…"></button> */
.switch {
  position: relative;
  flex: none;
  width: 38px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: var(--openbelt-radius-full);
  background: var(--openbelt-color-border-strong);
  cursor: pointer;
  transition: background-color var(--openbelt-duration) var(--openbelt-ease);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: var(--openbelt-radius-full);
  background: light-dark(var(--openbelt-color-neutral), var(--openbelt-color-primary));
  transition: left var(--openbelt-duration) var(--openbelt-ease);
}

.switch[aria-checked="true"] {
  background: light-dark(
    var(--openbelt-color-success),
    color-mix(in oklab, var(--openbelt-color-success) 45%, var(--openbelt-color-border-strong))
  );
}

.switch[aria-checked="true"]::after {
  left: 19px;
}

.switch:hover {
  filter: brightness(1.08);
}

.switch:disabled {
  cursor: default;
}

/* A segmented control of words (Private, Workspace, Public): <div class="seg" role="group" aria-label="…">
   <button aria-pressed="true">Workspace</button>…</div>. With .btn buttons it holds icons instead; its segments
   can be links (<a aria-current="true">) when each is a page, or radios in a form (<div class="seg" role="radiogroup">
   <label><input type="radio" name="n" value="v">Word</label>…</div>). */
.seg > button:not(.btn),
.seg > a,
.seg > label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-decoration: none;
  height: calc(var(--openbelt-control-height) - 6px);
  padding: 0 var(--openbelt-space-sm);
  border: 0;
  border-radius: var(--openbelt-radius-full);
  background: transparent;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-label);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--openbelt-duration) var(--openbelt-ease),
    color var(--openbelt-duration) var(--openbelt-ease);
}

.seg > button:not(.btn):hover,
.seg > a:hover,
.seg > label:hover {
  color: var(--openbelt-color-primary);
}

.seg > button:not(.btn)[aria-pressed="true"],
.seg > a[aria-current],
.seg > label:has(input:checked) {
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
}

.seg > label {
  position: relative;
}

.seg > label > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg > label:has(input:focus-visible) {
  outline: 2px solid var(--openbelt-color-primary);
  outline-offset: -2px;
}

/* Rows with the same fields: <table class="table"><thead>…</thead><tbody>…</tbody></table> */
.table {
  width: 100%;
  border-collapse: collapse;
  font: var(--openbelt-type-body-md);
}

.table th {
  padding: 0 var(--openbelt-space-sm) var(--openbelt-space-xs);
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-label);
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: var(--openbelt-space-sm);
  border-top: 1px solid var(--openbelt-color-border);
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color var(--openbelt-duration) var(--openbelt-ease);
}

.table tbody tr:hover {
  background: var(--openbelt-color-surface);
}

/* A few numbers side by side: <div class="stats"><div><span class="k">People</span><b class="v">12</b>
   <span class="d">this week</span></div>…</div> */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  padding: var(--openbelt-space-sm) 0;
  border-top: 1px solid var(--openbelt-color-border);
  border-bottom: 1px solid var(--openbelt-color-border);
}

.stats > div {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 2px;
  min-width: 0;
  padding: var(--openbelt-space-2xs) var(--openbelt-space-sm);
  text-align: center;
}

.stats > div + div {
  border-left: 1px solid var(--openbelt-color-border);
}

.stats .k {
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-label);
}

.stats .v {
  font: var(--openbelt-type-h4);
  letter-spacing: var(--openbelt-tracking-h4);
  font-variant-numeric: tabular-nums;
}

.stats .d {
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-sm);
}

/* The store's lead: one app, large, in its colour, its words at the foot.
   <a class="feature-card" style="--tile: <colour>"><h2>…</h2><p>…</p><span class="btn btn-secondary">Open</span></a> */
.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--openbelt-space-xs);
  min-height: 300px;
  padding: var(--openbelt-space-lg);
  border-radius: var(--openbelt-radius-lg);
  clip-path: var(--openbelt-squircle-lg);
  background: var(--tile, var(--openbelt-color-primary));
  color: var(--openbelt-color-on-primary);
  color: oklch(from var(--tile, var(--openbelt-color-primary)) clamp(0, (0.6 - l) * 1000, 1) 0 0);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}

.feature-card h2 {
  font: var(--openbelt-type-h2);
  letter-spacing: var(--openbelt-tracking-h2);
}

.feature-card p {
  max-width: 44ch;
  opacity: 0.88;
}

/* Open on a card is a deep shade of the card's own colour with light text: it sits in the card, never a white
   or black hole in it. */
.feature-card .btn-secondary {
  align-self: flex-start;
  margin-top: var(--openbelt-space-xs);
  background: var(--openbelt-color-action);
  background: oklch(from var(--tile, var(--openbelt-color-primary)) calc(l * 0.62) c h);
  color: var(--openbelt-color-on-action);
  color: oklch(from var(--tile, var(--openbelt-color-primary)) 0.97 calc(c * 0.15) h);
}

.feature-card .btn-secondary:hover {
  background: oklch(from var(--tile, var(--openbelt-color-primary)) calc(l * 0.7) c h);
}

/* Ranked rows: number, tile, name and line, then an action. <a class="rank"><span class="n">1</span>
   <span class="app-tile">…</span><span><b class="t">tasks</b><span class="s">…</span></span><span class="btn btn-secondary">Open</span></a> */
.rank {
  display: grid;
  grid-template-columns: 1.5em auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--openbelt-space-sm);
  padding: var(--openbelt-space-sm) 0;
  color: inherit;
  text-decoration: none;
}

.rank + .rank {
  border-top: 1px solid var(--openbelt-color-border);
}

.rank > .n {
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-h5);
  font-variant-numeric: tabular-nums;
}

.rank .t {
  display: block;
  font-weight: 600;
}

.rank .s {
  display: block;
  overflow: hidden;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards in a row, four across; on a phone the row scrolls sideways. */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * var(--openbelt-space-md)) / 4);
  gap: var(--openbelt-space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.rail > * {
  min-width: 0;
  scroll-snap-align: start;
}

@media (max-width: 820px) {
  .rail {
    grid-auto-columns: 72%;
  }
}

/* A dialog over the page, from the foot on a phone: <dialog class="sheet overlay">…</dialog>, opened with
   showModal(); Escape and the close button close it. */
.sheet {
  width: min(520px, calc(100% - 2 * var(--openbelt-space-md)));
  max-height: calc(100dvh - 2 * var(--openbelt-space-xl));
  padding: var(--openbelt-space-lg);
  border-radius: var(--openbelt-radius-lg);
  clip-path: var(--openbelt-squircle-lg);
  background: var(--openbelt-color-neutral);
  color: var(--openbelt-color-primary);
  overflow: auto;
}

.sheet::backdrop {
  background: rgb(12 11 10 / 0.32);
}

@media (max-width: 820px) {
  .sheet {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: var(--openbelt-radius-lg) var(--openbelt-radius-lg) 0 0;
    padding-bottom: max(var(--openbelt-space-lg), env(safe-area-inset-bottom));
  }
}

/* The question before something goes for good (an app, a connection), from the foot on a phone:
   <dialog class="confirm overlay"><h2>Remove X?</h2><ul><li>What goes with it</li></ul>
   <div class="btns"><button class="btn btn-secondary" data-close>Cancel</button><button class="btn btn-delete">…</button></div></dialog>
   In dark mode the card is lifted off the page, which is the same colour as neutral. */
.confirm {
  width: min(420px, calc(100vw - 2 * var(--openbelt-space-md)));
  margin: auto;
  padding: var(--openbelt-space-lg);
  border-radius: var(--openbelt-radius-lg);
  clip-path: var(--openbelt-squircle-lg);
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
}

.confirm::backdrop {
  background: rgb(0 0 0 / 0.6);
}

:root[data-theme="light"] .confirm {
  background: var(--openbelt-color-neutral);
}

:root[data-theme="light"] .confirm::backdrop {
  background: rgb(12 11 10 / 0.32);
}

@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .confirm {
    background: var(--openbelt-color-neutral);
  }

  :root[data-theme="system"] .confirm::backdrop {
    background: rgb(12 11 10 / 0.32);
  }
}

.confirm h2 {
  font: var(--openbelt-type-h5);
  letter-spacing: var(--openbelt-tracking-h5);
  overflow-wrap: anywhere;
}

.confirm p {
  margin: var(--openbelt-space-2xs) 0 0;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-md);
}

.confirm ul {
  display: grid;
  gap: var(--openbelt-space-2xs);
  margin: var(--openbelt-space-sm) 0 0;
  padding-left: 20px;
  font: var(--openbelt-type-body-md);
}

.confirm li::marker {
  color: var(--openbelt-color-muted);
}

/* Who or what a line means, by name, under it: <li>2 apps use it<small>okrs, lunch</small></li> */
.confirm li > small {
  display: block;
  color: var(--openbelt-color-muted);
  font: var(--openbelt-type-body-sm);
  overflow-wrap: anywhere;
}

.confirm .error {
  color: var(--openbelt-color-error);
}

.confirm .btns {
  display: flex;
  justify-content: flex-end;
  gap: var(--openbelt-space-xs);
  margin-top: var(--openbelt-space-lg);
}

.btn-delete {
  background: var(--openbelt-color-error);
  color: #fff;
}

.btn-delete:hover {
  background: color-mix(in srgb, var(--openbelt-color-error) 86%, #000);
}

.btn-delete:active {
  background: color-mix(in srgb, var(--openbelt-color-error) 76%, #000);
}

.btn-delete .spin {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  corner-shape: round;
  animation: confirm-spin 0.7s linear infinite;
}

.btn-delete[aria-busy="true"] {
  opacity: 0.8;
  pointer-events: none;
}

.btn-delete[aria-busy="true"] .spin {
  display: inline-block;
}

.btn-delete[aria-busy="true"] .icon {
  display: none;
}

@keyframes confirm-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .confirm {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    padding: var(--openbelt-space-lg) var(--openbelt-space-md)
      calc(var(--openbelt-space-md) + env(safe-area-inset-bottom));
    border-radius: var(--openbelt-radius-lg) var(--openbelt-radius-lg) 0 0;
  }

  /* Side by side, Cancel first: a thumb aiming at one never lands on the other. */
  .confirm .btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--openbelt-space-sm);
  }

  .confirm .btns .btn {
    height: 48px;
    font-size: 16px;
  }
}

/* A line across the top of a view about its state (read only, a preview): icon, words, an action.
   <div class="banner"><svg class="icon">…</svg><span class="l">…</span><button class="btn btn-secondary">…</button></div> */
.banner {
  display: flex;
  align-items: center;
  gap: var(--openbelt-space-xs);
  min-height: 44px;
  padding: var(--openbelt-space-2xs) var(--openbelt-space-xs) var(--openbelt-space-2xs)
    var(--openbelt-space-md);
  background: var(--openbelt-color-subtle);
  color: var(--openbelt-color-primary);
  font: var(--openbelt-type-body-sm);
}

.banner > .l {
  flex: 1;
  min-width: 0;
}

/* A switch's tap target reaches 44px around it, without moving anything. */
.switch::before {
  content: "";
  position: absolute;
  inset: -11px -3px;
}

/* Corners are squircles where the browser draws them (base.css). These stay round: tags, people, toggles, dots.
   A page's own round thing (a status dot, a step's number) takes .round. */
.badge,
.avatar,
.switch,
.switch::after,
.choices input,
.choices input::before,
.round {
  corner-shape: round;
}

/* Safari and Firefox don't draw corner-shape yet, so there squircles are drawn as clips: each corner one cubic, its
   control points 9.09% of the corner in (where it meets the true squircle at its midpoint), at the radius Chrome draws
   (base.css: 10, 16, 20px).
   - A rounded box that is filled and has no line or shadow takes clip-path: var(--openbelt-squircle-sm|md|lg) beside its
     radius; bun run brand check asks for it. Elsewhere the variable is unset, so the clip is none.
   - A capsule is --openbelt-squircle-capsule, a mask: two long caps, each squircle at one end and sized to the height,
     kept where both cover. It needs border-radius: 0 under it (or the round corner shows through), under
     :not(:focus-visible).
   - Boxes with a line or a shadow (.overlay, cards, .seg) stay round: a clip cuts the line and the shadow.
   - A clip also cuts a focus ring, so a focused box, and one whose child is focused, keeps its round corner.
   Delete these blocks once Safari ships corner-shape. */
@supports not (corner-shape: squircle) {
  :root {
    --openbelt-squircle-sm: shape(
      from 0 min(10px, 50%),
      curve to min(10px, 50%) 0 with 0 calc(min(10px, 50%) * 0.0909) / calc(min(10px, 50%) * 0.0909)
        0,
      hline to calc(100% - min(10px, 50%)),
      curve to 100% min(10px, 50%) with calc(100% - calc(min(10px, 50%) * 0.0909)) 0 / 100%
        calc(min(10px, 50%) * 0.0909),
      vline to calc(100% - min(10px, 50%)),
      curve to calc(100% - min(10px, 50%)) 100% with 100% calc(100% - calc(min(10px, 50%) * 0.0909))
        / calc(100% - calc(min(10px, 50%) * 0.0909)) 100%,
      hline to min(10px, 50%),
      curve to 0 calc(100% - min(10px, 50%)) with calc(min(10px, 50%) * 0.0909) 100% / 0
        calc(100% - calc(min(10px, 50%) * 0.0909)),
      close
    );
    --openbelt-squircle-md: shape(
      from 0 min(16px, 50%),
      curve to min(16px, 50%) 0 with 0 calc(min(16px, 50%) * 0.0909) / calc(min(16px, 50%) * 0.0909)
        0,
      hline to calc(100% - min(16px, 50%)),
      curve to 100% min(16px, 50%) with calc(100% - calc(min(16px, 50%) * 0.0909)) 0 / 100%
        calc(min(16px, 50%) * 0.0909),
      vline to calc(100% - min(16px, 50%)),
      curve to calc(100% - min(16px, 50%)) 100% with 100% calc(100% - calc(min(16px, 50%) * 0.0909))
        / calc(100% - calc(min(16px, 50%) * 0.0909)) 100%,
      hline to min(16px, 50%),
      curve to 0 calc(100% - min(16px, 50%)) with calc(min(16px, 50%) * 0.0909) 100% / 0
        calc(100% - calc(min(16px, 50%) * 0.0909)),
      close
    );
    --openbelt-squircle-lg: shape(
      from 0 min(20px, 50%),
      curve to min(20px, 50%) 0 with 0 calc(min(20px, 50%) * 0.0909) / calc(min(20px, 50%) * 0.0909)
        0,
      hline to calc(100% - min(20px, 50%)),
      curve to 100% min(20px, 50%) with calc(100% - calc(min(20px, 50%) * 0.0909)) 0 / 100%
        calc(min(20px, 50%) * 0.0909),
      vline to calc(100% - min(20px, 50%)),
      curve to calc(100% - min(20px, 50%)) 100% with 100% calc(100% - calc(min(20px, 50%) * 0.0909))
        / calc(100% - calc(min(20px, 50%) * 0.0909)) 100%,
      hline to min(20px, 50%),
      curve to 0 calc(100% - min(20px, 50%)) with calc(min(20px, 50%) * 0.0909) 100% / 0
        calc(100% - calc(min(20px, 50%) * 0.0909)),
      close
    );
    --openbelt-squircle-capsule:
      url("data:image/svg+xml,%3Csvg xmlns='http:/www.w3.org/2000/svg' width='8000' height='40' viewBox='0 0 8000 40'%3E%3Cpath d='M0 20C0 1.82 1.82 0 20 0H8000V40H20C1.82 40 0 38.18 0 20Z'/%3E%3C/svg%3E")
        left center / auto 100% no-repeat intersect,
      url("data:image/svg+xml,%3Csvg xmlns='http:/www.w3.org/2000/svg' width='8000' height='40' viewBox='0 0 8000 40'%3E%3Cpath d='M7980 0C7998.18 0 8000 1.82 8000 20C8000 38.18 7998.18 40 7980 40H0V0Z'/%3E%3C/svg%3E")
        right center / auto 100% no-repeat;
  }

  .overlay,
  :focus-visible,
  :has(> :focus-visible),
  .otp-slot[data-active="true"],
  .otp-slot[data-filled="true"],
  .otp-slot[data-selected="true"] {
    --openbelt-squircle-sm: none;
    --openbelt-squircle-md: none;
    --openbelt-squircle-lg: none;
  }

  :is(.btn, .pills > button, .chips > a):not(.round, :focus-visible) {
    border-radius: 0;
    mask: var(--openbelt-squircle-capsule);
  }
}

/* generated by bun run brand sync from scripts/brand-logo.ts */
.logo,
.brand-logo {
  --logo-size: 16px;
  display: inline-block;
  flex: none;
  height: calc(var(--logo-size) * 1.033475);
  margin-bottom: calc(var(--logo-size) * -0.033475000000000005);
  aspect-ratio: 5729.975 / 1033.475;
}
.brand-logo {
  display: block;
  width: auto;
}
.logo {
  --logo-size: 24px;
  background-color: currentColor;
  -webkit-mask: url("../logo/openbelt.svg") no-repeat center / contain;
  mask: url("../logo/openbelt.svg") no-repeat center / contain;
  text-decoration: none;
}
