/* web/public/ds.css — the Source head's design system, in CSS.
 *
 * The native head is bin/*.swift; this is the same look for a phone. Every
 * colour here comes from /tokens.css — generated by the service from
 * brand/tokens.json (the ONE palette) plus the Swift DS layer, precomputed —
 * or is a native per-element alpha of one of those tokens, written the way
 * the Swift writes it:
 *
 *   c.withAlphaComponent(a)  → color-mix(in srgb, c a%, transparent)
 *
 * (withAlphaComponent REPLACES alpha, so steel@.5 is steel at .5, not dim at
 * .5.) No hex is re-decided here: a copied hex is how three palettes happened
 * before (brand/tokens.json explains). Change the brand file and this follows.
 *
 * "Flat void, always": no blur, no drop shadows, no ambient gradients. The one
 * glow is the Overview status dot (overlay.swift:286). Dark only — the native
 * app never sets an appearance, and FormSheet forces darkAqua.
 */

:root {
  color-scheme: dark;

  /* ── DS semantic layer (hypertra-ui.swift:39-64) ─────────────────────────
     /tokens.css carries it, precomputed from tokens.json by the service
     (web/lib/tokensCss.js) as --ds-*; these are the short names this sheet
     uses for them. Nothing here is a colour of its own. */
  --bg: var(--ds-bg);
  --bg2: var(--ds-bg2);
  --bg3: var(--ds-bg3);
  --card: var(--ds-card);
  --text: var(--ds-text);
  --text2: var(--ds-text2);              /* HT.muted */
  --text3: var(--ds-text3);              /* HT.dim = steel @ .72 */
  --green: var(--ds-green);              /* dark(mint, .52) */
  --green-ink: var(--ds-green-ink);
  --blue-fill: var(--ds-blue);           /* dark(cyan, .45) — DS.blue; --blue is the raw selection blue */
  --blue-ink: var(--ds-blue-ink);
  --amber-fill: var(--ds-amber);         /* dark(amber, .35) */
  --amber-ink: var(--ds-amber-ink);
  --violet-fill: var(--ds-violet);       /* dark(violet, .5) — the vault's colour */
  --violet-ink: var(--ds-violet-ink);
  --red-ink: var(--ds-red-ink);          /* lite(red, .28) */
  --lift: var(--ds-lift);
  --lift-hover: var(--ds-lift-hover);
  --lift2: var(--ds-lift2);
  --border2: var(--ds-border2);
  --input-fill: var(--ds-input-fill);
  --input-edge: var(--ds-input-edge);
  --glass: var(--ds-glass);
  --grad-a: var(--ds-grad-a);            /* dark(cyan, .58) */
  --grad-b: var(--ds-grad-b);            /* dark(violet, .52) */
  --r-row: var(--ds-r-row);
  --r-btn: var(--ds-r-btn);
  --r-input: var(--ds-r-input);
  /* --stroke, --stroke-soft (HT), --font-ui and --font-mono (the native app's
     real fonts: SF, and JetBrains Mono → Menlo — not tokens.json's Chakra
     Petch / Space Mono, which the head never uses) come from /tokens.css too. */

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

/* ── base ───────────────────────────────────────────────────────────────── */

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--void);
  color: var(--text);
  font: 13px/1.35 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

#root { height: 100%; }
button, input { font: inherit; color: inherit; margin: 0; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--soft) 60%, transparent);
  outline-offset: 2px;
}

.mono { font-family: var(--font-mono); }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Colour marks state (hypertra-ui.swift:26-27): brand colour for a dot or a
   bar, its -ink variant when it is text. */
.tone-mint { color: var(--mint); }
.tone-amber { color: var(--amber); }
.tone-red { color: var(--red); }
.tone-soft { color: var(--soft); }
.tone-violet { color: var(--violet); }
.tone-text { color: var(--text); }
.tone-muted { color: var(--text2); }
.tone-dim { color: var(--text3); }
.tone-red-ink { color: var(--red-ink); }
.tone-amber-ink { color: var(--amber-ink); }
.tone-unknown { color: color-mix(in srgb, var(--steel) 50%, transparent); }

/* ── DSButton (hypertra-ui.swift:117-184) ───────────────────────────────── */

.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  background: none;
  font: 600 13px/1 var(--font-ui);
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.ds-btn--secondary { background: var(--lift); border-color: var(--stroke); }
.ds-btn--secondary:active { background: var(--lift2); }

/* One per surface: the cyan→violet ramp, darkened so white reads on it. */
.ds-btn--primary {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  border-color: rgb(255 255 255 / .16);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.ds-btn--primary:active {
  background: linear-gradient(rgb(255 255 255 / .10), rgb(255 255 255 / .10)),
              linear-gradient(90deg, var(--grad-a), var(--grad-b));
}

.ds-btn--danger {
  background: color-mix(in srgb, var(--red) 7%, transparent);
  border-color: color-mix(in srgb, var(--red) 35%, transparent);
  color: var(--red-ink);
}
.ds-btn--danger:active { background: color-mix(in srgb, var(--red) 18%, transparent); }

.ds-btn--quiet { color: var(--text3); }
.ds-btn--quiet:active { background: var(--lift2); }

/* Disabled LOOKS disabled (dashed edge, faded) and does nothing. */
.ds-btn:disabled,
.ds-btn.is-disabled,
.ds-btn.is-disabled:active {
  background: var(--lift2);
  border: 1px dashed var(--border2);
  color: color-mix(in srgb, var(--steel) 55%, transparent);
  cursor: default;
}

/* Hover only where there is a pointer that hovers: on a phone a tapped button
   would otherwise stay "hovered" until the next tap elsewhere. */
@media (hover: hover) {
  .ds-btn--secondary:hover:not(:disabled):not(.is-disabled) { background: var(--lift-hover); }
  .ds-btn--secondary:hover:active:not(:disabled) { background: var(--lift2); }
  .ds-btn--primary:hover:not(:disabled) {
    background: linear-gradient(rgb(255 255 255 / .05), rgb(255 255 255 / .05)),
                linear-gradient(90deg, var(--grad-a), var(--grad-b));
  }
  .ds-btn--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 12%, transparent); }
  .ds-btn--quiet:hover:not(:disabled) { background: var(--lift2); }
}

/* ── section label, subtitle, empty state ───────────────────────────────── */

/* DS.section: a 7pt mint dot, then mono 10 uppercase, kern 2.5, muted. */
.ds-sec {
  display: block;
  height: 16px;
  margin: 0;
  font: 10px/16px var(--font-mono);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-sec::before {
  content: "●";
  display: inline-block;
  margin-right: 6px;
  font: 7px/1 var(--font-ui);
  letter-spacing: 0;
  color: var(--green-ink);
  vertical-align: 1.5px;
}

.ds-sub {
  margin: 4px 0 0;
  font: 12.5px/18px var(--font-ui);
  color: var(--text3);
}

.ds-empty {
  padding-top: 28px;
  text-align: center;
  font: 13px/18px var(--font-ui);
  color: var(--text3);
}

/* Empty / status lines the native panes set in mono 12 dim. */
.ds-empty-mono {
  padding: 10px 4px;
  font: 12px/18px var(--font-mono);
  color: var(--text3);
}

.ds-status {
  height: 16px;
  font: 11px/16px var(--font-mono);
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "Last updated Ns ago" (§7.10): only once a polled pane's picture has
   stopped moving — amber ink, the native "needs attention" text colour. */
.ds-stale {
  height: 16px;
  font: 11px/16px var(--font-mono);
  color: var(--amber-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds-stale[hidden] { display: none; }

/* ── pill (hypertra-ui.swift:92-106) ────────────────────────────────────── */

.ds-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 9px;
  border-radius: 10px;
  font: 700 10.5px/14px var(--font-ui);
  letter-spacing: .6px;
  white-space: nowrap;
  flex: none;
}
.ds-pill--violet { color: var(--violet-ink); background: color-mix(in srgb, var(--violet-fill) 22%, transparent); }
.ds-pill--plain  { color: var(--text2); background: var(--lift); }
.ds-pill--mint   { color: var(--green-ink); background: color-mix(in srgb, var(--green) 18%, transparent); }
.ds-pill--amber  { color: var(--amber-ink); background: color-mix(in srgb, var(--amber-fill) 18%, transparent); }
.ds-pill--red    { color: var(--red-ink); background: color-mix(in srgb, var(--red) 12%, transparent); }

/* ── status dot ─────────────────────────────────────────────────────────── */

.ds-dot {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.ds-dot--5 { width: 5px; height: 5px; }
.ds-dot--6 { width: 6px; height: 6px; }
.ds-dot--7 { width: 7px; height: 7px; }
/* Hypertra Auth's live dot — the only pulse in the app (authn.swift:130-134). */
.ds-dot--pulse { animation: ds-pulse .8s ease-in-out infinite alternate; }
@keyframes ds-pulse { from { transform: scale(1); } to { transform: scale(1.6); } }

/* ── DSRow (hypertra-ui.swift:446-485) ──────────────────────────────────── */

.ds-list { display: flex; flex-direction: column; gap: 8px; }

/* The whole row is the target: one tap opens the sheet; no EDIT / REMOVE
   capsules side by side where one slip removes what you meant to edit. */
.ds-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 16px 0 18px;
  border-radius: var(--r-row);
  border: 1px solid var(--stroke);
  background: var(--lift);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.ds-row:active { background: var(--lift2); }
@media (hover: hover) {
  .ds-row:hover { background: var(--lift-hover); }
  .ds-row:hover:active { background: var(--lift2); }
}
.ds-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 9px 0; }
.ds-row__title {
  font: 600 14px/19px var(--font-ui);
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-row__title--mono { font: 400 13px/19px var(--font-mono); }
.ds-row__sub {
  font: 12px/16px var(--font-ui);
  color: var(--text3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-row__trail { font: 13px/18px var(--font-ui); color: var(--text3); white-space: nowrap; }
.ds-row__trail--dots { margin-right: 6px; }
.ds-row__chev { font: 300 22px/28px var(--font-ui); color: var(--text3); text-align: left; }

/* ── DSField (hypertra-ui.swift:191-246) ────────────────────────────────── */

.ds-field { display: block; }
.ds-field__label {
  display: block;
  height: 14px;
  margin: 0 2px 6px;
  font: 10px/14px var(--font-mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
}
.ds-field__box {
  display: flex;
  height: 40px;
  border-radius: var(--r-input);
  background: var(--input-fill);
  border: 1px solid var(--input-edge);
}
/* The native field has no focus state at all (focusRingType = .none). A
   browser needs one — a keyboard user must see where they are — so the brand
   focus edge simply brightens. */
.ds-field__box:focus-within { border-color: color-mix(in srgb, var(--soft) 65%, transparent); }
.ds-field__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  font: 14px var(--font-ui);
  color: var(--text);
}
.ds-field__input--mono { font-family: var(--font-mono); }
.ds-field__hint {
  display: block;
  margin: 6px 2px 0;
  font: 11.5px/15px var(--font-ui);
  color: color-mix(in srgb, var(--steel) 80%, transparent);
}

::placeholder { color: color-mix(in srgb, var(--steel) 50%, transparent); opacity: 1; }

/* The inline field Memory and Midst use (memory.swift:685-695). */
.ds-input {
  height: 30px;
  min-width: 0;
  padding: 0 10px;
  border-radius: var(--r-input);
  border: 1px solid var(--input-edge);
  background: var(--input-fill);
  font: 13px var(--font-ui);
  color: var(--text);
  outline: 0;
}
.ds-input:focus { border-color: color-mix(in srgb, var(--soft) 65%, transparent); }

/* ── FormSheet (hypertra-ui.swift:253-439) ──────────────────────────────── */

.ds-scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 16px;
  overflow-y: auto;
  background: rgb(0 0 0 / .45);
}
.ds-sheet {
  width: 460px;
  max-width: 100%;
  padding: 26px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--card);
}
.ds-sheet__head { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 4px; }
.ds-sheet__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font: 600 19px/26px var(--font-ui);
  color: var(--text);
  overflow-wrap: anywhere;
}
/* The explicit way out (§7.9): an installed app has no back button and no
   Esc, and the keyboard can push Cancel below the fold. */
.ds-sheet__close { flex: none; width: 32px; height: 32px; margin: -4px -8px 0 0; padding: 0; font-size: 15px; }
.ds-sheet__sub {
  margin: 0 0 2px;
  font: 12.5px/18px var(--font-ui);
  color: var(--text3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ds-sheet__fields { display: flex; flex-direction: column; gap: 14px; margin: 16px 0 14px; }
.ds-sheet__extras {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.ds-sheet__extras .ds-btn { height: 34px; padding: 0 8px; }
/* ALWAYS reserved, so an error appearing never shoves the buttons out from
   under a thumb (ui.swift:350-357). */
.ds-sheet__msg {
  min-height: 34px;
  margin-bottom: 4px;
  font: 500 12.5px/17px var(--font-ui);
  color: var(--red-ink);
}
.ds-sheet__msg.is-ok { color: var(--green-ink); }
.ds-sheet__primary { width: 100%; height: 44px; }
.ds-sheet__cancel { width: 100%; height: 36px; margin-top: 8px; }
.ds-sheet__rule { height: 1px; margin: 14px 0; background: var(--border2); }
.ds-sheet__danger { width: 100%; height: 36px; }

/* ── Toast (hypertra-ui.swift:494-565) ──────────────────────────────────── */

.ds-toasts {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.ds-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  max-width: calc(100% - 32px);
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: var(--glass);
  font: 500 13px/18px var(--font-ui);
  color: var(--text);
  pointer-events: auto;
}
.ds-toast__text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-toast .ds-btn { flex: none; width: 72px; height: 30px; padding: 0; }

/* ══ the shell (hypertra-control.swift) ═════════════════════════════════ */

.sh { height: 100%; }

.sh-rail { background: var(--scrim); }
.sh-rail__head { position: relative; height: 70px; flex: none; }
.sh-rail__head .ds-mark { position: absolute; left: 16px; top: 18px; }
.sh-word {
  position: absolute;
  left: 56px;
  top: 20px;
  font: 700 13px/16px var(--font-ui);
  letter-spacing: 2.6px;
  color: var(--text);
}
.sh-word2 {
  position: absolute;
  left: 56px;
  top: 36px;
  font: 9px/12px var(--font-mono);
  letter-spacing: 2.2px;
  color: var(--text3);
}

.sh-items { display: flex; flex-direction: column; gap: 2px; padding: 16px 12px 0; }
.sh-item {
  position: relative;
  display: block;
  height: 36px;
  border-radius: 9px;
  color: var(--text2);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.sh-item__icon {
  position: absolute;
  left: 13px;
  top: 0;
  font: 600 12px/36px var(--font-ui);
}
.sh-item__label {
  position: absolute;
  left: 38px;
  top: 0;
  font: 400 13.5px/36px var(--font-ui);
  white-space: nowrap;
}
.sh-item__short { display: none; }
.sh-item.is-on { color: var(--text); }
.sh-item.is-on .sh-item__label { font-weight: 600; }
/* Selected: blue @ .13 fill, radius 9, inset 1 — plus a 2.5 × 20 blue bar
   on the left edge (control.swift:56-60). Selection is the ONLY place blue
   is used. */
.sh-item.is-on::before {
  content: "";
  position: absolute;
  inset: 1px 0;
  border-radius: 9px;
  background: color-mix(in srgb, var(--blue) 13%, transparent);
}
.sh-item.is-on::after {
  content: "";
  position: absolute;
  left: -2px;
  top: 8px;
  width: 2.5px;
  height: 20px;
  border-radius: 1.3px;
  background: var(--blue);
}

.sh-foot { margin-top: auto; padding: 12px; }
.sh-foot .ds-btn { width: 100%; height: 32px; }
.sh-foot__about {
  display: block;
  height: 28px;
  margin-bottom: 4px;
  font: 12px/28px var(--font-ui);
  text-align: center;
  color: var(--text3);
  text-decoration: none;
}

.sh-top { display: none; }
.sh-top__title { font: 600 16px/20px var(--font-ui); color: var(--text); }
.sh-menu {
  position: absolute;
  right: calc(8px + var(--safe-right));
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 160px;
  padding: 6px;
  border-radius: var(--r-btn);
  border: 1px solid var(--stroke);
  background: var(--card);
}
.sh-menu[hidden] { display: none; }
.sh-menu__item {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font: 500 14px/40px var(--font-ui);
  text-align: left;
  color: var(--text);
  text-decoration: none;
}
.sh-menu .ds-btn.sh-menu__item { height: 40px; justify-content: flex-start; color: var(--text); }

.sh-content { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--void); }
.sh-banner {
  flex: none;
  padding: 8px 22px;
  font: 500 12.5px/17px var(--font-ui);
  color: var(--amber-ink);
  background: color-mix(in srgb, var(--amber-fill) 16%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--amber) 22%, transparent);
}
.sh-panes { position: relative; flex: 1; min-height: 0; }

.pane {
  position: absolute;
  inset: 0;
  overflow: auto;
  background: var(--void);
  -webkit-overflow-scrolling: touch;
}

/* Desktop: the native control window — a 212 rail, content on void. */
@media (min-width: 900px) {
  .sh { display: grid; grid-template-columns: 212px minmax(0, 1fr); }
  .sh-rail {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--stroke-soft);
    min-height: 0;
    overflow-y: auto;
  }
}

/* Phone: the rail becomes a bottom bar of the glyphs; the pane title
   moves into a 52 px top bar with the mark. Same components, one column. */
@media (max-width: 899px) {
  .sh-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 10px;
    height: calc(52px + var(--safe-top));
    padding: var(--safe-top) calc(8px + var(--safe-right)) 0 calc(16px + var(--safe-left));
    background: var(--scrim);
    border-bottom: 1px solid var(--stroke-soft);
  }
  .sh-top .sh-top__title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sh-top .ds-btn { height: 32px; padding: 0 10px; }
  .sh-top .sh-top__btn { width: 40px; height: 40px; padding: 0; font: 600 18px/40px var(--font-ui); color: var(--text2); }
  .sh-rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
    border-top: 1px solid var(--stroke-soft);
  }
  .sh-rail__head, .sh-foot { display: none; }
  /* Eight live destinations fit at a 44 pt target from 352 pt up; on a
     narrower phone the bar scrolls sideways rather than shrink a target. */
  .sh-items { flex-direction: row; gap: 0; padding: 0 4px; height: 58px; overflow-x: auto; scrollbar-width: none; }
  .sh-items::-webkit-scrollbar { display: none; }
  .sh-item { flex: 1 0 44px; min-width: 44px; height: 58px; border-radius: 0; }
  .sh-item__icon {
    left: 50%;
    top: 9px;
    transform: translateX(-50%);
    padding: 0 12px;
    border-radius: 12px;
    font: 600 17px/28px var(--font-ui);
  }
  /* The bottom bar's label is the short one ("Auth"), under the selected
     glyph only; the rail's native label is not shown here (§7.9). */
  .sh-item__label { display: none; }
  .sh-item__short {
    position: absolute;
    display: none;
    left: 50%;
    top: 38px;
    transform: translateX(-50%);
    font: 600 10px/14px var(--font-ui);
    white-space: nowrap;
  }
  .sh-item.is-on::before, .sh-item.is-on::after { display: none; }
  .sh-item.is-on .sh-item__icon { background: color-mix(in srgb, var(--blue) 13%, transparent); }
  .sh-item.is-on .sh-item__label { display: none; }
  .sh-item.is-on .sh-item__short { display: block; }
  /* Terminal is off: in the rail on a desktop, not in a phone's bar. */
  .sh-item--rail { display: none; }
  .sh-content {
    position: fixed;
    top: calc(52px + var(--safe-top));
    bottom: calc(58px + var(--safe-bottom));
    left: var(--safe-left);
    right: var(--safe-right);
  }
  .sh-banner { padding: 8px 16px; }
  .ds-toasts { bottom: 12px; }
  /* iOS zooms the page into any input under 16 px. The native sizes (14/13)
     would make every field jump the layout on focus, so a phone gets 16. */
  .ds-field__input, .ds-input { font-size: 16px; }
  .ds-scrim { align-items: flex-end; padding: 0; }
  .ds-sheet {
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 14px 14px 0 0;
    border-bottom: 0;
    padding: 22px calc(20px + var(--safe-right)) calc(20px + var(--safe-bottom)) calc(20px + var(--safe-left));
  }
}

/* ══ sign-in, enrolment, step-up ════════════════════════════════════════ */

.auth {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  background: var(--void);
}
.auth__card { width: 360px; max-width: 100%; }
.auth__brand { position: relative; height: 70px; margin-bottom: 18px; }
.auth__brand .ds-mark { position: absolute; left: 0; top: 18px; }
.auth__brand .sh-word { left: 40px; }
.auth__brand .sh-word2 { left: 40px; }
.auth__title { margin: 0 0 6px; font: 600 19px/26px var(--font-ui); }
.auth__text { margin: 0 0 18px; font: 12.5px/18px var(--font-ui); color: var(--text3); }
.auth__msg { min-height: 34px; margin-bottom: 4px; font: 500 12.5px/17px var(--font-ui); color: var(--red-ink); }
.auth__msg.is-ok { color: var(--green-ink); }
.auth__card .ds-btn--primary { width: 100%; height: 44px; }
.auth__card .ds-btn--quiet { width: 100%; height: 36px; margin-top: 8px; }
.auth__note { margin: 0 0 14px; font: 12px/17px var(--font-ui); color: var(--text2); }
.auth__card .ds-btn + .auth__note { margin: 14px 0 0; }

/* ══ Overview (overlay.swift DashView, control.swift OverviewPane) ══════ */

.ov { display: flex; flex-direction: column; overflow: hidden; }
.ov-head {
  position: relative;
  flex: none;
  height: 75px;
  margin: 0 22px;
  border-bottom: 1px solid var(--stroke-soft);
}
/* The brand ramp, drawn at −90° in a flipped view: soft at the bottom. */
.ov-ramp {
  position: absolute;
  left: 0;
  top: 20px;
  width: 3px;
  height: 30px;
  border-radius: 1.5px;
  background: linear-gradient(to top, var(--soft), var(--violet), var(--mint));
}
.ov-dot {
  position: absolute;
  left: 14px;
  top: 36px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px color-mix(in srgb, currentColor 90%, transparent);
}
.ov-line {
  position: absolute;
  left: 34px;
  right: 168px;
  top: 32px;
  font: 600 19px/24px var(--font-ui);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-ago {
  position: absolute;
  right: 34px;
  top: 20px;
  font: 11px/15px var(--font-mono);
  color: var(--text3);
  white-space: nowrap;
}
/* "Last updated Ns ago" sits under "all checks Ns ago", right-aligned. */
.ov-head .ds-stale { position: absolute; right: 34px; top: 38px; }
.ov-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  column-gap: 20px;
  margin: 25px 22px 10px;
}
.ov-left, .ov-right { min-height: 0; overflow: hidden; }
.ov-right { display: grid; grid-template-rows: 52% minmax(0, 1fr); }
.ov-agents { overflow: hidden; }
.ov-activity { overflow: hidden; padding-top: 8px; }

/* The dash's own section label: mono 11 dim, kern 1.4, a strokeSoft rule
   16 below the label's top, content at +26 (overlay.swift:258-262). */
.ov-sec {
  height: 17px;
  margin-bottom: 9px;
  font: 11px/16px var(--font-mono);
  letter-spacing: 1.4px;
  color: var(--text3);
  border-bottom: 1px solid var(--stroke-soft);
  white-space: nowrap;
}
.ov-act .ov-sec { margin-bottom: 7px; }

.ov-cards { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ov-card {
  position: relative;
  height: 48px;
  padding: 10px 16px 0;
  border-radius: 11px;
  border: 1px solid var(--stroke-soft);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}
.ov-card__bar {
  position: absolute;
  left: -1px;
  top: 7px;
  width: 3px;
  height: 32px;
  border-radius: 1.5px;
  background: currentColor;
}
.ov-card__name {
  font: 700 13px/16px var(--font-ui);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ov-card__detail {
  margin-top: 2px;
  font: 11px/15px var(--font-mono);
  color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.ov-chips { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.ov-chip {
  position: relative;
  max-width: 100%;
  height: 25px;
  padding: 0 10px 0 22px;
  border-radius: 12.5px;
  border: 1px solid color-mix(in srgb, var(--mint) 18%, transparent);
  background: color-mix(in srgb, var(--mint) 6%, transparent);
  font: 11px/23px var(--font-mono);
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ov-chip::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
}

.ov-agent { position: relative; height: 36px; padding-left: 15px; }
.ov-agent .ds-dot { position: absolute; left: 1px; top: 4px; }
.ov-agent__label {
  font: 12px/16px var(--font-mono);
  letter-spacing: .5px;
  color: var(--text2);
  text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ov-agent__sub {
  font: 11px/15px var(--font-mono);
  color: var(--text3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Columns are MEASURED, not guessed (overlay.swift:405-421): the pane sets
   --ov-cols from the widest actor in view; every cell clips to its own. */
.ov-act-row {
  display: grid;
  grid-template-columns: var(--ov-cols, 66px 120px minmax(40px, 1fr) 60px);
  height: 18px;
  font: 11px/18px var(--font-mono);
}
.ov-act-row > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ov-act-row > .ov-tail { text-align: right; }

.ov.is-stale .ov-head, .ov.is-stale .ov-body { opacity: .55; }

.ov-foot {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  height: 62px;
  margin: 0 22px;
  padding-top: 13px;
  border-top: 1px solid var(--stroke-soft);
}

@media (max-width: 899px) {
  .ov { overflow: auto; display: block; }
  .ov-head { height: auto; min-height: 75px; margin: 0 16px; padding: 18px 0 14px 34px; }
  .ov-ramp { top: 18px; }
  .ov-dot { top: 28px; }
  .ov-line {
    position: static;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .ov-ago { position: static; margin-top: 4px; }
  .ov-head .ds-stale { position: static; margin-top: 2px; }
  .ov-body { display: block; margin: 20px 16px 10px; }
  .ov-left, .ov-right, .ov-agents, .ov-activity { overflow: visible; }
  .ov-right { display: block; margin-top: 22px; }
  .ov-activity { padding-top: 14px; }
  .ov-foot { height: auto; margin: 0 16px; padding: 13px 0 16px; }
}

/* ══ list panes: Accounts, Variables (accounts.swift:151-159) ═══════════ */

.lp { display: flex; flex-direction: column; padding: 28px 28px 20px; overflow: hidden; }
.lp-head { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 150px; column-gap: 20px; height: 52px; }
.lp-head .ds-head { min-width: 0; }
.lp-head .ds-sec { margin-top: 2px; }
.lp-head .ds-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-head .ds-btn { width: 150px; height: 38px; margin-top: 4px; }
.lp-list { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 72px; }

@media (max-width: 899px) {
  .lp { padding: 20px 16px 0; }
  .lp-head { height: auto; grid-template-columns: minmax(0, 1fr) auto; row-gap: 12px; margin-bottom: 16px; }
  .lp-head .ds-sub { white-space: normal; }
  .lp-head .ds-btn { width: auto; padding: 0 16px; margin-top: 0; }
}

/* ══ Midst (midst.swift:183-194) ═════════════════════════════════════════ */

.md { display: flex; flex-direction: column; padding: 26px 26px 24px; overflow: hidden; }
.md .ds-sub { margin-top: 6px; }
.md-open { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 64px; column-gap: 12px; margin-top: 10px; }
.md-open .ds-btn { height: 30px; padding: 0; }
.md .ds-status { margin-top: 8px; }
.md .ds-stale { flex: none; margin-top: 2px; }
.md-list { flex: 1; min-height: 0; overflow-y: auto; margin-top: 16px; padding-bottom: 72px; }
.md-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  grid-template-areas: "dot text pill btns";
  align-items: center;
  column-gap: 8px;
  min-height: 46px;
  padding-right: 14px;
  border-radius: var(--r-row);
  border: 1px solid var(--stroke);
  background: var(--lift);
}
.md-row__dot { grid-area: dot; justify-self: start; margin-left: 13px; color: var(--blue-ink); }
.md-row__text { grid-area: text; min-width: 0; display: flex; flex-direction: column; padding: 5px 0; }
/* Rendered order on the Mac: the row is an unflipped NSView, so the host line
   (y 28) sits ABOVE the name (y 9). Copied as it renders, not as it reads. */
.md-row__host { font: 10.5px/14px var(--font-mono); color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-row__name { margin-top: 2px; font: 500 13px/17px var(--font-ui); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.md-row__name.is-custom { color: var(--green-ink); }
.md-row__pill { grid-area: pill; }
.md-row__btns { grid-area: btns; display: flex; align-items: center; gap: 8px; }
.md-row__btns .ds-btn { height: 28px; padding: 0; }
.md-row__btns .md-name { width: 52px; }
.md-row__btns .md-focus { width: 70px; }
.md-row__btns .md-close { width: 30px; font-weight: 400; }

@media (max-width: 899px) {
  .md { padding: 20px 16px 0; }
  .md-row {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas: "dot text text" "dot pill btns";
    row-gap: 6px;
    padding: 6px 10px 8px 0;
  }
  .md-row__pill { justify-self: start; }
  .md-row__btns { justify-self: end; }
}

/* ══ Agents (agents.swift) ══════════════════════════════════════════════
   Phone first: the cards, then the ask panel under them. From 900 px the
   ask panel stands beside the list, the way the native pane keeps it in
   view while the roster scrolls. */

.ag { display: flex; flex-direction: column; padding: 20px 16px calc(24px + var(--safe-bottom)); }
.ag .ds-sub { margin-top: 6px; }
.ag > .ds-status { margin-top: 10px; }
.ag-body { display: flex; flex-direction: column; gap: 22px; margin-top: 8px; min-width: 0; }
.ag-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ag-group { margin: 10px 2px 0; }
.ag-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-areas: "dot text" "btns btns";
  row-gap: 10px;
  padding: 12px 12px 12px 8px;
  border-radius: var(--r-row);
  border: 1px solid var(--stroke);
  background: var(--lift);
}
.ag-card.is-picked { border-color: var(--input-edge); background: var(--lift-hover); }
.ag-card__dot { grid-area: dot; justify-self: center; margin-top: 6px; }
.ag-card__text { grid-area: text; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ag-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.ag-card__name { font: 600 15px/20px var(--font-ui); color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.ag-card__facts { font: 11px/15px var(--font-mono); color: var(--text2); overflow-wrap: anywhere; }
.ag-card__ready { font: 13px/17px var(--font-ui); overflow-wrap: anywhere; }
.ag-card__btns { grid-area: btns; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ag-card__btns .ds-btn { min-height: 44px; padding: 0 16px; }

.ag-ask { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ag-ask__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ag-ask__title { font: 600 15px/20px var(--font-ui); color: var(--text); }
.ag-ask__state { flex: 0 1 auto; min-width: 0; font: 12px/16px var(--font-ui); overflow-wrap: anywhere; }
.ag-ask .ag-new { min-height: 44px; padding: 0 10px; margin-left: auto; }
.ag-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.ag-input { height: auto; min-height: 44px; padding: 10px; font-size: 16px; line-height: 22px; resize: vertical; }
.ag-send { min-height: 44px; padding: 0 20px; }
.ag-note { margin: 0; font: 12px/16px var(--font-ui); color: var(--text3); }
.ag-log {
  min-height: 120px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: var(--r-input);
  border: 1px solid var(--border2);
  background: var(--input-fill);
}
.ag-log__hint { margin: 0; font: 13px/18px var(--font-ui); color: var(--text3); }
.ag-msg + .ag-msg { margin-top: 14px; }
.ag-msg__who { font: 10px/14px var(--font-mono); letter-spacing: 1.2px; text-transform: uppercase; color: var(--text3); }
.ag-msg__text { margin-top: 3px; font: 15px/21px var(--font-ui); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }

@media (min-width: 900px) {
  .ag { padding: 26px 28px 24px; }
  .ag-card {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas: "dot text btns";
    column-gap: 8px;
    align-items: center;
  }
  .ag-card__btns { flex-wrap: nowrap; }
  .ag-card__btns .ds-btn { min-height: 32px; }
  .ag-card__dot { align-self: start; margin-top: 7px; }
  .ag-ask .ag-new, .ag-send { min-height: 36px; }
  .ag-input { font-size: 14px; }
}
/* Wide: the ask panel beside the roster, kept in view while it scrolls. */
@media (min-width: 1280px) {
  .ag-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); align-items: start; gap: 28px; }
  .ag-ask { position: sticky; top: 0; }
  .ag-log { max-height: calc(100vh - 300px); }
}

/* ══ Hypertra Auth (authn.swift:69-77, 105-174) ══════════════════════════ */

.au { display: flex; flex-direction: column; padding: 26px 26px 24px; overflow: hidden; }
.au-title { height: 16px; font: 10px/16px var(--font-mono); color: var(--text3); }
.au-sub { margin-top: 6px; height: 16px; font: 11px/16px var(--font-mono); color: var(--text2); }
.au .ds-status { margin-top: 8px; }
.au-list { flex: 1; min-height: 0; overflow-y: auto; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; padding-bottom: 72px; }
.au-gate { margin-top: 16px; }
.au-gate[hidden] { display: none; }
.au-gate__note { padding: 0 4px; font: 12px/18px var(--font-ui); color: var(--text3); }
.au-gate .ds-btn { margin-top: 12px; }
/* The 60-second window (§7.7): how long until the codes hide, and a way to
   hide them now. */
.au-window { display: flex; align-items: center; gap: 12px; margin-top: 8px; height: 30px; }
.au-window[hidden] { display: none; }
.au-window__left { font: 11px/16px var(--font-mono); color: var(--amber-ink); }
.au-window .ds-btn { height: 30px; padding: 0 10px; }
/* Rendered stacking on the Mac (an unflipped row, authn.swift:115-174): the
   countdown bar along the TOP edge, the code in the upper half, the seconds
   mid-right, name and state on the bottom line. */
.au-row {
  position: relative;
  flex: none;
  height: 60px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 50%, transparent);
}
.au-row .ds-dot { position: absolute; left: 16px; top: 25px; }
.au-row__bar {
  position: absolute;
  left: 16px;
  top: 3px;
  height: 3px;
  width: var(--left, 0px);
  border-radius: 1.5px;
  background: currentColor;
}
.au-row__code {
  position: absolute;
  left: 38px;
  top: 6px;
  height: 26px;
  padding: 0;
  border: 0;
  background: none;
  font: 22px/26px var(--font-mono);
  letter-spacing: 3px;
  color: var(--soft);
  cursor: pointer;
  white-space: nowrap;
}
.au-row__code.is-copied { font-size: 13px; letter-spacing: 0; color: var(--mint); }
.au-row__secs {
  position: absolute;
  right: 16px;
  top: 22px;
  font: 11px/16px var(--font-mono);
}
.au-row__name {
  position: absolute;
  left: 38px;
  right: 76px;
  top: 36px;
  font: 12px/16px var(--font-mono);
  color: var(--text);
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}
.au-row__err {
  position: absolute;
  left: 38px;
  right: 16px;
  top: 14px;
  font: 11px/16px var(--font-mono);
  color: var(--red);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 899px) {
  .au { padding: 20px 16px 0; }
  .au-sub { height: auto; }
}

/* ══ Memory (memory.swift:349-366, 476-555) ══════════════════════════════ */

.mem { display: flex; flex-direction: column; padding: 26px 26px 16px; overflow: hidden; }
.mem-status {
  flex: none;
  height: 22px;
  margin-top: 8px;
  font: 600 16px/22px var(--font-ui);
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mem-search { flex: none; margin-top: 12px; }
.mem-search .ds-input { width: 100%; }
.mem-list { flex: 1; min-height: 0; overflow-y: auto; margin: 12px 0 8px; display: flex; flex-direction: column; gap: 6px; }
.mem-row {
  position: relative;
  flex: none;
  height: 44px;
  padding: 5px 14px 0 18px;
  border-radius: var(--r-row);
  border: 1px solid var(--stroke);
  background: var(--lift);
}
.mem-row .ds-dot { position: absolute; left: 7px; top: 19px; }
.mem-row__top, .mem-row__bottom { display: flex; gap: 12px; align-items: baseline; }
.mem-row__title { flex: 1; min-width: 0; font: 12.5px/17px var(--font-mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-row__title.is-dim { color: var(--text3); }
.mem-row__prefix { color: var(--text3); }
.mem-row__age, .mem-row__meta { flex: none; max-width: 30%; font: 10px/14px var(--font-mono); color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-row__snip { flex: 1; min-width: 0; margin-top: 2px; font: 11px/15px var(--font-mono); color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-empty { padding: 24px 12px 0; text-align: center; font: 12px/22px var(--font-mono); color: var(--text3); }
.mem-compose {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 34fr) minmax(0, 66fr) auto;
  column-gap: 10px;
  align-items: end;
}
.mem-compose .ds-input { width: 100%; }
.mem-compose .ds-btn { height: 34px; }
.mem-note { flex: none; height: 16px; margin-top: 10px; font: 11px/16px var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 899px) {
  .mem { padding: 20px 16px 12px; }
  .mem-status { height: auto; white-space: normal; font-size: 15px; line-height: 21px; }
  .mem-compose { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .mem-compose .ds-btn { width: 100%; height: 38px; }
  .mem-note { height: auto; white-space: normal; }
}

/* ══ Terminal — the "off" state only (docs/source-pwa.md §1.9) ═══════════ */

.tm { display: grid; grid-template-columns: 200px minmax(0, 1fr); background: var(--scrim); overflow: hidden; }
.tm-side { position: relative; background: var(--void); border-right: 1px solid var(--stroke-soft); }
.tm-side .ds-sec { position: absolute; left: 14px; right: 14px; top: 18px; }
.tm-side .ds-btn { position: absolute; left: 12px; top: 44px; width: 176px; height: 34px; }
.tm-screen { padding: 20px 24px; font: 12.5px/18px var(--font-mono); color: var(--text3); }

@media (max-width: 899px) {
  .tm { display: block; }
  .tm-side { height: 92px; border-right: 0; border-bottom: 1px solid var(--stroke-soft); }
  .tm-side .ds-sec { left: 16px; }
  .tm-side .ds-btn { left: 16px; width: calc(100% - 32px); }
  .tm-screen { padding: 20px 16px; }
}

/* ══ Audit (control.swift:356-418) ═══════════════════════════════════════ */

.ad { display: flex; flex-direction: column; overflow: hidden; }
.ad-head { flex: none; height: 64px; padding: 28px 28px 0; }
.ad-text {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 28px 72px;
  font: 11.5px/1.2 var(--font-mono);
  white-space: pre;
  user-select: text;
  -webkit-user-select: text;
}
.ad-ts { color: color-mix(in srgb, var(--steel) 70%, transparent); }
.ad-err { padding: 0 28px; font: 11px/16px var(--font-mono); color: var(--red); }

@media (max-width: 899px) {
  .ad-head { height: 52px; padding: 20px 16px 0; }
  .ad-text { padding: 12px 16px 72px; }
  .ad-err { padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-dot--pulse { animation: none; }
}

/* ══ About (#/about, §7.9) ═══════════════════════════════════════════════ */

.ab { padding: 20px 28px 72px; }
.ab-back { height: 32px; padding: 0 10px; margin: 0 0 12px -10px; }
.ab-sub {
  margin: 22px 0 8px;
  font: 10px/16px var(--font-mono);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text2);
}
.ab-kv {
  display: grid;
  grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
  gap: 6px 16px;
  margin: 12px 0 0;
  font: 12.5px/18px var(--font-ui);
}
.ab-kv dt { color: var(--text3); }
.ab-kv dd { margin: 0; color: var(--text); font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.ab-kv dd.tone-amber { color: var(--amber-ink); }
.ab .ds-head { margin-top: 28px; }
.ab-sessions { margin-top: 12px; }
.ab-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ab-actions .ds-btn { height: 38px; padding: 0 16px; }

@media (max-width: 899px) {
  .ab { padding: 12px 16px 72px; }
  .ab-actions .ds-btn { flex: 1 1 100%; }
}
